@linzumi/cli 1.0.281 → 1.0.282
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/README.md +1 -1
- package/dist/cloud-supervisor.mjs +90 -90
- package/dist/hosted-coding-account-worker.js +18 -18
- package/dist/index.js +347 -342
- package/dist/native/darwin/manifest.json +2 -5
- package/dist/remote-codex-harness-worker.js +170 -300
- package/package.json +1 -1
- package/scripts/build.mjs +55 -15
package/package.json
CHANGED
package/scripts/build.mjs
CHANGED
|
@@ -116,25 +116,56 @@ if (
|
|
|
116
116
|
|
|
117
117
|
// Spec: spec/single-commander.md. Required ReScript assets fail the build.
|
|
118
118
|
const { build } = await import('esbuild');
|
|
119
|
-
const packageVersion = JSON.parse(
|
|
119
|
+
const packageVersion = JSON.parse(
|
|
120
|
+
await readFile(join(packageRoot, 'package.json'), 'utf8')
|
|
121
|
+
).version;
|
|
120
122
|
const commanderSource = join(packageRoot, '../linzumi-cli-rescript/src');
|
|
121
123
|
const banner = {
|
|
122
124
|
js: "import { createRequire as __linzumiBundleCreateRequire } from 'node:module';\nconst require = __linzumiBundleCreateRequire(import.meta.url);",
|
|
123
125
|
};
|
|
124
126
|
await rm(join(packageRoot, 'dist'), { recursive: true, force: true });
|
|
125
127
|
await mkdir(join(packageRoot, 'dist/native/darwin'), { recursive: true });
|
|
126
|
-
await copyFile(
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
await copyFile(
|
|
129
|
+
identityAsset,
|
|
130
|
+
join(packageRoot, 'dist/native/darwin/preview-process-identity')
|
|
131
|
+
);
|
|
132
|
+
await chmod(
|
|
133
|
+
join(packageRoot, 'dist/native/darwin/preview-process-identity'),
|
|
134
|
+
0o755
|
|
135
|
+
);
|
|
136
|
+
await copyFile(
|
|
137
|
+
identityManifestPath,
|
|
138
|
+
join(packageRoot, 'dist/native/darwin/manifest.json')
|
|
139
|
+
);
|
|
129
140
|
await mkdir(join(packageRoot, 'dist/assets'), { recursive: true });
|
|
130
|
-
await copyFile(
|
|
141
|
+
await copyFile(
|
|
142
|
+
join(packageRoot, 'src/assets/linzumi-logo.svg'),
|
|
143
|
+
join(packageRoot, 'dist/assets/linzumi-logo.svg')
|
|
144
|
+
);
|
|
131
145
|
|
|
132
146
|
for (const [source, output, external] of [
|
|
133
|
-
[
|
|
147
|
+
[
|
|
148
|
+
'entry/CommanderEntryMain.res.mjs',
|
|
149
|
+
'index.js',
|
|
150
|
+
['ws', 'undici', 'blessed', '@anthropic-ai/claude-agent-sdk'],
|
|
151
|
+
],
|
|
152
|
+
[
|
|
153
|
+
'worker/HarnessCodexRemoteWorkerEntry.res.mjs',
|
|
154
|
+
'remote-codex-harness-worker.js',
|
|
155
|
+
['ws', 'undici', 'blessed', '@anthropic-ai/claude-agent-sdk'],
|
|
156
|
+
],
|
|
134
157
|
['mcp/CommanderMcpEntry.res.mjs', 'mcp-server.mjs', []],
|
|
135
|
-
[
|
|
158
|
+
[
|
|
159
|
+
'worker/CommanderHostedAccountWorker.res.mjs',
|
|
160
|
+
'hosted-coding-account-worker.js',
|
|
161
|
+
[],
|
|
162
|
+
],
|
|
136
163
|
['topics/CommanderTopicsCli.res.mjs', 'topics-cli.mjs', []],
|
|
137
|
-
[
|
|
164
|
+
[
|
|
165
|
+
'forwarding/CommanderTcpTunnelCli.res.mjs',
|
|
166
|
+
'tcp-tunnel-cli.mjs',
|
|
167
|
+
['ws', 'undici'],
|
|
168
|
+
],
|
|
138
169
|
]) {
|
|
139
170
|
await build({
|
|
140
171
|
entryPoints: [join(commanderSource, source)],
|
|
@@ -148,18 +179,27 @@ for (const [source, output, external] of [
|
|
|
148
179
|
legalComments: 'none',
|
|
149
180
|
external,
|
|
150
181
|
banner,
|
|
151
|
-
define: {
|
|
182
|
+
define: {
|
|
183
|
+
'process.env.LINZUMI_CLI_VERSION': JSON.stringify(packageVersion),
|
|
184
|
+
},
|
|
152
185
|
});
|
|
153
186
|
}
|
|
154
187
|
for (const [source, output] of [
|
|
155
|
-
['remoteCodexHarnessWorkerEntrypoint.ts', 'remote-codex-harness-worker.js'],
|
|
156
188
|
['cloudSupervisorEntry.ts', 'cloud-supervisor.mjs'],
|
|
157
189
|
['crossHarnessFailover.mjs', 'crossHarnessFailover.mjs'],
|
|
158
190
|
]) {
|
|
159
|
-
await build({
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
191
|
+
await build({
|
|
192
|
+
entryPoints: [join(packageRoot, 'src', source)],
|
|
193
|
+
bundle: true,
|
|
194
|
+
platform: 'node',
|
|
195
|
+
target: 'node20',
|
|
196
|
+
format: 'esm',
|
|
197
|
+
outfile: join(packageRoot, 'dist', output),
|
|
198
|
+
minify: true,
|
|
199
|
+
sourcemap: false,
|
|
200
|
+
legalComments: 'none',
|
|
201
|
+
banner,
|
|
202
|
+
external: [],
|
|
203
|
+
});
|
|
164
204
|
}
|
|
165
205
|
await import(pathToFileURL(join(packageRoot, 'dist/index.js')).href);
|