@sixb/cli-core 0.1.7 → 0.1.9

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.
@@ -6,8 +6,12 @@ export declare class ApiClient {
6
6
  private readonly unavailableHint;
7
7
  constructor(options: ApiClientOptions);
8
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>;
9
+ /** `signal` stops waiting for the response; the abort is rethrown as it was raised. */
10
+ post(path: string, body: unknown, options?: {
11
+ readonly signal?: AbortSignal;
12
+ }): Promise<unknown>;
13
+ /** `mediaType` labels the part; without it, the server reads the type from the file name. */
14
+ upload(path: string, source: string, logicalPath?: string, mediaType?: string): Promise<unknown>;
11
15
  download(path: string, output: string, query?: Readonly<Record<string, string | undefined>>): Promise<void>;
12
16
  private url;
13
17
  private json;
@@ -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;IAKzF,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAQnD,MAAM,CAAC,IAAI,EAAE,MAAM,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A;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"}
@@ -1,9 +1,11 @@
1
- type OptionKinds = Readonly<Record<string, "string" | "boolean">>;
1
+ /** `strings` may repeat, and collects every value in order. */
2
+ type OptionKinds = Readonly<Record<string, "string" | "strings" | "boolean">>;
3
+ type OptionValue<TKind> = TKind extends "boolean" ? boolean : TKind extends "strings" ? string[] : string;
2
4
  /** Parse a command's options once, before reading files or calling the API. */
3
5
  export declare function parseCommandArgs<const T extends OptionKinds>(args: readonly string[], kinds: T, command: string, positionalCount?: number | readonly [number, number]): {
4
6
  positionals: string[];
5
7
  options: {
6
- [K in keyof T]?: T[K] extends "boolean" ? boolean : string;
8
+ [K in keyof T]?: OptionValue<T[K]>;
7
9
  };
8
10
  };
9
11
  export declare function requestsHelp(args: readonly string[]): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"arguments.d.ts","sourceRoot":"","sources":["../src/arguments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AC5B,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"}
@@ -1,3 +1,5 @@
1
1
  import type { ApiClient } from "../api-client";
2
- export declare function actions(api: ApiClient, args: readonly string[]): Promise<void>;
2
+ export declare function actions(api: ApiClient, args: readonly string[],
3
+ /** Test-only override of {@link ACTION_REQUEST_WAIT_MS}. */
4
+ requestWaitMs?: number): Promise<void>;
3
5
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/commands/actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAa9C,wBAAsB,OAAO,CAC3B,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,SAAS,MAAM,EAAE;AACvB,4DAA4D;AAC5D,aAAa,SAAyB,GACrC,OAAO,CAAC,IAAI,CAAC,CA4Ef"}
@@ -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"];
2
+ export declare const INSTANCE_COMMANDS: readonly ["project", "ontology", "objects", "telemetry", "actions", "action-runs", "files", "workflows", "workflow-runs", "users", "models"];
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;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"}
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,5 +1,6 @@
1
1
  export declare function renderInstanceHelp(mode: "local" | "sandbox"): string;
2
2
  export declare const SEARCH_HELP: string;
3
+ 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\"}).";
3
4
  export declare const OBJECTS_HELP: string;
4
5
  export declare const QUERY_HELP: string;
5
6
  export declare const GROUP_HELP: {
@@ -8,10 +9,12 @@ export declare const GROUP_HELP: {
8
9
  readonly project: "Usage: sixb project show";
9
10
  readonly ontology: "Usage:\n sixb ontology list [--full]\n sixb ontology get <object-type>";
10
11
  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";
11
- 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.";
12
- 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 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
+ 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";
13
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>";
14
- 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.";
15
+ 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).";
17
+ 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.";
15
18
  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";
16
19
  };
17
20
  export declare const QUERY_EXAMPLES: Readonly<Record<string, string>>;
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/commands/metadata.ts"],"names":[],"mappings":"AAsEA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAEpE;AAQD,eAAO,MAAM,WAAW,QAON,CAAA;AAElB,eAAO,MAAM,YAAY,QAmDmB,CAAA;AAE5C,eAAO,MAAM,UAAU,QA0C0D,CAAA;AAEjF,eAAO,MAAM,UAAU;;;;;;;;;;;CA2Db,CAAA;AAEV,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAe3D,CAAA;AAED,eAAO,MAAM,cAAc,0HAC4E,CAAA"}
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"}
@@ -0,0 +1,79 @@
1
+ import type { ApiClient } from "../api-client";
2
+ export declare const MODEL_KINDS: readonly ["language", "image", "speech", "transcription"];
3
+ export type ModelKind = (typeof MODEL_KINDS)[number];
4
+ type TokenPrice = string | {
5
+ readonly default: string;
6
+ readonly tiers: readonly {
7
+ readonly price: string;
8
+ }[];
9
+ };
10
+ type VariantPrice = string | {
11
+ readonly default?: string;
12
+ readonly variants: readonly (Readonly<Record<string, string>> & {
13
+ readonly price: string;
14
+ })[];
15
+ };
16
+ /** The prices a binding bills by, as GET /api/models returns them. */
17
+ export interface RateCard {
18
+ readonly input?: TokenPrice;
19
+ readonly output?: TokenPrice;
20
+ readonly cacheReadInput?: TokenPrice;
21
+ readonly audioOutput?: TokenPrice;
22
+ readonly images?: VariantPrice;
23
+ readonly characters?: VariantPrice;
24
+ readonly audioInputSeconds?: VariantPrice;
25
+ }
26
+ interface CatalogEntry {
27
+ readonly provider: string;
28
+ readonly modelId: string;
29
+ readonly isDefault: boolean;
30
+ readonly tier?: string;
31
+ readonly name?: string;
32
+ readonly description?: string;
33
+ readonly rateCard?: RateCard;
34
+ readonly [option: string]: unknown;
35
+ }
36
+ export declare function models(api: ApiClient, args: readonly string[]): Promise<void>;
37
+ interface FileRef {
38
+ readonly blobId: string;
39
+ readonly mediaType?: string;
40
+ readonly sizeBytes: number;
41
+ }
42
+ interface CallResult {
43
+ readonly callId: string;
44
+ readonly model: {
45
+ readonly provider: string;
46
+ readonly modelId: string;
47
+ };
48
+ readonly cost: {
49
+ readonly status: string;
50
+ readonly money?: {
51
+ readonly amountNanos: string;
52
+ };
53
+ };
54
+ readonly text?: string;
55
+ readonly finishReason?: string;
56
+ readonly files?: readonly FileRef[];
57
+ readonly warnings?: readonly string[];
58
+ }
59
+ /** What a call cost, in USD, as the provider reported it or the binding's card rated it. */
60
+ export declare function describeCost(cost: CallResult["cost"]): string;
61
+ /**
62
+ * A model by id, or provider:modelId when two providers share an id. An id may itself hold a
63
+ * colon, so the whole reference is tried as an id first. An id that names models of several
64
+ * kinds needs --kind.
65
+ */
66
+ export declare function findModel(entries: readonly {
67
+ readonly kind: ModelKind;
68
+ readonly entry: CatalogEntry;
69
+ }[], reference: string, kind: ModelKind | undefined): {
70
+ kind: ModelKind;
71
+ entry: CatalogEntry;
72
+ };
73
+ /**
74
+ * A rate card as people read it: "$0.04 per image", "per image: $0.041 at 768x768, otherwise
75
+ * $0.048", "$3 input · $15 output per 1M tokens".
76
+ */
77
+ export declare function describePrice(card: RateCard | undefined): string;
78
+ export {};
79
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/commands/models.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B,SAAS,CACvB,OAAO,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAAE,EAAE,EAC9E,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,SAAS,GAAG,SAAS,GAC1B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,CA0B1C;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAchE"}
@@ -1 +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;AAuB9C,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBpF"}
1
+ {"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/commands/objects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AA8B9C,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BpF"}
@@ -9,6 +9,8 @@ export declare function normalizeWindowOptions(options: QueryOptions, policy: {
9
9
  }): QueryOptions;
10
10
  export declare function singleFileOption(args: readonly string[], command: string): string;
11
11
  export declare function readJson(source: string): Promise<unknown>;
12
+ /** A file's text, or standard input's when the source is `-`. */
13
+ export declare function readText(source: string, noun: string): Promise<string>;
12
14
  export declare function asRecord(value: unknown): Record<string, unknown>;
13
15
  export declare function asRecords(value: unknown): Record<string, unknown>[];
14
16
  /** Names of an object type definition's `search.vectors` profiles, in declaration order. */
@@ -1 +1 @@
1
- {"version":3,"file":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AgB,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 users(api: ApiClient, args: readonly string[]): Promise<void>;
3
+ //# sourceMappingURL=users.d.ts.map
@@ -0,0 +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 +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"}
1
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/commands/workflows.ts"],"names":[],"mappings":"AACA,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,CAgCtF"}