@oar-sh/oar 0.9.23 → 0.9.24

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 (59) hide show
  1. package/CHANGELOG.md +165 -0
  2. package/README.md +9 -9
  3. package/bin/oar.js +54 -4
  4. package/package.json +9 -7
  5. package/server/agent-sdk-loader.mjs +116 -0
  6. package/server/agent-sdks/claude/entry.mjs +4 -0
  7. package/server/agent-sdks/claude/package-lock.json +1438 -0
  8. package/server/agent-sdks/claude/package.json +13 -0
  9. package/server/agent-sdks/cursor/entry-sqlite.mjs +2 -0
  10. package/server/agent-sdks/cursor/entry.mjs +3 -0
  11. package/server/agent-sdks/cursor/package-lock.json +171 -0
  12. package/server/agent-sdks/cursor/package.json +11 -0
  13. package/server/agent-sdks/koffi/entry.cjs +2 -0
  14. package/server/agent-sdks/koffi/package-lock.json +368 -0
  15. package/server/agent-sdks/koffi/package.json +10 -0
  16. package/server/claude-worker/claude-preview-tool.mjs +5 -2
  17. package/server/claude-worker/claude-remote-relay-tool.mjs +5 -2
  18. package/server/claude-worker/claude-sdk-adapter.mjs +4 -1
  19. package/server/copilot-worker/copilot-sdk-session-process.mjs +7 -4
  20. package/server/cursor-worker/cursor-sdk-adapter.mjs +5 -3
  21. package/server/public/app/agent-sdk-ui.js +349 -0
  22. package/server/public/app/api-client.js +91 -8
  23. package/server/public/app/bootstrap.js +204 -69
  24. package/server/public/app/model-refresh-ui.mjs +413 -0
  25. package/server/public/app/no-conversation-state.mjs +5 -2
  26. package/server/public/app/provider-readiness.mjs +67 -4
  27. package/server/public/app/settings-modal.js +167 -0
  28. package/server/public/app/socket-handlers.js +21 -0
  29. package/server/public/index.html +95 -2
  30. package/server/routes/agent-sdk-routes.mjs +73 -0
  31. package/server/routes/messages-routes.mjs +91 -17
  32. package/server/routes/sessions-routes.mjs +235 -109
  33. package/server/server-runtime.mjs +395 -81
  34. package/server/services/about-service.mjs +26 -6
  35. package/server/services/agent-sdk-launch-gate.mjs +124 -0
  36. package/server/services/agent-sdk-paths.mjs +307 -0
  37. package/server/services/agent-sdk-store.mjs +1211 -0
  38. package/server/services/claude-api-settings-service.mjs +54 -17
  39. package/server/services/cli-install-service.mjs +3 -2
  40. package/server/services/copilot-model-discovery-service.mjs +7 -1
  41. package/server/services/database-file.mjs +17 -1
  42. package/server/services/deepseek-settings-service.mjs +58 -20
  43. package/server/services/earlier-database-service.mjs +4 -2
  44. package/server/services/model-refresh-scheduler.mjs +153 -0
  45. package/server/services/model-variant-catalog-service.mjs +141 -9
  46. package/server/services/oar-cli-helpers.mjs +72 -9
  47. package/server/services/oar-state-migration-service.mjs +2 -12
  48. package/server/services/oar-state-root.mjs +17 -0
  49. package/server/services/provider-model-refresh.mjs +326 -0
  50. package/server/services/provider-model-state.mjs +395 -0
  51. package/server/services/relay-singleton-guard.mjs +72 -10
  52. package/server/services/session-worker-launch-service.mjs +13 -0
  53. package/server/services/session-worker-supervisor-service.mjs +19 -1
  54. package/server/services/session-worker-websocket-service.mjs +15 -0
  55. package/server/services/update-install-service.mjs +2 -2
  56. package/server/services/worker-launch-note-service.mjs +14 -2
  57. package/server/services/worker-recycle-service.mjs +145 -11
  58. package/shared/model-refresh-schedule.mjs +120 -0
  59. package/shared/worker-runtime/direct-openai-image.mjs +8 -4
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "oar-agent-sdk-claude",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "description": "The Claude Agent SDK as OAR installs it on demand: exact pins, installed from the lockfile beside this file.",
6
+ "license": "MIT",
7
+ "dependencies": {
8
+ "@anthropic-ai/claude-agent-sdk": "0.3.319",
9
+ "@anthropic-ai/sdk": "0.116.0",
10
+ "@modelcontextprotocol/sdk": "1.32.2",
11
+ "zod": "4.6.7"
12
+ }
13
+ }
@@ -0,0 +1,2 @@
1
+ // The SDK's local agent store, loaded like entry.mjs.
2
+ export * from '@cursor/sdk/sqlite';
@@ -0,0 +1,3 @@
1
+ // Loaded by path from an installed copy of this folder (agent-sdk-loader.mjs):
2
+ // the bare import resolves from the folder's own node_modules.
3
+ export * from '@cursor/sdk';
@@ -0,0 +1,171 @@
1
+ {
2
+ "name": "oar-agent-sdk-cursor",
3
+ "version": "0.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "oar-agent-sdk-cursor",
9
+ "version": "0.0.0",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "@cursor/sdk": "1.3.1",
13
+ "zod": "4.6.7"
14
+ }
15
+ },
16
+ "node_modules/@bufbuild/protobuf": {
17
+ "version": "1.10.0",
18
+ "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz",
19
+ "integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==",
20
+ "license": "(Apache-2.0 AND BSD-3-Clause)"
21
+ },
22
+ "node_modules/@connectrpc/connect": {
23
+ "version": "1.7.0",
24
+ "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-1.7.0.tgz",
25
+ "integrity": "sha512-iNKdJRi69YP3mq6AePRT8F/HrxWCewrhxnLMNm0vpqXAR8biwzRtO6Hjx80C6UvtKJ5sFmffQT7I4Baecz389w==",
26
+ "license": "Apache-2.0",
27
+ "peerDependencies": {
28
+ "@bufbuild/protobuf": "^1.10.0"
29
+ }
30
+ },
31
+ "node_modules/@connectrpc/connect-web": {
32
+ "version": "1.7.0",
33
+ "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-1.7.0.tgz",
34
+ "integrity": "sha512-qyP0YOnUPRWwCc/VfsoydMJvkb7EyUPr2q9sHgBuJzbADjiqck1gKH5V5ZPzPhTLBvmz5UvG+wiZ5sMRQHU1MQ==",
35
+ "license": "Apache-2.0",
36
+ "peerDependencies": {
37
+ "@bufbuild/protobuf": "^1.10.0",
38
+ "@connectrpc/connect": "1.7.0"
39
+ }
40
+ },
41
+ "node_modules/@cursor/sdk": {
42
+ "version": "1.3.1",
43
+ "resolved": "https://registry.npmjs.org/@cursor/sdk/-/sdk-1.3.1.tgz",
44
+ "integrity": "sha512-Mn0gK8V+5BkOqm22J2ocU+1BrqnNH8QcK9kmA7SkRuawDOeq2ABC2BIZq9gRnF3z68x/I7J/ZU8jl6DcshCVUA==",
45
+ "license": "SEE LICENSE IN LICENSE.md",
46
+ "dependencies": {
47
+ "@bufbuild/protobuf": "1.10.0",
48
+ "@connectrpc/connect": "^1.6.1",
49
+ "@connectrpc/connect-web": "^1.6.1",
50
+ "@statsig/js-client": "3.31.0"
51
+ },
52
+ "engines": {
53
+ "node": ">=22.13"
54
+ },
55
+ "optionalDependencies": {
56
+ "@cursor/sdk-darwin-arm64": "1.3.1",
57
+ "@cursor/sdk-darwin-x64": "1.3.1",
58
+ "@cursor/sdk-linux-arm64": "1.3.1",
59
+ "@cursor/sdk-linux-x64": "1.3.1",
60
+ "@cursor/sdk-win32-x64": "1.3.1"
61
+ },
62
+ "peerDependencies": {
63
+ "zod": "^3.25.0 || ^4.0.0"
64
+ }
65
+ },
66
+ "node_modules/@cursor/sdk-darwin-arm64": {
67
+ "version": "1.3.1",
68
+ "resolved": "https://registry.npmjs.org/@cursor/sdk-darwin-arm64/-/sdk-darwin-arm64-1.3.1.tgz",
69
+ "integrity": "sha512-5JXgVJYeFPxXjDqnu1ha/rAmH+ATFh4abdx199x8E/RcYYM++9b55oJXO3GYv1/9/4Qa9RsE5JkHRY6FYc5vQw==",
70
+ "cpu": [
71
+ "arm64"
72
+ ],
73
+ "license": "SEE LICENSE IN LICENSE.md",
74
+ "optional": true,
75
+ "os": [
76
+ "darwin"
77
+ ],
78
+ "bin": {
79
+ "rg": "bin/rg"
80
+ }
81
+ },
82
+ "node_modules/@cursor/sdk-darwin-x64": {
83
+ "version": "1.3.1",
84
+ "resolved": "https://registry.npmjs.org/@cursor/sdk-darwin-x64/-/sdk-darwin-x64-1.3.1.tgz",
85
+ "integrity": "sha512-yHzIRER8IpOpIH/CUigquuwqvcjCEe62xV6OiJHzRfgApdnzxCjC8JMhLZP2M08/dofyZu9xeo7yr43H6oSRTA==",
86
+ "cpu": [
87
+ "x64"
88
+ ],
89
+ "license": "SEE LICENSE IN LICENSE.md",
90
+ "optional": true,
91
+ "os": [
92
+ "darwin"
93
+ ],
94
+ "bin": {
95
+ "rg": "bin/rg"
96
+ }
97
+ },
98
+ "node_modules/@cursor/sdk-linux-arm64": {
99
+ "version": "1.3.1",
100
+ "resolved": "https://registry.npmjs.org/@cursor/sdk-linux-arm64/-/sdk-linux-arm64-1.3.1.tgz",
101
+ "integrity": "sha512-8wI7DUSQtJ7Rkyj5AhNONeR0M+5bjhR0qo8GJEEmRs6isi072sNPsFXwfhlzX7bhbtsX/FCtvsTG/vpam48ObA==",
102
+ "cpu": [
103
+ "arm64"
104
+ ],
105
+ "license": "SEE LICENSE IN LICENSE.md",
106
+ "optional": true,
107
+ "os": [
108
+ "linux"
109
+ ],
110
+ "bin": {
111
+ "rg": "bin/rg"
112
+ }
113
+ },
114
+ "node_modules/@cursor/sdk-linux-x64": {
115
+ "version": "1.3.1",
116
+ "resolved": "https://registry.npmjs.org/@cursor/sdk-linux-x64/-/sdk-linux-x64-1.3.1.tgz",
117
+ "integrity": "sha512-jIwzTr3KhMtU4aJc8x0i1RlcBKttqcVYhor9FI/h1qJQm03yTgSwhyZjsMvfBHPQ5KoYDFVdu47S1dIhwaSWZA==",
118
+ "cpu": [
119
+ "x64"
120
+ ],
121
+ "license": "SEE LICENSE IN LICENSE.md",
122
+ "optional": true,
123
+ "os": [
124
+ "linux"
125
+ ],
126
+ "bin": {
127
+ "rg": "bin/rg"
128
+ }
129
+ },
130
+ "node_modules/@cursor/sdk-win32-x64": {
131
+ "version": "1.3.1",
132
+ "resolved": "https://registry.npmjs.org/@cursor/sdk-win32-x64/-/sdk-win32-x64-1.3.1.tgz",
133
+ "integrity": "sha512-hqYllGgY27eaq+w035PebKdoc/JswcrvOSNCniqq/nicLXgWdK5zdKiAs5MyWUr73HGGL1sK0aiE7WdxbIKKVw==",
134
+ "cpu": [
135
+ "x64"
136
+ ],
137
+ "license": "SEE LICENSE IN LICENSE.md",
138
+ "optional": true,
139
+ "os": [
140
+ "win32"
141
+ ],
142
+ "bin": {
143
+ "rg": "bin/rg.exe"
144
+ }
145
+ },
146
+ "node_modules/@statsig/client-core": {
147
+ "version": "3.31.0",
148
+ "resolved": "https://registry.npmjs.org/@statsig/client-core/-/client-core-3.31.0.tgz",
149
+ "integrity": "sha512-SuxQD6TmVszPG7FoMKwTk/uyBuVFk7XnxI3T/E0uyb7PL7GNjONtfsoh+NqBBVUJVse0CUeSFfgJPoZy1ZOslQ==",
150
+ "license": "ISC"
151
+ },
152
+ "node_modules/@statsig/js-client": {
153
+ "version": "3.31.0",
154
+ "resolved": "https://registry.npmjs.org/@statsig/js-client/-/js-client-3.31.0.tgz",
155
+ "integrity": "sha512-LFa5E0LjT6sTfZv3sNGoyRLSZ1078+agdgOA+Vm1ecjG+KbSOfBLTW7hMwimrJ29slRwbYDzbtKaPJo/R37N2g==",
156
+ "license": "ISC",
157
+ "dependencies": {
158
+ "@statsig/client-core": "3.31.0"
159
+ }
160
+ },
161
+ "node_modules/zod": {
162
+ "version": "4.6.7",
163
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
164
+ "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
165
+ "license": "MIT",
166
+ "funding": {
167
+ "url": "https://github.com/sponsors/colinhacks"
168
+ }
169
+ }
170
+ }
171
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "oar-agent-sdk-cursor",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "description": "The Cursor SDK as OAR installs it on demand: exact pins, installed from the lockfile beside this file.",
6
+ "license": "MIT",
7
+ "dependencies": {
8
+ "@cursor/sdk": "1.3.1",
9
+ "zod": "4.6.7"
10
+ }
11
+ }
@@ -0,0 +1,2 @@
1
+ // Loaded by path from an installed copy of this folder (relay-singleton-guard.mjs).
2
+ module.exports = require('koffi');
@@ -0,0 +1,368 @@
1
+ {
2
+ "name": "oar-agent-sdk-koffi",
3
+ "version": "0.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "oar-agent-sdk-koffi",
9
+ "version": "0.0.0",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "koffi": "3.3.4"
13
+ }
14
+ },
15
+ "node_modules/@koromix/koffi-android-arm64": {
16
+ "version": "3.3.4",
17
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-android-arm64/-/koffi-android-arm64-3.3.4.tgz",
18
+ "integrity": "sha512-F+V3PvbTVfpuFh9XKatW1XLH6FJZHQMzZRKOJL8vHQUmG59iBW4D8E9su5jCr5wghCpPoajthD/G2unzSpSedw==",
19
+ "cpu": [
20
+ "arm64"
21
+ ],
22
+ "license": "MIT",
23
+ "optional": true,
24
+ "os": [
25
+ "android"
26
+ ],
27
+ "funding": {
28
+ "url": "https://liberapay.com/Koromix"
29
+ }
30
+ },
31
+ "node_modules/@koromix/koffi-android-x64": {
32
+ "version": "3.3.4",
33
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-android-x64/-/koffi-android-x64-3.3.4.tgz",
34
+ "integrity": "sha512-uA3SyFYW572S0WTRSSMINI0GCMFDjoAW2uX+i46bAVqzCOvwhydTDtwjx56WOlRcQuLD+oXWLzDqA8glTTLWrw==",
35
+ "cpu": [
36
+ "x64"
37
+ ],
38
+ "license": "MIT",
39
+ "optional": true,
40
+ "os": [
41
+ "android"
42
+ ],
43
+ "funding": {
44
+ "url": "https://liberapay.com/Koromix"
45
+ }
46
+ },
47
+ "node_modules/@koromix/koffi-darwin-arm64": {
48
+ "version": "3.3.4",
49
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-darwin-arm64/-/koffi-darwin-arm64-3.3.4.tgz",
50
+ "integrity": "sha512-KWc1kRttFZrFWo3bJKsmiQd/wLIaxs2eIFY10US0PcC93nBfvKOqhGrYK6DNprRMoGwSN99wxIFBJrHDAqw5ew==",
51
+ "cpu": [
52
+ "arm64"
53
+ ],
54
+ "license": "MIT",
55
+ "optional": true,
56
+ "os": [
57
+ "darwin"
58
+ ],
59
+ "funding": {
60
+ "url": "https://liberapay.com/Koromix"
61
+ }
62
+ },
63
+ "node_modules/@koromix/koffi-darwin-x64": {
64
+ "version": "3.3.4",
65
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-darwin-x64/-/koffi-darwin-x64-3.3.4.tgz",
66
+ "integrity": "sha512-QYRCBepdGNL5Nj8UH+mzd4sTuNGtkmYCUBTyOmoksDMXGfM03MMdZg49c42mQE7blYh28H9qeeB0NHU/acN0ng==",
67
+ "cpu": [
68
+ "x64"
69
+ ],
70
+ "license": "MIT",
71
+ "optional": true,
72
+ "os": [
73
+ "darwin"
74
+ ],
75
+ "funding": {
76
+ "url": "https://liberapay.com/Koromix"
77
+ }
78
+ },
79
+ "node_modules/@koromix/koffi-freebsd-arm64": {
80
+ "version": "3.3.4",
81
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-freebsd-arm64/-/koffi-freebsd-arm64-3.3.4.tgz",
82
+ "integrity": "sha512-JKcJZNviFIxY8AthlUTkVvyTPXb3vIZKfZqDRqm1MGoQiB6GD2KdpFId35EcZM+Zc9//H0b1Simj1dtsph7whQ==",
83
+ "cpu": [
84
+ "arm64"
85
+ ],
86
+ "license": "MIT",
87
+ "optional": true,
88
+ "os": [
89
+ "freebsd"
90
+ ],
91
+ "funding": {
92
+ "url": "https://liberapay.com/Koromix"
93
+ }
94
+ },
95
+ "node_modules/@koromix/koffi-freebsd-ia32": {
96
+ "version": "3.3.4",
97
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-freebsd-ia32/-/koffi-freebsd-ia32-3.3.4.tgz",
98
+ "integrity": "sha512-UaxIO5tRguU7Gqh5jQ5XO1Be3vX8ACuLiQWZr/tZo8xyiKmEVYeBksJt+UgnnoxwZKhBLJEQG9giwiu8tFBtSw==",
99
+ "cpu": [
100
+ "ia32"
101
+ ],
102
+ "license": "MIT",
103
+ "optional": true,
104
+ "os": [
105
+ "freebsd"
106
+ ],
107
+ "funding": {
108
+ "url": "https://liberapay.com/Koromix"
109
+ }
110
+ },
111
+ "node_modules/@koromix/koffi-freebsd-x64": {
112
+ "version": "3.3.4",
113
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-freebsd-x64/-/koffi-freebsd-x64-3.3.4.tgz",
114
+ "integrity": "sha512-yrYvb0k0DSVBcX1duHxcC2bXh+83SPuqmYvga6+r9t8c7+AkO2bvfv6oEtOt+1NQWUxHZ1hSK2M/hOJYltxUUA==",
115
+ "cpu": [
116
+ "x64"
117
+ ],
118
+ "license": "MIT",
119
+ "optional": true,
120
+ "os": [
121
+ "freebsd"
122
+ ],
123
+ "funding": {
124
+ "url": "https://liberapay.com/Koromix"
125
+ }
126
+ },
127
+ "node_modules/@koromix/koffi-linux-arm": {
128
+ "version": "3.3.4",
129
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-arm/-/koffi-linux-arm-3.3.4.tgz",
130
+ "integrity": "sha512-+vFvkVUPQq2unMm1iY3ITJJEIeGFuVVdVe0ozNI2Al42hPohjyC9NUeTFaTPkysxH7YEJSM18GGgA9/LvPqPfw==",
131
+ "cpu": [
132
+ "arm"
133
+ ],
134
+ "license": "MIT",
135
+ "optional": true,
136
+ "os": [
137
+ "linux"
138
+ ],
139
+ "funding": {
140
+ "url": "https://liberapay.com/Koromix"
141
+ }
142
+ },
143
+ "node_modules/@koromix/koffi-linux-arm64": {
144
+ "version": "3.3.4",
145
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-arm64/-/koffi-linux-arm64-3.3.4.tgz",
146
+ "integrity": "sha512-k6FPjEYDioyVihUqvRFX4QZK0RL/Rrn4xPEzrKxODxgLAUXlhBTut391zPzgsMcArXgN4YTuS11M/kxmA5s+Fg==",
147
+ "cpu": [
148
+ "arm64"
149
+ ],
150
+ "license": "MIT",
151
+ "optional": true,
152
+ "os": [
153
+ "linux"
154
+ ],
155
+ "funding": {
156
+ "url": "https://liberapay.com/Koromix"
157
+ }
158
+ },
159
+ "node_modules/@koromix/koffi-linux-ia32": {
160
+ "version": "3.3.4",
161
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-ia32/-/koffi-linux-ia32-3.3.4.tgz",
162
+ "integrity": "sha512-+M/YaXaLFWI2DvHXjPsk1SSZcm/uvx7DZKuj1dEph9tmnp2vd75LY9zToE7c0GRoY50+vovTUbsa+nnDbK21hA==",
163
+ "cpu": [
164
+ "ia32"
165
+ ],
166
+ "license": "MIT",
167
+ "optional": true,
168
+ "os": [
169
+ "linux"
170
+ ],
171
+ "funding": {
172
+ "url": "https://liberapay.com/Koromix"
173
+ }
174
+ },
175
+ "node_modules/@koromix/koffi-linux-loong64": {
176
+ "version": "3.3.4",
177
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-loong64/-/koffi-linux-loong64-3.3.4.tgz",
178
+ "integrity": "sha512-LtlTOMy2wBG7sO7Vzd8X/qG3wgw3r5ieXPzKxAgRDaycgbkMqyrSS5nYnGosk2bjctbSPX40O85mVwoEG/vfbA==",
179
+ "cpu": [
180
+ "loong64"
181
+ ],
182
+ "license": "MIT",
183
+ "optional": true,
184
+ "os": [
185
+ "linux"
186
+ ],
187
+ "funding": {
188
+ "url": "https://liberapay.com/Koromix"
189
+ }
190
+ },
191
+ "node_modules/@koromix/koffi-linux-ppc64": {
192
+ "version": "3.3.4",
193
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-ppc64/-/koffi-linux-ppc64-3.3.4.tgz",
194
+ "integrity": "sha512-RJtz/dB/O/x5xKCgs7Ks8gXqiAvq9/AQMgHuLXv+TEfrgVuWR2+PGHqxGXPzILDO6Veh5KbMcA6Ad56myHTGdw==",
195
+ "cpu": [
196
+ "ppc64"
197
+ ],
198
+ "license": "MIT",
199
+ "optional": true,
200
+ "os": [
201
+ "linux"
202
+ ],
203
+ "funding": {
204
+ "url": "https://liberapay.com/Koromix"
205
+ }
206
+ },
207
+ "node_modules/@koromix/koffi-linux-riscv64": {
208
+ "version": "3.3.4",
209
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-riscv64/-/koffi-linux-riscv64-3.3.4.tgz",
210
+ "integrity": "sha512-LvUiKNYaJ6Vx1KrMfwPYPt0smkvQISeTspjPai86tVWu+x55mBLvrpVOMy9n9Np9BviNeg8gJK2pEiqAdG6ppg==",
211
+ "cpu": [
212
+ "riscv64"
213
+ ],
214
+ "license": "MIT",
215
+ "optional": true,
216
+ "os": [
217
+ "linux"
218
+ ],
219
+ "funding": {
220
+ "url": "https://liberapay.com/Koromix"
221
+ }
222
+ },
223
+ "node_modules/@koromix/koffi-linux-x64": {
224
+ "version": "3.3.4",
225
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-linux-x64/-/koffi-linux-x64-3.3.4.tgz",
226
+ "integrity": "sha512-xi47MKuoQ9fA2SsrH6wljl9t9120hO66qEmb1le6q636q55J974cZfcwDrK5nW1GalJ+0NLXoH2T3/NGQBzPNw==",
227
+ "cpu": [
228
+ "x64"
229
+ ],
230
+ "license": "MIT",
231
+ "optional": true,
232
+ "os": [
233
+ "linux"
234
+ ],
235
+ "funding": {
236
+ "url": "https://liberapay.com/Koromix"
237
+ }
238
+ },
239
+ "node_modules/@koromix/koffi-openbsd-arm64": {
240
+ "version": "3.3.4",
241
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-openbsd-arm64/-/koffi-openbsd-arm64-3.3.4.tgz",
242
+ "integrity": "sha512-MVaDIM2ILS7u5mP3l9TKmOR3x+jOlOxl7UW21VAhk7GZOAWyfuwGL9+RMkHwIPXR6BcHULi3Wt3hR2g28+QJMQ==",
243
+ "cpu": [
244
+ "arm64"
245
+ ],
246
+ "license": "MIT",
247
+ "optional": true,
248
+ "os": [
249
+ "openbsd"
250
+ ],
251
+ "funding": {
252
+ "url": "https://liberapay.com/Koromix"
253
+ }
254
+ },
255
+ "node_modules/@koromix/koffi-openbsd-ia32": {
256
+ "version": "3.3.4",
257
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-openbsd-ia32/-/koffi-openbsd-ia32-3.3.4.tgz",
258
+ "integrity": "sha512-TB03I5oJWALo+fDqS0CiPaL2sOE86W+ZQc61p41jRvSAqnOeh65WSGILa4IixKso/T5Yglo6LDqpz7Fz+Er1fg==",
259
+ "cpu": [
260
+ "ia32"
261
+ ],
262
+ "license": "MIT",
263
+ "optional": true,
264
+ "os": [
265
+ "openbsd"
266
+ ],
267
+ "funding": {
268
+ "url": "https://liberapay.com/Koromix"
269
+ }
270
+ },
271
+ "node_modules/@koromix/koffi-openbsd-x64": {
272
+ "version": "3.3.4",
273
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-openbsd-x64/-/koffi-openbsd-x64-3.3.4.tgz",
274
+ "integrity": "sha512-SANcZVjI17CYRwszVBM+YvjTX6/Mv2zZ5EL5N+cI2Fr1RSiTDeRHCKOpMvW4wpbvmucvYul8qHY2vsi7Gz1Y9w==",
275
+ "cpu": [
276
+ "x64"
277
+ ],
278
+ "license": "MIT",
279
+ "optional": true,
280
+ "os": [
281
+ "openbsd"
282
+ ],
283
+ "funding": {
284
+ "url": "https://liberapay.com/Koromix"
285
+ }
286
+ },
287
+ "node_modules/@koromix/koffi-win32-arm64": {
288
+ "version": "3.3.4",
289
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-win32-arm64/-/koffi-win32-arm64-3.3.4.tgz",
290
+ "integrity": "sha512-TQLDhDMfq7x8fhIzD4FdqJ7QxEgkHLrcN8Bj6wPHbf85OyXtOLHCw7VRj9PZ6+uyPfaqnb25gmHQuEK8WxR3vg==",
291
+ "cpu": [
292
+ "arm64"
293
+ ],
294
+ "license": "MIT",
295
+ "optional": true,
296
+ "os": [
297
+ "win32"
298
+ ],
299
+ "funding": {
300
+ "url": "https://liberapay.com/Koromix"
301
+ }
302
+ },
303
+ "node_modules/@koromix/koffi-win32-ia32": {
304
+ "version": "3.3.4",
305
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-win32-ia32/-/koffi-win32-ia32-3.3.4.tgz",
306
+ "integrity": "sha512-z0uY3mqXATU1X7gykJydc4pqexsg++asy6XuFwd5lc7BgdMegMCm60BOtc73EoNz/sgmV3bX5bEaNVMtI/u5NA==",
307
+ "cpu": [
308
+ "ia32"
309
+ ],
310
+ "license": "MIT",
311
+ "optional": true,
312
+ "os": [
313
+ "win32"
314
+ ],
315
+ "funding": {
316
+ "url": "https://liberapay.com/Koromix"
317
+ }
318
+ },
319
+ "node_modules/@koromix/koffi-win32-x64": {
320
+ "version": "3.3.4",
321
+ "resolved": "https://registry.npmjs.org/@koromix/koffi-win32-x64/-/koffi-win32-x64-3.3.4.tgz",
322
+ "integrity": "sha512-/SpehfYrO9DtkoB0ZOgGyco4GH4zwhEyFqgCm0x8lbzXnrKiwnHXWmPpfuXhFYohFvoSO5jlLQz/hc1fJ5G0AQ==",
323
+ "cpu": [
324
+ "x64"
325
+ ],
326
+ "license": "MIT",
327
+ "optional": true,
328
+ "os": [
329
+ "win32"
330
+ ],
331
+ "funding": {
332
+ "url": "https://liberapay.com/Koromix"
333
+ }
334
+ },
335
+ "node_modules/koffi": {
336
+ "version": "3.3.4",
337
+ "resolved": "https://registry.npmjs.org/koffi/-/koffi-3.3.4.tgz",
338
+ "integrity": "sha512-31Vr+LM+w1dEsNcOJtJWvYyUTjVc/SWOxNDZJxfhsBC6qZ5YVn98n5x1oBbDq5skxCbWD4SByJpNmq63fvg9Aw==",
339
+ "hasInstallScript": true,
340
+ "license": "MIT",
341
+ "funding": {
342
+ "url": "https://liberapay.com/Koromix"
343
+ },
344
+ "optionalDependencies": {
345
+ "@koromix/koffi-android-arm64": "3.3.4",
346
+ "@koromix/koffi-android-x64": "3.3.4",
347
+ "@koromix/koffi-darwin-arm64": "3.3.4",
348
+ "@koromix/koffi-darwin-x64": "3.3.4",
349
+ "@koromix/koffi-freebsd-arm64": "3.3.4",
350
+ "@koromix/koffi-freebsd-ia32": "3.3.4",
351
+ "@koromix/koffi-freebsd-x64": "3.3.4",
352
+ "@koromix/koffi-linux-arm": "3.3.4",
353
+ "@koromix/koffi-linux-arm64": "3.3.4",
354
+ "@koromix/koffi-linux-ia32": "3.3.4",
355
+ "@koromix/koffi-linux-loong64": "3.3.4",
356
+ "@koromix/koffi-linux-ppc64": "3.3.4",
357
+ "@koromix/koffi-linux-riscv64": "3.3.4",
358
+ "@koromix/koffi-linux-x64": "3.3.4",
359
+ "@koromix/koffi-openbsd-arm64": "3.3.4",
360
+ "@koromix/koffi-openbsd-ia32": "3.3.4",
361
+ "@koromix/koffi-openbsd-x64": "3.3.4",
362
+ "@koromix/koffi-win32-arm64": "3.3.4",
363
+ "@koromix/koffi-win32-ia32": "3.3.4",
364
+ "@koromix/koffi-win32-x64": "3.3.4"
365
+ }
366
+ }
367
+ }
368
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "oar-agent-sdk-koffi",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "description": "koffi, which the relay on Windows uses to read a process's start time; installed on demand from the lockfile beside this file.",
6
+ "license": "MIT",
7
+ "dependencies": {
8
+ "koffi": "3.3.4"
9
+ }
10
+ }
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * The relay's `preview` tool for the Claude worker, shaped as an SDK MCP tool
3
3
  * definition (`{ name, description, inputSchema, handler }`) so the adapter can
4
- * hand it to `createSdkMcpServer` and this module never imports the agent SDK.
4
+ * hand it to `createSdkMcpServer`. Its zod comes with the installed SDK.
5
5
  */
6
6
 
7
- import * as z from 'zod';
7
+ import { loadAgentSdk } from '../agent-sdk-loader.mjs';
8
8
 
9
9
  import {
10
10
  PREVIEW_TOOL_DESCRIPTION,
@@ -13,6 +13,9 @@ import {
13
13
  executePreviewTool,
14
14
  } from '../../shared/preview-tool-core.mjs';
15
15
 
16
+ // zod as the installed Claude SDK carries it: the tool schemas go to that SDK.
17
+ const { z } = await loadAgentSdk('claude');
18
+
16
19
  const FIELDS = PREVIEW_TOOL_INPUT_SCHEMA.properties;
17
20
 
18
21
  /**
@@ -2,10 +2,10 @@
2
2
  * The relay's `relay_tool` tool for the Claude worker, shaped as an SDK MCP
3
3
  * tool definition (`{ name, description, inputSchema, handler }`) so the
4
4
  * adapter can hand it to `createSdkMcpServer` next to the preview tool. On the
5
- * wire it is `mcp__relay__relay_tool`; the module never imports the SDK.
5
+ * wire it is `mcp__relay__relay_tool`. Its zod comes with the installed SDK.
6
6
  */
7
7
 
8
- import * as z from 'zod';
8
+ import { loadAgentSdk } from '../agent-sdk-loader.mjs';
9
9
 
10
10
  import {
11
11
  REMOTE_RELAY_ACTIONS,
@@ -24,6 +24,9 @@ import {
24
24
  formatRemoteRelayToolResult,
25
25
  } from '../../shared/remote-relay-tool-core.mjs';
26
26
 
27
+ // zod as the installed Claude SDK carries it: the tool schemas go to that SDK.
28
+ const { z } = await loadAgentSdk('claude');
29
+
27
30
  const FIELDS = REMOTE_RELAY_TOOL_INPUT_SCHEMA.properties;
28
31
 
29
32
  function text(field) {
@@ -1,4 +1,4 @@
1
- import { createSdkMcpServer, query } from '@anthropic-ai/claude-agent-sdk';
1
+ import { loadAgentSdk } from '../agent-sdk-loader.mjs';
2
2
 
3
3
  import { formatClaudeBackgroundCommandLimitLabel } from '../../shared/claude-background-command-limit.mjs';
4
4
  import { parseThinkingDisplay } from '../../shared/claude-thinking.mjs';
@@ -9,6 +9,9 @@ import { createPreviewToolDefinition } from './claude-preview-tool.mjs';
9
9
  import { createRemoteRelayToolDefinition } from './claude-remote-relay-tool.mjs';
10
10
  import { CLAUDE_LIVE_FLAG_SETTINGS_CODE, CLAUDE_LIVE_FLAG_SETTINGS_GUIDANCE } from './claude-turn-failure.mjs';
11
11
 
12
+ // The SDK the relay installed for this worker (agent-sdk-loader.mjs).
13
+ const { createSdkMcpServer, query } = await loadAgentSdk('claude');
14
+
12
15
  export { CLAUDE_LIVE_FLAG_SETTINGS_CODE };
13
16
 
14
17
  // The name the in-process MCP server is registered under; it prefixes every