@ckanner/flywheel 0.32.1 → 0.33.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/CHANGELOG.md +20 -1
- package/README.md +7 -0
- package/README.zh-CN.md +5 -0
- package/THIRD_PARTY_NOTICES.md +42 -0
- package/bin/runtime.js +25 -31
- package/cordis.patch.yml +5 -0
- package/dist/bridge.mjs +421 -0
- package/dist/claude-code-pro-bridge.mjs +82 -0
- package/dist/claude-code-pro-worker.mjs +5 -0
- package/dist/client.js +4140 -0
- package/dist/codex-pro-bridge.mjs +75 -0
- package/dist/codex-pro-worker.mjs +5 -0
- package/dist/console-read.mjs +51 -0
- package/dist/control.mjs +218 -0
- package/dist/index.mjs +185 -0
- package/dist/installation.mjs +56 -0
- package/dist/machine-worker.mjs +241 -0
- package/dist/policy.mjs +91 -0
- package/dist/prewarm.mjs +136 -0
- package/dist/protocol.mjs +260 -0
- package/dist/task-association.mjs +127 -0
- package/dist/worker.mjs +52 -0
- package/dist/workspaces.mjs +42 -0
- package/docs/README.md +1 -1
- package/docs/README.zh-CN.md +1 -1
- package/docs/design.md +8 -5
- package/docs/en/configuration.md +1 -1
- package/docs/en/contributing.md +5 -6
- package/docs/en/flow-console.md +2 -2
- package/docs/en/getting-started.md +9 -2
- package/docs/en/releasing.md +132 -174
- package/docs/validation/2026-11-13-release-0.32.1.md +83 -0
- package/docs/validation/2026-11-14-release-0.33.0.md +49 -0
- package/docs/validation/2026-11-14-single-package.md +60 -0
- package/docs/validation/README.md +3 -0
- package/docs/zh-CN/configuration.md +1 -1
- package/docs/zh-CN/contributing.md +4 -5
- package/docs/zh-CN/flow-console.md +2 -2
- package/docs/zh-CN/getting-started.md +7 -3
- package/docs/zh-CN/releasing.md +97 -81
- package/native/darwin-amd64/flywheel +0 -0
- package/native/darwin-arm64/flywheel +0 -0
- package/native/linux-amd64/flywheel +0 -0
- package/native/linux-arm64/flywheel +0 -0
- package/native/manifest.json +22 -0
- package/node_modules/dsh-subagent-codex-pro/CHANGELOG.md +403 -0
- package/node_modules/dsh-subagent-codex-pro/LICENSE +21 -0
- package/node_modules/dsh-subagent-codex-pro/README.md +557 -0
- package/node_modules/dsh-subagent-codex-pro/cordis.patch.yml +30 -0
- package/node_modules/dsh-subagent-codex-pro/docs/README.zh.md +355 -0
- package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle-validation.md +65 -0
- package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle.md +144 -0
- package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle.zh.md +98 -0
- package/node_modules/dsh-subagent-codex-pro/docs/machine.md +194 -0
- package/node_modules/dsh-subagent-codex-pro/docs/orchestration.zh.md +86 -0
- package/node_modules/dsh-subagent-codex-pro/lib/codex-exec.js +68 -0
- package/node_modules/dsh-subagent-codex-pro/lib/codex-exec.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/dsh-types.js +15 -0
- package/node_modules/dsh-subagent-codex-pro/lib/dsh-types.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/index.js +830 -0
- package/node_modules/dsh-subagent-codex-pro/lib/index.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/jobs.js +35 -0
- package/node_modules/dsh-subagent-codex-pro/lib/jobs.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/jsonrpc.js +229 -0
- package/node_modules/dsh-subagent-codex-pro/lib/jsonrpc.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-cli.js +101 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-cli.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-local.js +122 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-local.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-recovery.js +167 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-recovery.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-supervision.js +141 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-supervision.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-supervisor.js +128 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-supervisor.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine.js +104 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/process-guardian.js +156 -0
- package/node_modules/dsh-subagent-codex-pro/lib/process-guardian.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/run.js +842 -0
- package/node_modules/dsh-subagent-codex-pro/lib/run.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/structured.js +329 -0
- package/node_modules/dsh-subagent-codex-pro/lib/structured.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/tool.js +295 -0
- package/node_modules/dsh-subagent-codex-pro/lib/tool.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/codex-exec.d.ts +88 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/codex-exec.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/dsh-types.d.ts +179 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/dsh-types.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/index.d.ts +266 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/index.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/jobs.d.ts +34 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/jobs.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/jsonrpc.d.ts +113 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/jsonrpc.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-cli.d.ts +3 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-cli.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-local.d.ts +4 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-local.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-recovery.d.ts +53 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-recovery.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervision.d.ts +8 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervision.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervisor.d.ts +2 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervisor.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine.d.ts +70 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/process-guardian.d.ts +22 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/process-guardian.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/run.d.ts +386 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/run.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/structured.d.ts +35 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/structured.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/tool.d.ts +107 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/tool.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/usage.d.ts +131 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/usage.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/wire.d.ts +321 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/wire.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/usage.js +356 -0
- package/node_modules/dsh-subagent-codex-pro/lib/usage.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/wire.js +986 -0
- package/node_modules/dsh-subagent-codex-pro/lib/wire.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/package.json +76 -0
- package/npm/install.js +59 -6
- package/package.json +74 -12
- package/plugins/dsh/LICENSE +21 -0
- package/plugins/dsh/PROTOCOL.md +609 -0
- package/plugins/dsh/README.en.md +4 -0
- package/plugins/dsh/README.md +342 -0
- package/plugins/dsh/README.zh-CN.md +279 -0
- package/plugins/dsh/THIRD_PARTY_NOTICES.md +42 -0
- package/plugins/dsh/vendor/README.md +17 -0
- package/plugins/dsh/vendor/codex-pro.json +16 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token usage observed over one delegation.
|
|
3
|
+
*
|
|
4
|
+
* Codex reports a thread-cumulative snapshot (`total`) and a last-model-call
|
|
5
|
+
* snapshot (`last`) through `thread/tokenUsage/updated`. A delegation can make
|
|
6
|
+
* several model calls, so `last` is never a delegation total, and `total` is an
|
|
7
|
+
* absolute high-water mark rather than an increment. Resume/attach replays the
|
|
8
|
+
* latest persisted snapshot for the new connection, so the first observation
|
|
9
|
+
* after a resume is history, not this run.
|
|
10
|
+
*
|
|
11
|
+
* The tracker therefore:
|
|
12
|
+
* - uses a baseline and computes a delta from later cumulative snapshots;
|
|
13
|
+
* - treats a replay after resume as the baseline;
|
|
14
|
+
* - ignores duplicate and out-of-order snapshots;
|
|
15
|
+
* - never derives a value by adding snapshots;
|
|
16
|
+
* - reports `unknown` rather than zero when no usable observation exists;
|
|
17
|
+
* - retains the last observed totals even when the run failed or was cancelled.
|
|
18
|
+
*
|
|
19
|
+
* `cachedInputTokens` is a subset of `inputTokens`, and
|
|
20
|
+
* `reasoningOutputTokens` is a subset of `outputTokens`. The fields are reported
|
|
21
|
+
* as Codex states them; they are never summed into a larger total.
|
|
22
|
+
*
|
|
23
|
+
* @module dsh-subagent-codex-pro/usage
|
|
24
|
+
*/
|
|
25
|
+
/** One token-usage breakdown exactly as Codex reports it. */
|
|
26
|
+
export interface TokenUsageBreakdown {
|
|
27
|
+
readonly totalTokens: number;
|
|
28
|
+
readonly inputTokens: number;
|
|
29
|
+
/** Cached input, already included in `inputTokens`. */
|
|
30
|
+
readonly cachedInputTokens: number;
|
|
31
|
+
/** Cache writes, already included in `inputTokens`. */
|
|
32
|
+
readonly cacheWriteInputTokens: number;
|
|
33
|
+
readonly outputTokens: number;
|
|
34
|
+
/** Reasoning output, already included in `outputTokens`. */
|
|
35
|
+
readonly reasoningOutputTokens: number;
|
|
36
|
+
}
|
|
37
|
+
/** Whether a usage report covers the whole delegation, part of it, or nothing. */
|
|
38
|
+
export type UsageStatus = 'complete' | 'partial' | 'unknown';
|
|
39
|
+
/**
|
|
40
|
+
* Usage attributable to one delegation.
|
|
41
|
+
*
|
|
42
|
+
* `run` is the delta from the observed baseline, not a sum of notifications.
|
|
43
|
+
* `threadTotal` is the latest absolute thread snapshot, kept for diagnostics.
|
|
44
|
+
* A report with `status: 'unknown'` deliberately has no `run`; it is not zero.
|
|
45
|
+
*/
|
|
46
|
+
export interface CodexUsageReport {
|
|
47
|
+
readonly status: UsageStatus;
|
|
48
|
+
/** The usage of this run, when a baseline and at least one later snapshot exist. */
|
|
49
|
+
readonly run?: TokenUsageBreakdown;
|
|
50
|
+
/** The latest thread-cumulative snapshot observed, including pre-run history. */
|
|
51
|
+
readonly threadTotal?: TokenUsageBreakdown;
|
|
52
|
+
/** Thread model context window when Codex reported it. */
|
|
53
|
+
readonly modelContextWindow?: number | null;
|
|
54
|
+
/** Usable usage notifications observed for this thread. */
|
|
55
|
+
readonly observations: number;
|
|
56
|
+
/** Whether a resumed thread's baseline came from a replay notification. */
|
|
57
|
+
readonly replayedBaseline: boolean;
|
|
58
|
+
/** Why the report is partial or unknown. */
|
|
59
|
+
readonly reason?: string;
|
|
60
|
+
}
|
|
61
|
+
/** The shape of `thread/tokenUsage/updated` the wire accepts. */
|
|
62
|
+
export interface TokenUsageNotificationLike {
|
|
63
|
+
readonly threadId?: unknown;
|
|
64
|
+
readonly turnId?: unknown;
|
|
65
|
+
readonly tokenUsage?: unknown;
|
|
66
|
+
}
|
|
67
|
+
/** One notification accepted by the tracker. */
|
|
68
|
+
export interface UsageObservation {
|
|
69
|
+
readonly turnId: string;
|
|
70
|
+
readonly tokenUsage: unknown;
|
|
71
|
+
readonly modelContextWindow?: unknown;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Fold the usage notifications of one thread into one delegation report.
|
|
75
|
+
*
|
|
76
|
+
* One tracker belongs to one wire/thread. `resetForNewThread` is called after a
|
|
77
|
+
* successful `thread/start`; `resetForResume` after a successful
|
|
78
|
+
* `thread/resume`; `beginTurn` when the turn id becomes authoritative. The
|
|
79
|
+
* tracker is deliberately not a Codex client: it only accounts for snapshots,
|
|
80
|
+
* never issues requests.
|
|
81
|
+
*/
|
|
82
|
+
export declare class TokenUsageTracker {
|
|
83
|
+
#private;
|
|
84
|
+
/** Start accounting for a thread that has no history. */
|
|
85
|
+
resetForNewThread(threadId: string): void;
|
|
86
|
+
/**
|
|
87
|
+
* Start accounting for a resumed thread.
|
|
88
|
+
*
|
|
89
|
+
* Its first usage notification is normally the connection-scoped replay of
|
|
90
|
+
* the last persisted snapshot, so it becomes the baseline and contributes no
|
|
91
|
+
* run usage. If no replay arrives before the turn starts, the first live
|
|
92
|
+
* snapshot is still used as a baseline but the report is `partial`, because
|
|
93
|
+
* usage before that snapshot is unknowable from the protocol.
|
|
94
|
+
*/
|
|
95
|
+
resetForResume(threadId: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* Mark the turn/start request boundary.
|
|
98
|
+
*
|
|
99
|
+
* Notifications are buffered until the response proves the authoritative turn
|
|
100
|
+
* id; that keeps a resumed thread's replay and a current-turn live snapshot
|
|
101
|
+
* distinguishable even when the replay arrives after this request.
|
|
102
|
+
*/
|
|
103
|
+
startTurnRequest(): void;
|
|
104
|
+
/** Associate early notifications after the response proves the turn id. */
|
|
105
|
+
beginTurn(turnId: string): void;
|
|
106
|
+
/** The current turn id, when the wire has adopted it. */
|
|
107
|
+
get turnId(): string | undefined;
|
|
108
|
+
/** The latest absolute thread total, if any observation was accepted. */
|
|
109
|
+
get latest(): TokenUsageBreakdown | undefined;
|
|
110
|
+
/** The latest model context window, if Codex reported one. */
|
|
111
|
+
get modelContextWindow(): number | null | undefined;
|
|
112
|
+
/** Begin a report's closing fold; further observations are ignored. */
|
|
113
|
+
close(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Fold one `thread/tokenUsage/updated` notification.
|
|
116
|
+
*
|
|
117
|
+
* @param notification - the decoded notification parameters.
|
|
118
|
+
* @returns whether the notification was usable for accounting.
|
|
119
|
+
*/
|
|
120
|
+
observe(notification: TokenUsageNotificationLike): boolean;
|
|
121
|
+
/** Record a malformed notification so the report can say so. */
|
|
122
|
+
observeInvalid(): void;
|
|
123
|
+
/**
|
|
124
|
+
* The report for this run.
|
|
125
|
+
*
|
|
126
|
+
* No observation is `unknown`, never a zero report. A known baseline plus a
|
|
127
|
+
* later snapshot is `complete` unless a reset/partial reason was recorded.
|
|
128
|
+
*/
|
|
129
|
+
report(): CodexUsageReport;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/usage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,6DAA6D;AAC7D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAClC,uDAAuD;IACvD,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAA;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,4DAA4D;IAC5D,QAAQ,CAAC,qBAAqB,EAAE,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,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAM/B,yDAAyD;IACzD,IAAI,MAAM,IAAI,MAAM,GAAG,SAAS,CAE/B;IAED,yEAAyE;IACzE,IAAI,MAAM,IAAI,mBAAmB,GAAG,SAAS,CAE5C;IAED,8DAA8D;IAC9D,IAAI,kBAAkB,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,CAElD;IAED,uEAAuE;IACvE,KAAK,IAAI,IAAI;IAKb;;;;;OAKG;IACH,OAAO,CAAC,YAAY,EAAE,0BAA0B,GAAG,OAAO;IA4G1D,gEAAgE;IAChE,cAAc,IAAI,IAAI;IAMtB;;;;;OAKG;IACH,MAAM,IAAI,gBAAgB;CA2C3B"}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex app-server protocol adapter.
|
|
3
|
+
*
|
|
4
|
+
* A faithful port of `@deepseek-ai/dsh-subagent-codex`'s wire module, extended
|
|
5
|
+
* with the per-call choices this package exists for: `model` and the unattended
|
|
6
|
+
* permission policy on `thread/start`, per-turn `effort` on `turn/start`, and
|
|
7
|
+
* explicit model/cwd/permission overrides plus effective-configuration checks
|
|
8
|
+
* on `thread/resume` (0.165+). A thinking level is **not** a `thread/start`
|
|
9
|
+
* field in 0.165/0.166. The module also accounts for token usage and account
|
|
10
|
+
* rate limits, keeping them separate.
|
|
11
|
+
*
|
|
12
|
+
* Everything else is carried over as-is, because the surrounding behaviour is
|
|
13
|
+
* load-bearing and was tuned against a real app-server: the initialize
|
|
14
|
+
* handshake, thread/turn association (including notifications that arrive
|
|
15
|
+
* before `turn/start` returns), unattended approval decisions, terminal-answer
|
|
16
|
+
* selection by phase, and the failure taxonomy.
|
|
17
|
+
*
|
|
18
|
+
* Differences from the source, all mechanical:
|
|
19
|
+
* - `JsonRpcLineTransport` is this package's own `LineTransport`, so the
|
|
20
|
+
* transport method shape is `request(method, params, { signal })` rather than
|
|
21
|
+
* a positional signal.
|
|
22
|
+
* - Error text uses this package's prefix.
|
|
23
|
+
* - Model and permission choices are constructor state; `effort` travels through
|
|
24
|
+
* `runTurn`; resume overrides are per call.
|
|
25
|
+
*
|
|
26
|
+
* @module dsh-subagent-codex-pro/wire
|
|
27
|
+
*/
|
|
28
|
+
import type { LineTransport } from './jsonrpc.ts';
|
|
29
|
+
import { type CodexUsageReport } from './usage.ts';
|
|
30
|
+
/** Explicit thread permissions; approval policy never implies a sandbox. */
|
|
31
|
+
declare const THREAD_PERMISSION_PARAMS: {
|
|
32
|
+
readonly 'read-only': {
|
|
33
|
+
readonly approvalPolicy: "never";
|
|
34
|
+
readonly sandbox: "read-only";
|
|
35
|
+
};
|
|
36
|
+
readonly 'workspace-write': {
|
|
37
|
+
readonly approvalPolicy: "never";
|
|
38
|
+
readonly sandbox: "workspace-write";
|
|
39
|
+
};
|
|
40
|
+
readonly never: {
|
|
41
|
+
readonly approvalPolicy: "never";
|
|
42
|
+
};
|
|
43
|
+
readonly 'approve-for-me': {
|
|
44
|
+
readonly approvalPolicy: "on-request";
|
|
45
|
+
readonly approvalsReviewer: "auto_review";
|
|
46
|
+
readonly sandbox: "workspace-write";
|
|
47
|
+
};
|
|
48
|
+
readonly 'dangerously-bypass-approvals-and-sandbox': {
|
|
49
|
+
readonly approvalPolicy: "never";
|
|
50
|
+
readonly sandbox: "danger-full-access";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/** The permission params one mode sends to thread/start and thread/resume. */
|
|
54
|
+
export type CodexPermissionParams = (typeof THREAD_PERMISSION_PARAMS)[CodexPermissionMode];
|
|
55
|
+
/** The configured permission mode. */
|
|
56
|
+
export type CodexPermissionMode = keyof typeof THREAD_PERMISSION_PARAMS;
|
|
57
|
+
/** The model/cwd/permission facts a start or resume request asked for. */
|
|
58
|
+
export interface RequestedConfiguration {
|
|
59
|
+
readonly model?: string;
|
|
60
|
+
readonly cwd?: string;
|
|
61
|
+
readonly approvalPolicy?: string;
|
|
62
|
+
readonly approvalsReviewer?: string;
|
|
63
|
+
readonly sandbox?: string;
|
|
64
|
+
}
|
|
65
|
+
/** The facts the app-server reports after applying a start or resume request. */
|
|
66
|
+
export interface EffectiveConfiguration {
|
|
67
|
+
readonly model?: string;
|
|
68
|
+
readonly cwd?: string;
|
|
69
|
+
readonly approvalPolicy?: string;
|
|
70
|
+
readonly approvalsReviewer?: string;
|
|
71
|
+
readonly sandbox?: string;
|
|
72
|
+
/** Full server-reported policy; matching the mode alone does not prove its roots/network scope. */
|
|
73
|
+
readonly sandboxPolicy?: Readonly<Record<string, unknown>>;
|
|
74
|
+
/** Historical thread default, not evidence of this run's per-turn effort. */
|
|
75
|
+
readonly reasoningEffort?: string | null;
|
|
76
|
+
}
|
|
77
|
+
/** One path's requested/effective facts, kept for observability and comparison. */
|
|
78
|
+
export interface AppliedConfiguration {
|
|
79
|
+
readonly source: 'thread/start' | 'thread/resume';
|
|
80
|
+
readonly requested: RequestedConfiguration;
|
|
81
|
+
readonly effective: EffectiveConfiguration;
|
|
82
|
+
readonly matched: boolean;
|
|
83
|
+
/** Requested facts whose effective value is absent, malformed, or unsupported. */
|
|
84
|
+
readonly missing: readonly (keyof RequestedConfiguration)[];
|
|
85
|
+
/** Names of requested facts whose effective value differs; values are not echoed. */
|
|
86
|
+
readonly mismatches: readonly (keyof RequestedConfiguration)[];
|
|
87
|
+
}
|
|
88
|
+
/** Codex acknowledges the turn, but 0.165/0.166 do not echo its effective effort. */
|
|
89
|
+
export interface TurnConfiguration {
|
|
90
|
+
readonly requestedEffort?: string;
|
|
91
|
+
readonly effectiveEffort: null;
|
|
92
|
+
readonly evidence: 'turn/start-request';
|
|
93
|
+
readonly accepted: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** Overrides sent on `thread/resume` instead of silently preserving history. */
|
|
96
|
+
export interface CodexResumeOverrides {
|
|
97
|
+
/** Model override, when the caller/configuration supplied one. */
|
|
98
|
+
readonly model?: string;
|
|
99
|
+
/** Working directory override applied to the resumed thread. */
|
|
100
|
+
readonly cwd?: string;
|
|
101
|
+
/** Permission mode override. Omitted means preserve the thread's history. */
|
|
102
|
+
readonly permission?: CodexPermissionMode;
|
|
103
|
+
}
|
|
104
|
+
/** The rate-limit snapshot Codex sends separately from token usage. */
|
|
105
|
+
export interface CodexRateLimitsReport {
|
|
106
|
+
readonly observations: number;
|
|
107
|
+
/** Latest `rateLimits` object, exactly as reported. */
|
|
108
|
+
readonly latest?: Record<string, unknown>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* One image the run produced.
|
|
112
|
+
*
|
|
113
|
+
* Two shapes reach here. `imageView` names a file on this host, which the caller
|
|
114
|
+
* can read directly — the app-server never inlines it. An MCP tool result carries
|
|
115
|
+
* the bytes, which is how a computer-use screenshot arrives.
|
|
116
|
+
*/
|
|
117
|
+
export interface CodexImage {
|
|
118
|
+
/** A host path to read, for `imageView`. */
|
|
119
|
+
readonly path?: string;
|
|
120
|
+
/** Base64 bytes, for an image an MCP tool returned. */
|
|
121
|
+
readonly data?: string;
|
|
122
|
+
/** The bytes' media type, when the source named one. */
|
|
123
|
+
readonly mimeType?: string;
|
|
124
|
+
}
|
|
125
|
+
/** The stop reasons one run can end with. */
|
|
126
|
+
export type CodexStopReason = 'completed' | 'max-tokens' | 'error' | 'aborted' | 'timeout';
|
|
127
|
+
/**
|
|
128
|
+
* How long a thread lives.
|
|
129
|
+
*
|
|
130
|
+
* `ephemeral` is what this provider always did: the app-server's own notion of a
|
|
131
|
+
* throwaway thread, deleted when the connection ends, leaving nothing behind.
|
|
132
|
+
* `persistent` writes a rollout the Codex CLI can list and `thread/resume` can
|
|
133
|
+
* continue, which is also what puts it in front of the Codex desktop application.
|
|
134
|
+
*/
|
|
135
|
+
export type CodexThreadMode = 'ephemeral' | 'persistent';
|
|
136
|
+
/** One text-only task submitted to a turn. */
|
|
137
|
+
export type TaskText = string;
|
|
138
|
+
/** The structured failure facts observed for a turn. */
|
|
139
|
+
export interface CodexFailureFacts {
|
|
140
|
+
readonly stage: string;
|
|
141
|
+
readonly category: string;
|
|
142
|
+
readonly httpStatus?: number;
|
|
143
|
+
}
|
|
144
|
+
/** One thing that ends a turn. */
|
|
145
|
+
export interface TurnCompletion {
|
|
146
|
+
readonly params: {
|
|
147
|
+
readonly turn: unknown;
|
|
148
|
+
};
|
|
149
|
+
readonly order: number;
|
|
150
|
+
}
|
|
151
|
+
/** The end of one run. */
|
|
152
|
+
export interface WireRunResult {
|
|
153
|
+
readonly output: readonly {
|
|
154
|
+
readonly type: 'text';
|
|
155
|
+
readonly text: string;
|
|
156
|
+
}[];
|
|
157
|
+
readonly stopReason: CodexStopReason;
|
|
158
|
+
/** Images the run produced, for a caller that can deliver them. */
|
|
159
|
+
readonly images: readonly CodexImage[];
|
|
160
|
+
}
|
|
161
|
+
/** A decoded protocol object. */
|
|
162
|
+
type Record0 = Record<string, unknown>;
|
|
163
|
+
/**
|
|
164
|
+
* Race one pending operation against a cancellation signal.
|
|
165
|
+
*
|
|
166
|
+
* @param pending - the operation.
|
|
167
|
+
* @param signal - cancellation.
|
|
168
|
+
* @returns the operation's value.
|
|
169
|
+
*/
|
|
170
|
+
export declare function raceAbort<T>(pending: Promise<T>, signal: AbortSignal | undefined): Promise<T>;
|
|
171
|
+
/** The stream surface the wire reads for lifecycle events. */
|
|
172
|
+
export interface WireInput {
|
|
173
|
+
on(event: 'error', listener: (error: Error) => void): unknown;
|
|
174
|
+
on(event: 'end', listener: () => void): unknown;
|
|
175
|
+
off(event: 'end', listener: () => void): unknown;
|
|
176
|
+
}
|
|
177
|
+
/** The stream surface the wire writes to. */
|
|
178
|
+
export interface WireOutput {
|
|
179
|
+
on(event: 'error', listener: (error: Error) => void): unknown;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* What one wire needs beyond its transport.
|
|
183
|
+
*
|
|
184
|
+
* Bundled rather than positional: the caller's choice set grew past the point
|
|
185
|
+
* where six positional arguments stayed readable, and every one of them is a
|
|
186
|
+
* named decision the caller already holds.
|
|
187
|
+
*/
|
|
188
|
+
export interface CodexWireOptions {
|
|
189
|
+
/** Unattended permission policy for the thread. */
|
|
190
|
+
readonly permissionMode: CodexPermissionMode;
|
|
191
|
+
/** Model for `thread/start`, when the caller chose one. */
|
|
192
|
+
readonly model?: string | undefined;
|
|
193
|
+
/** How long the thread lives. Defaults to `ephemeral`. */
|
|
194
|
+
readonly threadMode?: CodexThreadMode | undefined;
|
|
195
|
+
/**
|
|
196
|
+
* What the app-server records as the thread's originator.
|
|
197
|
+
*
|
|
198
|
+
* This is `initialize`'s `clientInfo.name`, and for a thread to appear in the
|
|
199
|
+
* Codex desktop application it must be exactly `Codex Desktop` — that client
|
|
200
|
+
* filters its list by this one value. The default here is therefore that
|
|
201
|
+
* literal, and overriding it trades desktop visibility for an honest name.
|
|
202
|
+
*/
|
|
203
|
+
readonly originator?: string | undefined;
|
|
204
|
+
}
|
|
205
|
+
/** The originator the Codex desktop client lists. */
|
|
206
|
+
export declare const DEFAULT_ORIGINATOR = "Codex Desktop";
|
|
207
|
+
/**
|
|
208
|
+
* One app-server connection and its single ephemeral thread/turn.
|
|
209
|
+
*
|
|
210
|
+
* Deliberately exposes no generic request surface: supporting another product
|
|
211
|
+
* method must first become part of the provider contract.
|
|
212
|
+
*/
|
|
213
|
+
export declare class CodexAppServerWire {
|
|
214
|
+
#private;
|
|
215
|
+
constructor(input: WireInput, output: WireOutput, transport: LineTransport, options: CodexWireOptions);
|
|
216
|
+
/**
|
|
217
|
+
* Install a progress narrator.
|
|
218
|
+
*
|
|
219
|
+
* A delegation can run for minutes, so a caller that reports progress needs
|
|
220
|
+
* the child's intermediate activity rather than only its final answer. Never
|
|
221
|
+
* lets a reporter's failure reach the protocol loop.
|
|
222
|
+
*
|
|
223
|
+
* @param onProgress - called with one line per notable event.
|
|
224
|
+
*/
|
|
225
|
+
setProgressReporter(onProgress: (text: string) => void): void;
|
|
226
|
+
/** Whether protocol output ended before a terminal turn notification. */
|
|
227
|
+
get endedBeforeTerminal(): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Perform the required initialize/initialized handshake.
|
|
230
|
+
*
|
|
231
|
+
* @param signal - cancellation for an unpublished start.
|
|
232
|
+
*/
|
|
233
|
+
initialize(signal?: AbortSignal): Promise<void>;
|
|
234
|
+
/**
|
|
235
|
+
* Create the run's thread and retain its identity.
|
|
236
|
+
*
|
|
237
|
+
* `ephemeral` follows this wire's thread mode. The app-server reports the
|
|
238
|
+
* decision back, and the check below is what proves it honoured the request:
|
|
239
|
+
* a `persistent` thread that came back ephemeral would be a silent downgrade,
|
|
240
|
+
* and the caller is about to promise the user a thread they can resume.
|
|
241
|
+
*
|
|
242
|
+
* @param cwd - the parent session's workspace.
|
|
243
|
+
* @param signal - cancellation for an unpublished start.
|
|
244
|
+
*/
|
|
245
|
+
startThread(cwd: string, signal?: AbortSignal): Promise<void>;
|
|
246
|
+
/**
|
|
247
|
+
* Continue an existing thread instead of creating one.
|
|
248
|
+
*
|
|
249
|
+
* Codex 0.165+ accepts configuration overrides on `thread/resume`. Parameters
|
|
250
|
+
* that are present replace the thread's historical values; absent parameters
|
|
251
|
+
* leave history alone. The response is compared with the requested facts so a
|
|
252
|
+
* caller never mistakes a requested model, cwd, or permission policy for an
|
|
253
|
+
* effective one.
|
|
254
|
+
*
|
|
255
|
+
* The app-server refuses a thread with no rollout yet, so a thread becomes
|
|
256
|
+
* resumable only after it has carried one turn.
|
|
257
|
+
*
|
|
258
|
+
* @param threadId - the thread to continue, as a previous run reported it.
|
|
259
|
+
* @param overrides - explicit model/cwd/permission facts to apply.
|
|
260
|
+
* @param signal - cancellation for an unpublished resume.
|
|
261
|
+
*/
|
|
262
|
+
resumeThread(threadId: string, overrides?: CodexResumeOverrides, signal?: AbortSignal): Promise<void>;
|
|
263
|
+
/**
|
|
264
|
+
* Give the thread a name.
|
|
265
|
+
*
|
|
266
|
+
* The name is what a person sees in the Codex application's thread list. It
|
|
267
|
+
* matters here because a thread this provider creates has to report itself as
|
|
268
|
+
* `Codex Desktop` to be listed at all, so the name is the only place left to
|
|
269
|
+
* say that the work came from DSH and what it was. Best effort: a thread that
|
|
270
|
+
* ran is worth more than a naming failure, so the caller is told rather than
|
|
271
|
+
* thrown at.
|
|
272
|
+
*
|
|
273
|
+
* @param name - the name to record.
|
|
274
|
+
* @param signal - cancellation for an unpublished request.
|
|
275
|
+
* @returns whether the app-server accepted it.
|
|
276
|
+
*/
|
|
277
|
+
setThreadName(name: string, signal?: AbortSignal): Promise<boolean>;
|
|
278
|
+
/** The images this run produced, in arrival order. */
|
|
279
|
+
get images(): readonly CodexImage[];
|
|
280
|
+
/** The thread this wire is working in, once it has one. */
|
|
281
|
+
get threadId(): string | undefined;
|
|
282
|
+
/** Authoritative turn id, adopted only after the start response agrees. */
|
|
283
|
+
get turnId(): string | undefined;
|
|
284
|
+
/** Conservative request boundary, not inferred from progress or a known PID. */
|
|
285
|
+
get dispatch(): 'not-dispatched' | 'possible' | 'accepted';
|
|
286
|
+
/** Token usage attributable to this one delegation; never a zero guess. */
|
|
287
|
+
get usageReport(): CodexUsageReport;
|
|
288
|
+
/** Account rate limits, kept separate from token usage. */
|
|
289
|
+
get rateLimitsReport(): CodexRateLimitsReport;
|
|
290
|
+
/** The requested and effective configuration of the one start/resume. */
|
|
291
|
+
get configuration(): AppliedConfiguration | undefined;
|
|
292
|
+
get turnConfiguration(): TurnConfiguration | undefined;
|
|
293
|
+
/**
|
|
294
|
+
* Submit the one text-only task and wait for this thread/turn's terminal
|
|
295
|
+
* notification.
|
|
296
|
+
*
|
|
297
|
+
* @param texts - already validated task text blocks.
|
|
298
|
+
* @param signal - local cancellation for the published run.
|
|
299
|
+
* @param effort - per-turn thinking level, if the caller chose one.
|
|
300
|
+
* @returns the selected output and its stop reason.
|
|
301
|
+
*/
|
|
302
|
+
runTurn(texts: readonly TaskText[], signal?: AbortSignal, effort?: string, images?: readonly string[], outputSchema?: Record0, lifecycle?: (stage: 'dispatch-intent' | 'dispatch-possible' | 'turn-accepted') => Promise<void>): Promise<WireRunResult>;
|
|
303
|
+
/** The best non-commentary answer observed so far, preserving exact bytes. */
|
|
304
|
+
get partialOutput(): readonly {
|
|
305
|
+
readonly type: 'text';
|
|
306
|
+
readonly text: string;
|
|
307
|
+
}[];
|
|
308
|
+
/**
|
|
309
|
+
* Best-effort remote cancellation. Local settlement and process teardown stay
|
|
310
|
+
* authoritative when the child no longer accepts protocol requests.
|
|
311
|
+
*/
|
|
312
|
+
interrupt(): void;
|
|
313
|
+
/** The latest safe unattended permission fact observed for this run. */
|
|
314
|
+
collectDiagnostic(): string | undefined;
|
|
315
|
+
/** The structured failure fact observed for this published turn. */
|
|
316
|
+
collectFailure(): CodexFailureFacts | undefined;
|
|
317
|
+
/** Detach listeners and fail outstanding requests. Idempotent. */
|
|
318
|
+
close(): void;
|
|
319
|
+
}
|
|
320
|
+
export {};
|
|
321
|
+
//# sourceMappingURL=wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAqB,KAAK,gBAAgB,EAAmC,MAAM,YAAY,CAAA;AAKtG,4EAA4E;AAC5E,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;CAmBpB,CAAA;AAEV,8EAA8E;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,mBAAmB,CAAC,CAAA;AAE1F,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,wBAAwB,CAAA;AAEvE,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,cAAc,CAAC,EAAE,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