@sixb/cli-core 0.1.9 → 0.2.0

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 (62) hide show
  1. package/README.md +21 -16
  2. package/dist/api-client.d.ts +1 -0
  3. package/dist/api-client.d.ts.map +1 -1
  4. package/dist/bin/sixb +26 -0
  5. package/dist/commands/data.d.ts +5 -0
  6. package/dist/commands/data.d.ts.map +1 -0
  7. package/dist/commands/files.d.ts.map +1 -1
  8. package/dist/commands/history.d.ts +7 -0
  9. package/dist/commands/history.d.ts.map +1 -0
  10. package/dist/commands/index.d.ts +1 -1
  11. package/dist/commands/index.d.ts.map +1 -1
  12. package/dist/commands/memory.d.ts +3 -0
  13. package/dist/commands/memory.d.ts.map +1 -0
  14. package/dist/commands/metadata.d.ts +11 -4
  15. package/dist/commands/metadata.d.ts.map +1 -1
  16. package/dist/commands/runs.d.ts +8 -1
  17. package/dist/commands/runs.d.ts.map +1 -1
  18. package/dist/commands/shared.d.ts +2 -0
  19. package/dist/commands/shared.d.ts.map +1 -1
  20. package/dist/commands/system.d.ts +21 -0
  21. package/dist/commands/system.d.ts.map +1 -0
  22. package/dist/commands/users.d.ts.map +1 -1
  23. package/dist/generated/sixb.mjs +2658 -0
  24. package/dist/index.d.ts +8 -3
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +298 -58
  27. package/dist/index.js.map +21 -17
  28. package/dist/main.d.ts +3 -0
  29. package/dist/main.d.ts.map +1 -0
  30. package/dist/memory.d.ts +21 -0
  31. package/dist/memory.d.ts.map +1 -0
  32. package/dist/policies.d.ts +14 -0
  33. package/dist/policies.d.ts.map +1 -1
  34. package/dist/run.d.ts +1 -0
  35. package/dist/run.d.ts.map +1 -1
  36. package/dist/sandbox-cli.d.ts +8 -0
  37. package/dist/sandbox-cli.d.ts.map +1 -0
  38. package/package.json +15 -1
  39. package/src/api-client.ts +70 -2
  40. package/src/bin/sixb +26 -0
  41. package/src/commands/actions.ts +3 -3
  42. package/src/commands/data.ts +90 -0
  43. package/src/commands/files.ts +27 -3
  44. package/src/commands/history.ts +204 -0
  45. package/src/commands/index.ts +16 -0
  46. package/src/commands/memory.ts +358 -0
  47. package/src/commands/metadata.ts +76 -29
  48. package/src/commands/models.ts +3 -3
  49. package/src/commands/ontology.ts +2 -2
  50. package/src/commands/runs.ts +22 -16
  51. package/src/commands/shared.ts +6 -0
  52. package/src/commands/system.ts +67 -0
  53. package/src/commands/telemetry.ts +2 -2
  54. package/src/commands/users.ts +22 -2
  55. package/src/commands/workflows.ts +3 -3
  56. package/src/generated/sixb.mjs +2658 -0
  57. package/src/index.ts +12 -3
  58. package/src/main.ts +41 -0
  59. package/src/memory.ts +30 -0
  60. package/src/policies.ts +5 -0
  61. package/src/run.ts +3 -2
  62. package/src/sandbox-cli.ts +18 -0
package/README.md CHANGED
@@ -1,16 +1,15 @@
1
1
  # `@sixb/cli-core`
2
2
 
3
- Shared command runtime for working with a running Sixb instance.
4
-
5
- It powers both:
3
+ The commands for working with a running Sixb instance: the API half of `sixb`, for people and
4
+ agents alike.
6
5
 
7
6
  ```text
8
- @sixb/cli local profile + Bearer token
9
- @sixb/agent-worker sandbox capability URL
7
+ @sixb/cli your sixb: these commands, signed in with your profile, plus the framework's
8
+ the sandbox's sixb these commands plus status, context and memory, built from src/main.ts
9
+ into one file the agent worker installs in every sandbox
10
10
  ```
11
11
 
12
- This package has no executable and does not load profiles or environment variables. If you want
13
- the `sixb` command, install [`@sixb/cli`](https://www.npmjs.com/package/@sixb/cli):
12
+ If you want the `sixb` command, install [`@sixb/cli`](https://www.npmjs.com/package/@sixb/cli):
14
13
 
15
14
  ```bash
16
15
  bun add --global @sixb/cli
@@ -35,6 +34,9 @@ sixb action-runs get run-123
35
34
  sixb workflows list
36
35
  sixb workflows start onboarding --file input.json
37
36
  sixb workflow-runs get run-456
37
+ sixb datasets rows orders --columns id,total --limit 10
38
+ sixb sync-runs list --sync crm --status failed
39
+ sixb pipeline-runs get run-789
38
40
  sixb files upload ./report.pdf
39
41
  ```
40
42
 
@@ -45,8 +47,9 @@ runs a semantic search through that type's vector profile and ranks results by `
45
47
 
46
48
  Run `sixb <group> --help` for exact arguments and limits.
47
49
 
48
- Profile management, authentication, and server lifecycle commands belong to `@sixb/cli`.
49
- Sandbox-only commands such as `doctor` and `context` belong to `@sixb/agent-worker`.
50
+ Profile management, authentication, and server lifecycle commands belong to `@sixb/cli`. Both
51
+ have `sixb status`: yours checks your profile, a sandbox's checks the sandbox and reports what the
52
+ worker's preflight expects. `sixb context` and `sixb memory` work inside an agent run only.
50
53
 
51
54
  ## Usage
52
55
 
@@ -79,7 +82,7 @@ auth-disabled instance.
79
82
 
80
83
  ### Sandbox mode
81
84
 
82
- The Agent worker passes a run-scoped capability URL:
85
+ `src/main.ts` runs it with the run's API address:
83
86
 
84
87
  ```ts
85
88
  import { reportError, runInstanceCli } from "@sixb/cli-core"
@@ -98,8 +101,8 @@ try {
98
101
  }
99
102
  ```
100
103
 
101
- Sandbox mode never adds a Bearer token. Authentication is carried by the capability URL supplied
102
- by the worker.
104
+ Sandbox mode never adds a Bearer token: the sandbox adds the run's token on the way out of
105
+ `SIXB_API_BASE_URL`, so no command holds it.
103
106
 
104
107
  ## Contract
105
108
 
@@ -140,10 +143,11 @@ import {
140
143
  | `createInstanceApiClient` | Create the mode-aware HTTP client |
141
144
  | `INSTANCE_COMMANDS` | Frozen top-level command names |
142
145
  | `isInstanceCommand` | Narrow a string to an instance command |
143
- | `renderInstanceHelp` | Render local or sandbox help text |
146
+ | `renderInstanceHelp` | The sandbox CLI's help text, which the agent's prompt includes |
144
147
  | `requestsHelp` | Detect help before resolving a local connection |
145
148
  | `CliError` | Structured CLI failure with an exit code |
146
149
  | `reportError` | Write the stable error envelope and return its exit code |
150
+ | `loadSandboxCliAssets` | The launcher and bundle the agent worker installs as a sandbox's `sixb` |
147
151
 
148
152
  ## Development
149
153
 
@@ -153,9 +157,10 @@ bun --filter @sixb/cli-core test
153
157
  bun --filter @sixb/cli-core build
154
158
  ```
155
159
 
156
- Changes to shared commands must also preserve the generated Agent CLI contract on both Bun and
157
- Node:
160
+ The sandbox's `sixb` is committed as `src/generated/sixb.mjs`, and CI fails when it is stale.
161
+ Regenerate it after changing any command, then run its contract on Bun and Node:
158
162
 
159
163
  ```bash
160
- bun test packages/agent-worker/tests/agent-cli.test.ts
164
+ bun run generate:sandbox-cli
165
+ bun test packages/cli-core/tests/sandbox-cli.test.ts
161
166
  ```
@@ -1,5 +1,6 @@
1
1
  export declare class ApiClient {
2
2
  readonly baseUrl: string;
3
+ private readonly socketPath;
3
4
  private readonly authorization;
4
5
  private readonly missingBaseUrlMessage;
5
6
  private readonly unavailableMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AASA,qBAAa,SAAS;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAClD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAQ;IAC9C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAQ;IAC3C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAQ;gBAE5B,OAAO,EAAE,gBAAgB;IAQ/B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAK/F,uFAAuF;IACjF,IAAI,CACR,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,OAAO,GAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GAC9C,OAAO,CAAC,OAAO,CAAC;IASnB,6FAA6F;IACvF,MAAM,CACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAA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C,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GAC9C,OAAO,CAAC,OAAO,CAAC;IASnB,6FAA6F;IACvF,MAAM,CACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC;IAYb,QAAQ,CACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GACnD,OAAO,CAAC,IAAI,CAAC;IAehB,OAAO,CAAC,GAAG;YAUG,IAAI;YAcJ,KAAK;CAqDpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAA;IACtC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CACjC"}
package/dist/bin/sixb ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env sh
2
+
3
+ set -eu
4
+
5
+ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
6
+ artifact="$script_dir/../lib/sixb.mjs"
7
+ if [ ! -f "$artifact" ]; then
8
+ artifact="$script_dir/../generated/sixb.mjs"
9
+ fi
10
+ if [ ! -f "$artifact" ]; then
11
+ printf '%s\n' '{"error":{"code":"runtime_unavailable","message":"The Sixb CLI artifact is missing."}}' >&2
12
+ exit 2
13
+ fi
14
+
15
+ bun_path=$(command -v bun || true)
16
+ if [ -n "$bun_path" ]; then
17
+ exec "$bun_path" "$artifact" "$@"
18
+ fi
19
+
20
+ node_path=$(command -v node || true)
21
+ if [ -n "$node_path" ]; then
22
+ exec "$node_path" "$artifact" "$@"
23
+ fi
24
+
25
+ printf '%s\n' '{"error":{"code":"runtime_unavailable","message":"The Sixb CLI requires Bun or Node.js."}}' >&2
26
+ exit 2
@@ -0,0 +1,5 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function datasets(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ /** `syncs` and `pipelines`: the definitions the caller may run, with each one's latest run. */
4
+ export declare function runnables(api: ApiClient, group: "syncs" | "pipelines", args: readonly string[]): Promise<void>;
5
+ //# sourceMappingURL=data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/commands/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAa9C,wBAAsB,QAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgDrF;AAED,+FAA+F;AAC/F,wBAAsB,SAAS,CAC7B,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,OAAO,GAAG,WAAW,EAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CAef"}
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/commands/files.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAK9C,wBAAsB,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6ClF"}
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/commands/files.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAM9C,wBAAsB,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDlF"}
@@ -0,0 +1,7 @@
1
+ import type { ApiClient } from "../api-client";
2
+ /**
3
+ * Read the run's conversation as text, oldest first, compacted turns included: what was said,
4
+ * the files sent, and each tool call with its result. Reasoning stays out.
5
+ */
6
+ export declare function history(api: ApiClient, args: readonly string[]): Promise<void>;
7
+ //# sourceMappingURL=history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/commands/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAiC9C;;;GAGG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDpF"}
@@ -1,5 +1,5 @@
1
1
  import type { ApiClient } from "../api-client";
2
- export declare const INSTANCE_COMMANDS: readonly ["project", "ontology", "objects", "telemetry", "actions", "action-runs", "files", "workflows", "workflow-runs", "users", "models"];
2
+ export declare const INSTANCE_COMMANDS: readonly ["project", "ontology", "objects", "telemetry", "actions", "action-runs", "files", "workflows", "workflow-runs", "users", "models", "datasets", "syncs", "sync-runs", "pipelines", "pipeline-runs"];
3
3
  export type InstanceCommand = (typeof INSTANCE_COMMANDS)[number];
4
4
  export declare function isInstanceCommand(command: string): command is InstanceCommand;
5
5
  export declare function dispatch(api: ApiClient, command: string, args: readonly string[]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAa9C,eAAO,MAAM,iBAAiB,8IAYpB,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,eAAe,CAE7E;AAED,wBAAsB,QAAQ,CAC5B,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAc9C,eAAO,MAAM,iBAAiB,8MAiBpB,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,eAAe,CAE7E;AAED,wBAAsB,QAAQ,CAC5B,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CAqCf"}
@@ -0,0 +1,3 @@
1
+ import { type SandboxInstanceCliMode } from "../run";
2
+ export declare function memory(args: readonly string[], mode: SandboxInstanceCliMode): Promise<void>;
3
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/commands/memory.ts"],"names":[],"mappings":"AAaA,OAAO,EAA2B,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAA;AA2B7E,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOjG"}
@@ -1,21 +1,28 @@
1
- export declare function renderInstanceHelp(mode: "local" | "sandbox"): string;
1
+ /** The sandbox CLI's help, which the agent's prompt includes. People's comes from @sixb/cli. */
2
+ export declare function renderInstanceHelp(): string;
2
3
  export declare const SEARCH_HELP: string;
3
4
  export declare const GET_BY_HELP = "Usage:\n sixb objects get-by <object-type> <property> <value> [--json]\n\nPrints the object of exactly <object-type> holding <value> for a property marked unique in its\nontology doc, or null when no visible object holds it. Values match exactly, case included.\nThe value is a string; with --json it is parsed as JSON, for an integer (42) or a user\nreference ({\"type\":\"user\",\"id\":\"usr_1\"}).";
4
5
  export declare const OBJECTS_HELP: string;
5
6
  export declare const QUERY_HELP: string;
6
7
  export declare const GROUP_HELP: {
7
- readonly doctor: "Usage: sixb doctor";
8
+ readonly status: "Usage: sixb status";
8
9
  readonly context: "Usage: sixb context";
10
+ readonly history: "Usage:\n sixb history [--offset <n>] [--limit <1-100>]\n sixb history <seq>\n\nPrints this conversation's messages as text, oldest first, including those summarized when it\nwas compacted: what was said, the files sent, and each tool call with its result. A page holds\n20 messages by default and cuts long text; `sixb history <seq>` prints one message whole.";
9
11
  readonly project: "Usage: sixb project show";
10
12
  readonly ontology: "Usage:\n sixb ontology list [--full]\n sixb ontology get <object-type>";
11
13
  readonly telemetry: "Usage:\n sixb telemetry latest <object-type> <primary-id> <property-id>\n sixb telemetry history <object-type> <primary-id> <property-id> [options]\n sixb telemetry query --file <path|->\n\nHistory options:\n --from <RFC3339>\n --to <RFC3339>\n --limit <1-1000> Defaults to 100\n --order <asc|desc> Timestamp order; defaults to desc";
12
14
  readonly actions: "Usage:\n sixb actions list [--type <object-type>]\n sixb actions get <action-id>\n sixb actions request <action-id> [--subject-type <type> --subject-id <id>] [--file <path|->] [--run-id <id>]\n\n`actions get` includes inputSchema, the exact JSON shape accepted by the Action. The JSON file\ncontains that parameter object; use - to read standard input. `actions request` runs the Action\nand prints its finished run, with its status and any error. It waits at most 25 seconds: a run that\ntakes longer keeps running, and the error names the run to read with `action-runs get`. A request\nthat waits for the user's approval prints `\"status\": \"awaiting_approval\"` and exits with code 4.";
13
15
  readonly "action-runs": "Usage:\n sixb action-runs list [options]\n sixb action-runs get <run-id>\n\nList options:\n --action <action-id>\n --type <object-type>\n --id <primary-id>\n --status succeeded|failed\n --started-after|--started-before <RFC3339>\n --limit <1-1000> Defaults to 20\n --offset <n> Non-negative; defaults to 0\n --order <asc|desc> Started-time order; defaults to desc";
14
- readonly files: "Usage:\n sixb files upload <local-path> [--logical-path <path>]\n sixb files download object <type> <id> --path <json-pointer> --output <local-path>\n sixb files download action-run|workflow-run <run-id> --path <json-pointer> --output <local-path>";
16
+ readonly files: "Usage:\n sixb files upload <local-path> [--logical-path <path>]\n sixb files download object <type> <id> --path <json-pointer> --output <local-path>\n sixb files download action-run|workflow-run <run-id> --path <json-pointer> --output <local-path>\n sixb files download url <content-url> --output <local-path>";
15
17
  readonly workflows: "Usage:\n sixb workflows list\n sixb workflows get <workflow-id>\n sixb workflows start <workflow-id> [--file <path|->] [--run-id <id>]\n\nThe JSON file contains the workflow input object. Use - to read standard input. A start that waits\nfor the user's approval prints `\"status\": \"awaiting_approval\"` and exits with code 4.";
16
- readonly users: "Usage:\n sixb users list [options]\n sixb users search <text> [options]\n sixb users get <user-id>\n\nOptions:\n --status active|suspended|all Defaults to active\n --limit <1-200> Defaults to 20\n --offset <n> Non-negative; defaults to 0\n\n`users search` matches part of a display name or email, ignoring case. Each member is\n{\"id\",\"email\",\"displayName\",\"avatarUrl\",\"status\"}; a user parameter takes\n{\"type\":\"user\",\"id\":\"<id>\"}. Reading members requires can.view(project.users).";
18
+ readonly users: "Usage:\n sixb users list [options]\n sixb users search <text> [options]\n sixb users get <user-id|email>\n\nOptions:\n --status active|suspended|all Defaults to active\n --limit <1-200> Defaults to 20\n --offset <n> Non-negative; defaults to 0\n\n`users search` matches part of a display name or email, ignoring case; `users get` takes an\nexact email, ignoring case, and finds suspended members too. Each member is\n{\"id\",\"email\",\"displayName\",\"avatarUrl\",\"status\"}; a user parameter takes\n{\"type\":\"user\",\"id\":\"<id>\"}. Reading members requires can.view(project.users).";
17
19
  readonly models: "Usage:\n sixb models list [--kind language|image|speech|transcription]\n sixb models get <model> [--kind <kind>]\n sixb models text \"<prompt>\"|--file <path|-> [--model <tier|model>] [--instructions <text>]\n [--max-output-tokens <n>] [--reasoning <level>]\n sixb models image \"<prompt>\" --output <path> [--model <model>] [--n <n>]\n [--size <size>] [--aspect-ratio <ratio>] [--quality <q>] [--style <s>]\n [--seed <n>] [--image <file>]...\n sixb models speech \"<text>\" --output <path> [--model <model>] [--voice <voice>]\n [--format mp3|wav|ogg|aac|flac] [--instructions <text>]\n [--speed <n>] [--language <code>]\n sixb models transcribe <file> [--model <model>]\n sixb models calls files <call-id> [--output <path>]\n\n<model> is a model id, or provider:model-id when two providers share one; without --model, the\nkind's default answers. `list` shows each model's kind, default, description and price; `get`\nadds the sizes, voices and other options a request can use. Prices are in USD.\n\n`text` also takes a tier (light, standard or heavy) for --model, and reads a long prompt from\n--file: a path, or - for standard input.\n\n--output is a file, numbered when a call returns several, or a directory ending in /. The\nextension follows the file's type, and the result lists the paths written. --image uploads a\nreference image; repeat it for several. `calls files` lists a past call's files, or downloads\nthem again.";
18
20
  readonly "workflow-runs": "Usage:\n sixb workflow-runs list [options]\n sixb workflow-runs get <run-id>\n\nList options:\n --workflow <workflow-id>\n --status queued|running|waiting|succeeded|failed|cancelled\n --started-after|--started-before <RFC3339>\n --limit <1-1000> Defaults to 20\n --offset <n> Non-negative; defaults to 0\n --order <asc|desc> Started-time order; defaults to desc";
21
+ readonly datasets: "Usage:\n sixb datasets list\n sixb datasets get <dataset-id>\n sixb datasets versions <dataset-id> [--limit <1-100>]\n sixb datasets rows <dataset-id> [options]\n\nRows options:\n --version <version-id> Defaults to the latest version\n --columns <a,b,...> Defaults to every column\n --limit <1-1000> Defaults to 100\n --offset <n> Non-negative; defaults to 0\n\n`list` and `get` show a dataset's schema, its latest version, and the syncs and pipelines you\nmay run that read or write it. `versions` lists the newest first. `rows` leaves out the\ncolumns your clearances do not cover and names them under redactions.";
22
+ readonly syncs: "Usage:\n sixb syncs list\n sixb syncs get <sync-id>\n\nLists the syncs you may run, each with its latest run. `sixb sync-runs list` shows the history.";
23
+ readonly "sync-runs": "Usage:\n sixb sync-runs list [options]\n\nList options:\n --sync <sync-id>\n --dataset <dataset-id>\n --status queued|running|succeeded|failed|cancelled\n --started-after|--started-before <RFC3339>\n --limit <1-1000> Defaults to 20\n --offset <n> Non-negative; defaults to 0\n --order <asc|desc> Started-time order; defaults to desc";
24
+ readonly pipelines: "Usage:\n sixb pipelines list\n sixb pipelines get <pipeline-id>\n\nLists the pipelines you may run, each with its latest run. `sixb pipeline-runs` shows the\nhistory and each run's steps.";
25
+ readonly "pipeline-runs": "Usage:\n sixb pipeline-runs list [options]\n sixb pipeline-runs get <run-id>\n\nList options:\n --pipeline <pipeline-id>\n --status queued|running|succeeded|failed|cancelled\n --started-after|--started-before <RFC3339>\n --limit <1-1000> Defaults to 20\n --offset <n> Non-negative; defaults to 0\n --order <asc|desc> Started-time order; defaults to desc\n\n`get` includes the run's steps.";
19
26
  };
20
27
  export declare const QUERY_EXAMPLES: Readonly<Record<string, string>>;
21
28
  export declare const FACETS_EXAMPLE = "{\"query\":{\"kind\":\"start\",\"objectTypeId\":\"WorkOrder\"},\"facets\":[{\"propertyId\":\"status\",\"limit\":10}]}";
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/commands/metadata.ts"],"names":[],"mappings":"AAqFA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAEpE;AAQD,eAAO,MAAM,WAAW,QAON,CAAA;AAElB,eAAO,MAAM,WAAW,sZAMkB,CAAA;AAE1C,eAAO,MAAM,YAAY,QAoDmB,CAAA;AAE5C,eAAO,MAAM,UAAU,QA+C0D,CAAA;AAEjF,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAoGb,CAAA;AAEV,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiB3D,CAAA;AAED,eAAO,MAAM,cAAc,0HAC4E,CAAA"}
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/commands/metadata.ts"],"names":[],"mappings":"AAwEA,gGAAgG;AAChG,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAQD,eAAO,MAAM,WAAW,QAON,CAAA;AAElB,eAAO,MAAM,WAAW,sZAMkB,CAAA;AAE1C,eAAO,MAAM,YAAY,QAoDmB,CAAA;AAE5C,eAAO,MAAM,UAAU,QA+C0D,CAAA;AAEjF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;CA+Jb,CAAA;AAEV,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiB3D,CAAA;AAED,eAAO,MAAM,cAAc,0HAC4E,CAAA"}
@@ -1,3 +1,10 @@
1
1
  import type { ApiClient } from "../api-client";
2
- export declare function runs(api: ApiClient, kind: "action" | "workflow", args: readonly string[]): Promise<void>;
2
+ declare const STATUSES: {
3
+ readonly action: readonly ["succeeded", "failed"];
4
+ readonly workflow: readonly ["queued", "running", "waiting", "succeeded", "failed", "cancelled"];
5
+ readonly sync: readonly ["queued", "running", "succeeded", "failed", "cancelled"];
6
+ readonly pipeline: readonly ["queued", "running", "succeeded", "failed", "cancelled"];
7
+ };
8
+ export declare function runs(api: ApiClient, kind: keyof typeof STATUSES, args: readonly string[]): Promise<void>;
9
+ export {};
3
10
  //# sourceMappingURL=runs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAwB9C,wBAAsB,IAAI,CACxB,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,QAAQ,GAAG,UAAU,EAC3B,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CAuDf"}
1
+ {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAyB9C,QAAA,MAAM,QAAQ;;;;;CAKJ,CAAA;AAUV,wBAAsB,IAAI,CACxB,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,MAAM,OAAO,QAAQ,EAC3B,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC,CA6Cf"}
@@ -1,4 +1,6 @@
1
1
  export type QueryOptions = Record<string, string | undefined>;
2
+ /** An id as one segment of an API path: `.` or `..` would name another route. */
3
+ export declare function idSegment(value: string | undefined): string;
2
4
  /** Parse flag/value pairs into API query parameters. */
3
5
  export declare function parseQueryOptions(args: readonly string[], names: Readonly<Record<string, string>>, command: string): QueryOptions;
4
6
  export declare function normalizeWindowOptions(options: QueryOptions, policy: {
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;AAE7D,wDAAwD;AAExD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACvC,OAAO,EAAE,MAAM,GACd,YAAY,CASd;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE;IACN,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,YAAY,EAAE,KAAK,GAAG,MAAM,CAAA;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B,GACA,YAAY,CAiBd;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,E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CAAA;IAC7B,QAAQ,CAAC,YAAY,EAAE,KAAK,GAAG,MAAM,CAAA;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAC1B,GACA,YAAY,CAiBd;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAIjF;AAED,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAY/D;AAED,iEAAiE;AACjE,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAO5E;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIhE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAEnE;AAED,4FAA4F;AAC5F,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAEhF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,IAAI,MAAM,CAAC,cAAc,CAExF"}
@@ -0,0 +1,21 @@
1
+ import { type SandboxInstanceCliMode } from "../run";
2
+ /** The sandbox runtime `sixb status` reports and the agent worker's preflight expects. */
3
+ export declare const AGENT_RUNTIME_PROFILE: "sixb-agent-runtime/v1";
4
+ /** Stable JSON emitted by `sixb status` in a sandbox and consumed by worker preflight. */
5
+ export interface SandboxStatusReport {
6
+ readonly ok: true;
7
+ readonly profile: typeof AGENT_RUNTIME_PROFILE;
8
+ readonly cli: {
9
+ readonly version: string;
10
+ };
11
+ readonly javascript: {
12
+ readonly name: "bun" | "node";
13
+ readonly version: string;
14
+ };
15
+ readonly project: {
16
+ readonly id: string;
17
+ };
18
+ }
19
+ export declare function status(args: readonly string[], mode: SandboxInstanceCliMode): Promise<void>;
20
+ export declare function context(args: readonly string[]): Promise<void>;
21
+ //# sourceMappingURL=system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/commands/system.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2B,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAA;AAG7E,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,EAAG,uBAAgC,CAAA;AAErE,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;IACjB,QAAQ,CAAC,OAAO,EAAE,OAAO,qBAAqB,CAAA;IAC9C,QAAQ,CAAC,GAAG,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;QAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1C;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBjG;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/commands/users.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAsB9C,wBAAsB,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBlF"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/commands/users.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAuB9C,wBAAsB,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsClF"}