@cotal-ai/connector-core 0.36.0 → 0.38.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # @cotal-ai/connector-core
2
2
 
3
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
4
+ `cotal_spawn` / `cotal_persona` / `cotal_personas` / `cotal_despawn`), and the hook relay. The connector adapters
5
5
  (Claude Code, OpenCode, Hermes) are thin clients over it.
6
6
 
7
7
  **Tier:** `extensions/`. Peer-depends [`@cotal-ai/core`](../../packages/core); self-registers on
package/dist/agent.d.ts CHANGED
@@ -2,11 +2,10 @@ import { EventEmitter } from "node:events";
2
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
4
  export type { AttentionMode, ChannelMode };
5
- /** Client-side request window for the manager's readiness-waiting `start` op (#159 B1): the manager
6
- * replies only on a REAL outcome presence join, process exit, or its ~30s readiness backstop —
7
- * so a spawn request must OUTLIVE that window, not the 5s op default. The tier rule forbids
8
- * importing the manager's READINESS_TIMEOUT_MS here; the launch-parity smoke enforces the
9
- * relation by test. */
5
+ /** Client-side floor for a spawn action's submit + follow. The manager acceptance carries the exact
6
+ * connector-selected readiness budget, and core extends the follow through that budget plus
7
+ * delivery margin. This floor still outlives the manager's generic 30s default and protects
8
+ * older responders whose acceptance predates that field. */
10
9
  export declare const SPAWN_TIMEOUT_MS = 40000;
11
10
  /** Grace for a mesh op issued while the link is still coming up. `start()` deliberately returns
12
11
  * immediately so the connector's MCP surface boots while the broker is absent — which means a
@@ -78,6 +77,15 @@ export interface ExactDrainResult {
78
77
  * layer to wake the session now (the Stop→idle flush of held messages); `"error"` (Error) for
79
78
  * endpoint faults.
80
79
  */
80
+ /**
81
+ * The five states a caller has to tell apart, derived in one place so every consumer agrees.
82
+ *
83
+ * `degraded` is the one that matters and the one a single boolean gets wrong: the endpoint is bound
84
+ * but the socket underneath it is down, so sends queue or fail while the client reconnects. It is
85
+ * NOT the same as `disconnected`, and it is not a stopped session either. `stopped` is terminal and
86
+ * is not a fault at all.
87
+ */
88
+ export type ConnectionState = "ready" | "degraded" | "connecting" | "disconnected" | "stopped";
81
89
  export declare class MeshAgent extends EventEmitter {
82
90
  readonly ep: CotalEndpoint;
83
91
  readonly config: AgentConfig;
@@ -109,10 +117,16 @@ export declare class MeshAgent extends EventEmitter {
109
117
  private protectedDropIds;
110
118
  private dropUnsafe;
111
119
  private _connected;
120
+ /** Raw NATS transport liveness, separate from `_connected` (the full Cotal bind/readiness). */
121
+ private _transportConnected;
122
+ /** Wall-clock time of the latest inbox drain that actually committed at least one delivery.
123
+ * This is measured only after the backing acknowledgements succeed, never inferred from a read
124
+ * attempt or from an empty inbox. */
125
+ private _lastInboxDrainedAt?;
112
126
  /** Latest connection failure, retained until the endpoint binds so a bounded readiness gate can
113
127
  * explain why an otherwise healthy host never joined the mesh. */
114
128
  private lastConnectionError?;
115
- private endpointErrorLog;
129
+ private endpointNoticeLog;
116
130
  private _status;
117
131
  private _attention;
118
132
  private _recallCursor;
@@ -140,12 +154,24 @@ export declare class MeshAgent extends EventEmitter {
140
154
  private recvKeySeq;
141
155
  private focusExcludedIds;
142
156
  private focusRecallUnsafeChannels;
143
- private stopping;
157
+ private _stopping;
144
158
  constructor(config: AgentConfig);
145
159
  get id(): string;
146
160
  get connected(): boolean;
147
- /** The latest safe diagnostic for a connection that has not become live yet. */
161
+ /** Whether this session's current NATS transport is live, independent of full endpoint readiness. */
162
+ get transportConnected(): boolean;
163
+ /** Latest pre-bind failure. A successful bind clears it; stop preserves it for post-mortem diagnosis. */
148
164
  get connectionIssue(): string | undefined;
165
+ /** The latest successful, non-empty inbox drain in this session. */
166
+ get lastInboxDrainedAt(): number | undefined;
167
+ /** Whether {@link stop} has been called. Terminal, and never cleared: a stopped session does not
168
+ * serve again. This is the ONLY way to tell a deliberate shutdown from a lost connection, because
169
+ * `stop()` clears readiness and transport together, so those two read identically in both cases. */
170
+ get stopping(): boolean;
171
+ /** The three liveness facts combined, in one place. Every combination maps, so a caller never has
172
+ * to guess what an unlisted pair means, and a caller that disagrees with this reading can still
173
+ * read {@link connected}, {@link transportConnected} and {@link stopping} directly. */
174
+ get connectionState(): ConnectionState;
149
175
  /** Wait for the endpoint's real post-bind connection signal. `start()` deliberately stays
150
176
  * background for connectors whose MCP surface must boot while the broker is absent; a host that
151
177
  * advertises mesh readiness uses this bounded gate before making that claim. */
@@ -219,6 +245,8 @@ export declare class MeshAgent extends EventEmitter {
219
245
  * starts — so memory stays ~2× the cap while the lookup horizon never shrinks below it. */
220
246
  private markHandled;
221
247
  inboxCount(scope?: InboxScope): number;
248
+ /** Local receive time of the oldest still-buffered automatic delivery, if any. */
249
+ oldestAutomaticReceivedAt(): number | undefined;
222
250
  /**
223
251
  * How far this session has read the focus-mode channel recall.
224
252
  *
@@ -347,16 +375,26 @@ export declare class MeshAgent extends EventEmitter {
347
375
  setAttention(mode: AttentionMode): Promise<void>;
348
376
  /** Focus recall: the channel ambient + @mentions ack-dropped since this agent entered focus,
349
377
  * read back from the chat stream on demand and **replay-gated per channel** (a `replay=off`
350
- * channel yields nothing — recall must not become a history bypass). Items are marked
351
- * `historical` (catch-up framing). `droppedChannels` names channels whose earliest retained
352
- * message postdates the focus-watermark older ambient may have aged out of the per-channel
353
- * window (never-silent). Empty unless in focus. Wildcard subscriptions (`team.>`) are skipped
354
- * (can't Direct-Get a wildcard). */
378
+ * channel yields nothing, and is named in `droppedChannels` — recall must not become a history
379
+ * bypass, and it must not claim a suppressed channel's window was empty and complete either).
380
+ * Items are marked `historical` (catch-up framing). `droppedChannels` also names channels whose
381
+ * earliest retained message postdates the focus-watermark older ambient may have aged out of
382
+ * the per-channel window — and wildcard subscriptions (`team.>`), which recall cannot read back
383
+ * per concrete sub-channel (#977: a wildcard join is not itself a channel ingest can consult a
384
+ * replay policy for) and so cannot vouch for either (never-silent throughout). Empty unless in
385
+ * focus. */
355
386
  recallAmbient(): Promise<{
356
387
  items: InboxItem[];
357
388
  droppedChannels: string[];
358
389
  }>;
359
390
  send(text: string, channel?: string, mentions?: string[]): Promise<CotalMessage>;
391
+ /**
392
+ * What a caller can TELL about a send target BEFORE the publish: whether the name
393
+ * already existed (joined, registry, or prior traffic) and close matches when it
394
+ * did not. Does not refuse create. Graded before multicast so the new message cannot
395
+ * make the name look pre-existing.
396
+ */
397
+ describeSendChannel(channel: string): Promise<string>;
360
398
  /** Throw if any name isn't a peer we've observed. Validates against the FULL roster
361
399
  * (incl. self — your own name is a valid participant; resolvePeer's self-filter would
362
400
  * wrongly reject it), case-insensitively. Send is all-or-nothing: one unknown @name aborts
@@ -373,10 +411,9 @@ export declare class MeshAgent extends EventEmitter {
373
411
  msg: CotalMessage;
374
412
  peer: Presence;
375
413
  }>;
376
- /** Ask the manager to spawn a new teammate into this space (its `start` op).
377
- * #159 B1: the manager replies to `start` only on a REAL outcome — presence join, process exit,
378
- * or its ~30s readiness backstop so the request must outlive that window ({@link SPAWN_TIMEOUT_MS}),
379
- * not the 5s op default.
414
+ /** Ask the manager to spawn a new teammate into this space (its `spawn` action).
415
+ * The request uses {@link SPAWN_TIMEOUT_MS} as its floor; after acceptance, core follows through
416
+ * the exact connector-selected readiness budget carried by the acceptance.
380
417
  * How it lands — a detached PTY, a tmux window, a cmux tab — is the manager's
381
418
  * runtime; from here it just joins the mesh as a lateral peer. `opts.agent` picks
382
419
  * the harness (default the manager's `COTAL_DEFAULT_AGENT`, else `cotal`/Claude), `opts.model` /
@@ -394,6 +431,15 @@ export declare class MeshAgent extends EventEmitter {
394
431
  cwd?: string;
395
432
  prompt?: string;
396
433
  }): Promise<ControlReply>;
434
+ /** The manager's recorded model pin for a managed seat (`inspect.model`). Absence is a real
435
+ * state: a launch may pin none. Distinct from a failed inspect, which cannot attest. */
436
+ inspectModel(name: string): Promise<{
437
+ ok: true;
438
+ model?: string;
439
+ } | {
440
+ ok: false;
441
+ error: string;
442
+ }>;
397
443
  /** One v0.4 manager-endpoint invoke (P2 item 1, 1c.2b): the generic {@link CotalEndpoint.invokeService}
398
444
  * path (describe → §13.7 store fetch → digest-verified recompile → typed command), adapted back to
399
445
  * the {@link ControlReply} shape every tool above consumes. `undefined` args are stripped BEFORE the
@@ -454,6 +500,11 @@ export declare class MeshAgent extends EventEmitter {
454
500
  announceError?: string;
455
501
  announceOutcome?: "denied" | "unknown";
456
502
  }>;
503
+ /** Mesh-side persona catalog list: name, role, model, description, scoped by the same
504
+ * ownership rule as `definePersona`. */
505
+ listPersonas(): Promise<ControlReply>;
506
+ /** Mesh-side persona catalog show of one card. Unauthorized / missing names are not-found. */
507
+ showPersona(name: string): Promise<ControlReply>;
457
508
  /** The full roster, including ourselves. */
458
509
  roster(): Presence[];
459
510
  /** Our last self-reported presence status. */
@@ -476,6 +527,7 @@ export declare class MeshAgent extends EventEmitter {
476
527
  description?: string;
477
528
  instructions?: string;
478
529
  replay: boolean;
530
+ registered: boolean;
479
531
  };
480
532
  /** Channels we're currently subscribed to (live — reflects join/leave). */
481
533
  joinedChannels(): string[];
@@ -532,6 +584,10 @@ export declare class MeshAgent extends EventEmitter {
532
584
  * attached Codex TUI. Consumer names are generated per reset, so normalize them before
533
585
  * deduplicating; otherwise every `_71`, `_72`, ... would look like a new fault. */
534
586
  private handleEndpointError;
587
+ private handleEndpointWarning;
588
+ private logEndpointNotice;
535
589
  private log;
536
590
  }
591
+ /** Names already known that differ from `channel` by one insertion, deletion, or substitution. */
592
+ export declare function closeChannelNames(channel: string, known: readonly string[]): string[];
537
593
  //# sourceMappingURL=agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa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