@anhlp/alp-runtime 0.0.0-stage → 0.0.1-beta.4
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/LICENSE +202 -0
- package/NOTICE +7 -0
- package/README.md +6 -2
- package/dist/acp-transport.d.ts +130 -0
- package/dist/acp-transport.js +511 -0
- package/dist/antigravity-transport.d.ts +82 -0
- package/dist/antigravity-transport.js +619 -0
- package/dist/assignment-results.d.ts +18 -0
- package/dist/assignment-results.js +77 -0
- package/dist/attachments.d.ts +84 -0
- package/dist/attachments.js +213 -0
- package/dist/board-domain.d.ts +56 -0
- package/dist/board-domain.js +157 -0
- package/dist/board.d.ts +21 -0
- package/dist/board.js +69 -0
- package/dist/catalog.d.ts +31 -0
- package/dist/catalog.js +38 -0
- package/dist/claude-transport.d.ts +202 -0
- package/dist/claude-transport.js +817 -0
- package/dist/configure.d.ts +44 -0
- package/dist/configure.js +64 -0
- package/dist/contracts.d.ts +327 -0
- package/dist/contracts.js +16 -0
- package/dist/conversation.d.ts +45 -0
- package/dist/conversation.js +62 -0
- package/dist/events.d.ts +1 -0
- package/dist/events.js +0 -0
- package/dist/github.d.ts +10 -0
- package/dist/github.js +39 -0
- package/dist/handoff.d.ts +36 -0
- package/dist/handoff.js +73 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +87 -0
- package/dist/language.d.ts +41 -0
- package/dist/language.js +68 -0
- package/dist/live.d.ts +48 -0
- package/dist/live.js +45 -0
- package/dist/mailbox.d.ts +26 -0
- package/dist/mailbox.js +38 -0
- package/dist/mcp-tools.d.ts +115 -0
- package/dist/mcp-tools.js +71 -0
- package/dist/permission-path.d.ts +2 -0
- package/dist/permission-path.js +44 -0
- package/dist/process-info.d.ts +14 -0
- package/dist/process-info.js +32 -0
- package/dist/providers.d.ts +28 -0
- package/dist/providers.js +71 -0
- package/dist/recall.d.ts +42 -0
- package/dist/recall.js +60 -0
- package/dist/resolve.d.ts +121 -0
- package/dist/resolve.js +238 -0
- package/dist/runtime-context.d.ts +43 -0
- package/dist/runtime-context.js +61 -0
- package/dist/runtime.d.ts +11 -0
- package/dist/runtime.js +3976 -0
- package/dist/session-config.d.ts +2102 -0
- package/dist/session-config.js +205 -0
- package/dist/session-state.d.ts +166 -0
- package/dist/session-state.js +0 -0
- package/dist/tool-detail.d.ts +81 -0
- package/dist/tool-detail.js +332 -0
- package/dist/tool-results.d.ts +12 -0
- package/dist/tool-results.js +25 -0
- package/dist/tools.d.ts +719 -0
- package/dist/tools.js +396 -0
- package/dist/transport.d.ts +47 -0
- package/dist/transport.js +169 -0
- package/dist/usage.d.ts +25 -0
- package/dist/usage.js +60 -0
- package/dist/workspace.d.ts +101 -0
- package/dist/workspace.js +259 -0
- package/dist/worktree-domain.d.ts +89 -0
- package/dist/worktree-domain.js +199 -0
- package/package.json +262 -4
- package/src/acp-transport.ts +508 -0
- package/src/antigravity-transport.ts +667 -0
- package/src/assignment-results.ts +64 -0
- package/src/attachments.ts +254 -0
- package/src/board-domain.ts +185 -0
- package/src/board.ts +80 -0
- package/src/catalog.ts +32 -0
- package/src/claude-transport.ts +938 -0
- package/src/configure.ts +93 -0
- package/src/contracts.ts +318 -0
- package/src/conversation.ts +81 -0
- package/src/events.ts +1 -0
- package/src/github.ts +37 -0
- package/src/handoff.ts +86 -0
- package/src/index.ts +32 -0
- package/src/language.ts +102 -0
- package/src/live.ts +86 -0
- package/src/mailbox.ts +49 -0
- package/src/mcp-tools.ts +73 -0
- package/src/permission-path.ts +37 -0
- package/src/process-info.ts +40 -0
- package/src/providers.ts +84 -0
- package/src/recall.ts +85 -0
- package/src/resolve.ts +230 -0
- package/src/runtime-context.ts +49 -0
- package/src/runtime.ts +4691 -0
- package/src/session-config.ts +304 -0
- package/src/session-state.ts +164 -0
- package/src/tool-detail.ts +397 -0
- package/src/tool-results.ts +26 -0
- package/src/tools.ts +397 -0
- package/src/transport.ts +116 -0
- package/src/usage.ts +79 -0
- package/src/workspace.ts +318 -0
- package/src/worktree-domain.ts +220 -0
package/dist/board.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// packages/runtime/src/board.ts
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { realpathSync } from "node:fs";
|
|
4
|
+
var PIN_KINDS = ["claim", "decision", "finding"];
|
|
5
|
+
var PIN_BODY_CHARS = 2e3;
|
|
6
|
+
var PIN_PATHS = 50;
|
|
7
|
+
var BOARD_KEEP = 200;
|
|
8
|
+
var DIGEST_CHARS = 3e3;
|
|
9
|
+
function canonicalPath(file) {
|
|
10
|
+
try {
|
|
11
|
+
return realpathSync(file);
|
|
12
|
+
} catch {
|
|
13
|
+
const parent = path.dirname(file);
|
|
14
|
+
return parent === file ? file : path.join(canonicalPath(parent), path.basename(file));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
var containsPath = (outer, inner) => {
|
|
18
|
+
const relative = path.relative(outer, inner);
|
|
19
|
+
return !relative || relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);
|
|
20
|
+
};
|
|
21
|
+
function normalizePaths(paths, project, roots = [project]) {
|
|
22
|
+
if (!Array.isArray(paths) || !paths.length || paths.length > PIN_PATHS) return `paths must list 1 to ${PIN_PATHS} files or directories`;
|
|
23
|
+
const normalized = [];
|
|
24
|
+
for (const entry of paths) {
|
|
25
|
+
if (typeof entry !== "string" || !entry.trim()) return "paths must be nonempty strings";
|
|
26
|
+
const absolute = canonicalPath(path.resolve(project, entry.trim()));
|
|
27
|
+
if (!roots.some((root) => containsPath(canonicalPath(root), absolute))) return `${entry} is outside the project or declared write root`;
|
|
28
|
+
const relative = path.relative(canonicalPath(project), absolute).split(path.sep).join("/");
|
|
29
|
+
normalized.push(relative === "" ? "." : relative === ".." || relative.startsWith("../") || path.isAbsolute(relative) ? absolute.split(path.sep).join("/") : relative);
|
|
30
|
+
}
|
|
31
|
+
return [...new Set(normalized)];
|
|
32
|
+
}
|
|
33
|
+
var contains = (outer, inner) => path.isAbsolute(outer) === path.isAbsolute(inner) && (outer === "." || inner === outer || inner.startsWith(outer.endsWith("/") ? outer : `${outer}/`));
|
|
34
|
+
function overlapping(a, b) {
|
|
35
|
+
return a.filter((left) => b.some((right) => contains(left, right) || contains(right, left)));
|
|
36
|
+
}
|
|
37
|
+
var live = (pin) => !pin.released;
|
|
38
|
+
function renderPin(pin) {
|
|
39
|
+
const where = pin.paths?.length ? ` [${pin.paths.join(", ")}]` : "";
|
|
40
|
+
return `${pin.kind} ${pin.id} by ${pin.agent}${pin.task ? ` for task ${pin.task}` : ""}${where}: ${pin.body}`;
|
|
41
|
+
}
|
|
42
|
+
function renderBoard(pins, limit = DIGEST_CHARS) {
|
|
43
|
+
const claims = pins.filter((pin) => pin.kind === "claim" && live(pin));
|
|
44
|
+
const notes = pins.filter((pin) => pin.kind !== "claim" && live(pin)).reverse();
|
|
45
|
+
if (!claims.length && !notes.length) return "";
|
|
46
|
+
const lines = ["Project board (shared by every agent on this project; read more with alp_board):"];
|
|
47
|
+
let size = lines[0].length;
|
|
48
|
+
for (const pin of [...claims, ...notes]) {
|
|
49
|
+
const line = `- ${renderPin(pin)}`;
|
|
50
|
+
if (size + line.length > limit) {
|
|
51
|
+
lines.push("- \u2026 more on alp_board");
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
lines.push(line);
|
|
55
|
+
size += line.length;
|
|
56
|
+
}
|
|
57
|
+
return lines.join("\n");
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
BOARD_KEEP,
|
|
61
|
+
PIN_BODY_CHARS,
|
|
62
|
+
PIN_KINDS,
|
|
63
|
+
PIN_PATHS,
|
|
64
|
+
live,
|
|
65
|
+
normalizePaths,
|
|
66
|
+
overlapping,
|
|
67
|
+
renderBoard,
|
|
68
|
+
renderPin
|
|
69
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const DEFAULT_MODEL = "gpt-5.6-sol";
|
|
2
|
+
export declare const DEFAULT_CLAUDE_MODEL = "sonnet";
|
|
3
|
+
export declare const DEFAULT_ANTIGRAVITY_MODEL = "gemini-3.8-flash-high";
|
|
4
|
+
/** Oracle runs on one of these; main may consult both for two opinions. */
|
|
5
|
+
export declare const ORACLE_MODELS: string[];
|
|
6
|
+
export declare const ORACLE_THINKING = "high";
|
|
7
|
+
export declare const modes: {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
/** Whether a session in `mode` may run with `requested`; a child never exceeds its requester. */
|
|
12
|
+
export declare const withinMode: (requested: string, mode: string) => boolean;
|
|
13
|
+
export declare const writes: (mode: string) => boolean;
|
|
14
|
+
export declare const thinkingOptions: {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
18
|
+
export declare const models: {
|
|
19
|
+
defaultThinkingOptionId?: string | undefined;
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
description: string;
|
|
23
|
+
thinkingOptions: {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
}[];
|
|
27
|
+
}[];
|
|
28
|
+
export declare function thinkingOptionsFor(runtime: 'codex' | 'claude' | 'antigravity', nativeModel: string): {
|
|
29
|
+
id: string;
|
|
30
|
+
label: string;
|
|
31
|
+
}[];
|
package/dist/catalog.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// packages/runtime/src/catalog.ts
|
|
2
|
+
import { MODELS } from "@anhlp/alp-core/models";
|
|
3
|
+
var DEFAULT_MODEL = "gpt-5.6-sol";
|
|
4
|
+
var DEFAULT_CLAUDE_MODEL = "sonnet";
|
|
5
|
+
var DEFAULT_ANTIGRAVITY_MODEL = "gemini-3.8-flash-high";
|
|
6
|
+
var ORACLE_MODELS = ["claude:claude-fable-5-1", "codex:gpt-6-astra"];
|
|
7
|
+
var ORACLE_THINKING = "high";
|
|
8
|
+
var modes = [{ id: "read-only", label: "Read only" }, { id: "workspace-write", label: "Workspace write" }, { id: "full-access", label: "Full access" }];
|
|
9
|
+
var modeRank = { "read-only": 0, "workspace-write": 1, "full-access": 2 };
|
|
10
|
+
var withinMode = (requested, mode) => (modeRank[requested] ?? 3) <= (modeRank[mode] ?? -1);
|
|
11
|
+
var writes = (mode) => mode !== "read-only";
|
|
12
|
+
var option = (id) => ({ id, label: id });
|
|
13
|
+
var options = (ids) => ids.map(option);
|
|
14
|
+
var thinkingOptions = options(["none", "off", "low", "medium", "high", "xhigh", "max", "ultra", "ultracode"]);
|
|
15
|
+
var model = (runtime, id, label, description, modelThinkingOptions, defaultThinkingOptionId) => ({
|
|
16
|
+
id: `${runtime}:${id}`,
|
|
17
|
+
label: `${runtime === "codex" ? "Codex" : runtime === "claude" ? "Claude Code" : "Antigravity"} \xB7 ${label}`,
|
|
18
|
+
description,
|
|
19
|
+
thinkingOptions: modelThinkingOptions,
|
|
20
|
+
...defaultThinkingOptionId ? { defaultThinkingOptionId } : {}
|
|
21
|
+
});
|
|
22
|
+
var models = MODELS.map((entry) => model(entry.runtime, entry.id, entry.label, entry.description, options(entry.efforts), entry.effort));
|
|
23
|
+
function thinkingOptionsFor(runtime, nativeModel) {
|
|
24
|
+
return models.find((candidate) => candidate.id === `${runtime}:${nativeModel}`)?.thinkingOptions ?? thinkingOptions;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
DEFAULT_ANTIGRAVITY_MODEL,
|
|
28
|
+
DEFAULT_CLAUDE_MODEL,
|
|
29
|
+
DEFAULT_MODEL,
|
|
30
|
+
ORACLE_MODELS,
|
|
31
|
+
ORACLE_THINKING,
|
|
32
|
+
models,
|
|
33
|
+
modes,
|
|
34
|
+
thinkingOptions,
|
|
35
|
+
thinkingOptionsFor,
|
|
36
|
+
withinMode,
|
|
37
|
+
writes
|
|
38
|
+
};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const toolShapes: Record<string, Record<string, z.ZodType>>;
|
|
3
|
+
type Listener = (method: string, params: any) => void;
|
|
4
|
+
type RequestHandler = (method: string, params: any) => Promise<unknown>;
|
|
5
|
+
/** The plugin name ALP's skills are loaded under, so Claude Code calls them alp:<name>. */
|
|
6
|
+
export declare const SKILL_PLUGIN = "alp";
|
|
7
|
+
/**
|
|
8
|
+
* A Claude Code plugin in `directory` holding the given skills, linked to their own
|
|
9
|
+
* directories so an edit to a skill reaches the next session (ALPD §59).
|
|
10
|
+
*/
|
|
11
|
+
export declare function skillPlugin(directory: string, skills: Array<{
|
|
12
|
+
name: string;
|
|
13
|
+
path: string;
|
|
14
|
+
}>): string;
|
|
15
|
+
type PermissionRules = {
|
|
16
|
+
allow: string[];
|
|
17
|
+
ask?: string[];
|
|
18
|
+
deny: string[];
|
|
19
|
+
beyondMode?: 'refuse' | 'ask';
|
|
20
|
+
/** The OS sandbox ALP puts Bash in, and the directory it may write besides temp files. */
|
|
21
|
+
floor?: 'read-only' | 'workspace-write';
|
|
22
|
+
floorRoot?: string;
|
|
23
|
+
};
|
|
24
|
+
/** Whether Claude Code can sandbox Bash here: Seatbelt on macOS, bubblewrap and socat on Linux. ALP_CLAUDE_SANDBOX=0 turns it off, =1 claims it (tests). */
|
|
25
|
+
export declare function claudeSandboxAvailable(): boolean;
|
|
26
|
+
/** What ALP asks the user for a permission Claude would otherwise not have. */
|
|
27
|
+
/** One turn-input part as Claude's: text, or a data-URL image as a base64 image block. */
|
|
28
|
+
export declare function claudeContent(part: any): {
|
|
29
|
+
type: string;
|
|
30
|
+
source: {
|
|
31
|
+
type: string;
|
|
32
|
+
media_type: string;
|
|
33
|
+
data: string;
|
|
34
|
+
};
|
|
35
|
+
text?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
type: string;
|
|
38
|
+
text: any;
|
|
39
|
+
source?: undefined;
|
|
40
|
+
};
|
|
41
|
+
export type PermissionRequest = {
|
|
42
|
+
tool: string;
|
|
43
|
+
input: Record<string, unknown>;
|
|
44
|
+
reason: 'rule' | 'mode';
|
|
45
|
+
rule?: string;
|
|
46
|
+
};
|
|
47
|
+
export type PermissionAnswer = {
|
|
48
|
+
allow: boolean;
|
|
49
|
+
always?: boolean;
|
|
50
|
+
message?: string;
|
|
51
|
+
};
|
|
52
|
+
/** Claude's permission mode for an ALP mode; full-access skips every permission check. */
|
|
53
|
+
export declare const claudePermissionMode: (sandbox: string) => "default" | "acceptEdits" | "bypassPermissions";
|
|
54
|
+
export declare function claudePermissions(sandbox: string, currentSandbox?: () => string, rules?: PermissionRules | null, ask?: (request: PermissionRequest) => Promise<PermissionAnswer>): {
|
|
55
|
+
canUseTool: (name: string, input: Record<string, unknown>, context?: {
|
|
56
|
+
decisionReasonType?: string;
|
|
57
|
+
suggestions?: unknown;
|
|
58
|
+
}) => Promise<{
|
|
59
|
+
behavior: string;
|
|
60
|
+
message: string;
|
|
61
|
+
} | {
|
|
62
|
+
updatedPermissions?: {
|
|
63
|
+
type: string;
|
|
64
|
+
rules: {
|
|
65
|
+
ruleContent?: string | undefined;
|
|
66
|
+
toolName: string;
|
|
67
|
+
}[];
|
|
68
|
+
behavior: string;
|
|
69
|
+
destination: string;
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
behavior: string;
|
|
72
|
+
updatedInput: Record<string, unknown>;
|
|
73
|
+
message?: undefined;
|
|
74
|
+
}>;
|
|
75
|
+
sandbox?: {
|
|
76
|
+
filesystem?: {
|
|
77
|
+
denyWrite: string[];
|
|
78
|
+
} | undefined;
|
|
79
|
+
enabled: boolean;
|
|
80
|
+
autoAllowBashIfSandboxed: boolean;
|
|
81
|
+
allowUnsandboxedCommands: boolean;
|
|
82
|
+
} | undefined;
|
|
83
|
+
settings?: {
|
|
84
|
+
permissions: {
|
|
85
|
+
ask: string[];
|
|
86
|
+
};
|
|
87
|
+
} | undefined;
|
|
88
|
+
disallowedTools: string[];
|
|
89
|
+
allowedTools?: string[] | undefined;
|
|
90
|
+
tools?: string[] | undefined;
|
|
91
|
+
permissionMode: string;
|
|
92
|
+
allowDangerouslySkipPermissions: boolean;
|
|
93
|
+
};
|
|
94
|
+
/** Whether Claude's last rate limit report means requests are refused: rejected, with no overage to fall back on. */
|
|
95
|
+
export declare const claudeLimited: (info?: {
|
|
96
|
+
status: string;
|
|
97
|
+
overageStatus?: string;
|
|
98
|
+
}) => boolean;
|
|
99
|
+
/**
|
|
100
|
+
* A Claude session's main chain, read from its transcript by the Agent SDK: user and assistant entries
|
|
101
|
+
* in order, with their transcript uuids. Found under `dir`'s project, else in any project (a session
|
|
102
|
+
* resumed or forked from another directory). Empty when the session has no transcript yet.
|
|
103
|
+
*/
|
|
104
|
+
export declare function claudeChain(sessionId: string, dir?: string): Promise<Array<{
|
|
105
|
+
uuid: string;
|
|
106
|
+
type: 'user' | 'assistant';
|
|
107
|
+
toolResult?: boolean;
|
|
108
|
+
}>>;
|
|
109
|
+
/** Maps Claude Agent SDK streaming sessions to the normalized runtime protocol. */
|
|
110
|
+
export declare class ClaudeTransport {
|
|
111
|
+
private readonly command;
|
|
112
|
+
private readonly cwd;
|
|
113
|
+
private readonly env;
|
|
114
|
+
private listeners;
|
|
115
|
+
private failures;
|
|
116
|
+
private requestHandler?;
|
|
117
|
+
/** Whether the workspace had a .claude directory before a sandboxed session started. */
|
|
118
|
+
private claudeDirectory?;
|
|
119
|
+
private input;
|
|
120
|
+
private query?;
|
|
121
|
+
private pump?;
|
|
122
|
+
private config?;
|
|
123
|
+
private threadId;
|
|
124
|
+
private activeTurn?;
|
|
125
|
+
private closed;
|
|
126
|
+
private assistantText;
|
|
127
|
+
private streamingMessage?;
|
|
128
|
+
private toolCalls;
|
|
129
|
+
/** The last rate limit Claude reported, and whether the running turn hit one. */
|
|
130
|
+
private rateLimit?;
|
|
131
|
+
private limitedTurn;
|
|
132
|
+
/** The model's context window and the fill at which Claude compacts it, as Claude reports them (ALPD §57). */
|
|
133
|
+
private contextWindow?;
|
|
134
|
+
private compactAt?;
|
|
135
|
+
/** The compaction running now, from its start to its boundary. */
|
|
136
|
+
private compaction?;
|
|
137
|
+
/** The plugin directory that loads the agent's skills, removed on close. */
|
|
138
|
+
private skillDirectory?;
|
|
139
|
+
/** Whether a turn ran in this process; before one, an error result is a boot refusal. */
|
|
140
|
+
private turnsStarted;
|
|
141
|
+
/** Rejects when the process fails, for a resume that waits for Claude to start. */
|
|
142
|
+
private bootFailure?;
|
|
143
|
+
private rejectBoot?;
|
|
144
|
+
private bootError?;
|
|
145
|
+
constructor(command: string, cwd: string, env: NodeJS.ProcessEnv);
|
|
146
|
+
orchestrationContext(): Promise<{
|
|
147
|
+
runtime: string;
|
|
148
|
+
observedAt: string;
|
|
149
|
+
catalogAvailable: boolean;
|
|
150
|
+
models: {
|
|
151
|
+
id: string;
|
|
152
|
+
label: string;
|
|
153
|
+
description: string;
|
|
154
|
+
thinking: string[] | undefined;
|
|
155
|
+
}[];
|
|
156
|
+
usage: {
|
|
157
|
+
available: boolean;
|
|
158
|
+
plan?: undefined;
|
|
159
|
+
windows?: undefined;
|
|
160
|
+
} | {
|
|
161
|
+
available: boolean;
|
|
162
|
+
plan: any;
|
|
163
|
+
windows: {
|
|
164
|
+
name: string;
|
|
165
|
+
usedPercent: any;
|
|
166
|
+
remainingPercent: number | null;
|
|
167
|
+
resetsAt: any;
|
|
168
|
+
}[];
|
|
169
|
+
};
|
|
170
|
+
}>;
|
|
171
|
+
initialize(): Promise<void>;
|
|
172
|
+
/** The plan's usage windows before a session starts, from a Claude process that sends no prompt and is closed after. */
|
|
173
|
+
private probeUsage;
|
|
174
|
+
onNotification(listener: Listener): () => boolean;
|
|
175
|
+
onFailure(listener: (error: Error) => void): () => boolean;
|
|
176
|
+
onRequest(handler: RequestHandler): void;
|
|
177
|
+
request(method: string, params: any): Promise<any>;
|
|
178
|
+
/**
|
|
179
|
+
* How a resume starts. With a base, a session whose transcript does not exist yet is made from the
|
|
180
|
+
* base's conversation cut at `at` (a fork or rewind, §12.7): Claude writes it, under this session's
|
|
181
|
+
* id, only when its first prompt runs. Otherwise, the session's own transcript.
|
|
182
|
+
*/
|
|
183
|
+
private resumeFrom;
|
|
184
|
+
/**
|
|
185
|
+
* Waits until Claude has started: its answer to the SDK's initialize request, or the failure that
|
|
186
|
+
* ends it first. Past BOOT_MS ALP goes on, as any resume does, and a later refusal fails the session.
|
|
187
|
+
*/
|
|
188
|
+
private booted;
|
|
189
|
+
private start;
|
|
190
|
+
/** Reads the window and the compaction threshold Claude resolved for this session, before any turn. */
|
|
191
|
+
private measureContext;
|
|
192
|
+
private convertMcp;
|
|
193
|
+
private consume;
|
|
194
|
+
private handle;
|
|
195
|
+
private refuseBoot;
|
|
196
|
+
private emit;
|
|
197
|
+
private assistantState;
|
|
198
|
+
private clearAssistantText;
|
|
199
|
+
private fail;
|
|
200
|
+
close(): Promise<void>;
|
|
201
|
+
}
|
|
202
|
+
export {};
|