@te-river/opencode-team-mode 1.8.9 → 1.9.1

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.
@@ -78,6 +78,12 @@ export function makeFakeCtx({
78
78
  const syntheticCalls = []
79
79
  const inboxListCalls = []
80
80
  const inboxCancelCalls = []
81
+ /** 2.2.0 keyed session instructions — every put/remove/list the layer actually made,
82
+ * with args, because "the card is not in system" alone cannot tell "it went to the
83
+ * host" from "it was dropped". */
84
+ const instructionPutCalls = []
85
+ const instructionRemoveCalls = []
86
+ const instructionListCalls = []
81
87
  /** How many times the catalog was listed — the prune layer's denominator read, so a
82
88
  * per-request catalog re-read is a number and not a shrug. */
83
89
  const modelListCalls = []
@@ -151,6 +157,20 @@ export function makeFakeCtx({
151
157
  // `inboxFlat` lets a test drive the fallback and pin which one answered.
152
158
  ...(has("prompt") ? { prompt: verdictMethod(sessionData.prompt, promptCalls) } : {}),
153
159
  ...(has("synthetic") ? { synthetic: verdictMethod(sessionData.synthetic, syntheticCalls) } : {}),
160
+ // 2.2.0: `session.instructions.entry.put/list/remove`. Seeded ONLY when a
161
+ // test asks for it — a fake that always carried the domain would make the
162
+ // `fallback-system` path (what a 2.1.x host really gets) untestable.
163
+ ...(has("instructions") && sessionData.instructions
164
+ ? {
165
+ instructions: {
166
+ entry: {
167
+ put: verdictMethod(sessionData.instructions.put, instructionPutCalls),
168
+ remove: verdictMethod(sessionData.instructions.remove, instructionRemoveCalls),
169
+ list: verdictMethod(sessionData.instructions.list ?? [], instructionListCalls),
170
+ },
171
+ },
172
+ }
173
+ : {}),
154
174
  ...(has("inbox") && sessionData.inbox && !sessionData.inboxFlat
155
175
  ? {
156
176
  inbox: {
@@ -215,6 +235,10 @@ export function makeFakeCtx({
215
235
  syntheticCalls,
216
236
  inboxListCalls,
217
237
  inboxCancelCalls,
238
+ /** 2.2.0 keyed instructions: what the layer actually put/removed/listed. */
239
+ instructionPutCalls,
240
+ instructionRemoveCalls,
241
+ instructionListCalls,
218
242
  /** The catalog reads, with their args. */
219
243
  modelListCalls,
220
244
  }