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
package/dist/core/hooks/cli.js
CHANGED
|
@@ -26,6 +26,8 @@ import { consumeSince, writeCursor } from "../agents/events/consume.js";
|
|
|
26
26
|
import { evaluateStopHook } from "../agents/rules/stop-hook.js";
|
|
27
27
|
import { projectHeartbeats } from "../agents/state/heartbeat-projector.js";
|
|
28
28
|
import { shellMutationPaths } from "../agents/state/shell-mutation.js";
|
|
29
|
+
import { checkpointContext, completeContextRecovery, extractContextSample, markContextCompactionCompleted, prepareContextRecovery, readContextState, recordContextSample, } from "../context/index.js";
|
|
30
|
+
import { ensureRelayDaemon, fetchPresence, publishPresence } from "../presence/index.js";
|
|
29
31
|
import { captureImages, detectPresence, imageJanitor, playSound, resetSoundCounters, runSessionSyncExtension, runTurnSummary, scratchArchive, scratchJanitor, scratchRecoveryCue, soundForEvent, } from "./effects/index.js";
|
|
30
32
|
import { emit } from "./events/emit.js";
|
|
31
33
|
import { canonicalize } from "./guard-path.js";
|
|
@@ -69,6 +71,16 @@ async function readStdin() {
|
|
|
69
71
|
return "";
|
|
70
72
|
}
|
|
71
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Env for child agent-coord spawns, with the coord root pinned. The hook
|
|
76
|
+
* process may be running with the session shell's cwd (inside a submodule or
|
|
77
|
+
* scratch dir), and agent-coord resolves its root from cwd unless overridden —
|
|
78
|
+
* without the pin a child could write state to a different .harnery than the
|
|
79
|
+
* one this hook resolved.
|
|
80
|
+
*/
|
|
81
|
+
function childEnv(coordRoot) {
|
|
82
|
+
return { ...process.env, HARNERY_COORD_ROOT_OVERRIDE: coordRoot };
|
|
83
|
+
}
|
|
72
84
|
function appendDebug(coordRoot, entry) {
|
|
73
85
|
const path = join(coordRoot, ".harnery", "debug", "agent-hook.ndjson");
|
|
74
86
|
try {
|
|
@@ -112,6 +124,7 @@ function assignNameViaAgentCoord(coordRoot, instanceId, kind) {
|
|
|
112
124
|
const result = spawnSync(binary, ["assign-name", instanceId, kind], {
|
|
113
125
|
encoding: "utf8",
|
|
114
126
|
timeout: 2000,
|
|
127
|
+
env: childEnv(coordRoot),
|
|
115
128
|
});
|
|
116
129
|
if (result.status !== 0 || !result.stdout)
|
|
117
130
|
return null;
|
|
@@ -206,6 +219,12 @@ function buildEventData(eventType, ctx) {
|
|
|
206
219
|
name: assigned?.name,
|
|
207
220
|
kind: "session",
|
|
208
221
|
agent_id: ctx.instanceId,
|
|
222
|
+
// Workflow-child linkage: `workflow run` children carry the run id in
|
|
223
|
+
// env (spawn adapters set it via buildChildEnv), so their sessions and
|
|
224
|
+
// heartbeats join back to the run journal + /workflows web view.
|
|
225
|
+
...(coordEnv("WORKFLOW_CHILD") === "1" && coordEnv("WORKFLOW_RUN_ID")
|
|
226
|
+
? { workflow_run_id: coordEnv("WORKFLOW_RUN_ID") }
|
|
227
|
+
: {}),
|
|
209
228
|
};
|
|
210
229
|
}
|
|
211
230
|
case "session.end":
|
|
@@ -308,8 +327,40 @@ function buildEventData(eventType, ctx) {
|
|
|
308
327
|
...(summary.truncated ? { truncated: true } : {}),
|
|
309
328
|
};
|
|
310
329
|
}
|
|
330
|
+
case "context.compaction.started": {
|
|
331
|
+
const metadata = objectRecord(p?.raw.compact_metadata);
|
|
332
|
+
return {
|
|
333
|
+
trigger: stringField(p?.raw.trigger) ?? stringField(metadata?.trigger),
|
|
334
|
+
pre_tokens: numberField(p?.raw.pre_tokens) ??
|
|
335
|
+
numberField(metadata?.pre_tokens) ??
|
|
336
|
+
numberField(metadata?.pre_compact_tokens),
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
case "context.compaction.completed": {
|
|
340
|
+
const metadata = objectRecord(p?.raw.compact_metadata);
|
|
341
|
+
return {
|
|
342
|
+
trigger: stringField(p?.raw.trigger) ?? stringField(metadata?.trigger),
|
|
343
|
+
pre_tokens: numberField(p?.raw.pre_tokens) ??
|
|
344
|
+
numberField(metadata?.pre_tokens) ??
|
|
345
|
+
numberField(metadata?.pre_compact_tokens),
|
|
346
|
+
post_tokens: numberField(p?.raw.post_tokens) ??
|
|
347
|
+
numberField(metadata?.post_tokens) ??
|
|
348
|
+
numberField(metadata?.post_compact_tokens),
|
|
349
|
+
};
|
|
350
|
+
}
|
|
311
351
|
}
|
|
312
352
|
}
|
|
353
|
+
function objectRecord(value) {
|
|
354
|
+
return typeof value === "object" && value !== null && !Array.isArray(value)
|
|
355
|
+
? value
|
|
356
|
+
: undefined;
|
|
357
|
+
}
|
|
358
|
+
function stringField(value) {
|
|
359
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
360
|
+
}
|
|
361
|
+
function numberField(value) {
|
|
362
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : undefined;
|
|
363
|
+
}
|
|
313
364
|
async function main() {
|
|
314
365
|
const { eventName, extra } = parseArgv(process.argv.slice(2));
|
|
315
366
|
const harness = detectHarness(process.argv.slice(2));
|
|
@@ -401,6 +452,84 @@ async function main() {
|
|
|
401
452
|
owner_source: owner.source,
|
|
402
453
|
event_id: envelope.event_id,
|
|
403
454
|
});
|
|
455
|
+
// Context telemetry is opportunistic and truthful: only persist a sample
|
|
456
|
+
// when the harness payload actually exposes usage/window data. Identical
|
|
457
|
+
// measurements are de-duplicated before they reach the canonical stream.
|
|
458
|
+
if (payload?.raw) {
|
|
459
|
+
try {
|
|
460
|
+
const sample = extractContextSample(payload.raw, {
|
|
461
|
+
sessionId,
|
|
462
|
+
harness,
|
|
463
|
+
model: payload.model,
|
|
464
|
+
source: "hook",
|
|
465
|
+
confidence: "reported",
|
|
466
|
+
});
|
|
467
|
+
if (sample) {
|
|
468
|
+
const recorded = recordContextSample(coordRoot, owner.instance_id, sample);
|
|
469
|
+
if (recorded.changed) {
|
|
470
|
+
emit(coordRoot, {
|
|
471
|
+
event_type: "context.sampled",
|
|
472
|
+
instance_id: owner.instance_id,
|
|
473
|
+
session_id: sessionId,
|
|
474
|
+
harness,
|
|
475
|
+
data: {
|
|
476
|
+
model: sample.model,
|
|
477
|
+
used_tokens: sample.used_tokens,
|
|
478
|
+
window_tokens: sample.window_tokens,
|
|
479
|
+
used_percent: sample.used_percent,
|
|
480
|
+
telemetry_source: sample.source,
|
|
481
|
+
confidence: sample.confidence,
|
|
482
|
+
},
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
catch (err) {
|
|
488
|
+
logError(coordRoot, err, { phase: "context-sample" });
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
// A native pre-compaction signal is the safest available point to capture
|
|
492
|
+
// external work state. The operation is idempotent until recovery, so a
|
|
493
|
+
// harness retry cannot create a storm of near-identical capsules.
|
|
494
|
+
if (norm.event_type === "context.compaction.started") {
|
|
495
|
+
try {
|
|
496
|
+
const checkpoint = checkpointContext(coordRoot, {
|
|
497
|
+
sessionId,
|
|
498
|
+
instanceId: owner.instance_id,
|
|
499
|
+
harness,
|
|
500
|
+
cwd: payload?.cwd ?? process.cwd(),
|
|
501
|
+
reason: "pre_compact",
|
|
502
|
+
model: payload?.model,
|
|
503
|
+
});
|
|
504
|
+
emit(coordRoot, {
|
|
505
|
+
event_type: "context.checkpoint.created",
|
|
506
|
+
instance_id: owner.instance_id,
|
|
507
|
+
session_id: sessionId,
|
|
508
|
+
harness,
|
|
509
|
+
data: {
|
|
510
|
+
capsule_id: checkpoint.capsule.capsule_id,
|
|
511
|
+
generation: checkpoint.capsule.generation,
|
|
512
|
+
path: checkpoint.state.latest_capsule ?? "",
|
|
513
|
+
reason: checkpoint.capsule.reason,
|
|
514
|
+
reused: checkpoint.reused,
|
|
515
|
+
},
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
catch (err) {
|
|
519
|
+
logError(coordRoot, err, { phase: "context-checkpoint" });
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
if (norm.event_type === "context.compaction.completed") {
|
|
523
|
+
try {
|
|
524
|
+
markContextCompactionCompleted(coordRoot, {
|
|
525
|
+
sessionId,
|
|
526
|
+
instanceId: owner.instance_id,
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
catch (err) {
|
|
530
|
+
logError(coordRoot, err, { phase: "context-compaction-completed" });
|
|
531
|
+
}
|
|
532
|
+
}
|
|
404
533
|
// Phase 8: SessionStart post-emit: project the event so the heartbeat
|
|
405
534
|
// lands synchronously, run stale-sweep, and emit the harness-shaped
|
|
406
535
|
// systemMessage JSON (peer table + wiring check + council invites).
|
|
@@ -421,12 +550,50 @@ async function main() {
|
|
|
421
550
|
catch (err) {
|
|
422
551
|
logError(coordRoot, err, { phase: "session-start-image-janitor" });
|
|
423
552
|
}
|
|
553
|
+
let recovery = null;
|
|
554
|
+
if (payload?.source === "compact") {
|
|
555
|
+
try {
|
|
556
|
+
emit(coordRoot, {
|
|
557
|
+
event_type: "context.compaction.completed",
|
|
558
|
+
instance_id: owner.instance_id,
|
|
559
|
+
session_id: sessionId,
|
|
560
|
+
harness,
|
|
561
|
+
data: { trigger: "auto" },
|
|
562
|
+
});
|
|
563
|
+
markContextCompactionCompleted(coordRoot, {
|
|
564
|
+
sessionId,
|
|
565
|
+
instanceId: owner.instance_id,
|
|
566
|
+
});
|
|
567
|
+
recovery = prepareContextRecovery(coordRoot, {
|
|
568
|
+
instanceId: owner.instance_id,
|
|
569
|
+
sessionId,
|
|
570
|
+
cwd: payload?.cwd ?? process.cwd(),
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
catch (err) {
|
|
574
|
+
logError(coordRoot, err, { phase: "context-recovery-session-start" });
|
|
575
|
+
}
|
|
576
|
+
}
|
|
424
577
|
try {
|
|
425
|
-
await emitSessionStartSystemMessage(coordRoot, owner.instance_id, sessionId, data, harness);
|
|
578
|
+
const injected = await emitSessionStartSystemMessage(coordRoot, owner.instance_id, sessionId, data, harness, recovery?.briefing ?? "");
|
|
579
|
+
if (injected && recovery) {
|
|
580
|
+
completeRecoveryInjection(coordRoot, owner.instance_id, sessionId, harness, recovery, "SessionStart");
|
|
581
|
+
}
|
|
426
582
|
}
|
|
427
583
|
catch (err) {
|
|
428
584
|
logError(coordRoot, err, { phase: "session-start-systemMessage" });
|
|
429
585
|
}
|
|
586
|
+
// Cross-machine presence (ADR 0016): announce this machine's sessions and
|
|
587
|
+
// pull peers'. Both are throttled + fail-silent; network runs detached.
|
|
588
|
+
// When a relay is configured, also make sure the live-socket daemon runs.
|
|
589
|
+
try {
|
|
590
|
+
publishPresence(coordRoot);
|
|
591
|
+
fetchPresence(coordRoot);
|
|
592
|
+
ensureRelayDaemon(coordRoot);
|
|
593
|
+
}
|
|
594
|
+
catch (err) {
|
|
595
|
+
logError(coordRoot, err, { phase: "session-start-presence" });
|
|
596
|
+
}
|
|
430
597
|
}
|
|
431
598
|
// Phase 8: SessionEnd cleanup: delete heartbeat + pid-map rows. Harness-
|
|
432
599
|
// agnostic since v0.5.0.
|
|
@@ -443,6 +610,14 @@ async function main() {
|
|
|
443
610
|
scratchArchive(coordRoot, owner.instance_id);
|
|
444
611
|
runSessionSyncExtension(coordRoot, true);
|
|
445
612
|
}
|
|
613
|
+
// Presence: publish the post-cleanup state so peers see this session gone
|
|
614
|
+
// promptly rather than waiting out the remote-stale window.
|
|
615
|
+
try {
|
|
616
|
+
publishPresence(coordRoot);
|
|
617
|
+
}
|
|
618
|
+
catch (err) {
|
|
619
|
+
logError(coordRoot, err, { phase: "session-end-presence" });
|
|
620
|
+
}
|
|
446
621
|
}
|
|
447
622
|
// Phase 8: SubagentStart: sync-project to create the subagent heartbeat,
|
|
448
623
|
// log the lifecycle event, and emit a context message announcing the
|
|
@@ -451,13 +626,17 @@ async function main() {
|
|
|
451
626
|
try {
|
|
452
627
|
const agentCoordBin = join(coordRoot, "harnery", "bin", "agent-coord");
|
|
453
628
|
if (existsSync(agentCoordBin)) {
|
|
454
|
-
spawnSync(agentCoordBin, ["project"], {
|
|
629
|
+
spawnSync(agentCoordBin, ["project"], {
|
|
630
|
+
encoding: "utf8",
|
|
631
|
+
timeout: 3000,
|
|
632
|
+
env: childEnv(coordRoot),
|
|
633
|
+
});
|
|
455
634
|
spawnSync(agentCoordBin, [
|
|
456
635
|
"log",
|
|
457
636
|
`SUBAGENT_START agent_type=${data.agent_type ?? "unknown"} agent_id=${owner.instance_id.slice(0, 8)} platform=${harnessPlatform(harness)}`,
|
|
458
637
|
"--instance",
|
|
459
638
|
owner.instance_id,
|
|
460
|
-
], { encoding: "utf8", timeout: 2000 });
|
|
639
|
+
], { encoding: "utf8", timeout: 2000, env: childEnv(coordRoot) });
|
|
461
640
|
}
|
|
462
641
|
emitSubagentStartContext(coordRoot, owner.instance_id, sessionId, data, harness);
|
|
463
642
|
}
|
|
@@ -476,7 +655,7 @@ async function main() {
|
|
|
476
655
|
`SUBAGENT_STOP agent_id=${owner.instance_id.slice(0, 8)} platform=${harnessPlatform(harness)}`,
|
|
477
656
|
"--instance",
|
|
478
657
|
owner.instance_id,
|
|
479
|
-
], { encoding: "utf8", timeout: 2000 });
|
|
658
|
+
], { encoding: "utf8", timeout: 2000, env: childEnv(coordRoot) });
|
|
480
659
|
}
|
|
481
660
|
}
|
|
482
661
|
catch (err) {
|
|
@@ -494,8 +673,34 @@ async function main() {
|
|
|
494
673
|
if (prompt)
|
|
495
674
|
detectPresence(prompt);
|
|
496
675
|
}
|
|
676
|
+
// Presence: throttled pull of peer machines' presence refs (default 60s
|
|
677
|
+
// interval; the systemMessage below reads whatever is locally known).
|
|
497
678
|
try {
|
|
498
|
-
|
|
679
|
+
fetchPresence(coordRoot);
|
|
680
|
+
}
|
|
681
|
+
catch (err) {
|
|
682
|
+
logError(coordRoot, err, { phase: "user-prompt-submit-presence" });
|
|
683
|
+
}
|
|
684
|
+
let recovery = null;
|
|
685
|
+
const continuityState = readContextState(coordRoot, sessionId);
|
|
686
|
+
if (continuityState?.phase === "checkpointed" &&
|
|
687
|
+
continuityState.compaction_completed_at !== undefined) {
|
|
688
|
+
try {
|
|
689
|
+
recovery = prepareContextRecovery(coordRoot, {
|
|
690
|
+
instanceId: owner.instance_id,
|
|
691
|
+
sessionId,
|
|
692
|
+
cwd: payload?.cwd ?? process.cwd(),
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
catch (err) {
|
|
696
|
+
logError(coordRoot, err, { phase: "context-recovery-user-prompt" });
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
try {
|
|
700
|
+
const injected = await emitUserPromptSubmitSystemMessage(coordRoot, owner.instance_id, sessionId, harness, recovery?.briefing ?? "");
|
|
701
|
+
if (injected && recovery) {
|
|
702
|
+
completeRecoveryInjection(coordRoot, owner.instance_id, sessionId, harness, recovery, "UserPromptSubmit");
|
|
703
|
+
}
|
|
499
704
|
}
|
|
500
705
|
catch (err) {
|
|
501
706
|
logError(coordRoot, err, { phase: "user-prompt-submit-systemMessage" });
|
|
@@ -548,6 +753,17 @@ async function main() {
|
|
|
548
753
|
catch (err) {
|
|
549
754
|
logError(coordRoot, err, { phase: "stop-projection" });
|
|
550
755
|
}
|
|
756
|
+
// Presence: publish AFTER the projection above so the blob carries this
|
|
757
|
+
// turn's fresh task/turn_summary/files. Change-batched + keepalive'd;
|
|
758
|
+
// the push itself runs detached. The relay daemon (when configured) is
|
|
759
|
+
// re-ensured here too — it self-exits on idle, and the next turn revives it.
|
|
760
|
+
try {
|
|
761
|
+
publishPresence(coordRoot);
|
|
762
|
+
ensureRelayDaemon(coordRoot);
|
|
763
|
+
}
|
|
764
|
+
catch (err) {
|
|
765
|
+
logError(coordRoot, err, { phase: "stop-presence" });
|
|
766
|
+
}
|
|
551
767
|
// Stop verdict (status-box + set-task gate). Direct in-process call: the
|
|
552
768
|
// rule lives in harnery. agent-hook already emitted this turn.stop (with
|
|
553
769
|
// status_box_present) above, so the evidence is in the stream.
|
|
@@ -557,6 +773,7 @@ async function main() {
|
|
|
557
773
|
session_id: sessionId,
|
|
558
774
|
harness,
|
|
559
775
|
bypass: coordEnv("AGENT_COORD_BYPASS_STOP") === "1",
|
|
776
|
+
workflow_child: coordEnv("WORKFLOW_CHILD") === "1",
|
|
560
777
|
});
|
|
561
778
|
if (!verdict.allow) {
|
|
562
779
|
// Harness-aware enforcement channel: Claude Code / Codex honor exit-2 +
|
|
@@ -710,6 +927,7 @@ async function runPreToolUseGuard(coordRoot, instanceId, sessionId, data, harnes
|
|
|
710
927
|
input: verdictReq,
|
|
711
928
|
encoding: "utf8",
|
|
712
929
|
timeout: 3000,
|
|
930
|
+
env: childEnv(coordRoot),
|
|
713
931
|
});
|
|
714
932
|
if (result.status !== 0 || !result.stdout)
|
|
715
933
|
continue;
|
|
@@ -804,6 +1022,7 @@ function healHeartbeatViaCli(coordRoot, instanceId, sessionId, harness) {
|
|
|
804
1022
|
spawnSync(agentCoordBin, ["heal-heartbeat", instanceId, sessionId, `--harness=${harness}`], {
|
|
805
1023
|
encoding: "utf8",
|
|
806
1024
|
timeout: 2000,
|
|
1025
|
+
env: childEnv(coordRoot),
|
|
807
1026
|
});
|
|
808
1027
|
}
|
|
809
1028
|
/**
|
|
@@ -908,6 +1127,7 @@ function stampToolActivity(coordRoot, instanceId, data) {
|
|
|
908
1127
|
spawnSync(agentCoordBin, ["stamp-tool-activity", instanceId, toolName, target], {
|
|
909
1128
|
encoding: "utf8",
|
|
910
1129
|
timeout: 2000,
|
|
1130
|
+
env: childEnv(coordRoot),
|
|
911
1131
|
});
|
|
912
1132
|
}
|
|
913
1133
|
function releaseClaimOnFailure(coordRoot, instanceId, data, rawPayload) {
|
|
@@ -955,6 +1175,7 @@ function releaseClaimOnFailure(coordRoot, instanceId, data, rawPayload) {
|
|
|
955
1175
|
spawnSync(agentCoordBin, ["release-claim", instanceId, canonical], {
|
|
956
1176
|
encoding: "utf8",
|
|
957
1177
|
timeout: 2000,
|
|
1178
|
+
env: childEnv(coordRoot),
|
|
958
1179
|
});
|
|
959
1180
|
}
|
|
960
1181
|
function cleanupSessionEnd(coordRoot, instanceId, reason) {
|
|
@@ -997,39 +1218,43 @@ function cleanupSessionEnd(coordRoot, instanceId, reason) {
|
|
|
997
1218
|
spawnSync(agentCoordBin, ["log", `SESSION_END reason=${reason}`, "--instance", instanceId], { encoding: "utf8", timeout: 2000 });
|
|
998
1219
|
}
|
|
999
1220
|
}
|
|
1000
|
-
async function emitUserPromptSubmitSystemMessage(coordRoot, instanceId, sessionId, harness) {
|
|
1221
|
+
async function emitUserPromptSubmitSystemMessage(coordRoot, instanceId, sessionId, harness, recoveryBriefing = "") {
|
|
1001
1222
|
const agentCoordBin = join(coordRoot, "harnery", "bin", "agent-coord");
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1223
|
+
let additionalContext = "";
|
|
1224
|
+
if (existsSync(agentCoordBin)) {
|
|
1225
|
+
// Look up the agent's name from its heartbeat (for council pending rendering).
|
|
1226
|
+
let agentName = "";
|
|
1227
|
+
try {
|
|
1228
|
+
const fs = require("node:fs");
|
|
1229
|
+
const hbPath = join(coordRoot, ".harnery", "active", `${instanceId}.json`);
|
|
1230
|
+
if (fs.existsSync(hbPath)) {
|
|
1231
|
+
const hb = JSON.parse(fs.readFileSync(hbPath, "utf8"));
|
|
1232
|
+
agentName = hb.name ?? "";
|
|
1233
|
+
}
|
|
1012
1234
|
}
|
|
1235
|
+
catch {
|
|
1236
|
+
/* fall through with empty name; peer table still renders */
|
|
1237
|
+
}
|
|
1238
|
+
const args = ["prompt-context", "--instance", instanceId, "--session", sessionId];
|
|
1239
|
+
if (agentName)
|
|
1240
|
+
args.push("--name", agentName);
|
|
1241
|
+
// Cursor + Codex sessions get the set-task staleness nudge. CC enforces it
|
|
1242
|
+
// via the Stop-hook transcript scan; the nudge replaces that for harnesses
|
|
1243
|
+
// that don't reliably expose a transcript_path during stop.
|
|
1244
|
+
if (harness === "cursor" || harness === "codex")
|
|
1245
|
+
args.push("--task-nudge");
|
|
1246
|
+
const result = spawnSync(agentCoordBin, args, { encoding: "utf8", timeout: 3000 });
|
|
1247
|
+
if (result.status === 0 && result.stdout)
|
|
1248
|
+
additionalContext = result.stdout.trim();
|
|
1013
1249
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1250
|
+
if (recoveryBriefing) {
|
|
1251
|
+
additionalContext = [additionalContext, recoveryBriefing].filter(Boolean).join("\n\n");
|
|
1016
1252
|
}
|
|
1017
|
-
const args = ["prompt-context", "--instance", instanceId, "--session", sessionId];
|
|
1018
|
-
if (agentName)
|
|
1019
|
-
args.push("--name", agentName);
|
|
1020
|
-
// Cursor + Codex sessions get the set-task staleness nudge. CC enforces it
|
|
1021
|
-
// via the Stop-hook transcript scan; the nudge replaces that for harnesses
|
|
1022
|
-
// that don't reliably expose a transcript_path during stop.
|
|
1023
|
-
if (harness === "cursor" || harness === "codex")
|
|
1024
|
-
args.push("--task-nudge");
|
|
1025
|
-
const result = spawnSync(agentCoordBin, args, { encoding: "utf8", timeout: 3000 });
|
|
1026
|
-
if (result.status !== 0 || !result.stdout)
|
|
1027
|
-
return;
|
|
1028
|
-
const additionalContext = result.stdout.trim();
|
|
1029
1253
|
if (!additionalContext)
|
|
1030
|
-
return;
|
|
1254
|
+
return false;
|
|
1031
1255
|
const { emitContext } = await import("./harness/output.js");
|
|
1032
1256
|
emitContext(harness, "UserPromptSubmit", additionalContext);
|
|
1257
|
+
return true;
|
|
1033
1258
|
}
|
|
1034
1259
|
function emitSubagentStartContext(coordRoot, instanceId, sessionId, data, harness) {
|
|
1035
1260
|
// Look up the subagent's assigned name (just-written by agent-coord assignName
|
|
@@ -1063,42 +1288,40 @@ function harnessPlatform(harness) {
|
|
|
1063
1288
|
return "claude_code";
|
|
1064
1289
|
return harness;
|
|
1065
1290
|
}
|
|
1066
|
-
async function emitSessionStartSystemMessage(coordRoot, instanceId, sessionId, emittedData, harness) {
|
|
1291
|
+
async function emitSessionStartSystemMessage(coordRoot, instanceId, sessionId, emittedData, harness, recoveryBriefing = "") {
|
|
1067
1292
|
const agentCoordBin = join(coordRoot, "harnery", "bin", "agent-coord");
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1293
|
+
let additionalContext = "";
|
|
1294
|
+
if (existsSync(agentCoordBin)) {
|
|
1295
|
+
// Sync-project so the heartbeat exists for downstream readers (peer table,
|
|
1296
|
+
// wiring check, council invites).
|
|
1297
|
+
spawnSync(agentCoordBin, ["project"], { encoding: "utf8", timeout: 3000 });
|
|
1298
|
+
// Stale-sweep dead peers before rendering peer table.
|
|
1299
|
+
spawnSync(agentCoordBin, ["stale-sweep"], { encoding: "utf8", timeout: 3000 });
|
|
1300
|
+
// SESSION_START activity log line, fired across all harnesses.
|
|
1301
|
+
const model = emittedData.model ?? "unknown";
|
|
1302
|
+
const source = emittedData.source ?? "startup";
|
|
1303
|
+
const platform = harnessPlatform(harness);
|
|
1304
|
+
spawnSync(agentCoordBin, [
|
|
1305
|
+
"log",
|
|
1306
|
+
`SESSION_START model=${model} source=${source} platform=${platform}`,
|
|
1307
|
+
"--instance",
|
|
1308
|
+
instanceId,
|
|
1309
|
+
], { encoding: "utf8", timeout: 2000 });
|
|
1310
|
+
// Render the systemMessage via agent-coord.
|
|
1311
|
+
const agentName = emittedData.name ?? "";
|
|
1312
|
+
const args = ["session-context", "--instance", instanceId, "--session", sessionId];
|
|
1313
|
+
if (agentName)
|
|
1314
|
+
args.push("--name", agentName);
|
|
1315
|
+
// The "You are agent-X." prefix in session-context renders unqualified by
|
|
1316
|
+
// default (claude-code-style). For cursor/codex the bash dispatchers add
|
|
1317
|
+
// a "(Cursor)" / "(Codex)" suffix; pass it through as --platform-label.
|
|
1318
|
+
if (harness !== "claude-code") {
|
|
1319
|
+
args.push("--platform-label", platform === "cursor" ? "Cursor" : "Codex");
|
|
1320
|
+
}
|
|
1321
|
+
const result = spawnSync(agentCoordBin, args, { encoding: "utf8", timeout: 3000 });
|
|
1322
|
+
if (result.status === 0 && result.stdout)
|
|
1323
|
+
additionalContext = result.stdout.trim();
|
|
1095
1324
|
}
|
|
1096
|
-
const result = spawnSync(agentCoordBin, args, { encoding: "utf8", timeout: 3000 });
|
|
1097
|
-
if (result.status !== 0 || !result.stdout)
|
|
1098
|
-
return;
|
|
1099
|
-
let additionalContext = result.stdout.trim();
|
|
1100
|
-
if (!additionalContext)
|
|
1101
|
-
return;
|
|
1102
1325
|
// Effect (claude-code): merge the scratch recovery cue into the session-start
|
|
1103
1326
|
// context. Was a standalone additionalContext emission from the previous
|
|
1104
1327
|
// scratch-on-start adapter; now that agent-hook is the single SessionStart
|
|
@@ -1106,10 +1329,30 @@ async function emitSessionStartSystemMessage(coordRoot, instanceId, sessionId, e
|
|
|
1106
1329
|
if (harness === "claude-code") {
|
|
1107
1330
|
const cue = scratchRecoveryCue(coordRoot);
|
|
1108
1331
|
if (cue)
|
|
1109
|
-
additionalContext =
|
|
1332
|
+
additionalContext = [additionalContext, cue].filter(Boolean).join("\n\n");
|
|
1333
|
+
}
|
|
1334
|
+
if (recoveryBriefing) {
|
|
1335
|
+
additionalContext = [additionalContext, recoveryBriefing].filter(Boolean).join("\n\n");
|
|
1110
1336
|
}
|
|
1337
|
+
if (!additionalContext)
|
|
1338
|
+
return false;
|
|
1111
1339
|
const { emitContext } = await import("./harness/output.js");
|
|
1112
1340
|
emitContext(harness, "SessionStart", additionalContext);
|
|
1341
|
+
return true;
|
|
1342
|
+
}
|
|
1343
|
+
function completeRecoveryInjection(coordRoot, instanceId, sessionId, harness, recovery, injectionEvent) {
|
|
1344
|
+
completeContextRecovery(coordRoot, { sessionId, instanceId });
|
|
1345
|
+
emit(coordRoot, {
|
|
1346
|
+
event_type: "context.recovery.injected",
|
|
1347
|
+
instance_id: instanceId,
|
|
1348
|
+
session_id: sessionId,
|
|
1349
|
+
harness,
|
|
1350
|
+
data: {
|
|
1351
|
+
capsule_id: recovery.capsule.capsule_id,
|
|
1352
|
+
generation: recovery.capsule.generation,
|
|
1353
|
+
injection_event: injectionEvent,
|
|
1354
|
+
},
|
|
1355
|
+
});
|
|
1113
1356
|
}
|
|
1114
1357
|
main()
|
|
1115
1358
|
.then((code) => process.exit(code))
|
|
@@ -37,6 +37,10 @@ export type SessionStart = EventEnvelope<"session.start", {
|
|
|
37
37
|
cwd: string;
|
|
38
38
|
model?: string;
|
|
39
39
|
pid: number;
|
|
40
|
+
/** Present iff this session is a `workflow run` child: the run id whose
|
|
41
|
+
* journal owns it (child env HARNERY_WORKFLOW_RUN_ID). Optional-field
|
|
42
|
+
* addition per the schema evolution rules (minor bump). */
|
|
43
|
+
workflow_run_id?: string;
|
|
40
44
|
}>;
|
|
41
45
|
export type SessionEnd = EventEnvelope<"session.end", {
|
|
42
46
|
ended_at: string;
|
|
@@ -120,6 +124,35 @@ export type ImageCaptured = EventEnvelope<"image.captured", {
|
|
|
120
124
|
intent?: string;
|
|
121
125
|
command_head?: string;
|
|
122
126
|
}>;
|
|
127
|
+
export type ContextSampled = EventEnvelope<"context.sampled", {
|
|
128
|
+
model?: string;
|
|
129
|
+
used_tokens?: number;
|
|
130
|
+
window_tokens?: number;
|
|
131
|
+
used_percent?: number;
|
|
132
|
+
telemetry_source: "hook" | "native_event" | "result" | "transcript" | "estimate";
|
|
133
|
+
confidence: "exact" | "reported" | "estimated";
|
|
134
|
+
}>;
|
|
135
|
+
export type ContextCheckpointCreated = EventEnvelope<"context.checkpoint.created", {
|
|
136
|
+
capsule_id: string;
|
|
137
|
+
generation: number;
|
|
138
|
+
path: string;
|
|
139
|
+
reason: "manual" | "pressure" | "pre_compact" | "session_end";
|
|
140
|
+
reused: boolean;
|
|
141
|
+
}>;
|
|
142
|
+
export type ContextCompactionStarted = EventEnvelope<"context.compaction.started", {
|
|
143
|
+
trigger?: string;
|
|
144
|
+
pre_tokens?: number;
|
|
145
|
+
}>;
|
|
146
|
+
export type ContextCompactionCompleted = EventEnvelope<"context.compaction.completed", {
|
|
147
|
+
trigger?: string;
|
|
148
|
+
pre_tokens?: number;
|
|
149
|
+
post_tokens?: number;
|
|
150
|
+
}>;
|
|
151
|
+
export type ContextRecoveryInjected = EventEnvelope<"context.recovery.injected", {
|
|
152
|
+
capsule_id: string;
|
|
153
|
+
generation: number;
|
|
154
|
+
injection_event: "SessionStart" | "UserPromptSubmit";
|
|
155
|
+
}>;
|
|
123
156
|
export type ClaimAcquire = EventEnvelope<"claim.acquire", {
|
|
124
157
|
path: string;
|
|
125
158
|
mode: "read" | "write";
|
|
@@ -152,6 +185,14 @@ export type StatePresenceChange = EventEnvelope<"state.presence_change", {
|
|
|
152
185
|
source: "hook" | "cli" | "user";
|
|
153
186
|
}>;
|
|
154
187
|
export type StateHeartbeat = EventEnvelope<"state.heartbeat", Record<string, never>>;
|
|
188
|
+
/** A live session adopted a durable persona/role. The event is authoritative
|
|
189
|
+
* for replay; `.name-history` carries the same binding for heartbeat healing. */
|
|
190
|
+
export type IdentityAssumed = EventEnvelope<"identity.assumed", {
|
|
191
|
+
name: string;
|
|
192
|
+
agent_id: string;
|
|
193
|
+
previous_name?: string;
|
|
194
|
+
previous_agent_id?: string;
|
|
195
|
+
}>;
|
|
155
196
|
export type CouncilOpen = EventEnvelope<"council.open", {
|
|
156
197
|
council_id: string;
|
|
157
198
|
topic: string;
|
|
@@ -220,7 +261,7 @@ export type HealthVerdictFailure = EventEnvelope<"health.verdict_failure", {
|
|
|
220
261
|
timeout_ms?: number;
|
|
221
262
|
fallback: "allow";
|
|
222
263
|
}>;
|
|
223
|
-
export type Event = SessionStart | SessionEnd | SubagentStart | SubagentStop | UserPromptSubmit | TurnStop | CommandStart | CommandOutput | CommandEnd | Narration | ToolPreUse | ToolPostUse | ToolPostUseFailure | ToolOutputChunk | ImageCaptured | ClaimAcquire | ClaimRelease | ClaimConflict | StateTaskSet | StateStatusChecked | StateScratchAppend | StatePresenceChange | StateHeartbeat | CouncilOpen | CouncilRoundOpen | CouncilContribution | CouncilRoundClose | CouncilClose | CouncilArchive | DecisionBlock | DecisionWarn | DecisionAllow | HealthHeartbeatHeal | HealthPidmapHeal | HealthHeartbeatSwept | HealthVerdictFailure;
|
|
264
|
+
export type Event = SessionStart | SessionEnd | SubagentStart | SubagentStop | UserPromptSubmit | TurnStop | CommandStart | CommandOutput | CommandEnd | Narration | ToolPreUse | ToolPostUse | ToolPostUseFailure | ToolOutputChunk | ImageCaptured | ContextSampled | ContextCheckpointCreated | ContextCompactionStarted | ContextCompactionCompleted | ContextRecoveryInjected | ClaimAcquire | ClaimRelease | ClaimConflict | StateTaskSet | StateStatusChecked | StateScratchAppend | StatePresenceChange | StateHeartbeat | IdentityAssumed | CouncilOpen | CouncilRoundOpen | CouncilContribution | CouncilRoundClose | CouncilClose | CouncilArchive | DecisionBlock | DecisionWarn | DecisionAllow | HealthHeartbeatHeal | HealthPidmapHeal | HealthHeartbeatSwept | HealthVerdictFailure;
|
|
224
265
|
export type EventType = Event["event_type"];
|
|
225
266
|
/**
|
|
226
267
|
* Redaction marker that may be attached to any `data` payload during emission.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/core/hooks/events/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,cAAc,EAAG,CAAU,CAAC;AAEzC,MAAM,MAAM,OAAO,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,MAAM,MAAM,MAAM,GAAG,aAAa,GAAG,aAAa,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK,SAAS,MAAM,EAAE,KAAK;IACxD,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,KAAK,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC;CACb;AAKD,MAAM,MAAM,YAAY,GAAG,aAAa,CACtC,eAAe,EACf;IACE,UAAU,EA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,eAAe,GACf,WAAW,GACX,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,YAAY,GACZ,cAAc,GACd,aAAa,GACb,YAAY,GACZ,aAAa,GACb,mBAAmB,GACnB,gBAAgB,GAChB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,cAAc,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -36,6 +36,13 @@ export interface HarnessSpec {
|
|
|
36
36
|
allowedTopLevelKeys?: string[];
|
|
37
37
|
/** Strict hook event keys accepted by this harness, including events harnery does not wire. */
|
|
38
38
|
allowedEventKeys?: string[];
|
|
39
|
+
/**
|
|
40
|
+
* Env var the harness exports to hook processes carrying the project root
|
|
41
|
+
* (e.g. Claude Code's CLAUDE_PROJECT_DIR). When set, `init` anchors the
|
|
42
|
+
* agent-hook path on it so the hook still spawns when the process cwd has
|
|
43
|
+
* wandered (the session shell `cd`ing into a subdirectory or off-repo).
|
|
44
|
+
*/
|
|
45
|
+
projectDirEnv?: string;
|
|
39
46
|
}
|
|
40
47
|
/** Claude Code: `.claude/settings.json`. */
|
|
41
48
|
export declare const CLAUDE_CODE_EVENTS: HookEvent[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/core/hooks/harness/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,6FAA6F;IAC7F,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAI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