@orchestraworks/cli 0.5.0 → 0.5.2

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 CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  The `orchestra` command line and the FDK library: write your software factory in TypeScript and apply it to the Orchestra platform.
4
4
 
5
+ ## For coding agents
6
+
7
+ Do these steps in order.
8
+
9
+ 1. Install the CLI: `npm install -g @orchestraworks/cli && orchestra --help`. Or run `npm install @orchestraworks/cli` in the factory folder. The help ends with the paths of the two skills on this machine.
10
+ 2. Read both skills. Read [skills/orchestra/SKILL.md](https://unpkg.com/@orchestraworks/cli/skills/orchestra/SKILL.md) to learn how to use the orchestra CLI, and [skills/orchestra-fdk/SKILL.md](https://unpkg.com/@orchestraworks/cli/skills/orchestra-fdk/SKILL.md) to set up a factory.
11
+ 3. To link both skills into your harness, run `orchestra skills install --harness claude --scope project` (or `--harness codex`) in the factory folder.
12
+ 4. Follow the `orchestra-fdk` skill. It tells you what to ask the developer and which commands to run.
13
+
14
+ The full guide to every construct, secrets, connections and troubleshooting is [docs/REFERENCE.md](https://unpkg.com/@orchestraworks/cli/docs/REFERENCE.md). `orchestra <command> --help` gives the flags of one command.
15
+
5
16
  ## Install
6
17
 
7
18
  - **Node ≥ 22** is required.
@@ -9,13 +20,15 @@ The `orchestra` command line and the FDK library: write your software factory in
9
20
  ```bash
10
21
  npm install -g @orchestraworks/cli # the CLI, on your path as `orchestra`
11
22
  npm install @orchestraworks/cli # the current release
12
- npm install @orchestraworks/cli@0.5.0 # this exact release
23
+ npm install @orchestraworks/cli@0.5.2 # this exact release
13
24
  ```
14
25
 
15
26
  Then `import { Factory, Agent, … } from "@orchestraworks/cli"` normally — the package `exports` entry resolves
16
27
  to the built `dist/` that ships inside this package, so there is nothing to build. Run the CLI
17
28
  as `orchestra …` after the global install, or as `npx orchestra …` from a folder that installed the package.
18
29
 
30
+ `npm update -g @orchestraworks/cli` keeps a global install and both skills current. For a folder install, run `npm update @orchestraworks/cli` in that folder.
31
+
19
32
  ## Quick start
20
33
 
21
34
  Make a new, empty folder and go into it. Run every command from the **factory directory**: this folder, which holds `fdk.json` after `fdk init`.
@@ -30,15 +43,6 @@ orchestra fdk apply # make the platform mat
30
43
 
31
44
  Before `fdk apply`, read the `README.md` that `fdk init` writes. It names the values to set.
32
45
 
33
- ## For coding agents
34
-
35
- - `skills/orchestra/SKILL.md`: the platform's ideas, how the CLI works, and what it cannot do yet.
36
- - `skills/orchestra-fdk/SKILL.md`: how to build and apply a factory for an existing codebase.
37
- - `orchestra --help` lists every command. `orchestra <command> --help` gives its flags.
38
- - [docs/REFERENCE.md](docs/REFERENCE.md): the full guide to every construct, secrets, connections and troubleshooting.
39
-
40
- `orchestra skills install` links both skills into your coding harness. Read the `SKILL.md` in each skill folder the command prints. The CLI may be installed globally or in your factory folder. `npm update -g @orchestraworks/cli` keeps a global install and both skills current; for a folder install, run `npm update @orchestraworks/cli` in that folder.
41
-
42
46
  ## License
43
47
 
44
- Apache License 2.0. The full text is in [LICENSE](LICENSE).
48
+ Apache License 2.0. The full text is in [LICENSE](https://unpkg.com/@orchestraworks/cli/LICENSE).
@@ -0,0 +1,10 @@
1
+ export interface BannerTerminal {
2
+ readonly isTTY?: boolean;
3
+ readonly columns?: number;
4
+ }
5
+ /**
6
+ * The banner and a blank line, or the empty string. `NO_COLOR` follows no-color.org: any non-empty value
7
+ * turns it off. `COLORTERM` of `truecolor` or `24bit` selects 24-bit color. A terminal narrower than the
8
+ * mark and the wordmark gets the mark with the plain word beside its centre.
9
+ */
10
+ export declare function helpBanner(terminal: BannerTerminal, env: NodeJS.ProcessEnv): string;
@@ -0,0 +1,63 @@
1
+ // The Orchestra mark at the top of bare `orchestra` and `orchestra --help`, for a person at a terminal.
2
+ // A coding agent usually reads piped output, so the banner prints only to a terminal with color allowed:
3
+ // piped output stays plain text with no escape codes.
4
+ /**
5
+ * The console's 48-dot mark (`console/src/components/BrandMark.tsx`), its circles rasterized onto a
6
+ * 42-by-40 dot grid and written as braille, eight dots to a character.
7
+ */
8
+ const MARK = [
9
+ "⠀⠀⠀⠀⢀⣤⡀⠀⠀⣴⣶⡄⣼⣿⡆⠀⠀⠀⠀⠀⠀",
10
+ "⠀⠀⠀⠀⠹⠿⠧⣿⡆⠈⠉⣶⡌⢹⣷⡄⢀⣀⠀⠀⠀",
11
+ "⢠⣶⣄⣿⡷⢰⣶⠀⠀⠿⠀⢈⡀⢀⣭⠀⢿⡿⠂⠀⠀",
12
+ "⠘⠛⢋⣤⡀⢠⡄⠀⠶⠀⠀⠈⠁⠈⠉⠀⣿⠆⣾⣿⡇",
13
+ "⢰⣿⡯⠙⣁⠀⠀⣤⠀⠀⠉⠀⠙⠀⠰⠆⠀⢴⣿⡍⠀",
14
+ "⠀⠉⣤⣌⠛⠀⣤⠀⠀⠒⠀⣀⠀⢴⠄⠐⠿⠂⣩⣄⠀",
15
+ "⠀⣤⣿⠋⣤⡄⢀⡀⠀⠦⠀⢀⠀⢀⣤⠀⣶⣮⠿⠿⠀",
16
+ "⠀⠻⠟⢁⣭⡅⠈⡋⠀⣀⡀⠛⢀⣤⡁⣠⣍⠁⠀⠀⠀",
17
+ "⠀⠀⠀⠘⣻⣧⡸⠿⣂⡙⢣⣤⡄⣙⡁⠻⠟⠀⠀⠀⠀",
18
+ "⠀⠀⠀⠀⠻⠿⠇⠸⣿⠗⠈⠛⠹⣿⡿⠀⠀⠀⠀⠀⠀",
19
+ ];
20
+ /** "ORCHESTRA" in the figlet ANSI Shadow face. */
21
+ const WORDMARK = [
22
+ " ██████╗ ██████╗ ██████╗██╗ ██╗███████╗███████╗████████╗██████╗ █████╗ ",
23
+ "██╔═══██╗██╔══██╗██╔════╝██║ ██║██╔════╝██╔════╝╚══██╔══╝██╔══██╗██╔══██╗",
24
+ "██║ ██║██████╔╝██║ ███████║█████╗ ███████╗ ██║ ██████╔╝███████║",
25
+ "██║ ██║██╔══██╗██║ ██╔══██║██╔══╝ ╚════██║ ██║ ██╔══██╗██╔══██║",
26
+ "╚██████╔╝██║ ██║╚██████╗██║ ██║███████╗███████║ ██║ ██║ ██║██║ ██║",
27
+ " ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝",
28
+ ];
29
+ const MARK_WIDTH = MARK[0].length;
30
+ const GAP = " ";
31
+ /** The mark and the wordmark side by side. */
32
+ const BANNER_WIDTH = MARK_WIDTH + GAP.length + WORDMARK[0].length;
33
+ /** The first mark row the wordmark sits on, which centres it on the mark. */
34
+ const WORDMARK_TOP = Math.floor((MARK.length - WORDMARK.length) / 2);
35
+ const WORD = "Orchestra";
36
+ /** The console's light-theme accent, `consolePalette.json` `light.accent`, as 24-bit RGB. */
37
+ const ACCENT_TRUE_COLOR = "\u001b[38;2;66;99;235m";
38
+ /** The nearest color in the 256-color table, for a terminal that does not announce 24-bit color. */
39
+ const ACCENT_256 = "\u001b[38;5;63m";
40
+ const BOLD = "\u001b[1m";
41
+ const RESET = "\u001b[0m";
42
+ /**
43
+ * The banner and a blank line, or the empty string. `NO_COLOR` follows no-color.org: any non-empty value
44
+ * turns it off. `COLORTERM` of `truecolor` or `24bit` selects 24-bit color. A terminal narrower than the
45
+ * mark and the wordmark gets the mark with the plain word beside its centre.
46
+ */
47
+ export function helpBanner(terminal, env) {
48
+ if (terminal.isTTY !== true || (env.NO_COLOR ?? "") !== "") {
49
+ return "";
50
+ }
51
+ const accent = /^(truecolor|24bit)$/i.test(env.COLORTERM ?? "") ? ACCENT_TRUE_COLOR : ACCENT_256;
52
+ const wide = (terminal.columns ?? BANNER_WIDTH) >= BANNER_WIDTH;
53
+ const lines = MARK.map((row, index) => {
54
+ if (wide) {
55
+ const word = WORDMARK[index - WORDMARK_TOP];
56
+ return word === undefined ? `${accent}${row}${RESET}` : `${accent}${row}${GAP}${word.trimEnd()}${RESET}`;
57
+ }
58
+ return index === Math.floor(MARK.length / 2)
59
+ ? `${accent}${row}${RESET}${GAP}${BOLD}${WORD}${RESET}`
60
+ : `${accent}${row}${RESET}`;
61
+ });
62
+ return `${lines.join("\n")}\n\n`;
63
+ }
@@ -1,11 +1,12 @@
1
+ import { type KitSkill } from "../skill-install-fs.js";
1
2
  /**
2
3
  * The package root this process runs from. Under `npx orchestra` outside an installed folder this is npm's
3
4
  * disposable cache, which `skills install` refuses to link into.
4
5
  */
5
6
  export declare function runningPackageRoot(): string;
6
7
  /**
7
- * The bundled authoring skill's path, or `null` when this install does not carry it. The exists-guard is the
8
+ * A bundled skill's path, or `null` when this install does not carry it. The exists-guard is the
8
9
  * contract: callers print this as a pointer to follow, and pointing a reader at a path with nothing behind
9
10
  * it is a worse repair than printing none. `packageRoot` is the test seam.
10
11
  */
11
- export declare function resolveBundledSkillPath(packageRoot?: string): string | null;
12
+ export declare function resolveBundledSkillPath(packageRoot?: string, skill?: KitSkill): string | null;
@@ -6,7 +6,7 @@
6
6
  import { existsSync } from "node:fs";
7
7
  import { join } from "node:path";
8
8
  import { fileURLToPath } from "node:url";
9
- import { SKILL_DIR_IN_PACKAGE, SKILL_FILE_NAME } from "../skill-install-fs.js";
9
+ import { SKILL_FILE_NAME, skillPackageDir } from "../skill-install-fs.js";
10
10
  /**
11
11
  * The package root this process runs from. Under `npx orchestra` outside an installed folder this is npm's
12
12
  * disposable cache, which `skills install` refuses to link into.
@@ -15,11 +15,11 @@ export function runningPackageRoot() {
15
15
  return fileURLToPath(new URL("../../..", import.meta.url));
16
16
  }
17
17
  /**
18
- * The bundled authoring skill's path, or `null` when this install does not carry it. The exists-guard is the
18
+ * A bundled skill's path, or `null` when this install does not carry it. The exists-guard is the
19
19
  * contract: callers print this as a pointer to follow, and pointing a reader at a path with nothing behind
20
20
  * it is a worse repair than printing none. `packageRoot` is the test seam.
21
21
  */
22
- export function resolveBundledSkillPath(packageRoot = runningPackageRoot()) {
23
- const skillPath = join(packageRoot, SKILL_DIR_IN_PACKAGE, SKILL_FILE_NAME);
22
+ export function resolveBundledSkillPath(packageRoot = runningPackageRoot(), skill = "orchestra") {
23
+ const skillPath = join(packageRoot, skillPackageDir(skill), SKILL_FILE_NAME);
24
24
  return existsSync(skillPath) ? skillPath : null;
25
25
  }
@@ -5,10 +5,15 @@ export interface SkillPointer {
5
5
  readonly fields: {
6
6
  readonly skillPath: string;
7
7
  };
8
+ /**
9
+ * The lines `orchestra` and `orchestra --help` end with. A coding agent often runs the help right after the
10
+ * install, and npm hides install-script output, so this tail is where the agent learns which skill to read.
11
+ */
12
+ readonly helpEpilogue: readonly string[];
8
13
  }
9
14
  /**
10
15
  * `null` when this install carries no bundled manual, in which case every surface prints nothing at all.
11
- * Omission is the contract, not a degraded mode. `skillPath` is the test seam.
16
+ * Omission is the contract, not a degraded mode. `skillPath` and `setupSkillPath` are the test seams.
12
17
  */
13
- export declare function bundledSkillPointer(skillPath?: string | null): SkillPointer | null;
18
+ export declare function bundledSkillPointer(skillPath?: string | null, setupSkillPath?: string | null): SkillPointer | null;
14
19
  export declare function emitSkillPointer(io: CliIo, pointer?: SkillPointer | null): void;
@@ -1,13 +1,23 @@
1
1
  import { resolveBundledSkillPath } from "./package-root.js";
2
2
  /**
3
3
  * `null` when this install carries no bundled manual, in which case every surface prints nothing at all.
4
- * Omission is the contract, not a degraded mode. `skillPath` is the test seam.
4
+ * Omission is the contract, not a degraded mode. `skillPath` and `setupSkillPath` are the test seams.
5
5
  */
6
- export function bundledSkillPointer(skillPath = resolveBundledSkillPath()) {
6
+ export function bundledSkillPointer(skillPath = resolveBundledSkillPath(), setupSkillPath = resolveBundledSkillPath(undefined, "orchestra-fdk")) {
7
7
  if (skillPath === null) {
8
8
  return null;
9
9
  }
10
- return { line: `Learn orchestra: read ${skillPath}`, fields: { skillPath } };
10
+ return {
11
+ line: `Learn orchestra: read ${skillPath}`,
12
+ fields: { skillPath },
13
+ helpEpilogue: [
14
+ "Coding agents: read both skills before you start.",
15
+ ` To learn how to use the orchestra CLI, read ${skillPath}`,
16
+ ...(setupSkillPath === null ? [] : [` To set up a factory, read ${setupSkillPath}`]),
17
+ " To link both skills into your harness, run:",
18
+ " orchestra skills install --harness claude|codex --scope project",
19
+ ],
20
+ };
11
21
  }
12
22
  export function emitSkillPointer(io, pointer = bundledSkillPointer()) {
13
23
  if (pointer !== null) {
package/dist/cli/main.js CHANGED
@@ -37,6 +37,7 @@ import { DEFAULT_TEMPLATE, initCommand, MODEL_KEY_CHOICES, OFFERED_TEMPLATES } f
37
37
  import { grantCommand } from "./api/grant.js";
38
38
  import { addAuthOptions } from "./core/invocation.js";
39
39
  import { errorDocument, reportError, settleExitCode } from "./core/errors.js";
40
+ import { helpBanner } from "./core/banner.js";
40
41
  import { bundledSkillPointer, emitSkillPointer } from "./core/skill-pointer.js";
41
42
  import { outputModeFromArgv } from "./core/output-mode.js";
42
43
  import { defaultIo, writeLines } from "./core/output.js";
@@ -170,7 +171,7 @@ LEARN MORE
170
171
  * entirely. `pointer` is the test seam.
171
172
  */
172
173
  export function topLevelHelpText(pointer = bundledSkillPointer()) {
173
- return pointer === null ? TOP_LEVEL_HELP : `${TOP_LEVEL_HELP}\n${pointer.line}\n`;
174
+ return pointer === null ? TOP_LEVEL_HELP : `${TOP_LEVEL_HELP}\n${pointer.helpEpilogue.join("\n")}\n`;
174
175
  }
175
176
  const REQUIRE_APPROVAL_HELP = requireApprovalHelp(IMPERATIVE_APPROVAL_DEFAULT);
176
177
  /**
@@ -294,9 +295,10 @@ export function buildProgram(handlers = defaultHandlers, pointer = bundledSkillP
294
295
  // Deliberately an own-property assignment and NOT `configureHelp`: commander copies `_helpConfiguration`
295
296
  // into every subcommand created afterwards, so configuring the formatter here would make every
296
297
  // `--help` print the top-level text too. The text is computed once and the closure returns that same
297
- // string every time, so `--help` printed twice in one process cannot disagree with itself.
298
+ // string every time, so `--help` printed twice in one process cannot disagree with itself. The banner
299
+ // above it depends on the stream the help goes to: stderr for a bare `orchestra`, stdout for `--help`.
298
300
  const helpText = topLevelHelpText(pointer);
299
- program.helpInformation = () => helpText;
301
+ program.helpInformation = (context) => `${helpBanner(context?.error === true ? process.stderr : process.stdout, process.env)}${helpText}`;
300
302
  // Registered on the program, which is where commander looks: it walks a command's ancestors when an action
301
303
  // fires, so one hook here covers the whole tree. It runs after parsing, so `--help` and a usage error —
302
304
  // both of which end during the parse — never reach it.
@@ -10,8 +10,6 @@ export declare const KIT_INSTALL_SPEC = "@orchestraworks/cli";
10
10
  export declare const KIT_SKILLS: readonly ["orchestra", "orchestra-fdk"];
11
11
  export type KitSkill = (typeof KIT_SKILLS)[number];
12
12
  export declare function skillPackageDir(skill: KitSkill): string;
13
- /** The reference skill's directory, which the CLI's own pointer names. */
14
- export declare const SKILL_DIR_IN_PACKAGE: string;
15
13
  export declare const SKILL_FILE_NAME = "SKILL.md";
16
14
  /** "other" is a printed-path branch, never a link target. */
17
15
  export type LinkableHarness = "claude" | "codex";
@@ -16,8 +16,6 @@ export const KIT_SKILLS = ["orchestra", "orchestra-fdk"];
16
16
  export function skillPackageDir(skill) {
17
17
  return join("skills", skill);
18
18
  }
19
- /** The reference skill's directory, which the CLI's own pointer names. */
20
- export const SKILL_DIR_IN_PACKAGE = skillPackageDir("orchestra");
21
19
  export const SKILL_FILE_NAME = "SKILL.md";
22
20
  /**
23
21
  * Identical under a project root and under `$HOME`. The ONE home for these strings: the link math, the menu
@@ -2421,7 +2421,7 @@
2421
2421
  "required": true,
2422
2422
  "repeatable": false,
2423
2423
  "credential": false,
2424
- "description": "The type of the principal the key signs in. A key of a type that cannot sign in yet is refused 403; today a service account's key alone signs in",
2424
+ "description": "The type of the principal the key signs in. A key of a type that cannot sign in is refused 403; a person's key and a service account's key sign in, and an agent's does not",
2425
2425
  "enumValues": [
2426
2426
  "USER",
2427
2427
  "SERVICE_ACCOUNT",
@@ -2453,6 +2453,19 @@
2453
2453
  "repeatable": false,
2454
2454
  "credential": false,
2455
2455
  "description": "Human-readable key name"
2456
+ },
2457
+ {
2458
+ "name": "expires-at",
2459
+ "names": [
2460
+ "expires-at"
2461
+ ],
2462
+ "source": "body",
2463
+ "field": "expiresAt",
2464
+ "type": "string",
2465
+ "required": false,
2466
+ "repeatable": false,
2467
+ "credential": false,
2468
+ "description": "When the key stops signing its principal in, after the request's time and fixed at create; absent means the key never expires"
2456
2469
  }
2457
2470
  ],
2458
2471
  "emptyDefaults": [],
@@ -2478,6 +2491,11 @@
2478
2491
  "schema": {
2479
2492
  "kind": "scalar"
2480
2493
  }
2494
+ },
2495
+ "expiresAt": {
2496
+ "schema": {
2497
+ "kind": "scalar"
2498
+ }
2481
2499
  }
2482
2500
  }
2483
2501
  },
@@ -2513,6 +2531,11 @@
2513
2531
  "kind": "scalar"
2514
2532
  }
2515
2533
  },
2534
+ "expiresAt": {
2535
+ "schema": {
2536
+ "kind": "scalar"
2537
+ }
2538
+ },
2516
2539
  "createdAt": {
2517
2540
  "schema": {
2518
2541
  "kind": "scalar"
@@ -2614,6 +2637,11 @@
2614
2637
  "kind": "scalar"
2615
2638
  }
2616
2639
  },
2640
+ "expiresAt": {
2641
+ "schema": {
2642
+ "kind": "scalar"
2643
+ }
2644
+ },
2617
2645
  "createdAt": {
2618
2646
  "schema": {
2619
2647
  "kind": "scalar"
@@ -2746,6 +2774,11 @@
2746
2774
  "kind": "scalar"
2747
2775
  }
2748
2776
  },
2777
+ "expiresAt": {
2778
+ "schema": {
2779
+ "kind": "scalar"
2780
+ }
2781
+ },
2749
2782
  "createdAt": {
2750
2783
  "schema": {
2751
2784
  "kind": "scalar"
@@ -45,6 +45,12 @@ export interface ApiKey {
45
45
  * @memberof ApiKey
46
46
  */
47
47
  lastUsedAt?: Date;
48
+ /**
49
+ * When the key stops signing its principal in, fixed at create; absent when it never expires
50
+ * @type {Date}
51
+ * @memberof ApiKey
52
+ */
53
+ expiresAt?: Date;
48
54
  /**
49
55
  * Creation timestamp
50
56
  * @type {Date}
@@ -50,6 +50,7 @@ export function ApiKeyFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'principalId': json['principalId'],
51
51
  'name': json['name'],
52
52
  'lastUsedAt': json['lastUsedAt'] == null ? undefined : (new Date(json['lastUsedAt'])),
53
+ 'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
53
54
  'createdAt': (new Date(json['createdAt'])),
54
55
  'updatedAt': (new Date(json['updatedAt'])),
55
56
  };
@@ -67,6 +68,7 @@ export function ApiKeyToJSONTyped(value, ignoreDiscriminator = false) {
67
68
  'principalId': value['principalId'],
68
69
  'name': value['name'],
69
70
  'lastUsedAt': value['lastUsedAt'] == null ? value['lastUsedAt'] : value['lastUsedAt'].toISOString(),
71
+ 'expiresAt': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
70
72
  'createdAt': value['createdAt'].toISOString(),
71
73
  'updatedAt': value['updatedAt'].toISOString(),
72
74
  };
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface CreateApiKeyRequest {
18
18
  /**
19
- * The type of the principal the key signs in. A key of a type that cannot sign in yet is refused 403; today a service account's key alone signs in
19
+ * The type of the principal the key signs in. A key of a type that cannot sign in is refused 403; a person's key and a service account's key sign in, and an agent's does not
20
20
  * @type {CreateApiKeyRequestPrincipalTypeEnum}
21
21
  * @memberof CreateApiKeyRequest
22
22
  */
@@ -33,6 +33,12 @@ export interface CreateApiKeyRequest {
33
33
  * @memberof CreateApiKeyRequest
34
34
  */
35
35
  name: string;
36
+ /**
37
+ * When the key stops signing its principal in, after the request's time and fixed at create; absent means the key never expires
38
+ * @type {Date}
39
+ * @memberof CreateApiKeyRequest
40
+ */
41
+ expiresAt?: Date;
36
42
  }
37
43
  /**
38
44
  * @export
@@ -42,6 +42,7 @@ export function CreateApiKeyRequestFromJSONTyped(json, ignoreDiscriminator) {
42
42
  'principalType': json['principalType'],
43
43
  'principalId': json['principalId'],
44
44
  'name': json['name'],
45
+ 'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
45
46
  };
46
47
  }
47
48
  export function CreateApiKeyRequestToJSON(json) {
@@ -55,5 +56,6 @@ export function CreateApiKeyRequestToJSONTyped(value, ignoreDiscriminator = fals
55
56
  'principalType': value['principalType'],
56
57
  'principalId': value['principalId'],
57
58
  'name': value['name'],
59
+ 'expiresAt': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
58
60
  };
59
61
  }
@@ -45,6 +45,12 @@ export interface ApiKey {
45
45
  * @memberof ApiKey
46
46
  */
47
47
  lastUsedAt?: Date;
48
+ /**
49
+ * When the key stops signing its principal in, fixed at create; absent when it never expires
50
+ * @type {Date}
51
+ * @memberof ApiKey
52
+ */
53
+ expiresAt?: Date;
48
54
  /**
49
55
  * Creation timestamp
50
56
  * @type {Date}
@@ -58,6 +58,7 @@ function ApiKeyFromJSONTyped(json, ignoreDiscriminator) {
58
58
  'principalId': json['principalId'],
59
59
  'name': json['name'],
60
60
  'lastUsedAt': json['lastUsedAt'] == null ? undefined : (new Date(json['lastUsedAt'])),
61
+ 'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
61
62
  'createdAt': (new Date(json['createdAt'])),
62
63
  'updatedAt': (new Date(json['updatedAt'])),
63
64
  };
@@ -75,6 +76,7 @@ function ApiKeyToJSONTyped(value, ignoreDiscriminator = false) {
75
76
  'principalId': value['principalId'],
76
77
  'name': value['name'],
77
78
  'lastUsedAt': value['lastUsedAt'] == null ? value['lastUsedAt'] : value['lastUsedAt'].toISOString(),
79
+ 'expiresAt': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
78
80
  'createdAt': value['createdAt'].toISOString(),
79
81
  'updatedAt': value['updatedAt'].toISOString(),
80
82
  };
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface CreateApiKeyRequest {
18
18
  /**
19
- * The type of the principal the key signs in. A key of a type that cannot sign in yet is refused 403; today a service account's key alone signs in
19
+ * The type of the principal the key signs in. A key of a type that cannot sign in is refused 403; a person's key and a service account's key sign in, and an agent's does not
20
20
  * @type {CreateApiKeyRequestPrincipalTypeEnum}
21
21
  * @memberof CreateApiKeyRequest
22
22
  */
@@ -33,6 +33,12 @@ export interface CreateApiKeyRequest {
33
33
  * @memberof CreateApiKeyRequest
34
34
  */
35
35
  name: string;
36
+ /**
37
+ * When the key stops signing its principal in, after the request's time and fixed at create; absent means the key never expires
38
+ * @type {Date}
39
+ * @memberof CreateApiKeyRequest
40
+ */
41
+ expiresAt?: Date;
36
42
  }
37
43
  /**
38
44
  * @export
@@ -50,6 +50,7 @@ function CreateApiKeyRequestFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'principalType': json['principalType'],
51
51
  'principalId': json['principalId'],
52
52
  'name': json['name'],
53
+ 'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
53
54
  };
54
55
  }
55
56
  function CreateApiKeyRequestToJSON(json) {
@@ -63,5 +64,6 @@ function CreateApiKeyRequestToJSONTyped(value, ignoreDiscriminator = false) {
63
64
  'principalType': value['principalType'],
64
65
  'principalId': value['principalId'],
65
66
  'name': value['name'],
67
+ 'expiresAt': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
66
68
  };
67
69
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestraworks/client",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Orchestra public API TypeScript client",
5
5
  "author": "Living Computers",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestraworks/cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "description": "The Orchestra command line.",
6
6
  "license": "Apache-2.0",
@@ -109,13 +109,13 @@
109
109
  },
110
110
  "dependencies": {
111
111
  "@agentclientprotocol/sdk": "1.3.0",
112
- "@orchestraworks/client": "0.5.0",
113
- "@orchestraworks/worker": "0.0.136",
112
+ "@orchestraworks/client": "0.5.2",
113
+ "@orchestraworks/worker": "0.0.137",
114
114
  "commander": "^14.0.0",
115
115
  "liquidjs": "^10.28.0"
116
116
  },
117
117
  "optionalDependencies": {
118
- "@orchestraworks/local": "0.0.136"
118
+ "@orchestraworks/local": "0.0.137"
119
119
  },
120
120
  "bundleDependencies": [
121
121
  "@orchestraworks/client"