@cotal-ai/connector-core 0.3.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @cotal-ai/connector-core
2
+
3
+ The shared MCP-bridge runtime: the mesh agent, the `cotal_*` tool specs (including
4
+ `cotal_spawn` / `cotal_persona` / `cotal_despawn`), and the hook relay. The connector adapters
5
+ (Claude Code, OpenCode, Hermes) are thin clients over it.
6
+
7
+ **Tier:** `extensions/`. Peer-depends [`@cotal-ai/core`](../../packages/core); self-registers on
8
+ import.
9
+
10
+ See [docs/claude-code-integration.md](../../docs/claude-code-integration.md) for how a session
11
+ joins, and the [root AGENTS.md](../../AGENTS.md) for the tier rules.
package/dist/agent.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter } from "node:events";
2
- import { CotalEndpoint, type ControlReply, type Presence, type PresenceStatus, type CotalMessage } from "@cotal-ai/core";
2
+ import { CotalEndpoint, type ControlReply, type Presence, type PresenceStatus, type AttentionMode, type ChannelMode, type CotalMessage } from "@cotal-ai/core";
3
3
  import type { AgentConfig } from "./config.js";
4
+ export type { AttentionMode, ChannelMode };
4
5
  /** A message that has arrived for us, normalized for the agent to read. */
5
6
  export interface InboxItem {
6
7
  id: string;
@@ -23,17 +24,6 @@ export interface InboxItem {
23
24
  replyTo?: string;
24
25
  contextId?: string;
25
26
  }
26
- /**
27
- * How aggressively peer traffic interrupts this agent — chosen by the agent, orthogonal to
28
- * presence ({@link PresenceStatus}). Local-only (never broadcast as presence). Advisory UX, not
29
- * a security boundary (an @-mention is payload-forgeable — it can always *wake*; see docs).
30
- * - `open` — receive everything; ambient channel chatter wakes when idle (today's behavior).
31
- * - `dnd` — ambient never wakes (it still arrives in the next turn); dm/anycast/@mention wake.
32
- * - `focus` — only subject-directed (dm/anycast) reach the buffer/context; channel ambient and
33
- * @mentions are acked-and-dropped at ingest (an @mention still *wakes*, body pulled
34
- * via {@link MeshAgent.recallAmbient}). Recall = "ambient since you entered focus".
35
- */
36
- export type AttentionMode = "open" | "dnd" | "focus";
37
27
  /**
38
28
  * A thin, mesh-native agent: a {@link CotalEndpoint} plus a buffered inbox and
39
29
  * name-based peer resolution. This is the shared core behind the MCP server
@@ -53,9 +43,24 @@ export declare class MeshAgent extends EventEmitter {
53
43
  readonly ep: CotalEndpoint;
54
44
  readonly config: AgentConfig;
55
45
  private inbox;
46
+ /** Ids already SURFACED to the model (handled) — bounded, commit-aware dedup ACROSS a drain. The
47
+ * live↔durable transition window can deliver the two copies of one message far enough apart that the
48
+ * first is already drained (removed from {@link inbox}) when the second arrives; the pending-inbox
49
+ * check alone would then re-buffer and double-surface it. Recorded at HANDLE time ({@link drainInbox}),
50
+ * never at receive time — so a later durable duplicate of an already-handled id is safe to ack (the
51
+ * logical message was delivered), which is exactly what the removed endpoint-level `firstSeenChat`
52
+ * got wrong (it acked at receive time, before handling). Two rotating windows bound memory. */
53
+ private handledIds;
54
+ private handledIdsPrev;
56
55
  private _connected;
57
56
  private _status;
58
57
  private _attention;
58
+ /** Per-channel attention overrides — the AUTHORITATIVE runtime state (read by {@link ingest} on
59
+ * every message). Seeded from the agent-file default; mutated by {@link setChannelMode}; mirrored
60
+ * to presence for peers. An absent key ⇒ that channel follows the global {@link _attention}. Reset
61
+ * on restart (rebuilt from config; presence sweep clears the mirror). */
62
+ private channelModes;
63
+ private _contextId;
59
64
  /** Chat-stream frontier captured when this agent entered `focus` — recall surfaces ambient
60
65
  * published after it ("since you entered focus"). Undefined unless in focus. */
61
66
  private focusSince?;
@@ -63,10 +68,21 @@ export declare class MeshAgent extends EventEmitter {
63
68
  constructor(config: AgentConfig);
64
69
  get id(): string;
65
70
  get connected(): boolean;
71
+ /** Correlates outgoing messages to the host agent's current context/window. */
72
+ setContextId(contextId: string | undefined): void;
66
73
  /** Begin connecting (with background retry). Returns immediately. */
67
74
  start(retryMs?: number): void;
68
75
  private connectLoop;
69
76
  stop(): Promise<void>;
77
+ /** Manual reconnect: tear down the mesh connection and rebuild it in-process, WITHOUT
78
+ * stopping the agent (the recovery path, so it does NOT assert connected). Delegates to
79
+ * {@link CotalEndpoint.reconnect}, which is serialized with the self-heal supervisor and
80
+ * interruptible. Returns a one-line status for the caller to surface (e.g. the
81
+ * cotal_reconnect tool → TUI); on failure the endpoint keeps retrying in the background. */
82
+ reconnect(): Promise<{
83
+ ok: boolean;
84
+ message: string;
85
+ }>;
70
86
  private ingest;
71
87
  /** Normalize a wire message into an {@link InboxItem}. `kind` is the **authenticated** class
72
88
  * from {@link MessageMeta} (subject-derived), never the forgeable payload `to`/`toService`;
@@ -75,6 +91,10 @@ export declare class MeshAgent extends EventEmitter {
75
91
  private toInboxItem;
76
92
  /** Return pending messages and ack them — call only when they're actually surfaced to the model. */
77
93
  drainInbox(limit?: number): InboxItem[];
94
+ /** Record an id as surfaced/handled, for {@link ingest}'s commit-aware cross-path dedup. Bounded via
95
+ * two rotating windows: when the live set fills, it becomes the previous window and a fresh one
96
+ * starts — so memory stays ~2× the cap while the lookup horizon never shrinks below it. */
97
+ private markHandled;
78
98
  /** Return pending messages without acking them (they stay on the stream). */
79
99
  peekInbox(): InboxItem[];
80
100
  inboxCount(): number;
@@ -83,13 +103,36 @@ export declare class MeshAgent extends EventEmitter {
83
103
  * so held *ambient* alone never wakes a turn (which would empty-wake busy-loop). In `focus`
84
104
  * the buffer is directed-only, so this equals {@link inboxCount}. */
85
105
  directedPendingCount(): number;
106
+ /** Buffered items that should WAKE a Stop→idle flush — the mode-and-channel-aware predicate the
107
+ * connectors use instead of branching on attention themselves:
108
+ * - directed (dm/anycast) or an @mention → always (a quiet @mention still wakes; muted never buffers);
109
+ * - NORMAL ambient (no per-channel override) → only under global `open` (today's behavior);
110
+ * - QUIET ambient → never (it rides the next human turn, not a proactive wake).
111
+ * Subsumes {@link directedPendingCount}: in `dnd`/`focus` (no override) the open term is false, so it
112
+ * equals the directed count; in `open` it adds normal ambient but excludes quiet-channel ambient. */
113
+ pendingWake(): number;
86
114
  /** Ask any push layer (the channel) to wake the session now — used by the Stop→idle flush
87
115
  * to deliver a batch of held messages. Emits `"wake"`; a no-op if nothing listens. Never acks
88
116
  * or drains. Ack sites are now two: {@link drainInbox} (surfaced items) and the focus ingest
89
117
  * ack-drop (ambient/@mentions a focus agent chose not to receive into context). */
90
118
  requestWake(): void;
91
- /** This agent's attention mode (how aggressively peer traffic interrupts it). Local-only. */
119
+ /** This agent's global attention mode. Authoritative here; mirrored to presence (advisory) so peers
120
+ * can see it. Delivery never reads it back from presence — local state wins. */
92
121
  get attention(): AttentionMode;
122
+ /** This agent's per-channel override for `channel` (undefined ⇒ follow the global mode). */
123
+ channelMode(channel?: string): ChannelMode | undefined;
124
+ /** A snapshot of every per-channel override (for the at-a-glance views). */
125
+ channelModeEntries(): Record<string, ChannelMode>;
126
+ /** Set (or clear, with `"normal"`) one channel's attention override. Validates the channel is
127
+ * concrete and within this agent's read ACL (`allowSubscribe` — so a mode can be pre-set for a
128
+ * channel it may read but hasn't joined yet), updates the AUTHORITATIVE in-memory map, then mirrors
129
+ * the whole map to presence (best-effort; advisory). Per-instance + runtime: it NEVER writes the
130
+ * agent file (a shared template) and resets on restart.
131
+ *
132
+ * **Prospective only:** it does NOT purge messages already buffered from that channel — those were
133
+ * already received and still drain/wake per their original handling. Muting changes what arrives
134
+ * next, not what's already in the inbox. */
135
+ setChannelMode(channel: string, mode: ChannelMode | "normal"): Promise<void>;
93
136
  /** Set the attention mode. Entering `focus` captures the chat frontier as the focus-watermark
94
137
  * (recall surfaces ambient published after it); leaving focus clears it. Requires a live
95
138
  * connection only for `focus` (it reads the stream frontier). Ambient already *buffered* when
@@ -118,7 +161,9 @@ export declare class MeshAgent extends EventEmitter {
118
161
  * after connect) throws. See docs/architecture.md. */
119
162
  private assertKnownMentions;
120
163
  anycast(role: string, text: string): Promise<CotalMessage>;
121
- /** Resolve a peer by instance id (exact) or display name (case-insensitive, prefer present). */
164
+ /** Resolve a peer by instance id (exact) or display name. Deterministic and fail-loud: returns
165
+ * one peer, `undefined` if none match, or throws `AmbiguousPeerError` on a same-name collision —
166
+ * it never silently picks. See `resolvePeer` in @cotal-ai/core. */
122
167
  resolvePeer(target: string): Presence | undefined;
123
168
  dm(target: string, text: string): Promise<{
124
169
  msg: CotalMessage;
@@ -130,8 +175,13 @@ export declare class MeshAgent extends EventEmitter {
130
175
  spawn(name: string, role?: string): Promise<ControlReply>;
131
176
  /** Ask the manager to tear a teammate down (its `stop` op). Graceful by default —
132
177
  * the session is told to exit cleanly (so it leaves the mesh) before the
133
- * process/tab is closed; `graceful:false` is a hard, immediate kill. */
134
- despawn(name: string, opts?: {
178
+ * process/tab is closed; `graceful:false` is a hard, immediate kill.
179
+ *
180
+ * No `name` ⇒ self-despawn: rides the self-service control subject and the manager
181
+ * resolves the target as the managed agent whose id == this caller — so it can only
182
+ * ever stop itself, never a peer. A `name` ⇒ rides the privileged control subject
183
+ * (transport-gated to spawn-capable/admin); the manager refines own-child vs admin. */
184
+ despawn(name?: string, opts?: {
135
185
  graceful?: boolean;
136
186
  }): Promise<ControlReply>;
137
187
  /** Ask the manager to purge the space's retained chat backlog (its `purge` op). Cleanup only —
@@ -145,7 +195,6 @@ export declare class MeshAgent extends EventEmitter {
145
195
  definePersona(def: {
146
196
  name: string;
147
197
  prompt: string;
148
- role?: string;
149
198
  model?: string;
150
199
  }): Promise<ControlReply>;
151
200
  /** The full roster, including ourselves. */
@@ -153,6 +202,12 @@ export declare class MeshAgent extends EventEmitter {
153
202
  /** Our last self-reported presence status. */
154
203
  get status(): PresenceStatus;
155
204
  setStatus(status: PresenceStatus, activity?: string): Promise<void>;
205
+ /** Record the host's *actual* model — learned after launch (e.g. from Claude Code's `SessionStart`
206
+ * hook payload) — into the card's display-only `meta.model`, so peers see it in `cotal_roster` and
207
+ * the web roster even when the operator never pinned one. An explicit pin (`config.model`, from the
208
+ * agent file's `model:` or `COTAL_MODEL`) is authoritative and wins; this only fills the gap. Best-
209
+ * effort presence mirror (no `assertConnected` — safe pre-connect; it rides the first publish). */
210
+ setModel(model: string): Promise<void>;
156
211
  /** The boot-time "push" half of channel onboarding: a fenced, one-line description per
157
212
  * subscribed channel that has one (the full `instructions` stay pull-only via
158
213
  * cotal_channel_info — N paragraphs of least-attended text don't belong at boot). Attributed,
@@ -176,12 +231,21 @@ export declare class MeshAgent extends EventEmitter {
176
231
  description?: string;
177
232
  replay: boolean;
178
233
  joined: boolean;
234
+ durableUnclosed: boolean;
179
235
  messages: number;
236
+ mode: ChannelMode | "normal";
180
237
  }[]>;
181
- /** Join a channel mid-session (backfills history if replay is on; idempotent). */
238
+ /** Join a channel mid-session (backfills history if replay is on; idempotent). `durable` reports
239
+ * whether a durable backstop is active (Plane-3, SPEC §8, for a `durable`-class channel when a
240
+ * manager is present) — `false` means joined LIVE only, so messages sent while this session is
241
+ * offline won't be replayed. `reason` explains a `durable:false` on a channel that EXPECTED a
242
+ * backstop (e.g. no privileged provisioner); absent on a `live`-class channel (joined live is the
243
+ * contract there). */
182
244
  joinChannel(channel: string): Promise<{
183
245
  joined: boolean;
184
246
  backfilled: number;
247
+ durable: boolean;
248
+ reason?: string;
185
249
  }>;
186
250
  /** Leave a channel mid-session (refuses to leave the last one). */
187
251
  leaveChannel(channel: string): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAIL,aAAa,EACb,KAAK,YAAY,EAGjB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,2EAA2E;AAC3E,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MA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