@sema-agent/core 7.26.3 → 7.28.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 (78) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/agents/builtin-agents.d.ts +6 -15
  3. package/dist/agents/cascade.d.ts +29 -33
  4. package/dist/agents/observer.d.ts +18 -20
  5. package/dist/agents/subagent.d.ts +58 -70
  6. package/dist/agents/tool-filter.d.ts +10 -12
  7. package/dist/agents/verify.d.ts +44 -49
  8. package/dist/brain/input-too-long.d.ts +10 -12
  9. package/dist/brain/media-degrade.d.ts +4 -5
  10. package/dist/brain/reasoning.d.ts +10 -12
  11. package/dist/brain/repetition.d.ts +7 -9
  12. package/dist/brain/request-params.d.ts +20 -25
  13. package/dist/brain/route-adjudicator.d.ts +4 -4
  14. package/dist/brain/route-conformance.d.ts +2 -2
  15. package/dist/brain/status-sink.d.ts +12 -14
  16. package/dist/brain/terminal-cause.d.ts +12 -15
  17. package/dist/brain/timeout.d.ts +17 -19
  18. package/dist/core/auto-mode-directive.d.ts +6 -4
  19. package/dist/core/auto-mode-directive.js +1 -5
  20. package/dist/core/engine-notice.d.ts +13 -6
  21. package/dist/core/memory-engine/consolidation.d.ts +11 -15
  22. package/dist/core/memory-engine/engine.d.ts +45 -54
  23. package/dist/core/memory-engine/tools.d.ts +17 -23
  24. package/dist/core/permission-rule-model.js +5 -3
  25. package/dist/core/runner/contracts.d.ts +31 -7
  26. package/dist/core/runner/denial-limit-arms.d.ts +17 -15
  27. package/dist/core/runner/denial-limit-arms.js +4 -1
  28. package/dist/core/runner/prepare-gate-stations.d.ts +1 -2
  29. package/dist/core/runner/prepare-inherited-gate.d.ts +1 -2
  30. package/dist/core/runner/prepare-policy-chain.d.ts +1 -2
  31. package/dist/core/runner/prepare-task.js +1 -1
  32. package/dist/core/runner/run-leg.js +5 -1
  33. package/dist/core/tool-policy.d.ts +23 -2
  34. package/dist/core/tool-policy.js +106 -103
  35. package/dist/index.d.ts +6 -1
  36. package/dist/shell/lex.d.ts +279 -0
  37. package/dist/shell/lex.js +1253 -0
  38. package/dist/stores/file/background-agent-store.d.ts +4 -0
  39. package/dist/stores/file/background-agent-store.js +10 -0
  40. package/dist/stores/file/checkpoint-store.d.ts +3 -0
  41. package/dist/stores/file/checkpoint-store.js +18 -0
  42. package/dist/stores/file/corrupt-read-sink.d.ts +20 -0
  43. package/dist/stores/file/corrupt-read-sink.js +15 -0
  44. package/dist/stores/file/file-history-store.d.ts +1 -2
  45. package/dist/stores/file/file-history-store.js +3 -8
  46. package/dist/stores/file/fs-atomic.d.ts +8 -3
  47. package/dist/stores/file/fs-atomic.js +19 -2
  48. package/dist/stores/file/index.js +4 -4
  49. package/dist/stores/file/mailbox-store.d.ts +3 -0
  50. package/dist/stores/file/mailbox-store.js +24 -18
  51. package/dist/stores/file/permission-rule-store.js +18 -1
  52. package/dist/stores/file/session-policy-store.d.ts +17 -1
  53. package/dist/stores/file/session-policy-store.js +3 -12
  54. package/dist/stores/file/session-store.d.ts +1 -5
  55. package/dist/stores/file/session-store.js +9 -14
  56. package/dist/stores/file/shared-ledger.d.ts +18 -0
  57. package/dist/stores/file/shared-ledger.js +16 -2
  58. package/dist/stores/file/tool-result-store.d.ts +9 -1
  59. package/dist/stores/file/tool-result-store.js +17 -2
  60. package/dist/stores/file/workflow-journal-store.d.ts +10 -1
  61. package/dist/stores/file/workflow-journal-store.js +8 -12
  62. package/dist/stores/file/workflow-run-store.d.ts +3 -0
  63. package/dist/stores/file/workflow-run-store.js +10 -0
  64. package/dist/tools/artifact/local-stub.js +16 -1
  65. package/dist/tools/fs/bash-program-position.d.ts +2 -4
  66. package/dist/tools/fs/bash-program-position.js +2 -1
  67. package/dist/tools/fs/bash-readonly-classifier.d.ts +2 -2
  68. package/dist/tools/fs/bash-readonly-classifier.js +1 -1
  69. package/dist/tools/fs/shell-read-check.js +1 -1
  70. package/dist/tools/fs/shell-read-establish.js +11 -1
  71. package/dist/tools/fs/shell-read-plan.d.ts +7 -2
  72. package/dist/tools/fs/shell-read-plan.js +48 -10
  73. package/package.json +2 -2
  74. package/test/export-surface.snapshot.json +3 -1
  75. package/wire-changes/core@7.27.0.json +152 -0
  76. package/wire-changes/core@7.28.0.json +594 -0
  77. package/dist/tools/fs/bash-lexer.d.ts +0 -152
  78. package/dist/tools/fs/bash-lexer.js +0 -627
@@ -0,0 +1,594 @@
1
+ {
2
+ "repo": "core",
3
+ "version": "7.28.0",
4
+ "from": "cba36ff92ab9b8a3912e984f6a20263bd6a4c16b",
5
+ "to": "v7.28.0",
6
+ "added": [],
7
+ "removed": [],
8
+ "changed": [],
9
+ "narrowed": [
10
+ {
11
+ "id": "F2",
12
+ "source": "behaviorFlips.summary",
13
+ "text": "NARROWING (#994 S0, shell read boundary): a command carrying an unclosed `'`, `\\\"` or `$'` is a PARSE FAILURE in every mode — no words, no segments, the plan's `unreadable` floor — where the strict faces used to re-read it quote-blind and vouch for the words that reading invented. Bash itself runs nothing on such a command."
14
+ },
15
+ {
16
+ "id": "F3",
17
+ "source": "behaviorFlips.summary",
18
+ "text": "NARROWING (#994 S0, merged-tree adversarial round 1): a word the lexer cannot settle refuses ITS OWN reading, not the whole text — the plan keeps every segment beside it and carries the refusal sentence as its `unreadable` floor, so a deny row named elsewhere in the same command still outranks the floor (`deny > ask`). Where nothing is denied, the floor is a mandated ask, never a vouched run."
19
+ },
20
+ {
21
+ "id": "F4",
22
+ "source": "behaviorFlips.summary",
23
+ "text": "NARROWING (#994 S0, merged-tree adversarial round 2): an unprovable directory move no longer relocates the base to a fiction — a `cd` target minted from an unresolved word is `unresolvable`, the base is LOST, and a later relative read is judged for DENY ROWS ONLY against `ReadCandidate.floorBases`, the bases the text was certainly standing in at that moment (the declared cwd when nothing had moved)."
24
+ },
25
+ {
26
+ "id": "F5",
27
+ "source": "behaviorFlips.summary",
28
+ "text": "NARROWING / ALIGNMENT (#994 S0 fallout, persisted-rule import): a rule body whose `$'…'` never closes is refused as `invalid.unbalanced_quotes` rather than `invalid.not_simple_command` — the same closed set, NO new member, and the `'` / `\"` spellings (which already read that way) are unchanged. The lexer now refuses an unbalanced body before the lane-shape reader sees it, so the rule parser asks the balance question first and keeps the code an import report has always grouped it under."
29
+ }
30
+ ],
31
+ "closedSetMembers": [
32
+ {
33
+ "set": "BASH_ONLY_CONSTRUCTS",
34
+ "at": [
35
+ "src/shell/lex.ts:111"
36
+ ],
37
+ "newSet": true,
38
+ "added": [
39
+ "ansi_c_quoting",
40
+ "append_assignment",
41
+ "brace_expansion",
42
+ "compound_assignment",
43
+ "here_string",
44
+ "locale_string",
45
+ "process_substitution",
46
+ "redirect_both",
47
+ "subscript_assignment"
48
+ ],
49
+ "removed": [],
50
+ "breaking": false,
51
+ "criteriaCovered": false
52
+ },
53
+ {
54
+ "set": "BashOnlyConstruct",
55
+ "at": [
56
+ "src/shell/lex.ts:122"
57
+ ],
58
+ "newSet": true,
59
+ "added": [
60
+ "ansi_c_quoting",
61
+ "append_assignment",
62
+ "brace_expansion",
63
+ "compound_assignment",
64
+ "here_string",
65
+ "locale_string",
66
+ "process_substitution",
67
+ "redirect_both",
68
+ "subscript_assignment"
69
+ ],
70
+ "removed": [],
71
+ "breaking": false,
72
+ "criteriaCovered": false
73
+ },
74
+ {
75
+ "set": "EXPANSION_KINDS",
76
+ "at": [
77
+ "src/shell/lex.ts:44"
78
+ ],
79
+ "newSet": true,
80
+ "added": [
81
+ "arithmetic",
82
+ "brace",
83
+ "command",
84
+ "glob",
85
+ "parameter",
86
+ "process",
87
+ "tilde"
88
+ ],
89
+ "removed": [],
90
+ "breaking": false,
91
+ "criteriaCovered": false
92
+ },
93
+ {
94
+ "set": "ExpansionKind",
95
+ "at": [
96
+ "src/shell/lex.ts:45"
97
+ ],
98
+ "newSet": true,
99
+ "added": [
100
+ "arithmetic",
101
+ "brace",
102
+ "command",
103
+ "glob",
104
+ "parameter",
105
+ "process",
106
+ "tilde"
107
+ ],
108
+ "removed": [],
109
+ "breaking": false,
110
+ "criteriaCovered": false
111
+ },
112
+ {
113
+ "set": "PARSE_FAILURE_REASONS",
114
+ "at": [
115
+ "src/shell/lex.ts:75"
116
+ ],
117
+ "newSet": true,
118
+ "added": [
119
+ "background_operator",
120
+ "heredoc_delimiter_expands",
121
+ "heredoc_without_delimiter",
122
+ "redirect_without_target",
123
+ "undelimited_substitution",
124
+ "unterminated_ansi_c",
125
+ "unterminated_command_substitution",
126
+ "unterminated_compound_value",
127
+ "unterminated_double_quote",
128
+ "unterminated_heredoc",
129
+ "unterminated_parameter_expansion",
130
+ "unterminated_process_substitution",
131
+ "unterminated_single_quote",
132
+ "unterminated_subscript"
133
+ ],
134
+ "removed": [],
135
+ "breaking": false,
136
+ "criteriaCovered": false
137
+ },
138
+ {
139
+ "set": "ParseFailureReason",
140
+ "at": [
141
+ "src/shell/lex.ts:91"
142
+ ],
143
+ "newSet": true,
144
+ "added": [
145
+ "background_operator",
146
+ "heredoc_delimiter_expands",
147
+ "heredoc_without_delimiter",
148
+ "redirect_without_target",
149
+ "undelimited_substitution",
150
+ "unterminated_ansi_c",
151
+ "unterminated_command_substitution",
152
+ "unterminated_compound_value",
153
+ "unterminated_double_quote",
154
+ "unterminated_heredoc",
155
+ "unterminated_parameter_expansion",
156
+ "unterminated_process_substitution",
157
+ "unterminated_single_quote",
158
+ "unterminated_subscript"
159
+ ],
160
+ "removed": [],
161
+ "breaking": false,
162
+ "criteriaCovered": false
163
+ },
164
+ {
165
+ "set": "QUOTE_KINDS",
166
+ "at": [
167
+ "src/shell/lex.ts:39"
168
+ ],
169
+ "newSet": true,
170
+ "added": [
171
+ "\"",
172
+ "$\"",
173
+ "$'",
174
+ "'",
175
+ "\\"
176
+ ],
177
+ "removed": [],
178
+ "breaking": false,
179
+ "criteriaCovered": false
180
+ },
181
+ {
182
+ "set": "QuoteKind",
183
+ "at": [
184
+ "src/shell/lex.ts:40"
185
+ ],
186
+ "newSet": true,
187
+ "added": [
188
+ "\"",
189
+ "$\"",
190
+ "$'",
191
+ "'",
192
+ "\\"
193
+ ],
194
+ "removed": [],
195
+ "breaking": false,
196
+ "criteriaCovered": false
197
+ },
198
+ {
199
+ "set": "UNRESOLVED_REASONS",
200
+ "at": [
201
+ "src/shell/lex.ts:49"
202
+ ],
203
+ "newSet": true,
204
+ "added": [
205
+ "ansi_c_escape",
206
+ "compound_array_value",
207
+ "locale_string",
208
+ "parameter_text",
209
+ "subscript_text"
210
+ ],
211
+ "removed": [],
212
+ "breaking": false,
213
+ "criteriaCovered": false
214
+ },
215
+ {
216
+ "set": "UnresolvedReason",
217
+ "at": [
218
+ "src/shell/lex.ts:50"
219
+ ],
220
+ "newSet": true,
221
+ "added": [
222
+ "ansi_c_escape",
223
+ "compound_array_value",
224
+ "locale_string",
225
+ "parameter_text",
226
+ "subscript_text"
227
+ ],
228
+ "removed": [],
229
+ "breaking": false,
230
+ "criteriaCovered": false
231
+ }
232
+ ],
233
+ "closedSetsUnreadable": [],
234
+ "typeKeys": [
235
+ {
236
+ "type": "LexedWord",
237
+ "at": [
238
+ "src/shell/lex.ts:198"
239
+ ],
240
+ "via": "ShellReadSegment.argv",
241
+ "added": [
242
+ "assignment",
243
+ "atCommandPosition",
244
+ "expansions",
245
+ "pieces",
246
+ "quotedSpans",
247
+ "unresolved"
248
+ ],
249
+ "removed": [],
250
+ "breaking": false,
251
+ "criteriaCovered": false
252
+ },
253
+ {
254
+ "type": "ReadCandidate",
255
+ "at": [
256
+ "src/tools/fs/shell-read-plan.ts:110"
257
+ ],
258
+ "added": [
259
+ "floorBases"
260
+ ],
261
+ "removed": [],
262
+ "breaking": false,
263
+ "criteriaCovered": true
264
+ }
265
+ ],
266
+ "typeKeysUnreadableArms": [],
267
+ "typeKeysFlattenedCount": 213,
268
+ "declarationMoves": [
269
+ {
270
+ "name": "LenientConnector",
271
+ "kind": null,
272
+ "onSurface": false,
273
+ "from": [
274
+ "src/tools/fs/bash-lexer.ts"
275
+ ],
276
+ "to": [
277
+ "src/shell/lex.ts"
278
+ ]
279
+ },
280
+ {
281
+ "name": "LexMode",
282
+ "kind": null,
283
+ "onSurface": false,
284
+ "from": [
285
+ "src/tools/fs/bash-lexer.ts"
286
+ ],
287
+ "to": [
288
+ "src/shell/lex.ts"
289
+ ]
290
+ },
291
+ {
292
+ "name": "LexOptions",
293
+ "kind": null,
294
+ "onSurface": false,
295
+ "from": [
296
+ "src/tools/fs/bash-lexer.ts"
297
+ ],
298
+ "to": [
299
+ "src/shell/lex.ts"
300
+ ]
301
+ },
302
+ {
303
+ "name": "LexedCommand",
304
+ "kind": null,
305
+ "onSurface": false,
306
+ "from": [
307
+ "src/tools/fs/bash-lexer.ts"
308
+ ],
309
+ "to": [
310
+ "src/shell/lex.ts"
311
+ ]
312
+ },
313
+ {
314
+ "name": "LexedGroup",
315
+ "kind": null,
316
+ "onSurface": false,
317
+ "from": [
318
+ "src/tools/fs/bash-lexer.ts"
319
+ ],
320
+ "to": [
321
+ "src/shell/lex.ts"
322
+ ]
323
+ },
324
+ {
325
+ "name": "LexedHeredoc",
326
+ "kind": null,
327
+ "onSurface": false,
328
+ "from": [
329
+ "src/tools/fs/bash-lexer.ts"
330
+ ],
331
+ "to": [
332
+ "src/shell/lex.ts"
333
+ ]
334
+ },
335
+ {
336
+ "name": "LexedRedirect",
337
+ "kind": null,
338
+ "onSurface": false,
339
+ "from": [
340
+ "src/tools/fs/bash-lexer.ts"
341
+ ],
342
+ "to": [
343
+ "src/shell/lex.ts"
344
+ ]
345
+ },
346
+ {
347
+ "name": "LexedSegment",
348
+ "kind": null,
349
+ "onSurface": false,
350
+ "from": [
351
+ "src/tools/fs/bash-lexer.ts"
352
+ ],
353
+ "to": [
354
+ "src/shell/lex.ts"
355
+ ]
356
+ },
357
+ {
358
+ "name": "LexedToken",
359
+ "kind": null,
360
+ "onSurface": false,
361
+ "from": [
362
+ "src/tools/fs/bash-lexer.ts"
363
+ ],
364
+ "to": [
365
+ "src/shell/lex.ts"
366
+ ]
367
+ },
368
+ {
369
+ "name": "LexedWord",
370
+ "kind": null,
371
+ "onSurface": false,
372
+ "from": [
373
+ "src/tools/fs/bash-lexer.ts"
374
+ ],
375
+ "to": [
376
+ "src/shell/lex.ts"
377
+ ]
378
+ },
379
+ {
380
+ "name": "QuoteOpen",
381
+ "kind": null,
382
+ "onSurface": false,
383
+ "from": [
384
+ "src/tools/fs/bash-lexer.ts"
385
+ ],
386
+ "to": [
387
+ "src/shell/lex.ts"
388
+ ]
389
+ },
390
+ {
391
+ "name": "SHELL_CONTROL_PREFIXES",
392
+ "kind": null,
393
+ "onSurface": false,
394
+ "from": [
395
+ "src/tools/fs/bash-program-position.ts"
396
+ ],
397
+ "to": [
398
+ "src/shell/lex.ts",
399
+ "src/tools/fs/bash-program-position.ts"
400
+ ]
401
+ },
402
+ {
403
+ "name": "SUBSTITUTION_PLACEHOLDER",
404
+ "kind": null,
405
+ "onSurface": false,
406
+ "from": [
407
+ "src/tools/fs/bash-lexer.ts"
408
+ ],
409
+ "to": [
410
+ "src/shell/lex.ts"
411
+ ]
412
+ },
413
+ {
414
+ "name": "SegmentTokens",
415
+ "kind": null,
416
+ "onSurface": false,
417
+ "from": [
418
+ "src/tools/fs/bash-lexer.ts"
419
+ ],
420
+ "to": [
421
+ "src/shell/lex.ts"
422
+ ]
423
+ },
424
+ {
425
+ "name": "ShellSegmentConnector",
426
+ "kind": null,
427
+ "onSurface": false,
428
+ "from": [
429
+ "src/tools/fs/bash-lexer.ts",
430
+ "src/tools/fs/bash-readonly-classifier.ts"
431
+ ],
432
+ "to": [
433
+ "src/shell/lex.ts",
434
+ "src/tools/fs/bash-readonly-classifier.ts"
435
+ ]
436
+ },
437
+ {
438
+ "name": "ansiCQuoteClose",
439
+ "kind": null,
440
+ "onSurface": false,
441
+ "from": [
442
+ "src/tools/fs/bash-lexer.ts"
443
+ ],
444
+ "to": [
445
+ "src/shell/lex.ts"
446
+ ]
447
+ },
448
+ {
449
+ "name": "dollarOpensQuote",
450
+ "kind": null,
451
+ "onSurface": false,
452
+ "from": [
453
+ "src/tools/fs/bash-lexer.ts"
454
+ ],
455
+ "to": [
456
+ "src/shell/lex.ts"
457
+ ]
458
+ },
459
+ {
460
+ "name": "lexShellText",
461
+ "kind": null,
462
+ "onSurface": false,
463
+ "from": [
464
+ "src/tools/fs/bash-lexer.ts"
465
+ ],
466
+ "to": [
467
+ "src/shell/lex.ts"
468
+ ]
469
+ },
470
+ {
471
+ "name": "literalTildeSpelling",
472
+ "kind": null,
473
+ "onSurface": false,
474
+ "from": [
475
+ "src/tools/fs/bash-lexer.ts"
476
+ ],
477
+ "to": [
478
+ "src/shell/lex.ts"
479
+ ]
480
+ },
481
+ {
482
+ "name": "quoteMask",
483
+ "kind": null,
484
+ "onSurface": false,
485
+ "from": [
486
+ "src/tools/fs/bash-lexer.ts"
487
+ ],
488
+ "to": [
489
+ "src/shell/lex.ts"
490
+ ]
491
+ },
492
+ {
493
+ "name": "substitutionsInHeredocBody",
494
+ "kind": null,
495
+ "onSurface": false,
496
+ "from": [
497
+ "src/tools/fs/bash-lexer.ts"
498
+ ],
499
+ "to": [
500
+ "src/shell/lex.ts"
501
+ ]
502
+ },
503
+ {
504
+ "name": "wordsOf",
505
+ "kind": null,
506
+ "onSurface": false,
507
+ "from": [
508
+ "src/tools/fs/bash-lexer.ts"
509
+ ],
510
+ "to": [
511
+ "src/shell/lex.ts"
512
+ ]
513
+ }
514
+ ],
515
+ "mintMoves": [],
516
+ "criteriaObserves": [
517
+ {
518
+ "kind": "taskEventField",
519
+ "name": "tool_end.gate",
520
+ "assertions": [
521
+ "G1.a",
522
+ "G2.b",
523
+ "G3.a",
524
+ "G4.b"
525
+ ]
526
+ },
527
+ {
528
+ "kind": "taskEventField",
529
+ "name": "tool_end.isError",
530
+ "assertions": [
531
+ "G1.b",
532
+ "G4.b"
533
+ ]
534
+ },
535
+ {
536
+ "kind": "taskEventField",
537
+ "name": "tool_end.structured",
538
+ "assertions": [
539
+ "G1.b",
540
+ "G2.b",
541
+ "G3.a",
542
+ "G4.a"
543
+ ]
544
+ },
545
+ {
546
+ "kind": "typeMember",
547
+ "name": "AskRequest.mandated",
548
+ "assertions": [
549
+ "G1.a",
550
+ "G2.a",
551
+ "G3.b"
552
+ ]
553
+ },
554
+ {
555
+ "kind": "typeMember",
556
+ "name": "AskRequest.probeReason",
557
+ "assertions": [
558
+ "G2.a"
559
+ ]
560
+ },
561
+ {
562
+ "kind": "typeMember",
563
+ "name": "ReadCandidate.floorBases",
564
+ "assertions": [
565
+ "G4.a"
566
+ ]
567
+ },
568
+ {
569
+ "kind": "typeMember",
570
+ "name": "RuleReject.code",
571
+ "assertions": [
572
+ "G5.a"
573
+ ]
574
+ },
575
+ {
576
+ "kind": "typeMember",
577
+ "name": "ShellReadPlan.unreadable",
578
+ "assertions": [
579
+ "G3.b"
580
+ ]
581
+ }
582
+ ],
583
+ "consumersHint": {
584
+ "cli": [],
585
+ "server": [
586
+ "ReadCandidate"
587
+ ],
588
+ "sdk": [],
589
+ "note": "scanned cli@41e83b0c server@5532ec7b sdk@074194f — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
590
+ },
591
+ "breakingCount": 0,
592
+ "breakingItems": [],
593
+ "toResolvedAt": "244a00f124263b620478071e710e704cf69df8aa"
594
+ }