@inquir/compute-cli 0.4.0 → 0.4.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 +632 -619
- package/dist/commands/admin.js +2 -2
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/apps-describe.d.ts.map +1 -1
- package/dist/commands/apps-describe.js +8 -1
- package/dist/commands/apps-describe.js.map +1 -1
- package/dist/commands/apps-instances.d.ts +18 -0
- package/dist/commands/apps-instances.d.ts.map +1 -0
- package/dist/commands/apps-instances.js +87 -0
- package/dist/commands/apps-instances.js.map +1 -0
- package/dist/commands/apps-observability.d.ts +6 -0
- package/dist/commands/apps-observability.d.ts.map +1 -1
- package/dist/commands/apps-observability.js +38 -9
- package/dist/commands/apps-observability.js.map +1 -1
- package/dist/commands/apps.d.ts +95 -2
- package/dist/commands/apps.d.ts.map +1 -1
- package/dist/commands/apps.js +572 -51
- package/dist/commands/apps.js.map +1 -1
- package/dist/commands/deploy.js +3 -3
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/init.js +15 -15
- package/dist/utils/api.d.ts +22 -6
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/api.js +22 -3
- package/dist/utils/api.js.map +1 -1
- package/dist/utils/apps-presentation.d.ts +7 -0
- package/dist/utils/apps-presentation.d.ts.map +1 -1
- package/dist/utils/apps-presentation.js +25 -1
- package/dist/utils/apps-presentation.js.map +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +41 -0
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/msys-path.d.ts +14 -0
- package/dist/utils/msys-path.d.ts.map +1 -0
- package/dist/utils/msys-path.js +55 -0
- package/dist/utils/msys-path.js.map +1 -0
- package/dist/utils/package-metadata.js +1 -1
- package/dist/utils/source-pack.d.ts +24 -0
- package/dist/utils/source-pack.d.ts.map +1 -0
- package/dist/utils/source-pack.js +63 -0
- package/dist/utils/source-pack.js.map +1 -0
- package/package.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AE,CAAC;QACxB,IAAI,OAAO,CAAC,IAAI;YAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;;YAC/C,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,OAAO,CAAC,MAAM,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@inquir/compute-cli",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Workspace-first CLI for Inquir Compute.",
|
|
6
|
-
"bin": {
|
|
7
|
-
"inquir": "./dist/index.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"dist",
|
|
11
|
-
"skill"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
15
|
-
"build": "npm run clean && npm --prefix ../.. run build --workspace @inquir/compute && tsc -p tsconfig.json",
|
|
16
|
-
"build:self": "tsc -p tsconfig.json",
|
|
17
|
-
"prepack": "npm run build",
|
|
18
|
-
"test": "npx vitest run -c vitest.config.ts"
|
|
19
|
-
},
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
22
|
-
},
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">=22"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"@inquir/compute": "^0.4.
|
|
28
|
-
"tsx": "^4.19.2"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/node": "^22.9.0",
|
|
32
|
-
"typescript": "^5.6.3"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@inquir/compute-cli",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Workspace-first CLI for Inquir Compute.",
|
|
6
|
+
"bin": {
|
|
7
|
+
"inquir": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"skill"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
15
|
+
"build": "npm run clean && npm --prefix ../.. run build --workspace @inquir/compute && tsc -p tsconfig.json",
|
|
16
|
+
"build:self": "tsc -p tsconfig.json",
|
|
17
|
+
"prepack": "npm run build",
|
|
18
|
+
"test": "npx vitest run -c vitest.config.ts"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=22"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@inquir/compute": "^0.4.2",
|
|
28
|
+
"tsx": "^4.19.2"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^22.9.0",
|
|
32
|
+
"typescript": "^5.6.3"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/skill/SKILL.md
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: inquir-compute
|
|
3
|
-
description: Deploy and run functions, background jobs, and web apps on Inquir Compute — use when code needs to run remotely, on a schedule, longer than a request cycle, or behind a stable URL. Zero-config deploys via `inquir deploy` or the inquir MCP tools.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Inquir Compute — deploy & run workloads
|
|
7
|
-
|
|
8
|
-
Inquir Compute runs three kinds of workloads in isolated containers:
|
|
9
|
-
|
|
10
|
-
1. **Functions** — Lambda-compatible handlers (`exports.handler`, `def handler`, Go `Handler`). Best for event processing, API routes, webhooks, cron.
|
|
11
|
-
2. **Web apps** — any HTTP server (Express, Fastify, FastAPI, Flask, raw `http`). Deployed as-is; the platform runs it with `PORT` set and proxies requests. No code changes needed.
|
|
12
|
-
3. **Jobs / durable orchestrations** — async invocations with retries, queues, timers, `waitForEvent`, and human-approval waits that survive process restarts.
|
|
13
|
-
|
|
14
|
-
## When to reach for Inquir instead of local code
|
|
15
|
-
|
|
16
|
-
- The user's code must run **after this session ends** (schedules, webhooks, background processing).
|
|
17
|
-
- A task will outlive an HTTP request → use `invoke-async` (jobs) or a durable orchestration, not a long request.
|
|
18
|
-
- The user asks to "deploy", "host", or "get a URL for" something.
|
|
19
|
-
|
|
20
|
-
## Deploying (zero config)
|
|
21
|
-
|
|
22
|
-
From a directory — no config file, no SDK, any of Node / Python / Go:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
inquir deploy # deploy current directory, auto-detect everything
|
|
26
|
-
inquir deploy ./api --name billing --set LOG_LEVEL=debug
|
|
27
|
-
inquir deploy --dry-run # show the detection plan without deploying
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Detection rules:
|
|
31
|
-
- `exports.handler` / `def handler` / `func Handler` in the entry file → **function**.
|
|
32
|
-
- A server app (`.listen(`, Express/FastAPI/Flask imports, or a `start` script) → **web app**; start command is auto-derived (`node server.js`, `python -m uvicorn main:app …`). Override with `--start "<cmd>"`.
|
|
33
|
-
- Entry file: package.json `main`, then `index/main/app/server.*` at root or `src/`.
|
|
34
|
-
- Dependencies are installed **server-side at deploy** (npm/pip) — never commit `node_modules`.
|
|
35
|
-
|
|
36
|
-
Overrides when detection guesses wrong: `--runtime`, `--handler <module.export>`, `--mode handler|web`, `--start "<cmd>"`.
|
|
37
|
-
|
|
38
|
-
## Databases (Postgres / Redis)
|
|
39
|
-
|
|
40
|
-
- `inquir apps create mydb --template postgres|redis` — one command from nothing to a running database: image, persistent volume, private TCP port, generated password, first release. `--volume-runner <runner>` puts it on a worker; that needs the operator's mirror of the template image, and the refusal (`APP_TEMPLATE_IMAGE_NOT_MIRRORED`) says so.
|
|
41
|
-
- `inquir apps connect mydb web` — writes the connection URL into another app's env as `DATABASE_URL` / `REDIS_URL`; applies on that app's next release. Prefer this: the password never passes through you.
|
|
42
|
-
- `inquir apps connection-url mydb` — prints the live URL with credentials in it (and into shell history); use only when the consumer is not an app on the platform.
|
|
43
|
-
- `inquir apps backups mydb [list|create|restore <id>|delete <id>]` — volume snapshots. `restore` **overwrites the volume** and stops the app while it runs; it asks for confirmation, so non-interactively it needs `--yes`.
|
|
44
|
-
|
|
45
|
-
## MCP tools (preferred for agents)
|
|
46
|
-
|
|
47
|
-
Register once: `claude mcp add inquir -- inquir mcp`
|
|
48
|
-
|
|
49
|
-
- `deploy {path, name?, start?, env?}` — detect + deploy a directory; returns detection reasons, deploy status, and error logs on failure.
|
|
50
|
-
- `invoke {function, payload}` — run a function and get result + logs.
|
|
51
|
-
- `exec {function, command, requestId, target?}` — submit an asynchronous command against a private source snapshot. Before calling, generate and retain one lowercase UUID v4 `requestId` per intent. A repeated UUID only observes; it never creates another execution. Finite execution must be enabled on the server; an unavailable response never falls back to writable published source. `target: "release"` uses the existing read-only release execution and needs no UUID.
|
|
52
|
-
- `source_command_status {requestId, waitMs?}` — read execution state/output; optional bounded GET polling. An interrupted wait does not cancel execution or release capacity.
|
|
53
|
-
- `source_command_reconcile {requestId}` — explicitly apply retained output if the original source is still current. Inspect `APPLIED`, `CONFLICT`, or `workspaceFailure`; never automatically rerun a command after conflict.
|
|
54
|
-
- `source_command_cancel {requestId}` — request durable cancellation. `CANCEL_REQUESTED` is intent, not a stopped-container receipt; `PUBLICATION_COMMITTED` means cancellation is too late.
|
|
55
|
-
- `source_command_resume {requestId, action: "status" | "submit"}` — reload the privately retained operation after restart. Use `status` first; `submit` explicitly retries the same saved bytes and UUID after an uncertain submission. Resume requires the same API, credential and workspace. Records contain command/env secrets and no credentials; preserve the CLI user profile's private filesystem permissions. Optional `inquir mcp --source-session <stable-conversation-id>` also binds JSON-RPC request IDs across reconnects; do not reuse that namespace for unrelated conversations.
|
|
56
|
-
- `list_invocations {function}` — recent runs with errors and logs: the debugging entry point.
|
|
57
|
-
- `deploy_status {deployId}`, `rollback {function, deployId}`, `list_functions`.
|
|
58
|
-
|
|
59
|
-
The stdio server admits four working calls, including at most one deploy/rollback, plus two source-control or deploy-status calls. A busy response starts no work; retain the source UUID when retrying. Ping and cancellation notifications remain available while work waits. Each input frame is limited to 64 KiB. HTTP responses are limited to 2 MiB for source commands and 4 MiB otherwise, with a 60-second timeout per request including body reads. Output waits for the reader, retaining at most sixteen replies or 8 MiB; a broken or stalled pipe closes observation. Disconnecting never sends a job cancellation.
|
|
60
|
-
|
|
61
|
-
## Debug loop that works
|
|
62
|
-
|
|
63
|
-
1. `deploy` → read `deploy.error` and status.
|
|
64
|
-
2. If failing at runtime: `list_invocations` → read logs.
|
|
65
|
-
3. Submit a source command with a retained UUID, then read `source_command_status`. Review output before explicitly reconciling source changes. For a read-only release check use `exec {function: "my-function", command: "npm test", target: "release"}`.
|
|
66
|
-
4. Fix code locally, `deploy` again. Deploys are versioned; `rollback` restores any previous success.
|
|
67
|
-
|
|
68
|
-
## Contracts that matter
|
|
69
|
-
|
|
70
|
-
- Handlers: return JSON-serializable values; HTTP-fronted functions return `{statusCode, headers, body}`.
|
|
71
|
-
- Web apps MUST listen on `process.env.PORT` / `$PORT` (any host binding on `0.0.0.0`).
|
|
72
|
-
- Web apps get no streaming invocations (SSE) yet; use a function for streaming responses.
|
|
73
|
-
- Secrets: pass with `--set KEY=VALUE` or `--env-file`; never hardcode.
|
|
1
|
+
---
|
|
2
|
+
name: inquir-compute
|
|
3
|
+
description: Deploy and run functions, background jobs, and web apps on Inquir Compute — use when code needs to run remotely, on a schedule, longer than a request cycle, or behind a stable URL. Zero-config deploys via `inquir deploy` or the inquir MCP tools.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Inquir Compute — deploy & run workloads
|
|
7
|
+
|
|
8
|
+
Inquir Compute runs three kinds of workloads in isolated containers:
|
|
9
|
+
|
|
10
|
+
1. **Functions** — Lambda-compatible handlers (`exports.handler`, `def handler`, Go `Handler`). Best for event processing, API routes, webhooks, cron.
|
|
11
|
+
2. **Web apps** — any HTTP server (Express, Fastify, FastAPI, Flask, raw `http`). Deployed as-is; the platform runs it with `PORT` set and proxies requests. No code changes needed.
|
|
12
|
+
3. **Jobs / durable orchestrations** — async invocations with retries, queues, timers, `waitForEvent`, and human-approval waits that survive process restarts.
|
|
13
|
+
|
|
14
|
+
## When to reach for Inquir instead of local code
|
|
15
|
+
|
|
16
|
+
- The user's code must run **after this session ends** (schedules, webhooks, background processing).
|
|
17
|
+
- A task will outlive an HTTP request → use `invoke-async` (jobs) or a durable orchestration, not a long request.
|
|
18
|
+
- The user asks to "deploy", "host", or "get a URL for" something.
|
|
19
|
+
|
|
20
|
+
## Deploying (zero config)
|
|
21
|
+
|
|
22
|
+
From a directory — no config file, no SDK, any of Node / Python / Go:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
inquir deploy # deploy current directory, auto-detect everything
|
|
26
|
+
inquir deploy ./api --name billing --set LOG_LEVEL=debug
|
|
27
|
+
inquir deploy --dry-run # show the detection plan without deploying
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Detection rules:
|
|
31
|
+
- `exports.handler` / `def handler` / `func Handler` in the entry file → **function**.
|
|
32
|
+
- A server app (`.listen(`, Express/FastAPI/Flask imports, or a `start` script) → **web app**; start command is auto-derived (`node server.js`, `python -m uvicorn main:app …`). Override with `--start "<cmd>"`.
|
|
33
|
+
- Entry file: package.json `main`, then `index/main/app/server.*` at root or `src/`.
|
|
34
|
+
- Dependencies are installed **server-side at deploy** (npm/pip) — never commit `node_modules`.
|
|
35
|
+
|
|
36
|
+
Overrides when detection guesses wrong: `--runtime`, `--handler <module.export>`, `--mode handler|web`, `--start "<cmd>"`.
|
|
37
|
+
|
|
38
|
+
## Databases (Postgres / Redis)
|
|
39
|
+
|
|
40
|
+
- `inquir apps create mydb --template postgres|redis` — one command from nothing to a running database: image, persistent volume, private TCP port, generated password, first release. `--volume-runner <runner>` puts it on a worker; that needs the operator's mirror of the template image, and the refusal (`APP_TEMPLATE_IMAGE_NOT_MIRRORED`) says so.
|
|
41
|
+
- `inquir apps connect mydb web` — writes the connection URL into another app's env as `DATABASE_URL` / `REDIS_URL`; applies on that app's next release. Prefer this: the password never passes through you.
|
|
42
|
+
- `inquir apps connection-url mydb` — prints the live URL with credentials in it (and into shell history); use only when the consumer is not an app on the platform.
|
|
43
|
+
- `inquir apps backups mydb [list|create|restore <id>|delete <id>]` — volume snapshots. `restore` **overwrites the volume** and stops the app while it runs; it asks for confirmation, so non-interactively it needs `--yes`.
|
|
44
|
+
|
|
45
|
+
## MCP tools (preferred for agents)
|
|
46
|
+
|
|
47
|
+
Register once: `claude mcp add inquir -- inquir mcp`
|
|
48
|
+
|
|
49
|
+
- `deploy {path, name?, start?, env?}` — detect + deploy a directory; returns detection reasons, deploy status, and error logs on failure.
|
|
50
|
+
- `invoke {function, payload}` — run a function and get result + logs.
|
|
51
|
+
- `exec {function, command, requestId, target?}` — submit an asynchronous command against a private source snapshot. Before calling, generate and retain one lowercase UUID v4 `requestId` per intent. A repeated UUID only observes; it never creates another execution. Finite execution must be enabled on the server; an unavailable response never falls back to writable published source. `target: "release"` uses the existing read-only release execution and needs no UUID.
|
|
52
|
+
- `source_command_status {requestId, waitMs?}` — read execution state/output; optional bounded GET polling. An interrupted wait does not cancel execution or release capacity.
|
|
53
|
+
- `source_command_reconcile {requestId}` — explicitly apply retained output if the original source is still current. Inspect `APPLIED`, `CONFLICT`, or `workspaceFailure`; never automatically rerun a command after conflict.
|
|
54
|
+
- `source_command_cancel {requestId}` — request durable cancellation. `CANCEL_REQUESTED` is intent, not a stopped-container receipt; `PUBLICATION_COMMITTED` means cancellation is too late.
|
|
55
|
+
- `source_command_resume {requestId, action: "status" | "submit"}` — reload the privately retained operation after restart. Use `status` first; `submit` explicitly retries the same saved bytes and UUID after an uncertain submission. Resume requires the same API, credential and workspace. Records contain command/env secrets and no credentials; preserve the CLI user profile's private filesystem permissions. Optional `inquir mcp --source-session <stable-conversation-id>` also binds JSON-RPC request IDs across reconnects; do not reuse that namespace for unrelated conversations.
|
|
56
|
+
- `list_invocations {function}` — recent runs with errors and logs: the debugging entry point.
|
|
57
|
+
- `deploy_status {deployId}`, `rollback {function, deployId}`, `list_functions`.
|
|
58
|
+
|
|
59
|
+
The stdio server admits four working calls, including at most one deploy/rollback, plus two source-control or deploy-status calls. A busy response starts no work; retain the source UUID when retrying. Ping and cancellation notifications remain available while work waits. Each input frame is limited to 64 KiB. HTTP responses are limited to 2 MiB for source commands and 4 MiB otherwise, with a 60-second timeout per request including body reads. Output waits for the reader, retaining at most sixteen replies or 8 MiB; a broken or stalled pipe closes observation. Disconnecting never sends a job cancellation.
|
|
60
|
+
|
|
61
|
+
## Debug loop that works
|
|
62
|
+
|
|
63
|
+
1. `deploy` → read `deploy.error` and status.
|
|
64
|
+
2. If failing at runtime: `list_invocations` → read logs.
|
|
65
|
+
3. Submit a source command with a retained UUID, then read `source_command_status`. Review output before explicitly reconciling source changes. For a read-only release check use `exec {function: "my-function", command: "npm test", target: "release"}`.
|
|
66
|
+
4. Fix code locally, `deploy` again. Deploys are versioned; `rollback` restores any previous success.
|
|
67
|
+
|
|
68
|
+
## Contracts that matter
|
|
69
|
+
|
|
70
|
+
- Handlers: return JSON-serializable values; HTTP-fronted functions return `{statusCode, headers, body}`.
|
|
71
|
+
- Web apps MUST listen on `process.env.PORT` / `$PORT` (any host binding on `0.0.0.0`).
|
|
72
|
+
- Web apps get no streaming invocations (SSE) yet; use a function for streaming responses.
|
|
73
|
+
- Secrets: pass with `--set KEY=VALUE` or `--env-file`; never hardcode.
|