@te-river/opencode-team-mode 1.6.1 → 1.7.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.
Files changed (201) hide show
  1. package/README.md +117 -118
  2. package/README.zh-CN.md +98 -100
  3. package/dist/agents.d.ts.map +1 -1
  4. package/dist/agents.js +89 -79
  5. package/dist/agents.js.map +1 -1
  6. package/dist/approval-gate.d.ts +8 -9
  7. package/dist/approval-gate.d.ts.map +1 -1
  8. package/dist/approval-gate.js +13 -14
  9. package/dist/approval-gate.js.map +1 -1
  10. package/dist/capabilities.d.ts +11 -37
  11. package/dist/capabilities.d.ts.map +1 -1
  12. package/dist/capabilities.js +11 -141
  13. package/dist/capabilities.js.map +1 -1
  14. package/dist/commands.js +1 -1
  15. package/dist/envprotect/hook.d.ts +12 -31
  16. package/dist/envprotect/hook.d.ts.map +1 -1
  17. package/dist/envprotect/hook.js +13 -91
  18. package/dist/envprotect/hook.js.map +1 -1
  19. package/dist/envprotect/patterns.d.ts +6 -4
  20. package/dist/envprotect/patterns.d.ts.map +1 -1
  21. package/dist/envprotect/patterns.js +6 -4
  22. package/dist/envprotect/patterns.js.map +1 -1
  23. package/dist/envprotect.d.ts +1 -1
  24. package/dist/envprotect.d.ts.map +1 -1
  25. package/dist/envprotect.js +1 -1
  26. package/dist/envprotect.js.map +1 -1
  27. package/dist/host/note.d.ts.map +1 -1
  28. package/dist/host/note.js +8 -5
  29. package/dist/host/note.js.map +1 -1
  30. package/dist/host/v2-browser-gate.d.ts +19 -1
  31. package/dist/host/v2-browser-gate.d.ts.map +1 -1
  32. package/dist/host/v2-browser-gate.js +47 -6
  33. package/dist/host/v2-browser-gate.js.map +1 -1
  34. package/dist/host/v2-capabilities.d.ts +43 -0
  35. package/dist/host/v2-capabilities.d.ts.map +1 -1
  36. package/dist/host/v2-capabilities.js +77 -1
  37. package/dist/host/v2-capabilities.js.map +1 -1
  38. package/dist/host/v2-compaction.d.ts +129 -0
  39. package/dist/host/v2-compaction.d.ts.map +1 -0
  40. package/dist/host/v2-compaction.js +346 -0
  41. package/dist/host/v2-compaction.js.map +1 -0
  42. package/dist/host/v2-default-agent.d.ts +37 -0
  43. package/dist/host/v2-default-agent.d.ts.map +1 -0
  44. package/dist/host/v2-default-agent.js +128 -0
  45. package/dist/host/v2-default-agent.js.map +1 -0
  46. package/dist/host/v2-events.d.ts +2 -0
  47. package/dist/host/v2-events.d.ts.map +1 -1
  48. package/dist/host/v2-events.js +27 -0
  49. package/dist/host/v2-events.js.map +1 -1
  50. package/dist/host/v2-guard.d.ts +178 -0
  51. package/dist/host/v2-guard.d.ts.map +1 -1
  52. package/dist/host/v2-guard.js +324 -8
  53. package/dist/host/v2-guard.js.map +1 -1
  54. package/dist/host/v2-offload.d.ts +1 -1
  55. package/dist/host/v2-offload.js +2 -2
  56. package/dist/host/v2-permissions.d.ts +45 -44
  57. package/dist/host/v2-permissions.d.ts.map +1 -1
  58. package/dist/host/v2-permissions.js +48 -49
  59. package/dist/host/v2-permissions.js.map +1 -1
  60. package/dist/host/v2-probe-chain.d.ts +93 -0
  61. package/dist/host/v2-probe-chain.d.ts.map +1 -0
  62. package/dist/host/v2-probe-chain.js +146 -0
  63. package/dist/host/v2-probe-chain.js.map +1 -0
  64. package/dist/host/v2-prune.d.ts +157 -0
  65. package/dist/host/v2-prune.d.ts.map +1 -0
  66. package/dist/host/v2-prune.js +507 -0
  67. package/dist/host/v2-prune.js.map +1 -0
  68. package/dist/host/v2-retry.d.ts +143 -0
  69. package/dist/host/v2-retry.d.ts.map +1 -0
  70. package/dist/host/v2-retry.js +315 -0
  71. package/dist/host/v2-retry.js.map +1 -0
  72. package/dist/host/v2-scope.d.ts.map +1 -1
  73. package/dist/host/v2-scope.js +14 -7
  74. package/dist/host/v2-scope.js.map +1 -1
  75. package/dist/host/v2-session-client.d.ts +62 -7
  76. package/dist/host/v2-session-client.d.ts.map +1 -1
  77. package/dist/host/v2-session-client.js +485 -26
  78. package/dist/host/v2-session-client.js.map +1 -1
  79. package/dist/host/v2-session.d.ts +72 -1
  80. package/dist/host/v2-session.d.ts.map +1 -1
  81. package/dist/host/v2-session.js +154 -10
  82. package/dist/host/v2-session.js.map +1 -1
  83. package/dist/host/v2-tool.d.ts +2 -3
  84. package/dist/host/v2-tool.d.ts.map +1 -1
  85. package/dist/host/v2-tool.js +2 -3
  86. package/dist/host/v2-tool.js.map +1 -1
  87. package/dist/host/v2-types.d.ts +25 -0
  88. package/dist/host/v2-types.d.ts.map +1 -1
  89. package/dist/host/v2.d.ts +14 -12
  90. package/dist/host/v2.d.ts.map +1 -1
  91. package/dist/host/v2.js +648 -74
  92. package/dist/host/v2.js.map +1 -1
  93. package/dist/identity.d.ts +27 -0
  94. package/dist/identity.d.ts.map +1 -0
  95. package/dist/identity.js +34 -0
  96. package/dist/identity.js.map +1 -0
  97. package/dist/index.d.ts +9 -24
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +17 -27
  100. package/dist/index.js.map +1 -1
  101. package/dist/prompts/lead.d.ts +1 -1
  102. package/dist/prompts/lead.d.ts.map +1 -1
  103. package/dist/prompts/lead.js +44 -27
  104. package/dist/prompts/lead.js.map +1 -1
  105. package/dist/prompts/shared.d.ts +2 -2
  106. package/dist/prompts/shared.d.ts.map +1 -1
  107. package/dist/prompts/shared.js +74 -57
  108. package/dist/prompts/shared.js.map +1 -1
  109. package/dist/prompts/specialists.d.ts +2 -2
  110. package/dist/prompts/specialists.d.ts.map +1 -1
  111. package/dist/prompts/specialists.js +53 -83
  112. package/dist/prompts/specialists.js.map +1 -1
  113. package/dist/tm/args-schema.d.ts +7 -32
  114. package/dist/tm/args-schema.d.ts.map +1 -1
  115. package/dist/tm/args-schema.js +12 -153
  116. package/dist/tm/args-schema.js.map +1 -1
  117. package/dist/tm/board.d.ts +10 -9
  118. package/dist/tm/board.d.ts.map +1 -1
  119. package/dist/tm/board.js +11 -10
  120. package/dist/tm/board.js.map +1 -1
  121. package/dist/tm/config-files.d.ts +81 -0
  122. package/dist/tm/config-files.d.ts.map +1 -0
  123. package/dist/tm/config-files.js +209 -0
  124. package/dist/tm/config-files.js.map +1 -0
  125. package/dist/tm/config-layers.d.ts +117 -0
  126. package/dist/tm/config-layers.d.ts.map +1 -0
  127. package/dist/tm/config-layers.js +320 -0
  128. package/dist/tm/config-layers.js.map +1 -0
  129. package/dist/tm/config.d.ts +10 -101
  130. package/dist/tm/config.d.ts.map +1 -1
  131. package/dist/tm/config.js +17 -71
  132. package/dist/tm/config.js.map +1 -1
  133. package/dist/tm/dispatch.d.ts +154 -22
  134. package/dist/tm/dispatch.d.ts.map +1 -1
  135. package/dist/tm/dispatch.js +559 -80
  136. package/dist/tm/dispatch.js.map +1 -1
  137. package/dist/tm/egress.d.ts +19 -7
  138. package/dist/tm/egress.d.ts.map +1 -1
  139. package/dist/tm/egress.js +21 -9
  140. package/dist/tm/egress.js.map +1 -1
  141. package/dist/tm/index.d.ts +23 -20
  142. package/dist/tm/index.d.ts.map +1 -1
  143. package/dist/tm/index.js +117 -116
  144. package/dist/tm/index.js.map +1 -1
  145. package/dist/tm/ledger.d.ts +9 -2
  146. package/dist/tm/ledger.d.ts.map +1 -1
  147. package/dist/tm/ledger.js +4 -1
  148. package/dist/tm/ledger.js.map +1 -1
  149. package/dist/tm/perm-ask.d.ts +3 -3
  150. package/dist/tm/perm-ask.d.ts.map +1 -1
  151. package/dist/tm/perm-ask.js +3 -3
  152. package/dist/tm/perm-ask.js.map +1 -1
  153. package/dist/tm/pipelines.d.ts +12 -11
  154. package/dist/tm/pipelines.d.ts.map +1 -1
  155. package/dist/tm/pipelines.js +40 -207
  156. package/dist/tm/pipelines.js.map +1 -1
  157. package/dist/tm/preview.d.ts +1 -1
  158. package/dist/tm/preview.js +3 -3
  159. package/dist/tm/preview.js.map +1 -1
  160. package/dist/tm/refs.d.ts +31 -4
  161. package/dist/tm/refs.d.ts.map +1 -1
  162. package/dist/tm/refs.js +48 -4
  163. package/dist/tm/refs.js.map +1 -1
  164. package/dist/tm/result.d.ts +1 -1
  165. package/dist/tm/result.d.ts.map +1 -1
  166. package/dist/tm/result.js +4 -3
  167. package/dist/tm/result.js.map +1 -1
  168. package/dist/tm/search.d.ts +2 -2
  169. package/dist/tm/search.js +7 -7
  170. package/dist/tm/search.js.map +1 -1
  171. package/dist/tm/serp-loop.d.ts +19 -7
  172. package/dist/tm/serp-loop.d.ts.map +1 -1
  173. package/dist/tm/serp-loop.js +24 -9
  174. package/dist/tm/serp-loop.js.map +1 -1
  175. package/dist/tm/stats.d.ts +31 -27
  176. package/dist/tm/stats.d.ts.map +1 -1
  177. package/dist/tm/stats.js +170 -58
  178. package/dist/tm/stats.js.map +1 -1
  179. package/dist/tm/store.d.ts +18 -5
  180. package/dist/tm/store.d.ts.map +1 -1
  181. package/dist/tm/store.js +39 -9
  182. package/dist/tm/store.js.map +1 -1
  183. package/dist/tm/tools.d.ts +7 -5
  184. package/dist/tm/tools.d.ts.map +1 -1
  185. package/dist/tm/tools.js +10 -41
  186. package/dist/tm/tools.js.map +1 -1
  187. package/dist/tm/webfetch.d.ts +1 -1
  188. package/dist/tm/webfetch.d.ts.map +1 -1
  189. package/dist/tm/webfetch.js +38 -23
  190. package/dist/tm/webfetch.js.map +1 -1
  191. package/dist/types.d.ts +40 -123
  192. package/dist/types.d.ts.map +1 -1
  193. package/dist/types.js +7 -21
  194. package/dist/types.js.map +1 -1
  195. package/docs/installation-v2.md +124 -39
  196. package/docs/installation.md +9 -0
  197. package/docs/research/browser-pane.md +5 -0
  198. package/docs/v2-port-notes.md +500 -315
  199. package/package.json +1 -1
  200. package/scripts/gen-v2-config.mjs +246 -94
  201. package/scripts/lib/fake-ctx.mjs +244 -146
@@ -39,6 +39,59 @@
39
39
  * recorded as the option with its cost attached. See
40
40
  * `docs/research/host-http-api.md`.
41
41
  */
42
+ /** Which spelling of the inbox operation reached the host. The plugin ctx puts a
43
+ * namespaced operation under a nested domain (`ctx.session.inbox.list`), the same way
44
+ * `session.get` is `ctx.session.get`; the flat spelling (`ctx.session["inbox.list"]`) is
45
+ * tried ONLY as a fallback. Which one answered is returned and recorded, because "this
46
+ * host has no inbox seam" and "we looked under the wrong key" are two different facts and
47
+ * must not print the same sentence (goal #6). */
48
+ function resolveInboxMethod(domain, op) {
49
+ const nested = domain?.inbox?.[op];
50
+ if (typeof nested === "function") {
51
+ return {
52
+ fn: nested,
53
+ owner: domain.inbox,
54
+ spelling: `session.inbox.${op}`,
55
+ };
56
+ }
57
+ const flat = domain?.[`inbox.${op}`];
58
+ if (typeof flat === "function") {
59
+ return {
60
+ fn: flat,
61
+ owner: domain,
62
+ spelling: `session[inbox.${op}]`,
63
+ };
64
+ }
65
+ return null;
66
+ }
67
+ /** The host's inbox ids match `^msg_` — that is the published pattern on `inboxID`, and
68
+ * `session.inbox.list` answers with `Session.Inbox.Info` (anyOf User | Synthetic |
69
+ * Compaction), all of which are message-shaped. So an answer that NAMES one is the only
70
+ * acceptance evidence this seam can have, and the search is bounded to the envelopes this
71
+ * file has actually measured (`{data}` / `{result}`) plus the id fields the contract
72
+ * spells. It is never a scan of arbitrary text: an id is a name, and R6 binds a
73
+ * diagnostic as much as a guard. */
74
+ function inboxIdOf(value) {
75
+ const carriers = [
76
+ value,
77
+ value?.data,
78
+ value?.result,
79
+ value?.inbox,
80
+ value?.item,
81
+ value?.message,
82
+ ];
83
+ for (const cand of carriers) {
84
+ if (!cand || typeof cand !== "object")
85
+ continue;
86
+ const rec = cand;
87
+ for (const key of ["inboxID", "inbox_id", "messageID", "id"]) {
88
+ const v = rec[key];
89
+ if (typeof v === "string" && /^msg_[\w-]+$/.test(v.trim()))
90
+ return v.trim();
91
+ }
92
+ }
93
+ return "";
94
+ }
42
95
  /** Measured first, then the v1 spellings kept as fallbacks for an older 2.x build. Each
43
96
  * builder returns the ARGUMENT OBJECT — `te`-wrapped methods take one object, not an
44
97
  * array, and that alone is why every previous shape failed. */
@@ -64,13 +117,90 @@ function unwrap(value) {
64
117
  }
65
118
  return rec;
66
119
  }
67
- /** Turn the host's flat context items into the `{info,parts}` shape the collect path
68
- * already understands. Only the ROLE is inferred here, and only from the item's own `type`
69
- * field (measured values: "user" for the brief, something else for the answer); a
70
- * `time.completed` is NEVER invented, because that field is the settle verdict and a
71
- * fabricated one would let tm_join claim a child finished at a time nobody observed.
72
- * Anything already shaped like v1 passes through untouched, so a host that changes back
73
- * does not need this code to change. */
120
+ /** The message-kind values the host writes on its discriminator field — the members of the
121
+ * published union `Session.Message.Info`. Anything else on `type` is a PART kind and must
122
+ * never be read as a message kind. */
123
+ const MESSAGE_KINDS = ["user", "assistant", "system", "synthetic", "skill", "shell", "compaction", "idle"];
124
+ /** The PART kinds the host writes inside a message's `content` bag. A TOP-LEVEL item
125
+ * carrying one of these on `type` with no `role` is a part, not a message (the shape
126
+ * `{type:"tool", content:[{type:"text",…}]}` exists): renaming its bag to `parts` would
127
+ * hand a tool output to the collect path as an unroled assistant candidate. */
128
+ const PART_KINDS = ["text", "reasoning", "tool"];
129
+ /** The discriminator field's own value, lower-cased — "" only when the field is ABSENT
130
+ * (or not a string). "Present but unknown" and "absent" are two different facts, and
131
+ * downstream can only tell them apart if the seam keeps them apart. */
132
+ function rawKind(value) {
133
+ return typeof value === "string" ? value.trim().toLowerCase() : "";
134
+ }
135
+ function messageKind(value) {
136
+ const s = rawKind(value);
137
+ return MESSAGE_KINDS.includes(s) ? s : "";
138
+ }
139
+ /** Which kind of message an item is. The OpenAPI contract puts the discriminator on `type`;
140
+ * the plugin ctx measured on 2.0.20 puts it on `role` — so BOTH are read, a recognised
141
+ * kind first (`role` before `type`), exactly as before.
142
+ *
143
+ * A value that is PRESENT but not a known message kind is carried through verbatim
144
+ * (lower-cased) instead of dropped to "". This INVERTS the previous rule — "an
145
+ * unrecognised value yields "" and the caller leaves the role OFF instead of guessing
146
+ * one" — because that rule was false where it mattered: `lastAssistantMessage` skips on
147
+ * `if (role && role !== "assistant")`, so an EMPTY role IS an assistant candidate,
148
+ * exactly equivalent to guessing "assistant". A host that spelled the discriminator a
149
+ * value outside MESSAGE_KINDS would have had its item delivered as the child's report
150
+ * while the comment claimed the opposite (and while AGENTS.md's "keeps an EMPTY role …
151
+ * rather than guessing" described downstream semantics under which leaving it empty was
152
+ * the guess). Carrying the raw value makes the skip real: unknown kind ⇒ not delivered.
153
+ * Only when BOTH fields are absent — a bare Part[] item — does the role stay unset,
154
+ * which is the shape the collect path reads by the item's own `type:"text"`. */
155
+ function roleOfMessage(rec) {
156
+ const roleRaw = rawKind(rec.role);
157
+ const typeRaw = rawKind(rec.type);
158
+ return messageKind(roleRaw) || messageKind(typeRaw) || roleRaw || typeRaw;
159
+ }
160
+ /** Copy the host's own timestamps, and ONLY those. `time.completed` IS the settle verdict
161
+ * (AGENTS.md), so it is never invented: 2.0.20's plugin ctx carries no `time` field at all,
162
+ * and tm_join then settles from `event` / `injection` / 推定 — which is what it prints. */
163
+ function timeOfMessage(rec) {
164
+ const t = rec.time;
165
+ if (!t || typeof t !== "object")
166
+ return undefined;
167
+ const src = t;
168
+ const out = {};
169
+ const created = Number(src.created);
170
+ if (Number.isFinite(created))
171
+ out.created = created;
172
+ const completed = Number(src.completed);
173
+ if (Number.isFinite(completed))
174
+ out.completed = completed;
175
+ return Object.keys(out).length ? out : undefined;
176
+ }
177
+ /** The `{info,…}` envelope for a message item, carrying ONLY what the host actually wrote. */
178
+ function infoOfMessage(rec, role) {
179
+ const time = timeOfMessage(rec);
180
+ return {
181
+ ...(role ? { role } : {}),
182
+ ...(time ? { time } : {}),
183
+ // an errored assistant turn carries its reason on the item itself in these shapes;
184
+ // without the copy, "no reply" reads as "the agent had nothing to say"
185
+ ...(rec.error == null ? {} : { error: rec.error }),
186
+ };
187
+ }
188
+ /** Turn the host's context items into the `{info,parts}` shape the collect path already
189
+ * understands — HERE, at the seam that knows the shape, so nothing downstream has to guess.
190
+ * Three shapes are in the wild and all three are measurements, not version numbers:
191
+ * · 2.0.18 `[L]`: a FLAT item per message, `{id, time:{created}, text, type}`.
192
+ * · 2.0.20 `[L][D]`: a MESSAGE whose body is `content: (Text|Reasoning|Tool)[]` and whose
193
+ * kind is on `role` — the name-level probe recorded `{keys:["content","id","metadata",
194
+ * "role"]}`. The previous version of this function passed that item through untouched
195
+ * ("already message-shaped"), `lastAssistantMessage` found no `parts` and no `text` on
196
+ * it, and the seam answered while the body was dropped AGAIN — which is why 正文来源=
197
+ * never printed on 2.0.20 (A1).
198
+ * · v1's `[{info,parts[]}]`: passed through untouched, so a host that changes back needs
199
+ * no change here.
200
+ * Only the bag is renamed and the envelope added: the elements are already v1 part shapes
201
+ * (`{type:"text", text}`), and reasoning/tool parts stay exactly as the host wrote them.
202
+ * An empty `content` normalises to empty parts — this function MOVES text, it never
203
+ * manufactures any. */
74
204
  export function normaliseContextMessages(list) {
75
205
  if (!Array.isArray(list))
76
206
  return list;
@@ -78,23 +208,79 @@ export function normaliseContextMessages(list) {
78
208
  if (!item || typeof item !== "object")
79
209
  return item;
80
210
  const rec = item;
81
- if (rec.info || Array.isArray(rec.parts) || Array.isArray(rec.content))
211
+ if (rec.info || Array.isArray(rec.parts))
82
212
  return item;
213
+ if (Array.isArray(rec.content)) {
214
+ // A PART item (no `role`, `type` a part kind) is not a message: renaming its bag to
215
+ // `parts` would make it an unroled assistant candidate downstream, i.e. a TOOL OUTPUT
216
+ // delivered as the child's report — while passing it through untouched was the SAFE
217
+ // case, because the collect path reads a part's own `type` and skips `tool`.
218
+ if (!rawKind(rec.role) && PART_KINDS.includes(rawKind(rec.type)))
219
+ return item;
220
+ return { info: infoOfMessage(rec, roleOfMessage(rec)), parts: rec.content };
221
+ }
83
222
  const text = rec.text;
84
223
  if (typeof text !== "string" || !text.trim())
85
224
  return item;
86
- const type = String(rec.type ?? "");
87
- const role = /^user$/i.test(type) ? "user" : "assistant";
88
- const created = rec.time?.created;
225
+ // 2.0.18's flat item: a recognised role word is read from either field; anything else
226
+ // (the measured answer items carry `type:"text"`, a PART kind) falls to "assistant",
227
+ // which is the behaviour that shipped and that the 2.0.18 probe pinned. This branch
228
+ // deliberately keeps the fallback the content[] branch above no longer needs: a flat
229
+ // item's `type` is the PART kind of its own body, not a message discriminator, so
230
+ // carrying the raw value here would skip the real 2.0.18 replies.
89
231
  return {
90
- info: { role, ...(typeof created === "number" ? { time: { created } } : {}) },
232
+ info: infoOfMessage(rec, messageKind(rec.role) || messageKind(rec.type) || "assistant"),
91
233
  parts: [{ type: "text", text }],
92
234
  };
93
235
  });
94
236
  }
237
+ /** WHY a body came back empty, in names and counts only — never a value, a path, or a
238
+ * snippet of text (the R6 口径 binds a diagnostic). tm_join writes this onto the
239
+ * `child_body_missing` trajectory line so the three conclusions stay distinguishable:
240
+ * a real body (`child_body`), a seam that answered with nothing readable in it
241
+ * (`items=2 keys=[content+id+metadata+role] content=1 kinds=[tool] text=0`), and a seam
242
+ * that did not answer at all (`no-context-method`). Without it, "we read it" and "we could
243
+ * not read it" print the same row — goal #6's failure shape. */
244
+ export function contextShapeEvidence(list) {
245
+ if (list === undefined || list === null)
246
+ return "no-list";
247
+ if (!Array.isArray(list))
248
+ return `not-array(${typeof list})`;
249
+ if (list.length === 0)
250
+ return "items=0";
251
+ const last = list[list.length - 1];
252
+ if (!last || typeof last !== "object")
253
+ return `items=${list.length} last=${last === null ? "null" : typeof last}`;
254
+ const rec = last;
255
+ const keys = Object.keys(rec).slice(0, 12).join("+");
256
+ const bag = Array.isArray(rec.content) ? "content" : Array.isArray(rec.parts) ? "parts" : "";
257
+ if (bag) {
258
+ const arr = rec[bag];
259
+ const kinds = Array.from(new Set(arr.map((p) => (p && typeof p === "object" ? String(p.type ?? "?") : typeof p))))
260
+ .slice(0, 6)
261
+ .join("+");
262
+ let withText = 0;
263
+ for (const p of arr) {
264
+ const t = p?.text;
265
+ if (typeof t === "string" && t.trim())
266
+ withText++;
267
+ }
268
+ return `items=${list.length} keys=[${keys}] ${bag}=${arr.length} kinds=[${kinds}] text=${withText}`;
269
+ }
270
+ if (typeof rec.text === "string")
271
+ return `items=${list.length} keys=[${keys}] textlen=${rec.text.length}`;
272
+ return `items=${list.length} keys=[${keys}] nobag`;
273
+ }
274
+ /** The one name this bridge has for itself, so a reply credits the seam that answered and a
275
+ * refusal names the seam that did not — never the v1 endpoint this host does not have. */
276
+ const SEAM = "ctx.session.context";
95
277
  export function createV2SessionReader(ctx) {
96
278
  const report = {
97
279
  attempted: 0, resolved: 0, failedShapes: [], contextTried: 0, contextOk: 0, contextKeys: [],
280
+ interruptTried: 0, interruptConfirmed: 0, interruptRefused: 0, interruptUnknown: 0, interruptKeys: [],
281
+ promptTried: 0, promptConfirmed: 0, promptUnconfirmed: 0, promptKeys: [],
282
+ inboxListTried: 0, inboxListOk: 0, inboxCancelTried: 0, inboxCancelConfirmed: 0, inboxCancelNoop: 0,
283
+ inboxSpellings: [],
98
284
  };
99
285
  const domain = ctx?.session;
100
286
  const call = async (method, arg) => {
@@ -135,35 +321,308 @@ export function createV2SessionReader(ctx) {
135
321
  return { data: undefined };
136
322
  },
137
323
  /** The reply path: `ctx.session.context({sessionID})` is the in-process seam that
138
- * answers for a child's messages — measured on 2.0.18, where it returns an ARRAY of
139
- * `{id, time:{created}, text, type}`. That is NOT v1's `[{info:{role},parts:[…]}]`,
140
- * and this is the reason `tm_join` kept saying it could not read a reply that was
141
- * sitting right there: `lastAssistantMessage` tolerates an unknown shape by returning
142
- * no text, so the call succeeded and the body was silently dropped. The flat shape is
143
- * therefore NORMALISED here, at the seam that knows it, so the collect path stays
144
- * single-shaped — and the result says WHICH seam answered, because a reply that
145
- * credits "session.messages" (a v1 endpoint this host does not have) is a claim about
146
- * the host that nobody measured. */
324
+ * answers for a child's messages. Measured on 2.0.18 it returns an ARRAY of flat
325
+ * `{id, time:{created}, text, type}` items; measured on 2.0.20 it returns items of
326
+ * `{id, role, metadata, content:[…]}` — the shape the published
327
+ * `Session.Message.Info` contract describes, with the kind on `role` instead of the
328
+ * documented `type`. Neither is v1's `[{info:{role},parts:[…]}]`, and both were the
329
+ * reason `tm_join` said it could not read a reply that was sitting right there:
330
+ * `lastAssistantMessage` tolerates an unknown shape by returning NO text, so the call
331
+ * succeeded and the body was silently dropped. Both shapes are therefore NORMALISED
332
+ * here, at the seam that knows them, so the collect path stays single-shaped — and
333
+ * every answer carries WHICH seam it came from plus the SHAPE it saw, because a reply
334
+ * that credits "session.messages" (a v1 endpoint this host does not have) is a claim
335
+ * about the host nobody measured, and a missing body with no shape on it is the same
336
+ * claim in the other direction. */
147
337
  messages: async (opts) => {
148
338
  const id = idOf(opts);
149
- if (!id || typeof domain?.context !== "function")
150
- return { data: undefined };
339
+ if (!id)
340
+ return { data: undefined, via: SEAM, shape: "no-id" };
341
+ if (typeof domain?.context !== "function") {
342
+ // The seam is ABSENT, which is a different fact from "it answered with nothing".
343
+ report.contextError = domain ? "ctx.session has no context method" : "ctx has no session domain";
344
+ return { data: undefined, via: SEAM, shape: domain ? "no-context-method" : "no-session-domain" };
345
+ }
151
346
  report.contextTried++;
152
347
  try {
153
348
  const raw = await call("context", { sessionID: id });
154
349
  const rec = unwrap(raw);
155
350
  if (!rec)
156
- return { data: undefined };
351
+ return { data: undefined, via: SEAM, shape: `seam-answered-${raw === null ? "null" : typeof raw}` };
157
352
  report.contextOk++;
158
353
  report.contextKeys = Array.isArray(rec) ? ["array"] : Object.keys(rec).slice(0, 24);
159
354
  const list = Array.isArray(rec) ? rec : (rec.messages ?? rec.data ?? rec);
160
- return { data: normaliseContextMessages(list), via: "ctx.session.context" };
355
+ const seen = contextShapeEvidence(list);
356
+ report.contextShape = seen;
357
+ return { data: normaliseContextMessages(list), via: SEAM, shape: seen };
161
358
  }
162
359
  catch (err) {
163
360
  report.contextError = String(err?.message ?? err).slice(0, 160);
164
- return { data: undefined };
361
+ return { data: undefined, via: SEAM, shape: "context-threw" };
362
+ }
363
+ },
364
+ /** #33 — the STOP path. `tm_join { cancel: true }` was written against v1's
365
+ * `client.session.abort`, and this bridge never wrapped it, so on 2.x every
366
+ * background child was un-stoppable by the lead (the host gives no dialog and
367
+ * no card for a child the plugin observed rather than created).
368
+ *
369
+ * What the host DOES give a plugin is `ctx.session.interrupt`, and its contract
370
+ * is quoted from the v2 API page rather than inferred:
371
+ *
372
+ * POST /api/session/{sessionID}/interrupt
373
+ * "Returns interrupted=true when an active execution was interrupted and
374
+ * false for the idle no-op."
375
+ *
376
+ * That one sentence is why this seam must not collapse into a boolean: `false`
377
+ * is a real answer meaning "nothing was running", not "the stop failed", and a
378
+ * reply that called it 已停止 would be goal #6's overstated claim. Three
379
+ * outcomes therefore survive to the caller, plus the two failure cases (no
380
+ * seam, host threw):
381
+ * stopped — `interrupted === true`, the host stopped an active execution
382
+ * idle — `interrupted === false`, documented no-op
383
+ * unknown — the call answered but carried no `interrupted` boolean
384
+ * no-seam — this host's ctx has no `interrupt`
385
+ * threw — the host refused; its own message rides back
386
+ *
387
+ * The shape is `session.interrupt({sessionID})` — the same flat object `get` and
388
+ * `context` take (the rule AGENTS.md records for every `te`-wrapped method), and
389
+ * the v1 `{path:{id}}` spellings are NOT retried here because a wrong key on THIS
390
+ * method is not a decode failure but an interrupt of the wrong session.
391
+ *
392
+ * `resume` is deliberately never sent, and the reason is now a quotation rather than
393
+ * a guess: on the published OpenAPI the parameter is named `resume`, it is OPTIONAL,
394
+ * and it carries NO documented default — so what this host does when the field is
395
+ * absent is not written down anywhere, and `continue: false` (the other spelling the
396
+ * docs use for the same knob) cannot be honoured honestly from here. The steering
397
+ * work of 2026-10-04 read the contract for the INBOX side (`Session.Inbox.Delivery`,
398
+ * `session.inbox.list/patch/cancel`) and this parameter stayed unspecified: deciding
399
+ * it needs a live probe of this host's `session.interrupt`, not another inference
400
+ * from a field name. Until then the honest statement is "we did not send it".
401
+ *
402
+ * Privacy: the key NAMES the host returned are recorded; the value text is not
403
+ * (R6 binds a diagnostic). */
404
+ interrupt: async (opts) => {
405
+ const id = idOf(opts);
406
+ report.interruptTried++;
407
+ if (!id || typeof domain?.interrupt !== "function")
408
+ return { data: { outcome: "no-seam" } };
409
+ // Property access on the domain, never a captured reference (see `call`).
410
+ const fn = domain.interrupt;
411
+ try {
412
+ const raw = await fn.call(domain, { sessionID: id });
413
+ const rec = unwrap(raw);
414
+ report.interruptKeys = rec ? Object.keys(rec).slice(0, 16) : ["(non-object)"];
415
+ // `interrupted` can ride the returned object or one of the envelopes `unwrap`
416
+ // recognises (`{data}` / `{result}` / `{session}`) — reading only the outer one
417
+ // turns a real stop into `unknown`, and `unknown` reads as "we could not tell".
418
+ const carriers = [rec, raw?.data, raw?.result];
419
+ let flag;
420
+ for (const cand of carriers) {
421
+ const v = cand?.interrupted;
422
+ if (typeof v === "boolean") {
423
+ flag = v;
424
+ break;
425
+ }
426
+ }
427
+ if (flag === true)
428
+ report.interruptConfirmed++;
429
+ else if (flag === false)
430
+ report.interruptRefused++;
431
+ else
432
+ report.interruptUnknown++;
433
+ const note = carriers
434
+ .map((c) => c?.message)
435
+ .find((m) => typeof m === "string");
436
+ return {
437
+ data: {
438
+ outcome: flag === true ? "stopped" : flag === false ? "idle" : "unknown",
439
+ ...(note ? { message: note } : {}),
440
+ },
441
+ };
442
+ }
443
+ catch (err) {
444
+ report.interruptError = String(err?.message ?? err).slice(0, 160);
445
+ return { data: { outcome: "threw", message: report.interruptError } };
446
+ }
447
+ },
448
+ /** #steer — the INTERJECTION path: `tm_join { steer: "…" }` puts a line of text into
449
+ * a running child's inbox so the lead can correct it mid-flight instead of waiting
450
+ * for it to settle and re-dispatching. The contract is quoted from the published
451
+ * docs, not inferred:
452
+ *
453
+ * Session.Inbox.Delivery = "steer" | "queue"
454
+ * ctx.session.prompt({ sessionID, text, delivery })
455
+ * ctx.session.synthetic({ sessionID, text, … })
456
+ * "Durably admit synthetic session input and schedule execution unless resume is false"
457
+ * "Steering wakes session execution."
458
+ *
459
+ * `prompt` is the primary seam (its documented example carries `delivery`, and a
460
+ * lead's interjection is real input, not a synthetic envelope); `synthetic` is the
461
+ * fallback for a host that gives only that one, and WHICH carried the input rides
462
+ * back in `seam` so the reply credits the seam it used rather than the one it
463
+ * hoped for. `delivery` is always spelled explicitly — the caller's default is
464
+ * `steer`, and leaving the field off would hand the model an undocumented host
465
+ * default to be surprised by later.
466
+ *
467
+ * Three outcomes, kept as data because the reply may only say 已受理 for the first:
468
+ * steered — the answer named the inbox item (`^msg_`), i.e. it was admitted
469
+ * not-steered — the host refused, or answered without an id (its words ride back)
470
+ * no-seam — this ctx has neither `prompt` nor `synthetic`
471
+ * And even `steered` is NOT delivery: the host queues it and wakes execution at the
472
+ * step boundary, which is why the caller's sentence must never read 已送达.
473
+ *
474
+ * The argument is the FLAT `{sessionID, text, delivery}` object every other method
475
+ * on this surface takes (the `te`-wrapper rule), and the v1 `{path, body}` spelling
476
+ * is not tried here for the same reason `interrupt` refuses it: on a write method a
477
+ * wrong key is not a decode failure, it is an input sent to the wrong session. */
478
+ prompt: async (opts) => {
479
+ const o = (opts ?? {});
480
+ const id = String(o.sessionID ?? "").trim();
481
+ const text = typeof o.text === "string" ? o.text : "";
482
+ report.promptTried++;
483
+ if (!id || !text)
484
+ return { data: { outcome: "not-steered", message: "缺少 sessionID 或插话文本,未发送" } };
485
+ const seam = typeof domain?.prompt === "function"
486
+ ? "prompt"
487
+ : typeof domain?.synthetic === "function"
488
+ ? "synthetic"
489
+ : "";
490
+ if (!seam) {
491
+ report.promptError = domain ? "ctx.session 既没有 prompt 也没有 synthetic" : "ctx 没有 session 域";
492
+ return { data: { outcome: "no-seam", seam: "none", message: report.promptError } };
493
+ }
494
+ const arg = { sessionID: id, text };
495
+ if (typeof o.delivery === "string" && o.delivery.trim())
496
+ arg.delivery = o.delivery.trim();
497
+ // Property access on the domain, never a captured reference (see `call`).
498
+ const fn = (seam === "prompt" ? domain.prompt : domain.synthetic);
499
+ try {
500
+ const raw = await fn.call(domain, arg);
501
+ const rec = unwrap(raw);
502
+ report.promptKeys = rec ? Object.keys(rec).slice(0, 16) : ["(non-object)"];
503
+ report.steerSeamUsed = `session.${seam}`;
504
+ const inboxID = inboxIdOf(raw);
505
+ if (inboxID) {
506
+ report.promptConfirmed++;
507
+ return { data: { outcome: "steered", inboxID, seam: `session.${seam}` } };
508
+ }
509
+ // An answer with no inbox id is NOT evidence anything was admitted. Counting it
510
+ // as a success is the exact overstatement goal #6 exists to refuse.
511
+ report.promptUnconfirmed++;
512
+ return {
513
+ data: {
514
+ outcome: "not-steered",
515
+ seam: `session.${seam}`,
516
+ message: `宿主应答了但没有回 inbox id(keys=[${report.promptKeys.join("+")}]),无法确认入队`,
517
+ },
518
+ };
519
+ }
520
+ catch (err) {
521
+ report.promptError = String(err?.message ?? err).slice(0, 160);
522
+ report.promptUnconfirmed++;
523
+ return {
524
+ data: {
525
+ outcome: "not-steered",
526
+ seam: `session.${seam}`,
527
+ message: report.promptError,
528
+ },
529
+ };
530
+ }
531
+ },
532
+ /** `session.inbox.list` for `tm_join { unread: true }` — the UNDELIVERED items of a
533
+ * child session. This seam returns the host's array as-is; the caller reduces it to
534
+ * ids and shape and never the body (`src/tm/dispatch.ts` `inboxItemLines`), because
535
+ * an inbox item's text is the lead's or a child's working content and the R6 口径
536
+ * binds a read-back as much as a diagnostic. */
537
+ inboxList: async (opts) => {
538
+ const o = (opts ?? {});
539
+ const id = String(o.sessionID ?? "").trim();
540
+ report.inboxListTried++;
541
+ if (!id)
542
+ return { data: { outcome: "threw", message: "缺少 sessionID,未查询" } };
543
+ const m = resolveInboxMethod(domain, "list");
544
+ if (!m) {
545
+ report.inboxError = "ctx.session 没有 inbox.list(试过的拼写见 inboxSpellings)";
546
+ return { data: { outcome: "no-seam" } };
547
+ }
548
+ if (!report.inboxSpellings.includes(m.spelling))
549
+ report.inboxSpellings.push(m.spelling);
550
+ try {
551
+ const raw = await m.fn.call(m.owner, { sessionID: id });
552
+ const rec = unwrap(raw);
553
+ const list = Array.isArray(rec)
554
+ ? rec
555
+ : (rec?.items ??
556
+ rec?.data ??
557
+ []);
558
+ if (!Array.isArray(list))
559
+ return { data: { outcome: "threw", spelling: m.spelling, message: "宿主返回的不是列表" } };
560
+ report.inboxListOk++;
561
+ return { data: { outcome: "listed", items: list, spelling: m.spelling } };
562
+ }
563
+ catch (err) {
564
+ report.inboxError = String(err?.message ?? err).slice(0, 160);
565
+ return { data: { outcome: "threw", spelling: m.spelling, message: report.inboxError } };
566
+ }
567
+ },
568
+ /** `session.inbox.cancel` for `tm_join { unsend }`. The documented contract is the
569
+ * reason there are two positive-looking answers and only one of them is a success:
570
+ *
571
+ * "Cancel an inbox item that has not yet been delivered. Unavailable items are a
572
+ * no-op…"
573
+ *
574
+ * So a host that answers WITHOUT naming the item back may have cancelled nothing —
575
+ * the item was already delivered, or never existed. That is `noop`, said as one,
576
+ * and never laundered into 已撤回. `cancelled` requires the answer to name a `^msg_`
577
+ * id (the published `inboxID` pattern). There is no tool-level cancel seam beyond
578
+ * this: what a host can stop is the whole active execution (`interrupt`), not one
579
+ * running tool call inside it. */
580
+ inboxCancel: async (opts) => {
581
+ const o = (opts ?? {});
582
+ const id = String(o.sessionID ?? "").trim();
583
+ const inboxID = String(o.inboxID ?? "").trim();
584
+ report.inboxCancelTried++;
585
+ if (!id || !inboxID)
586
+ return { data: { outcome: "threw", message: "缺少 sessionID 或 inboxID,未发送撤回" } };
587
+ const m = resolveInboxMethod(domain, "cancel");
588
+ if (!m) {
589
+ report.inboxError = "ctx.session 没有 inbox.cancel";
590
+ return { data: { outcome: "no-seam" } };
591
+ }
592
+ if (!report.inboxSpellings.includes(m.spelling))
593
+ report.inboxSpellings.push(m.spelling);
594
+ try {
595
+ const raw = await m.fn.call(m.owner, { sessionID: id, inboxID });
596
+ const rec = unwrap(raw);
597
+ const named = inboxIdOf(raw);
598
+ if (named) {
599
+ report.inboxCancelConfirmed++;
600
+ return { data: { outcome: "cancelled", inboxID: named, spelling: m.spelling } };
601
+ }
602
+ report.inboxCancelNoop++;
603
+ return {
604
+ data: {
605
+ outcome: "noop",
606
+ spelling: m.spelling,
607
+ keys: rec ? Object.keys(rec).slice(0, 12) : ["(non-object)"],
608
+ },
609
+ };
610
+ }
611
+ catch (err) {
612
+ report.inboxError = String(err?.message ?? err).slice(0, 160);
613
+ return { data: { outcome: "threw", spelling: m.spelling, message: report.inboxError } };
165
614
  }
166
615
  },
616
+ /** THE STEER MARKER. `tm_join` gates its interjection paths on this flag instead of
617
+ * on `typeof api.prompt === "function"`, and the difference is load-bearing: v1's SDK
618
+ * client DOES have `session.prompt`, but it takes `{path:{id}, body:{parts}}` and has
619
+ * no `delivery` field at all. A gate that only looked for a method named `prompt`
620
+ * would fire a v1 endpoint with a v2 contract and report whatever came back as a
621
+ * steering verdict. This object is the only place the v2 flat contract is built, so
622
+ * its presence — not a version number — is the fact the caller may rely on, and a
623
+ * v1-shaped client answers `no-seam` without calling anything (pinned by a test:
624
+ * promptReached === 0 on an abort-capable client). */
625
+ v2SteerSeam: true,
167
626
  },
168
627
  };
169
628
  return { client, report };
@@ -1 +1 @@
1
- {"version":3,"file":"v2-session-client.js","sourceRoot":"","sources":["../../src/host/v2-session-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AA6BH;;gEAEgE;AAChE,MAAM,MAAM,GAA6C;IACvD,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1C,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACpC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;CAC3B,CAAA;AAED,SAAS,IAAI,CAAC,IAAa;IACzB,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAA6F,CAAA;IAClH,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,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