sortie-dogs 0.4.8 → 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.
Files changed (35) hide show
  1. package/README.md +15 -14
  2. package/dist/asset-version.d.ts +1 -1
  3. package/dist/asset-version.js +1 -1
  4. package/dist/core/scope-lease-registry.d.ts +53 -0
  5. package/dist/core/scope-lease-registry.js +560 -0
  6. package/dist/core/types.d.ts +208 -1
  7. package/dist/core/validate-schema.d.ts +2 -1
  8. package/dist/core/validate-schema.js +98 -0
  9. package/dist/core/validate-worktree-parallel.d.ts +2 -0
  10. package/dist/core/validate-worktree-parallel.js +139 -0
  11. package/dist/core/worktree-commit-artifact.d.ts +15 -0
  12. package/dist/core/worktree-commit-artifact.js +1076 -0
  13. package/dist/core/worktree-integration-queue.d.ts +57 -0
  14. package/dist/core/worktree-integration-queue.js +956 -0
  15. package/dist/core/worktree-lifecycle.d.ts +86 -0
  16. package/dist/core/worktree-lifecycle.js +983 -0
  17. package/dist/core/worktree-parallel-dispatch.d.ts +61 -0
  18. package/dist/core/worktree-parallel-dispatch.js +1033 -0
  19. package/dist/core/worktree-scope.d.ts +9 -0
  20. package/dist/core/worktree-scope.js +23 -0
  21. package/dist/index.d.ts +12 -0
  22. package/dist/index.js +8 -0
  23. package/dist/plugin/continuation.d.ts +2 -0
  24. package/dist/plugin/continuation.js +33 -12
  25. package/dist/plugin/fast-lane.d.ts +4 -1
  26. package/dist/plugin/fast-lane.js +70 -27
  27. package/dist/plugin/gate.d.ts +8 -0
  28. package/dist/plugin/gate.js +226 -12
  29. package/dist/plugin/index.d.ts +1 -0
  30. package/dist/plugin/index.js +1393 -85
  31. package/dist/plugin/model-routing.d.ts +4 -4
  32. package/dist/plugin/model-routing.js +4 -4
  33. package/dist/runtime-assets.d.ts +8 -8
  34. package/dist/runtime-assets.js +327 -111
  35. package/package.json +5 -3
package/README.md CHANGED
@@ -20,7 +20,7 @@ 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.4.8](https://github.com/zufall-upon/Sortie-dogs/releases/tag/v0.4.8)
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-terra` with the `medium` variant; `dog-scout` defaults to
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
- - **Evidence gathering without uncontrolled fan-out.** One bounded scout runs only
207
- when a concrete manifest, validation, or ownership gap exists before implementation.
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
- - **One bounded implementation unit.** A normal turn permits one worker; explicit
211
- backlog drain advances later independent units one at a time across continuations.
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
@@ -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 on Luna, coordinator state and routing on Terra,
292
- and independent review on Sol unless the host declares another target.
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-terra` with the `medium` variant. Coordinator work repeatedly
295
- processes the root context but is primarily state management and routing, so
296
- Terra is the cost-conscious middle tier between Luna and Sol. Project or global
297
- `modelRouting` can override this default. If the host proves Terra unavailable,
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-terra", "variant": "medium" }
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" }
@@ -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.12-dispatch-preflight-v1";
5
+ export declare const RUNTIME_ASSET_VERSION = "0.3.32-terminal-outcome-v1";
6
6
  export type RuntimeAssetVersion = typeof RUNTIME_ASSET_VERSION;
@@ -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.12-dispatch-preflight-v1";
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
+ }