@introspection-ai/cli 0.1.1

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 ADDED
@@ -0,0 +1,24 @@
1
+ # @introspection-ai/cli
2
+
3
+ The [Introspection](https://introspection.dev) command-line interface — the
4
+ **remote hot-swap executor**. Attaches to the cloud from your environment and
5
+ streams your local working-tree content into a running task's sandbox,
6
+ re-shipping on every change.
7
+
8
+ ```bash
9
+ npm install -g @introspection-ai/cli
10
+
11
+ # then, from inside your git work-tree:
12
+ introspection remote --task-id "$TASK_ID"
13
+ ```
14
+
15
+ Or run without installing:
16
+
17
+ ```bash
18
+ npx @introspection-ai/cli remote --task-id "$TASK_ID"
19
+ ```
20
+
21
+ The platform-specific binary is delivered via an optional dependency
22
+ (`@introspection-ai/cli-<os>-<cpu>`) selected automatically by npm.
23
+
24
+ Full documentation: https://github.com/introspection-org/introspection-cli
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ // Launcher for the Introspection CLI. The actual binary ships in a
3
+ // per-platform optional-dependency package (`@introspection-ai/cli-<os>-<cpu>`),
4
+ // gated by npm's `os`/`cpu` fields so only the matching one installs. This
5
+ // shim resolves that binary and execs it, passing argv/stdio/exit code through.
6
+ "use strict";
7
+
8
+ const { spawnSync } = require("node:child_process");
9
+
10
+ const PACKAGES = {
11
+ "darwin-arm64": "@introspection-ai/cli-darwin-arm64",
12
+ "darwin-x64": "@introspection-ai/cli-darwin-x64",
13
+ "linux-x64": "@introspection-ai/cli-linux-x64",
14
+ "linux-arm64": "@introspection-ai/cli-linux-arm64",
15
+ "win32-x64": "@introspection-ai/cli-win32-x64",
16
+ };
17
+
18
+ function resolveBinary() {
19
+ const key = `${process.platform}-${process.arch}`;
20
+ const pkg = PACKAGES[key];
21
+ if (!pkg) {
22
+ throw new Error(
23
+ `Unsupported platform: ${key}. ` +
24
+ `Build from source: https://github.com/introspection-org/introspection-cli`
25
+ );
26
+ }
27
+ const binName = process.platform === "win32" ? "introspection.exe" : "introspection";
28
+ try {
29
+ return require.resolve(`${pkg}/bin/${binName}`);
30
+ } catch {
31
+ throw new Error(
32
+ `The platform package "${pkg}" is not installed.\n` +
33
+ `If you installed with --no-optional or --omit=optional, reinstall ` +
34
+ `without it so the matching binary is fetched.`
35
+ );
36
+ }
37
+ }
38
+
39
+ let binary;
40
+ try {
41
+ binary = resolveBinary();
42
+ } catch (err) {
43
+ console.error(err.message);
44
+ process.exit(1);
45
+ }
46
+
47
+ const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
48
+ if (result.error) {
49
+ console.error(result.error.message);
50
+ process.exit(1);
51
+ }
52
+ // Re-raise a terminating signal as our own exit; otherwise pass the code.
53
+ if (result.signal) {
54
+ process.kill(process.pid, result.signal);
55
+ }
56
+ process.exit(result.status ?? 0);
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@introspection-ai/cli",
3
+ "version": "0.1.1",
4
+ "description": "Introspection CLI — remote hot-swap executor for the Introspection agent-reliability platform",
5
+ "keywords": [
6
+ "introspection",
7
+ "cli",
8
+ "remote",
9
+ "hot-swap",
10
+ "agents"
11
+ ],
12
+ "homepage": "https://github.com/introspection-org/introspection-cli#readme",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/introspection-org/introspection-cli.git"
16
+ },
17
+ "license": "Apache-2.0",
18
+ "bin": {
19
+ "introspection": "bin/introspection.js"
20
+ },
21
+ "files": [
22
+ "bin/introspection.js",
23
+ "README.md"
24
+ ],
25
+ "engines": {
26
+ "node": ">=18"
27
+ },
28
+ "optionalDependencies": {
29
+ "@introspection-ai/cli-darwin-arm64": "0.1.1",
30
+ "@introspection-ai/cli-darwin-x64": "0.1.1",
31
+ "@introspection-ai/cli-linux-x64": "0.1.1",
32
+ "@introspection-ai/cli-linux-arm64": "0.1.1",
33
+ "@introspection-ai/cli-win32-x64": "0.1.1"
34
+ }
35
+ }