sortie-dogs 0.11.0 → 0.11.2

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 CHANGED
@@ -51,6 +51,12 @@ The auxiliary settings select Luna6 Fast for summaries and titles. Keep any
51
51
  additional settings on those agents. Sortie permits SOL6 and Luna6 for its
52
52
  execution requests; reviewer/advisor model selections are independent.
53
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
+
54
60
  Restart the OpenCode host after installing or updating the plugin, then run:
55
61
 
56
62
  ```text
@@ -91,6 +97,22 @@ execution plan, exact-file manifest, or model-authored proof mapping.
91
97
  Technical scope and useful verification commands are discovered while working.
92
98
  Project `AGENTS.md`, user instructions and native OpenCode permissions remain authoritative.
93
99
 
100
+ ### Execution progress and bounded discovery
101
+
102
+ The native child call publishes host-observed progress every five seconds: elapsed
103
+ time, current inspection/command, last exit, command starts and edits. The same
104
+ information is available through `sortie_v011_work_status`. Activity is never
105
+ treated as completed work or an inferred benchmark score. Long jobs should reuse
106
+ their existing controller and ledger, rather than rebuilding one before launch.
107
+
108
+ By default, 12 inspection calls or three minutes without an executable step stop
109
+ the child with a **blocked** reason. A running native shell/check keeps its own
110
+ timeout. Resuming a discovery stall requires concrete next-step guidance; the same
111
+ child, user instructions, failed checks and attempt budget are retained. Plugin
112
+ options `maxDiscoveryCalls`, `maxPlanningMs` and `progressIntervalMs` configure these
113
+ bounds. Interrupted outgoing tool calls receive an explicitly unverified error
114
+ result when native history omitted one; stored history and check evidence are preserved.
115
+
94
116
  ### Roles and models
95
117
 
96
118
  | Role | Model | Responsibility |
@@ -4,5 +4,5 @@
4
4
  */
5
5
  export declare const RUNTIME_ASSET_VERSION = "0.3.89-completion-proof-v1";
6
6
  export declare const V010_RUNTIME_ASSET_VERSION = "0.10.0-v0912-language4-cost-rpt10-compaction-ref2-proposal1-review-remediation1-surface4-proposal-recovery2-quality1-terminal2-route1-path1-permission2-prerequisite1-v2-bridge1-intent1-reflection1-cancel1-proposal-budget1-goal-recovery1-delegate-execute1-v2-depth1-process-replacement1-unstarted-v2-1-cold-turn1-return-report-v2-2-root-revision1";
7
- export declare const V011_RUNTIME_ASSET_VERSION = "0.11.0-user-proxy-native-v3-failure-boundary";
7
+ export declare const V011_RUNTIME_ASSET_VERSION = "0.11.2-user-proxy-execution-first-v1";
8
8
  export type RuntimeAssetVersion = typeof RUNTIME_ASSET_VERSION | typeof V010_RUNTIME_ASSET_VERSION | typeof V011_RUNTIME_ASSET_VERSION;
@@ -4,4 +4,4 @@
4
4
  */
5
5
  export const RUNTIME_ASSET_VERSION = "0.3.89-completion-proof-v1";
6
6
  export const V010_RUNTIME_ASSET_VERSION = "0.10.0-v0912-language4-cost-rpt10-compaction-ref2-proposal1-review-remediation1-surface4-proposal-recovery2-quality1-terminal2-route1-path1-permission2-prerequisite1-v2-bridge1-intent1-reflection1-cancel1-proposal-budget1-goal-recovery1-delegate-execute1-v2-depth1-process-replacement1-unstarted-v2-1-cold-turn1-return-report-v2-2-root-revision1";
7
- export const V011_RUNTIME_ASSET_VERSION = "0.11.0-user-proxy-native-v3-failure-boundary";
7
+ export const V011_RUNTIME_ASSET_VERSION = "0.11.2-user-proxy-execution-first-v1";
@@ -1,3 +1,4 @@
1
+ import { type WorkActivity, type WorkProgress } from "./work-progress.js";
1
2
  export declare const WORK_REFERENCE = "SORTIE_V011_WORK_REF ";
2
3
  export declare const WORK_LIMITS: {
3
4
  readonly attempts: 6;
@@ -6,7 +7,7 @@ export declare const WORK_LIMITS: {
6
7
  readonly checks: 128;
7
8
  readonly outputBytes: number;
8
9
  };
9
- export type WorkPhase = "ready" | "running" | "review" | "blocked" | "interrupted" | "completed" | "cancelled";
10
+ export type WorkPhase = "ready" | "running" | "waiting" | "review" | "yielded" | "blocked" | "interrupted" | "completed" | "cancelled";
10
11
  export interface WorkRequest {
11
12
  id: string;
12
13
  text: string;
@@ -34,12 +35,44 @@ export interface WorkCheck {
34
35
  after: string;
35
36
  output: string;
36
37
  at: number;
38
+ pending?: boolean;
37
39
  }
38
40
  export interface WorkCheckReplacement {
39
41
  check: string;
40
42
  replacement: string;
41
43
  reason: string;
42
44
  }
45
+ export interface WorkCommand {
46
+ id: string;
47
+ callID: string;
48
+ command: string;
49
+ timeout: number;
50
+ at: number;
51
+ status: "launching" | "completed" | "interrupted";
52
+ exit: number | null;
53
+ output: string;
54
+ nativeID?: string;
55
+ nativeFile?: string;
56
+ nativeStatus?: string;
57
+ retryOf?: string;
58
+ }
59
+ export interface WorkUsageReceipt {
60
+ session: string;
61
+ model: string;
62
+ tokens: number | null;
63
+ usd: number | null;
64
+ tier?: string;
65
+ requestedTier?: string;
66
+ local?: boolean;
67
+ pending?: boolean;
68
+ }
69
+ export interface WorkAuxiliaryUsage {
70
+ id: string;
71
+ root: string;
72
+ at: number;
73
+ kind: string;
74
+ receipt: WorkUsageReceipt;
75
+ }
43
76
  export interface WorkState {
44
77
  version: 1;
45
78
  id: string;
@@ -54,6 +87,7 @@ export interface WorkState {
54
87
  child: string | null;
55
88
  baseline: SourceSnapshot;
56
89
  checks: WorkCheck[];
90
+ settledCallID?: string;
57
91
  startedAt: number;
58
92
  updatedAt: number;
59
93
  report: string;
@@ -66,11 +100,70 @@ export interface WorkState {
66
100
  intent: string;
67
101
  evidence?: string;
68
102
  };
103
+ sourceView?: {
104
+ fingerprint: string;
105
+ changed: string[];
106
+ at: number;
107
+ };
69
108
  checkReplacements?: WorkCheckReplacement[];
109
+ progress?: WorkProgress;
110
+ commands?: WorkCommand[];
111
+ controller?: {
112
+ path: string;
113
+ stopCommand?: string;
114
+ runID: string | null;
115
+ status: string;
116
+ input: string | null;
117
+ snapshot?: Record<string, unknown>;
118
+ notified?: boolean;
119
+ };
120
+ presentation?: {
121
+ id: string;
122
+ report: string;
123
+ };
124
+ directory?: string;
125
+ usage?: {
126
+ tokens: number | null;
127
+ usd: number | null;
128
+ models: Array<{
129
+ model: string;
130
+ tokens: number;
131
+ }>;
132
+ estimatedUsd?: number;
133
+ unpricedRequests?: number;
134
+ requests?: number;
135
+ meteredAt?: number;
136
+ };
137
+ userStopped?: boolean;
138
+ usageReceipts?: Record<string, WorkUsageReceipt>;
139
+ supportSessions?: Array<{
140
+ id: string;
141
+ role: string;
142
+ }>;
143
+ usageUntil?: number;
144
+ attemptLimit?: number;
145
+ attemptExtensions?: Array<{
146
+ at: number;
147
+ attempts: number;
148
+ limit: number;
149
+ evidence: string[];
150
+ assessment: string;
151
+ }>;
70
152
  }
71
153
  export interface WorkStore {
72
154
  get(key: string): Promise<unknown>;
73
155
  set(key: string, value: unknown): Promise<void>;
156
+ scan?(options: {
157
+ prefix: string;
158
+ after?: string;
159
+ limit?: number;
160
+ }): Promise<{
161
+ entries: Array<{
162
+ key: string;
163
+ value: unknown;
164
+ }>;
165
+ next?: string;
166
+ }>;
74
167
  }
75
168
  export declare const isRecord: (value: unknown) => value is Record<string, any>;
76
169
  /** Content identity, including new nonignored files. Git commits do not invalidate identical source. */
@@ -93,23 +186,63 @@ export declare class WorkLoop {
93
186
  private read;
94
187
  private update;
95
188
  current(root: string): Promise<WorkState | null>;
189
+ progress(root: string): Promise<WorkProgress | null>;
190
+ operatorNudge(root: string): Promise<number>;
191
+ usage(root: string, workID: string, usage: NonNullable<WorkState["usage"]>): Promise<void>;
192
+ support(root: string, id: string, role: string): Promise<void>;
193
+ meter(root: string, workID: string, receipts: Record<string, WorkUsageReceipt>): Promise<void>;
194
+ private updateUsageWork;
195
+ auxiliaryUsage(value: WorkAuxiliaryUsage): Promise<void>;
196
+ auxiliaryReceipts(root: string, since: number, until?: number): Promise<WorkAuxiliaryUsage[]>;
197
+ presentation(root: string, id: string, report: string): Promise<{
198
+ id: string;
199
+ report: string;
200
+ }>;
201
+ controller(root: string, path: string, snapshot?: Record<string, unknown>): Promise<void>;
202
+ controllerNotified(root: string): Promise<void>;
203
+ bindController(root: string, path: string, stopCommand: string): Promise<void>;
204
+ retained(): Promise<WorkState[]>;
205
+ private evidence;
96
206
  inspect(root: string, actor: string): Promise<{
97
207
  work: WorkState | null;
98
208
  source: SourceSnapshot;
99
209
  }>;
100
210
  observe(root: string, request: WorkRequest): Promise<void>;
101
- start(root: string, instructions: string): Promise<WorkState>;
211
+ start(root: string, instructions: string, evidence?: string[], graceMs?: number): Promise<WorkState>;
102
212
  task(work: WorkState): {
103
213
  sessionID?: string | undefined;
104
214
  agent: string;
105
215
  description: string;
106
216
  prompt: string;
107
217
  };
218
+ attemptLimit(work: WorkState): number;
219
+ private continuationBudget;
108
220
  admit(root: string, callID: string, input: Record<string, unknown>): Promise<void>;
109
221
  claim(root: string, child: string, prompt: string): Promise<string>;
110
222
  assertWorker(root: string, child: string): Promise<WorkState>;
223
+ activity(root: string, child: string, activity: WorkActivity, result?: {
224
+ status: string;
225
+ exit: number | null;
226
+ }): Promise<void>;
227
+ stall(root: string, callID: string, reason: string): Promise<boolean>;
228
+ beginCommand(root: string, callID: string, command: string, timeout: number, retryOf?: string): Promise<{
229
+ command: WorkCommand;
230
+ launch: boolean;
231
+ }>;
232
+ nativeCommand(root: string, id: string, nativeID: string, result?: {
233
+ status: string;
234
+ exit: number | null;
235
+ output: string;
236
+ file?: string;
237
+ }): Promise<void>;
238
+ endCommand(root: string, id: string, result: {
239
+ exit: number | null;
240
+ interrupted: boolean;
241
+ output: string;
242
+ rejected?: boolean;
243
+ }): Promise<void>;
111
244
  check(root: string, actor: string, command: string, timeout: number, signal?: AbortSignal, execute?: typeof runWorkCheck): Promise<WorkCheck>;
112
245
  settled(root: string, callID: string, succeeded: boolean, report: string): Promise<void>;
113
246
  interrupt(root: string, cancelled?: boolean): Promise<void>;
114
- review(root: string, decision: "accept" | "revise" | "blocked", assessment: string, checks: string[], replacements?: WorkCheckReplacement[]): Promise<WorkState>;
247
+ review(root: string, decision: "accept" | "revise" | "blocked", assessment: string, checks: string[], replacements?: WorkCheckReplacement[], graceMs?: number): Promise<WorkState>;
115
248
  }