specrails-core 5.3.0 → 5.5.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.
- package/README.md +2 -0
- package/dist/agent-runtime/capabilities.d.ts +28 -0
- package/dist/agent-runtime/capabilities.js +81 -0
- package/dist/agent-runtime/capabilities.js.map +1 -0
- package/dist/agent-runtime/cli-executor.d.ts +9 -0
- package/dist/agent-runtime/cli-executor.js +109 -34
- package/dist/agent-runtime/cli-executor.js.map +1 -1
- package/dist/agent-runtime/cli-process.d.ts +1 -0
- package/dist/agent-runtime/cli-process.js +13 -2
- package/dist/agent-runtime/cli-process.js.map +1 -1
- package/dist/agent-runtime/cli.d.ts +1 -0
- package/dist/agent-runtime/cli.js +60 -11
- package/dist/agent-runtime/cli.js.map +1 -1
- package/dist/agent-runtime/codex-schema.d.ts +4 -0
- package/dist/agent-runtime/codex-schema.js +31 -0
- package/dist/agent-runtime/codex-schema.js.map +1 -0
- package/dist/agent-runtime/compact/architect.d.ts +349 -0
- package/dist/agent-runtime/compact/architect.js +371 -0
- package/dist/agent-runtime/compact/architect.js.map +1 -0
- package/dist/agent-runtime/compact/chat-client.d.ts +83 -0
- package/dist/agent-runtime/compact/chat-client.js +307 -0
- package/dist/agent-runtime/compact/chat-client.js.map +1 -0
- package/dist/agent-runtime/compact/developer.d.ts +160 -0
- package/dist/agent-runtime/compact/developer.js +823 -0
- package/dist/agent-runtime/compact/developer.js.map +1 -0
- package/dist/agent-runtime/compact/environment.d.ts +62 -0
- package/dist/agent-runtime/compact/environment.js +213 -0
- package/dist/agent-runtime/compact/environment.js.map +1 -0
- package/dist/agent-runtime/compact/exit-code-honesty.d.ts +8 -0
- package/dist/agent-runtime/compact/exit-code-honesty.js +28 -0
- package/dist/agent-runtime/compact/exit-code-honesty.js.map +1 -0
- package/dist/agent-runtime/compact/guarded-loop.d.ts +73 -0
- package/dist/agent-runtime/compact/guarded-loop.js +320 -0
- package/dist/agent-runtime/compact/guarded-loop.js.map +1 -0
- package/dist/agent-runtime/compact/prompt-inputs.d.ts +42 -0
- package/dist/agent-runtime/compact/prompt-inputs.js +59 -0
- package/dist/agent-runtime/compact/prompt-inputs.js.map +1 -0
- package/dist/agent-runtime/compact/reviewer.d.ts +24 -0
- package/dist/agent-runtime/compact/reviewer.js +178 -0
- package/dist/agent-runtime/compact/reviewer.js.map +1 -0
- package/dist/agent-runtime/compact/step.d.ts +70 -0
- package/dist/agent-runtime/compact/step.js +136 -0
- package/dist/agent-runtime/compact/step.js.map +1 -0
- package/dist/agent-runtime/compact/test-reachability.d.ts +30 -0
- package/dist/agent-runtime/compact/test-reachability.js +147 -0
- package/dist/agent-runtime/compact/test-reachability.js.map +1 -0
- package/dist/agent-runtime/config.d.ts +4 -0
- package/dist/agent-runtime/config.js +146 -15
- package/dist/agent-runtime/config.js.map +1 -1
- package/dist/agent-runtime/core-host.d.ts +12 -4
- package/dist/agent-runtime/core-host.js +61 -21
- package/dist/agent-runtime/core-host.js.map +1 -1
- package/dist/agent-runtime/efficiency-summary.d.ts +67 -0
- package/dist/agent-runtime/efficiency-summary.js +52 -0
- package/dist/agent-runtime/efficiency-summary.js.map +1 -0
- package/dist/agent-runtime/efficiency-types.d.ts +60 -0
- package/dist/agent-runtime/efficiency-types.js +8 -0
- package/dist/agent-runtime/efficiency-types.js.map +1 -0
- package/dist/agent-runtime/efficiency.d.ts +5 -0
- package/dist/agent-runtime/efficiency.js +35 -0
- package/dist/agent-runtime/efficiency.js.map +1 -0
- package/dist/agent-runtime/evaluation-corpus.d.ts +13 -0
- package/dist/agent-runtime/evaluation-corpus.js +8 -0
- package/dist/agent-runtime/evaluation-corpus.js.map +1 -0
- package/dist/agent-runtime/evaluation.d.ts +43 -0
- package/dist/agent-runtime/evaluation.js +171 -0
- package/dist/agent-runtime/evaluation.js.map +1 -0
- package/dist/agent-runtime/executor-types.d.ts +71 -4
- package/dist/agent-runtime/executor-types.js +7 -2
- package/dist/agent-runtime/executor-types.js.map +1 -1
- package/dist/agent-runtime/executors.d.ts +1 -0
- package/dist/agent-runtime/executors.js +4 -0
- package/dist/agent-runtime/executors.js.map +1 -1
- package/dist/agent-runtime/graph/artifacts.d.ts +8 -22
- package/dist/agent-runtime/graph/artifacts.js +99 -73
- package/dist/agent-runtime/graph/artifacts.js.map +1 -1
- package/dist/agent-runtime/graph/nodes.d.ts +7 -2
- package/dist/agent-runtime/graph/nodes.js +207 -53
- package/dist/agent-runtime/graph/nodes.js.map +1 -1
- package/dist/agent-runtime/graph/roles.d.ts +11 -3
- package/dist/agent-runtime/graph/roles.js +109 -37
- package/dist/agent-runtime/graph/roles.js.map +1 -1
- package/dist/agent-runtime/graph/state.d.ts +10 -1
- package/dist/agent-runtime/graph/state.js +2 -1
- package/dist/agent-runtime/graph/state.js.map +1 -1
- package/dist/agent-runtime/guardrails.d.ts +15 -0
- package/dist/agent-runtime/guardrails.js +76 -0
- package/dist/agent-runtime/guardrails.js.map +1 -0
- package/dist/agent-runtime/index.d.ts +7 -1
- package/dist/agent-runtime/index.js +7 -1
- package/dist/agent-runtime/index.js.map +1 -1
- package/dist/agent-runtime/kimi-acp.d.ts +4 -0
- package/dist/agent-runtime/kimi-acp.js +20 -9
- package/dist/agent-runtime/kimi-acp.js.map +1 -1
- package/dist/agent-runtime/openai-executor.d.ts +33 -1
- package/dist/agent-runtime/openai-executor.js +76 -113
- package/dist/agent-runtime/openai-executor.js.map +1 -1
- package/dist/agent-runtime/openspec-tool-server.d.ts +1 -0
- package/dist/agent-runtime/openspec-tool-server.js +37 -0
- package/dist/agent-runtime/openspec-tool-server.js.map +1 -0
- package/dist/agent-runtime/openspec.d.ts +198 -0
- package/dist/agent-runtime/openspec.js +329 -0
- package/dist/agent-runtime/openspec.js.map +1 -0
- package/dist/agent-runtime/prompts.d.ts +24 -1
- package/dist/agent-runtime/prompts.js +112 -43
- package/dist/agent-runtime/prompts.js.map +1 -1
- package/dist/agent-runtime/provider-diagnostic.d.ts +2 -0
- package/dist/agent-runtime/provider-diagnostic.js +25 -0
- package/dist/agent-runtime/provider-diagnostic.js.map +1 -0
- package/dist/agent-runtime/repository-context.d.ts +25 -0
- package/dist/agent-runtime/repository-context.js +127 -0
- package/dist/agent-runtime/repository-context.js.map +1 -0
- package/dist/agent-runtime/review-context.d.ts +14 -0
- package/dist/agent-runtime/review-context.js +41 -0
- package/dist/agent-runtime/review-context.js.map +1 -0
- package/dist/agent-runtime/role-routing.d.ts +10 -0
- package/dist/agent-runtime/role-routing.js +30 -0
- package/dist/agent-runtime/role-routing.js.map +1 -0
- package/dist/agent-runtime/role-state.d.ts +19 -0
- package/dist/agent-runtime/role-state.js +24 -0
- package/dist/agent-runtime/role-state.js.map +1 -0
- package/dist/agent-runtime/runtime-identity.d.ts +11 -0
- package/dist/agent-runtime/runtime-identity.js +33 -0
- package/dist/agent-runtime/runtime-identity.js.map +1 -0
- package/dist/agent-runtime/tool-event.d.ts +3 -0
- package/dist/agent-runtime/tool-event.js +24 -0
- package/dist/agent-runtime/tool-event.js.map +1 -0
- package/dist/agent-runtime/verification-plan.d.ts +55 -0
- package/dist/agent-runtime/verification-plan.js +206 -0
- package/dist/agent-runtime/verification-plan.js.map +1 -0
- package/dist/agent-runtime/workflow-types.d.ts +19 -1
- package/dist/agent-runtime/workflow.js +29 -2
- package/dist/agent-runtime/workflow.js.map +1 -1
- package/dist/agent-runtime/workspace-tools.d.ts +4 -0
- package/dist/agent-runtime/workspace-tools.js +182 -20
- package/dist/agent-runtime/workspace-tools.js.map +1 -1
- package/dist/installer/phases/scaffold.js +39 -109
- package/dist/installer/phases/scaffold.js.map +1 -1
- package/dist/installer/runtime/pipeline-state.d.ts +143 -1
- package/dist/installer/runtime/pipeline-state.js +510 -30
- package/dist/installer/runtime/pipeline-state.js.map +1 -1
- package/docs/agent-runtime-efficiency.md +65 -0
- package/docs/agent-runtime.md +86 -15
- package/integration-contract.json +2 -1
- package/package.json +5 -2
- package/schemas/agent-runtime.schema.json +34 -4
- package/schemas/fixtures/runtime-efficiency-summary.v1.json +790 -0
- package/templates/codex-skills/batch-implement/SKILL.md +33 -58
- package/templates/codex-skills/implement/SKILL.md +21 -124
- package/templates/codex-skills/retry/SKILL.md +8 -34
- package/templates/commands/specrails/batch-implement.md +21 -16
- package/templates/commands/specrails/implement.md +17 -276
- package/templates/commands/specrails/retry.md +6 -34
- package/templates/gemini-commands/batch-implement.toml +34 -28
- package/templates/gemini-commands/implement.toml +34 -55
- package/templates/gemini-commands/retry.toml +10 -16
|
@@ -319,7 +319,8 @@
|
|
|
319
319
|
"verificationPolicy": "Configured commands are optional. The architect proposes commands for repositories without one; repositories with no automated check are admitted and recorded in the receipt as unverifiedRepositories. Unchecked tasks return to the developer as feedback instead of failing the run.",
|
|
320
320
|
"sessionReuse": "Developer correction passes resume the previous provider session (claude --resume, codex exec resume, gemini --resume, kimi --session) with a short correction prompt; an unavailable session falls back to a fresh full turn. Structured roles get one repair turn in-session when their JSON is unusable.",
|
|
321
321
|
"structuredOutput": "Claude receives --json-schema and Codex --output-schema for architect/reviewer replies; other providers are parsed leniently.",
|
|
322
|
-
"resumeBudget": "An explicit resume resets the transition ceiling and grants the developer a fresh maxAttempts budget."
|
|
322
|
+
"resumeBudget": "An explicit resume resets the transition ceiling and grants the developer a fresh maxAttempts budget.",
|
|
323
|
+
"defaultImplementationEngine": true
|
|
323
324
|
},
|
|
324
325
|
"execution": {
|
|
325
326
|
"schemaVersion": 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specrails-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Provider-independent AI agent workflow system for Claude Code, Codex, Gemini CLI, and Kimi Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -77,14 +77,17 @@
|
|
|
77
77
|
"ci": "npm run typecheck && npm run test:scripts && npm run test:coverage && npm run check:package"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
+
"@fission-ai/openspec": "1.4.1",
|
|
80
81
|
"@inquirer/prompts": "^7.0.0",
|
|
81
82
|
"@langchain/core": "1.2.10",
|
|
82
83
|
"@langchain/langgraph": "1.4.14",
|
|
83
84
|
"@langchain/langgraph-checkpoint": "1.1.5",
|
|
85
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
84
86
|
"ajv": "^8.18.0",
|
|
85
87
|
"cross-spawn": "7.0.6",
|
|
86
88
|
"js-yaml": "^4.1.0",
|
|
87
|
-
"picocolors": "^1.1.1"
|
|
89
|
+
"picocolors": "^1.1.1",
|
|
90
|
+
"zod": "4.6.2"
|
|
88
91
|
},
|
|
89
92
|
"devDependencies": {
|
|
90
93
|
"@types/cross-spawn": "6.0.6",
|
|
@@ -4,10 +4,22 @@
|
|
|
4
4
|
"title": "Specrails programmatic agent runtime",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"required": ["schemaVersion", "
|
|
7
|
+
"required": ["schemaVersion", "providers", "agents", "verification"],
|
|
8
8
|
"properties": {
|
|
9
9
|
"schemaVersion": { "const": 1 },
|
|
10
|
-
"
|
|
10
|
+
"efficiency": { "type": "object", "additionalProperties": false, "required": ["schemaVersion"], "properties": {
|
|
11
|
+
"schemaVersion": { "const": 1 }, "contextMode": { "enum": ["full", "incremental"] }, "reviewMode": { "enum": ["full", "incremental"] },
|
|
12
|
+
"planning": { "enum": ["full", "proportional"] }, "acceptDeveloperChecks": { "type": "boolean" },
|
|
13
|
+
"verification": { "type": "object", "additionalProperties": false, "properties": { "maxConcurrency": { "type": "integer", "minimum": 1, "maximum": 4 } } }
|
|
14
|
+
} },
|
|
15
|
+
"guardrails": { "type": "object", "additionalProperties": false, "properties": { "plan-validation": { "type": "boolean" }, "genuine-blocking-question": { "type": "boolean" }, "plan-language-hint": { "type": "boolean" }, "frozen-plan-writes": { "type": "boolean" }, "primary-language": { "type": "boolean" }, "duplicate-sibling": { "type": "boolean" }, "one-test-per-module": { "type": "boolean" }, "empty-write": { "type": "boolean" }, "evidence-gated-ticking": { "type": "boolean" }, "inventory-retry": { "type": "boolean" }, "synthetic-corrections": { "type": "boolean" }, "silent-group-closure": { "type": "boolean" }, "verify-per-group": { "type": "boolean" }, "test-reachability": { "type": "boolean" }, "exit-code-honesty": { "type": "boolean" }, "environment-repair": { "type": "boolean" }, "lockfile-repair": { "type": "boolean" }, "verify-idle-timeout": { "type": "boolean" } } },
|
|
16
|
+
"rolePrompts": { "type": "object", "additionalProperties": false, "properties": {
|
|
17
|
+
"architect": { "type": "string", "minLength": 1, "maxLength": 20000, "pattern": "\\S" },
|
|
18
|
+
"developer": { "type": "string", "minLength": 1, "maxLength": 20000, "pattern": "\\S" },
|
|
19
|
+
"reviewer": { "type": "string", "minLength": 1, "maxLength": 20000, "pattern": "\\S" },
|
|
20
|
+
"fixer": { "type": "string", "minLength": 1, "maxLength": 20000, "pattern": "\\S" }
|
|
21
|
+
} },
|
|
22
|
+
"enabled": { "type": "boolean", "deprecated": true, "description": "Accepted for saved configuration compatibility; implementation always uses the agent runtime." },
|
|
11
23
|
"providers": { "type": "array", "items": { "oneOf": [
|
|
12
24
|
{ "type": "object", "additionalProperties": false, "required": ["id", "kind", "cli"], "properties": {
|
|
13
25
|
"id": { "$ref": "#/definitions/id" }, "kind": { "const": "cli" }, "cli": { "enum": ["claude", "codex", "gemini", "kimi"] }
|
|
@@ -15,9 +27,14 @@
|
|
|
15
27
|
{ "type": "object", "additionalProperties": false, "required": ["id", "kind", "baseUrl"], "properties": {
|
|
16
28
|
"id": { "$ref": "#/definitions/id" }, "kind": { "const": "openai-compatible" },
|
|
17
29
|
"baseUrl": { "type": "string", "pattern": "^https?://[^/?#@]+(?:/[^?#]*)?$" },
|
|
18
|
-
"apiKeyEnv": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }
|
|
30
|
+
"apiKeyEnv": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
31
|
+
"supportsReasoningEffort": { "type": "boolean", "description": "The endpoint honours the OpenAI reasoning_effort request field (low|medium|high)." },
|
|
32
|
+
"agentLoop": { "enum": ["compact", "free"], "description": "compact (default): host-driven pipelines of small structured calls for small local models; free: one agentic loop per role with guardrails." },
|
|
33
|
+
"contextWindowTokens": { "type": "integer", "minimum": 4096, "description": "Context window used for the compaction budget (chars/4 estimate). Default 32768." },
|
|
34
|
+
"maxOutputTokens": { "type": "integer", "minimum": 1024, "description": "Output budget (max_tokens) of one tool turn; retried once at twice this when cut off, always bounded by the remaining context window. Default 8192." }
|
|
19
35
|
} }
|
|
20
36
|
] } },
|
|
37
|
+
"fixer": { "$ref": "#/definitions/agent" },
|
|
21
38
|
"agents": { "type": "object", "additionalProperties": false, "required": ["architect", "developer", "reviewer"], "properties": {
|
|
22
39
|
"architect": { "$ref": "#/definitions/agent" }, "developer": { "$ref": "#/definitions/agent" }, "reviewer": { "$ref": "#/definitions/agent" }
|
|
23
40
|
} },
|
|
@@ -26,6 +43,7 @@
|
|
|
26
43
|
"maxCostUsd": { "type": "number", "exclusiveMinimum": 0 }, "timeoutMs": { "$ref": "#/definitions/positiveInteger" }
|
|
27
44
|
} },
|
|
28
45
|
"verification": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["repositoryId", "command", "args"], "properties": {
|
|
46
|
+
"key": { "$ref": "#/definitions/id" }, "label": { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "\\S" }, "policy": { "$ref": "#/definitions/checkPolicy" },
|
|
29
47
|
"repositoryId": { "$ref": "#/definitions/id" }, "command": { "type": "string", "minLength": 1 },
|
|
30
48
|
"args": { "type": "array", "items": { "type": "string" } }, "cwd": { "type": "string", "minLength": 1 },
|
|
31
49
|
"env": { "type": "object", "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }, "additionalProperties": { "type": "string" } },
|
|
@@ -44,10 +62,22 @@
|
|
|
44
62
|
} }
|
|
45
63
|
},
|
|
46
64
|
"definitions": {
|
|
65
|
+
"effort": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,31}$" },
|
|
66
|
+
"inputList": { "type": "array", "maxItems": 256, "items": { "type": "string", "minLength": 1, "maxLength": 4096, "pattern": "\\S" } },
|
|
67
|
+
"checkPolicy": { "type": "object", "additionalProperties": false, "properties": {
|
|
68
|
+
"reuse": { "enum": ["never", "snapshot-local"] }, "inputs": { "$ref": "#/definitions/inputList" },
|
|
69
|
+
"toolchainInputs": { "$ref": "#/definitions/inputList" }, "resources": { "$ref": "#/definitions/inputList" },
|
|
70
|
+
"deterministic": { "type": "boolean" }, "readOnly": { "type": "boolean" }, "independentGroup": { "$ref": "#/definitions/id" }
|
|
71
|
+
} },
|
|
47
72
|
"id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" },
|
|
48
73
|
"positiveInteger": { "type": "integer", "minimum": 1 },
|
|
49
74
|
"score": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
50
|
-
"agent": { "type": "object", "additionalProperties": false, "required": ["provider"], "properties": {
|
|
75
|
+
"agent": { "type": "object", "additionalProperties": false, "required": ["provider"], "dependencies": { "escalation": ["model"] }, "properties": {
|
|
76
|
+
"effort": { "$ref": "#/definitions/effort" },
|
|
77
|
+
"thinking": { "type": "string", "enum": ["on", "off"], "description": "OpenAI-compatible engines only: private thinking (chat_template_kwargs.enable_thinking). Default off." },
|
|
78
|
+
"escalation": { "type": "object", "additionalProperties": false, "required": ["model"], "properties": {
|
|
79
|
+
"model": { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[^-\\r\\n\\u0000][^\\r\\n\\u0000]*$" }, "effort": { "$ref": "#/definitions/effort" }
|
|
80
|
+
} },
|
|
51
81
|
"provider": { "$ref": "#/definitions/id" }, "model": { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[^-\\r\\n\\u0000][^\\r\\n\\u0000]*$" },
|
|
52
82
|
"maxTurns": { "$ref": "#/definitions/positiveInteger" }
|
|
53
83
|
} }
|