harnery 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +8 -0
- package/dist/commands/agents.d.ts +24 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +244 -13
- package/dist/commands/backup.d.ts +5 -4
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +15 -14
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +27 -1
- package/dist/commands/claude-desktop.d.ts +19 -0
- package/dist/commands/claude-desktop.d.ts.map +1 -0
- package/dist/commands/claude-desktop.js +168 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +149 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +37 -0
- package/dist/commands/eml.d.ts +32 -0
- package/dist/commands/eml.d.ts.map +1 -1
- package/dist/commands/eml.js +16 -3
- package/dist/commands/grep.d.ts +35 -2
- package/dist/commands/grep.d.ts.map +1 -1
- package/dist/commands/grep.js +427 -139
- package/dist/commands/harness.d.ts +11 -0
- package/dist/commands/harness.d.ts.map +1 -0
- package/dist/commands/harness.js +118 -0
- package/dist/commands/init.d.ts +15 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +125 -14
- package/dist/commands/presence.d.ts +9 -4
- package/dist/commands/presence.d.ts.map +1 -1
- package/dist/commands/presence.js +88 -5
- package/dist/commands/relay.d.ts +9 -0
- package/dist/commands/relay.d.ts.map +1 -0
- package/dist/commands/relay.js +143 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +5 -0
- package/dist/commands/workflow.d.ts +4 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +82 -0
- package/dist/core/agents/canonical-emit.d.ts +15 -0
- package/dist/core/agents/canonical-emit.d.ts.map +1 -1
- package/dist/core/agents/canonical-emit.js +41 -3
- package/dist/core/agents/cli.js +14 -5
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
- package/dist/core/agents/render/prompt-context.js +44 -3
- package/dist/core/agents/render/session-context.d.ts.map +1 -1
- package/dist/core/agents/render/session-context.js +26 -1
- package/dist/core/agents/rules/claim-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/claim-conflict.js +26 -1
- package/dist/core/agents/rules/commit-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/commit-conflict.js +4 -37
- package/dist/core/agents/rules/stop-hook.d.ts +8 -0
- package/dist/core/agents/rules/stop-hook.d.ts.map +1 -1
- package/dist/core/agents/rules/stop-hook.js +8 -0
- package/dist/core/agents/session-events.d.ts.map +1 -1
- package/dist/core/agents/session-events.js +16 -43
- package/dist/core/agents/state/heartbeat-projector.d.ts +2 -0
- package/dist/core/agents/state/heartbeat-projector.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-projector.js +24 -4
- package/dist/core/agents/state/heartbeat-writer.d.ts +16 -2
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -1
- package/dist/core/agents/state/heartbeat-writer.js +24 -7
- package/dist/core/agents/state/names.d.ts +38 -3
- package/dist/core/agents/state/names.d.ts.map +1 -1
- package/dist/core/agents/state/names.js +46 -7
- package/dist/core/agents/state/pidmap.d.ts +5 -1
- package/dist/core/agents/state/pidmap.d.ts.map +1 -1
- package/dist/core/agents/state/pidmap.js +58 -2
- package/dist/core/agents/state/stale-sweep.d.ts +3 -2
- package/dist/core/agents/state/stale-sweep.d.ts.map +1 -1
- package/dist/core/agents/state/stale-sweep.js +6 -6
- package/dist/core/config.d.ts +77 -11
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +210 -25
- package/dist/core/context/index.d.ts +144 -0
- package/dist/core/context/index.d.ts.map +1 -0
- package/dist/core/context/index.js +380 -0
- package/dist/core/harnesses/bench.d.ts +29 -0
- package/dist/core/harnesses/bench.d.ts.map +1 -0
- package/dist/core/harnesses/bench.js +151 -0
- package/dist/core/harnesses/index.d.ts +9 -0
- package/dist/core/harnesses/index.d.ts.map +1 -0
- package/dist/core/harnesses/index.js +4 -0
- package/dist/core/harnesses/profiles.d.ts +62 -0
- package/dist/core/harnesses/profiles.d.ts.map +1 -0
- package/dist/core/harnesses/profiles.js +115 -0
- package/dist/core/harnesses/registry.d.ts +15 -0
- package/dist/core/harnesses/registry.d.ts.map +1 -0
- package/dist/core/harnesses/registry.js +113 -0
- package/dist/core/harnesses/types.d.ts +64 -0
- package/dist/core/harnesses/types.d.ts.map +1 -0
- package/dist/core/harnesses/types.js +20 -0
- package/dist/core/hooks/cli.js +309 -66
- package/dist/core/hooks/events/schema.d.ts +42 -1
- package/dist/core/hooks/events/schema.d.ts.map +1 -1
- package/dist/core/hooks/harness/events.d.ts +7 -0
- package/dist/core/hooks/harness/events.d.ts.map +1 -1
- package/dist/core/hooks/harness/events.js +4 -0
- package/dist/core/hooks/harness/parse.d.ts +1 -1
- package/dist/core/hooks/harness/parse.d.ts.map +1 -1
- package/dist/core/hooks/harness/parse.js +4 -0
- package/dist/core/hooks/resolve/coord-root.d.ts +11 -0
- package/dist/core/hooks/resolve/coord-root.d.ts.map +1 -1
- package/dist/core/hooks/resolve/coord-root.js +28 -6
- package/dist/core/presence/blob.d.ts +40 -0
- package/dist/core/presence/blob.d.ts.map +1 -0
- package/dist/core/presence/blob.js +91 -0
- package/dist/core/presence/git.d.ts +68 -0
- package/dist/core/presence/git.d.ts.map +1 -0
- package/dist/core/presence/git.js +173 -0
- package/dist/core/presence/index.d.ts +74 -0
- package/dist/core/presence/index.d.ts.map +1 -0
- package/dist/core/presence/index.js +224 -0
- package/dist/core/presence/relay-client.d.ts +39 -0
- package/dist/core/presence/relay-client.d.ts.map +1 -0
- package/dist/core/presence/relay-client.js +295 -0
- package/dist/core/presence/relay-protocol.d.ts +94 -0
- package/dist/core/presence/relay-protocol.d.ts.map +1 -0
- package/dist/core/presence/relay-protocol.js +169 -0
- package/dist/core/workflow/billing.d.ts +48 -0
- package/dist/core/workflow/billing.d.ts.map +1 -0
- package/dist/core/workflow/billing.js +108 -0
- package/dist/core/workflow/child-env.d.ts +30 -0
- package/dist/core/workflow/child-env.d.ts.map +1 -0
- package/dist/core/workflow/child-env.js +43 -0
- package/dist/core/workflow/engine.d.ts +21 -0
- package/dist/core/workflow/engine.d.ts.map +1 -0
- package/dist/core/workflow/engine.js +349 -0
- package/dist/core/workflow/harnesses.d.ts +17 -0
- package/dist/core/workflow/harnesses.d.ts.map +1 -0
- package/dist/core/workflow/harnesses.js +21 -0
- package/dist/core/workflow/spawn-claude.d.ts +25 -0
- package/dist/core/workflow/spawn-claude.d.ts.map +1 -0
- package/dist/core/workflow/spawn-claude.js +103 -0
- package/dist/core/workflow/spawn-codex.d.ts +22 -0
- package/dist/core/workflow/spawn-codex.d.ts.map +1 -0
- package/dist/core/workflow/spawn-codex.js +88 -0
- package/dist/core/workflow/spawn-cursor.d.ts +29 -0
- package/dist/core/workflow/spawn-cursor.d.ts.map +1 -0
- package/dist/core/workflow/spawn-cursor.js +91 -0
- package/dist/core/workflow/types.d.ts +152 -0
- package/dist/core/workflow/types.d.ts.map +1 -0
- package/dist/core/workflow/types.js +9 -0
- package/dist/core/workflow/validate.d.ts +15 -0
- package/dist/core/workflow/validate.d.ts.map +1 -0
- package/dist/core/workflow/validate.js +70 -0
- package/dist/lib/browser/client.d.ts +16 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +22 -0
- package/dist/lib/browser/index.d.ts +1 -0
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/index.js +1 -0
- package/dist/lib/browser/launch-args.d.ts +21 -0
- package/dist/lib/browser/launch-args.d.ts.map +1 -0
- package/dist/lib/browser/launch-args.js +32 -0
- package/dist/lib/claude-desktop.d.ts +105 -0
- package/dist/lib/claude-desktop.d.ts.map +1 -0
- package/dist/lib/claude-desktop.js +217 -0
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +5 -2
- package/dist/lib/identities/assume.d.ts +51 -0
- package/dist/lib/identities/assume.d.ts.map +1 -0
- package/dist/lib/identities/assume.js +274 -0
- package/dist/lib/identities/index.d.ts +7 -7
- package/dist/lib/identities/index.d.ts.map +1 -1
- package/dist/lib/identities/index.js +24 -24
- package/dist/lib/instructions/templates.d.ts.map +1 -1
- package/dist/lib/instructions/templates.js +15 -2
- package/package.json +12 -1
- package/schemas/config.schema.json +88 -19
- package/src/commander.ts +8 -0
- package/src/commands/agents.ts +280 -14
- package/src/commands/backup.ts +17 -16
- package/src/commands/browse.ts +32 -0
- package/src/commands/claude-desktop.ts +215 -0
- package/src/commands/context.ts +174 -1
- package/src/commands/doctor.ts +44 -0
- package/src/commands/eml.ts +22 -4
- package/src/commands/grep.ts +535 -142
- package/src/commands/harness.ts +147 -0
- package/src/commands/init.ts +138 -17
- package/src/commands/presence.ts +111 -5
- package/src/commands/relay.ts +160 -0
- package/src/commands/sync.ts +4 -0
- package/src/commands/workflow.ts +123 -0
- package/src/core/agents/canonical-emit.ts +41 -3
- package/src/core/agents/cli.ts +15 -6
- package/src/core/agents/render/prompt-context.ts +48 -3
- package/src/core/agents/render/session-context.ts +27 -1
- package/src/core/agents/rules/claim-conflict.ts +26 -1
- package/src/core/agents/rules/commit-conflict.ts +4 -33
- package/src/core/agents/rules/stop-hook.ts +17 -0
- package/src/core/agents/session-events.ts +15 -39
- package/src/core/agents/state/heartbeat-projector.ts +23 -2
- package/src/core/agents/state/heartbeat-writer.ts +33 -7
- package/src/core/agents/state/names.ts +68 -9
- package/src/core/agents/state/pidmap.ts +59 -2
- package/src/core/agents/state/stale-sweep.ts +6 -11
- package/src/core/config.ts +271 -24
- package/src/core/context/index.ts +575 -0
- package/src/core/harnesses/bench.ts +214 -0
- package/src/core/harnesses/index.ts +31 -0
- package/src/core/harnesses/profiles.ts +141 -0
- package/src/core/harnesses/registry.ts +140 -0
- package/src/core/harnesses/types.ts +90 -0
- package/src/core/hooks/cli.ts +361 -65
- package/src/core/hooks/events/schema.ts +72 -0
- package/src/core/hooks/harness/events.ts +11 -0
- package/src/core/hooks/harness/parse.ts +7 -1
- package/src/core/hooks/resolve/coord-root.ts +28 -6
- package/src/core/presence/blob.ts +125 -0
- package/src/core/presence/git.ts +191 -0
- package/src/core/presence/index.ts +274 -0
- package/src/core/presence/relay-client.ts +322 -0
- package/src/core/presence/relay-protocol.ts +246 -0
- package/src/core/workflow/billing.ts +152 -0
- package/src/core/workflow/child-env.ts +47 -0
- package/src/core/workflow/engine.ts +403 -0
- package/src/core/workflow/harnesses.ts +33 -0
- package/src/core/workflow/spawn-claude.ts +118 -0
- package/src/core/workflow/spawn-codex.ts +93 -0
- package/src/core/workflow/spawn-cursor.ts +108 -0
- package/src/core/workflow/types.ts +160 -0
- package/src/core/workflow/validate.ts +75 -0
- package/src/lib/browser/client.ts +37 -0
- package/src/lib/browser/index.ts +1 -0
- package/src/lib/browser/launch-args.ts +33 -0
- package/src/lib/claude-desktop.ts +293 -0
- package/src/lib/docs-lint.ts +5 -2
- package/src/lib/identities/assume.ts +363 -0
- package/src/lib/identities/index.ts +28 -24
- package/src/lib/instructions/templates.ts +16 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn-cursor.d.ts","sourceRoot":"","sources":["../../../src/core/workflow/spawn-cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGjF,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AASrE,gEAAgE;AAChE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CAWA;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,YAAY,GAAG,iBAAiB,CAS1E;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,WAAW,CA6BxE;AAED,eAAO,MAAM,aAAa,EAAE,OAe3B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cursor spawn adapter: runs one subagent as a headless `cursor-agent -p`
|
|
3
|
+
* subprocess with `--output-format json`.
|
|
4
|
+
*
|
|
5
|
+
* Contract notes (LIVE-VERIFIED 2026-07-17 against cursor-agent
|
|
6
|
+
* 2026.07.16-899851b: schema-gated triage + text stages round-trip via
|
|
7
|
+
* `--harness cursor`, session_id parses from the envelope):
|
|
8
|
+
* - `cursor-agent -p "<prompt>" --output-format json` prints a single result
|
|
9
|
+
* envelope modeled on Claude Code's (`{type: "result", is_error, result,
|
|
10
|
+
* session_id, …}`).
|
|
11
|
+
* - `--trust` is required: headless runs refuse untrusted workspaces (exit 1,
|
|
12
|
+
* "Workspace Trust Required") — see the argv comment below.
|
|
13
|
+
* - Envelope drift guard: when stdout doesn't parse as JSON but the process
|
|
14
|
+
* exited 0, the raw stdout is returned as the reply text.
|
|
15
|
+
* - No per-run cost surface → undefined. No max-turns equivalent → `maxTurns`
|
|
16
|
+
* accepted and ignored (documented in the CLI docs page).
|
|
17
|
+
*/
|
|
18
|
+
import { exec } from "../../lib/exec.js";
|
|
19
|
+
import { validateHarnessEffort } from "../harnesses/profiles.js";
|
|
20
|
+
import { buildChildEnv } from "./child-env.js";
|
|
21
|
+
import { notFoundError } from "./harnesses.js";
|
|
22
|
+
/** Exported for unit tests (no live binary to test against). */
|
|
23
|
+
export function parseCursorOutput(stdout) {
|
|
24
|
+
try {
|
|
25
|
+
const envelope = JSON.parse(stdout);
|
|
26
|
+
return {
|
|
27
|
+
text: String(envelope.result ?? ""),
|
|
28
|
+
sessionId: envelope.session_id,
|
|
29
|
+
isError: Boolean(envelope.is_error),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return { text: stdout, isError: false };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function buildCursorInvocation(req) {
|
|
37
|
+
validateHarnessEffort("cursor", req.effort);
|
|
38
|
+
// --trust: headless cursor-agent refuses untrusted workspaces (exit 1,
|
|
39
|
+
// "Workspace Trust Required"). Workflow children run in the engine's cwd
|
|
40
|
+
// deliberately and may edit files — the same posture as the codex adapter's
|
|
41
|
+
// `--sandbox workspace-write` — so trusting that directory is implied.
|
|
42
|
+
const argv = ["cursor-agent", "-p", req.prompt, "--output-format", "json", "--trust"];
|
|
43
|
+
if (req.model)
|
|
44
|
+
argv.push("--model", req.model);
|
|
45
|
+
return { argv };
|
|
46
|
+
}
|
|
47
|
+
export function normalizeCursorResult(raw) {
|
|
48
|
+
if (raw.exitCode === 127) {
|
|
49
|
+
return { ok: false, text: "", durationMs: raw.durationMs, error: notFoundError("cursor") };
|
|
50
|
+
}
|
|
51
|
+
if (raw.exitCode !== 0) {
|
|
52
|
+
return {
|
|
53
|
+
ok: false,
|
|
54
|
+
text: "",
|
|
55
|
+
durationMs: raw.durationMs,
|
|
56
|
+
error: `cursor-agent exited ${raw.exitCode}: ${(raw.stderr || raw.stdout).slice(0, 500)}`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const parsed = parseCursorOutput(raw.stdout);
|
|
60
|
+
if (parsed.isError) {
|
|
61
|
+
return {
|
|
62
|
+
ok: false,
|
|
63
|
+
text: parsed.text,
|
|
64
|
+
sessionId: parsed.sessionId,
|
|
65
|
+
durationMs: raw.durationMs,
|
|
66
|
+
error: `cursor-agent reported is_error: ${parsed.text.slice(0, 300)}`,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
ok: true,
|
|
71
|
+
text: parsed.text,
|
|
72
|
+
sessionId: parsed.sessionId,
|
|
73
|
+
durationMs: raw.durationMs,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export const cursorSpawner = async (req) => {
|
|
77
|
+
const t0 = Date.now();
|
|
78
|
+
let invocation;
|
|
79
|
+
try {
|
|
80
|
+
invocation = buildCursorInvocation(req);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
return { ok: false, text: "", durationMs: 0, error: error.message };
|
|
84
|
+
}
|
|
85
|
+
const r = await exec(invocation.argv, {
|
|
86
|
+
cwd: req.cwd,
|
|
87
|
+
env: buildChildEnv(req.runId, { subscriptionOnly: req.subscriptionOnly }),
|
|
88
|
+
timeout: req.timeoutMs,
|
|
89
|
+
});
|
|
90
|
+
return normalizeCursorResult({ ...r, durationMs: Date.now() - t0 });
|
|
91
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow engine contracts. A workflow is a small throwaway JS script with
|
|
3
|
+
* bounded, schema-gated stages that fan work out to headless harness-CLI
|
|
4
|
+
* subagents; the SCRIPT (deterministic code), not any model, decides routing
|
|
5
|
+
* between stages, and the run always terminates when the script returns.
|
|
6
|
+
*
|
|
7
|
+
* Design record: decision 0015 (portable coordination-aware workflows).
|
|
8
|
+
*/
|
|
9
|
+
import type { BillingMode, BillingProber } from "./billing.js";
|
|
10
|
+
/** JSON-schema *subset* accepted by stage gates (see validate.ts). */
|
|
11
|
+
export interface StageSchema {
|
|
12
|
+
type: "object" | "array" | "string" | "number" | "boolean";
|
|
13
|
+
/** type=object */
|
|
14
|
+
properties?: Record<string, StageSchema>;
|
|
15
|
+
required?: string[];
|
|
16
|
+
/** type=array */
|
|
17
|
+
items?: StageSchema;
|
|
18
|
+
/** any type: closed value set (compared with ===) */
|
|
19
|
+
enum?: Array<string | number | boolean>;
|
|
20
|
+
}
|
|
21
|
+
export interface AgentOpts {
|
|
22
|
+
/** Stage gate: when present, the agent's reply must strict-parse as JSON and
|
|
23
|
+
* validate; the engine retries with the validation error appended, up to
|
|
24
|
+
* `maxAttempts`. Without it, `agent()` resolves to the raw reply text. */
|
|
25
|
+
schema?: StageSchema;
|
|
26
|
+
/** Model slug passed through to the harness CLI (default: the CLI's default). */
|
|
27
|
+
model?: string;
|
|
28
|
+
/** Reasoning effort mapped through the selected harness profile. Unsupported
|
|
29
|
+
* values fail before the vendor process starts. */
|
|
30
|
+
effort?: string;
|
|
31
|
+
/** Attempt ceiling for the schema-retry loop (default 2). */
|
|
32
|
+
maxAttempts?: number;
|
|
33
|
+
/** Subprocess timeout ms (default 300_000). */
|
|
34
|
+
timeoutMs?: number;
|
|
35
|
+
/** Harness-turn ceiling for the child (default 25; use 1 for pure
|
|
36
|
+
* classification stages — cheaper and faster). */
|
|
37
|
+
maxTurns?: number;
|
|
38
|
+
/** Display label in the journal (default: prompt head). */
|
|
39
|
+
label?: string;
|
|
40
|
+
/** Which harness runs this agent (default: the run's default harness).
|
|
41
|
+
* Mixed-harness workflows are legal: triage on one CLI, deep work on
|
|
42
|
+
* another. */
|
|
43
|
+
harness?: HarnessName;
|
|
44
|
+
}
|
|
45
|
+
/** Open registry key. The built-in catalog currently contains Claude Code,
|
|
46
|
+
* Codex, and Cursor; consumers may register another adapter without widening
|
|
47
|
+
* a package-owned union first. */
|
|
48
|
+
export type HarnessName = string;
|
|
49
|
+
/** What a spawn adapter returns for one subagent run. */
|
|
50
|
+
export interface SpawnResult {
|
|
51
|
+
ok: boolean;
|
|
52
|
+
/** The model's final reply text (envelope-unwrapped). */
|
|
53
|
+
text: string;
|
|
54
|
+
/** Child harness session id when the envelope carries one. */
|
|
55
|
+
sessionId?: string;
|
|
56
|
+
costUsd?: number;
|
|
57
|
+
durationMs: number;
|
|
58
|
+
/** Populated when ok=false. */
|
|
59
|
+
error?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface SpawnRequest {
|
|
62
|
+
prompt: string;
|
|
63
|
+
model?: string;
|
|
64
|
+
effort?: string;
|
|
65
|
+
timeoutMs: number;
|
|
66
|
+
maxTurns: number;
|
|
67
|
+
cwd: string;
|
|
68
|
+
/** Run id, stamped into the child env (HARNERY_WORKFLOW_RUN_ID) so the
|
|
69
|
+
* coord layer can associate child sessions with their workflow run. */
|
|
70
|
+
runId?: string;
|
|
71
|
+
/** Scrub all API-key vars from the child env so it can only authenticate
|
|
72
|
+
* via its stored (subscription) login. See billing.ts. */
|
|
73
|
+
subscriptionOnly?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/** One headless-subagent runner. The engine is adapter-agnostic; claude-code
|
|
76
|
+
* ships first, codex/cursor land behind the same signature (plan Phase 4). */
|
|
77
|
+
export type Spawner = (req: SpawnRequest) => Promise<SpawnResult>;
|
|
78
|
+
/** The API surface injected into a workflow script's default export. Explicit
|
|
79
|
+
* injection (no ambient globals): keeps scripts portable and unit-testable. */
|
|
80
|
+
export interface WorkflowContext {
|
|
81
|
+
/** Spawn one subagent; resolves to validated JSON (schema) or reply text. */
|
|
82
|
+
agent: (prompt: string, opts?: AgentOpts) => Promise<unknown>;
|
|
83
|
+
/** Run thunks with bounded concurrency; a rejected thunk resolves to null. */
|
|
84
|
+
parallel: <T>(thunks: Array<() => Promise<T>>) => Promise<Array<T | null>>;
|
|
85
|
+
/** Declare the current stage (journal + progress grouping). */
|
|
86
|
+
stage: (title: string) => void;
|
|
87
|
+
/** Narrate progress (stderr + journal). */
|
|
88
|
+
log: (message: string) => void;
|
|
89
|
+
}
|
|
90
|
+
export interface WorkflowMeta {
|
|
91
|
+
name: string;
|
|
92
|
+
description?: string;
|
|
93
|
+
}
|
|
94
|
+
/** Loaded script shape: `export const meta` + `export default async (ctx) => …`. */
|
|
95
|
+
export interface WorkflowModule {
|
|
96
|
+
meta?: WorkflowMeta;
|
|
97
|
+
default: (ctx: WorkflowContext) => Promise<unknown>;
|
|
98
|
+
}
|
|
99
|
+
export interface EngineOpts {
|
|
100
|
+
/** Repo root whose .harnery/ receives the run journal. */
|
|
101
|
+
coordRoot: string;
|
|
102
|
+
/** Spawner registry keyed by harness. A single-harness caller registers one
|
|
103
|
+
* entry and names it in `defaultHarness`. */
|
|
104
|
+
spawners: Readonly<Record<HarnessName, Spawner | undefined>>;
|
|
105
|
+
/** Harness used when an agent() call doesn't name one (default "claude-code"). */
|
|
106
|
+
defaultHarness?: HarnessName;
|
|
107
|
+
/** Resume: run id of a prior run whose journal supplies cached results.
|
|
108
|
+
* agent() calls whose (stage, prompt, model, maxTurns, schema) key matches a
|
|
109
|
+
* completed prior agent return the journaled result without spawning. */
|
|
110
|
+
resumeFrom?: string;
|
|
111
|
+
/** Total-agent ceiling for the run (default 50): the runaway backstop. */
|
|
112
|
+
maxAgents?: number;
|
|
113
|
+
/** Concurrent-subagent cap for parallel() (default 4). */
|
|
114
|
+
concurrency?: number;
|
|
115
|
+
/** Working directory children spawn in (default: coordRoot). */
|
|
116
|
+
cwd?: string;
|
|
117
|
+
/** Progress sink (default: process.stderr). */
|
|
118
|
+
onLog?: (line: string) => void;
|
|
119
|
+
/** Guarantee subscription billing: API-key vars are scrubbed from every
|
|
120
|
+
* child env, and a harness whose stored login is provably absent fails
|
|
121
|
+
* loud before spawning. */
|
|
122
|
+
subscriptionOnly?: boolean;
|
|
123
|
+
/** Permit the api-key-override billing state (an exported API key silently
|
|
124
|
+
* shadowing a stored subscription login), which the engine otherwise
|
|
125
|
+
* refuses. Deliberate key-only hosts don't need this — only the
|
|
126
|
+
* both-present case does. */
|
|
127
|
+
allowApiBilling?: boolean;
|
|
128
|
+
/** Billing-probe override for tests (default: the real probeBilling). */
|
|
129
|
+
probeBilling?: BillingProber;
|
|
130
|
+
}
|
|
131
|
+
export interface RunReport {
|
|
132
|
+
runId: string;
|
|
133
|
+
name: string;
|
|
134
|
+
/** What the script's default export returned. */
|
|
135
|
+
result: unknown;
|
|
136
|
+
agentsSpawned: number;
|
|
137
|
+
/** agent() calls satisfied from the resumeFrom journal without spawning. */
|
|
138
|
+
agentsCached: number;
|
|
139
|
+
costUsd: number;
|
|
140
|
+
durationMs: number;
|
|
141
|
+
journalPath: string;
|
|
142
|
+
/** Estimated tokens of repo instructions (CLAUDE.md/AGENTS.md at the child
|
|
143
|
+
* cwd) that EVERY child cache-writes on spawn — the fixed per-child context
|
|
144
|
+
* overhead a fan-out multiplies. bytes/4 heuristic; 0 when no such file. */
|
|
145
|
+
contextTokensPerChildEstimate: number;
|
|
146
|
+
/** Billing mode per harness actually used this run (probed on first use). */
|
|
147
|
+
billing: Array<{
|
|
148
|
+
harness: HarnessName;
|
|
149
|
+
mode: BillingMode;
|
|
150
|
+
}>;
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/workflow/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE/D,sEAAsE;AACtE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC3D,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,qDAAqD;IACrD,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,SAAS;IACxB;;8EAE0E;IAC1E,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;uDACmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;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,iDAAiD;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB;;gFAE4E;IAC5E,6BAA6B,EAAE,MAAM,CAAC;IACtC,6EAA6E;IAC7E,OAAO,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;CAC7D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow engine contracts. A workflow is a small throwaway JS script with
|
|
3
|
+
* bounded, schema-gated stages that fan work out to headless harness-CLI
|
|
4
|
+
* subagents; the SCRIPT (deterministic code), not any model, decides routing
|
|
5
|
+
* between stages, and the run always terminates when the script returns.
|
|
6
|
+
*
|
|
7
|
+
* Design record: decision 0015 (portable coordination-aware workflows).
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal validator for the StageSchema JSON-schema subset. Deliberately tiny:
|
|
3
|
+
* a full JSON Schema implementation would pull a dependency (ajv) for
|
|
4
|
+
* validation depth workflow gates don't need. Supported: type, properties,
|
|
5
|
+
* required, items, enum. Returns a list of human-readable problems (empty =
|
|
6
|
+
* valid) so the engine can feed failures back into the retry prompt verbatim.
|
|
7
|
+
*/
|
|
8
|
+
import type { StageSchema } from "./types.js";
|
|
9
|
+
export declare function validateAgainstSchema(value: unknown, schema: StageSchema, path?: string): string[];
|
|
10
|
+
/** Strip accidental markdown code fences, then strict-parse JSON. */
|
|
11
|
+
export declare function parseStageOutput(text: string): {
|
|
12
|
+
value?: unknown;
|
|
13
|
+
error?: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/core/workflow/validate.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,SAAM,GAAG,MAAM,EAAE,CA8C/F;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAUlF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal validator for the StageSchema JSON-schema subset. Deliberately tiny:
|
|
3
|
+
* a full JSON Schema implementation would pull a dependency (ajv) for
|
|
4
|
+
* validation depth workflow gates don't need. Supported: type, properties,
|
|
5
|
+
* required, items, enum. Returns a list of human-readable problems (empty =
|
|
6
|
+
* valid) so the engine can feed failures back into the retry prompt verbatim.
|
|
7
|
+
*/
|
|
8
|
+
export function validateAgainstSchema(value, schema, path = "$") {
|
|
9
|
+
const problems = [];
|
|
10
|
+
if (schema.enum) {
|
|
11
|
+
if (!schema.enum.some((v) => v === value)) {
|
|
12
|
+
problems.push(`${path}: expected one of ${JSON.stringify(schema.enum)}, got ${short(value)}`);
|
|
13
|
+
}
|
|
14
|
+
return problems; // enum is exhaustive; type check is implied by membership
|
|
15
|
+
}
|
|
16
|
+
switch (schema.type) {
|
|
17
|
+
case "object": {
|
|
18
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
19
|
+
return [`${path}: expected object, got ${short(value)}`];
|
|
20
|
+
}
|
|
21
|
+
const obj = value;
|
|
22
|
+
for (const key of schema.required ?? []) {
|
|
23
|
+
if (!(key in obj))
|
|
24
|
+
problems.push(`${path}.${key}: required property missing`);
|
|
25
|
+
}
|
|
26
|
+
for (const [key, sub] of Object.entries(schema.properties ?? {})) {
|
|
27
|
+
if (key in obj)
|
|
28
|
+
problems.push(...validateAgainstSchema(obj[key], sub, `${path}.${key}`));
|
|
29
|
+
}
|
|
30
|
+
return problems;
|
|
31
|
+
}
|
|
32
|
+
case "array": {
|
|
33
|
+
if (!Array.isArray(value))
|
|
34
|
+
return [`${path}: expected array, got ${short(value)}`];
|
|
35
|
+
if (schema.items) {
|
|
36
|
+
for (const [i, item] of value.entries()) {
|
|
37
|
+
problems.push(...validateAgainstSchema(item, schema.items, `${path}[${i}]`));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return problems;
|
|
41
|
+
}
|
|
42
|
+
case "string":
|
|
43
|
+
case "number":
|
|
44
|
+
case "boolean": {
|
|
45
|
+
if (typeof value !== schema.type) {
|
|
46
|
+
problems.push(`${path}: expected ${schema.type}, got ${short(value)}`);
|
|
47
|
+
}
|
|
48
|
+
return problems;
|
|
49
|
+
}
|
|
50
|
+
default:
|
|
51
|
+
return [`${path}: unsupported schema type ${String(schema.type)}`];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/** Strip accidental markdown code fences, then strict-parse JSON. */
|
|
55
|
+
export function parseStageOutput(text) {
|
|
56
|
+
const stripped = text
|
|
57
|
+
.trim()
|
|
58
|
+
.replace(/^```(?:json)?\s*/i, "")
|
|
59
|
+
.replace(/\s*```$/, "");
|
|
60
|
+
try {
|
|
61
|
+
return { value: JSON.parse(stripped) };
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
return { error: `not valid JSON: ${err.message}` };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function short(value) {
|
|
68
|
+
const s = JSON.stringify(value);
|
|
69
|
+
return s === undefined ? String(value) : s.length > 60 ? `${s.slice(0, 60)}…` : s;
|
|
70
|
+
}
|
|
@@ -47,6 +47,14 @@ export interface BrowserOptions {
|
|
|
47
47
|
* via this callback (e.g., a Cloudflare-bypass header for specific zones).
|
|
48
48
|
*/
|
|
49
49
|
extraHeaders?: (url: string) => Record<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* Extra Chromium command-line flags, passed through to Playwright's
|
|
52
|
+
* `launchPersistentContext` `args`. Used for environment-specific
|
|
53
|
+
* workarounds — most notably `--disable-gpu` for headed windows under
|
|
54
|
+
* WSLg (see `./launch-args.ts`). Empty/undefined means Playwright's
|
|
55
|
+
* defaults only.
|
|
56
|
+
*/
|
|
57
|
+
launchArgs?: string[];
|
|
50
58
|
}
|
|
51
59
|
export interface NavigateResult {
|
|
52
60
|
url: string;
|
|
@@ -71,6 +79,14 @@ export interface FailedRequest {
|
|
|
71
79
|
method: string;
|
|
72
80
|
failure: string;
|
|
73
81
|
resourceType: string;
|
|
82
|
+
/** HTTP status for kind "http" entries; null for network-level failures. */
|
|
83
|
+
status: number | null;
|
|
84
|
+
/** "http" = request completed with a >=400 response; "network" = never completed (DNS, TLS, aborts, tunnel). */
|
|
85
|
+
kind: "http" | "network";
|
|
86
|
+
/** True when the entry is the main frame's document response — lets consumers
|
|
87
|
+
* distinguish an expected error-page status (a 404 route under test) from a
|
|
88
|
+
* broken subresource. */
|
|
89
|
+
document?: boolean;
|
|
74
90
|
}
|
|
75
91
|
export interface Diagnostics {
|
|
76
92
|
consoleEvents: ConsoleEvent[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/client.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,SAAS,EAAuB,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KA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IAAI,CAAC;IAIvD,uCAAuC;IACjC,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5C,uFAAuF;IACjF,cAAc,CAAC,IAAI,EAAE;QACzB,MAAM,EAAE,WAAW,EAAE,CAAC;QACtB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;QAChC,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjB,yCAAyC;IACnC,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7C;;;;;;OAMG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlD;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAgB7B"}
|
|
@@ -32,6 +32,9 @@ export class Browser {
|
|
|
32
32
|
this.context = await chromium.launchPersistentContext(this.profileDir, {
|
|
33
33
|
headless: !this.opts.headed,
|
|
34
34
|
viewport: this.opts.viewport ?? { width: 1280, height: 800 },
|
|
35
|
+
...(this.opts.launchArgs && this.opts.launchArgs.length > 0
|
|
36
|
+
? { args: this.opts.launchArgs }
|
|
37
|
+
: {}),
|
|
35
38
|
...(this.opts.recordHarPath
|
|
36
39
|
? { recordHar: { path: this.opts.recordHarPath, mode: "full" } }
|
|
37
40
|
: {}),
|
|
@@ -84,6 +87,25 @@ export class Browser {
|
|
|
84
87
|
method: req.method(),
|
|
85
88
|
failure: req.failure()?.errorText ?? "unknown",
|
|
86
89
|
resourceType: req.resourceType(),
|
|
90
|
+
status: null,
|
|
91
|
+
kind: "network",
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
// HTTP-level failures: `requestfailed` only fires for requests that never
|
|
95
|
+
// complete (DNS, TLS, aborts), so a script/stylesheet answered with a
|
|
96
|
+
// 4xx/5xx would otherwise be invisible to failedRequests-based gates.
|
|
97
|
+
page.on("response", (res) => {
|
|
98
|
+
if (res.status() < 400)
|
|
99
|
+
return;
|
|
100
|
+
const req = res.request();
|
|
101
|
+
this.failedRequests.push({
|
|
102
|
+
url: res.url(),
|
|
103
|
+
method: req.method(),
|
|
104
|
+
failure: `HTTP ${res.status()}`,
|
|
105
|
+
resourceType: req.resourceType(),
|
|
106
|
+
status: res.status(),
|
|
107
|
+
kind: "http",
|
|
108
|
+
document: req.resourceType() === "document" && res.frame() === page.mainFrame(),
|
|
87
109
|
});
|
|
88
110
|
});
|
|
89
111
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Browser, type BrowserOptions, type ConsoleEvent, type Diagnostics, type FailedRequest, type NavigateResult, type PageErrorEvent, } from "./client.js";
|
|
2
2
|
export { captureDevOverlay, type DevOverlayError, type DevOverlayResult, } from "./dev-overlay.js";
|
|
3
|
+
export { isWSL, wslHeadedLaunchArgs } from "./launch-args.js";
|
|
3
4
|
export type { OverflowElement, OverflowResult, WidthResult, } from "./layout.js";
|
|
4
5
|
export type { RuntHit, RuntsResult, } from "./runts.js";
|
|
5
6
|
export type { CheckVisibilityOptions, VisibilityResult, VisibilitySample, } from "./visibility.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,eAAe,EACf,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,OAAO,EACP,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,YAAY,EACV,eAAe,EACf,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,OAAO,EACP,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chromium launch-arg helpers for environment-specific workarounds.
|
|
3
|
+
*
|
|
4
|
+
* The one that matters today is WSLg: a headed Chromium window renders its
|
|
5
|
+
* page to a GPU-backed surface that WSLg composites over an RDP stream to the
|
|
6
|
+
* Windows host. On a range of Windows / GPU-driver / WSLg combinations that
|
|
7
|
+
* GPU-composited surface never presents, so the window shows in the taskbar
|
|
8
|
+
* but paints blank — even though the page itself runs fine (JS, navigation,
|
|
9
|
+
* and DOM all work). Forcing Chromium onto its software compositor with
|
|
10
|
+
* `--disable-gpu` restores on-screen paint. It only matters for headed mode
|
|
11
|
+
* (headless never composites to a display) and only under WSL.
|
|
12
|
+
*/
|
|
13
|
+
/** True when running under WSL (WSL1 or WSL2). */
|
|
14
|
+
export declare function isWSL(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Chromium launch flags to make a headed window paint under WSLg. Returns
|
|
17
|
+
* `["--disable-gpu"]` on WSL, `[]` elsewhere. Callers apply these only for
|
|
18
|
+
* headed launches. See the module doc for the failure mode.
|
|
19
|
+
*/
|
|
20
|
+
export declare function wslHeadedLaunchArgs(): string[];
|
|
21
|
+
//# sourceMappingURL=launch-args.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch-args.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/launch-args.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,kDAAkD;AAClD,wBAAgB,KAAK,IAAI,OAAO,CAO/B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
/**
|
|
3
|
+
* Chromium launch-arg helpers for environment-specific workarounds.
|
|
4
|
+
*
|
|
5
|
+
* The one that matters today is WSLg: a headed Chromium window renders its
|
|
6
|
+
* page to a GPU-backed surface that WSLg composites over an RDP stream to the
|
|
7
|
+
* Windows host. On a range of Windows / GPU-driver / WSLg combinations that
|
|
8
|
+
* GPU-composited surface never presents, so the window shows in the taskbar
|
|
9
|
+
* but paints blank — even though the page itself runs fine (JS, navigation,
|
|
10
|
+
* and DOM all work). Forcing Chromium onto its software compositor with
|
|
11
|
+
* `--disable-gpu` restores on-screen paint. It only matters for headed mode
|
|
12
|
+
* (headless never composites to a display) and only under WSL.
|
|
13
|
+
*/
|
|
14
|
+
/** True when running under WSL (WSL1 or WSL2). */
|
|
15
|
+
export function isWSL() {
|
|
16
|
+
if (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP)
|
|
17
|
+
return true;
|
|
18
|
+
try {
|
|
19
|
+
return /microsoft|wsl/i.test(readFileSync("/proc/version", "utf8"));
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Chromium launch flags to make a headed window paint under WSLg. Returns
|
|
27
|
+
* `["--disable-gpu"]` on WSL, `[]` elsewhere. Callers apply these only for
|
|
28
|
+
* headed launches. See the module doc for the failure mode.
|
|
29
|
+
*/
|
|
30
|
+
export function wslHeadedLaunchArgs() {
|
|
31
|
+
return isWSL() ? ["--disable-gpu"] : [];
|
|
32
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude desktop app session-index access.
|
|
3
|
+
*
|
|
4
|
+
* The Claude desktop app keeps each signed-in account's Claude Code session
|
|
5
|
+
* sidebar as plain JSON files:
|
|
6
|
+
*
|
|
7
|
+
* <dataDir>/claude-code-sessions/<account-uuid>/<env-id>/local_<uuid>.json
|
|
8
|
+
*
|
|
9
|
+
* One file per sidebar entry: { sessionId, cliSessionId, cwd, title, ... }.
|
|
10
|
+
* Nothing inside the file binds it to an account — the scoping is purely
|
|
11
|
+
* which <account-uuid> directory it sits in, and the transcripts themselves
|
|
12
|
+
* live in the (account-agnostic) `~/.claude/projects/` tree of the runtime
|
|
13
|
+
* environment. So when a user signs out of account A and into account B,
|
|
14
|
+
* their sessions "disappear" from the sidebar even though every byte is
|
|
15
|
+
* still on disk. Copying an entry file into another account's directory
|
|
16
|
+
* makes the session visible (and resumable) there.
|
|
17
|
+
*
|
|
18
|
+
* These helpers locate the desktop app's data directory (including the
|
|
19
|
+
* Windows one from inside WSL, where the app runs on the Windows side but
|
|
20
|
+
* the CLI runs in the distro), enumerate the per-account entries, and
|
|
21
|
+
* plan/apply cross-account mirrors. The file format is the desktop app's
|
|
22
|
+
* private state, not a public API — everything here treats it read-mostly
|
|
23
|
+
* and copies files verbatim rather than rewriting them.
|
|
24
|
+
*/
|
|
25
|
+
export interface DesktopSessionEntry {
|
|
26
|
+
/** Absolute path of the local_*.json entry file. */
|
|
27
|
+
file: string;
|
|
28
|
+
/** Account UUID directory the entry sits under (= sidebar scoping). */
|
|
29
|
+
accountUuid: string;
|
|
30
|
+
/** Environment directory between account and entry (VM/env identity). */
|
|
31
|
+
envId: string;
|
|
32
|
+
/** The entry's own id (usually "local_<uuid>", mirrors the filename). */
|
|
33
|
+
sessionId: string | null;
|
|
34
|
+
/** The Claude Code session id — matches the JSONL transcript filename. */
|
|
35
|
+
cliSessionId: string | null;
|
|
36
|
+
cwd: string | null;
|
|
37
|
+
title: string | null;
|
|
38
|
+
model: string | null;
|
|
39
|
+
isArchived: boolean;
|
|
40
|
+
createdAt: number | null;
|
|
41
|
+
lastActivityAt: number | null;
|
|
42
|
+
}
|
|
43
|
+
export interface DesktopAccount {
|
|
44
|
+
accountUuid: string;
|
|
45
|
+
path: string;
|
|
46
|
+
entries: DesktopSessionEntry[];
|
|
47
|
+
}
|
|
48
|
+
export interface MirrorAction {
|
|
49
|
+
from: string;
|
|
50
|
+
to: string;
|
|
51
|
+
entry: DesktopSessionEntry;
|
|
52
|
+
targetAccountUuid: string;
|
|
53
|
+
}
|
|
54
|
+
export interface MirrorPlan {
|
|
55
|
+
actions: MirrorAction[];
|
|
56
|
+
/** Entries skipped because the target already lists that cliSessionId. */
|
|
57
|
+
skippedExisting: number;
|
|
58
|
+
/** Entries skipped because they are archived (opt in via includeArchived). */
|
|
59
|
+
skippedArchived: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Candidate desktop-app data directories for this machine, most specific
|
|
63
|
+
* first. Only directories that exist AND contain a claude-code-sessions/
|
|
64
|
+
* subdirectory are returned. Precedence: explicit arg, then
|
|
65
|
+
* HARNERY_CLAUDE_DESKTOP_DIR, then platform defaults (on WSL that means
|
|
66
|
+
* scanning every /mnt/c/Users/<user>/AppData/Roaming/Claude).
|
|
67
|
+
*/
|
|
68
|
+
export declare function findDesktopDataDirs(explicit?: string): string[];
|
|
69
|
+
/** Enumerate every account directory + its session entries under one data dir. */
|
|
70
|
+
export declare function listAccounts(dataDir: string): DesktopAccount[];
|
|
71
|
+
/**
|
|
72
|
+
* The account the runtime environment's Claude Code CLI is signed into,
|
|
73
|
+
* read from ~/.claude.json (best-effort; null when unavailable). Lets the
|
|
74
|
+
* command label an otherwise-opaque account UUID with an email address.
|
|
75
|
+
*/
|
|
76
|
+
export declare function readCliAccount(): {
|
|
77
|
+
accountUuid: string;
|
|
78
|
+
email: string | null;
|
|
79
|
+
} | null;
|
|
80
|
+
export interface MirrorOptions {
|
|
81
|
+
/** Restrict targets to accounts whose uuid starts with one of these. */
|
|
82
|
+
to?: string[];
|
|
83
|
+
/** Restrict sources to accounts whose uuid starts with one of these. */
|
|
84
|
+
from?: string[];
|
|
85
|
+
/**
|
|
86
|
+
* Selectors: each matches a cliSessionId / sessionId exactly, or a title
|
|
87
|
+
* case-insensitively as a substring. Empty/undefined = every entry.
|
|
88
|
+
*/
|
|
89
|
+
sessions?: string[];
|
|
90
|
+
includeArchived?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export declare function entryMatchesSelector(entry: DesktopSessionEntry, selector: string): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Plan the copies that would make each target account list the selected
|
|
95
|
+
* sessions. Union semantics: every entry a source account has and a target
|
|
96
|
+
* account lacks (keyed by cliSessionId, falling back to filename) becomes a
|
|
97
|
+
* copy action. Idempotent by construction — planning again after applying
|
|
98
|
+
* yields zero actions.
|
|
99
|
+
*/
|
|
100
|
+
export declare function planMirror(accounts: DesktopAccount[], opts?: MirrorOptions): MirrorPlan;
|
|
101
|
+
/** Apply a plan: verbatim file copies (never rewrites entry contents). */
|
|
102
|
+
export declare function applyMirror(plan: MirrorPlan): {
|
|
103
|
+
copied: number;
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=claude-desktop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-desktop.d.ts","sourceRoot":"","sources":["../../src/lib/claude-desktop.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;I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