@vibefield/puppeteer-adapter-claude 0.3.4 → 0.4.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/dist/detection.d.ts +28 -3
- package/dist/detection.d.ts.map +1 -1
- package/dist/detection.js +107 -20
- package/dist/detection.js.map +1 -1
- package/dist/driver.d.ts +25 -4
- package/dist/driver.d.ts.map +1 -1
- package/dist/driver.js +162 -119
- package/dist/driver.js.map +1 -1
- package/dist/generated/forwarder-source.d.ts +6 -0
- package/dist/generated/forwarder-source.d.ts.map +1 -0
- package/dist/generated/forwarder-source.js +8 -0
- package/dist/generated/forwarder-source.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/launch/config-root.d.ts +24 -0
- package/dist/launch/config-root.d.ts.map +1 -0
- package/dist/launch/config-root.js +24 -0
- package/dist/launch/config-root.js.map +1 -0
- package/dist/launch/forwarder.d.ts +25 -0
- package/dist/launch/forwarder.d.ts.map +1 -0
- package/dist/launch/forwarder.js +112 -0
- package/dist/launch/forwarder.js.map +1 -0
- package/dist/launch/prepare.d.ts +28 -6
- package/dist/launch/prepare.d.ts.map +1 -1
- package/dist/launch/prepare.js +75 -84
- package/dist/launch/prepare.js.map +1 -1
- package/dist/launch/settings.d.ts +12 -8
- package/dist/launch/settings.d.ts.map +1 -1
- package/dist/launch/settings.js +12 -22
- package/dist/launch/settings.js.map +1 -1
- package/dist/normalization/pipeline.d.ts +34 -8
- package/dist/normalization/pipeline.d.ts.map +1 -1
- package/dist/normalization/pipeline.js +131 -50
- package/dist/normalization/pipeline.js.map +1 -1
- package/dist/normalization/types.d.ts +21 -0
- package/dist/normalization/types.d.ts.map +1 -1
- package/dist/observation/bounded-json.d.ts +54 -0
- package/dist/observation/bounded-json.d.ts.map +1 -0
- package/dist/observation/bounded-json.js +511 -0
- package/dist/observation/bounded-json.js.map +1 -0
- package/dist/observation/hook-bridge.d.ts +25 -6
- package/dist/observation/hook-bridge.d.ts.map +1 -1
- package/dist/observation/hook-bridge.js +43 -30
- package/dist/observation/hook-bridge.js.map +1 -1
- package/dist/observation/session-selection.d.ts +59 -0
- package/dist/observation/session-selection.d.ts.map +1 -0
- package/dist/observation/session-selection.js +144 -0
- package/dist/observation/session-selection.js.map +1 -0
- package/dist/observation/status-channel.d.ts +0 -6
- package/dist/observation/status-channel.d.ts.map +1 -1
- package/dist/observation/status-channel.js +0 -54
- package/dist/observation/status-channel.js.map +1 -1
- package/dist/observation/transcript/conversation.d.ts +123 -2
- package/dist/observation/transcript/conversation.d.ts.map +1 -1
- package/dist/observation/transcript/conversation.js +390 -56
- package/dist/observation/transcript/conversation.js.map +1 -1
- package/dist/observation/transcript/provider.d.ts.map +1 -1
- package/dist/observation/transcript/provider.js +35 -24
- package/dist/observation/transcript/provider.js.map +1 -1
- package/dist/observation/transcript/services/jsonl-reader.d.ts +7 -1
- package/dist/observation/transcript/services/jsonl-reader.d.ts.map +1 -1
- package/dist/observation/transcript/services/jsonl-reader.js +26 -16
- package/dist/observation/transcript/services/jsonl-reader.js.map +1 -1
- package/dist/observation/transcript/wire.d.ts +26 -2
- package/dist/observation/transcript/wire.d.ts.map +1 -1
- package/dist/observation/transcript/wire.js +52 -9
- package/dist/observation/transcript/wire.js.map +1 -1
- package/dist/services/account-usage.d.ts +26 -19
- package/dist/services/account-usage.d.ts.map +1 -1
- package/dist/services/account-usage.js +25 -43
- package/dist/services/account-usage.js.map +1 -1
- package/dist/services/profiles.d.ts.map +1 -1
- package/dist/services/profiles.js +10 -4
- package/dist/services/profiles.js.map +1 -1
- package/dist/services/prompt.js +1 -1
- package/dist/services/prompt.js.map +1 -1
- package/package.json +11 -6
package/dist/index.d.ts
CHANGED
|
@@ -14,11 +14,12 @@ export * from './launch/hook-switches.js';
|
|
|
14
14
|
export * from './launch/invocation-grammar.js';
|
|
15
15
|
export * from './launch/native-invocation.js';
|
|
16
16
|
export * from './launch/briefing.js';
|
|
17
|
+
export * from './launch/config-root.js';
|
|
17
18
|
export * from './observation/status-channel.js';
|
|
18
19
|
export * from './observation/semantic-provider.js';
|
|
19
20
|
export * from './observation/otel/index.js';
|
|
20
21
|
export * from './observation/transcript/index.js';
|
|
21
|
-
export { CLAUDE_OAUTH_BETA, CLAUDE_OAUTH_CLIENT_ID, CLAUDE_OAUTH_TOKEN_ENDPOINT, CLAUDE_ACCOUNT_USAGE_PROVIDER, CLAUDE_USAGE_ENDPOINT, claudeAccountUsageFromStatusLine, claudeKeychainService, createClaudeAccountUsageService, fetchClaudeAccountUsage, fetchClaudeAccountUsageForProfile,
|
|
22
|
+
export { CLAUDE_OAUTH_BETA, CLAUDE_OAUTH_CLIENT_ID, CLAUDE_OAUTH_TOKEN_ENDPOINT, CLAUDE_ACCOUNT_USAGE_PROVIDER, CLAUDE_USAGE_ENDPOINT, claudeAccountUsageFromStatusLine, claudeKeychainService, createClaudeAccountUsageService, fetchClaudeAccountUsage, fetchClaudeAccountUsageForProfile, normalizeClaudeAccountUsage, type ClaudeAccountUsageService, type ClaudeAccountUsageSink, type FetchClaudeAccountUsageOptions, } from './services/account-usage.js';
|
|
22
23
|
export * from './services/prompt.js';
|
|
23
24
|
export * from './services/distribution.js';
|
|
24
25
|
export * from './services/profiles.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,qBAAqB,EACrB,gCAAgC,EAChC,qBAAqB,EACrB,+BAA+B,EAC/B,uBAAuB,EACvB,iCAAiC,EACjC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,qBAAqB,EACrB,gCAAgC,EAChC,qBAAqB,EACrB,+BAA+B,EAC/B,uBAAuB,EACvB,iCAAiC,EACjC,2BAA2B,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,GACpC,MAAM,6BAA6B,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,11 +14,12 @@ export * from './launch/hook-switches.js';
|
|
|
14
14
|
export * from './launch/invocation-grammar.js';
|
|
15
15
|
export * from './launch/native-invocation.js';
|
|
16
16
|
export * from './launch/briefing.js';
|
|
17
|
+
export * from './launch/config-root.js';
|
|
17
18
|
export * from './observation/status-channel.js';
|
|
18
19
|
export * from './observation/semantic-provider.js';
|
|
19
20
|
export * from './observation/otel/index.js';
|
|
20
21
|
export * from './observation/transcript/index.js';
|
|
21
|
-
export { CLAUDE_OAUTH_BETA, CLAUDE_OAUTH_CLIENT_ID, CLAUDE_OAUTH_TOKEN_ENDPOINT, CLAUDE_ACCOUNT_USAGE_PROVIDER, CLAUDE_USAGE_ENDPOINT, claudeAccountUsageFromStatusLine, claudeKeychainService, createClaudeAccountUsageService, fetchClaudeAccountUsage, fetchClaudeAccountUsageForProfile,
|
|
22
|
+
export { CLAUDE_OAUTH_BETA, CLAUDE_OAUTH_CLIENT_ID, CLAUDE_OAUTH_TOKEN_ENDPOINT, CLAUDE_ACCOUNT_USAGE_PROVIDER, CLAUDE_USAGE_ENDPOINT, claudeAccountUsageFromStatusLine, claudeKeychainService, createClaudeAccountUsageService, fetchClaudeAccountUsage, fetchClaudeAccountUsageForProfile, normalizeClaudeAccountUsage, } from './services/account-usage.js';
|
|
22
23
|
export * from './services/prompt.js';
|
|
23
24
|
export * from './services/distribution.js';
|
|
24
25
|
export * from './services/profiles.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,qBAAqB,EACrB,gCAAgC,EAChC,qBAAqB,EACrB,+BAA+B,EAC/B,uBAAuB,EACvB,iCAAiC,EACjC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,qBAAqB,EACrB,gCAAgC,EAChC,qBAAqB,EACrB,+BAA+B,EAC/B,uBAAuB,EACvB,iCAAiC,EACjC,2BAA2B,GAI5B,MAAM,6BAA6B,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a Claude process keeps its configuration and conversations, read one way by a launch (its settings layers,
|
|
3
|
+
* the CLAUDE_CONFIG_DIR it is given, a resume's check), an attach and the transcript pin (session-selection.ts).
|
|
4
|
+
*
|
|
5
|
+
* The config dir is an explicit one, else the launch environment's CLAUDE_CONFIG_DIR, which the process inherits,
|
|
6
|
+
* else this process's. Claude interprets a relative one from the launched process's cwd, so it is resolved at that
|
|
7
|
+
* boundary: an Electron or daemon cwd never selects another root. With none named, Claude uses `<home>/.claude`. The
|
|
8
|
+
* imposter keeps the same layout under its own state root (`PUPPETEER_IMPOSTER_HOME`).
|
|
9
|
+
*/
|
|
10
|
+
export interface ClaudeConfigRootOptions {
|
|
11
|
+
/** The launched process's working directory. */
|
|
12
|
+
cwd: string;
|
|
13
|
+
/** An explicit config dir (a typed launch's or a profile's). */
|
|
14
|
+
configDir?: string | undefined;
|
|
15
|
+
/** The launch environment, which the process inherits. */
|
|
16
|
+
env?: Readonly<Record<string, string>> | undefined;
|
|
17
|
+
/** The home `.claude` hangs off when no config dir is named; this process's when absent. */
|
|
18
|
+
home?: string | undefined;
|
|
19
|
+
}
|
|
20
|
+
/** The config dir a launch hands Claude, resolved; undefined when none is named. */
|
|
21
|
+
export declare function claudeConfigDirectory(options: ClaudeConfigRootOptions): string | undefined;
|
|
22
|
+
/** The root Claude keeps a conversation under, as `projects/<cwd slug>/<session id>.jsonl`. */
|
|
23
|
+
export declare function claudeConfigRoot(options: ClaudeConfigRootOptions): string;
|
|
24
|
+
//# sourceMappingURL=config-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-root.d.ts","sourceRoot":"","sources":["../../src/launch/config-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,0DAA0D;IAC1D,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;IACnD,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,oFAAoF;AACpF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAG1F;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAIzE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a Claude process keeps its configuration and conversations, read one way by a launch (its settings layers,
|
|
3
|
+
* the CLAUDE_CONFIG_DIR it is given, a resume's check), an attach and the transcript pin (session-selection.ts).
|
|
4
|
+
*
|
|
5
|
+
* The config dir is an explicit one, else the launch environment's CLAUDE_CONFIG_DIR, which the process inherits,
|
|
6
|
+
* else this process's. Claude interprets a relative one from the launched process's cwd, so it is resolved at that
|
|
7
|
+
* boundary: an Electron or daemon cwd never selects another root. With none named, Claude uses `<home>/.claude`. The
|
|
8
|
+
* imposter keeps the same layout under its own state root (`PUPPETEER_IMPOSTER_HOME`).
|
|
9
|
+
*/
|
|
10
|
+
import { homedir } from 'node:os';
|
|
11
|
+
import { join, resolve } from 'node:path';
|
|
12
|
+
/** The config dir a launch hands Claude, resolved; undefined when none is named. */
|
|
13
|
+
export function claudeConfigDirectory(options) {
|
|
14
|
+
const named = (options.configDir ?? options.env?.CLAUDE_CONFIG_DIR ?? process.env.CLAUDE_CONFIG_DIR)?.trim();
|
|
15
|
+
return named ? resolve(options.cwd, named) : undefined;
|
|
16
|
+
}
|
|
17
|
+
/** The root Claude keeps a conversation under, as `projects/<cwd slug>/<session id>.jsonl`. */
|
|
18
|
+
export function claudeConfigRoot(options) {
|
|
19
|
+
const imposterHome = options.env?.PUPPETEER_IMPOSTER_HOME;
|
|
20
|
+
if (imposterHome !== undefined)
|
|
21
|
+
return resolve(options.cwd, imposterHome);
|
|
22
|
+
return claudeConfigDirectory(options) ?? join(options.home ?? homedir(), '.claude');
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=config-root.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-root.js","sourceRoot":"","sources":["../../src/launch/config-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAa1C,oFAAoF;AACpF,MAAM,UAAU,qBAAqB,CAAC,OAAgC;IACpE,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,CAAC;IAC7G,OAAO,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,gBAAgB,CAAC,OAAgC;IAC/D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,uBAAuB,CAAC;IAC1D,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC1E,OAAO,qBAAqB,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** `claude.hook.v1 <endpoint> <token variable> <timeout ms>`, the hook's JSON on stdin. */
|
|
2
|
+
export declare const CLAUDE_HOOK_FORWARDER_WORD = "claude.hook.v1";
|
|
3
|
+
/** `claude.statusline.v1 [subagent]`, the line's JSON on stdin; its endpoint and delegate ride the environment. */
|
|
4
|
+
export declare const CLAUDE_STATUS_LINE_FORWARDER_WORD = "claude.statusline.v1";
|
|
5
|
+
/** The status-line word's one argument: the child (task) line rather than the root line. */
|
|
6
|
+
export declare const CLAUDE_STATUS_LINE_SUBAGENT = "subagent";
|
|
7
|
+
/** A word this forwarder does not know: the shell's own code for a command it cannot find. */
|
|
8
|
+
export declare const CLAUDE_FORWARDER_EXIT_UNKNOWN_WORD = 127;
|
|
9
|
+
/** What one run of the forwarder reads and writes: the process's own, or a test's. */
|
|
10
|
+
export interface ClaudeForwarderIo {
|
|
11
|
+
/** Claude's JSON document for one hook or one status-line refresh. */
|
|
12
|
+
stdin: AsyncIterable<string | Uint8Array>;
|
|
13
|
+
env: NodeJS.ProcessEnv;
|
|
14
|
+
/** Where the person's own status line runs. */
|
|
15
|
+
cwd: string;
|
|
16
|
+
/** One line, for a word this forwarder does not know. */
|
|
17
|
+
stderr: {
|
|
18
|
+
write(text: string): unknown;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Every word this forwarder has shipped, in the order it shipped them. */
|
|
22
|
+
export declare const CLAUDE_FORWARDER_WORDS: readonly string[];
|
|
23
|
+
/** Run one forwarder invocation, `<word> <word args...>`, and answer its exit code. */
|
|
24
|
+
export declare function runClaudeForwarder(argv: readonly string[], io?: ClaudeForwarderIo): Promise<number>;
|
|
25
|
+
//# sourceMappingURL=forwarder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forwarder.d.ts","sourceRoot":"","sources":["../../src/launch/forwarder.ts"],"names":[],"mappings":"AAiBA,2FAA2F;AAC3F,eAAO,MAAM,0BAA0B,mBAAmB,CAAC;AAC3D,mHAAmH;AACnH,eAAO,MAAM,iCAAiC,yBAAyB,CAAC;AACxE,4FAA4F;AAC5F,eAAO,MAAM,2BAA2B,aAAa,CAAC;AACtD,8FAA8F;AAC9F,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD,sFAAsF;AACtF,MAAM,WAAW,iBAAiB;IAChC,sEAAsE;IACtE,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC;IAC1C,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,yDAAyD;IACzD,MAAM,EAAE;QAAE,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAC1C;AAgFD,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAuB,CAAC;AAM5E,uFAAuF;AACvF,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,GAAE,iBAA+B,GAClC,OAAO,CAAC,MAAM,CAAC,CAQjB"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Claude forwarder: the one program Claude runs in the agent's process tree for the hooks it can only run as
|
|
3
|
+
* commands and for both status lines. It relays what Claude writes on its stdin to the session's loopback bridge,
|
|
4
|
+
* with the bearer read from the environment by name, never from an argument; for a status line it also runs the
|
|
5
|
+
* person's own line beside it and answers with that line's output and exit.
|
|
6
|
+
*
|
|
7
|
+
* Self-contained by design: Node's builtins only, no relative import. The same code reaches a process three ways:
|
|
8
|
+
* transpiled into the forwarder a launch stages (`generated/forwarder-source.ts`, run by this process's script
|
|
9
|
+
* runner), sealed by a host into its own executable through `@vibefield/puppeteer-builtin-providers/forwarder` (core
|
|
10
|
+
* `AgentHost.forwarderRuntime`), and imported by tests.
|
|
11
|
+
*
|
|
12
|
+
* The first argument is a versioned word, a protocol across releases: a Claude launched by one build runs the
|
|
13
|
+
* forwarder a later build ships once its host has updated in place. The table is append-only. A shipped word keeps
|
|
14
|
+
* its arguments and meaning; a change is a new word.
|
|
15
|
+
*/
|
|
16
|
+
import { spawn } from 'node:child_process';
|
|
17
|
+
/** `claude.hook.v1 <endpoint> <token variable> <timeout ms>`, the hook's JSON on stdin. */
|
|
18
|
+
export const CLAUDE_HOOK_FORWARDER_WORD = 'claude.hook.v1';
|
|
19
|
+
/** `claude.statusline.v1 [subagent]`, the line's JSON on stdin; its endpoint and delegate ride the environment. */
|
|
20
|
+
export const CLAUDE_STATUS_LINE_FORWARDER_WORD = 'claude.statusline.v1';
|
|
21
|
+
/** The status-line word's one argument: the child (task) line rather than the root line. */
|
|
22
|
+
export const CLAUDE_STATUS_LINE_SUBAGENT = 'subagent';
|
|
23
|
+
/** A word this forwarder does not know: the shell's own code for a command it cannot find. */
|
|
24
|
+
export const CLAUDE_FORWARDER_EXIT_UNKNOWN_WORD = 127;
|
|
25
|
+
async function readInput(stdin) {
|
|
26
|
+
const chunks = [];
|
|
27
|
+
for await (const chunk of stdin) {
|
|
28
|
+
chunks.push(typeof chunk === 'string' ? Buffer.from(chunk, 'utf8') : Buffer.from(chunk));
|
|
29
|
+
}
|
|
30
|
+
// Decoded once, whole: a character split across two reads stays one character.
|
|
31
|
+
return Buffer.concat(chunks).toString('utf8');
|
|
32
|
+
}
|
|
33
|
+
/** A command-only hook: POST the hook's document to the bridge; 0 when it took it, 1 when not, 2 when unarmed. */
|
|
34
|
+
const relayHook = async ([endpoint, tokenEnvVar, timeoutText], io) => {
|
|
35
|
+
const input = await readInput(io.stdin);
|
|
36
|
+
const token = tokenEnvVar ? io.env[tokenEnvVar] : undefined;
|
|
37
|
+
if (!endpoint || !tokenEnvVar || !token)
|
|
38
|
+
return 2;
|
|
39
|
+
try {
|
|
40
|
+
const response = await fetch(endpoint, {
|
|
41
|
+
method: 'POST',
|
|
42
|
+
headers: { 'content-type': 'application/json', authorization: `Bearer ${token}` },
|
|
43
|
+
body: input,
|
|
44
|
+
signal: AbortSignal.timeout(Number(timeoutText)),
|
|
45
|
+
});
|
|
46
|
+
return response.ok ? 0 : 1;
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return 1;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* A status line: report the line's document as telemetry and run the person's original line concurrently, relaying
|
|
54
|
+
* its output and exit without interpreting them. The telemetry never holds the line up beyond its bound.
|
|
55
|
+
*/
|
|
56
|
+
const relayStatusLine = async ([channel], io) => {
|
|
57
|
+
const input = await readInput(io.stdin);
|
|
58
|
+
const child = channel === CLAUDE_STATUS_LINE_SUBAGENT;
|
|
59
|
+
const endpoint = io.env[child ? 'PUPPETEER_SUBAGENT_STATUSLINE_ENDPOINT' : 'PUPPETEER_STATUSLINE_ENDPOINT'];
|
|
60
|
+
const delegateCommand = io.env[child ? 'PUPPETEER_SUBAGENT_STATUSLINE_DELEGATE' : 'PUPPETEER_STATUSLINE_DELEGATE'];
|
|
61
|
+
const tokenEnvVar = io.env.PUPPETEER_STATUSLINE_TOKEN_ENV_VAR;
|
|
62
|
+
const token = tokenEnvVar ? io.env[tokenEnvVar] : undefined;
|
|
63
|
+
const configuredTimeout = Number(io.env.PUPPETEER_STATUSLINE_TIMEOUT_MS);
|
|
64
|
+
const telemetryTimeoutMs = Number.isFinite(configuredTimeout) && configuredTimeout >= 50 && configuredTimeout <= 5000
|
|
65
|
+
? configuredTimeout
|
|
66
|
+
: 250;
|
|
67
|
+
const telemetry = endpoint && token
|
|
68
|
+
? fetch(endpoint, {
|
|
69
|
+
method: 'POST',
|
|
70
|
+
headers: { 'content-type': 'application/json', authorization: `Bearer ${token}` },
|
|
71
|
+
body: input,
|
|
72
|
+
signal: AbortSignal.timeout(telemetryTimeoutMs),
|
|
73
|
+
}).catch(() => undefined)
|
|
74
|
+
: Promise.resolve(undefined);
|
|
75
|
+
const delegate = delegateCommand
|
|
76
|
+
? new Promise((resolve) => {
|
|
77
|
+
const line = spawn(delegateCommand, {
|
|
78
|
+
shell: true,
|
|
79
|
+
cwd: io.cwd,
|
|
80
|
+
env: io.env,
|
|
81
|
+
stdio: ['pipe', 'inherit', 'inherit'],
|
|
82
|
+
});
|
|
83
|
+
line.once('error', () => resolve(1));
|
|
84
|
+
line.once('close', (code) => resolve(code ?? 1));
|
|
85
|
+
// A line that exits without reading its input closes the pipe under the write: its exit is the answer.
|
|
86
|
+
line.stdin.on('error', () => undefined);
|
|
87
|
+
line.stdin.end(input);
|
|
88
|
+
})
|
|
89
|
+
: Promise.resolve(0);
|
|
90
|
+
const [, code] = await Promise.all([telemetry, delegate]);
|
|
91
|
+
return code;
|
|
92
|
+
};
|
|
93
|
+
const RELAYS = new Map([
|
|
94
|
+
[CLAUDE_HOOK_FORWARDER_WORD, relayHook],
|
|
95
|
+
[CLAUDE_STATUS_LINE_FORWARDER_WORD, relayStatusLine],
|
|
96
|
+
]);
|
|
97
|
+
/** Every word this forwarder has shipped, in the order it shipped them. */
|
|
98
|
+
export const CLAUDE_FORWARDER_WORDS = [...RELAYS.keys()];
|
|
99
|
+
function processIo() {
|
|
100
|
+
return { stdin: process.stdin, env: process.env, cwd: process.cwd(), stderr: process.stderr };
|
|
101
|
+
}
|
|
102
|
+
/** Run one forwarder invocation, `<word> <word args...>`, and answer its exit code. */
|
|
103
|
+
export async function runClaudeForwarder(argv, io = processIo()) {
|
|
104
|
+
const [word, ...args] = argv;
|
|
105
|
+
const relay = word === undefined ? undefined : RELAYS.get(word);
|
|
106
|
+
if (relay === undefined) {
|
|
107
|
+
io.stderr.write('puppeteer: this Claude forwarder does not know the word it was given; nothing was forwarded.\n');
|
|
108
|
+
return CLAUDE_FORWARDER_EXIT_UNKNOWN_WORD;
|
|
109
|
+
}
|
|
110
|
+
return relay(args, io);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=forwarder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forwarder.js","sourceRoot":"","sources":["../../src/launch/forwarder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,2FAA2F;AAC3F,MAAM,CAAC,MAAM,0BAA0B,GAAG,gBAAgB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O,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,MAAM,GAA+B,IAAI,GAAG,CAAgB;IAChE,CAAC,0BAA0B,EAAE,SAAS,CAAC;IACvC,CAAC,iCAAiC,EAAE,eAAe,CAAC;CACrD,CAAC,CAAC;AAEH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAsB,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAE5E,SAAS,SAAS;IAChB,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AAChG,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,IAAuB,EACvB,KAAwB,SAAS,EAAE;IAEnC,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7B,MAAM,KAAK,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,gGAAgG,CAAC,CAAC;QAClH,OAAO,kCAAkC,CAAC;IAC5C,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACzB,CAAC"}
|
package/dist/launch/prepare.d.ts
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* OTLP records and transcripts, writes the generated hook
|
|
5
5
|
* settings to a per-session file, and builds the interactive spawn command.
|
|
6
6
|
*
|
|
7
|
+
* Every command hook and status line runs one forwarder (launch/forwarder.ts):
|
|
8
|
+
* the host's lent runtime (core `AgentHost.forwarderRuntime`), or this
|
|
9
|
+
* process's script runner on one staged copy. The choice is made once, before
|
|
10
|
+
* anything is written; a process that has neither refuses the launch.
|
|
11
|
+
*
|
|
7
12
|
* The command is native-interactive ONLY (§16.3): never -p/--print/
|
|
8
13
|
* --output-format/--input-format — those select structured print mode, a
|
|
9
14
|
* different process class. A typed launch's own arguments ride after the
|
|
@@ -11,7 +16,8 @@
|
|
|
11
16
|
* VALUE rides `env` (injected into the process, resolved by Claude's env
|
|
12
17
|
* interpolation), never the on-disk settings.
|
|
13
18
|
*/
|
|
14
|
-
import { AgentLaunchRefusedError, type AgentRunBriefing } from '@vibefield/puppeteer-core';
|
|
19
|
+
import { AgentLaunchRefusedError, type AgentForwarderRuntime, type AgentRunBriefing } from '@vibefield/puppeteer-core';
|
|
20
|
+
import { type ScriptRunner } from '@vibefield/puppeteer-native-observation';
|
|
15
21
|
import { type ClaudeSettingSource, type ClaudeStatusLineConfig } from '../observation/status-channel.js';
|
|
16
22
|
export interface PrepareClaudeSessionOptions extends AgentRunBriefing {
|
|
17
23
|
cwd: string;
|
|
@@ -42,7 +48,7 @@ export interface PrepareClaudeSessionOptions extends AgentRunBriefing {
|
|
|
42
48
|
effort?: string | undefined;
|
|
43
49
|
/** Native settings layers passed to `--setting-sources` and used for delegate discovery. */
|
|
44
50
|
settingSources?: readonly ClaudeSettingSource[] | undefined;
|
|
45
|
-
/**
|
|
51
|
+
/** Claude's user configuration root; else `env`'s `CLAUDE_CONFIG_DIR`, then this process's (config-root.ts). */
|
|
46
52
|
configDir?: string | undefined;
|
|
47
53
|
/** The home the user settings layer hangs off when no config root is set; the process home when absent. */
|
|
48
54
|
home?: string | undefined;
|
|
@@ -83,8 +89,24 @@ export interface PrepareClaudeSessionOptions extends AgentRunBriefing {
|
|
|
83
89
|
* person's) can take one for its value, and a prompt that starts with `-` stays a prompt.
|
|
84
90
|
*/
|
|
85
91
|
prompt?: readonly string[] | undefined;
|
|
86
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* The directory every launch file is written in, the caller's (a runtime's per-run staging directory, the driver's
|
|
94
|
+
* `stagingDir`): {@link cleanupClaudeSession} removes the files and never the directory. Default: a private mkdtemp
|
|
95
|
+
* directory under the OS temp directory, removed with the files.
|
|
96
|
+
*/
|
|
87
97
|
settingsDir?: string | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* The program the host lends to run the builtin forwarder entry in the agent's process tree (core
|
|
100
|
+
* `AgentHost.forwarderRuntime`): every command hook and status line runs it with its word, and no forwarder is
|
|
101
|
+
* staged. Absent = this process's script runner runs one staged forwarder.
|
|
102
|
+
*/
|
|
103
|
+
forwarderRuntime?: AgentForwarderRuntime | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Which program runs a script here (native-observation `resolveScriptRunner`): the staged forwarder and a script
|
|
106
|
+
* executable. `null` = this process has none (a single executable). Absent = resolved from this process.
|
|
107
|
+
* Injectable, as `hookBridgeFactory` is, for tests.
|
|
108
|
+
*/
|
|
109
|
+
scriptRunner?: ScriptRunner | null | undefined;
|
|
88
110
|
}
|
|
89
111
|
/** DESIGN §11 PreparedNativeSession, narrowed to what this adapter fills. */
|
|
90
112
|
export interface PreparedClaudeSession {
|
|
@@ -94,8 +116,8 @@ export interface PreparedClaudeSession {
|
|
|
94
116
|
cwd: string;
|
|
95
117
|
env: Record<string, string>;
|
|
96
118
|
settingsPath: string;
|
|
97
|
-
|
|
98
|
-
|
|
119
|
+
/** The staged forwarder the hooks and status lines run; absent when the host lends a forwarder runtime. */
|
|
120
|
+
forwarderPath?: string | undefined;
|
|
99
121
|
filesToCleanup: string[];
|
|
100
122
|
}
|
|
101
123
|
/**
|
|
@@ -131,7 +153,7 @@ export declare class ClaudeHooksOffError extends AgentLaunchRefusedError<'CLAUDE
|
|
|
131
153
|
/** Preserve a caller's exporter; conflicting routes disable Puppeteer's OTLP observation. */
|
|
132
154
|
export declare function hasClaudeOtelExporterConflict(environment?: NodeJS.ProcessEnv): boolean;
|
|
133
155
|
/** Status lines are shell commands, so render one platform-specific, injection-safe invocation. */
|
|
134
|
-
export declare function statusLineForwarderCommand(
|
|
156
|
+
export declare function statusLineForwarderCommand(command: string, args: readonly string[], targetPlatform?: NodeJS.Platform): string;
|
|
135
157
|
export declare function prepareClaudeSession(options: PrepareClaudeSessionOptions): Promise<PreparedClaudeSession>;
|
|
136
158
|
/** Remove the session's generated files; tolerant of already-gone paths. */
|
|
137
159
|
export declare function cleanupClaudeSession(prepared: PreparedClaudeSession): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../src/launch/prepare.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../src/launch/prepare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,OAAO,EACL,uBAAuB,EAEvB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAOvH,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC5B,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,6EAA6E;IAC7E,0BAA0B,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,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