sortie-dogs 0.11.4 → 0.12.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.
- package/README.md +232 -187
- package/dist/asset-version.d.ts +2 -3
- package/dist/asset-version.js +1 -2
- package/dist/cli/main.js +5 -5
- package/dist/core/initialize.js +12 -31
- package/dist/core/operator-mission.d.ts +72 -0
- package/dist/core/operator-mission.js +263 -0
- package/dist/core/operator-runtime.d.ts +6 -0
- package/dist/core/operator-runtime.js +26 -6
- package/dist/core/runtime-profile.d.ts +1 -3
- package/dist/core/runtime-profile.js +1 -8
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/plugin/gate.d.ts +3 -1
- package/dist/plugin/gate.js +8 -1
- package/dist/plugin/index.js +13 -2
- package/dist/plugin/mission-progress.d.ts +5 -0
- package/dist/plugin/mission-progress.js +9 -0
- package/dist/plugin/mission-review.d.ts +6 -0
- package/dist/plugin/mission-review.js +34 -0
- package/dist/plugin/model-cost.d.ts +2 -2
- package/dist/plugin/model-cost.js +2 -2
- package/dist/plugin/model-routing.d.ts +1 -1
- package/dist/plugin/model-routing.js +1 -1
- package/dist/plugin/profiled.js +322 -14
- package/dist/plugin/runtime-bridge.d.ts +2 -1
- package/dist/plugin/v2.d.ts +34 -16
- package/dist/plugin/v2.js +170 -10
- package/dist/reflection/managed-block.d.ts +1 -1
- package/dist/reflection/managed-block.js +0 -1
- package/dist/reflection/managed-sync.js +1 -1
- package/dist/runtime-assets-v010.d.ts +2 -0
- package/dist/runtime-assets-v010.js +17 -7
- package/dist/runtime-mission-assets.d.ts +4 -0
- package/dist/runtime-mission-assets.js +163 -0
- package/package.json +2 -11
- package/dist/core/work-loop.d.ts +0 -251
- package/dist/core/work-loop.js +0 -814
- package/dist/core/work-overview-rpc.d.ts +0 -23
- package/dist/core/work-overview-rpc.js +0 -7
- package/dist/core/work-overview.d.ts +0 -27
- package/dist/core/work-overview.js +0 -47
- package/dist/core/work-progress.d.ts +0 -109
- package/dist/core/work-progress.js +0 -65
- package/dist/plugin/v2-legacy.d.ts +0 -2
- package/dist/plugin/v2-legacy.js +0 -2
- package/dist/plugin/work-loop-v2.d.ts +0 -32
- package/dist/plugin/work-loop-v2.js +0 -951
- package/dist/plugin/work-presentation.d.ts +0 -19
- package/dist/plugin/work-presentation.js +0 -76
- package/dist/plugin/work-usage.d.ts +0 -8
- package/dist/plugin/work-usage.js +0 -79
- package/dist/runtime-assets-v011.d.ts +0 -4
- package/dist/runtime-assets-v011.js +0 -242
- package/dist/tui.tsx +0 -39
package/README.md
CHANGED
|
@@ -1,242 +1,287 @@
|
|
|
1
1
|
# Sortie-dogs
|
|
2
2
|
|
|
3
|
-
**A
|
|
3
|
+
**A goal-preserving, adaptive execution harness for OpenCode that optimizes cost,
|
|
4
|
+
time, and proof without taking your setup over.**
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
keeping the complete original request.
|
|
6
|
+
Use OpenCode normally. Invoke Sortie only when you want scoped investigation,
|
|
7
|
+
implementation, validation, review, and model routing.
|
|
8
8
|
|
|
9
|
-
**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
- **Goal invariance**: accepted outcomes and proof requirements survive delegation,
|
|
10
|
+
continuation, remediation, and restart.
|
|
11
|
+
- **Adaptive execution**: small work stays small; additional agents and stronger
|
|
12
|
+
models are used only when task shape or risk justifies them.
|
|
13
|
+
- **Coexistence**: Sortie activates only when selected and preserves normal
|
|
14
|
+
OpenCode agents, settings, and user-owned files.
|
|
15
|
+
- **Cost, time, and proof**: the objective is a verified result at the lowest
|
|
16
|
+
practical cost and wall time, not the largest agent count.
|
|
15
17
|
|
|
16
18
|
[](https://github.com/zufall-upon/Sortie-dogs/releases/latest)
|
|
17
19
|
[](https://www.npmjs.com/package/sortie-dogs)
|
|
18
20
|
[](https://github.com/zufall-upon/Sortie-dogs/actions/workflows/test.yml)
|
|
21
|
+
[](https://opencode.ai/)
|
|
22
|
+
[](https://www.typescriptlang.org/)
|
|
23
|
+
[](https://www.npmjs.com/package/sortie-dogs)
|
|
19
24
|
[](LICENSE)
|
|
20
25
|
|
|
26
|
+

|
|
27
|
+
|
|
21
28
|
Guides: [日本語](docs/guide-ja.md) · [简体中文](docs/guide-zh-CN.md) ·
|
|
22
29
|
[Testing](docs/testing.md) · [CLI testing](docs/cli-testing.md)
|
|
23
30
|
|
|
24
|
-
>
|
|
31
|
+
> **Beta:** v0.12.2 builds on the v0.10.23 execution engine. Runtime behavior,
|
|
32
|
+
> configuration, and generated assets may still change before 1.0.
|
|
25
33
|
|
|
26
34
|
## Quick start
|
|
27
35
|
|
|
28
|
-
Requirements: Node.js 22.6
|
|
29
|
-
|
|
36
|
+
Requirements: Node.js 22.6 or newer, npm, and OpenCode.
|
|
37
|
+
|
|
38
|
+
Run these commands in the target project:
|
|
30
39
|
|
|
31
40
|
```sh
|
|
32
41
|
npm install --save-dev sortie-dogs
|
|
33
42
|
npx sortie-dogs init .
|
|
34
43
|
```
|
|
35
44
|
|
|
36
|
-
|
|
37
|
-
`.opencode/opencode.json
|
|
45
|
+
The package retains the `v010` profile/namespace for compatibility. Add the OpenCode V2 plugin and the required
|
|
46
|
+
two-level subagent depth to `.opencode/opencode.json`, preserving existing values:
|
|
38
47
|
|
|
39
|
-
```
|
|
48
|
+
```json
|
|
40
49
|
{
|
|
41
|
-
"$schema": "https://opencode.ai/config.json",
|
|
42
50
|
"plugins": ["sortie-dogs"],
|
|
43
|
-
"
|
|
44
|
-
"compaction": { "model": "openai/gpt-6-luna-fast#high" },
|
|
45
|
-
"title": { "model": "openai/gpt-6-luna-fast#high" }
|
|
46
|
-
}
|
|
51
|
+
"experimental": { "subagent_depth": 2 }
|
|
47
52
|
}
|
|
48
53
|
```
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
additional settings on those agents. Sortie permits SOL6 and Luna6 for its
|
|
52
|
-
execution requests; reviewer/advisor model selections are independent.
|
|
53
|
-
|
|
54
|
-
The package exposes a native `./tui` entry for the live work overview. If you use
|
|
55
|
-
a local V2 wrapper, place `export { default } from "sortie-dogs/server";` in
|
|
56
|
-
`.opencode/plugins/sortie-dogs/index.js` and register that directory. `init` installs
|
|
57
|
-
its companion `tui.tsx` alongside it. For a global installation, use the same
|
|
58
|
-
`plugins/sortie-dogs/` layout under the OpenCode global config directory.
|
|
59
|
-
|
|
60
|
-
Restart the OpenCode host after installing or updating the plugin, then run:
|
|
55
|
+
Restart OpenCode, then run:
|
|
61
56
|
|
|
62
57
|
```text
|
|
63
|
-
/sortie-
|
|
58
|
+
/sortie-v010 <task>
|
|
64
59
|
```
|
|
65
60
|
|
|
66
|
-
Selecting
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
exposes stored output for inspection. Exploratory diagnostics use ordinary shell tools.
|
|
107
|
-
Unavailable required tests produce **blocked**, not succeeded, completion; `start_work`
|
|
108
|
-
resumes that same job and child when the blocker can be resolved.
|
|
109
|
-
|
|
110
|
-
The default workflow requires no proposal investigation, immutable whole-task
|
|
111
|
-
execution plan, exact-file manifest, or model-authored proof mapping.
|
|
112
|
-
Technical scope and useful verification commands are discovered while working.
|
|
113
|
-
Project `AGENTS.md`, user instructions and native OpenCode permissions remain authoritative.
|
|
114
|
-
|
|
115
|
-
### Execution progress and bounded discovery
|
|
116
|
-
|
|
117
|
-
The native child call publishes host-observed progress every five seconds: elapsed
|
|
118
|
-
time, current inspection/command, last exit, command starts and edits. The same
|
|
119
|
-
information is available through `sortie_v011_work_status`. Activity is never
|
|
120
|
-
treated as completed work or an inferred benchmark score. Long jobs should reuse
|
|
121
|
-
their existing controller and ledger, rather than rebuilding one before launch.
|
|
122
|
-
|
|
123
|
-
By default, 12 inspection calls or three minutes without an executable step stop
|
|
124
|
-
the child with a **blocked** reason. A running native shell/check keeps its own
|
|
125
|
-
timeout. Resuming a discovery stall requires concrete next-step guidance; the same
|
|
126
|
-
child, user instructions, failed checks and attempt budget are retained. Plugin
|
|
127
|
-
options `maxDiscoveryCalls`, `maxPlanningMs` and `progressIntervalMs` configure these
|
|
128
|
-
bounds. Interrupted outgoing tool calls receive an explicitly unverified error
|
|
129
|
-
result when native history omitted one; stored history and check evidence are preserved.
|
|
130
|
-
|
|
131
|
-
### Roles and models
|
|
132
|
-
|
|
133
|
-
| Role | Model | Responsibility |
|
|
134
|
-
| --- | --- | --- |
|
|
135
|
-
| `dog-operator` | `openai/gpt-6-sol#xhigh` | User proxy, intent/quality comparison, feedback, final acceptance |
|
|
136
|
-
| `dogs-coordinator` | `openai/gpt-6-luna-fast#max` | Investigation, implementation, tests, corrections and routine work |
|
|
137
|
-
| `dog-reviewer-v010` / `dog-advisor-v010` | Existing configuration | Optional independent review or focused advice |
|
|
138
|
-
|
|
139
|
-
**`gpt-6-luna-fast` is a real OpenCode catalog selector.** It sends API model
|
|
140
|
-
`gpt-6-luna` with `body.service_tier: "priority"`, the documented Fast setting.
|
|
141
|
-
Selecting it is sufficient; a second custom alias or manual tier setting is unnecessary.
|
|
142
|
-
Fast is separate from the reasoning variant. Older auxiliary configurations selecting
|
|
143
|
-
base Luna6 also receive a Fast tier overlay while used by Sortie.
|
|
144
|
-
|
|
145
|
-
The cost report estimates completed requests using published per-request rates,
|
|
146
|
-
including Fast's 2x multiplier and long-context/cache pricing. Provider-reported
|
|
147
|
-
tiers are shown separately. The acceptance call's in-flight model response and
|
|
148
|
-
later final answer are not yet included, so this is an estimate rather than a bill.
|
|
149
|
-
Historical Terra-compatible pricing remains available for older reports.
|
|
150
|
-
|
|
151
|
-
### Continuation, cancellation and budgets
|
|
152
|
-
|
|
153
|
-
- Native OpenCode owns normal continuation and compaction. Original instructions,
|
|
154
|
-
feedback, attempts and validation receipts are durable; `work_status` restores them.
|
|
155
|
-
- `start_work` resumes interrupted work with the same child and cumulative attempt
|
|
156
|
-
count. `cancel_work` stops the owned child and preserves existing files/evidence.
|
|
157
|
-
- A completed/cancelled job is archived when a subsequent request starts. It does
|
|
158
|
-
not authorize or spend the next job's attempts.
|
|
159
|
-
- The default is **six child invocations per job**, including revisions/resumptions.
|
|
160
|
-
This is not a six-tool-call limit. The implementer can investigate and correct
|
|
161
|
-
failures continuously inside one invocation. OpenCode controls context/turn budgets.
|
|
162
|
-
- Configure `maxAttempts` (1–32) through native plugin options:
|
|
163
|
-
|
|
164
|
-
```jsonc
|
|
165
|
-
{
|
|
166
|
-
"plugins": [{ "package": "sortie-dogs", "options": { "maxAttempts": 6 } }]
|
|
167
|
-
}
|
|
168
|
-
```
|
|
61
|
+
Selecting `dog-operator` directly starts the same workflow. `dog-operator` is the
|
|
62
|
+
only user-facing v0.10 authority. `dogs-coordinator` and every `*-v010` role are
|
|
63
|
+
internal children and must not be selected as task entry points.
|
|
64
|
+
|
|
65
|
+
`init` installs runtime assets; the `plugins` entry loads runtime enforcement and
|
|
66
|
+
model routing. Both are required. A new session alone does not reload an updated
|
|
67
|
+
plugin process, so restart OpenCode after installation or upgrade.
|
|
68
|
+
|
|
69
|
+
## v0.12.0 workflow
|
|
70
|
+
|
|
71
|
+
v0.12.0 keeps Operator → Coordinator → Worker, with independent review:
|
|
72
|
+
|
|
73
|
+
- `dog-operator` states a few requirements/negative constraints and owns user decisions and final acceptance.
|
|
74
|
+
The host saves the original user message verbatim.
|
|
75
|
+
- Hidden `dogs-coordinator` owns investigation, unit declarations, Worker/Scout/Advisor/Reviewer dispatch,
|
|
76
|
+
in-request write-scope extensions, and corrections. It can read/search and run confirmation shell commands;
|
|
77
|
+
source editing tools belong to Worker.
|
|
78
|
+
- `dog-worker-v010` implements a host-generated unit within its file/directory write scopes.
|
|
79
|
+
Investigation commands need no pre-registration; formal checks retain real host-recorded results.
|
|
80
|
+
- High-risk changes require an independent Reviewer. Low-risk skips are explicit and recorded.
|
|
81
|
+
- Simple low-risk single-unit work retains Operator → Worker Fast-lane dispatch.
|
|
82
|
+
- Unit progress appears on the running Task without stopping Coordinator or prompting Operator.
|
|
83
|
+
|
|
84
|
+
The v0.10 profile is serial by design. The stable profile's Luna fabric and
|
|
85
|
+
parallel integration path are not exposed in this profile. More agents are not a
|
|
86
|
+
goal; preserving quality while reducing unnecessary expensive work is.
|
|
87
|
+
|
|
88
|
+
### SWE-bench evaluation
|
|
89
|
+
|
|
90
|
+
A frozen Sortie-dogs v0.10.14 build was evaluated on 23 fixed tasks.
|
|
91
|
+
|
|
92
|
+
- Official verifier PASS: 6 / 23
|
|
93
|
+
- Scored FAIL: 17 / 23
|
|
94
|
+
- Infrastructure blocked: 0 / 23
|
|
95
|
+
- Total estimated model cost: $15.75
|
|
96
|
+
- Median agent runtime: 15.2 min
|
|
97
|
+
|
|
98
|
+
The same Sortie-dogs candidate, model routes, budgets, tools, and verification
|
|
99
|
+
procedure were held fixed for all tasks. This is one frozen evaluation, not a
|
|
100
|
+
general success-rate claim.
|
|
169
101
|
|
|
170
|
-
|
|
171
|
-
compatibility runtime. The v0.11 source identity covers tracked and nonignored
|
|
172
|
-
working files (or regular workspace files outside Git), rather than dependency
|
|
173
|
-
caches or external services. The operator selects meaningful checks for the task.
|
|
102
|
+
Full methodology and per-task results: [benchmark details](docs/benchmark-v0.10.14-dev23.md)
|
|
174
103
|
|
|
175
|
-
|
|
104
|
+
Historical qualification references remain in [benchmark reference](docs/benchmark-reference.md).
|
|
176
105
|
|
|
177
|
-
|
|
178
|
-
`sortie-dogs init --global` and restart OpenCode.
|
|
106
|
+
## Mission tools
|
|
179
107
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
change them to `export { default } from "sortie-dogs/server"` for v0.11.
|
|
191
|
-
- Finish or cancel an active v0.10 job before switching runtimes. Its immutable
|
|
192
|
-
plans are not converted into v0.11 jobs. A fresh request starts the new workflow.
|
|
108
|
+
1. `start_mission`: Operator supplies concise requirements; the host saves original messages and returns a Coordinator task.
|
|
109
|
+
2. `plan_units`: Coordinator supplies title, objective, file/directory scopes and formal checks. The host generates
|
|
110
|
+
IDs, handoff, manifest, proof mapping and the ready Worker task. No proposal approval round trip.
|
|
111
|
+
3. `operator_next`: advance serial units. `expand_unit` or a reasoned `plan_units` correction extends/replaces
|
|
112
|
+
settled execution within the original requirements and retained cumulative budget.
|
|
113
|
+
4. `review_mission`: generate the independent review packet from source, requirements and observed checks;
|
|
114
|
+
dispatch its Reviewer task for high-risk changes or record a low-risk skip.
|
|
115
|
+
5. `submit_mission`: Coordinator returns a completion candidate, user-only decision, or proven external/scope/budget blocker.
|
|
116
|
+
6. `complete_mission`: Operator compares the original request, source and evidence, then explicitly accepts.
|
|
117
|
+
Only a succeeded receipt authorizes DONE and the measured 🐾 return report.
|
|
193
118
|
|
|
194
|
-
|
|
195
|
-
|
|
119
|
+
All tool names use the `sortie_v010_` prefix. Prior proposal/plan-repair tools remain in the compatibility
|
|
120
|
+
implementation but are hidden from the normal v0.12 model tool list. An in-request path extension is a
|
|
121
|
+
Coordinator decision; changing the original requirements or increasing budget returns to Operator/user.
|
|
196
122
|
|
|
197
|
-
|
|
123
|
+
Durable profile state and hash-bound task references support restart and
|
|
124
|
+
compaction recovery without reconstructing criteria from summary prose. Stale,
|
|
125
|
+
foreign-root, or changed references are rejected. An optional Git lifecycle can
|
|
126
|
+
create one non-overwriting branch and one explicit-path commit; it never grants
|
|
127
|
+
arbitrary Git, force push, release, or publication authority.
|
|
198
128
|
|
|
199
|
-
|
|
129
|
+
## Configuration
|
|
130
|
+
|
|
131
|
+
### Profile files and precedence
|
|
132
|
+
|
|
133
|
+
The default package entry is the v0.10 profile:
|
|
134
|
+
|
|
135
|
+
- Command: `/sortie-v010`
|
|
136
|
+
- Primary agent: `dog-operator`
|
|
137
|
+
- Project settings: `.opencode/sortie-dogs-v010.json`
|
|
138
|
+
- Global settings: `~/.config/opencode/sortie-dogs-v010.json`
|
|
139
|
+
- JSON environment override: `SORTIE_DOGS_V010_CONFIG`
|
|
140
|
+
- Runtime state: `.sortie-dogs-v010/`
|
|
141
|
+
- Installed asset marker: `.opencode/sortie-dogs-v010.version`
|
|
142
|
+
|
|
143
|
+
Precedence is built-in defaults, global file, project file, environment JSON,
|
|
144
|
+
then plugin factory options. Unknown properties or invalid types are rejected.
|
|
145
|
+
Use external v0.10 role names such as `dog-operator`, `dogs-coordinator`, and
|
|
146
|
+
`dog-reviewer-v010` in `modelRouting`; do not also declare their stable aliases.
|
|
147
|
+
|
|
148
|
+
Example `.opencode/sortie-dogs-v010.json`:
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"validationProfile": "balanced",
|
|
153
|
+
"readOnlyTools": ["my_mcp_search"],
|
|
154
|
+
"freeTierFallbackModels": ["opencode/deepseek-v4-flash-free"],
|
|
155
|
+
"modelRouting": {
|
|
156
|
+
"dog-operator": {
|
|
157
|
+
"preferred": { "model": "provider/model", "variant": "high" }
|
|
158
|
+
},
|
|
159
|
+
"dogs-coordinator": {
|
|
160
|
+
"preferred": { "model": "provider/model", "variant": "deep" }
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"modelCatalog": {
|
|
164
|
+
"project": [
|
|
165
|
+
{ "model": "provider/model", "variants": ["high", "deep"] }
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"continuation": {
|
|
169
|
+
"enabled": true,
|
|
170
|
+
"taskWatchdogMilliseconds": 300000
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Declare only models and named variants the host actually provides. Sortie does
|
|
176
|
+
not invent, probe, or translate variant names.
|
|
177
|
+
|
|
178
|
+
### Settings reference
|
|
179
|
+
|
|
180
|
+
- `readOnlyTools`: additional host-specific tools known not to mutate project
|
|
181
|
+
files. Values accumulate across configuration layers. Unknown tools are denied
|
|
182
|
+
in a bound worker session.
|
|
183
|
+
- `modelRouting`: preferred and ordered fallback targets by external profile role.
|
|
184
|
+
- `modelCatalog`: available `project` and `global` model/variant declarations.
|
|
185
|
+
- `freeTierFallbackModels`: ordered global last-resort model IDs. Default:
|
|
186
|
+
`opencode/deepseek-v4-flash-free`; `[]` disables this fallback.
|
|
187
|
+
- `dedicatedWorkerModel`: canonical stable serial target, default
|
|
188
|
+
`openai/gpt-6-sol` / `medium`. The v0.10 profile also supplies its explicit
|
|
189
|
+
role routes below; do not infer the v0.10 worker route from this stable setting.
|
|
190
|
+
- `consultation.strategy`: fixed advisor identity, optional `required`, and
|
|
191
|
+
positive `maxCallsPerCandidate`; default one call and not required.
|
|
192
|
+
- `consultation.sourceReview`: risk-based review with `maxCallsPerCandidate`
|
|
193
|
+
default `1` and `maxArtifactBytes` default/maximum `30720`. Unavailable review
|
|
194
|
+
blocks only when review is required.
|
|
195
|
+
- `continuation.enabled`: default `true`.
|
|
196
|
+
- Automatic continuation has no turn-count ceiling. The legacy positive-integer
|
|
197
|
+
`continuation.maxAutoContinues` setting is accepted but ignored.
|
|
198
|
+
- `continuation.taskWatchdogMilliseconds`: root inactivity while an implementation
|
|
199
|
+
Task is outstanding; default `300000`, valid range `10..1800000`.
|
|
200
|
+
- `continuation.summarizeModel`: optional explicit compaction model; omission
|
|
201
|
+
reuses the latest observed root model.
|
|
202
|
+
- `validationProfile`: `fast`, `balanced`, or `assurance`; default `balanced`.
|
|
203
|
+
- `reflection`: accepted by the shared schema, but reflection writes are not
|
|
204
|
+
exposed by the serial v0.10 profile. Stable reflection remains opt-in and off by
|
|
205
|
+
default.
|
|
206
|
+
|
|
207
|
+
The v0.10 host owns handoff and manifest controls under
|
|
208
|
+
`.sortie-dogs-v010/contracts/`. Do not create a legacy root
|
|
209
|
+
`operation-manifest.json` for this profile and do not edit generated controls.
|
|
210
|
+
Delete `.sortie-dogs-v010/` only when no Sortie run is active.
|
|
211
|
+
|
|
212
|
+
### Validation policy
|
|
213
|
+
|
|
214
|
+
`validationProfile` chooses non-canonical depth:
|
|
215
|
+
|
|
216
|
+
- `fast`: static checks
|
|
217
|
+
- `balanced`: targeted checks
|
|
218
|
+
- `assurance`: related checks
|
|
219
|
+
|
|
220
|
+
Canonical proof remains canonical. Full-suite execution requires release context
|
|
221
|
+
or explicit risk. Workers own static, targeted, and related checks; the root owns
|
|
222
|
+
canonical and full-suite checks. An unchanged candidate, command, and environment
|
|
223
|
+
reuse the same evidence instead of spending the validation budget again.
|
|
224
|
+
|
|
225
|
+
### Default v0.12 routes
|
|
226
|
+
|
|
227
|
+
- `dog-operator`: `openai/gpt-6-sol` / `xhigh`
|
|
228
|
+
- `dogs-coordinator`: `openai/gpt-6-sol` / `xhigh`
|
|
229
|
+
- `dog-worker-v010`: `openai/gpt-6-luna-fast` / `max`
|
|
230
|
+
- `dog-scout-v010`: `openai/gpt-6-luna-fast` / `max`
|
|
231
|
+
- `dog-reviewer-v010`: `openai/gpt-6-sol` / `xhigh`
|
|
232
|
+
- `dog-advisor-v010`: `openai/gpt-6-sol` / `xhigh`
|
|
233
|
+
|
|
234
|
+
An explicit model and variant selected in OpenCode remains authoritative for that
|
|
235
|
+
session. Child role defaults fill absent native settings and may be overridden by
|
|
236
|
+
valid profile routing. Review never silently inherits the implementation model.
|
|
237
|
+
|
|
238
|
+
## Stable compatibility profile
|
|
239
|
+
|
|
240
|
+
The earlier parallel-capable runtime remains available explicitly:
|
|
200
241
|
|
|
201
242
|
```sh
|
|
202
|
-
npx sortie-dogs init . --profile
|
|
243
|
+
npx sortie-dogs init . --profile stable
|
|
203
244
|
```
|
|
204
245
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
246
|
+
Load it through a project bridge instead of the default package plugin entry:
|
|
247
|
+
|
|
248
|
+
```ts
|
|
249
|
+
export { SortieDogsPlugin } from "sortie-dogs/plugin/stable";
|
|
208
250
|
```
|
|
209
251
|
|
|
210
|
-
The
|
|
252
|
+
The stable profile uses `/sortie`, `dog-coordinator`,
|
|
253
|
+
`.opencode/sortie-dogs.json`, `SORTIE_DOGS_CONFIG`, and `.sortie-dogs/`. Do not
|
|
254
|
+
register stable and v0.10 from the same package installation path in one host.
|
|
255
|
+
|
|
256
|
+
## Global availability
|
|
211
257
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
258
|
+
Project-local installation is recommended. To expose v0.10 assets globally:
|
|
259
|
+
|
|
260
|
+
```sh
|
|
261
|
+
npm install --global sortie-dogs
|
|
262
|
+
sortie-dogs init --global --profile v010
|
|
216
263
|
```
|
|
217
264
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
265
|
+
Then add `sortie-dogs` and `experimental.subagent_depth: 2` to the global OpenCode config.
|
|
266
|
+
Global initialization installs assets only; it does not silently change the
|
|
267
|
+
default agent or merge user settings.
|
|
221
268
|
|
|
222
|
-
##
|
|
269
|
+
## Updates and removal
|
|
223
270
|
|
|
224
|
-
|
|
225
|
-
initial failing oracle, native compaction, correction, explicit operator acceptance,
|
|
226
|
-
and a second task in the same root session. It records outbound model/tier choices,
|
|
227
|
-
protected-file hashes, actual exits and receipts. Run it with:
|
|
271
|
+
After replacing the dependency, rerun initialization and restart OpenCode:
|
|
228
272
|
|
|
229
273
|
```sh
|
|
230
|
-
|
|
274
|
+
npx sortie-dogs init .
|
|
231
275
|
```
|
|
232
276
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
[
|
|
277
|
+
`init` is idempotent. It updates recognized Sortie-owned assets, records the asset
|
|
278
|
+
version, preserves user configuration, and stops safely on unknown ownership or
|
|
279
|
+
conflicting files.
|
|
280
|
+
|
|
281
|
+
There is no supported uninstall command. Remove the npm dependency separately,
|
|
282
|
+
then follow the [safe manual removal guide](docs/uninstall.md). Delete only known
|
|
283
|
+
Sortie-owned paths; never remove the whole `.opencode` directory or use broad
|
|
284
|
+
wildcards.
|
|
239
285
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
[Manual removal](docs/uninstall.md) · [Release batch guide](docs/release-batch.md).
|
|
286
|
+
Maintainers: the [release batch guide](docs/release-batch.md) covers fixed-tarball
|
|
287
|
+
validation, global application, GitHub publication, and manual npm publication.
|
package/dist/asset-version.d.ts
CHANGED
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
* installed project marker without importing every asset body.
|
|
4
4
|
*/
|
|
5
5
|
export declare const RUNTIME_ASSET_VERSION = "0.3.89-completion-proof-v1";
|
|
6
|
-
export declare const V010_RUNTIME_ASSET_VERSION = "0.
|
|
7
|
-
export
|
|
8
|
-
export type RuntimeAssetVersion = typeof RUNTIME_ASSET_VERSION | typeof V010_RUNTIME_ASSET_VERSION | typeof V011_RUNTIME_ASSET_VERSION;
|
|
6
|
+
export declare const V010_RUNTIME_ASSET_VERSION = "0.12.3-v2-zod-schema-compaction-v1";
|
|
7
|
+
export type RuntimeAssetVersion = typeof RUNTIME_ASSET_VERSION | typeof V010_RUNTIME_ASSET_VERSION;
|
package/dist/asset-version.js
CHANGED
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
* installed project marker without importing every asset body.
|
|
4
4
|
*/
|
|
5
5
|
export const RUNTIME_ASSET_VERSION = "0.3.89-completion-proof-v1";
|
|
6
|
-
export const V010_RUNTIME_ASSET_VERSION = "0.
|
|
7
|
-
export const V011_RUNTIME_ASSET_VERSION = "0.11.4-soft-pacing-v1";
|
|
6
|
+
export const V010_RUNTIME_ASSET_VERSION = "0.12.3-v2-zod-schema-compaction-v1";
|
package/dist/cli/main.js
CHANGED
|
@@ -29,9 +29,9 @@ const USAGE = `Usage: sortie-dogs lint <handoff.json> [<handoff.json> ...]
|
|
|
29
29
|
[--changed-paths-from <file|->]
|
|
30
30
|
[--changed-path <path> ...]
|
|
31
31
|
[--format text|json] [--quiet] [--strict]`;
|
|
32
|
-
const INIT_USAGE = `Usage: sortie-dogs init [project-root] [--profile stable|v010
|
|
33
|
-
sortie-dogs init --global [--profile stable|v010
|
|
34
|
-
This package defaults to the
|
|
32
|
+
const INIT_USAGE = `Usage: sortie-dogs init [project-root] [--profile stable|v010]
|
|
33
|
+
sortie-dogs init --global [--profile stable|v010]
|
|
34
|
+
This beta package defaults to the v010 profile.`;
|
|
35
35
|
class InputFailure extends Error {
|
|
36
36
|
safeMessage;
|
|
37
37
|
constructor(safeMessage) {
|
|
@@ -232,11 +232,11 @@ export async function run(argv) {
|
|
|
232
232
|
}
|
|
233
233
|
const initArgs = [...argv.slice(1)];
|
|
234
234
|
const profileIndex = initArgs.indexOf("--profile");
|
|
235
|
-
const profile = profileIndex < 0 ? "
|
|
235
|
+
const profile = profileIndex < 0 ? "v010" : initArgs[profileIndex + 1];
|
|
236
236
|
if (profileIndex >= 0)
|
|
237
237
|
initArgs.splice(profileIndex, 2);
|
|
238
238
|
const global = initArgs[0] === "--global";
|
|
239
|
-
if ((profile !== "stable" && profile !== "v010"
|
|
239
|
+
if ((profile !== "stable" && profile !== "v010") || initArgs.length > 1 || (initArgs[0]?.startsWith("-") === true && !global)) {
|
|
240
240
|
process.stderr.write(`${INIT_USAGE}\n`);
|
|
241
241
|
return 2;
|
|
242
242
|
}
|
package/dist/core/initialize.js
CHANGED
|
@@ -112,7 +112,7 @@ function compareVersions(left, right) {
|
|
|
112
112
|
}
|
|
113
113
|
return comparePrerelease(left.prerelease, right.prerelease);
|
|
114
114
|
}
|
|
115
|
-
function classifyVersionTransition(installedValue, currentValue) {
|
|
115
|
+
function classifyVersionTransition(installedValue, currentValue, v010Restore = false) {
|
|
116
116
|
const installed = parseVersion(installedValue);
|
|
117
117
|
const current = parseVersion(currentValue);
|
|
118
118
|
if (installed === undefined || current === undefined)
|
|
@@ -122,6 +122,9 @@ function classifyVersionTransition(installedValue, currentValue) {
|
|
|
122
122
|
return "same";
|
|
123
123
|
if (order > 0)
|
|
124
124
|
return "incompatible";
|
|
125
|
+
if (v010Restore && installed.major === 0 && installed.minor === 11 &&
|
|
126
|
+
current.major === 0 && current.minor === 12)
|
|
127
|
+
return "incompatible";
|
|
125
128
|
// SemVer-compatible update line: stable releases share a major; 0.x releases also share a minor.
|
|
126
129
|
const sameLine = installed.major === current.major &&
|
|
127
130
|
(installed.major !== 0 || installed.minor === current.minor);
|
|
@@ -129,7 +132,11 @@ function classifyVersionTransition(installedValue, currentValue) {
|
|
|
129
132
|
// cross-minor migration; skipped lines still fail closed instead of bypassing migration steps.
|
|
130
133
|
const adjacentPreOneLine = installed.major === 0 && current.major === 0 &&
|
|
131
134
|
current.minor === installed.minor + 1;
|
|
132
|
-
|
|
135
|
+
// v0.11 used a different runtime. This explicit v010 asset migration restores
|
|
136
|
+
// the 0.10 line directly into 0.12 without selecting any v0.11 execution path.
|
|
137
|
+
const restoredPreview = v010Restore && installed.major === 0 && installed.minor === 10 &&
|
|
138
|
+
current.major === 0 && current.minor === 12;
|
|
139
|
+
return sameLine || adjacentPreOneLine || restoredPreview ? "compatible-update" : "incompatible";
|
|
133
140
|
}
|
|
134
141
|
async function metadata(path) {
|
|
135
142
|
try {
|
|
@@ -371,11 +378,8 @@ async function initializeRoot(requestedRoot, layout, installAssets = runtimeAsse
|
|
|
371
378
|
return present ? await readFile(resolve(root, entry.relativePath)) : undefined;
|
|
372
379
|
}));
|
|
373
380
|
const markerIndex = entries.length - 1;
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
const markerText = existing[markerIndex] ?? (migrating ? await readFile(resolve(root, layout.previousMarkerPath)) : undefined);
|
|
377
|
-
const matches = (entry, index) => existing[index] !== undefined && (existing[index].equals(Buffer.from(entry.content)) ||
|
|
378
|
-
(layout.preserveExistingPaths ?? []).some(path => entry.relativePath === safeAssetPath(path, layout.assetPrefix)));
|
|
381
|
+
const markerText = existing[markerIndex];
|
|
382
|
+
const matches = (entry, index) => existing[index]?.equals(Buffer.from(entry.content)) ?? false;
|
|
379
383
|
const assetsMatch = assetEntries.every(matches);
|
|
380
384
|
if (markerText !== undefined && parseMarker(markerText.toString("utf8")) === version && assetsMatch) {
|
|
381
385
|
if (layout.controlIgnore ?? !layout.preserveAllLegacy)
|
|
@@ -394,7 +398,7 @@ async function initializeRoot(requestedRoot, layout, installAssets = runtimeAsse
|
|
|
394
398
|
}
|
|
395
399
|
else {
|
|
396
400
|
const installedVersion = parseMarker(markerText.toString("utf8"));
|
|
397
|
-
if (classifyVersionTransition(installedVersion, version) === "incompatible") {
|
|
401
|
+
if (classifyVersionTransition(installedVersion, version, layout.markerPath.endsWith("sortie-dogs-v010.version")) === "incompatible") {
|
|
398
402
|
throw new ProjectInitializationError("incompatible-version", `Installed Sortie-dogs ${installedVersion} cannot be updated to ${version}.`);
|
|
399
403
|
}
|
|
400
404
|
}
|
|
@@ -425,21 +429,6 @@ async function initializeRoot(requestedRoot, layout, installAssets = runtimeAsse
|
|
|
425
429
|
const removedFiles = [];
|
|
426
430
|
const createdDirectories = [];
|
|
427
431
|
try {
|
|
428
|
-
if (migrating) {
|
|
429
|
-
for (const [index, entry] of assetEntries.entries()) {
|
|
430
|
-
if (!existing[index] || matches(entry, index))
|
|
431
|
-
continue;
|
|
432
|
-
const backup = safeAssetPath(`sortie-dogs-v011-backup/${installAssets[index].installPath}.bak`, layout.assetPrefix);
|
|
433
|
-
await ensureDirectory(root, dirname(backup).replaceAll("\\", "/"), createdDirectories);
|
|
434
|
-
if (await assertSafeExistingPath(root, backup, true)) {
|
|
435
|
-
if (!(await readFile(resolve(root, backup))).equals(existing[index]))
|
|
436
|
-
throw new ProjectInitializationError("conflict", "Existing v0.11 migration backup differs.");
|
|
437
|
-
}
|
|
438
|
-
else
|
|
439
|
-
await createFile(resolve(root, backup), existing[index].toString("utf8"), createdFiles);
|
|
440
|
-
preservedLegacyPaths.push(backup);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
432
|
if (layout.controlIgnore ?? !layout.preserveAllLegacy) {
|
|
444
433
|
await ensureProjectLunaControlIgnore(root, createdFiles, modifiedFiles, createdDirectories);
|
|
445
434
|
}
|
|
@@ -522,14 +511,6 @@ async function profileInstallation(id, global) {
|
|
|
522
511
|
throw new ProjectInitializationError("invalid-project", "Unknown runtime profile.");
|
|
523
512
|
if (id === "stable")
|
|
524
513
|
return { layout: global ? GLOBAL_LAYOUT : PROJECT_LAYOUT, assets: runtimeAssets };
|
|
525
|
-
if (id === "v011") {
|
|
526
|
-
const module = await import(__rewriteRelativeImportExtension(`../runtime-assets-v011.${import.meta.url.endsWith(".ts") ? "ts" : "js"}`));
|
|
527
|
-
return { layout: { ...(global ? GLOBAL_LAYOUT : PROJECT_LAYOUT),
|
|
528
|
-
markerPath: global ? profile.markerFile : `${OPEN_CODE_DIRECTORY}/${profile.markerFile}`,
|
|
529
|
-
previousMarkerPath: global ? "sortie-dogs-v010.version" : `${OPEN_CODE_DIRECTORY}/sortie-dogs-v010.version`,
|
|
530
|
-
preserveExistingPaths: ["agent/dog-reviewer-v010.md", "agent/dog-advisor-v010.md"],
|
|
531
|
-
preserveAllLegacy: false, controlIgnore: false, legacyAssets: [] }, assets: module.runtimeAssets };
|
|
532
|
-
}
|
|
533
514
|
const module = await import(__rewriteRelativeImportExtension(`../runtime-assets-v010.${import.meta.url.endsWith(".ts") ? "ts" : "js"}`));
|
|
534
515
|
return { layout: { ...(global ? GLOBAL_LAYOUT : PROJECT_LAYOUT),
|
|
535
516
|
markerPath: global ? profile.markerFile : `${OPEN_CODE_DIRECTORY}/${profile.markerFile}`,
|