arco-workbench 0.2.1 → 0.2.2
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/CONTRIBUTING.md
CHANGED
|
@@ -180,11 +180,11 @@ terminal broadcast because action acknowledgment means dispatch, not completion.
|
|
|
180
180
|
|
|
181
181
|
## Type checks + builds
|
|
182
182
|
|
|
183
|
-
Hosted CI runs the build, typecheck, unit suite, privacy audit, and configured smoke checks.
|
|
183
|
+
Hosted CI runs the build, typecheck, unit suite, privacy audit, and configured smoke checks. Run the per-change checks before landing changes.
|
|
184
184
|
|
|
185
|
-
Hosted CI (the **CI** workflow) runs on three occasions. A push to `main` runs the verify job on Ubuntu, macOS and Windows, the Ubuntu and Windows browser smokes and the Docker smoke; pushes that touch only `docs/**`, `devlog/**` or root-level `*.md` files skip it. The verify job on a push to `main` also audits the full history of every branch and tag (`node scripts/public-audit.mjs --history`); other runs audit the checked-out commit's history and the tags (`--history-head`). A weekly run adds the best-effort macOS browser job.
|
|
185
|
+
Hosted CI (the **CI** workflow) runs on three occasions. A push to `main` runs the verify job on Ubuntu, macOS and Windows, the Ubuntu and Windows browser smokes and the Docker smoke; pushes that touch only `docs/**`, `devlog/**` or root-level `*.md` files skip it. The verify job on a push to `main` also audits the full history of every branch and tag (`node scripts/public-audit.mjs --history`); other runs audit the checked-out commit's history and the tags (`--history-head`). A weekly run adds the best-effort macOS browser job. The CI `workflow_dispatch` form checks a selected ref, with an `os` input of `ubuntu`, `macos`, `windows` or `all`. Pull requests do not start CI. Release calls the same checks on the final tag with `os` set to `all`. Every run also builds and smoke-tests the native packages. The suites that need the Linux isolated-server harness report as skipped on Windows. Every job has a timeout, and a newer run on the same ref cancels the older one. Hosted minutes are metered, and macOS and Windows runners bill at a multiple of Linux. Per-change checks include focused tests, build, typecheck, the public tree audit and the help registry check.
|
|
186
186
|
|
|
187
|
-
CI and Release use `.github/actions/setup-arco/action.yml` for Node, development dependencies and the existing optional ripgrep prerequisite.
|
|
187
|
+
CI and Release use `.github/actions/setup-arco/action.yml` for Node, development dependencies and the existing optional ripgrep prerequisite. Release disables npm caching and calls CI to check all three systems, audit the full repository history and build the six native packages once. Both the package install smokes and release assembly use those native artifacts. GitHub Release creation and npm staging run only after the required checks pass and the package audit succeeds. A dropped hosted job still requires a targeted manual rerun.
|
|
188
188
|
|
|
189
189
|
|
|
190
190
|
```bash
|
|
@@ -411,18 +411,17 @@ sync; the unit suite checks them.
|
|
|
411
411
|
|
|
412
412
|
The maintainer cuts a release after the operator confirms the version. Before 1.0,
|
|
413
413
|
a minor version identifies a feature or behavior change; a patch identifies a fix
|
|
414
|
-
or documentation update.
|
|
415
|
-
|
|
414
|
+
or documentation update. Complete the per-change checks and review the release
|
|
415
|
+
branch. With operator
|
|
416
|
+
approval, put `[skip ci]` in the final landing commit message for a release
|
|
417
|
+
using one hosted run. Fast-forward clean `main` to that reviewed branch, push
|
|
418
|
+
`main` and confirm it matches the fetched `origin/main`. The marker suppresses
|
|
419
|
+
ordinary push CI for that landing commit. Leave it off ordinary changes.
|
|
416
420
|
|
|
417
421
|
```sh
|
|
418
|
-
git fetch origin
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
npm run test:unit
|
|
422
|
-
npm run docs:check
|
|
423
|
-
npm run audit:public
|
|
424
|
-
node scripts/release.mjs patch --entry-file ../release-entry.md --dry-run
|
|
425
|
-
node scripts/release.mjs patch --entry-file ../release-entry.md
|
|
422
|
+
git fetch origin main
|
|
423
|
+
node scripts/release.mjs patch --entry-file ../release-entry.md --skip-ci --dry-run
|
|
424
|
+
node scripts/release.mjs patch --entry-file ../release-entry.md --skip-ci
|
|
426
425
|
```
|
|
427
426
|
|
|
428
427
|
The inaugural release is the one exception to the bump and empty-Unreleased rules:
|
|
@@ -446,9 +445,9 @@ release identities, hooks status and lockfile workspace consistency. Entry
|
|
|
446
445
|
length, hooks status, identity and lock-version differences are diagnostics,
|
|
447
446
|
not new refusals. Existing clean-tree, main/origin-main, version, changelog,
|
|
448
447
|
complete-entry and unique-tag requirements remain, with repair instructions.
|
|
449
|
-
The origin/main comparison uses the locally fetched ref
|
|
450
|
-
|
|
451
|
-
|
|
448
|
+
The origin/main comparison uses the locally fetched ref. The command uses
|
|
449
|
+
that ref without fetching or inspecting hosted runs. The combined Release run
|
|
450
|
+
checks the tag after it is pushed.
|
|
452
451
|
|
|
453
452
|
The real invocation rolls the changelog, updates all four manifests and their
|
|
454
453
|
lockfile entries, and prepends the supplied entry. For interactive editing use
|
|
@@ -460,22 +459,25 @@ already exists. The script never resets files, deletes a tag or retries a
|
|
|
460
459
|
failed release automatically.
|
|
461
460
|
|
|
462
461
|
The script commits `Release vX.Y.Z` with the project identity and creates the
|
|
463
|
-
annotated `vX.Y.Z` tag from the changelog section.
|
|
464
|
-
|
|
462
|
+
annotated `vX.Y.Z` tag from the changelog section. `--skip-ci` adds `[skip ci]`
|
|
463
|
+
to the release commit to suppress the second push CI run. The maintainer reviews
|
|
464
|
+
the release diff and tag, then pushes both and starts Release on the tag:
|
|
465
465
|
|
|
466
466
|
```sh
|
|
467
467
|
git show --stat HEAD
|
|
468
468
|
git show HEAD
|
|
469
469
|
git tag -n99 vX.Y.Z
|
|
470
470
|
git push origin main vX.Y.Z
|
|
471
|
+
gh workflow run release.yml --ref vX.Y.Z
|
|
471
472
|
```
|
|
472
473
|
|
|
473
|
-
Replace `vX.Y.Z` with the reviewed tag.
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
474
|
+
Replace `vX.Y.Z` with the reviewed tag. Release checks that the tag matches
|
|
475
|
+
the package version. It calls CI for builds, unit tests and package installs on
|
|
476
|
+
Linux, macOS and Windows. Browser tests on Linux and Windows are required.
|
|
477
|
+
The macOS browser job is best effort. Once the required jobs pass, Release
|
|
478
|
+
assembles and audits the npm archive, then publishes the GitHub Release with
|
|
479
|
+
`arco-release.tgz` attached using the built-in token.
|
|
480
|
+
When `arco-workbench` already exists on npm, Release stages the same package with
|
|
479
481
|
`npm stage publish` through npm trusted publishing in the GitHub environment
|
|
480
482
|
`npm`, and the maintainer approves the staged package on npmjs.com. Failed
|
|
481
483
|
publishing is recovered through the workflow; the release script does not
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"node-pty": "1.1.0"
|
|
5
5
|
},
|
|
6
6
|
"name": "arco-workbench",
|
|
7
|
-
"version": "0.2.
|
|
7
|
+
"version": "0.2.2",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/ghreprimand/arco.git"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"word-extractor": "1.0.4",
|
|
68
68
|
"ws": "8.22.0",
|
|
69
69
|
"xlsx": "0.20.3",
|
|
70
|
-
"@arco/shared": "0.2.
|
|
70
|
+
"@arco/shared": "0.2.2"
|
|
71
71
|
},
|
|
72
72
|
"bundleDependencies": [
|
|
73
73
|
"@arco/shared",
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { Capabilities, CliUpdateOutcome } from '@arco/shared';
|
|
2
2
|
import { type CliUpdateDecision, type UpdateCommandResult } from './cliUpdateDecision.js';
|
|
3
|
+
import { type ResolveOptions } from './windowsCommand.js';
|
|
3
4
|
export type CliProvider = 'claude' | 'codex' | 'cursor' | 'antigravity-cli';
|
|
5
|
+
export declare function probeCommandFor(bin: string, args: string[], opts?: ResolveOptions): {
|
|
6
|
+
command: string;
|
|
7
|
+
args: string[];
|
|
8
|
+
env?: NodeJS.ProcessEnv;
|
|
9
|
+
};
|
|
4
10
|
export declare function probeVersion(bin: string, flags?: string[], timeoutMs?: number): Promise<string>;
|
|
5
11
|
export declare function probeCapabilities(): Promise<Capabilities>;
|
|
6
12
|
export declare function refreshRuntimeVersions(previous: Capabilities): Promise<Capabilities>;
|
|
@@ -11,7 +11,7 @@ import { atomicWriteFile } from './atomicFile.js';
|
|
|
11
11
|
import { probeCodexUpdate, describeCliUpdate } from './cliUpdateDecision.js';
|
|
12
12
|
import { compareVersions } from './updateCheck.js';
|
|
13
13
|
import { arcoHome } from './arcoHome.js';
|
|
14
|
-
import { commandArgs } from './windowsCommand.js';
|
|
14
|
+
import { commandArgs, resolveCommand } from './windowsCommand.js';
|
|
15
15
|
const execFileAsync = promisify(execFile);
|
|
16
16
|
const CLI_PROBE_OPTIONS = {
|
|
17
17
|
timeout: 5_000,
|
|
@@ -28,9 +28,16 @@ const cliBinary = (provider) => provider === 'cursor' ? 'cursor-agent' : provide
|
|
|
28
28
|
// optional dep, so npm exited 0 — and every `codex --version` threw. Collapsing
|
|
29
29
|
// that into 'unknown' made the whole CODEX row disappear from the popover, which
|
|
30
30
|
// reads as "not installed" and gives the operator nothing to click or diagnose.
|
|
31
|
+
// Antigravity is found the way its status, usage, sign-in and turns find it: a
|
|
32
|
+
// program installed after Arco started, or on the new-terminal PATH only, still
|
|
33
|
+
// counts. Every other program keeps the plain lookup.
|
|
34
|
+
export function probeCommandFor(bin, args, opts = {}) {
|
|
35
|
+
return resolveCommand(bin, args, bin === 'agy' ? { fresh: true, ...opts } : opts);
|
|
36
|
+
}
|
|
31
37
|
export async function probeVersion(bin, flags = ['--version'], timeoutMs = 5_000) {
|
|
32
38
|
try {
|
|
33
|
-
const
|
|
39
|
+
const cmd = probeCommandFor(bin, flags);
|
|
40
|
+
const { stdout } = await execFileAsync(cmd.command, cmd.args, { ...CLI_PROBE_OPTIONS, timeout: timeoutMs, ...(cmd.env ? { env: cmd.env } : {}) });
|
|
34
41
|
const match = stdout.match(/(\d+\.\d+\.\d+(?:[-.][A-Za-z0-9.-]+)?)/);
|
|
35
42
|
return match ? match[1] : 'unknown';
|
|
36
43
|
}
|
|
@@ -43,7 +50,8 @@ export async function probeVersion(bin, flags = ['--version'], timeoutMs = 5_000
|
|
|
43
50
|
// fits the popover's one-line result slot.
|
|
44
51
|
async function probeFailureReason(bin) {
|
|
45
52
|
try {
|
|
46
|
-
|
|
53
|
+
const cmd = probeCommandFor(bin, ['--version']);
|
|
54
|
+
await execFileAsync(cmd.command, cmd.args, { ...CLI_PROBE_OPTIONS, ...(cmd.env ? { env: cmd.env } : {}) });
|
|
47
55
|
return null;
|
|
48
56
|
}
|
|
49
57
|
catch (err) {
|
|
@@ -280,7 +288,8 @@ async function runUpdateCommand(cmd, args, provider) {
|
|
|
280
288
|
delete env[name];
|
|
281
289
|
}
|
|
282
290
|
try {
|
|
283
|
-
const
|
|
291
|
+
const run = probeCommandFor(cmd, args);
|
|
292
|
+
const { stdout, stderr } = await execFileAsync(run.command, run.args, { env: run.env ? { ...env, ...run.env } : env, maxBuffer: 4 * 1024 * 1024, timeout: 180_000 });
|
|
284
293
|
return { output: (stdout + stderr).trim(), exitCode: 0 };
|
|
285
294
|
}
|
|
286
295
|
catch (err) {
|
package/server/package.json
CHANGED
|
@@ -13,7 +13,7 @@ import { atomicWriteFile } from './atomicFile.js';
|
|
|
13
13
|
import { probeCodexUpdate, describeCliUpdate, type CliUpdateDecision, type UpdateCommandResult } from './cliUpdateDecision.js';
|
|
14
14
|
import { compareVersions } from './updateCheck.js';
|
|
15
15
|
import { arcoHome } from './arcoHome.js';
|
|
16
|
-
import { commandArgs } from './windowsCommand.js';
|
|
16
|
+
import { commandArgs, resolveCommand, type ResolveOptions } from './windowsCommand.js';
|
|
17
17
|
|
|
18
18
|
const execFileAsync = promisify(execFile);
|
|
19
19
|
const CLI_PROBE_OPTIONS = {
|
|
@@ -38,9 +38,17 @@ const cliBinary = (provider: CliProvider): string => provider === 'cursor' ? 'cu
|
|
|
38
38
|
// optional dep, so npm exited 0 — and every `codex --version` threw. Collapsing
|
|
39
39
|
// that into 'unknown' made the whole CODEX row disappear from the popover, which
|
|
40
40
|
// reads as "not installed" and gives the operator nothing to click or diagnose.
|
|
41
|
+
// Antigravity is found the way its status, usage, sign-in and turns find it: a
|
|
42
|
+
// program installed after Arco started, or on the new-terminal PATH only, still
|
|
43
|
+
// counts. Every other program keeps the plain lookup.
|
|
44
|
+
export function probeCommandFor(bin: string, args: string[], opts: ResolveOptions = {}): { command: string; args: string[]; env?: NodeJS.ProcessEnv } {
|
|
45
|
+
return resolveCommand(bin, args, bin === 'agy' ? { fresh: true, ...opts } : opts);
|
|
46
|
+
}
|
|
47
|
+
|
|
41
48
|
export async function probeVersion(bin: string, flags: string[] = ['--version'], timeoutMs = 5_000): Promise<string> {
|
|
42
49
|
try {
|
|
43
|
-
const
|
|
50
|
+
const cmd = probeCommandFor(bin, flags);
|
|
51
|
+
const { stdout } = await execFileAsync(cmd.command, cmd.args, { ...CLI_PROBE_OPTIONS, timeout: timeoutMs, ...(cmd.env ? { env: cmd.env } : {}) });
|
|
44
52
|
const match = stdout.match(/(\d+\.\d+\.\d+(?:[-.][A-Za-z0-9.-]+)?)/);
|
|
45
53
|
return match ? match[1] : 'unknown';
|
|
46
54
|
} catch (err) {
|
|
@@ -53,7 +61,8 @@ export async function probeVersion(bin: string, flags: string[] = ['--version'],
|
|
|
53
61
|
// fits the popover's one-line result slot.
|
|
54
62
|
async function probeFailureReason(bin: string): Promise<string | null> {
|
|
55
63
|
try {
|
|
56
|
-
|
|
64
|
+
const cmd = probeCommandFor(bin, ['--version']);
|
|
65
|
+
await execFileAsync(cmd.command, cmd.args, { ...CLI_PROBE_OPTIONS, ...(cmd.env ? { env: cmd.env } : {}) });
|
|
57
66
|
return null;
|
|
58
67
|
} catch (err) {
|
|
59
68
|
const e = err as NodeJS.ErrnoException & { stderr?: string; stdout?: string };
|
|
@@ -303,7 +312,8 @@ async function runUpdateCommand(cmd: string, args: string[], provider: CliProvid
|
|
|
303
312
|
for (const name of ['CODEX_MANAGED_BY_NPM', 'CODEX_MANAGED_BY_BUN', 'CODEX_MANAGED_BY_PNPM', 'CODEX_MANAGED_BY_VITE_PLUS', 'CODEX_MANAGED_PACKAGE_ROOT', 'npm_config_user_agent', 'npm_execpath']) delete env[name];
|
|
304
313
|
}
|
|
305
314
|
try {
|
|
306
|
-
const
|
|
315
|
+
const run = probeCommandFor(cmd, args);
|
|
316
|
+
const { stdout, stderr } = await execFileAsync(run.command, run.args, { env: run.env ? { ...env, ...run.env } : env, maxBuffer: 4 * 1024 * 1024, timeout: 180_000 });
|
|
307
317
|
return { output: (stdout + stderr).trim(), exitCode: 0 };
|
|
308
318
|
} catch (err) {
|
|
309
319
|
const error = err as { code?: number | string; stdout?: string; stderr?: string; message?: string };
|