@sema-agent/core 7.41.0 → 7.41.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## 7.41.1 — 2026-10-05
2
+
3
+ **Hard-breaking changes:** none. **Closed sets:** none added (two existing sets become reachable from the package root). **Package exports:** +5 / −0 — `SKILL_GRANT_ORIGINS`, `SKILL_ENTRY_INERT_REASONS`, types `SkillGrantOrigin`, `SkillEntryInertReason` (all defined in 7.41.0, re-exported now), and `mintNamespacePrefix` (#1355, defined since the namespace minting landed, re-exported now).
4
+
5
+ ### The two skill-grant vocabularies are on the package root (#1347; surface only; +4 exports) (@client-core @server)
6
+
7
+ - **Before (v7.41.0).** `SKILL_GRANT_ORIGINS` (`model` / `user` / `inherited`) and `SKILL_ENTRY_INERT_REASONS` (`wildcard_all` / `namespace_wildcard` / `path_pattern` / `domain` / `content_unsupported` / `grammar`) and their two types were declared in `dist/core/skill-grant.d.ts` and not re-exported from `index.d.ts`; the 7.41.0 ship post called them consumable closed sets because the wire manifest scans every `dist/` file, not the package root.
8
+ - **Now.** Both constants and both types are re-exported from the package root beside `RULE_TOOL_NAME_VERDICTS`; the consumer smoke probe asserts their presence.
9
+ - **Who is hurt.** Nobody: additive.
10
+ - **Consumers.** client-core — generate the two mirrors from the package root (CC-338). server — none.
11
+ - Pins: `test/export-surface.snapshot.json` (+4 names); `scripts/consumer-smoke-probe.mjs` (two new object entries, run by `gate:blackbox`).
12
+
13
+ ### The peer-segment minter is on the package root (#1355 part one; surface only; +1 export) (@server)
14
+
15
+ - **Before (v7.41.0).** A covering-form rule such as `mcp__github.com` (two segments, accepted since #1156) or `mcp__github.com__*` was compiled and stored as written, while the engine mints the peer segment normalized (character set, length clamp with a digest suffix, separator fold: `mcp__github_com__`). The rule's segment and the minted segment are compared byte for byte, so such a rule never matches — a deny that reads protective and is inert. Nothing on the package root let a rule writer ask "is this segment one the engine mints?".
16
+ - **Now.** `mintNamespacePrefix(ns, peer)` (src/core/protocol-naming.ts) is re-exported from the package root beside `PROTOCOL_TABLE` / `MCP_NAMESPACE` / `A2A_NAMESPACE`: a rule writer mints the prefix for the rule's peer and compares it with the rule's own spelling. Part two (7.42.0): `judgeRuleToolName` gains the verdict `unmintable_segment` with the minted spelling as `currentName`, and both rule compilers refuse through that one judge.
17
+ - **Who is hurt.** Nobody: additive.
18
+ - **Consumers.** server — S-1113: judge `permissions.deny` / `APPROVAL_DENY` covering-form rules at the door until the 7.42.0 verdict lands.
19
+ - Pins: `test/export-surface.snapshot.json` (+1 name); `scripts/consumer-smoke-probe.mjs` (one new function entry, run by `gate:blackbox`).
20
+
1
21
  ## 7.41.0 — 2026-10-04
2
22
 
3
23
  **Hard-breaking changes:** one — #1303. **#1303 — Before:** a skill that declared `allowed-tools` (or a host's `SkillSpec.manifest.allowTools`) narrowed the whole task once activated: every unlisted tool was refused (`allowPaths` fenced writes to directories), the listed ones still asked where they always asked, and activating it asked nobody. **#1303 — Who is hurt:** a deployment that relied on a skill's list to fence the model — an unlisted tool is now judged as usual (asked under an asking mode, run under `bypassPermissions` or a deployment allow) and a listed one runs without asking for the rest of the run; a host that hand-built `SkillSpec.manifest` (now refused by name: `config.spec_retired_key`) or wrote `allowPaths` (the write fence is gone), imported the deleted `SkillManifest` type or `skillScopeWriteToolNames`, passed the retired `deployedTools` option to `createSkillsFromDirectory` (refused: `config.deps_retired_key`) or matched on one of its three removed warning codes, or built an auto-promote record with `manifest` / `gate3Scoped` / `lineageId` or passed a manifest to `deriveTripwire`; an embedder with no approver under an asking mode (activating a skill that declares a list is now a card nobody answers — refused); a deployment policy that returns an unmarked `ask` (class `ordinary`) for a listed tool (the list clears it, as a stored allow rule would); a delegation tool that read `ctx.activeSkillScope()` (renamed `ctx.activeSkillGrants()`). **#1303 — Compensation:** fence tools with deny rules (a deployment deny list, a person's deny row) or a delegated agent definition's `allowTools`; fence write paths with session `allowDirs` / the write face (`createSessionRulePolicy`, the fs-write gate); mark a policy's question `mandated` / `requiresRealApproval` (or write an ask rule) when it must reach a person; with no approver, name `Skill` in an allow list or run `bypassPermissions`; move `manifest.allowTools` to `SkillSpec.allowedTools`; drop `deployedTools` (the loader copies every entry and the run's grant table reads it); give `deriveTripwire` the artifact's `{ allowedTools }` and drop `manifest` / `gate3Scoped` / `lineageId` from the promoted record. Everything else in this version adds, tightens or re-words: #1118 adds optional members and text lines; #1294 changes which hook seats fire for a call approved on a parked checkpoint (a PreToolUse seat now sees that call again on the resumed leg); #1307 / #1308 re-word request-time refusals of the file stores (no on-disk location in the sentence; the location rides the store's disclosure seat); #1309 turns a session's enumeration over its own damaged row from a short list into a refusal; #1310 and #1314 change model-facing text only; #1156 refuses a retired or prefix-less `__` tool name at the session-rules write (it used to fail every later run instead); #1328 refuses a resumed `Skill` call whose final arguments select another skill than the card named. **Closed sets:** `DecisionReason` +1 `skill`; `ASK_CLASSES` / `AskClass` +1 `requires_user_interaction` (`MODE_ARBITRATION` +1 row; `RELEASABLE_ASK_CLASSES` and `PERSISTED_RULE_MANDATES` unchanged); `ENGINE_NOTICE_CODES` +1 `skills.allowed_tool_not_granted` (audience `operator`, minter `engine`); trace kinds +1 `permission.skill_allowed`; config refusal codes +1 `config.user_invoked_skill_unknown`; `CheckpointErrorReason` +1 `skill_grants_damaged` and `CheckpointError.detail.field` +1 `boundGrantDigest` (both on the existing `checkpoint.invalid_outcome`); `SessionPolicyError.code` +1 `legacy_tool_name` (with `detail: { field, name, verdict, currentName? }`); new closed set `RULE_TOOL_NAME_VERDICTS` (`current` / `retired` / `unprefixed_namespace`). **Package exports:** +22 / −2 (the entry's count 2558 → 2578). Added — #1118: `readAgentState`, `agentStateSourceOfRecord`, `agentStateSummary`, types `AgentState`, `AgentApproval`, `AgentApprovalState`, `AgentStateRow`, `AgentStateSource`, `TranscriptStep`; #1303: types `SkillGrantRecord`, `SkillGrantHit`, `SkillGrantLane`, `SkillGateSeats`, `PermissionSeatInputs`, `PermissionSeatReading`; #1308: type `FileUsageWindowStoreOptions`; #1156: `judgeRuleToolName`, `RULE_TOOL_NAME_VERDICTS`, `assertSessionRuleNamesCurrent`, types `RuleToolNameVerdict`, `SessionPolicyStoreOptions`, `SessionRuleNameRefusal`. Removed — #1303: `SkillManifest`, `skillScopeWriteToolNames`. Members — new and optional: `TaskSpec.userInvokedSkills`, `SkillSpec.allowedTools` / `disallowedTools`, `CheckpointState.skillGrants`, the `tool_approval` pending action's `boundGrantDigest`, `ToolGateInput.requiresUserInteraction`, `UnifiedTaskOutput.agentState`, `AgentPollDetailsInput.agentState`, `ListAgentsRow.agentState`, `serveDurableAgentRowLane(row, agentState?)`, `checkpointSeat` on `AgentTranscriptToolOptions` / `ListAgentsToolOptions` / `TaskToolOptions` / `TaskPollOptions`, `TaskRegistry.agentStateSource` (new method), `FileUsageWindowStore`'s constructor options and `createFileTaskListStore`'s `onCorruptRead`, `mountedToolNames` on both session-rules stores (`FileStorageBackendOptions.sessionPolicy` forwards it), `loosenReasons`' third parameter; `AgentTranscriptToolOptions.registry` widens to `Pick<TaskRegistry, "getAccessibleTask"> & Partial<Pick<TaskRegistry, "agentStateSource">>` (a full `TaskRegistry` still fits). Removed (the hard-breaking change above): `SkillSpec.manifest` (a host still passing it is refused by name), `SkillsDirectoryOptions.deployedTools` (refused by name), three `SkillsDirectoryWarningCode` words (`allowed_tool_pattern_unsupported`, `allowed_tool_not_mounted`, `disallowed_tools_unenforced`), `PromotedRecord.manifest` / `gate3Scoped` / `lineageId`; `deriveTripwire`'s second parameter is `Pick<SkillSpec, "allowedTools">` (was `SkillManifest`).
package/dist/index.d.ts CHANGED
@@ -198,7 +198,9 @@ export { type AskOrigin, ASK_ORIGINS, isAskOrigin, ORIGIN_IMPLIES_REAL_APPROVAL,
198
198
  export { PERMISSION_MODES, type PermissionMode, isPermissionMode, PERMISSION_MODE_RANK, clampPermissionMode, ASK_CLASSES, type AskClass, isAskClass, MODE_ARBITRATION, type ModeArbitrationRow, RELEASABLE_ASK_CLASSES, MODE_RELEASE_REASONS, type ModeReleaseReason, isModeReleaseReason, RRA_EXPLAINERS, classifyAsk, foldArbitrationRow, type AskClassification, type AskClassFacts, type ToolMarkSource, arbitrateByMode, type Arbitration, fileCommandOptionsSentence } from "./core/ask-origin.js";
199
199
  export { modePolicyOf, type ModePolicy, PERMISSION_MODE_FOLD_REASONS, type PermissionModeFoldReason, type PermissionModeReceipt, ACCEPT_EDITS_FILE_COMMANDS, modeAcceptsFileCommand } from "./core/mode-policy.js";
200
200
  export type { PermissionSeatInputs, PermissionSeatReading } from "./core/mode-policy.js";
201
- export type { SkillGateSeats, SkillGrantHit, SkillGrantLane, SkillGrantRecord } from "./core/skill-grant.js";
201
+ export type { SkillEntryInertReason, SkillGateSeats, SkillGrantHit, SkillGrantLane, SkillGrantOrigin, SkillGrantRecord } from "./core/skill-grant.js";
202
+ export { SKILL_ENTRY_INERT_REASONS, SKILL_GRANT_ORIGINS } from "./core/skill-grant.js";
203
+ export { mintNamespacePrefix } from "./core/protocol-naming.js";
202
204
  export { readDenyClassifierRules, renderClassifierDenyRules, type DerivedDenyRule } from "./core/auto-mode-prompt.js";
203
205
  export { AUTO_MODE_DENY_SOURCES, isAutoModeDenySource, type AutoModeDenySource } from "./core/runtime-caps.js";
204
206
  export { SETTLEMENT_KINDS, type SettlementKind, isSettlementKind, type Settlement, SETTLEMENT_PARTIES, type SettlementParty, isSettlementParty, SETTLEMENT_IS_REFUSAL, DENIED_BY_VALUES, type DeniedBy, isDeniedBy, DENIED_BY_MAY_VETO, CLASSIFIER_DENY_CAUSES, type ClassifierDenyCause, isClassifierDenyCause, DENIED_BY_MAY_CARRY_CAUSE, type GateDisposition, type GateOutcome, type ModeRelease, type ModeRefusal, screenGateOutcome } from "./core/gate-outcome.js";
package/dist/index.js CHANGED
@@ -162,6 +162,8 @@ export {} from "./core/read-root-grant-screen.js";
162
162
  export { ASK_ORIGINS, isAskOrigin, ORIGIN_IMPLIES_REAL_APPROVAL, PERSISTED_RULE_MANDATES, isPersistedRuleMandate, screenAskClassMembers } from "./core/ask-origin.js";
163
163
  export { PERMISSION_MODES, isPermissionMode, PERMISSION_MODE_RANK, clampPermissionMode, ASK_CLASSES, isAskClass, MODE_ARBITRATION, RELEASABLE_ASK_CLASSES, MODE_RELEASE_REASONS, isModeReleaseReason, RRA_EXPLAINERS, classifyAsk, foldArbitrationRow, arbitrateByMode, fileCommandOptionsSentence } from "./core/ask-origin.js";
164
164
  export { modePolicyOf, PERMISSION_MODE_FOLD_REASONS, ACCEPT_EDITS_FILE_COMMANDS, modeAcceptsFileCommand } from "./core/mode-policy.js";
165
+ export { SKILL_ENTRY_INERT_REASONS, SKILL_GRANT_ORIGINS } from "./core/skill-grant.js";
166
+ export { mintNamespacePrefix } from "./core/protocol-naming.js";
165
167
  export { readDenyClassifierRules, renderClassifierDenyRules } from "./core/auto-mode-prompt.js";
166
168
  export { AUTO_MODE_DENY_SOURCES, isAutoModeDenySource } from "./core/runtime-caps.js";
167
169
  export { SETTLEMENT_KINDS, isSettlementKind, SETTLEMENT_PARTIES, isSettlementParty, SETTLEMENT_IS_REFUSAL, DENIED_BY_VALUES, isDeniedBy, DENIED_BY_MAY_VETO, CLASSIFIER_DENY_CAUSES, isClassifierDenyCause, DENIED_BY_MAY_CARRY_CAUSE, screenGateOutcome } from "./core/gate-outcome.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/core",
3
- "version": "7.41.0",
3
+ "version": "7.41.1",
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": 2578,
4
+ "count": 2583,
5
5
  "exports": {
6
6
  "A2ATaskState": "type",
7
7
  "A2ATaskStateReversal": "type",
@@ -1337,6 +1337,8 @@
1337
1337
  "SHELL_READ_FINDING_RANK": "variable",
1338
1338
  "SHELL_READ_SEATS": "variable",
1339
1339
  "SHELL_WRAPPER_TABLE": "variable",
1340
+ "SKILL_ENTRY_INERT_REASONS": "variable",
1341
+ "SKILL_GRANT_ORIGINS": "variable",
1340
1342
  "SKILL_TOOL_NAME": "variable",
1341
1343
  "STALE_RUNNING_REAP_ATTRIBUTION": "variable",
1342
1344
  "STARTER_RULES": "variable",
@@ -1448,9 +1450,11 @@
1448
1450
  "SideQueryResult": "interface",
1449
1451
  "SideQuerySpec": "interface",
1450
1452
  "SideQueryToolDef": "interface",
1453
+ "SkillEntryInertReason": "type",
1451
1454
  "SkillGateSeats": "interface",
1452
1455
  "SkillGrantHit": "interface",
1453
1456
  "SkillGrantLane": "interface",
1457
+ "SkillGrantOrigin": "type",
1454
1458
  "SkillGrantRecord": "interface",
1455
1459
  "SkillSpec": "interface",
1456
1460
  "SkillsDirectoryOptions": "interface",
@@ -2228,6 +2232,7 @@
2228
2232
  "mintCheckpointToken": "function",
2229
2233
  "mintExposurePartitionedPlan": "function",
2230
2234
  "mintLlmConsolidationPlan": "function",
2235
+ "mintNamespacePrefix": "function",
2231
2236
  "mintPeerRef": "function",
2232
2237
  "mintPeerSessionCandidates": "function",
2233
2238
  "mintReminderMark": "function",
@@ -3917,6 +3922,8 @@
3917
3922
  "SHELL_READ_FINDING_RANK": "advanced",
3918
3923
  "SHELL_READ_SEATS": "advanced",
3919
3924
  "SHELL_WRAPPER_TABLE": "advanced",
3925
+ "SKILL_ENTRY_INERT_REASONS": "advanced",
3926
+ "SKILL_GRANT_ORIGINS": "advanced",
3920
3927
  "SKILL_TOOL_NAME": "internal",
3921
3928
  "STALE_RUNNING_REAP_ATTRIBUTION": "advanced",
3922
3929
  "STARTER_RULES": "advanced",
@@ -4028,9 +4035,11 @@
4028
4035
  "SideQueryResult": "advanced",
4029
4036
  "SideQuerySpec": "advanced",
4030
4037
  "SideQueryToolDef": "advanced",
4038
+ "SkillEntryInertReason": "advanced",
4031
4039
  "SkillGateSeats": "advanced",
4032
4040
  "SkillGrantHit": "advanced",
4033
4041
  "SkillGrantLane": "advanced",
4042
+ "SkillGrantOrigin": "advanced",
4034
4043
  "SkillGrantRecord": "advanced",
4035
4044
  "SkillSpec": "stable",
4036
4045
  "SkillsDirectoryOptions": "advanced",
@@ -4808,6 +4817,7 @@
4808
4817
  "mintCheckpointToken": "advanced",
4809
4818
  "mintExposurePartitionedPlan": "advanced",
4810
4819
  "mintLlmConsolidationPlan": "advanced",
4820
+ "mintNamespacePrefix": "advanced",
4811
4821
  "mintPeerRef": "advanced",
4812
4822
  "mintPeerSessionCandidates": "advanced",
4813
4823
  "mintReminderMark": "advanced",
@@ -0,0 +1,159 @@
1
+ {
2
+ "repo": "core",
3
+ "version": "7.41.1",
4
+ "from": "e91ad31a94f1ea1688241d5bb9e5e278986f3d23",
5
+ "to": "08eee448c5a848592a8c12684867cd423eac5d95",
6
+ "added": [
7
+ {
8
+ "name": "SKILL_ENTRY_INERT_REASONS",
9
+ "kind": "variable",
10
+ "tier": "advanced",
11
+ "at": [
12
+ "src/core/skill-grant.ts:65",
13
+ "src/index.ts:1470"
14
+ ],
15
+ "criteriaCovered": false,
16
+ "breaking": false
17
+ },
18
+ {
19
+ "name": "SKILL_GRANT_ORIGINS",
20
+ "kind": "variable",
21
+ "tier": "advanced",
22
+ "at": [
23
+ "src/core/skill-grant.ts:46",
24
+ "src/index.ts:1470"
25
+ ],
26
+ "criteriaCovered": false,
27
+ "breaking": false
28
+ },
29
+ {
30
+ "name": "SkillEntryInertReason",
31
+ "kind": "type",
32
+ "tier": "advanced",
33
+ "at": [
34
+ "src/core/skill-grant.ts:66",
35
+ "src/index.ts:1469"
36
+ ],
37
+ "criteriaCovered": false,
38
+ "breaking": false
39
+ },
40
+ {
41
+ "name": "SkillGrantOrigin",
42
+ "kind": "type",
43
+ "tier": "advanced",
44
+ "at": [
45
+ "src/core/skill-grant.ts:47",
46
+ "src/index.ts:1469"
47
+ ],
48
+ "criteriaCovered": false,
49
+ "breaking": false
50
+ },
51
+ {
52
+ "name": "mintNamespacePrefix",
53
+ "kind": "function",
54
+ "tier": "advanced",
55
+ "at": [
56
+ "src/core/protocol-naming.ts:114",
57
+ "src/index.ts:1471"
58
+ ],
59
+ "criteriaCovered": false,
60
+ "breaking": false
61
+ }
62
+ ],
63
+ "removed": [],
64
+ "changed": [],
65
+ "narrowed": [],
66
+ "closedSetMembers": [],
67
+ "closedSetsUnreadable": [],
68
+ "typeKeys": [],
69
+ "typeKeysUnreadableArms": [],
70
+ "typeKeysFlattenedCount": 225,
71
+ "signatures": [],
72
+ "declarationMoves": [
73
+ {
74
+ "name": "SKILL_ENTRY_INERT_REASONS",
75
+ "kind": "variable",
76
+ "onSurface": true,
77
+ "from": [
78
+ "src/core/skill-grant.ts"
79
+ ],
80
+ "to": [
81
+ "src/core/skill-grant.ts",
82
+ "src/index.ts"
83
+ ]
84
+ },
85
+ {
86
+ "name": "SKILL_GRANT_ORIGINS",
87
+ "kind": "variable",
88
+ "onSurface": true,
89
+ "from": [
90
+ "src/core/skill-grant.ts"
91
+ ],
92
+ "to": [
93
+ "src/core/skill-grant.ts",
94
+ "src/index.ts"
95
+ ]
96
+ },
97
+ {
98
+ "name": "SkillEntryInertReason",
99
+ "kind": "type",
100
+ "onSurface": true,
101
+ "from": [
102
+ "src/core/skill-grant.ts"
103
+ ],
104
+ "to": [
105
+ "src/core/skill-grant.ts",
106
+ "src/index.ts"
107
+ ]
108
+ },
109
+ {
110
+ "name": "SkillGrantOrigin",
111
+ "kind": "type",
112
+ "onSurface": true,
113
+ "from": [
114
+ "src/core/skill-grant.ts"
115
+ ],
116
+ "to": [
117
+ "src/core/skill-grant.ts",
118
+ "src/index.ts"
119
+ ]
120
+ },
121
+ {
122
+ "name": "mintNamespacePrefix",
123
+ "kind": "function",
124
+ "onSurface": true,
125
+ "from": [
126
+ "src/core/protocol-naming.ts"
127
+ ],
128
+ "to": [
129
+ "src/core/protocol-naming.ts",
130
+ "src/index.ts"
131
+ ]
132
+ }
133
+ ],
134
+ "mintMoves": [],
135
+ "criteriaObserves": [
136
+ {
137
+ "kind": "typeMember",
138
+ "name": "ProtocolNamespace.makeName",
139
+ "assertions": [
140
+ "G1.b"
141
+ ]
142
+ },
143
+ {
144
+ "kind": "typeMember",
145
+ "name": "ProtocolNamespace.prefix",
146
+ "assertions": [
147
+ "G1.a"
148
+ ]
149
+ }
150
+ ],
151
+ "consumersHint": {
152
+ "cli": [],
153
+ "server": [],
154
+ "sdk": [],
155
+ "note": "scanned cli@e790a1ca server@4160110a sdk@ee3b981 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
156
+ },
157
+ "breakingCount": 0,
158
+ "breakingItems": []
159
+ }