@smooai/smooth-operator-core 0.9.0 → 0.10.1
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/dist/agent.d.ts +276 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +450 -0
- package/dist/agent.js.map +1 -0
- package/dist/cast.d.ts +81 -0
- package/dist/cast.d.ts.map +1 -0
- package/dist/cast.js +103 -0
- package/dist/cast.js.map +1 -0
- package/dist/checkpoint.d.ts +25 -0
- package/dist/checkpoint.d.ts.map +1 -0
- package/dist/checkpoint.js +23 -0
- package/dist/checkpoint.js.map +1 -0
- package/dist/compaction.d.ts +21 -0
- package/dist/compaction.d.ts.map +1 -0
- package/dist/compaction.js +50 -0
- package/dist/compaction.js.map +1 -0
- package/dist/cost.d.ts +34 -0
- package/dist/cost.d.ts.map +1 -0
- package/dist/cost.js +42 -0
- package/dist/cost.js.map +1 -0
- package/dist/extension/host.d.ts +199 -0
- package/dist/extension/host.d.ts.map +1 -0
- package/dist/extension/host.js +502 -0
- package/dist/extension/host.js.map +1 -0
- package/dist/extension/index.d.ts +36 -0
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.js +37 -0
- package/dist/extension/index.js.map +1 -0
- package/dist/extension/manifest.d.ts +111 -0
- package/dist/extension/manifest.d.ts.map +1 -0
- package/dist/extension/manifest.js +190 -0
- package/dist/extension/manifest.js.map +1 -0
- package/dist/extension/process.d.ts +118 -0
- package/dist/extension/process.d.ts.map +1 -0
- package/dist/extension/process.js +352 -0
- package/dist/extension/process.js.map +1 -0
- package/dist/extension/protocol.d.ts +254 -0
- package/dist/extension/protocol.d.ts.map +1 -0
- package/dist/extension/protocol.js +127 -0
- package/dist/extension/protocol.js.map +1 -0
- package/dist/extension/tool_proxy.d.ts +34 -0
- package/dist/extension/tool_proxy.d.ts.map +1 -0
- package/dist/extension/tool_proxy.js +48 -0
- package/dist/extension/tool_proxy.js.map +1 -0
- package/dist/humanGate.d.ts +44 -0
- package/dist/humanGate.d.ts.map +1 -0
- package/dist/humanGate.js +30 -0
- package/dist/humanGate.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/knowledge.d.ts +30 -0
- package/dist/knowledge.d.ts.map +1 -0
- package/dist/knowledge.js +43 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/llmProvider.d.ts +106 -0
- package/dist/llmProvider.d.ts.map +1 -0
- package/dist/llmProvider.js +160 -0
- package/dist/llmProvider.js.map +1 -0
- package/dist/memory.d.ts +23 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +40 -0
- package/dist/memory.js.map +1 -0
- package/dist/rerank.d.ts +27 -0
- package/dist/rerank.d.ts.map +1 -0
- package/dist/rerank.js +45 -0
- package/dist/rerank.js.map +1 -0
- package/dist/thread.d.ts +43 -0
- package/dist/thread.d.ts.map +1 -0
- package/dist/thread.js +60 -0
- package/dist/thread.js.map +1 -0
- package/dist/toolSearch.d.ts +55 -0
- package/dist/toolSearch.d.ts.map +1 -0
- package/dist/toolSearch.js +110 -0
- package/dist/toolSearch.js.map +1 -0
- package/dist/vector.d.ts +36 -0
- package/dist/vector.d.ts.map +1 -0
- package/dist/vector.js +75 -0
- package/dist/vector.js.map +1 -0
- package/dist/workflow.d.ts +62 -0
- package/dist/workflow.d.ts.map +1 -0
- package/dist/workflow.js +109 -0
- package/dist/workflow.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension manifests — `extension.toml` discovery, merge, and `${env:VAR}`
|
|
3
|
+
* expansion. The TS sibling of the Rust host's `extension/manifest.rs`.
|
|
4
|
+
*
|
|
5
|
+
* - An extension lives in a directory holding an `extension.toml`.
|
|
6
|
+
* - Global extensions: `~/.smooth/extensions/<name>/extension.toml`
|
|
7
|
+
* (or `$SMOOTH_HOME/extensions/...`).
|
|
8
|
+
* - Project extensions: `<workspace>/.smooth/extensions/<name>/extension.toml`.
|
|
9
|
+
* - On a name collision the **project entry wins** (the mcp.toml / plugin.toml
|
|
10
|
+
* merge rule).
|
|
11
|
+
* - `[run] env` values support `${env:VAR}` expansion so secrets stay out of the
|
|
12
|
+
* manifest.
|
|
13
|
+
* - A single malformed manifest is tolerated: it is collected as a failure and
|
|
14
|
+
* the rest still load.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Where a manifest was discovered. Project extensions only load in trusted
|
|
18
|
+
* workspaces; the host uses this to apply that policy.
|
|
19
|
+
*/
|
|
20
|
+
export type Scope = 'global' | 'project';
|
|
21
|
+
/** How to launch the extension subprocess. */
|
|
22
|
+
export interface RunSpec {
|
|
23
|
+
/** Executable to spawn (e.g. `node`, `python3`, an absolute path). */
|
|
24
|
+
command: string;
|
|
25
|
+
args: string[];
|
|
26
|
+
/** Extra env vars; values may reference `${env:VAR}`. */
|
|
27
|
+
env: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Capability declarations. The `events` list doubles as the host's dispatch
|
|
31
|
+
* filter — an extension only receives events it names here.
|
|
32
|
+
*/
|
|
33
|
+
export interface Capabilities {
|
|
34
|
+
events: string[];
|
|
35
|
+
tools: boolean;
|
|
36
|
+
commands: boolean;
|
|
37
|
+
ui: boolean;
|
|
38
|
+
exec: boolean;
|
|
39
|
+
kv: boolean;
|
|
40
|
+
bus: boolean;
|
|
41
|
+
session: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** Resource directories the extension contributes (skills, prompts, themes). */
|
|
44
|
+
export interface Resources {
|
|
45
|
+
skills?: string;
|
|
46
|
+
prompts?: string;
|
|
47
|
+
themes?: string;
|
|
48
|
+
}
|
|
49
|
+
/** A parsed `extension.toml`. */
|
|
50
|
+
export interface ExtensionManifest {
|
|
51
|
+
name: string;
|
|
52
|
+
version: string;
|
|
53
|
+
/** Highest SEP protocol version the extension declares. Defaults to 1. */
|
|
54
|
+
protocol: number;
|
|
55
|
+
run: RunSpec;
|
|
56
|
+
capabilities: Capabilities;
|
|
57
|
+
resources: Resources;
|
|
58
|
+
/** Per-extension hook timeout override, in milliseconds. */
|
|
59
|
+
hookTimeoutMs?: number;
|
|
60
|
+
/** Optional: skip this extension without deleting its manifest. */
|
|
61
|
+
disabled: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A discovered extension: its manifest plus the directory it was found in
|
|
65
|
+
* (relative resources and `args` resolve against this root) and its scope.
|
|
66
|
+
*/
|
|
67
|
+
export interface DiscoveredExtension {
|
|
68
|
+
manifest: ExtensionManifest;
|
|
69
|
+
root: string;
|
|
70
|
+
scope: Scope;
|
|
71
|
+
}
|
|
72
|
+
/** A `(source, error message)` pair for a manifest that failed to parse. */
|
|
73
|
+
export type ManifestFailure = [source: string, error: string];
|
|
74
|
+
/**
|
|
75
|
+
* Parse a manifest from TOML text. Throws when the TOML is malformed or the
|
|
76
|
+
* required `name` / `version` / `[run] command` fields are missing — the same
|
|
77
|
+
* required set the Rust serde struct enforces.
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseManifest(tomlText: string): ExtensionManifest;
|
|
80
|
+
/** Load a manifest from `<dir>/extension.toml`. Throws if missing or malformed. */
|
|
81
|
+
export declare function loadManifestDir(dir: string): ExtensionManifest;
|
|
82
|
+
/**
|
|
83
|
+
* Return the `[run] env` map with `${env:VAR}` references expanded against the
|
|
84
|
+
* host's current environment. Unset variables expand to empty strings.
|
|
85
|
+
*/
|
|
86
|
+
export declare function resolvedEnv(manifest: ExtensionManifest): Record<string, string>;
|
|
87
|
+
/**
|
|
88
|
+
* Default global extensions directory: `$SMOOTH_HOME/extensions` if set, else
|
|
89
|
+
* `~/.smooth/extensions`.
|
|
90
|
+
*/
|
|
91
|
+
export declare function defaultGlobalDir(): string | undefined;
|
|
92
|
+
/** The project extensions directory for a workspace root. */
|
|
93
|
+
export declare function projectDir(workspaceRoot: string): string;
|
|
94
|
+
/**
|
|
95
|
+
* Discover every extension under `globalDir` and `projectDir`, merging by name
|
|
96
|
+
* with **project winning**. Either directory may be `undefined` or missing
|
|
97
|
+
* (treated as empty). Returns the chosen extensions plus a list of
|
|
98
|
+
* `(source, error)` for manifests that failed to parse — a single bad manifest
|
|
99
|
+
* never aborts discovery.
|
|
100
|
+
*/
|
|
101
|
+
export declare function discover(globalDir: string | undefined, projectDirPath: string | undefined): {
|
|
102
|
+
extensions: DiscoveredExtension[];
|
|
103
|
+
failures: ManifestFailure[];
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Expand `${env:VAR}` references using the host's current environment. Unset
|
|
107
|
+
* variables expand to empty strings. Mirrors the Rust/MCP loader so the two
|
|
108
|
+
* config surfaces behave identically.
|
|
109
|
+
*/
|
|
110
|
+
export declare function expandEnv(input: string): string;
|
|
111
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/extension/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzC,8CAA8C;AAC9C,MAAM,WAAW,OAAO;IACpB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,OAAO,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OA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G,SAAS,EAAE,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG;IAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAAC,QAAQ,EAAE,eAAe,EAAE,CAAA;CAAE,CAgB9J;AAgCD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAmB/C"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension manifests — `extension.toml` discovery, merge, and `${env:VAR}`
|
|
3
|
+
* expansion. The TS sibling of the Rust host's `extension/manifest.rs`.
|
|
4
|
+
*
|
|
5
|
+
* - An extension lives in a directory holding an `extension.toml`.
|
|
6
|
+
* - Global extensions: `~/.smooth/extensions/<name>/extension.toml`
|
|
7
|
+
* (or `$SMOOTH_HOME/extensions/...`).
|
|
8
|
+
* - Project extensions: `<workspace>/.smooth/extensions/<name>/extension.toml`.
|
|
9
|
+
* - On a name collision the **project entry wins** (the mcp.toml / plugin.toml
|
|
10
|
+
* merge rule).
|
|
11
|
+
* - `[run] env` values support `${env:VAR}` expansion so secrets stay out of the
|
|
12
|
+
* manifest.
|
|
13
|
+
* - A single malformed manifest is tolerated: it is collected as a failure and
|
|
14
|
+
* the rest still load.
|
|
15
|
+
*/
|
|
16
|
+
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
17
|
+
import { homedir } from 'node:os';
|
|
18
|
+
import { join } from 'node:path';
|
|
19
|
+
import { parse as parseToml } from 'smol-toml';
|
|
20
|
+
function asString(v, fallback = '') {
|
|
21
|
+
return typeof v === 'string' ? v : fallback;
|
|
22
|
+
}
|
|
23
|
+
function asStringArray(v) {
|
|
24
|
+
return Array.isArray(v) ? v.filter((x) => typeof x === 'string') : [];
|
|
25
|
+
}
|
|
26
|
+
function asBool(v) {
|
|
27
|
+
return v === true;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Parse a manifest from TOML text. Throws when the TOML is malformed or the
|
|
31
|
+
* required `name` / `version` / `[run] command` fields are missing — the same
|
|
32
|
+
* required set the Rust serde struct enforces.
|
|
33
|
+
*/
|
|
34
|
+
export function parseManifest(tomlText) {
|
|
35
|
+
const raw = parseToml(tomlText);
|
|
36
|
+
const name = asString(raw.name);
|
|
37
|
+
const version = asString(raw.version);
|
|
38
|
+
if (!name || !version)
|
|
39
|
+
throw new Error('extension.toml: `name` and `version` are required');
|
|
40
|
+
const runRaw = (raw.run ?? {});
|
|
41
|
+
const command = asString(runRaw.command);
|
|
42
|
+
if (!command)
|
|
43
|
+
throw new Error('extension.toml: `[run] command` is required');
|
|
44
|
+
const envRaw = (runRaw.env ?? {});
|
|
45
|
+
const env = {};
|
|
46
|
+
for (const [k, val] of Object.entries(envRaw))
|
|
47
|
+
env[k] = asString(val, String(val));
|
|
48
|
+
const capRaw = (raw.capabilities ?? {});
|
|
49
|
+
const resRaw = (raw.resources ?? {});
|
|
50
|
+
const manifest = {
|
|
51
|
+
name,
|
|
52
|
+
version,
|
|
53
|
+
protocol: typeof raw.protocol === 'number' ? raw.protocol : 1,
|
|
54
|
+
run: { command, args: asStringArray(runRaw.args), env },
|
|
55
|
+
capabilities: {
|
|
56
|
+
events: asStringArray(capRaw.events),
|
|
57
|
+
tools: asBool(capRaw.tools),
|
|
58
|
+
commands: asBool(capRaw.commands),
|
|
59
|
+
ui: asBool(capRaw.ui),
|
|
60
|
+
exec: asBool(capRaw.exec),
|
|
61
|
+
kv: asBool(capRaw.kv),
|
|
62
|
+
bus: asBool(capRaw.bus),
|
|
63
|
+
session: asBool(capRaw.session),
|
|
64
|
+
},
|
|
65
|
+
resources: {
|
|
66
|
+
skills: typeof resRaw.skills === 'string' ? resRaw.skills : undefined,
|
|
67
|
+
prompts: typeof resRaw.prompts === 'string' ? resRaw.prompts : undefined,
|
|
68
|
+
themes: typeof resRaw.themes === 'string' ? resRaw.themes : undefined,
|
|
69
|
+
},
|
|
70
|
+
disabled: asBool(raw.disabled),
|
|
71
|
+
};
|
|
72
|
+
if (typeof raw.hook_timeout_ms === 'number')
|
|
73
|
+
manifest.hookTimeoutMs = raw.hook_timeout_ms;
|
|
74
|
+
return manifest;
|
|
75
|
+
}
|
|
76
|
+
/** Load a manifest from `<dir>/extension.toml`. Throws if missing or malformed. */
|
|
77
|
+
export function loadManifestDir(dir) {
|
|
78
|
+
const path = join(dir, 'extension.toml');
|
|
79
|
+
return parseManifest(readFileSync(path, 'utf8'));
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Return the `[run] env` map with `${env:VAR}` references expanded against the
|
|
83
|
+
* host's current environment. Unset variables expand to empty strings.
|
|
84
|
+
*/
|
|
85
|
+
export function resolvedEnv(manifest) {
|
|
86
|
+
const out = {};
|
|
87
|
+
for (const [k, v] of Object.entries(manifest.run.env))
|
|
88
|
+
out[k] = expandEnv(v);
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Default global extensions directory: `$SMOOTH_HOME/extensions` if set, else
|
|
93
|
+
* `~/.smooth/extensions`.
|
|
94
|
+
*/
|
|
95
|
+
export function defaultGlobalDir() {
|
|
96
|
+
const home = process.env.SMOOTH_HOME;
|
|
97
|
+
if (home)
|
|
98
|
+
return join(home, 'extensions');
|
|
99
|
+
const h = homedir();
|
|
100
|
+
return h ? join(h, '.smooth', 'extensions') : undefined;
|
|
101
|
+
}
|
|
102
|
+
/** The project extensions directory for a workspace root. */
|
|
103
|
+
export function projectDir(workspaceRoot) {
|
|
104
|
+
return join(workspaceRoot, '.smooth', 'extensions');
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Discover every extension under `globalDir` and `projectDir`, merging by name
|
|
108
|
+
* with **project winning**. Either directory may be `undefined` or missing
|
|
109
|
+
* (treated as empty). Returns the chosen extensions plus a list of
|
|
110
|
+
* `(source, error)` for manifests that failed to parse — a single bad manifest
|
|
111
|
+
* never aborts discovery.
|
|
112
|
+
*/
|
|
113
|
+
export function discover(globalDir, projectDirPath) {
|
|
114
|
+
const failures = [];
|
|
115
|
+
const byName = new Map();
|
|
116
|
+
// Global first, then project, so project overwrites on name collision.
|
|
117
|
+
for (const [dir, scope] of [
|
|
118
|
+
[globalDir, 'global'],
|
|
119
|
+
[projectDirPath, 'project'],
|
|
120
|
+
]) {
|
|
121
|
+
if (!dir)
|
|
122
|
+
continue;
|
|
123
|
+
for (const found of scanDir(dir, scope, failures))
|
|
124
|
+
byName.set(found.manifest.name, found);
|
|
125
|
+
}
|
|
126
|
+
// Stable order so load-order-dependent hook chaining is deterministic.
|
|
127
|
+
const extensions = [...byName.values()].sort((a, b) => a.manifest.name.localeCompare(b.manifest.name));
|
|
128
|
+
return { extensions, failures };
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Scan a single extensions directory: each immediate subdirectory holding an
|
|
132
|
+
* `extension.toml` is one extension.
|
|
133
|
+
*/
|
|
134
|
+
function scanDir(dir, scope, failures) {
|
|
135
|
+
const out = [];
|
|
136
|
+
let entries;
|
|
137
|
+
try {
|
|
138
|
+
entries = readdirSync(dir);
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
// Missing dir is not an error — just no extensions from this scope.
|
|
142
|
+
return out;
|
|
143
|
+
}
|
|
144
|
+
for (const entry of entries) {
|
|
145
|
+
const root = join(dir, entry);
|
|
146
|
+
try {
|
|
147
|
+
if (!statSync(root).isDirectory())
|
|
148
|
+
continue;
|
|
149
|
+
if (!statSync(join(root, 'extension.toml')).isFile())
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
try {
|
|
156
|
+
out.push({ manifest: loadManifestDir(root), root, scope });
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
failures.push([root, e instanceof Error ? e.message : String(e)]);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return out;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Expand `${env:VAR}` references using the host's current environment. Unset
|
|
166
|
+
* variables expand to empty strings. Mirrors the Rust/MCP loader so the two
|
|
167
|
+
* config surfaces behave identically.
|
|
168
|
+
*/
|
|
169
|
+
export function expandEnv(input) {
|
|
170
|
+
let out = '';
|
|
171
|
+
let rest = input;
|
|
172
|
+
for (;;) {
|
|
173
|
+
const idx = rest.indexOf('${env:');
|
|
174
|
+
if (idx === -1)
|
|
175
|
+
break;
|
|
176
|
+
out += rest.slice(0, idx);
|
|
177
|
+
const after = rest.slice(idx + 6);
|
|
178
|
+
const end = after.indexOf('}');
|
|
179
|
+
if (end === -1) {
|
|
180
|
+
// Unterminated reference — keep it verbatim and stop.
|
|
181
|
+
out += rest.slice(idx);
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
const varName = after.slice(0, end);
|
|
185
|
+
out += process.env[varName] ?? '';
|
|
186
|
+
rest = after.slice(end + 1);
|
|
187
|
+
}
|
|
188
|
+
return out + rest;
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/extension/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAmE/C,SAAS,QAAQ,CAAC,CAAU,EAAE,QAAQ,GAAG,EAAE;IACvC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AAChD,CAAC;AAED,SAAS,aAAa,CAAC,CAAU;IAC7B,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,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AC;QAClC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,GAAG,GAAG,IAAI,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ExtensionProcess` — one extension subprocess, its ndjson codec, and its
|
|
3
|
+
* request/response plumbing. The TS sibling of the Rust host's
|
|
4
|
+
* `extension/process.rs`.
|
|
5
|
+
*
|
|
6
|
+
* Framing is identical to MCP stdio: one JSON-RPC message per line on the child's
|
|
7
|
+
* stdin/stdout, stderr drained to host logging. Inbound responses route to their
|
|
8
|
+
* pending caller; inbound requests go to an {@link InboundHandler}.
|
|
9
|
+
*
|
|
10
|
+
* Restart is in-place ({@link ExtensionProcess.respawn}): a generation counter is
|
|
11
|
+
* bumped so a stale reader from the dead child can't resolve a request registered
|
|
12
|
+
* against the new child, and every in-flight request fails fast.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Backoff schedule (ms) for restart attempts. After the third failed attempt the
|
|
16
|
+
* host marks the extension failed and stops trying.
|
|
17
|
+
*/
|
|
18
|
+
export declare const RESTART_BACKOFFS_MS: readonly number[];
|
|
19
|
+
/** Idle interval (ms) after which the host should health-probe with `ping`. */
|
|
20
|
+
export declare const PING_IDLE_MS = 60000;
|
|
21
|
+
/**
|
|
22
|
+
* Bounded depth of the per-connection observe (`event`) lane. When a slow or
|
|
23
|
+
* stalled extension lets events pile past this, the OLDEST are shed and an
|
|
24
|
+
* `events_lost` marker is delivered on recovery — observe events are lossy by
|
|
25
|
+
* contract. Requests (hook/tool/ping/shutdown) are NEVER shed; they ride the
|
|
26
|
+
* reliable control lane (a direct stdin write).
|
|
27
|
+
*/
|
|
28
|
+
export declare const OBSERVE_QUEUE_CAP = 1024;
|
|
29
|
+
/**
|
|
30
|
+
* Backoff (ms) for restart `attempt` (0-indexed). `undefined` once attempts are
|
|
31
|
+
* exhausted — the caller transitions the extension to failed.
|
|
32
|
+
*/
|
|
33
|
+
export declare function backoffFor(attempt: number): number | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Handles ext→host requests and notifications. The default answers `ping` and
|
|
36
|
+
* rejects everything else with MethodNotFound; the host supplies a richer impl
|
|
37
|
+
* once ext→host methods (session/ui/kv/…) are wired.
|
|
38
|
+
*/
|
|
39
|
+
export interface InboundHandler {
|
|
40
|
+
handleRequest(method: string, params: unknown): Promise<unknown>;
|
|
41
|
+
handleNotification(method: string, params: unknown): void;
|
|
42
|
+
}
|
|
43
|
+
/** The trivial handler: ping only. Used when the host wires nothing richer. */
|
|
44
|
+
export declare class DefaultInboundHandler implements InboundHandler {
|
|
45
|
+
handleRequest(method: string, _params: unknown): Promise<unknown>;
|
|
46
|
+
handleNotification(_method: string, _params: unknown): void;
|
|
47
|
+
}
|
|
48
|
+
/** How to launch the subprocess. The manifest owns the full shape; this is what `spawn` needs. */
|
|
49
|
+
export interface SpawnSpec {
|
|
50
|
+
command: string;
|
|
51
|
+
args: string[];
|
|
52
|
+
env: Record<string, string>;
|
|
53
|
+
/** Working directory for the child (the extension's root). */
|
|
54
|
+
cwd?: string;
|
|
55
|
+
}
|
|
56
|
+
/** One extension subprocess. */
|
|
57
|
+
export declare class ExtensionProcess {
|
|
58
|
+
private readonly spec;
|
|
59
|
+
private readonly handler;
|
|
60
|
+
private readonly pending;
|
|
61
|
+
private generation;
|
|
62
|
+
private nextId;
|
|
63
|
+
private alive;
|
|
64
|
+
private conn;
|
|
65
|
+
private constructor();
|
|
66
|
+
/** Spawn the subprocess and start its reader. Throws if it can't be spawned. */
|
|
67
|
+
static spawn(spec: SpawnSpec, handler: InboundHandler): ExtensionProcess;
|
|
68
|
+
private startConnection;
|
|
69
|
+
/** Parse and route one inbound line. */
|
|
70
|
+
private dispatchLine;
|
|
71
|
+
private handleInboundRequest;
|
|
72
|
+
/**
|
|
73
|
+
* Send a request and await its response, bounded by `timeoutMs`. Rejects if
|
|
74
|
+
* the connection is dead, the request times out (it also sends `$/cancel`), or
|
|
75
|
+
* the extension replies with a JSON-RPC error.
|
|
76
|
+
*/
|
|
77
|
+
request(method: string, params: unknown, timeoutMs: number): Promise<unknown>;
|
|
78
|
+
/**
|
|
79
|
+
* Best-effort `$/cancel` for an in-flight request `id`. The peer SHOULD stop
|
|
80
|
+
* work; a cancel for an already-answered id is a harmless no-op.
|
|
81
|
+
*/
|
|
82
|
+
cancel(id: number): void;
|
|
83
|
+
/** Send a fire-and-forget notification on the reliable control lane. */
|
|
84
|
+
notify(method: string, params: unknown): void;
|
|
85
|
+
/**
|
|
86
|
+
* Enqueue an observe `event` on the bounded, lossy lane. Assigns the frame a
|
|
87
|
+
* per-connection sequence; sheds the oldest queued event (tracked for the next
|
|
88
|
+
* `events_lost` marker) rather than block or grow unbounded when the extension
|
|
89
|
+
* is not draining its stdin. Never throws — a shed event is the contract.
|
|
90
|
+
*/
|
|
91
|
+
sendEvent(event: string, context: unknown, payload: unknown): void;
|
|
92
|
+
/** Whether the connection is currently believed alive. */
|
|
93
|
+
isAlive(): boolean;
|
|
94
|
+
/** Current generation (increments on every successful respawn). */
|
|
95
|
+
getGeneration(): number;
|
|
96
|
+
/** Health-probe with `ping`; resolves `true` if answered within `timeoutMs`. */
|
|
97
|
+
pingHealth(timeoutMs: number): Promise<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* Kill and re-spawn the child in place. Bumps the generation (invalidating any
|
|
100
|
+
* stale reader and failing every in-flight request), then starts a fresh
|
|
101
|
+
* connection. `nextId` is NOT reset, so ids never collide across generations.
|
|
102
|
+
*/
|
|
103
|
+
respawn(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Graceful shutdown: send `shutdown`, wait up to `graceMs` for the reply, then
|
|
106
|
+
* force-kill. Always leaves the process dead.
|
|
107
|
+
*/
|
|
108
|
+
shutdown(graceMs: number): Promise<void>;
|
|
109
|
+
/** Serialize a frame as ndjson to the child stdin. Returns false on any error. */
|
|
110
|
+
private writeFrame;
|
|
111
|
+
/** Drain the observe lane to stdin, honoring backpressure via `drain`. */
|
|
112
|
+
private pumpObserve;
|
|
113
|
+
/** Fail every pending request with the same error message. */
|
|
114
|
+
private failAllPending;
|
|
115
|
+
/** Tear down the current connection's child + readers. */
|
|
116
|
+
private abortConnection;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/extension/process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAwB,CAAC;AAE1E,+EAA+E;AAC/E,eAAO,MAAM,YAAY,QAAS,CAAC;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE9D;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7D;AAED,+EAA+E;AAC/E,qBAAa,qBAAsB,YAAW,cAAc;IAClD,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvE,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;CAC9D;AAED,kGAAkG;AAClG,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,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