agentic-engineering-harness 0.6.4 → 0.6.5

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 (43) hide show
  1. package/README.md +98 -17
  2. package/dist/audit/run.d.ts +2 -0
  3. package/dist/audit/run.js +28 -15
  4. package/dist/audit/run.js.map +1 -1
  5. package/dist/core/init.js +9 -2
  6. package/dist/core/init.js.map +1 -1
  7. package/dist/core/types.d.ts +9 -0
  8. package/dist/main.d.ts +2 -0
  9. package/dist/main.js +204 -0
  10. package/dist/main.js.map +1 -0
  11. package/dist/operations/controller.d.ts +17 -0
  12. package/dist/operations/controller.js +198 -0
  13. package/dist/operations/controller.js.map +1 -0
  14. package/dist/operations/mcp.d.ts +1 -0
  15. package/dist/operations/mcp.js +129 -0
  16. package/dist/operations/mcp.js.map +1 -0
  17. package/dist/operations/state.d.ts +43 -0
  18. package/dist/operations/state.js +127 -0
  19. package/dist/operations/state.js.map +1 -0
  20. package/dist/paseo/launchSpec.d.ts +25 -0
  21. package/dist/paseo/launchSpec.js +69 -0
  22. package/dist/paseo/launchSpec.js.map +1 -0
  23. package/dist/paseo/runtime.d.ts +8 -1
  24. package/dist/paseo/runtime.js +66 -21
  25. package/dist/paseo/runtime.js.map +1 -1
  26. package/dist/paseo/sdk.d.ts +33 -12
  27. package/dist/paseo/sdk.js +122 -55
  28. package/dist/paseo/sdk.js.map +1 -1
  29. package/dist/paseo/start.d.ts +4 -1
  30. package/dist/paseo/start.js +49 -5
  31. package/dist/paseo/start.js.map +1 -1
  32. package/dist/telemetry/events.js +19 -0
  33. package/dist/telemetry/events.js.map +1 -1
  34. package/dist/workers/agentPrompt.d.ts +4 -0
  35. package/dist/workers/agentPrompt.js +110 -32
  36. package/dist/workers/agentPrompt.js.map +1 -1
  37. package/dist/workers/paseo.js +23 -26
  38. package/dist/workers/paseo.js.map +1 -1
  39. package/docs/PASEO.md +162 -27
  40. package/package.json +7 -5
  41. package/skills/engineering-workflow/SKILL.md +40 -16
  42. package/skills/paseo-orchestration/SKILL.md +18 -3
  43. package/templates/AGENTS.md +8 -6
@@ -4,14 +4,15 @@ import path from "node:path";
4
4
  import { outputJsonSchema } from "../agents/outputContracts.js";
5
5
  import { buildOpenCodeRuntimeConfig } from "../agents/permissions.js";
6
6
  import { loadFrozenSkillContext } from "../core/controlPlane.js";
7
- import { deliveryWorkspaceId } from "../delivery/handoff.js";
8
- import { continueManagedPaseoAgent, launchManagedPaseoAgent } from "../paseo/runtime.js";
7
+ import { currentOperationContext } from "../operations/state.js";
8
+ import { compilePaseoAgentLaunchSpec } from "../paseo/launchSpec.js";
9
+ import { continueManagedPaseoAgent, launchManagedPaseoAgent, materializeManagedPaseoAgent } from "../paseo/runtime.js";
10
+ import { PaseoSdkUnavailableError } from "../paseo/sdk.js";
9
11
  import { allowedSandboxEnvironment, hardenedPodmanArgs, sandboxImage } from "../security/sandbox.js";
10
12
  import { runProcess } from "../utils/process.js";
11
13
  export async function executeAgentPrompt(root, config, contract, selection, prompt, options = {}) {
12
14
  const transport = selection.transport === "inherit" ? (config.orchestration?.provider ?? "none") : selection.transport;
13
- const frozenSkills = await loadFrozenSkillContext(root, config, contract.task.id, selection.skills ?? []);
14
- const effectivePrompt = withAgentCharter(selection, prompt, frozenSkills);
15
+ const effectivePrompt = await buildEffectivePrompt(root, config, contract, selection, prompt);
15
16
  if (transport === "paseo")
16
17
  return executeViaPaseo(root, config, contract, selection, effectivePrompt, options);
17
18
  if (transport === "direct")
@@ -20,43 +21,109 @@ export async function executeAgentPrompt(root, config, contract, selection, prom
20
21
  return executePodman(root, config, contract, selection, effectivePrompt, options);
21
22
  throw new Error(`Unsupported agent prompt transport: ${transport}`);
22
23
  }
24
+ export async function materializeAgentPrompt(root, config, contract, selection, options = {}) {
25
+ const transport = selection.transport === "inherit" ? (config.orchestration?.provider ?? "none") : selection.transport;
26
+ if (transport !== "paseo" || options.resumeSessionId)
27
+ return undefined;
28
+ const spec = await compilePaseoAgentLaunchSpec(root, config, contract, { selection, phase: options.phase ?? "queued", kind: options.operationKind });
29
+ const startedAt = new Date().toISOString();
30
+ try {
31
+ const materialized = await materializeManagedPaseoAgent(root, {
32
+ cwd: spec.cwd,
33
+ title: spec.title,
34
+ provider: spec.provider,
35
+ model: spec.model,
36
+ workspaceId: spec.workspaceId,
37
+ labels: spec.labels,
38
+ waitForFinish: false,
39
+ timeoutSeconds: spec.timeoutSeconds
40
+ });
41
+ return session(selection, materialized.exitCode, materialized.stdout, materialized.stderr, {
42
+ id: materialized.id,
43
+ transport: `paseo-${materialized.transport}`,
44
+ workspaceId: materialized.workspaceId ?? spec.workspaceId,
45
+ title: spec.title,
46
+ operationId: spec.operationId,
47
+ operationKind: spec.operationKind,
48
+ phase: spec.phase,
49
+ status: materialized.status ?? "idle",
50
+ startedAt
51
+ });
52
+ }
53
+ catch (error) {
54
+ if (error instanceof PaseoSdkUnavailableError || (error instanceof Error && error.name === "PaseoSdkUnavailableError"))
55
+ return undefined;
56
+ throw error;
57
+ }
58
+ }
59
+ export async function dispatchMaterializedAgentPrompt(root, config, contract, selection, materialized, prompt, options = {}) {
60
+ if (!materialized?.id)
61
+ return executeAgentPrompt(root, config, contract, selection, prompt, options);
62
+ const effectivePrompt = await buildEffectivePrompt(root, config, contract, selection, prompt);
63
+ const timeout = config.orchestration?.worker?.timeoutSeconds ?? 1800;
64
+ const continued = await continueManagedPaseoAgent(root, materialized.id, effectivePrompt, timeout);
65
+ return {
66
+ ...materialized,
67
+ exitCode: continued.exitCode,
68
+ stdout: continued.stdout || materialized.stdout,
69
+ stderr: [materialized.stderr, continued.stderr].filter(Boolean).join("\n"),
70
+ transport: `paseo-${continued.transport}`,
71
+ workspaceId: continued.workspaceId ?? materialized.workspaceId,
72
+ status: continued.status,
73
+ phase: options.phase ?? materialized.phase,
74
+ finishedAt: new Date().toISOString()
75
+ };
76
+ }
23
77
  export async function resumeAgentPrompt(root, config, contract, selection, previous, prompt, options = {}) {
24
78
  if (!previous.id)
25
79
  return executeAgentPrompt(root, config, contract, selection, prompt, options);
26
80
  return executeAgentPrompt(root, config, contract, selection, prompt, { ...options, resumeSessionId: previous.id });
27
81
  }
28
82
  async function executeViaPaseo(root, config, contract, selection, prompt, options) {
29
- const timeout = config.orchestration?.worker?.timeoutSeconds ?? 1800;
83
+ const spec = await compilePaseoAgentLaunchSpec(root, config, contract, { selection, phase: options.phase ?? "work", kind: options.operationKind });
84
+ const startedAt = new Date().toISOString();
30
85
  if (options.resumeSessionId) {
31
- const continued = await continueManagedPaseoAgent(root, options.resumeSessionId, prompt, timeout);
32
- return { ...session(selection, continued.exitCode, continued.stdout, continued.stderr), id: options.resumeSessionId };
86
+ const continued = await continueManagedPaseoAgent(root, options.resumeSessionId, prompt, spec.timeoutSeconds);
87
+ return session(selection, continued.exitCode, continued.stdout, continued.stderr, {
88
+ id: options.resumeSessionId,
89
+ transport: `paseo-${continued.transport}`,
90
+ workspaceId: continued.workspaceId ?? spec.workspaceId,
91
+ title: spec.title,
92
+ operationId: spec.operationId,
93
+ operationKind: spec.operationKind,
94
+ phase: spec.phase,
95
+ status: continued.status,
96
+ startedAt,
97
+ finishedAt: new Date().toISOString()
98
+ });
33
99
  }
34
- const model = selection.runtimeAdapter === "codex" ? selection.modelName : selection.modelId;
35
- const title = `${config.orchestration?.worker?.titlePrefix ?? "aeh"}-${contract.task.id}-${selection.logicalAgent}`;
36
- const workspaceId = await deliveryWorkspaceId(root, config, contract.task.id);
37
100
  const schema = options.outputContract ? outputJsonSchema(options.outputContract) : undefined;
38
- const labels = {
39
- "aeh.project": config.project.name,
40
- "aeh.kind": "worker",
41
- "aeh.task": contract.task.id,
42
- "aeh.role": selection.logicalAgent
43
- };
44
- if (selection.profile)
45
- labels["aeh.profile"] = selection.profile;
46
101
  const launched = await launchManagedPaseoAgent(root, {
47
- cwd: root,
48
- title,
49
- provider: selection.paseoProvider,
50
- model,
51
- workspaceId,
102
+ cwd: spec.cwd,
103
+ title: spec.title,
104
+ provider: spec.provider,
105
+ model: spec.model,
106
+ workspaceId: spec.workspaceId,
52
107
  prompt,
53
108
  outputSchema: schema,
54
- labels,
55
- timeoutSeconds: timeout
109
+ labels: spec.labels,
110
+ timeoutSeconds: spec.timeoutSeconds
111
+ });
112
+ return session(selection, launched.exitCode, launched.stdout, launched.stderr, {
113
+ id: launched.id,
114
+ transport: `paseo-${launched.transport}`,
115
+ workspaceId: launched.workspaceId ?? spec.workspaceId,
116
+ title: spec.title,
117
+ operationId: spec.operationId,
118
+ operationKind: spec.operationKind,
119
+ phase: spec.phase,
120
+ status: launched.status,
121
+ startedAt,
122
+ finishedAt: new Date().toISOString()
56
123
  });
57
- return { ...session(selection, launched.exitCode, launched.stdout, launched.stderr), id: launched.id };
58
124
  }
59
125
  async function executeDirect(root, config, selection, prompt, options) {
126
+ const startedAt = new Date().toISOString();
60
127
  if (selection.runtimeAdapter === "opencode") {
61
128
  const args = ["opencode", "run", "--auto", "--format", "json", "--model", selection.modelId];
62
129
  if (options.resumeSessionId)
@@ -68,13 +135,13 @@ async function executeDirect(root, config, selection, prompt, options) {
68
135
  args.push(...selection.args, prompt);
69
136
  const env = { OPENCODE_CONFIG_CONTENT: JSON.stringify(buildOpenCodeRuntimeConfig(selection, config)) };
70
137
  const result = await runProcess(args.map(quote).join(" "), { cwd: root, timeoutMs: (config.orchestration?.worker?.timeoutSeconds ?? 1800) * 1000, env });
71
- return { ...session(selection, result.exitCode, result.stdout, result.stderr), id: options.resumeSessionId ?? extractSessionId(result.stdout) };
138
+ return session(selection, result.exitCode, result.stdout, result.stderr, { id: options.resumeSessionId ?? extractSessionId(result.stdout), ...directMetadata(options, startedAt) });
72
139
  }
73
140
  if (selection.runtimeAdapter === "codex")
74
- return executeCodex(root, config, selection, prompt, options);
141
+ return executeCodex(root, config, selection, prompt, options, startedAt);
75
142
  throw new Error(`No direct runtime adapter for ${selection.runtimeAdapter}`);
76
143
  }
77
- async function executeCodex(root, config, selection, prompt, options) {
144
+ async function executeCodex(root, config, selection, prompt, options, startedAt) {
78
145
  const schema = options.outputContract ? outputJsonSchema(options.outputContract) : undefined;
79
146
  const temp = schema ? await fs.mkdtemp(path.join(os.tmpdir(), "aeh-codex-schema-")) : undefined;
80
147
  try {
@@ -95,7 +162,7 @@ async function executeCodex(root, config, selection, prompt, options) {
95
162
  catch { /* event stream remains diagnostic fallback */ }
96
163
  }
97
164
  const id = options.resumeSessionId ?? extractSessionId(result.stdout);
98
- return { ...session(selection, result.exitCode, stdout, [result.stderr, outputFile ? `CODEX_EVENT_STREAM:\n${result.stdout}` : ""].filter(Boolean).join("\n")), id };
165
+ return session(selection, result.exitCode, stdout, [result.stderr, outputFile ? `CODEX_EVENT_STREAM:\n${result.stdout}` : ""].filter(Boolean).join("\n"), { id, ...directMetadata(options, startedAt) });
99
166
  }
100
167
  finally {
101
168
  if (temp)
@@ -107,6 +174,7 @@ async function executePodman(root, config, contract, selection, prompt, options)
107
174
  throw new Error(`Podman prompt execution currently supports OpenCode; selected ${selection.runtimeAdapter}.`);
108
175
  if (options.resumeSessionId)
109
176
  throw new Error("Ephemeral hardened Podman sessions cannot resume a host agent session without an explicit persisted session volume.");
177
+ const startedAt = new Date().toISOString();
110
178
  const writable = selection.permissions.write === "allow";
111
179
  const args = ["podman", "run", ...hardenedPodmanArgs(config, selection, writable)];
112
180
  args.push("-v", `${root}:/workspace:${writable ? "rw" : "ro"}`);
@@ -126,10 +194,20 @@ async function executePodman(root, config, contract, selection, prompt, options)
126
194
  runtimeArgs.push(...selection.args, prompt);
127
195
  args.push(`cd /workspace && ${runtimeArgs.map(quote).join(" ")}`);
128
196
  const result = await runProcess(args.map(quote).join(" "), { cwd: root, timeoutMs: (config.orchestration?.worker?.timeoutSeconds ?? 1800) * 1000 });
129
- return { ...session(selection, result.exitCode, result.stdout, result.stderr), id: extractSessionId(result.stdout) };
197
+ return session(selection, result.exitCode, result.stdout, result.stderr, { id: extractSessionId(result.stdout), ...directMetadata(options, startedAt, "podman") });
198
+ }
199
+ async function buildEffectivePrompt(root, config, contract, selection, prompt) {
200
+ const frozenSkills = await loadFrozenSkillContext(root, config, contract.task.id, selection.skills ?? []);
201
+ return withAgentCharter(selection, prompt, frozenSkills);
202
+ }
203
+ function directMetadata(options, startedAt, transport = "direct") {
204
+ const operation = currentOperationContext();
205
+ return { transport, operationId: operation.id, operationKind: operation.kind ?? options.operationKind, phase: options.phase ?? "work", status: "finished", startedAt, finishedAt: new Date().toISOString() };
206
+ }
207
+ function session(selection, exitCode, stdout, stderr, metadata = {}) {
208
+ return { provider: selection.runtimeAdapter, model: selection.modelName, logicalAgent: selection.logicalAgent, nativeAgent: selection.nativeAgent, runtime: selection.runtimeName, profile: selection.profile, exitCode, stdout, stderr, ...metadata };
130
209
  }
131
210
  function withAgentCharter(selection, prompt, frozenSkills) { const sections = [selection.description ? `Agent charter for ${selection.logicalAgent}:\n${selection.description}` : undefined, frozenSkills ? `Frozen control-plane skill context (authoritative for this run):\n${frozenSkills}` : undefined, prompt].filter(Boolean); return sections.join("\n\n"); }
132
- function session(selection, exitCode, stdout, stderr) { return { provider: selection.runtimeAdapter, model: selection.modelName, logicalAgent: selection.logicalAgent, nativeAgent: selection.nativeAgent, runtime: selection.runtimeName, profile: selection.profile, exitCode, stdout, stderr }; }
133
211
  function sealedArtifacts(config, contract) { const dir = config.sdd?.contractsDir ?? ".harness/contracts"; return [...new Set([`${dir}/${contract.task.id}.yaml`, `.harness/seals/${contract.task.id}.json`, ...Object.values(contract.source ?? {}).filter((value) => Boolean(value))])]; }
134
212
  function extractSessionId(text) { for (const line of text.split(/\r?\n/)) {
135
213
  let value;
@@ -1 +1 @@
1
- {"version":3,"file":"agentPrompt.js","sourceRoot":"","sources":["../../src/workers/agentPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BA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,CAAC;AAC9vB,SAAS,KAAK,CAAC,KAAa,IAAY,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { validateExecutionCapabilities } from "../agents/permissions.js";
2
- import { deliveryWorkspaceId } from "../delivery/handoff.js";
3
2
  import { detectPaseoCapabilities } from "../paseo/capabilities.js";
3
+ import { compilePaseoAgentLaunchSpec } from "../paseo/launchSpec.js";
4
4
  import { continueManagedPaseoAgent, launchManagedPaseoAgent } from "../paseo/runtime.js";
5
5
  import { commandExists } from "../utils/process.js";
6
6
  import { buildRepairPrompt, buildWorkerPrompt } from "./prompt.js";
@@ -19,7 +19,7 @@ export class PaseoWorkerExecutor {
19
19
  const caps = await detectPaseoCapabilities(root);
20
20
  if (!caps.background)
21
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 for daemon/bootstrap 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.` };
23
23
  }
24
24
  catch (error) {
25
25
  return { ok: false, message: `Paseo capability probe failed: ${String(error)}` };
@@ -29,43 +29,40 @@ export class PaseoWorkerExecutor {
29
29
  async repair(root, config, contract, session, packet, selection) {
30
30
  if (session.id && (!selection || session.logicalAgent === selection.logicalAgent)) {
31
31
  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") };
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() };
33
33
  }
34
34
  return this.launch(root, config, contract, `${buildWorkerPrompt(contract, selection)}\n\n${buildRepairPrompt(packet)}`, selection);
35
35
  }
36
36
  async launch(root, config, contract, prompt, selection) {
37
- const worker = config.orchestration?.worker;
38
- const provider = selection?.paseoProvider ?? worker?.provider ?? "opencode";
39
- const model = selection ? (selection.runtimeAdapter === "codex" ? selection.modelName : selection.modelId) : worker?.model;
40
- const logicalAgent = selection?.logicalAgent ?? "worker";
41
- const title = `${worker?.titlePrefix ?? "aeh"}-${contract.task.id}-${logicalAgent}`;
42
- const workspaceId = await deliveryWorkspaceId(root, config, contract.task.id);
43
- const labels = {
44
- "aeh.project": config.project.name,
45
- "aeh.kind": "worker",
46
- "aeh.task": contract.task.id,
47
- "aeh.role": logicalAgent
48
- };
49
- if (selection?.profile)
50
- labels["aeh.profile"] = selection.profile;
37
+ const spec = await compilePaseoAgentLaunchSpec(root, config, contract, { selection, phase: "implementation" });
38
+ const startedAt = new Date().toISOString();
51
39
  const launched = await launchManagedPaseoAgent(root, {
52
- cwd: root,
53
- title,
54
- provider,
55
- model,
56
- workspaceId,
40
+ cwd: spec.cwd,
41
+ title: spec.title,
42
+ provider: spec.provider,
43
+ model: spec.model,
44
+ workspaceId: spec.workspaceId,
57
45
  prompt,
58
- labels,
59
- timeoutSeconds: worker?.timeoutSeconds ?? 1800
46
+ labels: spec.labels,
47
+ timeoutSeconds: spec.timeoutSeconds
60
48
  });
61
49
  return {
62
50
  id: launched.id,
63
- provider,
64
- model,
51
+ provider: spec.provider,
52
+ model: spec.model,
65
53
  logicalAgent: selection?.logicalAgent,
66
54
  nativeAgent: selection?.nativeAgent,
67
55
  runtime: selection?.runtimeName,
68
56
  profile: selection?.profile,
57
+ transport: `paseo-${launched.transport}`,
58
+ workspaceId: launched.workspaceId ?? spec.workspaceId,
59
+ title: spec.title,
60
+ operationId: spec.operationId,
61
+ operationKind: spec.operationKind,
62
+ phase: spec.phase,
63
+ status: launched.status,
64
+ startedAt,
65
+ finishedAt: new Date().toISOString(),
69
66
  exitCode: launched.exitCode,
70
67
  stdout: launched.stdout,
71
68
  stderr: launched.stderr
@@ -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,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,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,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE;YAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;QAC9G,IAAI,SAAS,EAAE,CAAC;YAAC,MAAM,MAAM,GAAG,6BAA6B,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAAC,IAAI,MAAM,CAAC,MAAM;gBAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAAC,CAAC;QACzJ,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,uBAAuB,CAAC,IAAI,CAAC,CAAC;YACjD,IAAI,CAAC,IAAI,CAAC,UAAU;gBAAE,OAAO,EAAE,EAAE,EAAE,KA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CACF"}
package/docs/PASEO.md CHANGED
@@ -2,71 +2,212 @@
2
2
 
3
3
  Paseo is AEH's default interactive orchestration surface. The integration separates **Paseo communication/session lifecycle** from **AEH deterministic workflow ownership**.
4
4
 
5
+ ## Visible operation graph
6
+
7
+ A managed conversational lead does not own a long-running shell process. Long AUDIT/RUN workflows are first-class detached AEH operations:
8
+
9
+ ```bash
10
+ aeh operation start audit "Review the repository architecture and security"
11
+ aeh operation start run TASK-123
12
+ ```
13
+
14
+ `start` returns an operation id promptly. The deterministic controller persists state in `.harness/operations/<id>.json`, then performs the sealed workflow independently of the lead conversation:
15
+
16
+ ```text
17
+ Paseo UI
18
+ │
19
+ ▼
20
+ AEH Lead (semantic orchestrator)
21
+ │ operation tools / short status calls
22
+ ▼
23
+ AEH Operation Controller (deterministic, not an LLM agent)
24
+ ├── seals / validators / state machines
25
+ ├── local orchestration workspace
26
+ └── Paseo SDK
27
+ ├── planner/reviewer/worker agent
28
+ ├── planner/reviewer/worker agent
29
+ └── ...
30
+ ```
31
+
32
+ The controller is deliberately **not** represented by a fake Paseo agent. Only real LLM participants become Paseo sessions.
33
+
34
+ Observe or control an operation with:
35
+
36
+ ```bash
37
+ aeh operation status <operation-id>
38
+ aeh operation wait <operation-id> --timeout 1800
39
+ aeh operation cancel <operation-id>
40
+ aeh paseo agents --operation <operation-id>
41
+ aeh paseo agents --operation <operation-id> --phase review
42
+ ```
43
+
44
+ Synchronous `aeh audit` / `aeh run` remain valid compatibility entrypoints for non-interactive automation.
45
+
5
46
  ## SDK-first control plane
6
47
 
7
48
  AEH uses Paseo's published TypeScript client package, `@getpaseo/client`, as the primary control surface for agent creation, follow-up turns, status lookup and directory queries. Paseo currently documents that package as public but **not yet a stable public SDK**, so AEH deliberately resolves the copy bundled with the active `@getpaseo/cli` installation first instead of independently selecting a client version.
8
49
 
9
- The resolver supports normal PATH installations and mise-managed npm tools. In particular, mise may expose a shim through `command -v`; AEH also asks `mise which paseo` for the real binary and `mise where npm:@getpaseo/cli` for the synthetic npm installation root, then resolves `@getpaseo/client` from that package tree. A direct project-level SDK import is retained only as a compatibility fallback.
50
+ The resolver supports normal PATH installations and mise-managed npm tools, including non-hoisted/store layouts. AEH asks `command -v paseo`, `mise which paseo`, and `mise where npm:@getpaseo/cli`, then resolves or bounded-scans the active installation for its exact `@getpaseo/client` entry. A direct project-level SDK import is retained only as a compatibility fallback.
10
51
 
11
- The CLI remains responsible for daemon bootstrap/recovery and is retained as a compatibility fallback when the SDK cannot be resolved or connected:
52
+ Normal lifecycle is always SDK-first unless `AEH_PASEO_FORCE_CLI=1` is explicitly set:
12
53
 
13
54
  ```text
14
55
  AEH
15
- ├── daemon/bootstrap/recovery -> Paseo CLI
16
- └── normal agent lifecycle -> @getpaseo/client bundled with active CLI
56
+ ├── daemon/bootstrap/recovery -> Paseo CLI
57
+ ├── normal agent lifecycle -> active @getpaseo/client
58
+ └── explicit/recoverable compatibility -> Paseo CLI
17
59
  ```
18
60
 
19
- Set `AEH_PASEO_FORCE_CLI=1` only when the compatibility path is deliberately required. `PASEO_DAEMON_URL` overrides the default SDK endpoint `ws://127.0.0.1:6767/ws`; `PASEO_DAEMON_PASSWORD` supplies daemon authentication when configured.
61
+ `PASEO_DAEMON_URL` overrides the default SDK endpoint `ws://127.0.0.1:6767/ws`; `PASEO_DAEMON_PASSWORD` supplies daemon authentication when configured.
20
62
 
21
63
  A system-prompt-only idle agent is an SDK-only invariant. If the SDK is unavailable, AEH refuses to degrade that lead creation into a CLI user turn because doing so would expose the bootstrap as conversational input.
22
64
 
65
+ ## Agent lifecycle
66
+
67
+ AEH separates visible agent lifecycle into three phases:
68
+
69
+ ```text
70
+ materialize -> dispatch -> wait
71
+ ```
72
+
73
+ - **materialize** creates an idle top-level Paseo agent so it is visible immediately;
74
+ - **dispatch** sends the bounded prompt when deterministic prerequisites/evidence are ready;
75
+ - **wait** collects completion/result without conflating creation with execution.
76
+
77
+ For AUDIT, AEH materializes the selected read-only reviewers before running deterministic validators. They remain visible/idle while validation runs, then AEH dispatches them with the completed validator evidence. This preserves deterministic evidence precedence without the earlier “silent terminal” UX.
78
+
79
+ The adapter follows the Paseo 0.3.1 create contract: `cwd` remains present even when `workspaceId` controls placement, `initialPrompt` is used for the first turn, and provider/model remain separate session-config fields. It supports current handles through `send`, `refetch`, timeline polling and compatible legacy helpers where present.
80
+
23
81
  ## Conversational lead
24
82
 
25
- `aeh start` creates the lead as an idle Paseo agent. The AEH bootstrap is passed through the SDK's `systemPrompt`; it is no longer sent as the first user message and there is no synthetic `AEH READY` turn.
83
+ `aeh start` creates the lead as an idle Paseo agent. The AEH bootstrap is passed through the SDK's `systemPrompt`; it is not sent as a user message and there is no synthetic readiness turn.
84
+
85
+ The bootstrap is intentionally thin. `AGENTS.md`, `.harness/skills/engineering-workflow/SKILL.md`, and the resolved AEH agent topology are authoritative for roles, charters, permissions and delegation.
86
+
87
+ When `orchestration.interactive.usePaseoTools` is enabled, AEH derives the exact command vector that launched the current package and injects an `aeh-control` stdio MCP server into the lead session. A normal installed launch therefore becomes conceptually:
88
+
89
+ ```text
90
+ mcp server: aeh-control
91
+ command: <exact Node executable>
92
+ args: [<exact dist/main.js>, operation, mcp]
93
+ ```
94
+
95
+ Only four MCP tools are preapproved:
96
+
97
+ ```text
98
+ aeh_operation_start_audit
99
+ aeh_operation_start_run
100
+ aeh_operation_status
101
+ aeh_operation_cancel
102
+ ```
103
+
104
+ Paseo's `toolPolicy.preapproved` is scoped to those exact MCP server/tool identities; native shell/edit tools are not broadened by this configuration. If the AEH invocation cannot be parsed as a safe command vector, MCP injection is skipped rather than evaluating shell syntax, and the short `aeh operation ...` CLI surface remains the fallback.
105
+
106
+ The lead bootstrap version is incremented when this managed-session contract changes, so explicit resume cannot silently reuse an older lead that lacks the current operation-control surface.
107
+
108
+ Paseo native orchestration tools remain preferred for bounded conversational delegation and `/paseo-handoff`. Deterministic multi-agent workflows are owned by the detached AEH operation controller, so the lead remains available to the user.
26
109
 
27
- The bootstrap is intentionally thin. `AGENTS.md`, `.harness/skills/engineering-workflow/SKILL.md`, and the resolved AEH agent topology are authoritative for roles, charters, permissions and delegation. This avoids duplicating a role map inside every Paseo conversation and prevents prompt/configuration drift.
110
+ ## Operation MCP server
111
+
112
+ The same control surface can be started directly for any MCP-capable host:
113
+
114
+ ```bash
115
+ aeh operation mcp
116
+ ```
28
117
 
29
- When the lead is running inside Paseo and Paseo exposes its orchestration tools, it may still use the native/MCP conversational surface and `/paseo-handoff`. Deterministic Harness-owned work, however, is created externally by AEH through the SDK.
118
+ It is a stdio JSON-RPC server and calls the same persistent controller used by the CLI. It does not duplicate workflow logic and does not become a normative engineering source.
30
119
 
31
120
  ## Independent AEH agents
32
121
 
33
- AEH-managed workers are created without the Paseo SDK `parent` option. A worker may be placed in a delivery workspace, but workspace placement does not establish parentage. This makes each worker a top-level Paseo agent rather than a child whose lifecycle belongs to the current lead conversation.
122
+ AEH-managed workers are created without Paseo `parent` ownership. Workers are independent top-level sessions so lead context rotation cannot terminate or orphan their lifecycle.
34
123
 
35
- Workflow ownership is represented by labels instead:
124
+ Workflow ownership and visibility use labels:
36
125
 
37
126
  ```text
38
127
  aeh.project=<project>
39
128
  aeh.kind=lead|worker
40
129
  aeh.role=<logical-agent>
41
- aeh.task=<task-id> # workers
130
+ aeh.task=<task-id>
131
+ aeh.operation=<operation-id>
132
+ aeh.operation.kind=audit|run|quick|...
133
+ aeh.operation.phase=queued|planning|review|implementation|diagnosis|...
134
+ aeh.workspace.kind=orchestration|delivery
42
135
  aeh.profile=<profile> # when selected
43
136
  aeh.generation=<n> # leads
44
137
  ```
45
138
 
46
- The shared Paseo runtime exposes list/inspect primitives over those labels. This lets AEH determine which logical agent is active for a task without scraping assistant prose or relying on parent/child nesting. The same labels survive lead context rotation, so a fresh lead can correlate existing workers with durable AEH run state.
139
+ The operation/task labels are durable correlation keys; Paseo parent/subagent nesting is not the workflow source of truth.
47
140
 
48
141
  ### Observe active agents
49
142
 
50
- Use the top-level AEH command to inspect the live Paseo directory. The project label is applied automatically; filters are additive:
51
-
52
143
  ```bash
53
144
  aeh paseo agents
54
145
  aeh paseo agents --status working
55
146
  aeh paseo agents --kind worker --role backend-implementer
56
147
  aeh paseo agents --task TASK-123 --json
148
+ aeh paseo agents --operation AUDIT-... --phase review
57
149
  ```
58
150
 
59
- The tabular view reports status, logical role, task, kind, stable Paseo agent ID and title. `--json` returns the same normalized fields plus the complete AEH label set. This is the preferred way to answer which AEH agent is currently working without depending on Paseo parent/subagent nesting.
151
+ The operation-aware view reports stable Paseo IDs, role, operation, phase, task, status and title.
152
+
153
+ ## Orchestration workspace vs delivery workspace
154
+
155
+ Paseo workspaces and Git delivery isolation are separate concepts.
156
+
157
+ For each detached operation AEH attempts to create a **local Paseo workspace** pointing at the existing repository directory. Its purpose is UI/execution grouping: multiple agents for the same audit/run appear together. It does not create or imply a Git branch/worktree.
158
+
159
+ When delivery policy creates an issue-linked worktree workspace, that delivery workspace takes precedence for implementation/review agents:
160
+
161
+ ```text
162
+ operation workspace -> local grouping, no Git isolation
163
+
164
+ delivery workspace -> branch/worktree isolation and delivery lifecycle
165
+ ```
166
+
167
+ This lets audits and non-delivery operations have coherent Paseo grouping even when `delivery.paseo.enabled` is false.
60
168
 
61
169
  ## Runtime consolidation
62
170
 
63
- Lead startup, `PaseoWorkerExecutor`, and generic `agentPrompt` execution all use the same managed Paseo runtime. That runtime owns SDK-first create/run/probe/list behavior and the CLI fallback. Individual worker paths should not add new hand-written `paseo run/send/wait/logs` loops.
171
+ `PaseoWorkerExecutor` and generic `agentPrompt` no longer independently reconstruct provider/model/title/workspace/labels. Both consume one launch-spec compiler. This is the single boundary for:
172
+
173
+ - provider/model selection;
174
+ - title;
175
+ - operation/task labels;
176
+ - semantic phase;
177
+ - orchestration-vs-delivery workspace;
178
+ - timeout.
179
+
180
+ This prevents launch-path drift such as provider/model or cwd/workspace serialization mismatches.
64
181
 
65
- Structured output is passed through the SDK `outputSchema` field. The compatibility CLI path continues to negotiate `--output-schema` and background capabilities dynamically.
182
+ ## Operation/session metadata
183
+
184
+ Worker/reviewer execution records retain lifecycle metadata in addition to stdout/stderr:
185
+
186
+ ```text
187
+ id
188
+ transport
189
+ workspaceId
190
+ title
191
+ operationId
192
+ operationKind
193
+ phase
194
+ status
195
+ startedAt
196
+ finishedAt
197
+ logicalAgent / runtime / model
198
+ ```
66
199
 
67
- ## Session policy
200
+ Audit/run reports can therefore distinguish a real Paseo SDK session from CLI/direct/Podman execution without inferring it from logs.
68
201
 
69
- Default:
202
+ Operation phase is durable even when optional telemetry export is disabled. Harness lifecycle events update `.harness/operations/<id>.json` through phases such as `validating`, `planning`, `implementation`, `remediation`, `review`, `delivery`, and `finished`.
203
+
204
+ ## Cancellation
205
+
206
+ `aeh operation cancel <id>` terminates the detached controller and then discovers real Paseo agents by `aeh.operation=<id>`. Each active agent is interrupted through Paseo's supported `paseo agent stop <id>` lifecycle. Cleanup failures are retained as `cleanupWarnings` in operation state rather than silently ignored.
207
+
208
+ ## Session policy and context rotation
209
+
210
+ Default lead policy remains:
70
211
 
71
212
  ```yaml
72
213
  orchestration:
@@ -79,16 +220,10 @@ aeh start # fresh idle lead
79
220
  aeh start --resume # explicit compatible reuse
80
221
  ```
81
222
 
82
- Workspaces and durable AEH state remain reusable even though normal conversational context starts clean.
83
-
84
- ## Context rotation
85
-
86
- Default pressure policy is 70/80/90 percent. `aeh context guard` consumes a context ratio only when Paseo exposes a usable field; AEH does not guess.
87
-
88
- At the handoff threshold it writes a deterministic `.harness/paseo/handoffs/*.json` artifact. From a managed Paseo lead it also creates the replacement lead automatically and bootstraps it from the handoff artifact and referenced sealed/run/audit/delivery state. Workers remain independent top-level agents associated through AEH labels and durable task/run state rather than lead parentage.
223
+ Default context pressure policy is 70/80/90 percent. At the handoff threshold AEH writes `.harness/paseo/handoffs/*.json` and rotates responsibility to a fresh lead. Detached operations and independent worker agents continue; durable operation/run/audit/delivery state allows the replacement lead to correlate them without replaying the old conversation.
89
224
 
90
225
  ## Trust boundary
91
226
 
92
- Paseo owns communication, process and session lifecycle. It is not normative engineering truth. AEH TaskContracts, seals, deterministic reports, evidence graphs and quality gates continue to decide acceptance.
227
+ Paseo owns communication, UI grouping, process and session lifecycle. It is not normative engineering truth. AEH TaskContracts, seals, deterministic reports, operation state, evidence graphs and quality gates decide acceptance.
93
228
 
94
229
  For stronger direct process isolation configure Podman sandboxing where appropriate; Paseo orchestration and worker sandboxing remain separate policy axes.