@cotal-ai/connector-core 0.105.0 → 0.106.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/dist/agent.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from "node:events";
2
- import { CotalEndpoint, type ControlReply, type Presence, type PresenceCondition, type PresenceStatus, type PresenceView, type AttentionMode, type ChannelMode, type CotalMessage } from "@cotal-ai/core";
2
+ import { CotalEndpoint, type ControlReply, type Presence, type PresenceCondition, 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
5
  /** Client-side floor for a spawn action's submit + follow. The manager acceptance carries the exact
@@ -669,19 +669,16 @@ export declare class MeshAgent extends EventEmitter {
669
669
  /** Throw if any name isn't a peer we've observed. Validates against the FULL roster
670
670
  * (incl. self — your own name is a valid participant; resolvePeer's self-filter would
671
671
  * wrongly reject it), case-insensitively. Send is all-or-nothing: one unknown @name aborts
672
- * the whole broadcast (fail-loud on typos). Caveat: only catches peers THIS client has seen
673
- * — an offline peer lingers in the roster, but one never observed (or not yet filled in
674
- * after connect) throws. See docs/architecture.md.
672
+ * the whole broadcast (fail-loud on typos). Caveat: only catches peers THIS client has read
673
+ * — an offline peer lingers in the roster, but one no read has seen throws. See
674
+ * docs/architecture.md.
675
675
  *
676
- * #1229: the roster can only support an ABSENCE verdict while `presenceView()` is `current`.
677
- * `clearConnectionScoped()` empties it on every reconnect and the watch refills entry by
678
- * entry, so a refusal under an unsafe view would reject a mention of a live peer. A name
679
- * already in the roster is accepted in every state; an absent name under `unpopulated`
680
- * waits once for the initial snapshot and re-reads; a still-unverifiable name refuses with
681
- * the observer's own condition (never "no such peer") and the send does not go out. */
676
+ * #1229: only a read that succeeded supports an ABSENCE verdict. A name already in the roster
677
+ * is accepted whatever the read did; an absent name under a failed read refuses with the read's
678
+ * own error (never "no such peer") and the send does not go out. */
682
679
  private assertKnownMentions;
683
680
  /** The mention guard and `dm` refuse an unverifiable name through this one sentence, so the two
684
- * refusals cannot explain one view state differently. */
681
+ * refusals cannot explain one failed read differently. */
685
682
  private cannotVerify;
686
683
  anycast(role: string, text: string): Promise<{
687
684
  msg: CotalMessage;
@@ -689,19 +686,20 @@ export declare class MeshAgent extends EventEmitter {
689
686
  seq: number;
690
687
  duplicate: boolean;
691
688
  };
692
- /** Live roster rows holding `role`, ourselves included; absent when the presence view was not
693
- * current, since only a current view can say that no holder exists (#1229). */
689
+ /** Live roster rows holding `role`, ourselves included; absent when the roster read failed,
690
+ * since only a read that succeeded can say that no holder exists (#1229). */
694
691
  holdersAtSend?: number;
695
692
  }>;
696
- /** Resolve a peer by instance id (exact) or display name. Deterministic and fail-loud: returns
693
+ /** Resolve a peer by instance id (exact) or display name against the roster of the last
694
+ * {@link readRoster}. Deterministic and fail-loud: returns
697
695
  * one peer, `undefined` if none match, or throws `AmbiguousPeerError` on a same-name collision —
698
696
  * it never silently picks. See `resolvePeer` in @cotal-ai/core. */
699
697
  resolvePeer(target: string): Presence | undefined;
700
- /** #384: a peer that sent us a DM or anycast and has no roster row, by its exact id or, while the
701
- * presence view is current, by a display name only one such sender carried. A one-shot
698
+ /** #384: a peer that sent us a DM or anycast and has no roster row, by its exact id or, when the
699
+ * roster read succeeded, by a display name only one such sender carried. A one-shot
702
700
  * `cotal send` never registers presence, so without this a reply to it could not be addressed. */
703
701
  private heldSender;
704
- /** Why a DM target resolved to no one, under a current presence view. A target that names this
702
+ /** Why a DM target resolved to no one, under a roster read that succeeded. A target that names this
705
703
  * session says so, since the roster leaves it out of DM resolution. Present names that start with
706
704
  * the target are listed for the caller to choose from; none of them is ever picked. */
707
705
  private noPeer;
@@ -909,11 +907,12 @@ export declare class MeshAgent extends EventEmitter {
909
907
  listPersonas(instance?: string): Promise<ControlReply>;
910
908
  /** Mesh-side persona catalog show of one card. Unauthorized / missing names are not-found. */
911
909
  showPersona(name: string, instance?: string): Promise<ControlReply>;
912
- /** The full roster, including ourselves. */
913
- roster(): Presence[];
914
- /** Trust state of this observer's presence watch (`CotalEndpoint.presenceView()`): the roster
915
- * above can only support an absence verdict while this is `current` (#1229). */
916
- presenceView(): PresenceView;
910
+ /** The full roster, including ourselves, read from the broker now: a seat holds no presence watch
911
+ * (SPEC §6). Every roster surface reads through here (cotal_roster, the orientation card, the
912
+ * @mention guard, DM resolution and the anycast holder count), and calls made while a read is
913
+ * in flight share it. A failed read returns the roster of the last read that succeeded with
914
+ * the failure beside it: a name it holds is still a peer, but an absence is no verdict (#1229). */
915
+ readRoster(): Promise<RosterRead>;
917
916
  /** Our last self-reported presence status. */
918
917
  get status(): PresenceStatus;
919
918
  /** Run one presence write through the chain (#636): the write starts only after every earlier
@@ -1057,12 +1056,15 @@ export declare class MeshAgent extends EventEmitter {
1057
1056
  private logEndpointNotice;
1058
1057
  private log;
1059
1058
  }
1060
- /** Why a presence view that is not `current` cannot support an absence verdict (#1229). The roster,
1061
- * the orientation card and the mention and DM refusals all print this clause, so none of them can
1062
- * word one view state differently. */
1063
- export declare function presenceViewCondition(view: Exclude<PresenceView, {
1064
- state: "current";
1065
- }>): string;
1059
+ /** One {@link MeshAgent.readRoster}: the roster, and why it is last-known when the read failed. */
1060
+ export interface RosterRead {
1061
+ roster: Presence[];
1062
+ failure?: Error;
1063
+ }
1064
+ /** Why a roster whose read failed cannot support an absence verdict (#1229). The roster, the
1065
+ * orientation card and the mention and DM refusals all print this clause, so none of them can word
1066
+ * one failure differently. */
1067
+ export declare function presenceReadCondition(failure: Error): string;
1066
1068
  /** Names already known that differ from `channel` by one insertion, deletion, or substitution. */
1067
1069
  export declare function closeChannelNames(channel: string, known: readonly string[]): string[];
1068
1070
  //# 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,aA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KtF,mEAAmE;IAC7D,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;IAO/D;;wEAEoE;YACtD,gBAAgB;IAI9B;;;;+EAI2E;IACrE,aAAa,CAAC,SAAS,GAAE,MAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxE;;;6DAGyD;IACzD,OAAO,CAAC,eAAe;IAmBvB;;qEAEiE;IACjE,OAAO,CAAC,mBAAmB;IAO3B;;uFAEmF;IACnF,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,GAAG;CAGZ;AAED,mGAAmG;AACnG,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED;;+BAE+B;AAC/B,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,KAAK,GAAG,MAAM,CAE5D;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAOrF"}
package/dist/agent.js CHANGED
@@ -403,6 +403,9 @@ export class MeshAgent extends EventEmitter {
403
403
  ackWaitMs: config.ackWaitMs, // undefined → endpoint default (60s); shortened in tests to observe redelivery
404
404
  channels: config.subscribe, // the endpoint's live filter = the active read set
405
405
  channelModes: Object.fromEntries(this.channelModes), // seed presence so file defaults are visible at boot
406
+ // A seat reads the roster when it acts (readRoster) instead of watching it: a watch delivers
407
+ // every member's heartbeat to every member, K² per heartbeat in a space of K (SPEC §6).
408
+ watchPresence: false,
406
409
  card: {
407
410
  id: config.id,
408
411
  name: config.name,
@@ -1818,60 +1821,51 @@ export class MeshAgent extends EventEmitter {
1818
1821
  /** Throw if any name isn't a peer we've observed. Validates against the FULL roster
1819
1822
  * (incl. self — your own name is a valid participant; resolvePeer's self-filter would
1820
1823
  * wrongly reject it), case-insensitively. Send is all-or-nothing: one unknown @name aborts
1821
- * the whole broadcast (fail-loud on typos). Caveat: only catches peers THIS client has seen
1822
- * — an offline peer lingers in the roster, but one never observed (or not yet filled in
1823
- * after connect) throws. See docs/architecture.md.
1824
+ * the whole broadcast (fail-loud on typos). Caveat: only catches peers THIS client has read
1825
+ * — an offline peer lingers in the roster, but one no read has seen throws. See
1826
+ * docs/architecture.md.
1824
1827
  *
1825
- * #1229: the roster can only support an ABSENCE verdict while `presenceView()` is `current`.
1826
- * `clearConnectionScoped()` empties it on every reconnect and the watch refills entry by
1827
- * entry, so a refusal under an unsafe view would reject a mention of a live peer. A name
1828
- * already in the roster is accepted in every state; an absent name under `unpopulated`
1829
- * waits once for the initial snapshot and re-reads; a still-unverifiable name refuses with
1830
- * the observer's own condition (never "no such peer") and the send does not go out. */
1828
+ * #1229: only a read that succeeded supports an ABSENCE verdict. A name already in the roster
1829
+ * is accepted whatever the read did; an absent name under a failed read refuses with the read's
1830
+ * own error (never "no such peer") and the send does not go out. */
1831
1831
  async assertKnownMentions(mentions) {
1832
- const names = () => new Set(this.ep.getRoster().map((p) => p.card.name.toLowerCase()));
1833
- const view = this.ep.presenceView();
1834
- if (view.state === "unpopulated") {
1835
- const unknown = mentions.filter((m) => !names().has(m));
1836
- if (unknown.length)
1837
- await this.ep.waitForPresenceSnapshot();
1838
- }
1839
- const after = this.ep.presenceView();
1840
- const unknown = mentions.filter((m) => !names().has(m));
1832
+ const { roster, failure } = await this.readRoster();
1833
+ const names = new Set(roster.map((p) => p.card.name.toLowerCase()));
1834
+ const unknown = mentions.filter((m) => !names.has(m));
1841
1835
  if (!unknown.length)
1842
1836
  return;
1843
- if (after.state === "current")
1837
+ if (!failure)
1844
1838
  throw new Error(`unknown mention${unknown.length > 1 ? "s" : ""}: ${unknown.map((u) => `@${u}`).join(", ")} — no such peer observed in space "${this.config.space}"`);
1845
- throw this.cannotVerify(`mention${unknown.length > 1 ? "s" : ""} ${unknown.map((u) => `@${u}`).join(", ")}`, after, "The send was not published.");
1839
+ throw this.cannotVerify(`mention${unknown.length > 1 ? "s" : ""} ${unknown.map((u) => `@${u}`).join(", ")}`, failure, "The send was not published.");
1846
1840
  }
1847
1841
  /** The mention guard and `dm` refuse an unverifiable name through this one sentence, so the two
1848
- * refusals cannot explain one view state differently. */
1849
- cannotVerify(subject, view, outcome) {
1850
- return new Error(`cannot verify ${subject} in space "${this.config.space}": ${presenceViewCondition(view)}, so absence is not a verdict — the peer may be present but unobserved. ${outcome}`);
1842
+ * refusals cannot explain one failed read differently. */
1843
+ cannotVerify(subject, failure, outcome) {
1844
+ return new Error(`cannot verify ${subject} in space "${this.config.space}": ${presenceReadCondition(failure)}, so absence is not a verdict — the peer may be present but unread. ${outcome}`, { cause: failure });
1851
1845
  }
1852
1846
  async anycast(role, text) {
1853
1847
  // Refuse the address before recording a question it could never carry, as `dm` resolves its peer first.
1854
1848
  assertValidRole(role);
1855
1849
  await this.requireConnected();
1856
1850
  // Like a DM's recipient status, the only holder count we can truthfully attribute is the roster
1857
- // snapshot taken right before the publish. Our own task consumer competes for our own request,
1851
+ // read right before the publish. Our own task consumer competes for our own request,
1858
1852
  // so we count when we hold the role.
1859
- const holdersAtSend = this.ep.presenceView().state === "current"
1860
- ? this.ep.getRoster().filter((p) => p.card.role === role && p.status !== "offline").length
1861
- : undefined;
1853
+ const { roster, failure } = await this.readRoster();
1854
+ const holdersAtSend = failure ? undefined : roster.filter((p) => p.card.role === role && p.status !== "offline").length;
1862
1855
  const { stamp, own } = this.stamp();
1863
1856
  this.recordQuestion(own, { role });
1864
1857
  const { msg, ack } = await this.ep.anycastAttributed(role, text, stamp);
1865
1858
  return { msg, ack, holdersAtSend };
1866
1859
  }
1867
- /** Resolve a peer by instance id (exact) or display name. Deterministic and fail-loud: returns
1860
+ /** Resolve a peer by instance id (exact) or display name against the roster of the last
1861
+ * {@link readRoster}. Deterministic and fail-loud: returns
1868
1862
  * one peer, `undefined` if none match, or throws `AmbiguousPeerError` on a same-name collision —
1869
1863
  * it never silently picks. See `resolvePeer` in @cotal-ai/core. */
1870
1864
  resolvePeer(target) {
1871
1865
  return resolvePeerInRoster(this.ep.getRoster(), target, { selfId: this.id });
1872
1866
  }
1873
- /** #384: a peer that sent us a DM or anycast and has no roster row, by its exact id or, while the
1874
- * presence view is current, by a display name only one such sender carried. A one-shot
1867
+ /** #384: a peer that sent us a DM or anycast and has no roster row, by its exact id or, when the
1868
+ * roster read succeeded, by a display name only one such sender carried. A one-shot
1875
1869
  * `cotal send` never registers presence, so without this a reply to it could not be addressed. */
1876
1870
  heldSender(target, byName, peer) {
1877
1871
  const name = this.senders.get(target);
@@ -1892,7 +1886,7 @@ export class MeshAgent extends EventEmitter {
1892
1886
  const match = matches[0];
1893
1887
  return match && match[0] !== peer?.card.id ? { id: match[0], name: match[1] } : undefined;
1894
1888
  }
1895
- /** Why a DM target resolved to no one, under a current presence view. A target that names this
1889
+ /** Why a DM target resolved to no one, under a roster read that succeeded. A target that names this
1896
1890
  * session says so, since the roster leaves it out of DM resolution. Present names that start with
1897
1891
  * the target are listed for the caller to choose from; none of them is ever picked. */
1898
1892
  noPeer(target) {
@@ -1915,28 +1909,20 @@ export class MeshAgent extends EventEmitter {
1915
1909
  await this.requireConnected();
1916
1910
  // #384: a sender's exact id is as unambiguous as a roster id, so it is never read as a roster
1917
1911
  // display name; a peer that took that id as its name would otherwise receive the reply.
1918
- const resolve = () => this.senders.has(target) ? this.ep.getRoster().find((p) => p.card.id === target) : this.resolvePeer(target);
1919
- // #1229: a miss is only a real "no peer" while the view is current. Under `unpopulated`
1920
- // the roster may be a reconnect refill in progress, so wait once for the snapshot and
1921
- // re-resolve; a still-unverifiable target refuses naming the observer's condition (never
1922
- // "no peer"), and the DM does not go out.
1923
- const view = this.ep.presenceView();
1924
- let peer = resolve();
1925
- if (!peer && view.state === "unpopulated") {
1926
- await this.ep.waitForPresenceSnapshot();
1927
- peer = resolve();
1928
- }
1912
+ // #1229: a miss is only a real "no peer" when the roster read succeeded; under a failed read the
1913
+ // target refuses naming the read's error (never "no peer"), and the DM does not go out.
1914
+ const { roster, failure } = await this.readRoster();
1915
+ const peer = this.senders.has(target) ? roster.find((p) => p.card.id === target) : this.resolvePeer(target);
1929
1916
  // #384: a target with no roster row may still be a peer that messaged us (its id is
1930
1917
  // authenticated), which a one-shot `cotal send` always is. The DM goes to that identity and the
1931
1918
  // space's DM stream keeps it, instead of refusing a reply nothing could ever deliver.
1932
1919
  const held = peer?.card.id === target
1933
1920
  ? undefined
1934
- : this.heldSender(target, this.ep.presenceView().state === "current", peer);
1921
+ : this.heldSender(target, !failure, peer);
1935
1922
  if (!peer && !held) {
1936
- const after = this.ep.presenceView();
1937
- if (after.state === "current")
1923
+ if (!failure)
1938
1924
  throw new Error(this.noPeer(target));
1939
- throw this.cannotVerify(`peer "${target}"`, after, "The DM was not sent.");
1925
+ throw this.cannotVerify(`peer "${target}"`, failure, "The DM was not sent.");
1940
1926
  }
1941
1927
  // The only status we can truthfully attribute is the roster snapshot taken right before the
1942
1928
  // publish: recipient state can change the instant after, and the ack never tells us either way.
@@ -2593,14 +2579,18 @@ export class MeshAgent extends EventEmitter {
2593
2579
  return this.managerInvoke("show-persona", { name }, pin);
2594
2580
  }
2595
2581
  // ---- presence ------------------------------------------------------------
2596
- /** The full roster, including ourselves. */
2597
- roster() {
2598
- return this.ep.getRoster();
2599
- }
2600
- /** Trust state of this observer's presence watch (`CotalEndpoint.presenceView()`): the roster
2601
- * above can only support an absence verdict while this is `current` (#1229). */
2602
- presenceView() {
2603
- return this.ep.presenceView();
2582
+ /** The full roster, including ourselves, read from the broker now: a seat holds no presence watch
2583
+ * (SPEC §6). Every roster surface reads through here (cotal_roster, the orientation card, the
2584
+ * @mention guard, DM resolution and the anycast holder count), and calls made while a read is
2585
+ * in flight share it. A failed read returns the roster of the last read that succeeded with
2586
+ * the failure beside it: a name it holds is still a peer, but an absence is no verdict (#1229). */
2587
+ async readRoster() {
2588
+ try {
2589
+ return { roster: await this.ep.readPresence() };
2590
+ }
2591
+ catch (e) {
2592
+ return { roster: this.ep.getRoster(), failure: e };
2593
+ }
2604
2594
  }
2605
2595
  /** Our last self-reported presence status. */
2606
2596
  get status() {
@@ -2966,13 +2956,11 @@ export class MeshAgent extends EventEmitter {
2966
2956
  process.stderr.write(`[cotal-connector] ${msg}\n`);
2967
2957
  }
2968
2958
  }
2969
- /** Why a presence view that is not `current` cannot support an absence verdict (#1229). The roster,
2970
- * the orientation card and the mention and DM refusals all print this clause, so none of them can
2971
- * word one view state differently. */
2972
- export function presenceViewCondition(view) {
2973
- return view.state === "stale"
2974
- ? `the presence watch has been silent since ${new Date(view.staleSince).toISOString()}`
2975
- : "the presence watch has not completed its initial snapshot";
2959
+ /** Why a roster whose read failed cannot support an absence verdict (#1229). The roster, the
2960
+ * orientation card and the mention and DM refusals all print this clause, so none of them can word
2961
+ * one failure differently. */
2962
+ export function presenceReadCondition(failure) {
2963
+ return `the presence read failed (${failure.message})`;
2976
2964
  }
2977
2965
  /** Names already known that differ from `channel` by one insertion, deletion, or substitution. */
2978
2966
  export function closeChannelNames(channel, known) {