@sixb/cli-core 0.1.4

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 (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +155 -0
  3. package/dist/api-client.d.ts +23 -0
  4. package/dist/api-client.d.ts.map +1 -0
  5. package/dist/arguments.d.ts +18 -0
  6. package/dist/arguments.d.ts.map +1 -0
  7. package/dist/commands/actions.d.ts +3 -0
  8. package/dist/commands/actions.d.ts.map +1 -0
  9. package/dist/commands/files.d.ts +3 -0
  10. package/dist/commands/files.d.ts.map +1 -0
  11. package/dist/commands/index.d.ts +6 -0
  12. package/dist/commands/index.d.ts.map +1 -0
  13. package/dist/commands/metadata.d.ts +18 -0
  14. package/dist/commands/metadata.d.ts.map +1 -0
  15. package/dist/commands/objects.d.ts +3 -0
  16. package/dist/commands/objects.d.ts.map +1 -0
  17. package/dist/commands/ontology.d.ts +3 -0
  18. package/dist/commands/ontology.d.ts.map +1 -0
  19. package/dist/commands/project.d.ts +3 -0
  20. package/dist/commands/project.d.ts.map +1 -0
  21. package/dist/commands/runs.d.ts +3 -0
  22. package/dist/commands/runs.d.ts.map +1 -0
  23. package/dist/commands/shared.d.ts +15 -0
  24. package/dist/commands/shared.d.ts.map +1 -0
  25. package/dist/commands/telemetry.d.ts +3 -0
  26. package/dist/commands/telemetry.d.ts.map +1 -0
  27. package/dist/commands/workflows.d.ts +3 -0
  28. package/dist/commands/workflows.d.ts.map +1 -0
  29. package/dist/graph.d.ts +10 -0
  30. package/dist/graph.d.ts.map +1 -0
  31. package/dist/index.d.ts +11 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +1400 -0
  34. package/dist/index.js.map +26 -0
  35. package/dist/output.d.ts +21 -0
  36. package/dist/output.d.ts.map +1 -0
  37. package/dist/policies.d.ts +38 -0
  38. package/dist/policies.d.ts.map +1 -0
  39. package/dist/run.d.ts +20 -0
  40. package/dist/run.d.ts.map +1 -0
  41. package/dist/tsconfig.json +5 -0
  42. package/package.json +53 -0
  43. package/src/api-client.ts +177 -0
  44. package/src/arguments.ts +130 -0
  45. package/src/commands/actions.ts +94 -0
  46. package/src/commands/files.ts +52 -0
  47. package/src/commands/index.ts +57 -0
  48. package/src/commands/metadata.ts +212 -0
  49. package/src/commands/objects.ts +291 -0
  50. package/src/commands/ontology.ts +50 -0
  51. package/src/commands/project.ts +13 -0
  52. package/src/commands/runs.ts +84 -0
  53. package/src/commands/shared.ts +97 -0
  54. package/src/commands/telemetry.ts +96 -0
  55. package/src/commands/workflows.ts +34 -0
  56. package/src/graph.ts +359 -0
  57. package/src/index.ts +24 -0
  58. package/src/output.ts +51 -0
  59. package/src/policies.ts +17 -0
  60. package/src/run.ts +46 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sixb contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,155 @@
1
+ # `@sixb/cli-core`
2
+
3
+ Shared command runtime for working with a running Sixb instance.
4
+
5
+ It powers both:
6
+
7
+ ```text
8
+ @sixb/cli local profile + Bearer token
9
+ @sixb/agent-worker sandbox capability URL
10
+ ```
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):
14
+
15
+ ```bash
16
+ bun add --global @sixb/cli
17
+ ```
18
+
19
+ ## Commands
20
+
21
+ The same JSON-first commands are available in local and sandbox modes:
22
+
23
+ ```bash
24
+ sixb project show
25
+ sixb ontology list
26
+ sixb ontology get Customer
27
+ sixb objects inspect Customer customer-123
28
+ sixb objects list --type Customer
29
+ sixb objects search "Northline"
30
+ sixb telemetry latest Device device-1 temperature
31
+ sixb actions list
32
+ sixb actions request send-reminder --file input.json
33
+ sixb action-runs get run-123
34
+ sixb workflows list
35
+ sixb workflows start onboarding --file input.json
36
+ sixb workflow-runs get run-456
37
+ sixb files upload ./report.pdf
38
+ ```
39
+
40
+ Run `sixb <group> --help` for exact arguments and limits.
41
+
42
+ Profile management, authentication, and server lifecycle commands belong to `@sixb/cli`.
43
+ Sandbox-only commands such as `doctor` and `context` belong to `@sixb/agent-worker`.
44
+
45
+ ## Usage
46
+
47
+ Most callers need only `runInstanceCli()` and `reportError()`.
48
+
49
+ ### Local mode
50
+
51
+ The caller resolves the profile and passes its API URL and token explicitly:
52
+
53
+ ```ts
54
+ import { reportError, runInstanceCli } from "@sixb/cli-core"
55
+
56
+ try {
57
+ await runInstanceCli({
58
+ args: ["objects", "inspect", "Customer", "customer-123"],
59
+ mode: {
60
+ kind: "local",
61
+ baseUrl: "https://api.example.com",
62
+ token: "sixb_pat_...",
63
+ profile: "production",
64
+ },
65
+ })
66
+ } catch (error) {
67
+ process.exitCode = reportError(error)
68
+ }
69
+ ```
70
+
71
+ Local mode sends the token as an `Authorization: Bearer ...` header. Omit `token` for an
72
+ auth-disabled instance.
73
+
74
+ ### Sandbox mode
75
+
76
+ The Agent worker passes a run-scoped capability URL:
77
+
78
+ ```ts
79
+ import { reportError, runInstanceCli } from "@sixb/cli-core"
80
+
81
+ try {
82
+ await runInstanceCli({
83
+ args: process.argv.slice(2),
84
+ mode: {
85
+ kind: "sandbox",
86
+ baseUrl: process.env.SIXB_API_BASE_URL ?? "",
87
+ runContextPath: process.env.SIXB_RUN_CONTEXT ?? "",
88
+ },
89
+ })
90
+ } catch (error) {
91
+ process.exitCode = reportError(error)
92
+ }
93
+ ```
94
+
95
+ Sandbox mode never adds a Bearer token. Authentication is carried by the capability URL supplied
96
+ by the worker.
97
+
98
+ ## Contract
99
+
100
+ ```text
101
+ success one JSON value plus newline on stdout
102
+ help/examples text on stdout
103
+ errors one {"error": ...} value on stderr
104
+ usage failure exit 2
105
+ API failure exit 3
106
+ downloads atomic file write plus JSON receipt
107
+ ```
108
+
109
+ The HTTP client accepts only relative `/api` paths, parses structured API errors, and never prints
110
+ credentials.
111
+
112
+ Both modes reject unknown options, missing values, duplicate scalar options, and invalid positional
113
+ counts before command I/O. Options accept `--name value` or `--name=value`. Use `--` before literal
114
+ identifiers that start with a dash. `--help` and `-h` before that separator show help even after
115
+ positionals, without reading files or contacting the API.
116
+
117
+ ## Core API
118
+
119
+ ```ts
120
+ import {
121
+ CliError,
122
+ createInstanceApiClient,
123
+ INSTANCE_COMMANDS,
124
+ isInstanceCommand,
125
+ renderInstanceHelp,
126
+ reportError,
127
+ runInstanceCli,
128
+ } from "@sixb/cli-core"
129
+ ```
130
+
131
+ | Export | Purpose |
132
+ | --- | --- |
133
+ | `runInstanceCli` | Parse and execute one instance command |
134
+ | `createInstanceApiClient` | Create the mode-aware HTTP client |
135
+ | `INSTANCE_COMMANDS` | Frozen top-level command names |
136
+ | `isInstanceCommand` | Narrow a string to an instance command |
137
+ | `renderInstanceHelp` | Render local or sandbox help text |
138
+ | `requestsHelp` | Detect help before resolving a local connection |
139
+ | `CliError` | Structured CLI failure with an exit code |
140
+ | `reportError` | Write the stable error envelope and return its exit code |
141
+
142
+ ## Development
143
+
144
+ ```bash
145
+ bun --filter @sixb/cli-core typecheck
146
+ bun --filter @sixb/cli-core test
147
+ bun --filter @sixb/cli-core build
148
+ ```
149
+
150
+ Changes to shared commands must also preserve the generated Agent CLI contract on both Bun and
151
+ Node:
152
+
153
+ ```bash
154
+ bun test packages/agent-worker/tests/agent-cli.test.ts
155
+ ```
@@ -0,0 +1,23 @@
1
+ export declare class ApiClient {
2
+ readonly baseUrl: string;
3
+ private readonly authorization;
4
+ private readonly missingBaseUrlMessage;
5
+ private readonly unavailableMessage;
6
+ private readonly unavailableHint;
7
+ constructor(options: ApiClientOptions);
8
+ get(path: string, query?: Readonly<Record<string, string | undefined>>): Promise<unknown>;
9
+ post(path: string, body: unknown): Promise<unknown>;
10
+ upload(path: string, source: string, logicalPath?: string): Promise<unknown>;
11
+ download(path: string, output: string, query?: Readonly<Record<string, string | undefined>>): Promise<void>;
12
+ private url;
13
+ private json;
14
+ private fetch;
15
+ }
16
+ export interface ApiClientOptions {
17
+ readonly baseUrl: string;
18
+ readonly authorization?: string;
19
+ readonly missingBaseUrlMessage: string;
20
+ readonly unavailableMessage: string;
21
+ readonly unavailableHint: string;
22
+ }
23
+ //# sourceMappingURL=api-client.d.ts.map
@@ -0,0 +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;IAKzF,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAQnD,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAO5E,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;CAoDpB;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"}
@@ -0,0 +1,18 @@
1
+ type OptionKinds = Readonly<Record<string, "string" | "boolean">>;
2
+ /** Parse a command's options once, before reading files or calling the API. */
3
+ export declare function parseCommandArgs<const T extends OptionKinds>(args: readonly string[], kinds: T, command: string, positionalCount?: number | readonly [number, number]): {
4
+ positionals: string[];
5
+ options: {
6
+ [K in keyof T]?: T[K] extends "boolean" ? boolean : string;
7
+ };
8
+ };
9
+ export declare function requestsHelp(args: readonly string[]): boolean;
10
+ export declare function isHelp(value: string | undefined): boolean;
11
+ export declare function requireExact(args: readonly string[], count: number, message: string): void;
12
+ export declare function integerInRange(flag: string, value: string, minimum: number, maximum: number): number;
13
+ export declare function nonNegativeInteger(flag: string, value: string): number;
14
+ export declare function rfc3339Value(flag: string, value: string): string;
15
+ export declare function requireOrderedRange(afterFlag: string, after: string | undefined, beforeFlag: string, before: string | undefined): void;
16
+ export declare function enumValue<const T extends readonly string[]>(flag: string, value: string, allowed: T): T[number];
17
+ export {};
18
+ //# sourceMappingURL=arguments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arguments.d.ts","sourceRoot":"","sources":["../src/arguments.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAA;AAEjE,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,CAAC,SAAS,WAAW,EAC1D,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,MAAM,EACf,eAAe,GAAE,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAK,GACtD;IACD,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,OAAO,EAAE;SAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,GAAG,OAAO,GAAG,MAAM;KAAE,CAAA;CACxE,CAuCA;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAI7D;AAMD,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEzD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1F;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,MAAM,CASR;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAStE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKhE;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,IAAI,CAIN;AAED,wBAAgB,SAAS,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,MAAM,EAAE,EACzD,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,GACT,CAAC,CAAC,MAAM,CAAC,CAGX"}
@@ -0,0 +1,3 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function actions(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/commands/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAM9C,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgEpF"}
@@ -0,0 +1,3 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function files(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,6 @@
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"];
3
+ export type InstanceCommand = (typeof INSTANCE_COMMANDS)[number];
4
+ export declare function isInstanceCommand(command: string): command is InstanceCommand;
5
+ export declare function dispatch(api: ApiClient, command: string, args: readonly string[]): Promise<void>;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;AAW9C,eAAO,MAAM,iBAAiB,2HAUpB,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,CAuBf"}
@@ -0,0 +1,18 @@
1
+ export declare function renderInstanceHelp(mode: "local" | "sandbox"): string;
2
+ export declare const OBJECTS_HELP: string;
3
+ export declare const QUERY_HELP = "Usage:\n sixb objects query --file <path|-> [--include-total|--no-total]\n sixb objects query --example <exact|filter|incoming|expand|sort|page>\n sixb objects query --example list\n\nInput is a query node. A full {\"query\": ...} request is also accepted.\n\nQuery nodes compose through input:\n start {\"kind\":\"start\",\"objectTypeId\":\"Type\",\"includeSubtypes\":false}\n refs {\"kind\":\"refs\",\"refs\":[{\"objectTypeId\":\"Type\",\"primaryId\":\"opaque:id\"}]}\n filter {\"kind\":\"filter\",\"input\":<query>,\"predicate\":<predicate>}\n text {\"kind\":\"text\",\"input\":<query>,\"query\":\"words\",\"fields\":[\"name\"]}\n traverse {\"kind\":\"traverse\",\"input\":<query>,\"linkId\":\"link\",\"direction\":\"outgoing\"}\n vector, set, sort, limit, page, project, and expand are also supported.\n\nPredicates use op, not kind:\n and/or, not, {\"op\":\"eq\",\"propertyId\":\"status\",\"value\":\"open\"}, neq, lt, lte, gt, gte,\n in, exists, and contains.\n\nTraversal and expansion directions are outgoing or incoming. For incoming relationships, the link\nis declared on the child/source type; add sourceObjectTypeId when needed to disambiguate it.\n\nRun `sixb ontology get <type>` first; never guess property or link ids. Use refs for exact\nidentities. Put limits and pages inside the query tree.";
4
+ export declare const GROUP_HELP: {
5
+ readonly doctor: "Usage: sixb doctor";
6
+ readonly context: "Usage: sixb context";
7
+ readonly project: "Usage: sixb project show";
8
+ readonly ontology: "Usage:\n sixb ontology list [--full]\n sixb ontology get <object-type>";
9
+ 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";
10
+ 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>] [--wait]\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. --wait returns the terminal Action\nrun and waits at most 25 seconds.";
11
+ 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 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";
12
+ 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>";
13
+ readonly workflows: "Usage:\n sixb workflows list\n sixb workflows get <workflow-id>\n sixb workflows start <workflow-id> [--file <path|->]\n\nThe JSON file contains the workflow input object. Use - to read standard input.";
14
+ 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";
15
+ };
16
+ export declare const QUERY_EXAMPLES: Readonly<Record<string, string>>;
17
+ export declare const FACETS_EXAMPLE = "{\"query\":{\"kind\":\"start\",\"objectTypeId\":\"WorkOrder\"},\"facets\":[{\"propertyId\":\"status\",\"limit\":10}]}";
18
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/commands/metadata.ts"],"names":[],"mappings":"AA6DA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAEpE;AAED,eAAO,MAAM,YAAY,QA8CmB,CAAA;AAE5C,eAAO,MAAM,UAAU,i0CAuBiC,CAAA;AAExD,eAAO,MAAM,UAAU;;;;;;;;;;;CA2Db,CAAA;AAEV,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAS3D,CAAA;AAED,eAAO,MAAM,cAAc,0HAC4E,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function objects(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=objects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/commands/objects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAsB9C,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBpF"}
@@ -0,0 +1,3 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function ontology(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=ontology.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ontology.d.ts","sourceRoot":"","sources":["../../src/commands/ontology.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAM9C,wBAAsB,QAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2CrF"}
@@ -0,0 +1,3 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function project(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/commands/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAK9C,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAOpF"}
@@ -0,0 +1,3 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function runs(api: ApiClient, kind: "action" | "workflow", args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=runs.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,15 @@
1
+ export type QueryOptions = Record<string, string | undefined>;
2
+ /** Parse flag/value pairs into API query parameters. */
3
+ export declare function parseQueryOptions(args: readonly string[], names: Readonly<Record<string, string>>, command: string): QueryOptions;
4
+ export declare function normalizeWindowOptions(options: QueryOptions, policy: {
5
+ readonly defaultLimit: number;
6
+ readonly maximumLimit: number;
7
+ readonly defaultOrder: "asc" | "desc";
8
+ readonly offset?: boolean;
9
+ }): QueryOptions;
10
+ export declare function singleFileOption(args: readonly string[], command: string): string;
11
+ export declare function readJson(source: string): Promise<unknown>;
12
+ export declare function asRecord(value: unknown): Record<string, unknown>;
13
+ export declare function asRecords(value: unknown): Record<string, unknown>[];
14
+ export declare function isFileError(error: unknown, code: string): error is NodeJS.ErrnoException;
15
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +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,EAAE,MAAM,GAAG,MAAM,CAIjF;AAED,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAkB/D;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,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,IAAI,MAAM,CAAC,cAAc,CAExF"}
@@ -0,0 +1,3 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function telemetry(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/commands/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAe9C,wBAAsB,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8CtF"}
@@ -0,0 +1,3 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare function workflows(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=workflows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/commands/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAM9C,wBAAsB,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BtF"}
@@ -0,0 +1,10 @@
1
+ import type { ApiClient } from "./api-client";
2
+ interface InspectGraphOptions {
3
+ readonly depth: number;
4
+ readonly maxObjects: number;
5
+ readonly maxLinks: number;
6
+ readonly full: boolean;
7
+ }
8
+ export declare function inspectGraph(api: ApiClient, objectTypeId: string, primaryId: string, options: InspectGraphOptions): Promise<unknown>;
9
+ export {};
10
+ //# sourceMappingURL=graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AA0C7C,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CACvB;AAED,wBAAsB,YAAY,CAChC,GAAG,EAAE,SAAS,EACd,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,OAAO,CAAC,CA0KlB"}
@@ -0,0 +1,11 @@
1
+ export type { ApiClientOptions } from "./api-client";
2
+ export { ApiClient } from "./api-client";
3
+ export { isHelp, requestsHelp } from "./arguments";
4
+ export type { InstanceCommand } from "./commands";
5
+ export { INSTANCE_COMMANDS, isInstanceCommand } from "./commands";
6
+ export { renderInstanceHelp } from "./commands/metadata";
7
+ export { asRecord, isFileError } from "./commands/shared";
8
+ export { CliError, EXIT_API, EXIT_USAGE, fail, INSTANCE_CLI_VERSION, reportError, writeJson, writeText, } from "./output";
9
+ export type { InstanceCliMode, LocalInstanceCliMode, RunInstanceCliInput, SandboxInstanceCliMode, } from "./run";
10
+ export { createInstanceApiClient, runInstanceCli } from "./run";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA"}