@monoes/monomindcli 2.12.0 → 2.14.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/.claude/skills/mastermind/SKILL.md +1 -15
- package/README.md +1 -1
- package/dist/src/commands/doctor-mcp-probe.d.ts +48 -0
- package/dist/src/commands/doctor-mcp-probe.d.ts.map +1 -0
- package/dist/src/commands/doctor-mcp-probe.js +205 -0
- package/dist/src/commands/doctor-mcp-probe.js.map +1 -0
- package/dist/src/commands/doctor-monoes-checks.d.ts +1 -0
- package/dist/src/commands/doctor-monoes-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-monoes-checks.js +96 -34
- package/dist/src/commands/doctor-monoes-checks.js.map +1 -1
- package/dist/src/commands/doctor-project-checks.d.ts +31 -1
- package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +109 -4
- package/dist/src/commands/doctor-project-checks.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +21 -3
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +29 -0
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +4 -3
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/org-observe.d.ts.map +1 -1
- package/dist/src/commands/org-observe.js +14 -0
- package/dist/src/commands/org-observe.js.map +1 -1
- package/dist/src/commands/org.d.ts.map +1 -1
- package/dist/src/commands/org.js +21 -4
- package/dist/src/commands/org.js.map +1 -1
- package/dist/src/commands/ui.d.ts.map +1 -1
- package/dist/src/commands/ui.js +4 -0
- package/dist/src/commands/ui.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +2 -1
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/copy-assets.d.ts.map +1 -1
- package/dist/src/init/copy-assets.js +56 -18
- package/dist/src/init/copy-assets.js.map +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +9 -1
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/mcp-generator.d.ts.map +1 -1
- package/dist/src/init/mcp-generator.js +3 -3
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/never-commit.d.ts +39 -0
- package/dist/src/init/never-commit.d.ts.map +1 -0
- package/dist/src/init/never-commit.js +15 -0
- package/dist/src/init/never-commit.js.map +1 -0
- package/dist/src/init/shared.d.ts +74 -1
- package/dist/src/init/shared.d.ts.map +1 -1
- package/dist/src/init/shared.js +166 -0
- package/dist/src/init/shared.js.map +1 -1
- package/dist/src/init/types.d.ts +11 -0
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/init/upgrade.d.ts.map +1 -1
- package/dist/src/init/upgrade.js +1 -0
- package/dist/src/init/upgrade.js.map +1 -1
- package/dist/src/init/write-kimicode.d.ts.map +1 -1
- package/dist/src/init/write-kimicode.js +13 -9
- package/dist/src/init/write-kimicode.js.map +1 -1
- package/dist/src/init/write-opencode.d.ts.map +1 -1
- package/dist/src/init/write-opencode.js +44 -2
- package/dist/src/init/write-opencode.js.map +1 -1
- package/dist/src/init/write-runtime-config.d.ts +2 -0
- package/dist/src/init/write-runtime-config.d.ts.map +1 -1
- package/dist/src/init/write-runtime-config.js +65 -38
- package/dist/src/init/write-runtime-config.js.map +1 -1
- package/dist/src/mastermind/manifest-data.d.ts.map +1 -1
- package/dist/src/mastermind/manifest-data.js +14 -0
- package/dist/src/mastermind/manifest-data.js.map +1 -1
- package/dist/src/mcp/monoes-mcp-entry.mjs +86 -0
- package/dist/src/mcp-tools/terminal-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +52 -9
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts +84 -3
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +215 -17
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/orgrt/agent-runner.d.ts +38 -0
- package/dist/src/orgrt/agent-runner.d.ts.map +1 -1
- package/dist/src/orgrt/agent-runner.js +47 -0
- package/dist/src/orgrt/agent-runner.js.map +1 -1
- package/dist/src/orgrt/checkpoint.d.ts +12 -1
- package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint.js +15 -6
- package/dist/src/orgrt/checkpoint.js.map +1 -1
- package/dist/src/orgrt/completion-gate.d.ts +74 -0
- package/dist/src/orgrt/completion-gate.d.ts.map +1 -1
- package/dist/src/orgrt/completion-gate.js +45 -0
- package/dist/src/orgrt/completion-gate.js.map +1 -1
- package/dist/src/orgrt/cost-tier.d.ts +144 -0
- package/dist/src/orgrt/cost-tier.d.ts.map +1 -0
- package/dist/src/orgrt/cost-tier.js +183 -0
- package/dist/src/orgrt/cost-tier.js.map +1 -0
- package/dist/src/orgrt/cross-org.d.ts.map +1 -1
- package/dist/src/orgrt/cross-org.js +14 -0
- package/dist/src/orgrt/cross-org.js.map +1 -1
- package/dist/src/orgrt/daemon.d.ts +12 -1
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +216 -49
- package/dist/src/orgrt/daemon.js.map +1 -1
- package/dist/src/orgrt/decisions.d.ts +14 -2
- package/dist/src/orgrt/decisions.d.ts.map +1 -1
- package/dist/src/orgrt/decisions.js +216 -10
- package/dist/src/orgrt/decisions.js.map +1 -1
- package/dist/src/orgrt/file-roots.d.ts +7 -0
- package/dist/src/orgrt/file-roots.d.ts.map +1 -1
- package/dist/src/orgrt/file-roots.js +38 -1
- package/dist/src/orgrt/file-roots.js.map +1 -1
- package/dist/src/orgrt/forwarder.d.ts.map +1 -1
- package/dist/src/orgrt/forwarder.js +16 -2
- package/dist/src/orgrt/forwarder.js.map +1 -1
- package/dist/src/orgrt/idle-deadline.d.ts +74 -1
- package/dist/src/orgrt/idle-deadline.d.ts.map +1 -1
- package/dist/src/orgrt/idle-deadline.js +52 -2
- package/dist/src/orgrt/idle-deadline.js.map +1 -1
- package/dist/src/orgrt/loadouts.d.ts +38 -0
- package/dist/src/orgrt/loadouts.d.ts.map +1 -0
- package/dist/src/orgrt/loadouts.js +129 -0
- package/dist/src/orgrt/loadouts.js.map +1 -0
- package/dist/src/orgrt/mailbox.d.ts +17 -1
- package/dist/src/orgrt/mailbox.d.ts.map +1 -1
- package/dist/src/orgrt/mailbox.js +50 -3
- package/dist/src/orgrt/mailbox.js.map +1 -1
- package/dist/src/orgrt/policy.d.ts +42 -2
- package/dist/src/orgrt/policy.d.ts.map +1 -1
- package/dist/src/orgrt/policy.js +53 -8
- package/dist/src/orgrt/policy.js.map +1 -1
- package/dist/src/orgrt/prompt-vars.d.ts +11 -0
- package/dist/src/orgrt/prompt-vars.d.ts.map +1 -0
- package/dist/src/orgrt/prompt-vars.js +49 -0
- package/dist/src/orgrt/prompt-vars.js.map +1 -0
- package/dist/src/orgrt/questions.d.ts +22 -1
- package/dist/src/orgrt/questions.d.ts.map +1 -1
- package/dist/src/orgrt/questions.js +24 -3
- package/dist/src/orgrt/questions.js.map +1 -1
- package/dist/src/orgrt/review-packet.d.ts +29 -0
- package/dist/src/orgrt/review-packet.d.ts.map +1 -0
- package/dist/src/orgrt/review-packet.js +67 -0
- package/dist/src/orgrt/review-packet.js.map +1 -0
- package/dist/src/orgrt/role-sandbox.d.ts.map +1 -1
- package/dist/src/orgrt/role-sandbox.js +16 -3
- package/dist/src/orgrt/role-sandbox.js.map +1 -1
- package/dist/src/orgrt/session-ledger.d.ts +61 -0
- package/dist/src/orgrt/session-ledger.d.ts.map +1 -0
- package/dist/src/orgrt/session-ledger.js +113 -0
- package/dist/src/orgrt/session-ledger.js.map +1 -0
- package/dist/src/orgrt/session.d.ts +45 -5
- package/dist/src/orgrt/session.d.ts.map +1 -1
- package/dist/src/orgrt/session.js +384 -27
- package/dist/src/orgrt/session.js.map +1 -1
- package/dist/src/orgrt/task-dag.d.ts +34 -1
- package/dist/src/orgrt/task-dag.d.ts.map +1 -1
- package/dist/src/orgrt/task-dag.js +58 -7
- package/dist/src/orgrt/task-dag.js.map +1 -1
- package/dist/src/orgrt/tool-spill.d.ts +94 -0
- package/dist/src/orgrt/tool-spill.d.ts.map +1 -0
- package/dist/src/orgrt/tool-spill.js +180 -0
- package/dist/src/orgrt/tool-spill.js.map +1 -0
- package/dist/src/orgrt/types.d.ts +138 -0
- package/dist/src/orgrt/types.d.ts.map +1 -1
- package/dist/src/orgrt/types.js +148 -0
- package/dist/src/orgrt/types.js.map +1 -1
- package/dist/src/platform-adapters/renderers/mcp.d.ts +20 -2
- package/dist/src/platform-adapters/renderers/mcp.d.ts.map +1 -1
- package/dist/src/platform-adapters/renderers/mcp.js +25 -5
- package/dist/src/platform-adapters/renderers/mcp.js.map +1 -1
- package/dist/src/platform-adapters/renderers/skills.d.ts +0 -6
- package/dist/src/platform-adapters/renderers/skills.d.ts.map +1 -1
- package/dist/src/platform-adapters/renderers/skills.js +12 -22
- package/dist/src/platform-adapters/renderers/skills.js.map +1 -1
- package/dist/src/protocol-capabilities.d.ts +2 -1
- package/dist/src/protocol-capabilities.d.ts.map +1 -1
- package/dist/src/protocol-capabilities.js +2 -1
- package/dist/src/protocol-capabilities.js.map +1 -1
- package/dist/src/ui/dashboard.html +457 -164
- package/dist/src/ui/org-hil.mjs +276 -0
- package/dist/src/ui/org-runtime.mjs +350 -0
- package/dist/src/ui/orgs.html +22 -4
- package/dist/src/ui/routes-monoes.mjs +28 -3
- package/dist/src/ui/routes-org.mjs +290 -541
- package/dist/src/ui/server.mjs +185 -19
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -6
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { OrgDef, OrgRole } from './types.js';
|
|
2
|
+
/** Key for everything a role receives outside a task (and for role scope). */
|
|
3
|
+
export declare const ROLE_SESSION_KEY = "_role";
|
|
4
|
+
/** Warm state is bounded (Paperclip caps every warm store); so is this history. */
|
|
5
|
+
export declare const MAX_SESSION_RUNS = 500;
|
|
6
|
+
/** 'cold' (ADR-O001 D6): a new model session per message, never resumed. */
|
|
7
|
+
export type SessionScope = 'role' | 'task' | 'cold';
|
|
8
|
+
export type SessionStartReason = 'resumed' | 'fresh-no-record' | 'fresh-cwd-changed' | 'fresh-prompt-changed' | 'fresh-after-stale-resume' | 'fresh-after-turn-limit' | 'fresh-cold';
|
|
9
|
+
interface RecordKey {
|
|
10
|
+
role: string;
|
|
11
|
+
runtime: string;
|
|
12
|
+
taskKey: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SessionRecord extends RecordKey {
|
|
15
|
+
sessionId: string;
|
|
16
|
+
cwd: string;
|
|
17
|
+
/** Hash of the system prompt the session was built with; '*' matches any. */
|
|
18
|
+
promptHash: string;
|
|
19
|
+
updatedAt?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface SessionRun extends RecordKey {
|
|
22
|
+
sessionIdBefore?: string;
|
|
23
|
+
sessionIdAfter?: string;
|
|
24
|
+
/** True only when the session id survived the run — the audit's point. */
|
|
25
|
+
resumed: boolean;
|
|
26
|
+
reason: SessionStartReason;
|
|
27
|
+
startedAt: number;
|
|
28
|
+
endedAt: number;
|
|
29
|
+
error?: string;
|
|
30
|
+
}
|
|
31
|
+
/** The leading `[task:<id>]` tag decisions.ts puts on every task dispatch. */
|
|
32
|
+
export declare function taskKeyOf(text: string): string | undefined;
|
|
33
|
+
/** 'role' (one session for the role's life — the pre-D3 behaviour) unless the
|
|
34
|
+
* org or the role opts into 'task'. The coordinator's work spans tasks, so an
|
|
35
|
+
* org-wide 'task' does not apply to it; it can still opt in itself. */
|
|
36
|
+
export declare function resolveSessionScope(role: Pick<OrgRole, 'reports_to'> & {
|
|
37
|
+
session_scope?: SessionScope;
|
|
38
|
+
review_input?: string;
|
|
39
|
+
}, def: Pick<OrgDef, 'run_config'> | undefined): SessionScope;
|
|
40
|
+
export declare class SessionLedger {
|
|
41
|
+
private readonly file?;
|
|
42
|
+
private records;
|
|
43
|
+
private history;
|
|
44
|
+
/** `file` omitted = in-memory only (tests, or a daemon with no run dir). */
|
|
45
|
+
constructor(file?: string | undefined);
|
|
46
|
+
/** Which session to resume for this key, or why none can be. */
|
|
47
|
+
resumeFor(q: RecordKey & {
|
|
48
|
+
cwd: string;
|
|
49
|
+
promptHash: string;
|
|
50
|
+
}): {
|
|
51
|
+
sessionId?: string;
|
|
52
|
+
reason: SessionStartReason;
|
|
53
|
+
};
|
|
54
|
+
set(r: SessionRecord): void;
|
|
55
|
+
drop(k: RecordKey): void;
|
|
56
|
+
recordRun(run: Omit<SessionRun, 'resumed'>): SessionRun;
|
|
57
|
+
runs(): SessionRun[];
|
|
58
|
+
private save;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=session-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-ledger.d.ts","sourceRoot":"","sources":["../../../src/orgrt/session-ledger.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAElD,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpD,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,iBAAiB,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,0BAA0B,GAC1B,wBAAwB,GACxB,YAAY,CAAC;AAEjB,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,C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C5B,CAWA;IAED,GAAG,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,CAG1B;IAED,IAAI,CAAC,CAAC,EAAE,SAAS,GAAG,IAAI,CAEvB;IAED,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG,UAAU,CAUtD;IAED,IAAI,IAAI,UAAU,EAAE,CAEnB;IAED,OAAO,CAAC,IAAI;CAYb"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-O001 D3 — task-keyed model-session records.
|
|
3
|
+
*
|
|
4
|
+
* The OS process running a role is ephemeral; the provider/model session is
|
|
5
|
+
* the thing worth keeping, because on the measured run 98.7% of billed tokens
|
|
6
|
+
* were cache reads of it. This ledger is what lets a role's process exit and
|
|
7
|
+
* a later process resume the RIGHT model session — one per (role, runtime,
|
|
8
|
+
* task), the shape of Paperclip's agent_task_sessions
|
|
9
|
+
* (companyId, agentId, adapterType, taskKey) — and it records, per session
|
|
10
|
+
* run, the session id before and after so a resume is auditable instead of
|
|
11
|
+
* assumed. Without that record a runner that silently ignored `resume` looked
|
|
12
|
+
* exactly like one that honoured it.
|
|
13
|
+
*
|
|
14
|
+
* Lives at `.monomind/orgs/<org>/<run>/sessions.json`: under the gitignored
|
|
15
|
+
* state dir, and scoped to the run because task ids (`task-N`) repeat across
|
|
16
|
+
* runs while `org run --resume` keeps the run id.
|
|
17
|
+
*/
|
|
18
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
19
|
+
import { dirname } from 'node:path';
|
|
20
|
+
/** Key for everything a role receives outside a task (and for role scope). */
|
|
21
|
+
export const ROLE_SESSION_KEY = '_role';
|
|
22
|
+
/** Warm state is bounded (Paperclip caps every warm store); so is this history. */
|
|
23
|
+
export const MAX_SESSION_RUNS = 500;
|
|
24
|
+
/** The leading `[task:<id>]` tag decisions.ts puts on every task dispatch. */
|
|
25
|
+
export function taskKeyOf(text) {
|
|
26
|
+
return /^\[task:([^\]\s]+)\]/.exec(text)?.[1];
|
|
27
|
+
}
|
|
28
|
+
/** 'role' (one session for the role's life — the pre-D3 behaviour) unless the
|
|
29
|
+
* org or the role opts into 'task'. The coordinator's work spans tasks, so an
|
|
30
|
+
* org-wide 'task' does not apply to it; it can still opt in itself. */
|
|
31
|
+
export function resolveSessionScope(role, def) {
|
|
32
|
+
// D6: an artifact-only reviewer is cold whatever else is configured — a
|
|
33
|
+
// reviewer that remembers earlier rounds is exactly what D6 removes.
|
|
34
|
+
if (role.review_input === 'artifact-only')
|
|
35
|
+
return 'cold';
|
|
36
|
+
if (role.session_scope)
|
|
37
|
+
return role.session_scope;
|
|
38
|
+
if (role.reports_to == null)
|
|
39
|
+
return 'role';
|
|
40
|
+
const rc = def?.run_config;
|
|
41
|
+
return rc?.session_scope ?? 'role';
|
|
42
|
+
}
|
|
43
|
+
const keyOf = (k) => JSON.stringify([k.role, k.runtime, k.taskKey]);
|
|
44
|
+
export class SessionLedger {
|
|
45
|
+
file;
|
|
46
|
+
records = new Map();
|
|
47
|
+
history = [];
|
|
48
|
+
/** `file` omitted = in-memory only (tests, or a daemon with no run dir). */
|
|
49
|
+
constructor(file) {
|
|
50
|
+
this.file = file;
|
|
51
|
+
if (!file || !existsSync(file))
|
|
52
|
+
return;
|
|
53
|
+
try {
|
|
54
|
+
const raw = JSON.parse(readFileSync(file, 'utf8'));
|
|
55
|
+
for (const r of raw.records ?? [])
|
|
56
|
+
this.records.set(keyOf(r), r);
|
|
57
|
+
this.history = (raw.runs ?? []).slice(-MAX_SESSION_RUNS);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// A corrupt ledger must not stop an org: every lookup degrades to a
|
|
61
|
+
// fresh session, which is recorded with its reason.
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** Which session to resume for this key, or why none can be. */
|
|
65
|
+
resumeFor(q) {
|
|
66
|
+
const r = this.records.get(keyOf(q));
|
|
67
|
+
if (!r)
|
|
68
|
+
return { reason: 'fresh-no-record' };
|
|
69
|
+
// SDK sessions are stored per working directory; resuming from another
|
|
70
|
+
// cwd either fails or silently finds nothing.
|
|
71
|
+
if (r.cwd !== q.cwd)
|
|
72
|
+
return { reason: 'fresh-cwd-changed' };
|
|
73
|
+
// D7: never change a live session's system prompt — a different prompt is
|
|
74
|
+
// a different session.
|
|
75
|
+
if (r.promptHash !== '*' && r.promptHash !== q.promptHash)
|
|
76
|
+
return { reason: 'fresh-prompt-changed' };
|
|
77
|
+
return { sessionId: r.sessionId, reason: 'resumed' };
|
|
78
|
+
}
|
|
79
|
+
set(r) {
|
|
80
|
+
this.records.set(keyOf(r), { ...r, updatedAt: Date.now() });
|
|
81
|
+
this.save();
|
|
82
|
+
}
|
|
83
|
+
drop(k) {
|
|
84
|
+
if (this.records.delete(keyOf(k)))
|
|
85
|
+
this.save();
|
|
86
|
+
}
|
|
87
|
+
recordRun(run) {
|
|
88
|
+
const entry = {
|
|
89
|
+
...run,
|
|
90
|
+
resumed: run.sessionIdBefore !== undefined && run.sessionIdBefore === run.sessionIdAfter,
|
|
91
|
+
};
|
|
92
|
+
this.history.push(entry);
|
|
93
|
+
if (this.history.length > MAX_SESSION_RUNS)
|
|
94
|
+
this.history.splice(0, this.history.length - MAX_SESSION_RUNS);
|
|
95
|
+
this.save();
|
|
96
|
+
return entry;
|
|
97
|
+
}
|
|
98
|
+
runs() {
|
|
99
|
+
return [...this.history];
|
|
100
|
+
}
|
|
101
|
+
save() {
|
|
102
|
+
if (!this.file)
|
|
103
|
+
return;
|
|
104
|
+
try {
|
|
105
|
+
mkdirSync(dirname(this.file), { recursive: true });
|
|
106
|
+
writeFileSync(this.file, JSON.stringify({ records: [...this.records.values()], runs: this.history }, null, 2));
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
// Best-effort audit trail: a full disk must not crash a role mid-task.
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=session-led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,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CACrF,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,uEAAuE;QACzE,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { query } from '@anthropic-ai/claude-agent-sdk';
|
|
2
2
|
import type { AgentRunner, OrgToolDef } from './agent-runner.js';
|
|
3
3
|
import type { OrgBus } from './bus.js';
|
|
4
|
+
import type { TaskEvidence } from './completion-gate.js';
|
|
4
5
|
import type { RoleFence } from './fence.js';
|
|
6
|
+
import type { LoadoutSummary, ResolvedLoadout } from './loadouts.js';
|
|
5
7
|
import { Mailbox } from './mailbox.js';
|
|
6
8
|
import type { Decision, PolicyEngine } from './policy.js';
|
|
7
9
|
import type { DecisionKind, OrgDef, OrgRole } from './types.js';
|
|
10
|
+
import { SessionLedger } from './session-ledger.js';
|
|
8
11
|
/**
|
|
9
12
|
* Resolves the extra system-prompt block for a role: built-in archetype
|
|
10
13
|
* best-practices (keyed by `role.ui.icon`) plus the role's own
|
|
@@ -79,7 +82,7 @@ export interface SessionOpts {
|
|
|
79
82
|
close(): void;
|
|
80
83
|
} | undefined>;
|
|
81
84
|
deliver: DeliverFn;
|
|
82
|
-
askHuman?: (role: string, question: string) => Promise<string>;
|
|
85
|
+
askHuman?: (role: string, question: string, blocking?: boolean) => Promise<string>;
|
|
83
86
|
/** Coordinator-only: records the run's outcome (daemon persists it to run
|
|
84
87
|
* history) — #302: the daemon gathers the facts, calls the completion
|
|
85
88
|
* gate, and returns a refusal string instead of recording anything when
|
|
@@ -167,6 +170,10 @@ export interface SessionOpts {
|
|
|
167
170
|
* first query() call resumes it instead of starting a fresh conversation
|
|
168
171
|
* (P2-13: this is what actually makes checkpoint resume resume). */
|
|
169
172
|
resumeSessionId?: string;
|
|
173
|
+
/** ADR-O001 D3: the run's task-keyed session records. Every session run is
|
|
174
|
+
* recorded here (sessionIdBefore/After) in every scope; only
|
|
175
|
+
* `session_scope: 'task'` resumes from it. Omitted = in-memory. */
|
|
176
|
+
sessionLedger?: SessionLedger;
|
|
170
177
|
/** Circuit breaker config for this role. */
|
|
171
178
|
circuitBreaker?: {
|
|
172
179
|
threshold: number;
|
|
@@ -181,10 +188,42 @@ export interface SessionOpts {
|
|
|
181
188
|
fence?: RoleFence;
|
|
182
189
|
/** Decision gate: creates a hard-blocking human-approval checkpoint. */
|
|
183
190
|
onGate?: (role: string, name: string, description: string) => Promise<string>;
|
|
184
|
-
/** Task DAG: create a task with dependencies.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
/** Task DAG: create a task with dependencies. `loadout` (ADR-O001 D7) is
|
|
192
|
+
* the catalog entry the caller selected; only offered when the org has a
|
|
193
|
+
* catalog (`loadoutCatalog`). */
|
|
194
|
+
createTask?: (role: string, title: string, assignee: string, deps: string[], loadout?: string) => string;
|
|
195
|
+
/** ADR-O001 D7: the org's loadout catalog. Set only when the org declares
|
|
196
|
+
* one; it adds the optional `loadout` argument to org_task/org_plan_graph.
|
|
197
|
+
* Unset, those tools are byte-identical to before (same gating idea as
|
|
198
|
+
* `requireTaskEvidence`). Identical for every role and every loadout, so
|
|
199
|
+
* the tool list — prefix position 0 — never varies with the loadout. */
|
|
200
|
+
loadoutCatalog?: LoadoutSummary[];
|
|
201
|
+
/** ADR-O001 D7: the loadout THIS session's system prompt is built with.
|
|
202
|
+
* Plain data resolved by the caller before the session starts, so it is
|
|
203
|
+
* fixed for the session's whole life — every maxTurns/crash restart
|
|
204
|
+
* rebuilds the identical prompt, and nothing can edit it mid-session.
|
|
205
|
+
* D3 hook: a task-keyed session for (role, taskKey) passes
|
|
206
|
+
* `resolveLoadout(def, task.loadout, root)` here. */
|
|
207
|
+
loadout?: ResolvedLoadout;
|
|
208
|
+
/** ADR-O001 D3 x D7: in task scope each task's session is built with that
|
|
209
|
+
* task's recorded loadout (undefined = none selected) instead of the
|
|
210
|
+
* incarnation's `loadout`, which then only serves untagged mail. */
|
|
211
|
+
loadoutFor?: (taskId: string) => ResolvedLoadout | undefined;
|
|
212
|
+
/** Task DAG: mark a task as completed. `evidence` is ADR-O001 D5's
|
|
213
|
+
* machine-checkable proof — acceptance commands with their real exit
|
|
214
|
+
* codes, pinned to a commit sha. Only demanded when the org sets
|
|
215
|
+
* run_config.completion_evidence (see `requireTaskEvidence`). */
|
|
216
|
+
completeTask?: (role: string, taskId: string, result?: string, evidence?: TaskEvidence) => string;
|
|
217
|
+
/** run_config.completion_evidence: when true, org_task_done advertises the
|
|
218
|
+
* evidence argument as required. Off by default, so a role in an org that
|
|
219
|
+
* has not opted in sees a byte-identical tool description (D7: the tool
|
|
220
|
+
* list is prefix position 0 — changing it for every org would invalidate
|
|
221
|
+
* every cached prompt). */
|
|
222
|
+
requireTaskEvidence?: boolean;
|
|
223
|
+
/** ADR-O001 D6: request an artifact-only review. Set only when the org has
|
|
224
|
+
* a role with review_input: 'artifact-only'; otherwise org_review is not
|
|
225
|
+
* registered and the tool list is unchanged. */
|
|
226
|
+
requestReview?: (role: string, taskId: string, reviewer: string, base?: string) => string;
|
|
188
227
|
/** Task DAG: list all tasks. */
|
|
189
228
|
listTasks?: () => string;
|
|
190
229
|
splitTask?: (role: string, parentId: string, children: {
|
|
@@ -203,6 +242,7 @@ export interface SessionOpts {
|
|
|
203
242
|
title: string;
|
|
204
243
|
assignee: string;
|
|
205
244
|
after?: string[];
|
|
245
|
+
loadout?: string;
|
|
206
246
|
}[]) => string;
|
|
207
247
|
}
|
|
208
248
|
/** Role briefing given to each agent session (SDK systemPrompt option).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/orgrt/session.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAE5D,OAAO,KAAK,EAAgB,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,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