/** * The `cotal_orientation` card — a structured, versioned self/context snapshot an agent reads to * orient: who it is, what it may read/post, what it can do, and what's around it. * * Built from the SAME {@link AgentConfig} (+ the gated tool list the connector exposes) that gates the * tools, so it can never drift from what's actually enforced. Connector-local introspection — an agent * reading its own minted grants — NOT a wire/SPEC capability handshake. * * The typed {@link Orientation} object is the source of truth; {@link renderOrientation} is one view of * it (the text the model reads). A future MCP resource can JSON-stringify the object directly. */ import type { AttentionMode, PresenceStatus } from "@cotal-ai/core"; import type { MeshAgent } from "./agent.js"; import { type AgentConfig } from "./config.js"; /** One-line connector bootstrap that points a joining agent at `cotal_orientation`. Folded into each * connector's system prompt / MCP instructions so every agent — Claude Code, OpenCode, Hermes — is * told to orient first, from a single source of truth. */ export declare const ORIENTATION_BOOTSTRAP: string; /** Mesh-first steer, folded in alongside {@link ORIENTATION_BOOTSTRAP} for every connector. Keeps * multi-agent work on the mesh instead of inside the harness's own hidden subagents, so it stays * visible to the user and addressable by peers. Unconditional (a read-only agent still delegates via * DM/anycast rather than a private subagent); the spawn-specific detail lives on the cotal_spawn tool. */ export declare const MESH_FIRST_STEER: string; /** Workflow-run steer, folded in beside {@link MESH_FIRST_STEER} for every connector. Points agents * at durable cotal-lang runs for coordination that must outlive their own session, so the reflex is * a journalled `cotal run` rather than an improvised loop held in one agent's context. */ export declare const WORKFLOW_STEER: string; /** A tool the agent can actually call (already gated), as it appears in the card. */ export interface OrientationTool { name: string; title: string; } export interface Orientation { /** Schema version — bump on a breaking shape change so future renderers/resources can adapt. */ v: 1; /** Snapshot stamp. The live fields below (peers / status / attention / unread) are as of this time; * the identity/access/capabilities/tools fields are static for the session. */ generatedAt: number; identity: { name: string; role?: string; space: string; id: string; cotalVersion: string; model?: string; }; access: { /** auth mode → these grants are broker-enforced; open mode → advisory (host-trusted) only. */ authMode: boolean; /** Active read set — channels you currently receive. */ read: string[]; /** Read ACL — channels you MAY join (equals `read` when no creds). */ readAcl: string[]; /** Post ACL — channels you may broadcast to. Empty ⇒ read-only (default-deny). */ post: string[]; }; /** Control-plane capabilities (e.g. `spawn`). Empty ⇒ none beyond the defaults granted to all. */ capabilities: string[]; /** The tools available to you, grouped so the surface reads small: `core` is the everyday loop. */ tools: { core: OrientationTool[]; more: OrientationTool[]; }; peers: { present: number; summary: string; }; status: PresenceStatus; attention: AttentionMode; unread: { total: number; }; /** A factual map from intent → tool. Not a prescribed sequence. */ actions: { read: string; replyChannel: string; replyPrivate: string; askRole: string; }; } /** Assemble the card. `visibleTools` is the already-gated tool list the connector exposes (pass the * result of `cotalToolSpecs(config)` mapped to name/title) — the orientation tool itself is dropped. * Pure: `generatedAt` is supplied by the caller so it's testable and deterministic. */ export declare function buildOrientation(agent: MeshAgent, config: AgentConfig, visibleTools: OrientationTool[], generatedAt: number): Orientation; /** Render the card as compact, glanceable text — the view the model reads. */ export declare function renderOrientation(o: Orientation): string; //# sourceMappingURL=orientation.d.ts.map