@relayflows/sdk 2.0.20 → 2.0.22

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.
Files changed (107) hide show
  1. package/dist/agent-reaper.d.ts +4 -0
  2. package/dist/agent-reaper.d.ts.map +1 -0
  3. package/dist/agent-reaper.js +53 -0
  4. package/dist/agent-reaper.js.map +1 -0
  5. package/dist/agent-transcript.d.ts +186 -0
  6. package/dist/agent-transcript.d.ts.map +1 -0
  7. package/dist/agent-transcript.js +585 -0
  8. package/dist/agent-transcript.js.map +1 -0
  9. package/dist/child-stop.d.ts +1 -1
  10. package/dist/child-stop.d.ts.map +1 -1
  11. package/dist/child-stop.js +68 -12
  12. package/dist/child-stop.js.map +1 -1
  13. package/dist/cli/run.js +2 -1
  14. package/dist/cli/run.js.map +1 -1
  15. package/dist/cli/status.d.ts +34 -0
  16. package/dist/cli/status.d.ts.map +1 -0
  17. package/dist/cli/status.js +307 -0
  18. package/dist/cli/status.js.map +1 -0
  19. package/dist/cli/step-failure.js +31 -7
  20. package/dist/cli/step-failure.js.map +1 -1
  21. package/dist/cli-commands.d.ts +13 -0
  22. package/dist/cli-commands.d.ts.map +1 -1
  23. package/dist/cli-commands.js +11 -0
  24. package/dist/cli-commands.js.map +1 -1
  25. package/dist/cli.d.ts +2 -1
  26. package/dist/cli.d.ts.map +1 -1
  27. package/dist/cli.js +9 -0
  28. package/dist/cli.js.map +1 -1
  29. package/dist/failure-kinds.d.ts +15 -2
  30. package/dist/failure-kinds.d.ts.map +1 -1
  31. package/dist/failure-kinds.js +8 -0
  32. package/dist/failure-kinds.js.map +1 -1
  33. package/dist/journal-reader.d.ts +1 -1
  34. package/dist/journal-reader.d.ts.map +1 -1
  35. package/dist/journal-reader.js +3 -1
  36. package/dist/journal-reader.js.map +1 -1
  37. package/dist/llm-worker.d.ts.map +1 -1
  38. package/dist/llm-worker.js +12 -1
  39. package/dist/llm-worker.js.map +1 -1
  40. package/dist/permissions-preflight.d.ts +22 -0
  41. package/dist/permissions-preflight.d.ts.map +1 -0
  42. package/dist/permissions-preflight.js +49 -0
  43. package/dist/permissions-preflight.js.map +1 -0
  44. package/dist/preflight.d.ts.map +1 -1
  45. package/dist/preflight.js +6 -0
  46. package/dist/preflight.js.map +1 -1
  47. package/dist/pty-sidechannel.d.ts +7 -0
  48. package/dist/pty-sidechannel.d.ts.map +1 -1
  49. package/dist/pty-sidechannel.js.map +1 -1
  50. package/dist/redact.d.ts +16 -0
  51. package/dist/redact.d.ts.map +1 -0
  52. package/dist/redact.js +104 -0
  53. package/dist/redact.js.map +1 -0
  54. package/dist/run-state.d.ts +124 -0
  55. package/dist/run-state.d.ts.map +1 -0
  56. package/dist/run-state.js +368 -0
  57. package/dist/run-state.js.map +1 -0
  58. package/dist/spec.d.ts +16 -1
  59. package/dist/spec.d.ts.map +1 -1
  60. package/dist/spec.js.map +1 -1
  61. package/dist/step-env.d.ts +25 -0
  62. package/dist/step-env.d.ts.map +1 -0
  63. package/dist/step-env.js +34 -0
  64. package/dist/step-env.js.map +1 -0
  65. package/dist/transcript-tail.d.ts +54 -0
  66. package/dist/transcript-tail.d.ts.map +1 -0
  67. package/dist/transcript-tail.js +176 -0
  68. package/dist/transcript-tail.js.map +1 -0
  69. package/dist/worker-cli.d.ts +18 -0
  70. package/dist/worker-cli.d.ts.map +1 -1
  71. package/dist/worker-cli.js +219 -22
  72. package/dist/worker-cli.js.map +1 -1
  73. package/dist/worker-usage.d.ts +15 -2
  74. package/dist/worker-usage.d.ts.map +1 -1
  75. package/dist/worker-usage.js +40 -3
  76. package/dist/worker-usage.js.map +1 -1
  77. package/dist/worker.d.ts.map +1 -1
  78. package/dist/worker.js +31 -6
  79. package/dist/worker.js.map +1 -1
  80. package/dist/wrapper-runtime.d.ts +7 -1
  81. package/dist/wrapper-runtime.d.ts.map +1 -1
  82. package/dist/wrapper-runtime.js +7 -1
  83. package/dist/wrapper-runtime.js.map +1 -1
  84. package/package.json +2 -2
  85. package/src/agent-reaper.ts +52 -0
  86. package/src/agent-transcript.ts +651 -0
  87. package/src/child-stop.ts +62 -12
  88. package/src/cli/run.ts +2 -1
  89. package/src/cli/status.ts +329 -0
  90. package/src/cli/step-failure.ts +32 -7
  91. package/src/cli-commands.ts +11 -0
  92. package/src/cli.ts +8 -0
  93. package/src/failure-kinds.ts +15 -1
  94. package/src/journal-reader.ts +4 -2
  95. package/src/llm-worker.ts +12 -1
  96. package/src/permissions-preflight.ts +53 -0
  97. package/src/preflight.ts +6 -0
  98. package/src/pty-sidechannel.ts +7 -0
  99. package/src/redact.ts +106 -0
  100. package/src/run-state.ts +468 -0
  101. package/src/spec.ts +16 -1
  102. package/src/step-env.ts +47 -0
  103. package/src/transcript-tail.ts +193 -0
  104. package/src/worker-cli.ts +213 -21
  105. package/src/worker-usage.ts +39 -3
  106. package/src/worker.ts +32 -6
  107. package/src/wrapper-runtime.ts +7 -1
@@ -0,0 +1,4 @@
1
+ import type { ChildStop } from './child-stop.js';
2
+ /** Kill this agent tree if the process ends first. Returns the release. */
3
+ export declare function reapOnExit(stop: ChildStop): () => void;
4
+ //# sourceMappingURL=agent-reaper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-reaper.d.ts","sourceRoot":"","sources":["../src/agent-reaper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA2CjD,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,IAAI,CAOtD"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * An agent CLI runs in a process group of its own, so nothing that ends this
3
+ * process reaches it by default: a signal to our pid, or to our group, leaves
4
+ * it running, reparented to init. That is how a `claude` outlived a Cloud run
5
+ * that was killed at its deadline, for hours. While any agent is live this
6
+ * module kills every live agent tree on the way out:
7
+ *
8
+ * - on `'exit'`, which covers normal exit and `process.exit()`;
9
+ * - on SIGINT, SIGTERM and SIGHUP, but only where the default action would
10
+ * have ended the process anyway — this listener is the only one. It then
11
+ * removes itself and re-raises the signal, so the process still dies of it.
12
+ * A host that installed its own listener owns that signal; it aborts the
13
+ * lease signal, and the abort already stops the tree.
14
+ *
15
+ * Nothing survives a SIGKILL of this process; that needs a supervisor.
16
+ */
17
+ const live = new Set();
18
+ const FATAL_SIGNALS = ['SIGINT', 'SIGTERM', 'SIGHUP'];
19
+ function killAll() {
20
+ for (const stop of live)
21
+ stop.kill();
22
+ live.clear();
23
+ }
24
+ function onFatalSignal(signal) {
25
+ if (process.listenerCount(signal) !== 1)
26
+ return;
27
+ killAll();
28
+ uninstall();
29
+ process.kill(process.pid, signal);
30
+ }
31
+ function install() {
32
+ process.on('exit', killAll);
33
+ for (const signal of FATAL_SIGNALS)
34
+ process.on(signal, onFatalSignal);
35
+ }
36
+ function uninstall() {
37
+ process.off('exit', killAll);
38
+ for (const signal of FATAL_SIGNALS)
39
+ process.off(signal, onFatalSignal);
40
+ }
41
+ /** Kill this agent tree if the process ends first. Returns the release. */
42
+ export function reapOnExit(stop) {
43
+ if (live.size === 0)
44
+ install();
45
+ live.add(stop);
46
+ return () => {
47
+ if (!live.delete(stop))
48
+ return;
49
+ if (live.size === 0)
50
+ uninstall();
51
+ };
52
+ }
53
+ //# sourceMappingURL=agent-reaper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-reaper.js","sourceRoot":"","sources":["../src/agent-reaper.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,IAAI,GAAG,IAAI,GAAG,EAAa,CAAC;AAClC,MAAM,aAAa,GAA8B,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAEjF,SAAS,OAAO;IACd,KAAK,MAAM,IAAI,IAAI,IAAI;QAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IACrC,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,MAAsB;IAC3C,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC;QAAE,OAAO;IAChD,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,CAAC;IACZ,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,OAAO;IACd,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,KAAK,MAAM,MAAM,IAAI,aAAa;QAAE,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,KAAK,MAAM,MAAM,IAAI,aAAa;QAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACzE,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,UAAU,CAAC,IAAe;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC/B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACf,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YAAE,OAAO;QAC/B,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC;YAAE,SAAS,EAAE,CAAC;IACnC,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,186 @@
1
+ import { type SidechannelContext } from './pty-sidechannel.js';
2
+ /**
3
+ * Per-attempt agent transcript: the redacted, capped `stream-json` file the
4
+ * worker writes beside the PTY socket, and the ≤ 8 KiB digest of it that rides
5
+ * in `trajectory_tail` on every completion.
6
+ *
7
+ * Every bound below is enforced here and stated in what it produces — a
8
+ * marker line at a seam, a suffix on a cut string, a boolean on the digest —
9
+ * so a reader is told what was dropped rather than left to guess.
10
+ */
11
+ /** Cap on one attempt's transcript file: the first 128 KiB whole, then a rolling tail. */
12
+ export declare const TRANSCRIPT_FILE_MAX_BYTES: number;
13
+ export declare const TRANSCRIPT_HEAD_BYTES: number;
14
+ export declare const TRANSCRIPT_TAIL_BYTES: number;
15
+ /** Cap on any one string leaf inside a frame (tool results, thinking, text). */
16
+ export declare const TRANSCRIPT_STRING_MAX_BYTES: number;
17
+ /**
18
+ * Cap on the serialized digest. Half the kernel's 16 KiB `trajectory_tail`
19
+ * boundary (relayflowd/src/server.rs), leaving room for the `relay_task`
20
+ * sibling the worker already journals.
21
+ */
22
+ export declare const TRANSCRIPT_DIGEST_MAX_BYTES: number;
23
+ /** Cap on an llm step's `trajectory_tail.error`; over 16 KiB the kernel refuses the completion. */
24
+ export declare const LLM_ERROR_MAX_BYTES: number;
25
+ export declare const FINAL_TEXT_MAX_BYTES: number;
26
+ export declare const FAILURE_EXCERPT_MAX_BYTES = 1024;
27
+ export declare const TOOL_INPUT_EXCERPT_MAX_CHARS = 120;
28
+ /**
29
+ * Cap on any single provider-supplied identifier copied into `result`
30
+ * (`model`, `session_id`, `stop_reason`, `subtype`, `claude_code_version`) and
31
+ * on a tool name. These are attacker-influenceable strings that no reduction
32
+ * step in `boundTranscriptDigest` trims, so they are bounded where they enter.
33
+ */
34
+ export declare const DIGEST_LABEL_MAX_BYTES = 256;
35
+ /**
36
+ * Bytes reserved inside `TRANSCRIPT_FILE_MAX_BYTES` for the
37
+ * `relayflow.truncated` marker, so a full head plus a full tail plus the
38
+ * marker still fits the stated per-attempt cap. The marker serializes to
39
+ * well under this even with 20-digit counters.
40
+ */
41
+ export declare const TRUNCATION_MARKER_RESERVE = 256;
42
+ export declare const TOOL_COUNTS_MAX = 32;
43
+ export declare const TOOL_LAST_CALLS_MAX = 20;
44
+ export declare const ARTIFACT_PATHS_MAX = 50;
45
+ export interface TranscriptFile {
46
+ path: string;
47
+ /** Bytes the redacted transcript would have occupied without the file cap. */
48
+ bytes_total: number;
49
+ bytes_kept: number;
50
+ frames_total: number;
51
+ frames_kept: number;
52
+ truncated: boolean;
53
+ sha256: string;
54
+ }
55
+ export interface TranscriptToolCall {
56
+ seq: number;
57
+ name: string;
58
+ input_excerpt: string;
59
+ result_bytes?: number;
60
+ is_error?: boolean;
61
+ }
62
+ export interface TranscriptDigest {
63
+ attempt?: number;
64
+ exit_code?: number | null;
65
+ file?: TranscriptFile;
66
+ result?: {
67
+ provider: 'claude' | 'codex';
68
+ model?: string;
69
+ claude_code_version?: string;
70
+ session_id?: string;
71
+ subtype?: string;
72
+ is_error?: boolean;
73
+ stop_reason?: string;
74
+ num_turns?: number;
75
+ duration_ms?: number;
76
+ duration_api_ms?: number;
77
+ total_cost_usd?: number;
78
+ usage?: {
79
+ input?: number;
80
+ output?: number;
81
+ cache_read?: number;
82
+ cache_creation?: number;
83
+ thinking?: number;
84
+ };
85
+ permission_denials?: number;
86
+ };
87
+ tools?: {
88
+ counts: Array<{
89
+ name: string;
90
+ calls: number;
91
+ errors: number;
92
+ }>;
93
+ last_calls: TranscriptToolCall[];
94
+ total_calls: number;
95
+ shown_calls: number;
96
+ /** False when the provider's frames are only counted, not paired (Codex). */
97
+ complete: boolean;
98
+ };
99
+ final_text?: string;
100
+ final_text_truncated?: boolean;
101
+ failure?: {
102
+ kind: 'result' | 'tool_result' | 'stderr';
103
+ excerpt: string;
104
+ truncated?: boolean;
105
+ };
106
+ artifacts?: {
107
+ count: number;
108
+ paths: string[];
109
+ };
110
+ /**
111
+ * Set when even the ordered reductions left the digest over its cap and it
112
+ * was cut back to fixed-size fields — every provider-supplied string but a
113
+ * bounded file path is gone. A reader is told rather than left guessing.
114
+ */
115
+ core_only?: boolean;
116
+ }
117
+ type RecordValue = Record<string, unknown>;
118
+ /** `…/runs/<runId>/steps/<stepId>/attempt-<n>.transcript.jsonl`, beside the PTY socket. */
119
+ export declare function transcriptPath(context: Pick<SidechannelContext, 'dataDir' | 'runId' | 'stepId'>, attempt: number): string;
120
+ /**
121
+ * Relay-issued token prefixes, shared with `redactRelayError` (worker-cli.ts).
122
+ * The tail must be at least 8 characters so journal keys such as `at_ms` are
123
+ * not mistaken for tokens.
124
+ */
125
+ export declare const RELAY_TOKEN_PATTERN: RegExp;
126
+ export type Redactor = (text: string) => string;
127
+ /**
128
+ * One redactor for one environment: the values of secret-named variables are
129
+ * resolved once, so a writer redacting thousands of strings does not rescan
130
+ * `process.env` for each.
131
+ */
132
+ export declare function createRedactor(env?: NodeJS.ProcessEnv): Redactor;
133
+ /** Redact one string against `env` (D6 rules 2–4). */
134
+ export declare function redactText(text: string, env?: NodeJS.ProcessEnv): string;
135
+ /** Cut `text` to at most `maxBytes` of UTF-8 on a code-point boundary. */
136
+ export declare function utf8Head(text: string, maxBytes: number): string;
137
+ /** The last `maxBytes` of `text`, on a code-point boundary. */
138
+ export declare function utf8Tail(text: string, maxBytes: number): string;
139
+ /** Head-cut with the truncation stated in the value itself. */
140
+ export declare function boundedText(text: string, maxBytes: number, label?: string): {
141
+ text: string;
142
+ truncated: boolean;
143
+ };
144
+ /**
145
+ * Redact and bound every string leaf of a parsed frame, and reduce the
146
+ * `system/init` frame to its whitelist. Unknown frame types are kept as they
147
+ * are, minus the same string treatment.
148
+ */
149
+ export declare function reduceFrame(frame: unknown, redact: Redactor): unknown;
150
+ export interface TranscriptWriter {
151
+ /** One stdout line, without its newline. Never throws; a failed file is reported by `close`. */
152
+ write(line: string): void;
153
+ /** Flush the tail, finish the file, and describe it — `undefined` when the file could not be written. */
154
+ close(): Promise<TranscriptFile | undefined>;
155
+ }
156
+ /**
157
+ * Open the per-attempt transcript file. The first `TRANSCRIPT_HEAD_BYTES` are
158
+ * written as they arrive, so a crash mid-run still leaves the start of the
159
+ * transcript on disk; past that a ring of the last `TRANSCRIPT_TAIL_BYTES`
160
+ * is kept and flushed on close, behind one `relayflow.truncated` marker line
161
+ * that says how much fell between them.
162
+ */
163
+ export declare function openTranscriptWriter(path: string, env?: NodeJS.ProcessEnv): Promise<TranscriptWriter | undefined>;
164
+ /**
165
+ * Build the digest from the frames `decodeProviderResult` already parsed.
166
+ * Claude: `tool_use` blocks are paired with `tool_result` blocks by
167
+ * `tool_use_id`; `init` supplies model and version. Codex: `item.completed`
168
+ * items are counted by `item.type` only, so `tools.complete` is false.
169
+ * `failure` is filled only when the attempt did not succeed.
170
+ */
171
+ export declare function buildTranscriptDigest(frames: RecordValue[], kind: 'claude' | 'codex', outcome: {
172
+ exit_code: number | null;
173
+ stderr_tail: string;
174
+ }, env?: NodeJS.ProcessEnv): Pick<TranscriptDigest, 'result' | 'tools' | 'final_text' | 'final_text_truncated' | 'failure'>;
175
+ /** Serialized size of the digest as it will be journaled. */
176
+ export declare function digestBytes(digest: TranscriptDigest): number;
177
+ /**
178
+ * Shrink the digest until it serializes to at most `TRANSCRIPT_DIGEST_MAX_BYTES`,
179
+ * in a fixed order: recent tool calls, artifact paths, final text, failure
180
+ * excerpt, tool counts. Each cut leaves its mark — `shown_calls` under
181
+ * `total_calls`, `artifacts.count` above `paths.length`, `final_text_truncated`,
182
+ * `failure.truncated` — so a reader knows the digest is not the whole account.
183
+ */
184
+ export declare function boundTranscriptDigest(digest: TranscriptDigest): TranscriptDigest;
185
+ export {};
186
+ //# sourceMappingURL=agent-transcript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-transcript.d.ts","sourceRoot":"","sources":["../src/agent-transcript.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE9E;;;;;;;;GAQG;AAEH,0FAA0F;AAC1F,eAAO,MAAM,yBAAyB,QAAc,CAAC;AACrD,eAAO,MAAM,qBAAqB,QAAa,CAAC;AAChD,eAAO,MAAM,qBAAqB,QAAoD,CAAC;AACvF,gFAAgF;AAChF,eAAO,MAAM,2BAA2B,QAAY,CAAC;AACrD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAAW,CAAC;AACpD,mGAAmG;AACnG,eAAO,MAAM,mBAAmB,QAAW,CAAC;AAE5C,eA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