sortie-dogs 0.10.13 → 0.10.14

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.
@@ -3,5 +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.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";
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";
7
7
  export type RuntimeAssetVersion = typeof RUNTIME_ASSET_VERSION | typeof V010_RUNTIME_ASSET_VERSION;
@@ -3,4 +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.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";
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";
@@ -740,7 +740,7 @@ export class OperatorRuntime {
740
740
  [ACCEPTANCE_CONTINUITY_EXTENSION]: { schema_version: "0.1", authority: "dispatch", task_id: taskID,
741
741
  criteria: plan.acceptance, fingerprint: acceptanceFingerprint,
742
742
  parent_fingerprint: index === 0
743
- ? remediationTaskID !== undefined && priorAcceptedUnits.length === 0 ? "none" : parent?.acceptanceFingerprint ?? "none"
743
+ ? priorAcceptedUnits.length === 0 ? "none" : parent?.acceptanceFingerprint ?? "none"
744
744
  : acceptanceFingerprint },
745
745
  "sortie-dogs/unit-coverage": { schema_version: "0.1", task_id: taskID,
746
746
  acceptance_fingerprint: acceptanceFingerprint, indices: unit.acceptance_indices },
@@ -981,7 +981,10 @@ export class OperatorRuntime {
981
981
  }
982
982
  matchesRecordedWorkerTask(state, unitID, args) {
983
983
  const unit = state.units.find(item => item.unit.id === unitID);
984
- return unit !== undefined && this.matchesWorkerTask(state, unit, args);
984
+ const normalized = record(args) && typeof args.agent === "string" && args.subagent_type === undefined
985
+ ? { ...args, subagent_type: args.agent }
986
+ : args;
987
+ return unit !== undefined && this.matchesWorkerTask(state, unit, normalized);
985
988
  }
986
989
  admitOperator(root, callID, args) {
987
990
  return this.serial(root, () => this.admitOperatorOnce(root, callID, args));
@@ -573,10 +573,11 @@ export function createProfiledPlugin(profile, assetVersion) {
573
573
  if (requestedReason !== undefined && requestedReason !== "review-blocking" && requestedReason !== "acceptance-remediation")
574
574
  throw new Error("operator-cancel-reason-invalid");
575
575
  const pending = await operators.read(context.sessionID);
576
- if (!pending) {
576
+ const pendingProposal = await proposals.read(context.sessionID);
577
+ if (!pending || (["cancelled", "completed"].includes(pending.phase) && pendingProposal?.phase !== "approved" && pendingProposal !== undefined)) {
577
578
  // A pre-approval proposal owns no execution lane. Its admitted child can never be rebound, so without
578
579
  // this release the root can neither resume, redispatch, nor start any replacement investigation.
579
- const proposal = await proposals.read(context.sessionID);
580
+ const proposal = pendingProposal;
580
581
  if (!proposal || proposal.phase === "approved")
581
582
  throw new Error("operator-run-missing");
582
583
  if (requestedReason !== undefined)
@@ -707,7 +708,7 @@ export function createProfiledPlugin(profile, assetVersion) {
707
708
  if (unit.resultClass === "process-defect" && unit.childSessionID === null && unit.callID && state.decision === "dispatch-admission-rejected") {
708
709
  const history = await messages(state.units.length > 1 ? delegate : context.sessionID);
709
710
  const matching = history.flatMap(message => Array.isArray(message.parts) ? message.parts : []).filter(part => record(part) &&
710
- part.type === "tool" && part.tool === "task" && part.callID === unit.callID && record(part.state) && part.state.status === "error" &&
711
+ part.type === "tool" && ["task", "subagent"].includes(String(part.tool)) && part.callID === unit.callID && record(part.state) && part.state.status === "error" &&
711
712
  record(part.state.input) && operators.matchesRecordedWorkerTask(state, unit.unit.id, part.state.input) &&
712
713
  taskChildSessionID({ metadata: part.state.metadata, output: typeof part.state.output === "string" ? part.state.output : "" }) === undefined);
713
714
  if (matching.length !== 1 || !await control.hasNoGoalReservation(context.sessionID, taskID, unit.callID))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sortie-dogs",
3
- "version": "0.10.13",
3
+ "version": "0.10.14",
4
4
  "description": "Bounded agent harness and validated orchestration loop plugin for OpenCode",
5
5
  "keywords": [
6
6
  "opencode",
@@ -62,14 +62,13 @@
62
62
  "build": "tsc -p tsconfig.json",
63
63
  "postbuild": "node --input-type=module --eval \"import fs from 'node:fs'; const path = 'dist/cli/main.js'; const source = fs.readFileSync(path, 'utf8'); if (!source.startsWith('#!')) fs.writeFileSync(path, '#!/usr/bin/env node\\n' + source); if (process.platform !== 'win32') fs.chmodSync(path, 0o755);\"",
64
64
  "prepack": "npm run build",
65
- "pretest": "npm run build",
66
- "test": "node --experimental-strip-types --import ./test/setup.ts --test \"test/plugin.test.ts\" \"test/continuation.test.ts\" \"test/fast-lane.test.ts\"",
65
+ "test": "node scripts/test-router.mjs quick",
66
+ "test:windows": "node scripts/test-router.mjs windows",
67
67
  "pretest:dispatch": "npm run build",
68
68
  "test:dispatch": "node --experimental-strip-types --import ./test/setup.ts --test --test-timeout=100000 --test-reporter=spec \"test/execution-plan.test.ts\" \"test/worktree-parallel-dispatch.test.ts\" \"test/acceptance-compiler.test.ts\" \"test/run-flight-ledger.test.ts\" \"test/evidence-capsule.test.ts\"",
69
69
  "pretest:integration": "npm run build",
70
70
  "test:integration": "node --experimental-strip-types --import ./test/setup.ts --test --test-timeout=1200000 --test-reporter=spec \"test/integration/worktree-parallel-dispatch.test.ts\"",
71
- "pretest:full": "npm run build",
72
- "test:full": "node --experimental-strip-types test/helpers/full-test-runner.ts"
71
+ "test:full": "node scripts/test-router.mjs full"
73
72
  },
74
73
  "dependencies": {
75
74
  "ajv": "^8.17.1",