@slopus/rig-codemode-codex 0.0.0-bootstrap.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.
Files changed (88) hide show
  1. package/LICENSE +201 -0
  2. package/LICENSE-CODEX +201 -0
  3. package/NOTICE-CODEX +6 -0
  4. package/README.md +124 -0
  5. package/THIRD-PARTY-LICENSES.json +966 -0
  6. package/THIRD-PARTY-NOTICES.md +9 -0
  7. package/UPSTREAM.md +26 -0
  8. package/dist/CodeMode.d.ts +13 -0
  9. package/dist/CodeMode.d.ts.map +1 -0
  10. package/dist/CodeMode.js +64 -0
  11. package/dist/CodeMode.js.map +1 -0
  12. package/dist/CodeModeHostCommand.d.ts +15 -0
  13. package/dist/CodeModeHostCommand.d.ts.map +1 -0
  14. package/dist/CodeModeHostCommand.js +2 -0
  15. package/dist/CodeModeHostCommand.js.map +1 -0
  16. package/dist/CodeModeSession.d.ts +38 -0
  17. package/dist/CodeModeSession.d.ts.map +1 -0
  18. package/dist/CodeModeSession.js +207 -0
  19. package/dist/CodeModeSession.js.map +1 -0
  20. package/dist/Deferred.d.ts +7 -0
  21. package/dist/Deferred.d.ts.map +1 -0
  22. package/dist/Deferred.js +12 -0
  23. package/dist/Deferred.js.map +1 -0
  24. package/dist/FramedProcess.d.ts +21 -0
  25. package/dist/FramedProcess.d.ts.map +1 -0
  26. package/dist/FramedProcess.js +125 -0
  27. package/dist/FramedProcess.js.map +1 -0
  28. package/dist/HostClient.d.ts +41 -0
  29. package/dist/HostClient.d.ts.map +1 -0
  30. package/dist/HostClient.js +261 -0
  31. package/dist/HostClient.js.map +1 -0
  32. package/dist/assertJsonValue.d.ts +3 -0
  33. package/dist/assertJsonValue.d.ts.map +1 -0
  34. package/dist/assertJsonValue.js +39 -0
  35. package/dist/assertJsonValue.js.map +1 -0
  36. package/dist/createCodeMode.d.ts +4 -0
  37. package/dist/createCodeMode.d.ts.map +1 -0
  38. package/dist/createCodeMode.js +5 -0
  39. package/dist/createCodeMode.js.map +1 -0
  40. package/dist/createCodeModeHostCommand.d.ts +3 -0
  41. package/dist/createCodeModeHostCommand.d.ts.map +1 -0
  42. package/dist/createCodeModeHostCommand.js +22 -0
  43. package/dist/createCodeModeHostCommand.js.map +1 -0
  44. package/dist/createLinuxSandboxCommand.d.ts +3 -0
  45. package/dist/createLinuxSandboxCommand.d.ts.map +1 -0
  46. package/dist/createLinuxSandboxCommand.js +27 -0
  47. package/dist/createLinuxSandboxCommand.js.map +1 -0
  48. package/dist/createMacOsSandboxCommand.d.ts +3 -0
  49. package/dist/createMacOsSandboxCommand.d.ts.map +1 -0
  50. package/dist/createMacOsSandboxCommand.js +9 -0
  51. package/dist/createMacOsSandboxCommand.js.map +1 -0
  52. package/dist/createMacOsSandboxProfile.d.ts +2 -0
  53. package/dist/createMacOsSandboxProfile.d.ts.map +1 -0
  54. package/dist/createMacOsSandboxProfile.js +50 -0
  55. package/dist/createMacOsSandboxProfile.js.map +1 -0
  56. package/dist/index.d.ts +7 -0
  57. package/dist/index.d.ts.map +1 -0
  58. package/dist/index.js +6 -0
  59. package/dist/index.js.map +1 -0
  60. package/dist/platform.d.ts +46 -0
  61. package/dist/platform.d.ts.map +1 -0
  62. package/dist/platform.js +45 -0
  63. package/dist/platform.js.map +1 -0
  64. package/dist/protocol.d.ts +113 -0
  65. package/dist/protocol.d.ts.map +1 -0
  66. package/dist/protocol.js +2 -0
  67. package/dist/protocol.js.map +1 -0
  68. package/dist/resolveCodeModeBinary.d.ts +2 -0
  69. package/dist/resolveCodeModeBinary.d.ts.map +1 -0
  70. package/dist/resolveCodeModeBinary.js +44 -0
  71. package/dist/resolveCodeModeBinary.js.map +1 -0
  72. package/dist/resolveCodeModeSandboxExecutable.d.ts +2 -0
  73. package/dist/resolveCodeModeSandboxExecutable.d.ts.map +1 -0
  74. package/dist/resolveCodeModeSandboxExecutable.js +28 -0
  75. package/dist/resolveCodeModeSandboxExecutable.js.map +1 -0
  76. package/dist/runCode.d.ts +3 -0
  77. package/dist/runCode.d.ts.map +1 -0
  78. package/dist/runCode.js +22 -0
  79. package/dist/runCode.js.map +1 -0
  80. package/dist/toCodeModeResponse.d.ts +4 -0
  81. package/dist/toCodeModeResponse.d.ts.map +1 -0
  82. package/dist/toCodeModeResponse.js +26 -0
  83. package/dist/toCodeModeResponse.js.map +1 -0
  84. package/dist/types.d.ts +79 -0
  85. package/dist/types.d.ts.map +1 -0
  86. package/dist/types.js +2 -0
  87. package/dist/types.js.map +1 -0
  88. package/package.json +49 -0
@@ -0,0 +1,45 @@
1
+ export const PLATFORM_TARGETS = {
2
+ "darwin-arm64": {
3
+ alias: "@slopus/rig-codemode-codex-darwin-arm64",
4
+ arch: "arm64",
5
+ os: "darwin",
6
+ tag: "darwin-arm64",
7
+ target: "aarch64-apple-darwin",
8
+ },
9
+ "darwin-x64": {
10
+ alias: "@slopus/rig-codemode-codex-darwin-x64",
11
+ arch: "x64",
12
+ os: "darwin",
13
+ tag: "darwin-x64",
14
+ target: "x86_64-apple-darwin",
15
+ },
16
+ "linux-arm64": {
17
+ alias: "@slopus/rig-codemode-codex-linux-arm64",
18
+ arch: "arm64",
19
+ os: "linux",
20
+ tag: "linux-arm64",
21
+ target: "aarch64-unknown-linux-musl",
22
+ },
23
+ "linux-x64": {
24
+ alias: "@slopus/rig-codemode-codex-linux-x64",
25
+ arch: "x64",
26
+ os: "linux",
27
+ tag: "linux-x64",
28
+ target: "x86_64-unknown-linux-musl",
29
+ },
30
+ "win32-arm64": {
31
+ alias: "@slopus/rig-codemode-codex-win32-arm64",
32
+ arch: "arm64",
33
+ os: "win32",
34
+ tag: "win32-arm64",
35
+ target: "aarch64-pc-windows-msvc",
36
+ },
37
+ "win32-x64": {
38
+ alias: "@slopus/rig-codemode-codex-win32-x64",
39
+ arch: "x64",
40
+ os: "win32",
41
+ tag: "win32-x64",
42
+ target: "x86_64-pc-windows-msvc",
43
+ },
44
+ };
45
+ //# sourceMappingURL=platform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../sources/platform.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,cAAc,EAAE;QACZ,KAAK,EAAE,yCAAyC;QAChD,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,QAAQ;QACZ,GAAG,EAAE,cAAc;QACnB,MAAM,EAAE,sBAAsB;KACjC;IACD,YAAY,EAAE;QACV,KAAK,EAAE,uCAAuC;QAC9C,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,QAAQ;QACZ,GAAG,EAAE,YAAY;QACjB,MAAM,EAAE,qBAAqB;KAChC;IACD,aAAa,EAAE;QACX,KAAK,EAAE,wCAAwC;QAC/C,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,OAAO;QACX,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE,4BAA4B;KACvC;IACD,WAAW,EAAE;QACT,KAAK,EAAE,sCAAsC;QAC7C,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,OAAO;QACX,GAAG,EAAE,WAAW;QAChB,MAAM,EAAE,2BAA2B;KACtC;IACD,aAAa,EAAE;QACX,KAAK,EAAE,wCAAwC;QAC/C,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,OAAO;QACX,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE,yBAAyB;KACpC;IACD,WAAW,EAAE;QACT,KAAK,EAAE,sCAAsC;QAC7C,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,OAAO;QACX,GAAG,EAAE,WAAW;QAChB,MAAM,EAAE,wBAAwB;KACnC;CACK,CAAC"}
@@ -0,0 +1,113 @@
1
+ import type { CodeModeContentItem, CodeModeToolKind, JsonValue } from "./types.js";
2
+ export declare const MAX_FRAME_BYTES: number;
3
+ export interface WireToolName {
4
+ readonly name: string;
5
+ readonly namespace: string | null;
6
+ }
7
+ export interface WireToolDefinition {
8
+ readonly name: string;
9
+ readonly tool_name: WireToolName;
10
+ readonly description: string;
11
+ readonly kind: CodeModeToolKind;
12
+ readonly input_schema: JsonValue | null;
13
+ readonly output_schema: JsonValue | null;
14
+ }
15
+ export interface WireNestedToolCall {
16
+ readonly cell_id: string;
17
+ readonly runtime_tool_call_id: string;
18
+ readonly tool_name: WireToolName;
19
+ readonly tool_kind: CodeModeToolKind;
20
+ readonly input: JsonValue | null;
21
+ }
22
+ export type WireRuntimeResponse = {
23
+ readonly Result: WireRuntimeResponseValue & {
24
+ readonly error_text: string | null;
25
+ };
26
+ } | {
27
+ readonly Terminated: WireRuntimeResponseValue;
28
+ } | {
29
+ readonly Yielded: WireRuntimeResponseValue;
30
+ };
31
+ export interface WireRuntimeResponseValue {
32
+ readonly cell_id: string;
33
+ readonly content_items: readonly CodeModeContentItem[];
34
+ }
35
+ export type WireResult<T> = {
36
+ readonly status: "error";
37
+ readonly message: string;
38
+ } | {
39
+ readonly status: "ok";
40
+ readonly value: T;
41
+ };
42
+ export type HostMessage = {
43
+ readonly type: "cell/closed";
44
+ readonly sessionId: string;
45
+ readonly cellId: string;
46
+ } | {
47
+ readonly type: "connection/ready";
48
+ readonly selectedVersion: number;
49
+ readonly capabilities: readonly string[];
50
+ } | {
51
+ readonly type: "connection/rejected";
52
+ readonly reason: unknown;
53
+ } | {
54
+ readonly type: "delegate/cancel";
55
+ readonly id: number;
56
+ } | {
57
+ readonly type: "delegate/request";
58
+ readonly id: number;
59
+ readonly sessionId: string;
60
+ readonly request: {
61
+ readonly type: "notification/send";
62
+ readonly callId: string;
63
+ readonly cellId: string;
64
+ readonly text: string;
65
+ } | {
66
+ readonly type: "tool/invoke";
67
+ readonly invocation: WireNestedToolCall;
68
+ };
69
+ } | {
70
+ readonly type: "execute/initialResponse";
71
+ readonly id: number;
72
+ readonly result: WireResult<WireRuntimeResponse>;
73
+ } | {
74
+ readonly type: "operation/response";
75
+ readonly id: number;
76
+ readonly result: WireResult<HostOperationResponse>;
77
+ };
78
+ export type HostOperationResponse = {
79
+ readonly type: "execution/started";
80
+ readonly cellId: string;
81
+ } | {
82
+ readonly type: "session/closed";
83
+ readonly sessionId: string;
84
+ } | {
85
+ readonly type: "session/ready";
86
+ readonly sessionId: string;
87
+ } | {
88
+ readonly type: "wait/completed";
89
+ readonly outcome: WireWaitOutcome;
90
+ };
91
+ export type WireWaitOutcome = {
92
+ readonly LiveCell: WireRuntimeResponse;
93
+ } | {
94
+ readonly MissingCell: WireRuntimeResponse;
95
+ };
96
+ export type ClientMessage = {
97
+ readonly type: "connection/hello";
98
+ readonly supportedVersions: readonly number[];
99
+ readonly requiredCapabilities: readonly string[];
100
+ readonly optionalCapabilities: readonly string[];
101
+ } | {
102
+ readonly type: "delegate/response";
103
+ readonly id: number;
104
+ readonly result: WireResult<JsonValue>;
105
+ } | {
106
+ readonly type: "operation/cancel";
107
+ readonly id: number;
108
+ } | {
109
+ readonly type: "operation/request";
110
+ readonly id: number;
111
+ readonly request: Readonly<Record<string, unknown>>;
112
+ };
113
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../sources/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEnF,eAAO,MAAM,eAAe,QAAmB,CAAC;AAEhD,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,aAAa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ol.js","sourceRoot":"","sources":["../sources/protocol.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function resolveCodeModeBinary(binaryPath?: string): string;
2
+ //# sourceMappingURL=resolveCodeModeBinary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveCodeModeBinary.d.ts","sourceRoot":"","sources":["../sources/resolveCodeModeBinary.ts"],"names":[],"mappings":"AASA,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAgDjE"}
@@ -0,0 +1,44 @@
1
+ import { existsSync } from "node:fs";
2
+ import { createRequire } from "node:module";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import { PLATFORM_TARGETS } from "./platform.js";
6
+ const require = createRequire(import.meta.url);
7
+ export function resolveCodeModeBinary(binaryPath) {
8
+ if (binaryPath !== undefined) {
9
+ if (!existsSync(binaryPath)) {
10
+ throw new Error(`Code Mode binary does not exist: ${binaryPath}`);
11
+ }
12
+ return path.resolve(binaryPath);
13
+ }
14
+ const key = `${process.platform}-${process.arch}`;
15
+ const platform = PLATFORM_TARGETS[key];
16
+ if (platform === undefined) {
17
+ throw new Error(`Code Mode does not support ${process.platform} ${process.arch}.`);
18
+ }
19
+ const executable = process.platform === "win32" ? "codex-code-mode-host.exe" : "codex-code-mode-host";
20
+ try {
21
+ const manifest = require.resolve(`${platform.alias}/package.json`);
22
+ const installed = path.join(path.dirname(manifest), "vendor", platform.target, "bin", executable);
23
+ if (existsSync(installed)) {
24
+ return installed;
25
+ }
26
+ }
27
+ catch {
28
+ // Fall through to repository-local build locations.
29
+ }
30
+ const packageRoot = fileURLToPath(new URL("../", import.meta.url));
31
+ const localCandidates = [
32
+ path.join(packageRoot, "native", "target", platform.target, "release", executable),
33
+ path.join(packageRoot, "native", "target", "release", executable),
34
+ path.join(packageRoot, "native", "target", platform.target, "debug", executable),
35
+ path.join(packageRoot, "native", "target", "debug", executable),
36
+ ];
37
+ const local = localCandidates.find((candidate) => existsSync(candidate));
38
+ if (local !== undefined) {
39
+ return local;
40
+ }
41
+ throw new Error(`The optional binary package ${platform.alias} is missing. Reinstall @slopus/rig-codemode-codex, ` +
42
+ "or build it with pnpm --filter @slopus/rig-codemode-codex build:native.");
43
+ }
44
+ //# sourceMappingURL=resolveCodeModeBinary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveCodeModeBinary.js","sourceRoot":"","sources":["../sources/resolveCodeModeBinary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAoB,MAAM,eAAe,CAAC;AAEnE,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,UAAU,qBAAqB,CAAC,UAAmB;IACrD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,oCAAoC,UAAU,EAAE,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAiB,CAAC;IACjE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,CAAC,QAAQ,IAAI,OA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CAAC,CAAC;IACzE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,IAAI,KAAK,CACX,+BAA+B,QAAQ,CAAC,KAAK,qDAAqD;QAC9F,yEAAyE,CAChF,CAAC;AACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function resolveCodeModeSandboxExecutable(platform: NodeJS.Platform, _env: NodeJS.ProcessEnv): string | undefined;
2
+ //# sourceMappingURL=resolveCodeModeSandboxExecutable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveCodeModeSandboxExecutable.d.ts","sourceRoot":"","sources":["../sources/resolveCodeModeSandboxExecutable.ts"],"names":[],"mappings":"AAEA,wBAAgB,gCAAgC,CAC5C,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,IAAI,EAAE,MAAM,CAAC,UAAU,GACxB,MAAM,GAAG,SAAS,CAuBpB"}
@@ -0,0 +1,28 @@
1
+ import { accessSync, constants, statSync } from "node:fs";
2
+ export function resolveCodeModeSandboxExecutable(platform, _env) {
3
+ if (platform === "darwin") {
4
+ const sandboxExec = "/usr/bin/sandbox-exec";
5
+ try {
6
+ accessSync(sandboxExec, constants.X_OK);
7
+ return statSync(sandboxExec).isFile() ? sandboxExec : undefined;
8
+ }
9
+ catch {
10
+ return undefined;
11
+ }
12
+ }
13
+ if (platform === "linux") {
14
+ for (const bubblewrap of ["/usr/bin/bwrap", "/bin/bwrap", "/usr/local/bin/bwrap"]) {
15
+ try {
16
+ accessSync(bubblewrap, constants.X_OK);
17
+ if (statSync(bubblewrap).isFile()) {
18
+ return bubblewrap;
19
+ }
20
+ }
21
+ catch {
22
+ // Continue through trusted system installation paths.
23
+ }
24
+ }
25
+ }
26
+ return undefined;
27
+ }
28
+ //# sourceMappingURL=resolveCodeModeSandboxExecutable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveCodeModeSandboxExecutable.js","sourceRoot":"","sources":["../sources/resolveCodeModeSandboxExecutable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,UAAU,gCAAgC,CAC5C,QAAyB,EACzB,IAAuB;IAEvB,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,WAAW,GAAG,uBAAuB,CAAC;QAC5C,IAAI,CAAC;YACD,UAAU,CAAC,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;YACxC,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,CAAC;QAAC,MAAM,CAAC;YACL,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IACD,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACvB,KAAK,MAAM,UAAU,IAAI,CAAC,gBAAgB,EAAE,YAAY,EAAE,sBAAsB,CAAC,EAAE,CAAC;YAChF,IAAI,CAAC;gBACD,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;gBACvC,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;oBAChC,OAAO,UAAU,CAAC;gBACtB,CAAC;YACL,CAAC;YAAC,MAAM,CAAC;gBACL,sDAAsD;YAC1D,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CodeModeRunResult, RunCodeOptions } from "./types.js";
2
+ export declare function runCode(source: string, options?: RunCodeOptions): Promise<CodeModeRunResult>;
3
+ //# sourceMappingURL=runCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runCode.d.ts","sourceRoot":"","sources":["../sources/runCode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEpE,wBAAsB,OAAO,CACzB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,cAAmB,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CA2B5B"}
@@ -0,0 +1,22 @@
1
+ import { createCodeMode } from "./createCodeMode.js";
2
+ export async function runCode(source, options = {}) {
3
+ const { binaryPath, env, onCellClosed, onNotification, sandbox, sessionId, tools, ...runOptions } = options;
4
+ const codeMode = await createCodeMode({
5
+ ...(binaryPath === undefined ? {} : { binaryPath }),
6
+ ...(env === undefined ? {} : { env }),
7
+ ...(sandbox === undefined ? {} : { sandbox }),
8
+ });
9
+ try {
10
+ const session = await codeMode.createSession({
11
+ ...(onCellClosed === undefined ? {} : { onCellClosed }),
12
+ ...(onNotification === undefined ? {} : { onNotification }),
13
+ ...(sessionId === undefined ? {} : { sessionId }),
14
+ ...(tools === undefined ? {} : { tools }),
15
+ });
16
+ return await session.run(source, runOptions);
17
+ }
18
+ finally {
19
+ await codeMode.close();
20
+ }
21
+ }
22
+ //# sourceMappingURL=runCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runCode.js","sourceRoot":"","sources":["../sources/runCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,MAAM,CAAC,KAAK,UAAU,OAAO,CACzB,MAAc,EACd,UAA0B,EAAE;IAE5B,MAAM,EACF,UAAU,EACV,GAAG,EACH,YAAY,EACZ,cAAc,EACd,OAAO,EACP,SAAS,EACT,KAAK,EACL,GAAG,UAAU,EAChB,GAAG,OAAO,CAAC;IACZ,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC;QAClC,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;QACnD,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QACrC,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;KAChD,CAAC,CAAC;IACH,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC;YACzC,GAAG,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC;YACvD,GAAG,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC;YAC3D,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;YACjD,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;SAC5C,CAAC,CAAC;QACH,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACjD,CAAC;YAAS,CAAC;QACP,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { WireRuntimeResponse } from "./protocol.js";
2
+ import type { CodeModeResponse } from "./types.js";
3
+ export declare function toCodeModeResponse(response: WireRuntimeResponse): CodeModeResponse;
4
+ //# sourceMappingURL=toCodeModeResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toCodeModeResponse.d.ts","sourceRoot":"","sources":["../sources/toCodeModeResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,gBAAgB,CAwBlF"}
@@ -0,0 +1,26 @@
1
+ export function toCodeModeResponse(response) {
2
+ if ("Yielded" in response) {
3
+ return {
4
+ state: "yielded",
5
+ cellId: response.Yielded.cell_id,
6
+ contentItems: response.Yielded.content_items,
7
+ };
8
+ }
9
+ if ("Terminated" in response) {
10
+ return {
11
+ state: "terminated",
12
+ cellId: response.Terminated.cell_id,
13
+ contentItems: response.Terminated.content_items,
14
+ };
15
+ }
16
+ const result = response.Result;
17
+ return result.error_text === null
18
+ ? { state: "result", cellId: result.cell_id, contentItems: result.content_items }
19
+ : {
20
+ state: "result",
21
+ cellId: result.cell_id,
22
+ contentItems: result.content_items,
23
+ errorText: result.error_text,
24
+ };
25
+ }
26
+ //# sourceMappingURL=toCodeModeResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toCodeModeResponse.js","sourceRoot":"","sources":["../sources/toCodeModeResponse.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,kBAAkB,CAAC,QAA6B;IAC5D,IAAI,SAAS,IAAI,QAAQ,EAAE,CAAC;QACxB,OAAO;YACH,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,OAAO;YAChC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,aAAa;SAC/C,CAAC;IACN,CAAC;IACD,IAAI,YAAY,IAAI,QAAQ,EAAE,CAAC;QAC3B,OAAO;YACH,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,OAAO;YACnC,YAAY,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa;SAClD,CAAC;IACN,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC/B,OAAO,MAAM,CAAC,UAAU,KAAK,IAAI;QAC7B,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,aAAa,EAAE;QACjF,CAAC,CAAC;YACI,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,MAAM,CAAC,OAAO;YACtB,YAAY,EAAE,MAAM,CAAC,aAAa;YAClC,SAAS,EAAE,MAAM,CAAC,UAAU;SAC/B,CAAC;AACZ,CAAC"}
@@ -0,0 +1,79 @@
1
+ export type JsonPrimitive = boolean | number | string | null;
2
+ export type JsonValue = JsonPrimitive | readonly JsonValue[] | {
3
+ readonly [key: string]: JsonValue;
4
+ };
5
+ export type CodeModeToolKind = "freeform" | "function";
6
+ export type CodeModeSandboxMode = "auto" | "required" | "disabled";
7
+ export interface CodeModeToolName {
8
+ readonly name: string;
9
+ readonly namespace?: string;
10
+ }
11
+ export interface CodeModeToolContext {
12
+ readonly cellId: string;
13
+ readonly runtimeToolCallId: string;
14
+ readonly signal: AbortSignal;
15
+ readonly toolKind: CodeModeToolKind;
16
+ readonly toolName: CodeModeToolName;
17
+ }
18
+ export interface CodeModeTool {
19
+ readonly name: string;
20
+ readonly toolName?: CodeModeToolName;
21
+ readonly description?: string;
22
+ readonly kind?: CodeModeToolKind;
23
+ readonly inputSchema?: JsonValue;
24
+ readonly outputSchema?: JsonValue;
25
+ execute(input: JsonValue | undefined, context: CodeModeToolContext): JsonValue | Promise<JsonValue>;
26
+ }
27
+ export interface CodeModeNotification {
28
+ readonly callId: string;
29
+ readonly cellId: string;
30
+ readonly text: string;
31
+ }
32
+ export interface CodeModeContentText {
33
+ readonly type: "input_text";
34
+ readonly text: string;
35
+ }
36
+ export interface CodeModeContentImage {
37
+ readonly type: "input_image";
38
+ readonly image_url: string;
39
+ readonly detail?: "auto" | "high" | "low" | "original";
40
+ }
41
+ export interface CodeModeContentAudio {
42
+ readonly type: "input_audio";
43
+ readonly audio_url: string;
44
+ }
45
+ export type CodeModeContentItem = CodeModeContentAudio | CodeModeContentImage | CodeModeContentText;
46
+ export interface CodeModeResponse {
47
+ readonly state: "result" | "terminated" | "yielded";
48
+ readonly cellId: string;
49
+ readonly contentItems: readonly CodeModeContentItem[];
50
+ readonly errorText?: string;
51
+ }
52
+ export interface CodeModeRunResult {
53
+ readonly state: "result" | "terminated";
54
+ readonly cellId: string;
55
+ readonly contentItems: readonly CodeModeContentItem[];
56
+ readonly errorText?: string;
57
+ readonly responses: readonly CodeModeResponse[];
58
+ readonly text: string;
59
+ }
60
+ export interface CodeModeSessionOptions {
61
+ readonly onCellClosed?: (cellId: string) => void;
62
+ readonly onNotification?: (notification: CodeModeNotification) => void | Promise<void>;
63
+ readonly sessionId?: string;
64
+ readonly tools?: readonly CodeModeTool[];
65
+ }
66
+ export interface CodeModeOptions {
67
+ readonly binaryPath?: string;
68
+ readonly env?: NodeJS.ProcessEnv;
69
+ readonly sandbox?: CodeModeSandboxMode;
70
+ }
71
+ export interface CodeModeRunOptions {
72
+ readonly signal?: AbortSignal;
73
+ readonly toolCallId?: string;
74
+ readonly tools?: readonly CodeModeTool[];
75
+ readonly yieldTimeMs?: number;
76
+ }
77
+ export interface RunCodeOptions extends CodeModeOptions, CodeModeSessionOptions, CodeModeRunOptions {
78
+ }
79
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../sources/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAE7D,MAAM,MAAM,SAAS,GACf,aAAa,GACb,SAAS,SAAS,EAAE,GACpB;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE5C,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;AAEnE,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,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U,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC1C;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,cACb,SAAQ,eAAe,EAAE,sBAAsB,EAAE,kBAAkB;CAAG"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../sources/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@slopus/rig-codemode-codex",
3
+ "version": "0.0.0-bootstrap.0",
4
+ "description": "Standalone Node.js API for OpenAI Codex Code Mode.",
5
+ "keywords": [
6
+ "codex",
7
+ "javascript",
8
+ "sandbox",
9
+ "tool-calling"
10
+ ],
11
+ "license": "Apache-2.0",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/slopus/rig.git",
15
+ "directory": "packages/rig-codemode-codex"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "LICENSE",
20
+ "LICENSE-CODEX",
21
+ "NOTICE-CODEX",
22
+ "README.md",
23
+ "THIRD-PARTY-LICENSES.json",
24
+ "THIRD-PARTY-NOTICES.md",
25
+ "UPSTREAM.md"
26
+ ],
27
+ "type": "module",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js",
32
+ "default": "./dist/index.js"
33
+ }
34
+ },
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "engines": {
39
+ "node": ">=20"
40
+ },
41
+ "optionalDependencies": {
42
+ "@slopus/rig-codemode-codex-darwin-arm64": "npm:@slopus/rig-codemode-codex@0.0.0-bootstrap.0-darwin-arm64",
43
+ "@slopus/rig-codemode-codex-darwin-x64": "npm:@slopus/rig-codemode-codex@0.0.0-bootstrap.0-darwin-x64",
44
+ "@slopus/rig-codemode-codex-linux-arm64": "npm:@slopus/rig-codemode-codex@0.0.0-bootstrap.0-linux-arm64",
45
+ "@slopus/rig-codemode-codex-linux-x64": "npm:@slopus/rig-codemode-codex@0.0.0-bootstrap.0-linux-x64",
46
+ "@slopus/rig-codemode-codex-win32-arm64": "npm:@slopus/rig-codemode-codex@0.0.0-bootstrap.0-win32-arm64",
47
+ "@slopus/rig-codemode-codex-win32-x64": "npm:@slopus/rig-codemode-codex@0.0.0-bootstrap.0-win32-x64"
48
+ }
49
+ }