sortie-dogs 0.4.7 → 0.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 +23 -22
- package/dist/asset-version.d.ts +1 -1
- package/dist/asset-version.js +1 -1
- package/dist/core/scope-lease-registry.d.ts +53 -0
- package/dist/core/scope-lease-registry.js +560 -0
- package/dist/core/types.d.ts +208 -1
- package/dist/core/validate-schema.d.ts +2 -1
- package/dist/core/validate-schema.js +98 -0
- package/dist/core/validate-worktree-parallel.d.ts +2 -0
- package/dist/core/validate-worktree-parallel.js +139 -0
- package/dist/core/worktree-commit-artifact.d.ts +15 -0
- package/dist/core/worktree-commit-artifact.js +1076 -0
- package/dist/core/worktree-integration-queue.d.ts +57 -0
- package/dist/core/worktree-integration-queue.js +956 -0
- package/dist/core/worktree-lifecycle.d.ts +86 -0
- package/dist/core/worktree-lifecycle.js +983 -0
- package/dist/core/worktree-parallel-dispatch.d.ts +61 -0
- package/dist/core/worktree-parallel-dispatch.js +1033 -0
- package/dist/core/worktree-scope.d.ts +9 -0
- package/dist/core/worktree-scope.js +23 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +8 -0
- package/dist/plugin/continuation.d.ts +2 -0
- package/dist/plugin/continuation.js +33 -12
- package/dist/plugin/fast-lane.d.ts +4 -1
- package/dist/plugin/fast-lane.js +70 -27
- package/dist/plugin/gate.d.ts +8 -0
- package/dist/plugin/gate.js +226 -12
- package/dist/plugin/index.d.ts +1 -0
- package/dist/plugin/index.js +1544 -71
- package/dist/plugin/model-routing.d.ts +4 -4
- package/dist/plugin/model-routing.js +4 -4
- package/dist/runtime-assets.d.ts +8 -8
- package/dist/runtime-assets.js +346 -127
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
|
|
12
12
|

|
|
13
13
|
|
|
14
|
-
Sortie-dogs is an opt-in OpenCode orchestration plugin. It turns a task into a
|
|
15
|
-
scoped plan,
|
|
16
|
-
validation, and evidence-backed completion—while preserving standard OpenCode
|
|
17
|
-
agents and settings.
|
|
14
|
+
Sortie-dogs is an opt-in OpenCode orchestration plugin. It turns a task into a
|
|
15
|
+
scoped plan, optional evidence gathering, one bounded implementation unit, canonical
|
|
16
|
+
validation, and evidence-backed completion—while preserving standard OpenCode
|
|
17
|
+
agents and settings.
|
|
18
18
|
|
|
19
19
|
Requirements: Node.js 22.6 or newer, npm, and OpenCode.
|
|
20
20
|
|
|
21
21
|
Guides: [日本語](docs/guide-ja.md) · [简体中文](docs/guide-zh-CN.md) · [CLI testing](docs/cli-testing.md)
|
|
22
22
|
|
|
23
|
-
Release: [v0.
|
|
23
|
+
Release: [v0.5.0](https://github.com/zufall-upon/Sortie-dogs/releases/tag/v0.5.0)
|
|
24
24
|
|
|
25
25
|
## Quick start
|
|
26
26
|
|
|
@@ -62,7 +62,7 @@ to the `plugin` array of the OpenCode configuration the agents run under —
|
|
|
62
62
|
Restart OpenCode afterwards. A `plugin` entry must name the package, not a
|
|
63
63
|
subpath: `sortie-dogs/plugin` is an import specifier, not a plugin specifier.
|
|
64
64
|
|
|
65
|
-
`dog-coordinator` defaults to `openai/gpt-5.6-
|
|
65
|
+
`dog-coordinator` defaults to `openai/gpt-5.6-luna` with the `max` variant; `dog-scout` defaults to
|
|
66
66
|
`openai/gpt-5.6-luna`. To pin either role to another model, save this
|
|
67
67
|
as `.opencode/sortie-dogs.json`:
|
|
68
68
|
|
|
@@ -203,12 +203,14 @@ global file for durable global settings.
|
|
|
203
203
|
|
|
204
204
|
- **Focused when invited, invisible otherwise.** Activate it with `/sortie` or
|
|
205
205
|
select `dog-coordinator`; ordinary OpenCode sessions remain unchanged.
|
|
206
|
-
- **
|
|
207
|
-
|
|
206
|
+
- **Evidence gathering without arbitrary dispatch ceilings.** A bounded scout resolves
|
|
207
|
+
each concrete manifest, validation, or ownership gap whenever it appears; unchanged
|
|
208
|
+
requests are not repeated.
|
|
208
209
|
- **Writes stay inside the assignment.** Exact source or operation manifests
|
|
209
210
|
gate edits and handoffs.
|
|
210
|
-
- **
|
|
211
|
-
|
|
211
|
+
- **Autonomous sequential implementation.** A normal request may use as many sequential
|
|
212
|
+
workers as its accepted scope requires. Concurrent fan-out still needs the explicit
|
|
213
|
+
parallel contract.
|
|
212
214
|
- **Runtime overlap protection.** Active equal or ancestor write scopes are rejected
|
|
213
215
|
before mutation, and full validation waits until every parallel unit joins.
|
|
214
216
|
- **Evidence before completion.** Canonical validation, risk-based review, and
|
|
@@ -223,8 +225,8 @@ An illustrative low-risk run stays bounded and reports its gates:
|
|
|
223
225
|
```text
|
|
224
226
|
You: /sortie Add the requested behavior
|
|
225
227
|
dog-coordinator: manifest confirmed
|
|
226
|
-
dog-scout
|
|
227
|
-
dog-worker: implementation complete
|
|
228
|
+
dog-scout: skipped — no concrete evidence gap
|
|
229
|
+
dog-worker: implementation complete
|
|
228
230
|
validation: npm test — PASS
|
|
229
231
|
review: skipped — low risk
|
|
230
232
|
dog-coordinator: completion evidence accepted
|
|
@@ -234,8 +236,8 @@ dog-coordinator: completion evidence accepted
|
|
|
234
236
|
|
|
235
237
|
1. **Brief and plan** — `dog-coordinator` turns the request into acceptance
|
|
236
238
|
criteria, a write manifest, and validation requirements.
|
|
237
|
-
2. **
|
|
238
|
-
|
|
239
|
+
2. **Optional scout** — one bounded, read-only investigation runs only for a
|
|
240
|
+
concrete pre-worker evidence gap.
|
|
239
241
|
3. **Dedicated worker** — the dedicated worker implements only the approved
|
|
240
242
|
manifest and also owns scoped remediation or blocker resolution.
|
|
241
243
|
4. **Canonical validation** — the declared test or build command must produce
|
|
@@ -288,13 +290,13 @@ untouched.
|
|
|
288
290
|
## Model routing
|
|
289
291
|
|
|
290
292
|
Default routes split work by required capability and repeated-context cost.
|
|
291
|
-
Sortie-dogs keeps retrieval
|
|
292
|
-
|
|
293
|
+
Sortie-dogs keeps retrieval and coordinator routing on Luna, and independent
|
|
294
|
+
review on Sol unless the host declares another target.
|
|
293
295
|
|
|
294
|
-
`dog-coordinator` defaults to `openai/gpt-5.6-
|
|
295
|
-
processes the root context
|
|
296
|
-
Terra
|
|
297
|
-
|
|
296
|
+
`dog-coordinator` defaults to `openai/gpt-5.6-luna` with the `max` variant. Coordinator work repeatedly
|
|
297
|
+
processes the root context, so Luna Max keeps deliberation high without paying
|
|
298
|
+
Terra rates for every cached turn. Project or global `modelRouting` can override
|
|
299
|
+
this default. If the host proves Luna unavailable,
|
|
298
300
|
the existing availability policy uses a configured free-tier fallback when present
|
|
299
301
|
and otherwise preserves the session model.
|
|
300
302
|
|
|
@@ -332,7 +334,7 @@ actually serve.
|
|
|
332
334
|
{
|
|
333
335
|
"modelRouting": {
|
|
334
336
|
"dog-coordinator": {
|
|
335
|
-
"preferred": { "model": "openai/gpt-5.6-
|
|
337
|
+
"preferred": { "model": "openai/gpt-5.6-luna", "variant": "max" }
|
|
336
338
|
},
|
|
337
339
|
"dog-scout": {
|
|
338
340
|
"preferred": { "model": "openai/gpt-5.6-luna", "variant": "high" }
|
|
@@ -347,7 +349,6 @@ actually serve.
|
|
|
347
349
|
},
|
|
348
350
|
"modelCatalog": {
|
|
349
351
|
"project": [
|
|
350
|
-
{ "model": "openai/gpt-5.6-terra", "variants": ["medium"] },
|
|
351
352
|
{ "model": "openai/gpt-5.6-sol", "variants": ["medium", "xhigh"] },
|
|
352
353
|
{ "model": "openai/gpt-5.6-luna", "variants": ["max", "high"] },
|
|
353
354
|
{ "model": "anthropic/claude-opus-5" }
|
package/dist/asset-version.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Version of the installable runtime assets. Kept in its own module so the plugin can compare an
|
|
3
3
|
* installed project marker without importing every asset body.
|
|
4
4
|
*/
|
|
5
|
-
export declare const RUNTIME_ASSET_VERSION = "0.3.
|
|
5
|
+
export declare const RUNTIME_ASSET_VERSION = "0.3.32-terminal-outcome-v1";
|
|
6
6
|
export type RuntimeAssetVersion = typeof RUNTIME_ASSET_VERSION;
|
package/dist/asset-version.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Version of the installable runtime assets. Kept in its own module so the plugin can compare an
|
|
3
3
|
* installed project marker without importing every asset body.
|
|
4
4
|
*/
|
|
5
|
-
export const RUNTIME_ASSET_VERSION = "0.3.
|
|
5
|
+
export const RUNTIME_ASSET_VERSION = "0.3.32-terminal-outcome-v1";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type WorktreeScope } from "./worktree-scope.js";
|
|
2
|
+
export type ScopeLeaseErrorCode = "scope-conflict" | "not-held" | "corrupt-state" | "invalid-request" | "lock-timeout" | "lock-lost";
|
|
3
|
+
export declare class ScopeLeaseError extends Error {
|
|
4
|
+
readonly code: ScopeLeaseErrorCode;
|
|
5
|
+
constructor(code: ScopeLeaseErrorCode, message: string);
|
|
6
|
+
}
|
|
7
|
+
export type ScopeLeaseAcquireRequest = {
|
|
8
|
+
readonly scope: WorktreeScope;
|
|
9
|
+
readonly ownerId?: string;
|
|
10
|
+
readonly ttlMs?: number;
|
|
11
|
+
};
|
|
12
|
+
export type ScopeLeaseRegistryOptions = {
|
|
13
|
+
readonly ttlMs?: number;
|
|
14
|
+
readonly mutexRetries?: number;
|
|
15
|
+
readonly mutexRetryMs?: number;
|
|
16
|
+
readonly mutexStaleMs?: number;
|
|
17
|
+
};
|
|
18
|
+
export interface ScopeLease {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly ownerId: string;
|
|
21
|
+
readonly scope: WorktreeScope;
|
|
22
|
+
heartbeat(): Promise<void>;
|
|
23
|
+
assertHeld(): Promise<void>;
|
|
24
|
+
release(): Promise<void>;
|
|
25
|
+
abandon(): Promise<void>;
|
|
26
|
+
close(): void;
|
|
27
|
+
}
|
|
28
|
+
export declare class ScopeLeaseRegistry {
|
|
29
|
+
private readonly stateRoot;
|
|
30
|
+
private readonly statePath;
|
|
31
|
+
private readonly lockPath;
|
|
32
|
+
private readonly options;
|
|
33
|
+
constructor(stateRoot: string, options?: ScopeLeaseRegistryOptions);
|
|
34
|
+
static open(stateRoot: string, options?: ScopeLeaseRegistryOptions): ScopeLeaseRegistry;
|
|
35
|
+
acquire(request: ScopeLeaseAcquireRequest): Promise<ScopeLease>;
|
|
36
|
+
private validateRequest;
|
|
37
|
+
private makeLease;
|
|
38
|
+
private load;
|
|
39
|
+
private cleanupTemps;
|
|
40
|
+
private save;
|
|
41
|
+
private sameMutexSnapshot;
|
|
42
|
+
private sameDirectorySnapshot;
|
|
43
|
+
private mutexSnapshot;
|
|
44
|
+
private assertMutexHeld;
|
|
45
|
+
private quarantineSnapshot;
|
|
46
|
+
private sameQuarantineSnapshot;
|
|
47
|
+
private sameMovedQuarantineSnapshot;
|
|
48
|
+
private cleanupQuarantine;
|
|
49
|
+
private hasQuarantine;
|
|
50
|
+
private recoverStaleLock;
|
|
51
|
+
private removeOwnedMutex;
|
|
52
|
+
private withLock;
|
|
53
|
+
}
|