sortie-dogs 0.12.19 → 0.12.21
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 +7 -0
- package/dist/asset-version.d.ts +1 -1
- package/dist/asset-version.js +1 -1
- package/dist/core/operator-mission.d.ts +70 -0
- package/dist/core/operator-mission.js +45 -2
- package/dist/core/operator-runtime.d.ts +34 -2
- package/dist/core/operator-runtime.js +82 -0
- package/dist/plugin/index.js +64 -19
- package/dist/plugin/mission-progress.js +4 -0
- package/dist/plugin/profiled.js +400 -21
- package/dist/plugin/protected-snapshot.d.ts +3 -0
- package/dist/plugin/protected-snapshot.js +18 -0
- package/dist/plugin/v2.js +1 -1
- package/dist/runtime-mission-assets.js +39 -1
- package/package.json +1 -1
|
@@ -86,6 +86,24 @@ export async function operationInputSnapshot(projectRoot, binding) {
|
|
|
86
86
|
? await declaredScopeDigest(projectRoot, paths, hash, true, outputs)
|
|
87
87
|
: await protectedScopeDigest(projectRoot, paths, hash, binding.source_policy, outputs);
|
|
88
88
|
}
|
|
89
|
+
/** A validation may populate write-only caches. Keep its declared read inputs stable
|
|
90
|
+
* while binding the resulting candidate (including those outputs) after the command. */
|
|
91
|
+
export async function validationInputSnapshot(projectRoot, binding) {
|
|
92
|
+
const manifestSource = await readFile(resolve(projectRoot, binding.manifest_path)).catch(() => undefined);
|
|
93
|
+
if (!manifestSource || `sha256:${createHash("sha256").update(manifestSource).digest("hex")}` !== binding.manifest_hash)
|
|
94
|
+
return undefined;
|
|
95
|
+
const manifest = JSON.parse(manifestSource.toString("utf8"));
|
|
96
|
+
if (!manifest.read.length)
|
|
97
|
+
return undefined; // Keep the original full-source check when no inputs were declared.
|
|
98
|
+
const paths = manifest.read.map(entry => {
|
|
99
|
+
const path = normalizeManifestScope(entry);
|
|
100
|
+
return path.kind === "relative" ? resolve(projectRoot, path.path) : resolve(path.path);
|
|
101
|
+
});
|
|
102
|
+
const hash = binding.manifest_hash.slice("sha256:".length);
|
|
103
|
+
return binding.source_policy === "declared-paths-v1"
|
|
104
|
+
? declaredScopeDigest(projectRoot, paths, hash, true)
|
|
105
|
+
: protectedScopeDigest(projectRoot, paths, hash, binding.source_policy);
|
|
106
|
+
}
|
|
89
107
|
export async function protectedSnapshot(authorization) {
|
|
90
108
|
const manifestSource = await readFile(authorization.manifestPath).catch(() => undefined);
|
|
91
109
|
if (manifestSource === undefined)
|
package/dist/plugin/v2.js
CHANGED
|
@@ -492,7 +492,7 @@ async function registerV2Hooks(context, hooks) {
|
|
|
492
492
|
if (record(event.tools)) {
|
|
493
493
|
const visible = {
|
|
494
494
|
"dog-operator": ["start_mission", "plan_units", "operator_next", "operator_status", "expand_unit", "review_mission", "complete_mission", "cancel_operator", "reflection"],
|
|
495
|
-
"dogs-coordinator": ["plan_units", "operator_next", "operator_status", "expand_unit", "review_mission", "submit_mission"],
|
|
495
|
+
"dogs-coordinator": ["plan_units", "operator_next", "operator_status", "expand_unit", "review_mission", "submit_mission", "skip_mission_consultation", "retry_mission_unit", "rescue_mission_unit"],
|
|
496
496
|
"dog-worker-v010": ["bind_write_gate", "release_write_gate", "operator_status"],
|
|
497
497
|
"dog-luna-worker-v010": ["bind_write_gate", "release_write_gate", "operator_status"],
|
|
498
498
|
"dog-reviewer-v010": [], "dog-scout-v010": [], "dog-advisor-v010": [],
|
|
@@ -13,6 +13,13 @@ For tag observation use git tag --points-at <commit>. For HTTPS downloads use cu
|
|
|
13
13
|
--write-out '%{http_code} %{size_download}\\n' may print metadata to stdout. Declare all actual outputs.
|
|
14
14
|
Reuse pinned artifacts and successful checks when the request permits and the inputs are unchanged.
|
|
15
15
|
Do not repeat candidate discovery, dependency setup or validation merely because a Worker changed.
|
|
16
|
+
Before launching a detached operation, verify supported options and budget from the CLI/preflight;
|
|
17
|
+
a preview is not the live run. Check the actual state after launch, before relying on its limits.
|
|
18
|
+
Run each declared execution command as the exact native shell input; do not append a tee pipeline,
|
|
19
|
+
redirection or wrapper that was not declared. The host observes that command, not a nearby script or result file.
|
|
20
|
+
Save its output separately when needed. A successful launch only proves the process started;
|
|
21
|
+
use that same run's terminal state and official result for completion, never launch it again
|
|
22
|
+
to repair a missing observation.
|
|
16
23
|
`;
|
|
17
24
|
function controls(profile, names) {
|
|
18
25
|
return names.map(name => ` ${profile.toolPrefix}${name}: true`).join("\n");
|
|
@@ -56,6 +63,13 @@ quality threshold and explicit model/budget choice. Follow AGENTS.md and use the
|
|
|
56
63
|
When the user replaces a version, target, parallelism or other requirement, call start_mission with
|
|
57
64
|
intent: "replace" and the complete current requirements. The host cancels/archives the old run and
|
|
58
65
|
retains spend/results; superseded instructions are history, not additional obligations.
|
|
66
|
+
If status/start_mission reports mission-source-reconciliation-required, do not dispatch its Task
|
|
67
|
+
or declare the user's work impossible. Compare the saved requirements with the user's current
|
|
68
|
+
scope. When they reflect an already requested narrowing/change, call start_mission with intent:
|
|
69
|
+
"replace" and the exact saved requirements. The host links the cancelled predecessor to the
|
|
70
|
+
SAME mission before any Worker starts, retains its Coordinator and cumulative spend, and checks
|
|
71
|
+
old children before preparing a Worker. This is not permission to discard unchanged acceptance:
|
|
72
|
+
if the scope is uncertain, ask the user which requirements remain instead of inferring a replacement.
|
|
59
73
|
2. Dispatch the returned ${profileAgent(profile, "dog-operator")} task immediately. It owns investigation,
|
|
60
74
|
unit boundaries, Worker/Scout/Advisor/independent Reviewer calls, write-scope extensions and corrections
|
|
61
75
|
within the original request and cumulative budget. Do not investigate or approve each unit at the root.
|
|
@@ -81,6 +95,8 @@ results to guide the following units. Do not invent preparation units or plan-ap
|
|
|
81
95
|
For operations, plan_units.execution names the actual run/grade commands and working directory. Keep
|
|
82
96
|
setup, execution and result collection in the same Worker. The host records native execution; NO_START
|
|
83
97
|
or setup success cannot complete the operation. Reward/score zero is a result, not failure to execute.
|
|
98
|
+
Do not turn a chosen preflight step into a user requirement that the live run's state exists before launch.
|
|
99
|
+
Observe supported flags and budget before launch, then observe the real state immediately after launch.
|
|
84
100
|
Use requirement_ids when splitting multiple requirements across units; a single unit inherits all requirements
|
|
85
101
|
when they are omitted. These are related requirements,
|
|
86
102
|
not claims that a command proves every semantic obligation. Compare the final result yourself.
|
|
@@ -135,7 +151,7 @@ permission:
|
|
|
135
151
|
${profileAgent(profile, "dog-advisor")}: allow
|
|
136
152
|
tools:
|
|
137
153
|
"sortie_*": false
|
|
138
|
-
${controls(profile, ["plan_units", "operator_next", "operator_status", "expand_unit", "review_mission", "submit_mission"])}
|
|
154
|
+
${controls(profile, ["plan_units", "operator_next", "operator_status", "expand_unit", "review_mission", "submit_mission", "skip_mission_consultation", "retry_mission_unit", "rescue_mission_unit"])}
|
|
139
155
|
---
|
|
140
156
|
# ${profileAgent(profile, "dog-operator")}
|
|
141
157
|
|
|
@@ -190,6 +206,10 @@ ${profileAgent(profile, "dog-worker")} task verbatim, in foreground. V2 maps sub
|
|
|
190
206
|
task_id to sessionID. Do not insert model overrides unless the user explicitly selected them.
|
|
191
207
|
|
|
192
208
|
After each Worker returns, use its actual report and host evidence. Continue pending units with operator_next.
|
|
209
|
+
If plan_units returns mission-source-reconciliation-required, do not retry the same plan. The
|
|
210
|
+
root-only Operator must reconcile the prior cancelled run. Submit status=blocked with the saved
|
|
211
|
+
requirements and exact host diagnostic, then return; do not declare a user-only decision when
|
|
212
|
+
the current request already narrowed the old scope.
|
|
193
213
|
For a needed write-scope addition within the original request, call expand_unit with unit_id, paths and
|
|
194
214
|
reason; the host returns a replacement contract without Operator approval. For a changed approach, formal
|
|
195
215
|
check or reviewer finding, call plan_units with the corrected units and a short observed reason. Replanning
|
|
@@ -213,6 +233,22 @@ the header, correct and redispatch this same consultation once before proceeding
|
|
|
213
233
|
do not investigate runtime policy or bounce the question to Operator. Use your existing evidence
|
|
214
234
|
and ask a bounded question in the user's language; do not send generic exploratory delegations.
|
|
215
235
|
If the user explicitly requested Advisor input before a decision, do not treat it as optional.
|
|
236
|
+
Actual Advisor/Scout dispatches are recorded in operator_status with their trigger/code, bounded question,
|
|
237
|
+
observed model and native outcome. When you considered a concrete decision or missing fact but existing
|
|
238
|
+
evidence makes consultation unnecessary, record the role and concise skip reason with
|
|
239
|
+
${profile.toolPrefix}skip_mission_consultation. Record only meaningful considered skips, not a generic
|
|
240
|
+
"not needed" for each unit. This is observation only: it neither requires consultation nor adds approval.
|
|
241
|
+
|
|
242
|
+
After a Mission Worker returns a host-classified failed declared validation (not a Task launch error, contract
|
|
243
|
+
defect, cancellation, or unknown outcome), you may call ${profile.toolPrefix}retry_mission_unit once for that unit.
|
|
244
|
+
It reuses the exact scope, acceptance and validation under the ordinary cumulative budget. If that same normal
|
|
245
|
+
remediation then fails the same declared validation and native termination/writer release are confirmed, you may
|
|
246
|
+
call ${profile.toolPrefix}rescue_mission_unit once. The host records the Astra model actually selected, or a
|
|
247
|
+
specific non_rescue reason; do not expose or substitute the legacy sortie_execute_terminal_rescue capability.
|
|
248
|
+
Rescue is still a normal current-Mission Worker dispatch: its declared validation must pass, then the existing
|
|
249
|
+
independent review, final evidence check and root complete_mission acceptance remain mandatory. A Worker return
|
|
250
|
+
or rescue dispatch alone is never success. On non_rescue, continue the ordinary correction/replan within the same
|
|
251
|
+
requirements and remaining budget; never bypass a failure class or create another run to reset spend.
|
|
216
252
|
|
|
217
253
|
After formal validation, call review_mission with risk_tags and one concise implementation/test trace per
|
|
218
254
|
requirement. For changed failure behavior, connect the operation and concrete input to the contract-derived
|
|
@@ -228,6 +264,8 @@ it with sharper traces and evidence: [{path, offset, limit}] from the existing o
|
|
|
228
264
|
Declared external input/output excerpts remain available. The host caps evidence-only reviews; at its limit,
|
|
229
265
|
review is closed with gaps, but ready still requires the requested operation/result to be complete.
|
|
230
266
|
Running an existing procedure alone is not a public-logic source change; use the low-risk skip where applicable.
|
|
267
|
+
Evaluating an unchanged published package is not a release or source edit: use the native execution,
|
|
268
|
+
result and hash records rather than adding an independent source-review round solely for its label.
|
|
231
269
|
Preserve candidate lineage and independence; your own opinion or Worker PASS is not independent review.
|
|
232
270
|
|
|
233
271
|
Call submit_mission only for: ready (complete candidate with evidence/review), needs-decision (only the user
|