agentic-engineering-harness 0.6.8 → 0.6.10

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 (45) hide show
  1. package/dist/agents/permissions.d.ts +28 -1
  2. package/dist/agents/permissions.js +188 -29
  3. package/dist/agents/permissions.js.map +1 -1
  4. package/dist/operations/completion.d.ts +26 -0
  5. package/dist/operations/completion.js +152 -0
  6. package/dist/operations/completion.js.map +1 -0
  7. package/dist/operations/controller.d.ts +3 -0
  8. package/dist/operations/controller.js +38 -9
  9. package/dist/operations/controller.js.map +1 -1
  10. package/dist/operations/mcp.js +23 -9
  11. package/dist/operations/mcp.js.map +1 -1
  12. package/dist/operations/state.d.ts +14 -0
  13. package/dist/operations/state.js +26 -0
  14. package/dist/operations/state.js.map +1 -1
  15. package/dist/paseo/launchSpec.d.ts +6 -0
  16. package/dist/paseo/launchSpec.js +25 -3
  17. package/dist/paseo/launchSpec.js.map +1 -1
  18. package/dist/paseo/modePreflight.d.ts +15 -0
  19. package/dist/paseo/modePreflight.js +118 -0
  20. package/dist/paseo/modePreflight.js.map +1 -0
  21. package/dist/paseo/native.d.ts +6 -2
  22. package/dist/paseo/native.js +26 -10
  23. package/dist/paseo/native.js.map +1 -1
  24. package/dist/paseo/runtime.d.ts +7 -2
  25. package/dist/paseo/runtime.js +75 -11
  26. package/dist/paseo/runtime.js.map +1 -1
  27. package/dist/paseo/sdk.d.ts +3 -0
  28. package/dist/paseo/sdk.js +122 -43
  29. package/dist/paseo/sdk.js.map +1 -1
  30. package/dist/paseo/start.d.ts +1 -1
  31. package/dist/paseo/start.js +4 -2
  32. package/dist/paseo/start.js.map +1 -1
  33. package/dist/workers/agentPrompt.js +232 -70
  34. package/dist/workers/agentPrompt.js.map +1 -1
  35. package/dist/workers/direct.js +85 -22
  36. package/dist/workers/direct.js.map +1 -1
  37. package/dist/workers/paseo.js +31 -7
  38. package/dist/workers/paseo.js.map +1 -1
  39. package/dist/workers/podman.js +97 -19
  40. package/dist/workers/podman.js.map +1 -1
  41. package/docs/PASEO_NATIVE.md +93 -4
  42. package/package.json +1 -1
  43. package/presets/agents/orchestration.jsonc +5 -0
  44. package/skills/engineering-workflow/SKILL.md +22 -12
  45. package/skills/paseo-orchestration/SKILL.md +19 -2
@@ -1 +1 @@
1
- {"version":3,"file":"direct.js","sourceRoot":"","sources":["../../src/workers/direct.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEnE,MAAM,OAAO,oBAAoB;IAAsC,IAAI,GAAG,QAAQ,CAAC;IACrF,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,OAA6B,EAAE,SAAmC,IAA+C,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,uDAAuD,EAAE,CAAC,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,cAAc,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,qBAAqB,SAAS,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,iBAAiB,EAAE,CAAC,CAAC,CAAC;IACxiB,KAAK,CAAC,KAAK,CAAC,IAAY,EAAE,MAA4B,EAAE,QAAsB,EAAE,SAAmC,IAA4B,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,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await detectPaseoCapabilities(root);
20
- if (!caps.background)
21
- return { ok: false, message: `Installed Paseo${caps.version ? ` ${caps.version}` : ""} does not advertise background runs required by the compatibility fallback.` };
22
- return { ok: true, message: `Paseo detected${caps.version ? ` (${caps.version})` : ""}; @getpaseo/client is primary and the CLI remains available only as a compatibility path.` };
20
+ if (!caps.background) {
21
+ return {
22
+ ok: false,
23
+ message: `Installed Paseo${caps.version ? ` ${caps.version}` : ""} does not advertise background runs required by the compatibility fallback.`
24
+ };
25
+ }
26
+ return {
27
+ ok: true,
28
+ message: `Paseo detected${caps.version ? ` (${caps.version})` : ""}; @getpaseo/client is primary and the CLI remains available only as a compatibility path.`
29
+ };
23
30
  }
24
31
  catch (error) {
25
32
  return { ok: false, message: `Paseo capability probe failed: ${String(error)}` };
26
33
  }
27
34
  }
28
- async start(root, config, contract, selection) { return this.launch(root, config, contract, buildWorkerPrompt(contract, selection), selection); }
35
+ async start(root, config, contract, selection) {
36
+ return this.launch(root, config, contract, buildWorkerPrompt(contract, selection), selection);
37
+ }
29
38
  async repair(root, config, contract, session, packet, selection) {
30
39
  if (session.id && (!selection || session.logicalAgent === selection.logicalAgent)) {
31
40
  const continued = await continueManagedPaseoAgent(root, session.id, buildRepairPrompt(packet), config.orchestration?.worker?.timeoutSeconds);
32
- return { ...session, exitCode: continued.exitCode, stdout: continued.stdout || session.stdout, stderr: [session.stderr, continued.stderr].filter(Boolean).join("\n"), transport: `paseo-${continued.transport}`, status: continued.status, finishedAt: new Date().toISOString() };
41
+ return {
42
+ ...session,
43
+ exitCode: continued.exitCode,
44
+ stdout: continued.stdout || session.stdout,
45
+ stderr: [session.stderr, continued.stderr].filter(Boolean).join("\n"),
46
+ transport: `paseo-${continued.transport}`,
47
+ status: continued.status,
48
+ finishedAt: new Date().toISOString()
49
+ };
33
50
  }
34
51
  return this.launch(root, config, contract, `${buildWorkerPrompt(contract, selection)}\n\n${buildRepairPrompt(packet)}`, selection);
35
52
  }
36
53
  async launch(root, config, contract, prompt, selection) {
37
- const spec = await compilePaseoAgentLaunchSpec(root, config, contract, { selection, phase: "implementation" });
54
+ const spec = await compilePaseoAgentLaunchSpec(root, config, contract, {
55
+ selection,
56
+ phase: "implementation"
57
+ });
38
58
  const startedAt = new Date().toISOString();
39
59
  const launched = await launchManagedPaseoAgent(root, {
40
60
  cwd: spec.cwd,
41
61
  title: spec.title,
42
62
  provider: spec.provider,
43
63
  model: spec.model,
64
+ modeId: spec.modeId,
65
+ modeSource: spec.modeSource,
66
+ thinkingOptionId: spec.thinkingOptionId,
67
+ env: spec.env,
44
68
  workspaceId: spec.workspaceId,
45
69
  prompt,
46
70
  labels: spec.labels,
@@ -51,7 +75,7 @@ export class PaseoWorkerExecutor {
51
75
  provider: spec.provider,
52
76
  model: spec.model,
53
77
  logicalAgent: selection?.logicalAgent,
54
- nativeAgent: selection?.nativeAgent,
78
+ nativeAgent: spec.nativeAgentId ?? selection?.nativeAgent,
55
79
  runtime: selection?.runtimeName,
56
80
  profile: selection?.profile,
57
81
  transport: `paseo-${launched.transport}`,
@@ -1 +1 @@
1
- {"version":3,"file":"paseo.js","sourceRoot":"","sources":["../../src/workers/paseo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGnE,MAAM,OAAO,mBAAmB;IACrB,IAAI,GAAG,OAAO,CAAC;IACxB,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,OAA6B,EAAE,SAAmC;QAC3F,MAAM,EAAE,GAAG,MAAM,aAAa,C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,CAAC,KAAK;YACjB,YAAY,EAAE,SAAS,EAAE,YAAY;YACrC,WAAW,EAAE,IAAI,CAAC,aAAa,IAAI,SAAS,EAAE,WAAW;YACzD,OAAO,EAAE,SAAS,EAAE,WAAW;YAC/B,OAAO,EAAE,SAAS,EAAE,OAAO;YAC3B,SAAS,EAAE,SAAS,QAAQ,CAAC,SAAS,EAAE;YACxC,WAAW,EAAE,QAAQ,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW;YACrD,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,SAAS;YACT,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;SACxB,CAAC;IACJ,CAAC;CACF"}
@@ -1,44 +1,122 @@
1
1
  import path from "node:path";
2
- import { buildOpenCodeRuntimeConfig } from "../agents/permissions.js";
2
+ import { compileOpenCodeRuntimeProjection } from "../agents/permissions.js";
3
3
  import { allowedSandboxEnvironment, hardenedPodmanArgs, sandboxImage } from "../security/sandbox.js";
4
4
  import { commandExists, runProcess } from "../utils/process.js";
5
5
  import { buildRepairPrompt, buildWorkerPrompt } from "./prompt.js";
6
6
  export class PodmanWorkerExecutor {
7
7
  name = "podman";
8
- async doctor(root, config) { const ok = await commandExists("podman", root); if (!ok)
9
- return { ok: false, message: "Podman CLI not found." }; if (!config.security?.sandbox?.image)
10
- return { ok: false, message: "security.sandbox.image is required for Podman worker execution." }; return { ok: true, message: "Hardened Podman worker sandbox configured." }; }
11
- async start(root, config, contract, selection) { return this.run(root, config, contract, buildWorkerPrompt(contract, selection), selection); }
12
- async repair(root, config, contract, _session, packet, selection) { return this.run(root, config, contract, `${buildWorkerPrompt(contract, selection)}\n\n${buildRepairPrompt(packet)}`, selection); }
8
+ async doctor(root, config) {
9
+ const ok = await commandExists("podman", root);
10
+ if (!ok)
11
+ return { ok: false, message: "Podman CLI not found." };
12
+ if (!config.security?.sandbox?.image) {
13
+ return {
14
+ ok: false,
15
+ message: "security.sandbox.image is required for Podman worker execution."
16
+ };
17
+ }
18
+ return { ok: true, message: "Hardened Podman worker sandbox configured." };
19
+ }
20
+ async start(root, config, contract, selection) {
21
+ return this.run(root, config, contract, buildWorkerPrompt(contract, selection), selection);
22
+ }
23
+ async repair(root, config, contract, _session, packet, selection) {
24
+ return this.run(root, config, contract, `${buildWorkerPrompt(contract, selection)}\n\n${buildRepairPrompt(packet)}`, selection);
25
+ }
13
26
  async run(root, config, contract, prompt, selection) {
14
27
  const runtime = selection?.runtimeAdapter ?? "opencode";
15
- if (runtime !== "opencode")
28
+ if (runtime !== "opencode") {
16
29
  throw new Error(`Podman executor currently supports OpenCode runtime; selected ${runtime}.`);
30
+ }
17
31
  const model = selection?.modelId ?? config.orchestration?.worker?.model;
18
32
  const fallback = selection ?? legacySelection(model);
33
+ const projection = compileOpenCodeRuntimeProjection(fallback, config);
19
34
  const podmanArgs = hardenedPodmanArgs(config, fallback, true);
20
- const args = ["podman", "run", ...podmanArgs, "-v", `${root}:/workspace:rw`];
21
- for (const relative of sealedArtifacts(config, contract))
35
+ const args = [
36
+ "podman",
37
+ "run",
38
+ ...podmanArgs,
39
+ "-v",
40
+ `${root}:/workspace:rw`
41
+ ];
42
+ for (const relative of sealedArtifacts(config, contract)) {
22
43
  args.push("-v", `${path.resolve(root, relative)}:/workspace/${relative}:ro`);
23
- if (selection)
24
- args.push("-e", `OPENCODE_CONFIG_CONTENT=${JSON.stringify(buildOpenCodeRuntimeConfig(selection, config))}`);
25
- for (const [name, value] of Object.entries(allowedSandboxEnvironment(config)))
44
+ }
45
+ args.push("-e", `OPENCODE_CONFIG_CONTENT=${projection.env.OPENCODE_CONFIG_CONTENT}`);
46
+ for (const [name, value] of Object.entries(allowedSandboxEnvironment(config))) {
26
47
  args.push("-e", `${name}=${value}`);
48
+ }
27
49
  const runtimeArgs = ["opencode", "run", "--auto", "--format", "json"];
28
50
  if (model)
29
51
  runtimeArgs.push("--model", model);
30
52
  if (selection?.variant)
31
53
  runtimeArgs.push("--variant", selection.variant);
32
- if (selection?.nativeAgent)
33
- runtimeArgs.push("--agent", selection.nativeAgent);
54
+ runtimeArgs.push("--agent", projection.binding.agentId);
34
55
  runtimeArgs.push(...(selection?.args ?? []), prompt);
35
56
  args.push(sandboxImage(config), "sh", "-lc", `cd /workspace && ${runtimeArgs.map(quote).join(" ")}`);
36
57
  const timeout = config.orchestration?.worker?.timeoutSeconds ?? 1800;
37
- const result = await runProcess(args.map(quote).join(" "), { cwd: root, timeoutMs: timeout * 1000 });
38
- return { provider: runtime, model: selection?.modelName ?? model, logicalAgent: selection?.logicalAgent, nativeAgent: selection?.nativeAgent, runtime: selection?.runtimeName, profile: selection?.profile, exitCode: result.exitCode, stdout: result.stdout, stderr: result.stderr };
58
+ const result = await runProcess(args.map(quote).join(" "), {
59
+ cwd: root,
60
+ timeoutMs: timeout * 1000
61
+ });
62
+ return {
63
+ provider: runtime,
64
+ model: selection?.modelName ?? model,
65
+ logicalAgent: selection?.logicalAgent,
66
+ nativeAgent: projection.binding.agentId,
67
+ runtime: selection?.runtimeName,
68
+ profile: selection?.profile,
69
+ exitCode: result.exitCode,
70
+ stdout: result.stdout,
71
+ stderr: result.stderr
72
+ };
39
73
  }
40
74
  }
41
- function legacySelection(model) { return { logicalAgent: "legacy-worker", role: "implementer", profile: "legacy", domains: ["*"], runtimeName: "opencode", runtimeAdapter: "opencode", paseoProvider: "opencode", modelAlias: "legacy", modelProvider: model?.split("/")[0] ?? "opencode", modelName: model?.split("/").at(-1) ?? "default", modelId: model ?? "opencode/default", transport: "podman", permissions: { read: "allow", write: "allow", shell: "allow", network: "ask", delegate: "deny", review: "deny", validate: "allow", gitWrite: "deny" }, skills: [], mcps: [], args: [], runtimeCapabilities: { modelSelection: true, sessions: false, structuredOutput: false } }; }
42
- function sealedArtifacts(config, contract) { const contractsDir = config.sdd?.contractsDir ?? ".harness/contracts"; return [...new Set([`${contractsDir}/${contract.task.id}.yaml`, `.harness/seals/${contract.task.id}.json`, ...Object.values(contract.source ?? {}).filter((value) => Boolean(value))])]; }
43
- function quote(value) { return `'${value.replaceAll("'", "'\\''")}'`; }
75
+ function legacySelection(model) {
76
+ return {
77
+ logicalAgent: "legacy-worker",
78
+ role: "implementer",
79
+ profile: "legacy",
80
+ domains: ["*"],
81
+ runtimeName: "opencode",
82
+ runtimeAdapter: "opencode",
83
+ paseoProvider: "opencode",
84
+ modelAlias: "legacy",
85
+ modelProvider: model?.split("/")[0] ?? "opencode",
86
+ modelName: model?.split("/").at(-1) ?? "default",
87
+ modelId: model ?? "opencode/default",
88
+ transport: "podman",
89
+ permissions: {
90
+ read: "allow",
91
+ write: "allow",
92
+ shell: "allow",
93
+ network: "ask",
94
+ delegate: "deny",
95
+ review: "deny",
96
+ validate: "allow",
97
+ gitWrite: "deny"
98
+ },
99
+ skills: [],
100
+ mcps: [],
101
+ args: [],
102
+ runtimeCapabilities: {
103
+ modelSelection: true,
104
+ sessions: false,
105
+ structuredOutput: false
106
+ }
107
+ };
108
+ }
109
+ function sealedArtifacts(config, contract) {
110
+ const contractsDir = config.sdd?.contractsDir ?? ".harness/contracts";
111
+ return [
112
+ ...new Set([
113
+ `${contractsDir}/${contract.task.id}.yaml`,
114
+ `.harness/seals/${contract.task.id}.json`,
115
+ ...Object.values(contract.source ?? {}).filter((value) => Boolean(value))
116
+ ])
117
+ ];
118
+ }
119
+ function quote(value) {
120
+ return `'${value.replaceAll("'", "'\\''")}'`;
121
+ }
44
122
  //# sourceMappingURL=podman.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"podman.js","sourceRoot":"","sources":["../../src/workers/podman.ts"],"names":[],"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ACd,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE,MAAM;SACjB;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,EAAE;QACR,mBAAmB,EAAE;YACnB,cAAc,EAAE,IAAI;YACpB,QAAQ,EAAE,KAAK;YACf,gBAAgB,EAAE,KAAK;SACxB;KACF,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACtB,MAA4B,EAC5B,QAAsB;IAEtB,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,EAAE,YAAY,IAAI,oBAAoB,CAAC;IACtE,OAAO;QACL,GAAG,IAAI,GAAG,CAAC;YACT,GAAG,YAAY,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO;YAC1C,kBAAkB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO;YACzC,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM,CAC5C,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAC3C;SACF,CAAC;KACH,CAAC;AACJ,CAAC;AAED,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;AAC/C,CAAC"}
@@ -10,8 +10,10 @@ AEH treats Paseo as the authority for agent runtime state and generic agent orch
10
10
  | Agent current state | Paseo | `agents.ref(id).refetch()` |
11
11
  | Agent context-window usage | Paseo/provider | `AgentSnapshot.lastUsage` |
12
12
  | Provider/model availability | Paseo | provider snapshot/listModels/diagnostic |
13
+ | OpenCode native execution identity | AEH topology + Paseo mode bridge | AEH runtime projection -> `modeId` |
13
14
  | Generic create/send/status/activity tools | Paseo | injected native/MCP Paseo tools |
14
15
  | AUDIT/RUN operation state | AEH | `aeh-control` / operation state |
16
+ | Detached operation completion wake-up | AEH + Paseo dispatch | durable completion target + follow-up to existing lead |
15
17
  | Context thresholds and handoff policy | AEH | `aeh_context_status` / `context guard` |
16
18
  | SDD, contracts, seals, validation | AEH | deterministic Harness core |
17
19
  | Quality convergence/acceptance | AEH | deterministic Harness core |
@@ -55,7 +57,7 @@ Managed leads receive the preapproved `aeh_context_status` tool. A normal manage
55
57
 
56
58
  `aeh context guard --agent ...` remains the CLI compatibility/non-interactive surface and owns handoff-artifact/rotation side effects.
57
59
 
58
- ## Event-driven completion
60
+ ## Event-driven agent completion
59
61
 
60
62
  Agent waiting is:
61
63
 
@@ -66,10 +68,17 @@ subscribe(agent_update)
66
68
  |
67
69
  +--> updates trigger refetch
68
70
  |
69
- `--> terminal state -> read recent timeline -> complete
71
+ `--> terminal state + turn evidence -> read recent timeline -> complete
70
72
  ```
71
73
 
72
- Subscription is installed **before** the first refetch so a transition cannot fall between the snapshot and listener setup. A freshly observed `idle` state is not treated as completion until the wait has observed activity/update evidence, avoiding a send/wait race.
74
+ Subscription is installed **before** the first refetch so a transition cannot fall between the snapshot and listener setup.
75
+
76
+ For a newly created agent, an assistant response in the fresh timeline can prove that a very fast turn completed before the subscription was installed. For a continued/reused agent, AEH captures the last assistant response **before dispatch** and uses it as a baseline. An `idle` snapshot is accepted only when at least one of these is true:
77
+
78
+ - AEH observed an active-turn status (`working`, `running`, `streaming`, `starting`) or `activeTurn` before returning to terminal state;
79
+ - the latest assistant response differs from the pre-dispatch baseline.
80
+
81
+ A subscription notification by itself is **not** turn activity. This prevents metadata-only updates plus stale timeline output from making AEH conclude that a reviewer finished before its current turn actually did.
73
82
 
74
83
  Fallback order:
75
84
 
@@ -83,6 +92,38 @@ Paseo CLI wait/log compatibility
83
92
 
84
93
  The selected path is emitted in Paseo integration traces.
85
94
 
95
+ ## Detached operation completion wake-up
96
+
97
+ A detached AUDIT/RUN deliberately outlives the conversational turn that starts it. The initiating lead is therefore not required to remain active or poll until all reviewers/workers finish.
98
+
99
+ For a managed-lead MCP start, AEH resolves the current lead identity and persists a completion target beside the operation:
100
+
101
+ ```text
102
+ .harness/operations/<operation-id>.completion.json
103
+ ```
104
+
105
+ The completion target has an independent lifecycle:
106
+
107
+ ```text
108
+ PENDING -> SENT
109
+ -> FAILED
110
+ -> DISABLED
111
+ ```
112
+
113
+ When the engineering operation becomes `SUCCEEDED`, `FAILED`, or `CANCELLED`, the controller first persists that terminal engineering state, then sends a non-blocking follow-up to the existing Paseo lead. The message starts with:
114
+
115
+ ```text
116
+ [AEH_OPERATION_COMPLETED]
117
+ ```
118
+
119
+ and includes the operation id/status plus the durable result/report path when available. The callback tells the lead to continue the original pending user request, read the existing operation/report, and **not** start a duplicate operation.
120
+
121
+ This solves the case where the lead's original turn ends while reviewers are still running. The reviewers remain independent top-level Paseo agents; the completion callback reactivates the lead only after the controller's full completion barrier has resolved and the operation is terminal.
122
+
123
+ Callback delivery does not participate in engineering acceptance. If the follow-up cannot be delivered, the callback sidecar becomes `FAILED` and the failure is traced, but a successful AUDIT/RUN remains successful. `aeh_operation_status` is therefore a recovery/diagnostic surface, not the normal mechanism for keeping a conversational turn alive.
124
+
125
+ Cancellation uses the same terminal callback path after worker cleanup. A synchronous controller spawn failure disables a callback that could otherwise arrive as a confusing continuation after the start tool itself already failed.
126
+
86
127
  ## Provider/model preflight
87
128
 
88
129
  Before creating or materializing an agent, AEH attempts a public-SDK preflight:
@@ -97,6 +138,42 @@ Before creating or materializing an agent, AEH attempts a public-SDK preflight:
97
138
 
98
139
  AEH does not force provider refreshes on every launch. Paseo owns snapshot caching and explicit refresh semantics.
99
140
 
141
+ ## Deterministic OpenCode native identity
142
+
143
+ AEH must not resolve a logical agent and then allow OpenCode to choose a different execution identity from ambient machine configuration. For every AEH-selected OpenCode agent, the Harness compiles a concrete native binding.
144
+
145
+ When `execution.nativeAgent` is absent, AEH synthesizes a deterministic session-local primary agent such as:
146
+
147
+ ```text
148
+ AEH logical agent: code-quality-reviewer
149
+ OpenCode agent: aeh-code-quality-reviewer
150
+ ```
151
+
152
+ The generated OpenCode configuration contains the concrete model, projected permissions, primary mode, AEH identity prompt and `default_agent`. It is supplied only to that provider process through:
153
+
154
+ ```text
155
+ OPENCODE_CONFIG_CONTENT=<compiled JSON>
156
+ ```
157
+
158
+ For Paseo execution AEH also passes the same ID as `AgentSessionConfig.modeId`. Paseo therefore dispatches the turn to the same native OpenCode agent that AEH compiled. The launch environment is passed as top-level create-agent `env`, not embedded in `AgentSessionConfig`.
159
+
160
+ If `execution.nativeAgent` is explicitly configured, AEH preserves that exact external identity instead of synthesizing a replacement. Before dispatch, AEH uses Paseo provider mode discovery to verify that the requested native agent is selectable for the target cwd. Missing explicit agents fail before a user prompt is sent; AEH does not silently fall back to OpenCode's default agent.
161
+
162
+ The same compiled binding is used by direct and Podman OpenCode execution. Transport therefore does not change native identity.
163
+
164
+ A session-scoped OpenCode launch environment is an SDK-required semantic boundary. If the Paseo SDK becomes unavailable, AEH refuses CLI launch fallback for that session rather than dropping `OPENCODE_CONFIG_CONTENT` and reintroducing ambient `default_agent` behavior.
165
+
166
+ Relevant labels/traces include:
167
+
168
+ ```text
169
+ aeh.native-agent
170
+ aeh.native-agent.source
171
+ harness.paseo.agent.identity
172
+ harness.paseo.provider.mode.preflight
173
+ ```
174
+
175
+ `aeh.native-agent.source` is `aeh-managed` for compiled identities and `explicit` for externally configured native agents.
176
+
100
177
  ## Intentional CLI parity gaps (P2)
101
178
 
102
179
  CLI usage is not forbidden when the public SDK lacks required semantics. It must be narrow and traced.
@@ -148,16 +225,25 @@ Representative events:
148
225
  ```text
149
226
  harness.paseo.provider.preflight
150
227
  harness.paseo.provider.preflight.skipped
228
+ harness.paseo.provider.mode.preflight
229
+ harness.paseo.agent.identity
151
230
  harness.paseo.agent.launch
152
231
  harness.paseo.agent.materialize
153
232
  harness.paseo.agent.dispatch
154
233
  harness.paseo.agent.snapshot
234
+ harness.paseo.agent.turn.baseline
235
+ harness.paseo.agent.turn.baseline.skipped
155
236
  harness.paseo.agent.wait
156
237
  harness.paseo.agent.wait.completed
157
238
  harness.paseo.agent.wait.fallback
158
239
  harness.paseo.context.identity
159
240
  harness.paseo.context.status
160
241
  harness.paseo.context.handoff
242
+ harness.paseo.operation.callback.target
243
+ harness.paseo.operation.callback.registered
244
+ harness.paseo.operation.callback.sent
245
+ harness.paseo.operation.callback.failed
246
+ harness.paseo.operation.callback.disabled
161
247
  harness.paseo.fallback.cli
162
248
  harness.paseo.workspace.cli.*
163
249
  harness.paseo.cleanup.cli.*
@@ -168,6 +254,9 @@ A useful trace answers:
168
254
  - which transport was selected (`sdk` or `cli`);
169
255
  - which observation source was used (`subscription`, snapshot, sdk-wait, cli-wait);
170
256
  - how the managed lead identity was resolved (`argument`, `environment`, `lead-state`);
257
+ - which AEH logical agent/native OpenCode identity was selected and whether it was generated or explicit;
258
+ - whether an `idle` completion had real turn evidence rather than a metadata-only update;
259
+ - whether a detached completion callback was registered and delivered;
171
260
  - whether a fallback was exceptional or an intentional SDK parity gap;
172
261
  - why the fallback occurred;
173
262
  - the associated agent/operation/provider/model/workspace;
@@ -182,4 +271,4 @@ When Paseo adds public SDK parity for a CLI-only operation:
182
271
  3. retain CLI only as version-negotiated compatibility if still necessary;
183
272
  4. add a regression proving SDK use;
184
273
  5. keep a fallback trace until the compatibility floor makes CLI removable;
185
- 6. remove any capability inference based on parsing help text when it no longer serves a compatibility path.
274
+ 6. remove any capability inference based on parsing help text when it no longer serves a compatibility path.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-engineering-harness",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
4
4
  "description": "OSS-first engineering harness for deterministic, spec-driven, issue-driven, audit-governed and orchestration-first multi-agent software delivery.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "version": 1,
3
3
  "extends": ["aeh:default"],
4
+ "runtimes": {
5
+ "opencode": {
6
+ "capabilities": { "nativeAgentViaPaseo": true }
7
+ }
8
+ },
4
9
  "agents": {
5
10
  "lead": {
6
11
  "description": "Own user intent, semantic decisions, exception handling and final acceptance. Operate as a thin orchestrator: delegate repository discovery, environment repair, specification authoring, planning, implementation and review. Prefer Paseo native/MCP orchestration tools and handoff skills over direct shell orchestration. Do not author SDD/OpenSpec artifacts or debug tooling interactively when a specialist can own that bounded operation.",
@@ -44,7 +44,11 @@ Inside a managed Paseo lead, long deterministic workflows must be started detach
44
44
  - audit: `aeh operation start audit "<request>" ...`
45
45
  - sealed task execution: `aeh operation start run <taskId> ...`
46
46
 
47
- The start command must return promptly with an `operationId`. Report that identifier and the meaningful phase to the user instead of waiting in an interactive shell. Observe with `aeh operation status <operationId>` and, when useful, `aeh paseo agents --operation <operationId>`. Use `aeh operation wait` only when synchronous waiting is explicitly required by a non-interactive caller or bounded recovery flow. Cancel with `aeh operation cancel <operationId>` when the user requests cancellation.
47
+ The start command must return promptly with an `operationId`. Report that identifier and the meaningful starting phase to the user, then allow the current lead turn to end if there is no additional semantic work to do. The controller durably registers the initiating managed lead as a completion target. When the operation becomes `SUCCEEDED`, `FAILED` or `CANCELLED`, AEH sends that lead an `[AEH_OPERATION_COMPLETED]` follow-up so it can consume the durable result and finish the original user request.
48
+
49
+ Do **not** keep the lead alive by repeatedly calling `aeh operation status` or `aeh_operation_status`. Those are explicit diagnostics/manual-recovery surfaces. Use `aeh operation wait` only when synchronous waiting is explicitly required by a non-interactive caller or bounded recovery flow. Cancel with `aeh operation cancel <operationId>` when the user requests cancellation; cancellation also follows the completion-callback path after cleanup.
50
+
51
+ When `[AEH_OPERATION_COMPLETED]` arrives, treat it as an internal continuation event, not a new user task. Do not create another AUDIT/RUN. Read the existing operation state and cited report/result artifact, then complete the original user-facing response.
48
52
 
49
53
  Direct synchronous commands such as `aeh audit` and `aeh run` remain valid non-interactive/compatibility entrypoints, but a conversational Paseo lead should not use them for a long-running operation when the detached controller is available.
50
54
 
@@ -89,10 +93,12 @@ Do not invoke sudo or silently install unmanaged host prerequisites.
89
93
 
90
94
  1. From an interactive Paseo lead, invoke `aeh operation start audit "<request>"`, passing concrete file/domain/risk/reviewer hints when useful. Repository-wide scope is valid. A non-interactive caller may use synchronous `aeh audit`.
91
95
  2. AEH freezes the control plane and materializes the selected read-only reviewers as visible Paseo agents before deterministic validation begins. The agents remain idle until validator evidence is ready.
92
- 3. AEH runs deterministic validators, classifies failures, dispatches the materialized reviewers with that evidence, deduplicates findings and calculates quality debt.
93
- 4. Validator failures remain evidence; do not reinterpret them as PASS.
94
- 5. Persisted reports under `.harness/audits/` and `.harness/operations/` are durable input for later remediation and recovery.
95
- 6. AUDIT never implements fixes. A later "fix these" is a new CHANGE using the AuditReport as evidence.
96
+ 3. AEH runs deterministic validators, classifies failures, dispatches the materialized reviewers with that evidence, waits for the complete reviewer barrier, deduplicates findings and calculates quality debt.
97
+ 4. The lead is allowed to finish its initiating conversational turn while step 3 continues. It must not infer that the AUDIT ended merely because its own turn ended or because some reviewers have replied.
98
+ 5. Only after the controller reaches terminal operation state does it send `[AEH_OPERATION_COMPLETED]` back to the initiating lead. The lead then reads the persisted AuditReport and completes the original user-facing audit response.
99
+ 6. Validator failures remain evidence; do not reinterpret them as PASS.
100
+ 7. Persisted reports under `.harness/audits/` and `.harness/operations/` are durable input for later remediation and recovery.
101
+ 8. AUDIT never implements fixes. A later "fix these" is a new CHANGE using the AuditReport as evidence.
96
102
 
97
103
  ## Issue-driven CHANGE path
98
104
 
@@ -115,6 +121,7 @@ For a CHANGE classified QUICK:
115
121
  2. `aeh quick validate <id>`.
116
122
  3. From an interactive lead, start `aeh operation start run <id>`; use synchronous `aeh run <id>` only for non-interactive compatibility.
117
123
  4. Remain the semantic parent lead; implementation, validation and review belong to AEH workers and the deterministic controller.
124
+ 5. The lead may end its current turn after the detached operation starts; AEH's completion callback will reactivate it after the full run/review/delivery state machine is terminal.
118
125
 
119
126
  ## SPEC path — OpenSpec authoring
120
127
 
@@ -130,17 +137,20 @@ The lead must not write proposal/spec/design/tasks/Gherkin itself.
130
137
 
131
138
  If OpenSpec cannot express a true product decision without guessing, return `REQUIRES_PRODUCT_DECISION`; otherwise author and validate autonomously.
132
139
 
133
- ## Operation observation
140
+ ## Operation observation and recovery
141
+
142
+ Durable operation state remains authoritative, but normal managed-lead continuation is callback-driven rather than polling-driven:
134
143
 
135
- Use durable operation state for progress rather than narrating terminal silence:
144
+ - `[AEH_OPERATION_COMPLETED]` -> normal wake-up/continuation after terminal state;
145
+ - `aeh operation status <id>` -> explicit diagnostic controller status/phase/result/error;
146
+ - `aeh paseo agents --operation <id>` -> manual inspection of real LLM participants and their roles/phases;
147
+ - `aeh operation wait <id>` -> synchronous non-interactive/recovery boundary only.
136
148
 
137
- - `aeh operation status <id>` -> controller status/phase/result/error;
138
- - `aeh paseo agents --operation <id>` -> real LLM participants and their roles/phases;
139
- - `aeh operation wait <id>` -> synchronous boundary only when necessary.
149
+ If a completion callback is known to have failed, inspect the `.harness/operations/<id>.completion.json` sidecar and Paseo traces, then recover by reading the terminal operation/report directly. Do not launch a duplicate operation solely because the callback failed.
140
150
 
141
151
  Paseo workspaces used for operation grouping are local orchestration containers and do not imply Git branch/worktree delivery. Delivery workspaces remain a separate isolation decision and take precedence for workers when present.
142
152
 
143
- Paseo lifecycle/provider/context integration decisions are recorded under `.harness/telemetry/paseo.ndjson`; normal telemetry/OTLP receives the same events when enabled. Use these traces to distinguish SDK-native paths, negotiated fallbacks and intentional public-SDK parity gaps rather than inferring behavior from terminal output.
153
+ Paseo lifecycle/provider/context/integration decisions are recorded under `.harness/telemetry/paseo.ndjson`; normal telemetry/OTLP receives the same events when enabled. Use these traces to distinguish SDK-native paths, reviewer turn-barrier evidence, completion callback delivery, negotiated fallbacks and intentional public-SDK parity gaps rather than inferring behavior from terminal output.
144
154
 
145
155
  ## Quality convergence and recovery
146
156
 
@@ -165,4 +175,4 @@ If the repository is AEH itself or the task changes topology, toolchain, skills,
165
175
 
166
176
  ## User-facing communication
167
177
 
168
- Keep status concise. Do not narrate every shell command or subagent read. Surface meaningful transitions such as operation started, `AUDIT`, `QUICK`, `SPEC`, spec validated, deterministic blocker, quality convergence state, handoff, final acceptance/delivery. A useful update names the operation id and phase and, when relevant, the visible worker roles. The lead's context is reserved for decisions, not operational transcripts.
178
+ Keep status concise. Do not narrate every shell command or subagent read. Surface meaningful transitions such as operation started, `AUDIT`, `QUICK`, `SPEC`, spec validated, deterministic blocker, quality convergence state, handoff, final acceptance/delivery. For a detached operation, one start acknowledgement is normally enough; do not emit a stream of status polls. When the completion callback arrives, provide the actual consolidated result. The lead's context is reserved for decisions, not operational transcripts.
@@ -33,6 +33,21 @@ When the AEH control MCP server (`aeh operation mcp`) is injected, use its tools
33
33
 
34
34
  These MCP tools call the same persistent detached operation controller/policy code as the CLI. They do not create a controller LLM agent. If the AEH MCP server is not injected, `aeh operation start/status/cancel` and `aeh context guard` are short compatibility surfaces; do not replace them with long synchronous `aeh audit`/`aeh run` from the conversational lead.
35
35
 
36
+ ## Detached operation completion
37
+
38
+ Managed AUDIT/RUN operations are callback-driven. When `aeh_operation_start_audit` or `aeh_operation_start_run` succeeds, the deterministic controller durably records the initiating managed lead as the completion target. The lead may end its current conversational turn while reviewers/workers continue independently.
39
+
40
+ Do **not** repeatedly poll `aeh_operation_status` in the normal path. When the operation reaches `SUCCEEDED`, `FAILED` or `CANCELLED`, AEH sends an `[AEH_OPERATION_COMPLETED]` follow-up to the same lead. Treat that message as an internal continuation of the still-pending user request:
41
+
42
+ - do not start a duplicate AUDIT/RUN;
43
+ - inspect the existing operation record and the durable report/result artifact named by the callback;
44
+ - finish the original user-facing request from those durable results;
45
+ - use `aeh_operation_status` only for explicit diagnostics, manual inspection, or recovery when callback delivery is known to have failed.
46
+
47
+ Callback delivery state is persisted separately from the engineering result. A failed callback must never rewrite a successful engineering operation as failed. Relevant integration traces are `harness.paseo.operation.callback.registered`, `.target`, `.sent`, `.failed`, and `.disabled`.
48
+
49
+ This wake-up mechanism is intentionally independent of Paseo parent/child ownership. AEH reviewers/workers remain top-level agents so a lead rotation does not terminate them.
50
+
36
51
  Load `/paseo` when the exact current Paseo surface is needed. Use `/paseo-handoff` when responsibility, not merely a subtask, should move to a fresh agent. `/paseo-committee` and `/paseo-advisor` are analysis-only escalation tools and must not replace deterministic AEH gates.
37
52
 
38
53
  ## SDK-first lifecycle
@@ -45,6 +60,8 @@ AEH should use the public `@getpaseo/client` surface first for semantic operatio
45
60
  - agent subscriptions for event-driven completion, with subscribe-before-refetch race closure;
46
61
  - provider snapshot/model/diagnostic APIs for early configuration failures.
47
62
 
63
+ For a continued/reused agent turn, capture the last assistant response **before** dispatch. An `idle` snapshot is not sufficient proof that the new turn finished: accept it only after a real active-turn transition or assistant output that differs from the pre-dispatch baseline. Metadata-only subscription updates are not turn activity.
64
+
48
65
  The CLI remains a compatibility/parity-gap surface, not a parallel source of truth. Two intentional external-controller CLI uses currently remain for Paseo 0.3.1:
49
66
 
50
67
  1. operation workspace creation requiring `--isolation local` plus user-visible `--title`, which the public SDK create contract does not yet expose with equivalent parity;
@@ -60,9 +77,9 @@ Use `aeh paseo agents --operation <id>` (or Paseo's corresponding directory/stat
60
77
 
61
78
  ## Observability
62
79
 
63
- AEH persists integration decisions under `.harness/telemetry/paseo.ndjson` even when remote OTLP export is disabled. Relevant events include provider preflight, agent snapshot/context source, lifecycle transport, event-driven wait, SDK-to-CLI fallback, intentional workspace CLI use and cleanup CLI use. When normal Harness telemetry is enabled the same events also flow through the standard telemetry/OTLP path.
80
+ AEH persists integration decisions under `.harness/telemetry/paseo.ndjson` even when remote OTLP export is disabled. Relevant events include provider preflight, agent snapshot/context source, lifecycle transport, event-driven wait, resumed-turn baseline, detached-operation callback delivery, SDK-to-CLI fallback, intentional workspace CLI use and cleanup CLI use. When normal Harness telemetry is enabled the same events also flow through the standard telemetry/OTLP path.
64
81
 
65
- A trace should answer: which transport was used, which source supplied state, whether a fallback was intentional or exceptional, why it happened, and which operation/agent/provider/model was affected.
82
+ A trace should answer: which transport was used, which source supplied state, whether a fallback was intentional or exceptional, why it happened, which operation/agent/provider/model was affected, and whether completion notification reached the initiating lead.
66
83
 
67
84
  ## Lead discipline
68
85