agentic-engineering-harness 0.6.5 → 0.6.7

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 (40) hide show
  1. package/README.md +22 -1
  2. package/dist/main.js +62 -0
  3. package/dist/main.js.map +1 -1
  4. package/dist/operations/controller.d.ts +3 -1
  5. package/dist/operations/controller.js +165 -31
  6. package/dist/operations/controller.js.map +1 -1
  7. package/dist/operations/interactive.d.ts +5 -0
  8. package/dist/operations/interactive.js +45 -0
  9. package/dist/operations/interactive.js.map +1 -0
  10. package/dist/operations/mcp.js +19 -1
  11. package/dist/operations/mcp.js.map +1 -1
  12. package/dist/operations/state.d.ts +11 -0
  13. package/dist/operations/state.js +69 -13
  14. package/dist/operations/state.js.map +1 -1
  15. package/dist/paseo/capabilities.d.ts +14 -2
  16. package/dist/paseo/capabilities.js +46 -14
  17. package/dist/paseo/capabilities.js.map +1 -1
  18. package/dist/paseo/context.d.ts +11 -2
  19. package/dist/paseo/context.js +118 -81
  20. package/dist/paseo/context.js.map +1 -1
  21. package/dist/paseo/native.d.ts +63 -0
  22. package/dist/paseo/native.js +549 -0
  23. package/dist/paseo/native.js.map +1 -0
  24. package/dist/paseo/runtime.d.ts +9 -1
  25. package/dist/paseo/runtime.js +348 -57
  26. package/dist/paseo/runtime.js.map +1 -1
  27. package/dist/paseo/start.d.ts +8 -4
  28. package/dist/paseo/start.js +166 -41
  29. package/dist/paseo/start.js.map +1 -1
  30. package/dist/paseo/trace.d.ts +12 -0
  31. package/dist/paseo/trace.js +26 -0
  32. package/dist/paseo/trace.js.map +1 -0
  33. package/dist/runtime/invocation.d.ts +10 -0
  34. package/dist/runtime/invocation.js +51 -0
  35. package/dist/runtime/invocation.js.map +1 -0
  36. package/docs/PASEO_NATIVE.md +181 -0
  37. package/package.json +5 -3
  38. package/scripts/link-self-bin.mjs +36 -0
  39. package/skills/engineering-workflow/SKILL.md +5 -1
  40. package/skills/paseo-orchestration/SKILL.md +33 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-engineering-harness",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
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": {
@@ -14,12 +14,14 @@
14
14
  "policies",
15
15
  "schemas",
16
16
  "skills",
17
- "docs"
17
+ "docs",
18
+ "scripts/link-self-bin.mjs"
18
19
  ],
19
20
  "scripts": {
20
21
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
21
22
  "build": "npm run clean && tsc -p tsconfig.json",
22
- "prepare": "npm run build",
23
+ "prepare": "npm run build && node scripts/link-self-bin.mjs",
24
+ "aeh": "node ./dist/main.js",
23
25
  "dev": "tsx src/main.ts",
24
26
  "test": "vitest run",
25
27
  "test:watch": "vitest",
@@ -0,0 +1,36 @@
1
+ import fs from "node:fs/promises";
2
+ import path from "node:path";
3
+ import process from "node:process";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
7
+ const binDir = path.join(root, "node_modules", ".bin");
8
+ const entry = path.join(root, "dist", "main.js");
9
+
10
+ try {
11
+ await fs.access(entry);
12
+ } catch {
13
+ throw new Error(`Cannot link AEH self-development bin because ${entry} does not exist. Run npm run build first.`);
14
+ }
15
+
16
+ await fs.mkdir(binDir, { recursive: true });
17
+ for (const name of ["aeh", "engineering-harness"]) await writeBin(name);
18
+
19
+ async function writeBin(name) {
20
+ const sh = path.join(binDir, name);
21
+ const cmd = `${sh}.cmd`;
22
+ const ps1 = `${sh}.ps1`;
23
+ const relative = "../../dist/main.js";
24
+
25
+ await fs.rm(sh, { force: true });
26
+ await fs.writeFile(sh, `#!/bin/sh\nexec node \"$(dirname \"$0\")/${relative}\" \"$@\"\n`);
27
+ await fs.chmod(sh, 0o755);
28
+
29
+ await fs.rm(cmd, { force: true });
30
+ await fs.writeFile(cmd, `@ECHO OFF\r\nnode \"%~dp0\\..\\..\\dist\\main.js\" %*\r\n`);
31
+
32
+ await fs.rm(ps1, { force: true });
33
+ await fs.writeFile(ps1, `#!/usr/bin/env pwsh\n& node \"$PSScriptRoot/../../dist/main.js\" $args\nexit $LASTEXITCODE\n`);
34
+ }
35
+
36
+ if (process.env.AEH_SELF_BIN_VERBOSE === "1") console.log(`Linked repo-local AEH bins in ${binDir}`);
@@ -57,7 +57,9 @@ Do not wait for model compaction as the normal context lifecycle.
57
57
  - >=80%: proactive handoff to a fresh lead;
58
58
  - >=90%: mandatory handoff before additional engineering work.
59
59
 
60
- Use Paseo's current status/tool data when it exposes context usage, otherwise use `aeh context guard --agent "$PASEO_AGENT_ID"`. When AEH writes a `.harness/paseo/handoffs/*.json` artifact, use `/paseo-handoff` (preferred) or a fresh `create_agent`, point the new lead at that artifact and stop continuing the workflow in the old lead. Deterministic artifacts, not a prose replay of the whole chat, carry state across the handoff. Detached AEH operations and their top-level worker agents survive lead rotation.
60
+ In a managed lead, prefer the injected `aeh_context_status` tool before broad work and again after completed-turn boundaries. It reads the current Paseo AgentSnapshot and applies AEH's thresholds to the canonical `lastUsage.contextWindowUsedTokens/contextWindowMaxTokens` fields. `NO_USAGE_YET` means the provider has not emitted usage yet; `USAGE_UNAVAILABLE` means those canonical fields are unavailable. Never infer pressure from generic input/output token counters.
61
+
62
+ Use `aeh context guard --agent "$PASEO_AGENT_ID"` only as the non-interactive/compatibility fallback. When AEH writes a `.harness/paseo/handoffs/*.json` artifact, use `/paseo-handoff` (preferred) or a fresh `create_agent`, point the new lead at that artifact and stop continuing the workflow in the old lead. Deterministic artifacts, not a prose replay of the whole chat, carry state across the handoff. Detached AEH operations and their top-level worker agents survive lead rotation.
61
63
 
62
64
  ## Intent layer
63
65
 
@@ -138,6 +140,8 @@ Use durable operation state for progress rather than narrating terminal silence:
138
140
 
139
141
  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.
140
142
 
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.
144
+
141
145
  ## Quality convergence and recovery
142
146
 
143
147
  After a sealed operation starts, do not reimplement Harness state machines in the lead. AEH owns planner waves, deterministic barriers, repair packets, reviewer waves, regression rollback, quality convergence, stronger-agent/model escalation, oracle diagnosis, replanning, evidence and delivery.
@@ -7,6 +7,10 @@ purpose: Keep AEH leads thin by delegating through Paseo native/MCP tools and or
7
7
 
8
8
  Use this skill whenever an AEH lead, planner or coordinator delegates work through Paseo.
9
9
 
10
+ ## Authority boundary
11
+
12
+ Paseo is authoritative for agent lifecycle, agent snapshots, provider/model availability, context-window usage and generic orchestration tools. AEH is authoritative for engineering policy, SDD/contracts/seals, deterministic validation, detached operation state, quality convergence and acceptance. Do not reimplement Paseo snapshot/provider semantics by scraping CLI output, and do not move AEH acceptance policy into an LLM agent.
13
+
10
14
  ## Preferred control surface
11
15
 
12
16
  When Paseo tools are injected into the current agent, prefer them over shell commands for bounded conversational delegation:
@@ -17,18 +21,36 @@ When Paseo tools are injected into the current agent, prefer them over shell com
17
21
  - `cancel_agent` / `archive_agent` for lifecycle cleanup;
18
22
  - `update_agent` / `set_agent_mode` for supported runtime changes.
19
23
 
20
- When the optional AEH operation MCP server (`aeh operation mcp`) is injected, use its tools for long deterministic Harness workflows:
24
+ When the AEH control MCP server (`aeh operation mcp`) is injected, use its tools for deterministic Harness policy/control:
21
25
 
22
26
  - `aeh_operation_start_audit`;
23
27
  - `aeh_operation_start_run`;
24
28
  - `aeh_operation_status`;
25
- - `aeh_operation_cancel`.
29
+ - `aeh_operation_cancel`;
30
+ - `aeh_context_status`.
31
+
32
+ `aeh_context_status` reads the current Paseo AgentSnapshot and applies AEH context thresholds. It must be preferred over shell/log parsing. `NO_USAGE_YET` means the provider has not emitted a usage snapshot yet; `USAGE_UNAVAILABLE` means the current provider snapshot lacks the canonical context-window fields. Never invent a percentage from input/output token counters.
26
33
 
27
- These MCP tools call the same persistent detached operation controller as the CLI. They do not create a controller LLM agent. If the AEH MCP server is not injected, `aeh operation start/status/cancel` is the short non-blocking compatibility surface; do not replace it with a long synchronous `aeh audit`/`aeh run` from the conversational lead.
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.
28
35
 
29
36
  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.
30
37
 
31
- The Harness CLI/daemon adapter remains a deterministic compatibility path when native tools/SDK are unavailable. Do not hand-write `paseo run` shell loops from the lead unless AEH explicitly reports that it is using the CLI fallback.
38
+ ## SDK-first lifecycle
39
+
40
+ AEH should use the public `@getpaseo/client` surface first for semantic operations:
41
+
42
+ - provider/model preflight before creating agents;
43
+ - `agents.ref(id).refetch()` for current snapshots;
44
+ - `AgentSnapshot.lastUsage.contextWindowUsedTokens/contextWindowMaxTokens` for context pressure;
45
+ - agent subscriptions for event-driven completion, with subscribe-before-refetch race closure;
46
+ - provider snapshot/model/diagnostic APIs for early configuration failures.
47
+
48
+ 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
+
50
+ 1. operation workspace creation requiring `--isolation local` plus user-visible `--title`, which the public SDK create contract does not yet expose with equivalent parity;
51
+ 2. external cleanup/stop where the public agent handle does not expose cancel/kill parity required by the deterministic controller.
52
+
53
+ Do not replace those two bounded uses with internal `DaemonClient` imports. Their use must remain traceable and should disappear when the public SDK reaches parity.
32
54
 
33
55
  ## Visible execution graph
34
56
 
@@ -36,6 +58,12 @@ Real planner/reviewer/implementer/oracle sessions should be top-level Paseo agen
36
58
 
37
59
  Use `aeh paseo agents --operation <id>` (or Paseo's corresponding directory/status tools) to observe real participants without scraping terminal output.
38
60
 
61
+ ## Observability
62
+
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.
64
+
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.
66
+
39
67
  ## Lead discipline
40
68
 
41
69
  The lead owns intent, high-level routing, true ambiguity and final semantic acceptance. Delegate:
@@ -50,4 +78,4 @@ Return compact structured summaries to the lead. Do not paste raw logs or entire
50
78
 
51
79
  ## Context pressure
52
80
 
53
- Before broad engineering work, inspect the current agent status if Paseo exposes context usage. At the configured handoff threshold, create a deterministic AEH handoff artifact and use `/paseo-handoff` (preferred) or `create_agent` to continue in a fresh lead. Detached operations and their top-level workers remain valid across lead rotation. Do not compact and continue as the normal path when AEH has declared `HANDOFF_REQUIRED` or `HARD_HANDOFF`.
81
+ Before broad engineering work and after completed-turn boundaries, use `aeh_context_status` when injected. At the configured handoff threshold, create a deterministic AEH handoff artifact and use `/paseo-handoff` (preferred) or `create_agent` to continue in a fresh lead. Detached operations and their top-level workers remain valid across lead rotation. Do not compact and continue as the normal path when AEH has declared `HANDOFF_REQUIRED` or `HARD_HANDOFF`.