@cotal-ai/connector-core 0.164.2 → 0.164.4

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.
Binary file
@@ -1,6 +1,6 @@
1
1
  import type { DocsBundle, DocsMetadata } from "./docs.js";
2
2
  /** The installed Cotal version, for stamping the orientation card and other surfaces. */
3
- export declare const DOCS_VERSION = "0.164.2";
3
+ export declare const DOCS_VERSION = "0.164.4";
4
4
  export declare function loadDocsMetadata(): DocsMetadata;
5
5
  /** Validate the coupled corpus before the index uses its UTF-16 source bounds. No body is decoded. */
6
6
  export declare function loadDocsSourceLengths(): number[];
@@ -3,10 +3,10 @@ import { readFileSync } from "node:fs";
3
3
  import { join } from "node:path";
4
4
  import { gunzipSync } from "node:zlib";
5
5
  /** The installed Cotal version, for stamping the orientation card and other surfaces. */
6
- export const DOCS_VERSION = "0.164.2";
6
+ export const DOCS_VERSION = "0.164.4";
7
7
  export function loadDocsMetadata() {
8
8
  return {
9
- "version": "0.164.2",
9
+ "version": "0.164.4",
10
10
  "pages": [
11
11
  {
12
12
  "slug": "what-is-cotal",
@@ -796,12 +796,12 @@ function corpusData() {
796
796
  if (corpusPacked)
797
797
  return corpusPacked;
798
798
  const packed = readFileSync(join(import.meta.dirname, "docs-bundle.bin"));
799
- if (packed.length !== 1248720 || createHash("sha256").update(packed).digest("hex") !== "1530e3429b902d079b0b38223789220228a18dd5be7b198a9e843a40444a728e")
799
+ if (packed.length !== 1249512 || createHash("sha256").update(packed).digest("hex") !== "94c9b042a03542444ea19bf81563170850f37a72ee11316abd9fa8999ce4971c")
800
800
  throw new Error("docs data file docs-bundle.bin beside this module is not the one built with it");
801
801
  return (corpusPacked = packed);
802
802
  }
803
- const sourceBounds = [[0, 2205], [2205, 4000], [4000, 9323], [9323, 31457], [31457, 35854], [35854, 40235], [40235, 43963], [43963, 50766], [50766, 54870], [54870, 64667], [64667, 68819], [68819, 73337], [73337, 75621], [75621, 79632], [79632, 112487], [112487, 128341], [128341, 144139], [144139, 162341], [162341, 179311], [179311, 194524], [194524, 210555], [210555, 234678], [234678, 240408], [240408, 251392], [251392, 272103], [272103, 276857], [276857, 315622], [315622, 325417], [325417, 356619], [356619, 374291], [374291, 398732], [398732, 429730], [429730, 444231], [444231, 446178], [446178, 455163], [455163, 471990], [471990, 480074], [480074, 483955], [483955, 487336], [487336, 490639], [490639, 492770], [492770, 495543], [495543, 501064], [501064, 502961], [502961, 506665], [506665, 518809], [518809, 527829], [527829, 531354], [531354, 538707], [538707, 543751], [543751, 546755], [546755, 557374], [557374, 560351], [560351, 569071], [569071, 572061], [572061, 577015], [577015, 589502], [589502, 602306], [602306, 609742], [609742, 617526], [617526, 620875], [620875, 623824], [623824, 631381], [631381, 635097], [635097, 637307], [637307, 640769], [640769, 644186], [644186, 645300], [645300, 647049], [647049, 650712], [650712, 655442], [655442, 662078], [662078, 672588], [672588, 685904], [685904, 687741], [687741, 700984], [700984, 706371], [706371, 710327], [710327, 712836], [712836, 717878], [717878, 732073], [732073, 738878], [738878, 746263], [746263, 747080], [747080, 751626], [751626, 757546], [757546, 760924], [760924, 765132], [765132, 770222], [770222, 775803], [775803, 779225], [779225, 782816], [782816, 787981], [787981, 791624], [791624, 805082], [805082, 807900], [807900, 810583], [810583, 813250], [813250, 815741], [815741, 819761], [819761, 824825], [824825, 827834], [827834, 898929], [898929, 902000], [902000, 903193], [903193, 909805], [909805, 918550], [918550, 929328], [929328, 938139], [938139, 943322], [943322, 1204173], [1204173, 1243508], [1243508, 1248720]];
804
- const sourceLengths = [4844, 4048, 13310, 89006, 12190, 10741, 38583, 17849, 9941, 85121, 37758, 11019, 5079, 9872, 89585, 42695, 44478, 51546, 46991, 43948, 43919, 68381, 14399, 29244, 59848, 10713, 114985, 27044, 94172, 50005, 73402, 95605, 39939, 8216, 22437, 45309, 21923, 9498, 8035, 7790, 4874, 6360, 14056, 4537, 8812, 32337, 22530, 8745, 47738, 12743, 7373, 27977, 7140, 22854, 6860, 12415, 32472, 33984, 19151, 19100, 8355, 7031, 19589, 8312, 5100, 8160, 9930, 2248, 5412, 9845, 11336, 16082, 26828, 34218, 4227, 36039, 12378, 9651, 8201, 13306, 98109, 16917, 18280, 1638, 10433, 15381, 7818, 10170, 12738, 14071, 7511, 9014, 12695, 8527, 35983, 6519, 6405, 6095, 6007, 9711, 12679, 7205, 209339, 6927, 2473, 15848, 22395, 27911, 21160, 12616, 756393, 111238, 21676];
803
+ const sourceBounds = [[0, 2205], [2205, 4000], [4000, 9323], [9323, 31522], [31522, 35919], [35919, 40300], [40300, 44028], [44028, 50831], [50831, 54935], [54935, 64732], [64732, 68884], [68884, 73402], [73402, 75686], [75686, 79697], [79697, 112577], [112577, 128431], [128431, 144229], [144229, 162431], [162431, 179729], [179729, 194942], [194942, 210973], [210973, 235148], [235148, 240878], [240878, 251862], [251862, 272794], [272794, 277548], [277548, 316349], [316349, 326144], [326144, 357346], [357346, 375018], [375018, 399502], [399502, 430500], [430500, 445001], [445001, 446948], [446948, 455933], [455933, 472760], [472760, 480844], [480844, 484725], [484725, 488106], [488106, 491409], [491409, 493540], [493540, 496313], [496313, 501834], [501834, 503731], [503731, 507435], [507435, 519579], [519579, 528599], [528599, 532124], [532124, 539477], [539477, 544521], [544521, 547525], [547525, 558144], [558144, 561121], [561121, 569841], [569841, 572831], [572831, 577785], [577785, 590272], [590272, 603076], [603076, 610512], [610512, 618296], [618296, 621645], [621645, 624594], [624594, 632151], [632151, 635867], [635867, 638077], [638077, 641539], [641539, 644956], [644956, 646070], [646070, 647819], [647819, 651482], [651482, 656212], [656212, 662848], [662848, 673358], [673358, 686674], [686674, 688511], [688511, 701754], [701754, 707141], [707141, 711097], [711097, 713606], [713606, 718648], [718648, 732843], [732843, 739648], [739648, 747033], [747033, 747850], [747850, 752396], [752396, 758316], [758316, 761694], [761694, 765902], [765902, 770992], [770992, 776573], [776573, 779995], [779995, 783586], [783586, 788751], [788751, 792394], [792394, 805852], [805852, 808670], [808670, 811353], [811353, 814020], [814020, 816511], [816511, 820531], [820531, 825595], [825595, 828604], [828604, 899699], [899699, 902770], [902770, 903963], [903963, 910597], [910597, 919342], [919342, 930120], [930120, 938931], [938931, 944114], [944114, 1204965], [1204965, 1244300], [1244300, 1249512]];
804
+ const sourceLengths = [4844, 4048, 13310, 89282, 12190, 10741, 38583, 17849, 9941, 85121, 37758, 11019, 5079, 9872, 89707, 42695, 44478, 51546, 47874, 43948, 43919, 68475, 14399, 29244, 60576, 10713, 115100, 27044, 94172, 50005, 73544, 95605, 39939, 8216, 22437, 45309, 21923, 9498, 8035, 7790, 4874, 6360, 14056, 4537, 8812, 32337, 22530, 8745, 47738, 12743, 7373, 27977, 7140, 22854, 6860, 12415, 32472, 33984, 19151, 19100, 8355, 7031, 19589, 8312, 5100, 8160, 9930, 2248, 5412, 9845, 11336, 16082, 26828, 34218, 4227, 36039, 12378, 9651, 8201, 13306, 98109, 16917, 18280, 1638, 10433, 15381, 7818, 10170, 12738, 14071, 7511, 9014, 12695, 8527, 35983, 6519, 6405, 6095, 6007, 9711, 12679, 7205, 209339, 6927, 2473, 15900, 22395, 27911, 21160, 12616, 756393, 111238, 21676];
805
805
  const decodedBodies = [];
806
806
  /** Validate the coupled corpus before the index uses its UTF-16 source bounds. No body is decoded. */
807
807
  export function loadDocsSourceLengths() {
@@ -834,7 +834,7 @@ export function loadDocsBundle() {
834
834
  /** The compact search index of that bundle: the sibling file docs-index.bin, read, checked and unzipped on the first search. */
835
835
  export function loadDocsIndex() {
836
836
  const packed = readFileSync(join(import.meta.dirname, "docs-index.bin"));
837
- if (packed.length !== 638840 || createHash("sha256").update(packed).digest("hex") !== "5a5610d372f54e32d390f4f720d22e64c440492ba89ff25e5ea2bd3e960da6d4")
837
+ if (packed.length !== 639087 || createHash("sha256").update(packed).digest("hex") !== "f1597fe06be43f88a4ac74209ebc952ef8e467437d3771b30b1e3177c20a669c")
838
838
  throw new Error("docs data file docs-index.bin beside this module is not the one built with it");
839
839
  return gunzipSync(packed);
840
840
  }
Binary file
@@ -129,6 +129,10 @@ export declare function renderInbox(opts: {
129
129
  }): InboxResponse;
130
130
  /** How many times one read chooses its reply again after a take of a request it chose is refused. */
131
131
  export declare const READ_TAKE_ROUNDS = 8;
132
+ /** Say that recall items were withheld because this session will not take responsibility for
133
+ * remembering them, and name who sent them, so a peer spending that bound is visible rather than
134
+ * silent. Not a drop: nothing was cleared and the stream still holds them. */
135
+ export declare function aheadNote(items: readonly InboxItem[]): string;
132
136
  /** Routing context for a `<channel …>` tag. Keys must be [A-Za-z0-9_] (others are dropped). */
133
137
  export declare function channelMeta(i: InboxItem): Record<string, string>;
134
138
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tool-specs.d.ts","sourceRoot":"","sources":["../src/tool-specs.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAmB,MAAM,YAAY,CAAC;AAI9F,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAKzD;;gGAEgG;AAChG,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AA6JD;;;;;;;sGAOsG;AACtG,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAExD,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB;;;;8FAI0F;IAC1F,MAAM,EAAE,cAAc,CAAC;IACvB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,QA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,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAYvJ;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAI1F;AAED;;;;;uEAKuE;AACvE,wBAAgB,WAAW,CAAC,CAAC,EAAE;IAC7B,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACpF,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;CAC9D,GAAG,MAAM,CAWT;AAED;0EAC0E;AAC1E,eAAO,MAAM,iBAAiB,sUACuS,CAAC;AA8BtU;;;;;;qEAMqE;AACrE,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,MAAM,SAAc,EACpB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,EACvB,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EAC7B,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,GACxC,aAAa,EAAE,CAg6CjB"}
@@ -283,7 +283,15 @@ export function renderInbox(opts) {
283
283
  return -1;
284
284
  return i.kind !== "channel" ? 0 : i.historical ? 2 : 1;
285
285
  };
286
- const ordered = [...opts.items].sort((a, b) => rank(a) - rank(b)); // stable: receive order within a rank
286
+ // A peek does not clear, so an older message that fills the window must not hide a newer one of
287
+ // the same kind. A reply that walks an ordered lane keeps receive order so its mark stays a prefix.
288
+ const orderedLane = opts.strictIds !== undefined && opts.items.some((item) => opts.strictIds?.has(item.recvKey));
289
+ const ordered = [...opts.items].sort((a, b) => {
290
+ const byRank = rank(a) - rank(b);
291
+ if (byRank !== 0 || !peek || orderedLane)
292
+ return byRank;
293
+ return b.ts - a.ts;
294
+ });
287
295
  // WHY THIS AGREES WITH THE ASSEMBLED REPLY, and what would break the agreement. Deliverability is
288
296
  // decided here and delivery is decided by `assemble`, and the two can only agree because both
289
297
  // measure the item through the SAME `fmtDeliveryItem`. That is what makes the agreement invariant to how an
@@ -623,10 +631,10 @@ const NAMED_AHEAD = 3;
623
631
  /** Say that recall items were withheld because this session will not take responsibility for
624
632
  * remembering them, and name who sent them, so a peer spending that bound is visible rather than
625
633
  * silent. Not a drop: nothing was cleared and the stream still holds them. */
626
- function aheadNote(items) {
634
+ export function aheadNote(items) {
627
635
  if (!items.length)
628
636
  return "";
629
- const senders = [...new Set(items.map((i) => attributionSafe(i.fromName).slice(0, 40)))];
637
+ const senders = [...new Set(items.map((i) => attributionSafe((i.fromName.trim() ? i.fromName : i.fromId.trim() ? i.fromId : "(unnamed)")).slice(0, 40)))];
630
638
  const named = senders.slice(0, NAMED_AHEAD).join(", ");
631
639
  const rest = senders.length - Math.min(NAMED_AHEAD, senders.length);
632
640
  const one = items.length === 1;
@@ -1026,7 +1034,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1026
1034
  {
1027
1035
  name: "cotal_inbox",
1028
1036
  title: "Cotal: read incoming messages",
1029
- description: "Read messages other agents have sent you since you last checked: channel broadcasts, direct messages, and role requests. It clears ONLY what it actually returns to you (nothing at all when peek is true), and one call carries at most a receivable window: direct messages and role requests first, then channel traffic, with replayed history last. A peek shows a current mention of you before older direct messages that fill that window, and still clears nothing. Anything that does not fit stays buffered and is named in the reply, so call again for the next batch. A single message larger than one whole response is delivered in parts: once no smaller mail is waiting, each call carries the next part of it, a peek shows the current part without moving on, and the message is cleared only after its last part goes out. In focus mode it also pulls back the channel chatter held since you entered focus. If exclusion tracking makes a channel's focus recall unsafe, new non-historical mentions on that unmuted channel wake to pull their buffered bodies, never automatic injection, including on quiet channels. Ambient handling is unchanged, and the incomplete-recall warning still names unsafe channels. " +
1037
+ description: "Read messages other agents have sent you since you last checked: channel broadcasts, direct messages, and role requests. It clears ONLY what it actually returns to you (nothing at all when peek is true), and one call carries at most a receivable window: direct messages and role requests first, then channel traffic, with replayed history last. A peek shows a current mention of you before older direct messages that fill that window, and still clears nothing. A peek shows a newer direct message or role request before an older one that fills that window, and still clears nothing. Anything that does not fit stays buffered and is named in the reply, so call again for the next batch. A single message larger than one whole response is delivered in parts: once no smaller mail is waiting, each call carries the next part of it, a peek shows the current part without moving on, and the message is cleared only after its last part goes out. In focus mode it also pulls back the channel chatter held since you entered focus. If exclusion tracking makes a channel's focus recall unsafe, new non-historical mentions on that unmuted channel wake to pull their buffered bodies, never automatic injection, including on quiet channels. Ambient handling is unchanged, and the incomplete-recall warning still names unsafe channels. " +
1030
1038
  "When the connection is not ready, the reply says so and still returns locally buffered messages; an empty local buffer does not prove no new mesh messages exist. Exhausted channel drop tracking is reported even with an empty inbox; non-historical mentions on unmuted channels wake to pull their buffered bodies while ambient traffic stays suppressed. " +
1031
1039
  "If your stored copies reached their limit, 1000 unless an operator set another, the reply says earlier channel posts may have been dropped and that channel history may still hold them. A peek keeps that line for the next read.",
1032
1040
  schema: {
@@ -1857,7 +1865,7 @@ export function cotalToolSpecs(config, source = "connector", env, offered, empty
1857
1865
  {
1858
1866
  name: "cotal_yield",
1859
1867
  title: "Cotal: yield a run turn",
1860
- description: "Report the outcome of a workflow turn assigned to you. Use this only when your context contains a pending run turn; it does not start a workflow or resolve a checkpoint/ask.\n\nUsually finish your session turn normally: that yields `done` automatically. If you cannot progress, call `{\"status\":\"blocked\",\"note\":\"<what prevents progress>\"}`. To hand the assigned turn to another agent, call `{\"status\":\"handoff\",\"to\":\"<agent-name>\",\"note\":\"<handoff context>\"}`.\n\nWhen you hold several assigned turns, pass `turn` with the exact goal id from the relevant run-turn context block. Without `turn`, the oldest turn already shown to your session is selected. A turn that has not been shown cannot be yielded, and neither can one the run already settled, such as a turn whose deadline elapsed: that refusal names the turn and its deadline. A successful reply confirms the turn was yielded, not that the whole workflow completed; the run's coordinator can inspect progress with `cotal_run` status.",
1868
+ description: "Report the outcome of a workflow turn assigned to you. Use this only when your context contains a pending run turn; it does not start a workflow or resolve a checkpoint/ask.\n\nUsually finish your session turn normally: that yields `done` automatically. If you cannot progress, call `{\"status\":\"blocked\",\"note\":\"<what prevents progress>\"}`. To hand the assigned turn to another agent, call `{\"status\":\"handoff\",\"to\":\"<agent-name>\",\"note\":\"<handoff context>\"}`.\n\nWhen you hold several assigned turns, pass `turn` with the exact goal id from the relevant run-turn context block. Without `turn`, the oldest turn already shown to your session is selected. A turn that has not been shown cannot be yielded, and neither can one the run already settled, such as a turn whose deadline elapsed: that refusal names the turn and its deadline. A turn already yielded, including by the automatic `done` when your session turn ended, is refused the same way, and the refusal says how it was yielded. A successful reply confirms the turn was yielded, not that the whole workflow completed; the run's coordinator can inspect progress with `cotal_run` status.",
1861
1869
  schema: {
1862
1870
  status: z
1863
1871
  .enum(["done", "blocked", "handoff"])