@sema-agent/core 7.24.0 → 7.24.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 +7 -0
- package/dist/core/model-seat.d.ts +4 -1
- package/dist/core/model-seat.js +1 -1
- package/dist/core/roles.d.ts +1 -0
- package/dist/core/roles.js +1 -0
- package/dist/core/types.d.ts +1 -0
- package/dist/core/types.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/test/export-surface.snapshot.json +3 -1
- package/wire-changes/core@7.24.1.json +85 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 7.24.1 — 2026-09-19
|
|
4
|
+
|
|
5
|
+
### The model-role vocabulary ships its runtime twin (#965; P3; additive export `MODEL_ROLES`; @server @client-core)
|
|
6
|
+
- **Before.** `ModelRole` was a nine-word string-literal union with no runtime value beside it, so every consumer that needed the members at runtime transcribed them by hand — server's settings-schema parity test carries its own `CORE_MODEL_ROLES` nine-word mirror, and a settings schema that wants to validate a role name has nothing to import.
|
|
7
|
+
- **After.** `MODEL_ROLES` (`as const`, declaration order `default … consolidate`) is the source; `ModelRole` derives from it; both ride the root export. Nine words spelled once. `advisor` is in the tuple (it has always been in the type); a downstream schema that omits it is a downstream choice, now visible as a set difference instead of a transcription slip.
|
|
8
|
+
- **Reach.** Additive export (+1, tier advanced); no wire key; no behaviour change. `test/backlog965-model-roles-tuple.test.ts` pins the tuple, its uniqueness and the type derivation (a hand-written union that drops a word fails at `tsc`).
|
|
9
|
+
|
|
3
10
|
## 7.24.0 — 2026-09-19
|
|
4
11
|
|
|
5
12
|
### The stream engine's last two `instanceof BrainError` reads (#935, follow-on; P2; no wire key)
|
|
@@ -36,7 +36,10 @@ export type ModelRef = string | Model;
|
|
|
36
36
|
* this role wants (note the summarize DEFAULT rationale — prompt-cache forking — does not
|
|
37
37
|
* apply here: consolidation is an offline independent request with no shared prefix).
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
39
|
+
export declare const MODEL_ROLES: readonly ["default", "summarize", "subagent", "team", "synthesize", "advisor", "verifier", "classifier", "consolidate"];
|
|
40
|
+
/** The role vocabulary, derived from {@link MODEL_ROLES} — one source; a consumer that needs the members at
|
|
41
|
+
* runtime (a settings schema, a parity pin, a doctor line) reads the tuple instead of transcribing it. */
|
|
42
|
+
export type ModelRole = (typeof MODEL_ROLES)[number];
|
|
40
43
|
/**
|
|
41
44
|
* A role's model: a `ModelRef`, or a config object that pins a `model`, **selects** one by
|
|
42
45
|
* capability/price (`select`, design/11 Layer 2), and/or sets a default `thinking` level.
|
package/dist/core/model-seat.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const MODEL_ROLES = ["default", "summarize", "subagent", "team", "synthesize", "advisor", "verifier", "classifier", "consolidate"];
|
package/dist/core/roles.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ThinkingLevel } from "../internal/harness-types.js";
|
|
|
2
2
|
import type { Model } from "../internal/llm.js";
|
|
3
3
|
import type { ModelRef, ModelRole, ModelRoles, RoleSpec } from "./types.js";
|
|
4
4
|
export type { ModelRole, RoleSpec, ModelRoles } from "./types.js";
|
|
5
|
+
export { MODEL_ROLES } from "./types.js";
|
|
5
6
|
/** Resolve a string ModelRef against the catalog (a Model object passes through). */
|
|
6
7
|
export declare function resolveModel(ref: ModelRef, models?: Record<string, Model>): Model;
|
|
7
8
|
/** 档位降档链(强→弱)。解析某档无绑定时沿链向后找第一个有绑定的档(fail-open 可用性优先;绑定缺口
|
package/dist/core/roles.js
CHANGED
package/dist/core/types.d.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import type { AgentTool, ThinkingLevel, ToolInputValidationContext, ToolInputVerdict } from "../internal/harness.js";
|
|
13
13
|
import type { Model, StreamFn } from "../internal/llm.js";
|
|
14
14
|
export type { ModelRef, ModelRole, RoleSpec, ModelRoles, Brain } from "./model-seat.js";
|
|
15
|
+
export { MODEL_ROLES } from "./model-seat.js";
|
|
15
16
|
export type { StaleToolResultOffloadOptions, ImageInput, TaskSpec, ShellGateDoctrine } from "./task-spec.js";
|
|
16
17
|
export type { ToolEffect, ToolContentOrigin, ReversibilityVerdict, ReadRootGrantCandidate, ToolSpec, ToolReturn, NestedUsage, NestedUsageAccum, ToolExecuteContext } from "./tool-spec.js";
|
|
17
18
|
export type { BeforeWriteRequest, BeforeWriteResult, BeforeWriteHook, TrackEditRequest, TrackEditResult, TrackFileEditHook, FileEditedNotice, FileEditedHook, HandsBandOptions } from "./hands-band.js";
|
package/dist/core/types.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { MODEL_ROLES } from "./model-seat.js";
|
|
1
2
|
export { AUTO_MODE_DENY_SOURCES, isAutoModeDenySource } from "./runtime-caps.js";
|
|
2
3
|
export { __resetMalformedDelegationSeatAnnouncement, deliverDelegationLifecycle } from "./delegation-frames.js";
|
|
3
4
|
export { __resetMalformedNoticeSeatAnnouncement, deliverEngineNotice, owedUserInputCounts, settleOwedUserInput, undrainedUserInputNotices } from "./engine-notice.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export { LspDiagnosticsRegistry, formatDiagnosticsBlock, formatDiagnosticsSummar
|
|
|
40
40
|
export { NodeLspManager, DEFAULT_LSP_SERVERS, languageFor, defaultLspSpawn, type NodeLspManagerOptions, type LspSpawn, } from "./engine/lsp/node-lsp-manager.js";
|
|
41
41
|
export { StdioLspTransport, type LspChildProcess } from "./engine/lsp/stdio-lsp-transport.js";
|
|
42
42
|
export { encodeFrame, createFrameDecoder } from "./engine/lsp/frame-decoder.js";
|
|
43
|
-
export { resolveModel, resolveTaskModel, parseModelMention, expandTiers, DEFAULT_TIER_ORDER, CC_MODEL_TIER_ALIASES, ROLE_TIER_DEFAULTS, type ModelRole, type RoleSpec, type ModelRoles, type ResolvedRole, type ModelMention, } from "./core/roles.js";
|
|
43
|
+
export { resolveModel, resolveTaskModel, parseModelMention, expandTiers, DEFAULT_TIER_ORDER, CC_MODEL_TIER_ALIASES, ROLE_TIER_DEFAULTS, MODEL_ROLES, type ModelRole, type RoleSpec, type ModelRoles, type ResolvedRole, type ModelMention, } from "./core/roles.js";
|
|
44
44
|
export { selectModel, selectModelOrThrow, type ModelCriteria, type ModelTier } from "./core/select-model.js";
|
|
45
45
|
export { BrainError, classifyHttp, type BrainErrorCode } from "./brain/errors.js";
|
|
46
46
|
export { looksDegenerate, inspectDegenerate, trimDegenerateTail } from "./brain/repetition.js";
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ export { LspDiagnosticsRegistry, formatDiagnosticsBlock, formatDiagnosticsSummar
|
|
|
27
27
|
export { NodeLspManager, DEFAULT_LSP_SERVERS, languageFor, defaultLspSpawn, } from "./engine/lsp/node-lsp-manager.js";
|
|
28
28
|
export { StdioLspTransport } from "./engine/lsp/stdio-lsp-transport.js";
|
|
29
29
|
export { encodeFrame, createFrameDecoder } from "./engine/lsp/frame-decoder.js";
|
|
30
|
-
export { resolveModel, resolveTaskModel, parseModelMention, expandTiers, DEFAULT_TIER_ORDER, CC_MODEL_TIER_ALIASES, ROLE_TIER_DEFAULTS, } from "./core/roles.js";
|
|
30
|
+
export { resolveModel, resolveTaskModel, parseModelMention, expandTiers, DEFAULT_TIER_ORDER, CC_MODEL_TIER_ALIASES, ROLE_TIER_DEFAULTS, MODEL_ROLES, } from "./core/roles.js";
|
|
31
31
|
export { selectModel, selectModelOrThrow } from "./core/select-model.js";
|
|
32
32
|
export { BrainError, classifyHttp } from "./brain/errors.js";
|
|
33
33
|
export { looksDegenerate, inspectDegenerate, trimDegenerateTail } from "./brain/repetition.js";
|
package/package.json
CHANGED
|
@@ -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":
|
|
4
|
+
"count": 2398,
|
|
5
5
|
"exports": {
|
|
6
6
|
"A2ATaskState": "type",
|
|
7
7
|
"A2ATaskStateReversal": "type",
|
|
@@ -679,6 +679,7 @@
|
|
|
679
679
|
"MEMORY_SAFETY": "variable",
|
|
680
680
|
"MEMORY_SEARCH_SUPERSEDED_TAG": "variable",
|
|
681
681
|
"MEMORY_SEARCH_TOOL_NAME": "variable",
|
|
682
|
+
"MODEL_ROLES": "variable",
|
|
682
683
|
"MONITOR_BATCH_WINDOW_MS": "variable",
|
|
683
684
|
"MONITOR_DEFAULT_TIMEOUT_MS": "variable",
|
|
684
685
|
"MONITOR_MAX_BATCHES_PER_MINUTE": "variable",
|
|
@@ -3078,6 +3079,7 @@
|
|
|
3078
3079
|
"MEMORY_SAFETY": "advanced",
|
|
3079
3080
|
"MEMORY_SEARCH_SUPERSEDED_TAG": "advanced",
|
|
3080
3081
|
"MEMORY_SEARCH_TOOL_NAME": "advanced",
|
|
3082
|
+
"MODEL_ROLES": "advanced",
|
|
3081
3083
|
"MONITOR_BATCH_WINDOW_MS": "advanced",
|
|
3082
3084
|
"MONITOR_DEFAULT_TIMEOUT_MS": "advanced",
|
|
3083
3085
|
"MONITOR_MAX_BATCHES_PER_MINUTE": "advanced",
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "core",
|
|
3
|
+
"version": "7.24.1",
|
|
4
|
+
"from": "f87928e73c4b748d4e8de91f591cb08c659a2c69",
|
|
5
|
+
"to": "v7.24.1",
|
|
6
|
+
"added": [
|
|
7
|
+
{
|
|
8
|
+
"name": "MODEL_ROLES",
|
|
9
|
+
"kind": "variable",
|
|
10
|
+
"tier": "advanced",
|
|
11
|
+
"at": [
|
|
12
|
+
"src/core/model-seat.ts:41",
|
|
13
|
+
"src/core/roles.ts:7",
|
|
14
|
+
"src/core/types.ts:21",
|
|
15
|
+
"src/index.ts:242"
|
|
16
|
+
],
|
|
17
|
+
"criteriaCovered": false,
|
|
18
|
+
"breaking": false
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"removed": [],
|
|
22
|
+
"changed": [],
|
|
23
|
+
"narrowed": [],
|
|
24
|
+
"closedSetMembers": [
|
|
25
|
+
{
|
|
26
|
+
"set": "MODEL_ROLES",
|
|
27
|
+
"at": [
|
|
28
|
+
"src/core/model-seat.ts:41"
|
|
29
|
+
],
|
|
30
|
+
"newSet": true,
|
|
31
|
+
"added": [
|
|
32
|
+
"advisor",
|
|
33
|
+
"classifier",
|
|
34
|
+
"consolidate",
|
|
35
|
+
"default",
|
|
36
|
+
"subagent",
|
|
37
|
+
"summarize",
|
|
38
|
+
"synthesize",
|
|
39
|
+
"team",
|
|
40
|
+
"verifier"
|
|
41
|
+
],
|
|
42
|
+
"removed": [],
|
|
43
|
+
"breaking": false,
|
|
44
|
+
"criteriaCovered": false
|
|
45
|
+
}
|
|
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
|
+
],
|
|
62
|
+
"typeKeys": [],
|
|
63
|
+
"declarationMoves": [],
|
|
64
|
+
"mintMoves": [],
|
|
65
|
+
"criteriaObserves": [
|
|
66
|
+
{
|
|
67
|
+
"kind": "typeMember",
|
|
68
|
+
"name": "RunnerDeps.roles",
|
|
69
|
+
"assertions": [
|
|
70
|
+
"G1.a"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"consumersHint": {
|
|
75
|
+
"cli": [
|
|
76
|
+
"MODEL_ROLES"
|
|
77
|
+
],
|
|
78
|
+
"server": [],
|
|
79
|
+
"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"
|
|
81
|
+
},
|
|
82
|
+
"breakingCount": 0,
|
|
83
|
+
"breakingItems": [],
|
|
84
|
+
"toResolvedAt": "d552b285c747d987758c66504ec8cba98fab04de"
|
|
85
|
+
}
|