@sema-agent/core 7.24.1 → 7.24.3

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 (41) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/agents/subagent.js +4 -1
  3. package/dist/brain/anthropic.js +2 -2
  4. package/dist/brain/errors.d.ts +6 -4
  5. package/dist/brain/open-responses.js +2 -2
  6. package/dist/brain/openai.js +2 -2
  7. package/dist/brain/route-adjudicator.d.ts +41 -13
  8. package/dist/brain/route-adjudicator.js +97 -18
  9. package/dist/core/checkpoint-store.d.ts +127 -102
  10. package/dist/core/checkpoint-store.js +33 -9
  11. package/dist/core/mcp-failure.d.ts +73 -0
  12. package/dist/core/mcp-failure.js +21 -0
  13. package/dist/core/mcp.d.ts +18 -1
  14. package/dist/core/mcp.js +33 -12
  15. package/dist/core/memory-engine/distiller.js +3 -3
  16. package/dist/core/runner/prepare-boundary-parks.js +3 -3
  17. package/dist/core/runner/prepare-park-ask.js +2 -2
  18. package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -2
  19. package/dist/core/runner/prepare-wiring-manifest.js +3 -1
  20. package/dist/core/runner/resume-checkpoint-screen.js +11 -10
  21. package/dist/core/runner/resume-policy-outcome.js +2 -2
  22. package/dist/core/wiring-manifest.d.ts +20 -1
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +2 -2
  25. package/dist/prompt-assembly/packs/sema-default.js +15 -0
  26. package/dist/prompts/default.d.ts +1 -1
  27. package/dist/prompts/default.js +4 -4
  28. package/dist/tools/fs/bash-program-position.d.ts +5 -0
  29. package/dist/tools/fs/bash-program-position.js +1 -1
  30. package/dist/tools/fs/bash-readonly-classifier.d.ts +476 -1
  31. package/dist/tools/fs/bash-readonly-classifier.js +98 -34
  32. package/dist/tools/fs/fs-bash.js +2 -325
  33. package/dist/tools/fs/shell-read-establish.d.ts +127 -0
  34. package/dist/tools/fs/shell-read-establish.js +326 -0
  35. package/dist/tools/fs/shell-read-plan.d.ts +113 -0
  36. package/dist/tools/fs/shell-read-plan.js +700 -0
  37. package/package.json +1 -1
  38. package/test/export-surface.snapshot.json +9 -1
  39. package/wire-changes/core@7.24.1.json +3 -17
  40. package/wire-changes/core@7.24.2.json +81 -0
  41. package/wire-changes/core@7.24.3.json +244 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/core",
3
- "version": "7.24.1",
3
+ "version": "7.24.3",
4
4
  "description": "Stateless, task-oriented AI agent core",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_comment": "design/87 L3 — frozen public export surface of src/index.ts (name -> kind). DO NOT edit by hand to silence a red test. A removed/changed entry = a SemVer-BREAKING change; bump MAJOR and update this fixture in the SAME commit (design/87 §4.2 / §5.2). Regenerate via REGEN in test/export-surface.test.ts.",
3
3
  "_tierComment": "#435 v1 — machine-readable layering of the public surface: stable = demonstrated by README.md / src/examples; internal = an `Internal`-marked name or a runner/engine deep-subtree declaration (the model seam src/engine/llm is excluded — it is the BYOM contract, not an engine internal); advanced = a supported export the front door does not walk you through. THIS IS AN INITIAL HEURISTIC, derived mechanically and expected to be refined ticket by ticket: no human reviewed these 1700+ entries one by one, and nothing here claims otherwise. Known bias: a short or English-word export name (ok, err, Result, Usage) can match ordinary prose in README.md and land `stable` on a coincidence. Every export MUST carry a tier — a new export with no row fails the gate in export-surface.test.ts.",
4
- "count": 2398,
4
+ "count": 2402,
5
5
  "exports": {
6
6
  "A2ATaskState": "type",
7
7
  "A2ATaskStateReversal": "type",
@@ -654,6 +654,7 @@
654
654
  "MCP_IMAGE_MAX_BASE64": "variable",
655
655
  "MCP_INJECTION_DROP_REASONS": "variable",
656
656
  "MCP_INJECTION_DROP_TEXT": "variable",
657
+ "MCP_LIVENESS_STATES": "variable",
657
658
  "MCP_NAMESPACE": "variable",
658
659
  "MCP_PREFIX": "variable",
659
660
  "MEMORY_ANNOUNCEMENTS_MAX": "variable",
@@ -713,8 +714,10 @@
713
714
  "McpImageResizer": "type",
714
715
  "McpInjectionDropFacts": "interface",
715
716
  "McpInjectionDropReason": "type",
717
+ "McpLivenessState": "type",
716
718
  "McpReconnectResult": "interface",
717
719
  "McpRefreshResult": "interface",
720
+ "McpServerLiveness": "interface",
718
721
  "McpServerSpec": "interface",
719
722
  "McpServerStatus": "interface",
720
723
  "McpToolFace": "type",
@@ -2013,6 +2016,7 @@
2013
2016
  "isolationPermitsAutoAccept": "function",
2014
2017
  "jaccardDistance": "function",
2015
2018
  "joinFrontiers": "function",
2019
+ "joinRequestUrl": "function",
2016
2020
  "joinRuleStates": "function",
2017
2021
  "judgeCrossSessionInbound": "function",
2018
2022
  "judgeParkedToolIdentity": "function",
@@ -3054,6 +3058,7 @@
3054
3058
  "MCP_IMAGE_MAX_BASE64": "advanced",
3055
3059
  "MCP_INJECTION_DROP_REASONS": "advanced",
3056
3060
  "MCP_INJECTION_DROP_TEXT": "advanced",
3061
+ "MCP_LIVENESS_STATES": "advanced",
3057
3062
  "MCP_NAMESPACE": "advanced",
3058
3063
  "MCP_PREFIX": "advanced",
3059
3064
  "MEMORY_ANNOUNCEMENTS_MAX": "advanced",
@@ -3113,8 +3118,10 @@
3113
3118
  "McpImageResizer": "advanced",
3114
3119
  "McpInjectionDropFacts": "advanced",
3115
3120
  "McpInjectionDropReason": "advanced",
3121
+ "McpLivenessState": "advanced",
3116
3122
  "McpReconnectResult": "advanced",
3117
3123
  "McpRefreshResult": "advanced",
3124
+ "McpServerLiveness": "advanced",
3118
3125
  "McpServerSpec": "advanced",
3119
3126
  "McpServerStatus": "advanced",
3120
3127
  "McpToolFace": "internal",
@@ -4413,6 +4420,7 @@
4413
4420
  "isolationPermitsAutoAccept": "advanced",
4414
4421
  "jaccardDistance": "stable",
4415
4422
  "joinFrontiers": "advanced",
4423
+ "joinRequestUrl": "stable",
4416
4424
  "joinRuleStates": "advanced",
4417
4425
  "judgeCrossSessionInbound": "advanced",
4418
4426
  "judgeParkedToolIdentity": "advanced",
@@ -44,21 +44,7 @@
44
44
  "criteriaCovered": false
45
45
  }
46
46
  ],
47
- "closedSetsUnreadable": [
48
- {
49
- "set": "ModelRole",
50
- "from": "literal",
51
- "to": "declared",
52
- "unreadable": true,
53
- "at": [
54
- "src/core/model-seat.ts:44",
55
- "src/core/roles.ts:6",
56
- "src/core/types.ts:20",
57
- "src/index.ts:243"
58
- ],
59
- "reason": "no longer a spelled-out vocabulary (declared at src/core/model-seat.ts:44, src/core/roles.ts:6, src/core/types.ts:20, src/index.ts:243)"
60
- }
61
- ],
47
+ "closedSetsUnreadable": [],
62
48
  "typeKeys": [],
63
49
  "declarationMoves": [],
64
50
  "mintMoves": [],
@@ -77,9 +63,9 @@
77
63
  ],
78
64
  "server": [],
79
65
  "sdk": [],
80
- "note": "scanned cli@ae64fcaf server@277e6a15 sdk@5ded40c — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
66
+ "note": "scanned cli@6f99707c server@277e6a15 sdk@5ded40c — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
81
67
  },
82
68
  "breakingCount": 0,
83
69
  "breakingItems": [],
84
- "toResolvedAt": "d552b285c747d987758c66504ec8cba98fab04de"
70
+ "toResolvedAt": "f93e37f388d831881d2ebf4f9c28eca1499896a3"
85
71
  }
@@ -0,0 +1,81 @@
1
+ {
2
+ "repo": "core",
3
+ "version": "7.24.2",
4
+ "from": "f93e37f388d831881d2ebf4f9c28eca1499896a3",
5
+ "to": "v7.24.2",
6
+ "added": [
7
+ {
8
+ "name": "joinRequestUrl",
9
+ "kind": "function",
10
+ "tier": "stable",
11
+ "at": [
12
+ "src/brain/route-adjudicator.ts:370",
13
+ "src/index.ts:3212"
14
+ ],
15
+ "criteriaCovered": false,
16
+ "breaking": false
17
+ }
18
+ ],
19
+ "removed": [],
20
+ "changed": [],
21
+ "narrowed": [
22
+ {
23
+ "id": "F1",
24
+ "source": "behaviorFlips.summary",
25
+ "text": "NARROWING of a rendered string (#974, P1): `displayUrlOf` speaks query NAMES only where the query is PURE — every `name=value` pair decoded to its fixed point (≤3 rounds; a malformed escape leaves its `%`) is plain text `[A-Za-z0-9._~[\\]-+,*!'()$ ]`; any impure pair (a value carrying an un-encoded URL, an e-mail, a bare segment with `@`/`:`/`/`, residual `%`) collapses the WHOLE query to one `«redacted»`. WHO NEEDS IT: a deployment whose gateway root carries a query value with an embedded URL whose password contains `&` — the fragment after `&` and before `=` landed in the NAME position and was rendered verbatim (server report, main reproduced 8 forms, test 3 boundaries). WHO IS AFFECTED: operators reading refusals for roots with a legitimate structured value (`?redirect_uri=https://…`, `?email=a@b.com`) now get the differing SEGMENT position instead of its name."
26
+ },
27
+ {
28
+ "id": "F2",
29
+ "source": "behaviorFlips.summary",
30
+ "text": "NARROWING at construction (#961, P2): a request root may no longer carry a `#fragment` — `assertServableRequestRoot` and `joinRequestUrl` refuse it with a `displayUrlOf`-rendered message that names `#…` without its content; and joining an endpoint onto the root is a URL operation: the suffix joins the PATH, the query rides byte-preserved after it. WHO NEEDS IT: Azure-style gateways (`?api-version=`) whose requests previously went out as `…/v1?api-version=x/chat/completions`. WHO IS AFFECTED: a deployment whose `baseUrl` carried a fragment now fails loudly at construction instead of silently calling the root path."
31
+ }
32
+ ],
33
+ "closedSetMembers": [],
34
+ "closedSetsUnreadable": [],
35
+ "typeKeys": [],
36
+ "declarationMoves": [],
37
+ "mintMoves": [],
38
+ "criteriaObserves": [
39
+ {
40
+ "kind": "taskEventField",
41
+ "name": "tool_end.structured",
42
+ "assertions": [
43
+ "G3.a"
44
+ ]
45
+ },
46
+ {
47
+ "kind": "typeMember",
48
+ "name": "Checkpoint.version",
49
+ "assertions": [
50
+ "G4.a",
51
+ "G4.b"
52
+ ]
53
+ },
54
+ {
55
+ "kind": "typeMember",
56
+ "name": "Model.baseUrl",
57
+ "assertions": [
58
+ "G2.a",
59
+ "G2.b"
60
+ ]
61
+ },
62
+ {
63
+ "kind": "typeMember",
64
+ "name": "RouteRefusalDetail.requestBaseUrl",
65
+ "assertions": [
66
+ "G1.a",
67
+ "G1.b",
68
+ "G1.c"
69
+ ]
70
+ }
71
+ ],
72
+ "consumersHint": {
73
+ "cli": [],
74
+ "server": [],
75
+ "sdk": [],
76
+ "note": "scanned cli@9405bc53 server@5ad9cfda sdk@6fe2f08 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
77
+ },
78
+ "breakingCount": 0,
79
+ "breakingItems": [],
80
+ "toResolvedAt": "111dfebb7ef8517bbb3d2217dfb60277488a010d"
81
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "repo": "core",
3
+ "version": "7.24.3",
4
+ "from": "800729adecdc333ea7b87007593b24c96714f6e3",
5
+ "to": "v7.24.3",
6
+ "added": [
7
+ {
8
+ "name": "MCP_LIVENESS_STATES",
9
+ "kind": "variable",
10
+ "tier": "advanced",
11
+ "at": [
12
+ "src/core/mcp-failure.ts:96",
13
+ "src/index.ts:351"
14
+ ],
15
+ "criteriaCovered": false,
16
+ "breaking": false
17
+ },
18
+ {
19
+ "name": "McpLivenessState",
20
+ "kind": "type",
21
+ "tier": "advanced",
22
+ "at": [
23
+ "src/core/mcp-failure.ts:97",
24
+ "src/index.ts:351"
25
+ ],
26
+ "criteriaCovered": false,
27
+ "breaking": false
28
+ },
29
+ {
30
+ "name": "McpServerLiveness",
31
+ "kind": "interface",
32
+ "tier": "advanced",
33
+ "at": [
34
+ "src/core/mcp-failure.ts:111",
35
+ "src/index.ts:351"
36
+ ],
37
+ "criteriaCovered": false,
38
+ "breaking": false
39
+ }
40
+ ],
41
+ "removed": [],
42
+ "changed": [],
43
+ "narrowed": [],
44
+ "closedSetMembers": [
45
+ {
46
+ "set": "MCP_LIVENESS_STATES",
47
+ "at": [
48
+ "src/core/mcp-failure.ts:96"
49
+ ],
50
+ "newSet": true,
51
+ "added": [
52
+ "reachable",
53
+ "unknown",
54
+ "unreachable"
55
+ ],
56
+ "removed": [],
57
+ "breaking": false,
58
+ "criteriaCovered": false
59
+ },
60
+ {
61
+ "set": "McpExchangeOutcome",
62
+ "at": [
63
+ "src/core/mcp-failure.ts:150"
64
+ ],
65
+ "newSet": true,
66
+ "added": [
67
+ "completed",
68
+ "connect_refused",
69
+ "connection_closed",
70
+ "connection_failed",
71
+ "http_status",
72
+ "invalid_config",
73
+ "not_mcp_response",
74
+ "protocol",
75
+ "spawn_failed",
76
+ "timeout",
77
+ "unknown"
78
+ ],
79
+ "removed": [],
80
+ "breaking": false,
81
+ "criteriaCovered": false
82
+ },
83
+ {
84
+ "set": "McpLivenessState",
85
+ "at": [
86
+ "src/core/mcp-failure.ts:97",
87
+ "src/index.ts:351"
88
+ ],
89
+ "newSet": true,
90
+ "added": [
91
+ "reachable",
92
+ "unknown",
93
+ "unreachable"
94
+ ],
95
+ "removed": [],
96
+ "breaking": false,
97
+ "criteriaCovered": false
98
+ },
99
+ {
100
+ "set": "OptionValueKind",
101
+ "at": [
102
+ "src/tools/fs/bash-readonly-classifier.ts:1477"
103
+ ],
104
+ "newSet": true,
105
+ "added": [
106
+ "count",
107
+ "delimiter",
108
+ "form",
109
+ "header",
110
+ "indirect",
111
+ "label",
112
+ "name-pattern",
113
+ "path",
114
+ "pattern",
115
+ "script",
116
+ "url"
117
+ ],
118
+ "removed": [],
119
+ "breaking": false,
120
+ "criteriaCovered": false
121
+ },
122
+ {
123
+ "set": "READ_CANDIDATE_PROVENANCES",
124
+ "at": [
125
+ "src/tools/fs/shell-read-plan.ts:79"
126
+ ],
127
+ "newSet": true,
128
+ "added": [
129
+ "cd_target",
130
+ "env_assignment",
131
+ "operand",
132
+ "option_value",
133
+ "program_path",
134
+ "script_slot_file",
135
+ "stdin_redirect",
136
+ "traversal_root",
137
+ "unlisted_word",
138
+ "write_redirect_target"
139
+ ],
140
+ "removed": [],
141
+ "breaking": false,
142
+ "criteriaCovered": false
143
+ },
144
+ {
145
+ "set": "ReadCandidateProvenance",
146
+ "at": [
147
+ "src/tools/fs/shell-read-plan.ts:91"
148
+ ],
149
+ "newSet": true,
150
+ "added": [
151
+ "cd_target",
152
+ "env_assignment",
153
+ "operand",
154
+ "option_value",
155
+ "program_path",
156
+ "script_slot_file",
157
+ "stdin_redirect",
158
+ "traversal_root",
159
+ "unlisted_word",
160
+ "write_redirect_target"
161
+ ],
162
+ "removed": [],
163
+ "breaking": false,
164
+ "criteriaCovered": false
165
+ }
166
+ ],
167
+ "closedSetsUnreadable": [],
168
+ "typeKeys": [
169
+ {
170
+ "type": "McpServerStatus",
171
+ "at": [
172
+ "src/core/mcp.ts:394"
173
+ ],
174
+ "added": [
175
+ "liveness"
176
+ ],
177
+ "removed": [],
178
+ "breaking": false,
179
+ "criteriaCovered": false
180
+ },
181
+ {
182
+ "type": "WiringManifestMcpEntry",
183
+ "at": [
184
+ "src/core/wiring-manifest.ts:128"
185
+ ],
186
+ "added": [
187
+ "liveness"
188
+ ],
189
+ "removed": [],
190
+ "breaking": false,
191
+ "criteriaCovered": true
192
+ }
193
+ ],
194
+ "declarationMoves": [],
195
+ "mintMoves": [],
196
+ "criteriaObserves": [
197
+ {
198
+ "kind": "taskEventField",
199
+ "name": "tool_end.isError",
200
+ "assertions": [
201
+ "G3.a"
202
+ ]
203
+ },
204
+ {
205
+ "kind": "taskEventField",
206
+ "name": "wiring_manifest.manifest",
207
+ "assertions": [
208
+ "G1.b"
209
+ ]
210
+ },
211
+ {
212
+ "kind": "typeMember",
213
+ "name": "TaskSpec.sessionId",
214
+ "assertions": [
215
+ "G2.a"
216
+ ]
217
+ },
218
+ {
219
+ "kind": "typeMember",
220
+ "name": "WiringManifestMcpEntry.liveness",
221
+ "assertions": [
222
+ "G1.a"
223
+ ]
224
+ }
225
+ ],
226
+ "consumersHint": {
227
+ "cli": [
228
+ "McpServerStatus",
229
+ "WiringManifestMcpEntry"
230
+ ],
231
+ "server": [
232
+ "McpServerStatus",
233
+ "WiringManifestMcpEntry"
234
+ ],
235
+ "sdk": [
236
+ "McpServerStatus",
237
+ "WiringManifestMcpEntry"
238
+ ],
239
+ "note": "scanned cli@547c2c31 server@02807610 sdk@9b6bcaa — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
240
+ },
241
+ "breakingCount": 0,
242
+ "breakingItems": [],
243
+ "toResolvedAt": "aa2335b2f9223c8e838c8a496564058bdf972870"
244
+ }