sessionpipe-core 0.6.0 → 0.7.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/control.js +1 -2
- package/dist/control.js.map +2 -2
- package/dist/index.js +1328 -1005
- package/dist/index.js.map +4 -4
- package/dist/schema.js +1 -1
- package/dist/src/adapters/antigravity-control.d.ts +58 -0
- package/dist/src/adapters/antigravity-control.d.ts.map +1 -0
- package/dist/src/adapters/antigravity.d.ts +7 -1
- package/dist/src/adapters/antigravity.d.ts.map +1 -1
- package/dist/src/adapters/claude-code-control.d.ts +5 -26
- package/dist/src/adapters/claude-code-control.d.ts.map +1 -1
- package/dist/src/adapters/codex-control.d.ts +62 -0
- package/dist/src/adapters/codex-control.d.ts.map +1 -0
- package/dist/src/adapters/codex.d.ts +4 -0
- package/dist/src/adapters/codex.d.ts.map +1 -1
- package/dist/src/adapters/headless.d.ts +70 -0
- package/dist/src/adapters/headless.d.ts.map +1 -0
- package/dist/src/adapters/index.d.ts +7 -0
- package/dist/src/adapters/index.d.ts.map +1 -1
- package/dist/src/control/verify.d.ts.map +1 -1
- package/dist/src/readers/transcripts.d.ts +4 -0
- package/dist/src/readers/transcripts.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/schema.js
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type Mode, type Reading, type RunResult } from "./headless.js";
|
|
2
|
+
/** The `agy` to run: SESSIONPIPE_AGY, else on PATH, else where its installer puts it. */
|
|
3
|
+
export declare function findAgy(env?: NodeJS.ProcessEnv, home?: string): string | null;
|
|
4
|
+
/** Permission flags for the machine's mode. Safe: none — agy denies every tool call
|
|
5
|
+
* nobody is there to approve, and says which. Auto: `--mode accept-edits`. Never
|
|
6
|
+
* `--dangerously-skip-permissions`: no path here writes it. */
|
|
7
|
+
export declare function agyModeFlags(mode: Mode): string[];
|
|
8
|
+
/** One headless turn in the folder it is spawned in. A message that starts with a dash
|
|
9
|
+
* would read as a flag after `-p`; a leading space keeps it the prompt. */
|
|
10
|
+
export declare function agyArgs(o: {
|
|
11
|
+
mode: Mode;
|
|
12
|
+
prompt: string;
|
|
13
|
+
resume?: string;
|
|
14
|
+
}): string[];
|
|
15
|
+
/** The env a headless turn runs with. */
|
|
16
|
+
export declare const agyEnv: (env?: NodeJS.ProcessEnv) => NodeJS.ProcessEnv;
|
|
17
|
+
export interface AgyResult {
|
|
18
|
+
status: string;
|
|
19
|
+
response: string;
|
|
20
|
+
error: string;
|
|
21
|
+
denied: unknown[];
|
|
22
|
+
}
|
|
23
|
+
/** One stream-json line, as much of it as the daemon uses. */
|
|
24
|
+
export interface AgyPiece {
|
|
25
|
+
/** The conversation's id, which agy chose (`init`, then every step and the result). */
|
|
26
|
+
session?: string;
|
|
27
|
+
/** Text an `agent_response` step wrote, and which step it belongs to. */
|
|
28
|
+
delta?: {
|
|
29
|
+
step: number;
|
|
30
|
+
text: string;
|
|
31
|
+
};
|
|
32
|
+
/** The final `result`. */
|
|
33
|
+
result?: AgyResult;
|
|
34
|
+
/** An `error_message` step's words: the reason only if the run then fails. */
|
|
35
|
+
note?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function agyLine(line: string): AgyPiece | null;
|
|
38
|
+
/** An `AGY_ERROR: {…}` agy may end stderr with, in words. */
|
|
39
|
+
export declare function agyError(stderr: string | undefined): string;
|
|
40
|
+
/** An agy run read as it streams: the answer is the agent_response steps' text, and the
|
|
41
|
+
* result's `response` once it comes. */
|
|
42
|
+
export declare class AgyReading implements Reading {
|
|
43
|
+
session: string | null;
|
|
44
|
+
lines: number;
|
|
45
|
+
private buf;
|
|
46
|
+
private step;
|
|
47
|
+
private result;
|
|
48
|
+
private note;
|
|
49
|
+
get text(): string;
|
|
50
|
+
feed(line: string): boolean;
|
|
51
|
+
outcome(res: RunResult): {
|
|
52
|
+
failed: string;
|
|
53
|
+
} | {
|
|
54
|
+
reply: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export declare const reading: () => AgyReading;
|
|
58
|
+
//# sourceMappingURL=antigravity-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antigravity-control.d.ts","sourceRoot":"","sources":["../../../src/adapters/antigravity-control.ts"],"names":[],"mappings":"AAUA,OAAO,EAAkC,KAAK,IAAI,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,eAAe,CAAC;AAIpH,yFAAyF;AACzF,wBAAgB,OAAO,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,IAAI,SAAe,GAAG,MAAM,GAAG,IAAI,CAOhG;AAED;;gEAEgE;AAChE,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAEjD;AAED;4EAC4E;AAC5E,wBAAgB,OAAO,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,EAAE,CAUpF;AAED,yCAAyC;AACzC,eAAO,MAAM,MAAM,GAAI,MAAK,MAAM,CAAC,UAAwB,KAAG,MAAM,CAAC,UAAyB,CAAC;AAE/F,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED,8DAA8D;AAC9D,MAAM,WAAW,QAAQ;IACvB,uFAAuF;IACvF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,0BAA0B;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAgCrD;AAYD,6DAA6D;AAC7D,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAU3D;AAED;yCACyC;AACzC,qBAAa,UAAW,YAAW,OAAO;IACxC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,KAAK,SAAK;IACV,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,IAAI,CAAuB;IAEnC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAe3B,OAAO,CAAC,GAAG,EAAE,SAAS,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;CAkBhE;AAED,eAAO,MAAM,OAAO,QAAO,UAA8B,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { Adapter, FactsState, SessionFacts } from "./types.js";
|
|
2
|
-
export declare const AG_EVENTS: readonly ["PreInvocation", "PostInvocation", "
|
|
2
|
+
export declare const AG_EVENTS: readonly ["PreInvocation", "PostInvocation", "PostToolUse", "Stop"];
|
|
3
|
+
/** What a PreToolUse entry an older install left behind gets, until a restarted
|
|
4
|
+
* conversation reads the rewritten hooks.json: the person's own prompt, with why. The
|
|
5
|
+
* hook (cli/src/hook.ts) and the launcher (cli/src/launcher.ts) print the same line. */
|
|
6
|
+
export declare const AG_STALE_PRETOOL = "{\"decision\":\"ask\",\"reason\":\"sessionpipe: an outdated PreToolUse hook is still loaded. Restart this conversation (or run sessionpipe install) to drop it.\"}\n";
|
|
7
|
+
/** Antigravity's answer for one event: `{}` is "carry on" for every event we register. */
|
|
8
|
+
export declare const antigravityAnswer: (event: string) => string;
|
|
3
9
|
export declare const antigravity: Adapter;
|
|
4
10
|
/** A folder as Antigravity writes it (a file:// URI or a path) → an absolute path, or null. */
|
|
5
11
|
export declare function agPath(p: unknown): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../src/adapters/antigravity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../src/adapters/antigravity.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EACV,OAAO,EAEP,UAAU,EAMV,YAAY,EACb,MAAM,YAAY,CAAC;AAIpB,eAAO,MAAM,SAAS,qEAAsE,CAAC;AAC7F;;yFAEyF;AACzF,eAAO,MAAM,gBAAgB,yKACmI,CAAC;AACjK,0FAA0F;AAC1F,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,MAA8D,CAAC;AAiBjH,eAAO,MAAM,WAAW,EAAE,OAoJzB,CAAC;AAOF,+FAA+F;AAC/F,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAahD;AACD,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,MAAM,EAIR,CAAC;AAoC7C,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,QAAQ,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAiBjH;AAED;uEACuE;AACvE,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACnG,MAAM,GAAG,IAAI,CAiBf;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,GAC9F,YAAY,CAyBd"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export type Mode
|
|
1
|
+
import { JOB_TIMEOUT_MS, type Login, type Mode, type RunOptions, type RunResult } from "./headless.js";
|
|
2
|
+
export { JOB_TIMEOUT_MS, type Login, type Mode, type RunResult };
|
|
3
3
|
/** The `claude` to run: on PATH, else where the installers put it, else the newest
|
|
4
4
|
* copy the desktop app ships. Null when this machine has none. */
|
|
5
5
|
export declare function findClaude(env?: NodeJS.ProcessEnv, home?: string): string | null;
|
|
@@ -27,12 +27,6 @@ export declare function claudeEnv(configDir?: string, env?: NodeJS.ProcessEnv):
|
|
|
27
27
|
/** Whether Claude Code is signed in for one account, in Claude Code's own words
|
|
28
28
|
* (`claude auth status --json`). `loggedIn: null` means this Claude Code can't say
|
|
29
29
|
* (too old for `auth status`, or it didn't answer): never a reason to refuse. */
|
|
30
|
-
export interface Login {
|
|
31
|
-
loggedIn: boolean | null;
|
|
32
|
-
/** claude.ai, an API key, a long-lived token… as Claude Code names it. */
|
|
33
|
-
method?: string;
|
|
34
|
-
subscription?: string;
|
|
35
|
-
}
|
|
36
30
|
export declare function parseAuthStatus(stdout: string | null | undefined): Login;
|
|
37
31
|
/** Ask Claude Code whether the account in `configDir` (the default one when omitted)
|
|
38
32
|
* is signed in, from this process — which is the point: a login kept in the macOS
|
|
@@ -62,24 +56,9 @@ export declare function sessionFolder(t: Transcript, cap?: number): string | nul
|
|
|
62
56
|
export declare function liveProcess(session: string, configDir: string): boolean;
|
|
63
57
|
/** Written in the last 90 s, and not by a job of ours. */
|
|
64
58
|
export declare function recentlyWritten(file: string, ourLastEnd?: number, now?: number): boolean;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
signal?: NodeJS.Signals | null;
|
|
69
|
-
stdout?: string | null;
|
|
70
|
-
tooBig?: boolean;
|
|
71
|
-
stderr?: string;
|
|
72
|
-
timedOut?: boolean;
|
|
73
|
-
}
|
|
74
|
-
/** Run one headless turn in its own process group, holding at most 1 MB of stdout. */
|
|
75
|
-
export declare function runClaude(bin: string, args: string[], o: {
|
|
76
|
-
cwd: string;
|
|
77
|
-
env: NodeJS.ProcessEnv;
|
|
78
|
-
timeoutMs?: number;
|
|
79
|
-
/** Streaming (`--output-format stream-json`): each stdout line as it arrives. Only
|
|
80
|
-
* the `result` line is kept for the RunResult, so a long stream never hits the cap. */
|
|
81
|
-
onLine?: (line: string) => void;
|
|
82
|
-
}): Promise<RunResult>;
|
|
59
|
+
/** Run one headless turn (headless.ts). Streaming (`--output-format stream-json`), only
|
|
60
|
+
* the `result` line is kept for the RunResult unless the caller says otherwise. */
|
|
61
|
+
export declare function runClaude(bin: string, args: string[], o: RunOptions): Promise<RunResult>;
|
|
83
62
|
export interface ClaudeResult {
|
|
84
63
|
type?: string;
|
|
85
64
|
result?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code-control.d.ts","sourceRoot":"","sources":["../../../src/adapters/claude-code-control.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claude-code-control.d.ts","sourceRoot":"","sources":["../../../src/adapters/claude-code-control.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,cAAc,EACd,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,SAAS,EAEf,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,cAAc,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;AAcjE;mEACmE;AACnE,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,IAAI,SAA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, findRollout } from "./codex.js";
|
|
3
|
+
/** The `codex` to run: SESSIONPIPE_CODEX, else on PATH, else beside the node running
|
|
4
|
+
* this (an `npm install -g` there) or where the installers put it. */
|
|
5
|
+
export declare function findCodex(env?: NodeJS.ProcessEnv, home?: string, nodeDir?: string): string | null;
|
|
6
|
+
/** Sandbox flags for the machine's mode. Safe: workspace-write, and nothing escalates
|
|
7
|
+
* unattended (exec never asks). Auto: approval requests go through Codex's own
|
|
8
|
+
* automatic review. Never `--dangerously-bypass-approvals-and-sandbox` or
|
|
9
|
+
* `--dangerously-bypass-hook-trust`: no path here writes them. */
|
|
10
|
+
export declare function codexModeFlags(mode: Mode, resume?: boolean): string[];
|
|
11
|
+
/** One headless turn. A new session runs in `cwd` (`-C`); a resume names the thread.
|
|
12
|
+
* The prompt goes after `--`, so a message that starts with a dash is never a flag. */
|
|
13
|
+
export declare function codexArgs(o: {
|
|
14
|
+
mode: Mode;
|
|
15
|
+
prompt: string;
|
|
16
|
+
cwd?: string;
|
|
17
|
+
resume?: string;
|
|
18
|
+
}): string[];
|
|
19
|
+
/** The env a headless turn runs with. */
|
|
20
|
+
export declare const codexEnv: (env?: NodeJS.ProcessEnv) => NodeJS.ProcessEnv;
|
|
21
|
+
export declare const LOGIN_HINT = "Codex isn't signed in on this machine: run `codex login --device-auth` there.";
|
|
22
|
+
/** Whether Codex can run as this process: CODEX_API_KEY in the env is enough; else
|
|
23
|
+
* `codex login status` (exit 0 signed in, exit 1 "Not logged in"). Anything else —
|
|
24
|
+
* it didn't run, it timed out — is null, never a reason to refuse. */
|
|
25
|
+
export declare function codexLogin(bin: string, env?: NodeJS.ProcessEnv): Promise<Login>;
|
|
26
|
+
/** One `--json` line, as much of it as the daemon uses. */
|
|
27
|
+
export interface CodexPiece {
|
|
28
|
+
/** `thread.started`: the session's id, which Codex chose. */
|
|
29
|
+
session?: string;
|
|
30
|
+
/** A finished `agent_message`: one part of the answer. */
|
|
31
|
+
message?: string;
|
|
32
|
+
/** `turn.completed` (or `turn.failed`). */
|
|
33
|
+
done?: boolean;
|
|
34
|
+
/** `turn.failed`: why. */
|
|
35
|
+
failed?: string;
|
|
36
|
+
/** A top-level `error` ("Reconnecting... 2/5"): transient, the reason only if the run then fails. */
|
|
37
|
+
note?: string;
|
|
38
|
+
/** An `error` item: a warning Codex printed and carried on after (hook trust, a clamped timeout). */
|
|
39
|
+
warning?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function codexLine(line: string): CodexPiece | null;
|
|
42
|
+
/** A Codex run read as it streams: the answer is its finished agent messages. */
|
|
43
|
+
export declare class CodexReading implements Reading {
|
|
44
|
+
session: string | null;
|
|
45
|
+
lines: number;
|
|
46
|
+
readonly warnings: string[];
|
|
47
|
+
private readonly messages;
|
|
48
|
+
private done;
|
|
49
|
+
private failed;
|
|
50
|
+
private note;
|
|
51
|
+
get text(): string;
|
|
52
|
+
feed(line: string): boolean;
|
|
53
|
+
/** A failure is `turn.failed`, or a run that exits non-zero having said nothing; an
|
|
54
|
+
* `error` item before a turn that then succeeds is only a warning. */
|
|
55
|
+
outcome(res: RunResult): {
|
|
56
|
+
failed: string;
|
|
57
|
+
} | {
|
|
58
|
+
reply: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export declare const reading: () => CodexReading;
|
|
62
|
+
//# sourceMappingURL=codex-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-control.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex-control.ts"],"names":[],"mappings":"AAWA,OAAO,EAGL,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,SAAS,EAGf,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIrD;uEACuE;AACvE,wBAAgB,SAAS,CACvB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,IAAI,SAAe,EACnB,OAAO,SAAiC,GACvC,MAAM,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,CAAgB;IACzC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,IAAI,CAAuB;IAEnC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAgB3B;2EACuE;IACvE,OAAO,CAAC,GAAG,EAAE,SAAS,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;CAShE;AAYD,eAAO,MAAM,OAAO,QAAO,YAAkC,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Adapter, SessionFacts } from "./types.js";
|
|
2
2
|
export declare const CODEX_EVENTS: readonly ["SessionStart", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PermissionRequest", "Stop", "Interrupt", "SubagentStart", "SubagentStop", "PreCompact", "PostCompact", "SessionEnd"];
|
|
3
|
+
/** The rollout file of one thread: `<CODEX_HOME>/sessions/YYYY/MM/DD/rollout-<time>-<thread
|
|
4
|
+
* id>.jsonl`, newest day first. Null for an id that isn't a thread id's shape, so a
|
|
5
|
+
* short or odd one never matches some other session's file. */
|
|
6
|
+
export declare function findRollout(threadId: string, env?: NodeJS.ProcessEnv): string | null;
|
|
3
7
|
export declare const codex: Adapter;
|
|
4
8
|
/** Codex keeps no title; its first real ask stands in. */
|
|
5
9
|
export declare function codexFacts(file: string): SessionFacts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,OAAO,EAOP,YAAY,EACb,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,YAAY,kMAaf,CAAC;
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/adapters/codex.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,OAAO,EAOP,YAAY,EACb,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,YAAY,kMAaf,CAAC;AAuFX;;gEAEgE;AAChE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,IAAI,CAwBjG;AAED,eAAO,MAAM,KAAK,EAAE,OAoLnB,CAAC;AAOF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CA2CrD"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** A headless turn still running after this is stopped. */
|
|
2
|
+
export declare const JOB_TIMEOUT_MS: number;
|
|
3
|
+
export type Mode = "safe" | "auto";
|
|
4
|
+
export declare function isExe(p: string): boolean;
|
|
5
|
+
/** A harness's CLI: the override the person set (`SESSIONPIPE_<NAME>`), else the first
|
|
6
|
+
* of `names` on PATH, else the first of `dirs` that holds one. A launchd or systemd
|
|
7
|
+
* service starts with a short PATH, so the installers' own folders are looked in too. */
|
|
8
|
+
export declare function findBinary(o: {
|
|
9
|
+
override?: string | undefined;
|
|
10
|
+
names: string[];
|
|
11
|
+
dirs: string[];
|
|
12
|
+
env?: NodeJS.ProcessEnv;
|
|
13
|
+
}): string | null;
|
|
14
|
+
/** The env every headless turn runs with: SESSIONPIPE_CONTROL_JOB tells the turn's own
|
|
15
|
+
* hooks that the daemon runs it, so its Stop hook never takes a message meant for a
|
|
16
|
+
* person's session (cli/src/hook.ts). */
|
|
17
|
+
export declare function jobEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
18
|
+
/** Whether a harness is signed in, in its own words. `loggedIn: null` means it can't
|
|
19
|
+
* say (too old, or it didn't answer): never a reason to refuse. */
|
|
20
|
+
export interface Login {
|
|
21
|
+
loggedIn: boolean | null;
|
|
22
|
+
/** claude.ai, an API key, a long-lived token… as the harness names it. */
|
|
23
|
+
method?: string;
|
|
24
|
+
subscription?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface RunResult {
|
|
27
|
+
error?: string;
|
|
28
|
+
code?: number | null;
|
|
29
|
+
signal?: NodeJS.Signals | null;
|
|
30
|
+
stdout?: string | null;
|
|
31
|
+
tooBig?: boolean;
|
|
32
|
+
stderr?: string;
|
|
33
|
+
timedOut?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface RunOptions {
|
|
36
|
+
cwd: string;
|
|
37
|
+
env: NodeJS.ProcessEnv;
|
|
38
|
+
timeoutMs?: number;
|
|
39
|
+
/** Streaming: each stdout line as it arrives. Only the lines `keep` names are kept
|
|
40
|
+
* for the RunResult (none by default), so a long stream never hits the cap. */
|
|
41
|
+
onLine?: (line: string) => void;
|
|
42
|
+
keep?: (line: string) => boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Run one headless turn in its own process group, stdin closed (Codex waits on an open
|
|
45
|
+
* one), holding at most 1 MB of stdout. */
|
|
46
|
+
export declare function runHeadless(bin: string, args: string[], o: RunOptions): Promise<RunResult>;
|
|
47
|
+
/** A harness's output read as it streams: the session it names, the answer so far, and
|
|
48
|
+
* the outcome once the process is gone. One per run. */
|
|
49
|
+
export interface Reading {
|
|
50
|
+
/** One stdout line. True when the answer so far changed. */
|
|
51
|
+
feed(line: string): boolean;
|
|
52
|
+
/** The session id the harness revealed (it picks its own), or null so far. */
|
|
53
|
+
readonly session: string | null;
|
|
54
|
+
/** The answer so far, whole. */
|
|
55
|
+
readonly text: string;
|
|
56
|
+
/** How many lines were fed. */
|
|
57
|
+
readonly lines: number;
|
|
58
|
+
outcome(res: RunResult): {
|
|
59
|
+
failed: string;
|
|
60
|
+
} | {
|
|
61
|
+
reply: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** The last few lines a harness wrote to stderr, on one line. */
|
|
65
|
+
export declare function stderrTail(stderr: string | undefined, n?: number): string;
|
|
66
|
+
/** What a run that wasn't there to ask says about the actions it was refused. */
|
|
67
|
+
export declare function deniedNote(names: string[], count: number): string;
|
|
68
|
+
/** A process that failed before or without its answer, in words. */
|
|
69
|
+
export declare function runFailure(label: string, res: RunResult): string | null;
|
|
70
|
+
//# sourceMappingURL=headless.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless.d.ts","sourceRoot":"","sources":["../../../src/adapters/headless.ts"],"names":[],"mappings":"AASA,2DAA2D;AAC3D,eAAO,MAAM,cAAc,QAAc,CAAC;AAG1C,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnC,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAQxC;AAED;;0FAE0F;AAC1F,wBAAgB,UAAU,CAAC,CAAC,EAAE;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB,GAAG,MAAM,GAAG,IAAI,CAQhB;AAED;;0CAE0C;AAC1C,wBAAgB,MAAM,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAAC,UAAU,CAE9E;AAED;oEACoE;AACpE,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,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,8 +5,15 @@ import { geminiCli } from "./gemini-cli.js";
|
|
|
5
5
|
import type { Adapter } from "./types.js";
|
|
6
6
|
export declare const ADAPTERS: readonly Adapter[];
|
|
7
7
|
export declare const adapterByName: (name: string) => Adapter | undefined;
|
|
8
|
+
export { AG_STALE_PRETOOL, antigravityAnswer } from "./antigravity.js";
|
|
9
|
+
export * as antigravityControl from "./antigravity-control.js";
|
|
8
10
|
export { claudeDirs } from "./claude-code.js";
|
|
9
11
|
export * as claudeControl from "./claude-code-control.js";
|
|
12
|
+
export * as codexControl from "./codex-control.js";
|
|
13
|
+
export { deniedNote, JOB_TIMEOUT_MS, jobEnv, type Login, type Reading, type RunOptions, type RunResult, runHeadless, } from "./headless.js";
|
|
14
|
+
/** The harnesses a control daemon here can drive headlessly (CONTROL.md §6): each whose
|
|
15
|
+
* CLI is installed on this machine. What `control pair` and every hello advertise. */
|
|
16
|
+
export declare function drivableHarnesses(env?: NodeJS.ProcessEnv): string[];
|
|
10
17
|
export type { Adapter, AdapterEvent, BackfillRow, FactsState, HookCommand, HookInput, HookResult, InstallReport, SessionFacts, TranscriptRead, Turn, } from "./types.js";
|
|
11
18
|
export { antigravity, claudeCode, codex, geminiCli };
|
|
12
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,K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AG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAiB9G;AAgBD;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CA4C3G"}
|
|
@@ -10,6 +10,10 @@ export declare function pairTurns(msgs: Msg[], endLine: number): TranscriptRead;
|
|
|
10
10
|
export declare const isInjected: (text: string) => boolean;
|
|
11
11
|
/** Claude Code / Droid: {type:"user"|"assistant", message:{content}, timestamp, isMeta, isSidechain, origin}. */
|
|
12
12
|
export declare function readClaude(lines: string[], from: number): TranscriptRead;
|
|
13
|
+
/** What Codex writes into a session as a "user" message that the person never typed:
|
|
14
|
+
* `<environment_context>` and the like, and the AGENTS.md it read (`# AGENTS.md
|
|
15
|
+
* instructions for <folder>` followed by `<INSTRUCTIONS>`). */
|
|
16
|
+
export declare function codexInjected(text: string): boolean;
|
|
13
17
|
/** Codex rollout: {type:"response_item", payload:{type:"message", role, content:[{type:"input_text"|"output_text", text}]}}. */
|
|
14
18
|
export declare function readCodex(lines: string[], from: number): TranscriptRead;
|
|
15
19
|
/** Gemini CLI chat log: {type:"user"|"gemini", content|message|text, timestamp}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcripts.d.ts","sourceRoot":"","sources":["../../../src/readers/transcripts.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,UAAU,GAAG;IACX,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,SAAS,CAAC,IA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;AAED,gIAAgI;AAChI,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAgBvE;AAED,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAcxE;AAED,gHAAgH;AAChH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAgB7E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sessionpipe-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "sessionpipe core: protocol types, harness adapters, privacy filter and redaction rulesets, outbox and sinks. Zero runtime dependencies. (published unscoped until the @sessionpipe npm org exists; the code is the same)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|