@gonovus-ai/spec-flow-cli 0.4.0 → 0.6.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 (67) hide show
  1. package/README.md +190 -28
  2. package/dist/bin.js +6 -50
  3. package/dist/bin.js.map +1 -1
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.js +126 -397
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/work-item-output.d.ts +390 -0
  8. package/dist/commands/work-item-output.js +36 -0
  9. package/dist/commands/work-item-output.js.map +1 -0
  10. package/dist/custom-field-color-commands.d.ts +7 -0
  11. package/dist/custom-field-color-commands.js +22 -0
  12. package/dist/custom-field-color-commands.js.map +1 -0
  13. package/dist/github-connection-commands.js +23 -3
  14. package/dist/github-connection-commands.js.map +1 -1
  15. package/dist/http-origin.js +3 -0
  16. package/dist/http-origin.js.map +1 -1
  17. package/dist/index.js +50 -28
  18. package/dist/index.js.map +1 -1
  19. package/dist/input/text-source.d.ts +9 -0
  20. package/dist/input/text-source.js +74 -0
  21. package/dist/input/text-source.js.map +1 -0
  22. package/dist/product-map-commands.d.ts +2 -0
  23. package/dist/product-map-commands.js +2 -0
  24. package/dist/product-map-commands.js.map +1 -1
  25. package/dist/program.d.ts +3 -0
  26. package/dist/program.js +19 -0
  27. package/dist/program.js.map +1 -0
  28. package/dist/project-administration-commands.d.ts +3 -0
  29. package/dist/project-administration-commands.js +31 -0
  30. package/dist/project-administration-commands.js.map +1 -0
  31. package/dist/resource-command-runtime.d.ts +16 -0
  32. package/dist/resource-command-runtime.js +2 -0
  33. package/dist/resource-command-runtime.js.map +1 -0
  34. package/dist/runtime/errors.d.ts +28 -0
  35. package/dist/runtime/errors.js +133 -0
  36. package/dist/runtime/errors.js.map +1 -0
  37. package/dist/runtime/execute.d.ts +23 -0
  38. package/dist/runtime/execute.js +25 -0
  39. package/dist/runtime/execute.js.map +1 -0
  40. package/dist/runtime/identity.d.ts +183 -0
  41. package/dist/runtime/identity.js +17 -0
  42. package/dist/runtime/identity.js.map +1 -0
  43. package/dist/runtime/output.d.ts +3 -0
  44. package/dist/runtime/output.js +13 -0
  45. package/dist/runtime/output.js.map +1 -0
  46. package/dist/runtime/session.d.ts +16 -0
  47. package/dist/runtime/session.js +123 -0
  48. package/dist/runtime/session.js.map +1 -0
  49. package/dist/screen-image-commands.d.ts +10 -0
  50. package/dist/screen-image-commands.js +77 -0
  51. package/dist/screen-image-commands.js.map +1 -0
  52. package/dist/spec-discussion-commands.d.ts +3 -0
  53. package/dist/spec-discussion-commands.js +56 -0
  54. package/dist/spec-discussion-commands.js.map +1 -0
  55. package/dist/spec-owner-commands.d.ts +3 -0
  56. package/dist/spec-owner-commands.js +37 -0
  57. package/dist/spec-owner-commands.js.map +1 -0
  58. package/dist/work-item-asset-commands.d.ts +13 -0
  59. package/dist/work-item-asset-commands.js +10 -9
  60. package/dist/work-item-asset-commands.js.map +1 -1
  61. package/dist/work-item-query-commands.d.ts +3 -0
  62. package/dist/work-item-query-commands.js +29 -0
  63. package/dist/work-item-query-commands.js.map +1 -0
  64. package/package.json +1 -1
  65. package/dist/work-item-time-entry-input.d.ts +0 -4
  66. package/dist/work-item-time-entry-input.js +0 -27
  67. package/dist/work-item-time-entry-input.js.map +0 -1
package/README.md CHANGED
@@ -22,7 +22,7 @@ accepts signed S3 and Azure BlockBlob reservations, including reservations from
22
22
  its URL out of logs. Uploading bytes alone does not attach an asset; complete the
23
23
  matching task or Screen finalization command separately.
24
24
 
25
- The current CLI contract is **0.4.0**, coordinated with the official Skill's exact
25
+ The current CLI contract is **0.6.0**, coordinated with the official Skill's exact
26
26
  pin. It breaks 0.2.0 callers: Spec, Capability, Glossary, Proposal and
27
27
  authoring-history commands address shared knowledge with `--workspace-id` instead of
28
28
  `--project-id`, `project directory` is replaced by `spec list`, Session grants
@@ -36,7 +36,7 @@ seven-day Better Auth CLI Session. It supports the Node.js 24 runtime line;
36
36
  Node.js 22 and unverified future major versions are intentionally unsupported.
37
37
 
38
38
  ```bash
39
- npm install --global @gonovus-ai/spec-flow-cli@0.4.0
39
+ npm install --global @gonovus-ai/spec-flow-cli@0.6.0
40
40
  specflow auth login
41
41
  specflow auth status
42
42
  specflow auth logout
@@ -673,33 +673,12 @@ whether to resubmit. Project Read Tokens may read comments and activity under
673
673
  `WorkItemRead`, and cannot mutate comments. Activities are produced by the
674
674
  server's actual task operations; there is no activity creation command.
675
675
 
676
- ### Task time recording
676
+ ### Time recording removal (0.6.0)
677
677
 
678
- List entries oldest first with an opaque `nextCursor`, or retrieve one entry:
679
-
680
- ```bash
681
- specflow work-item time-entry list --project-id PAY --work-item-id PAY-7 --limit 20
682
- specflow work-item time-entry get --project-id PAY --work-item-id PAY-7 --entry-id <uuid>
683
- specflow work-item time-entry create --project-id PAY --work-item-id PAY-7 \
684
- --start-time '2026-07-01T10:00:00+08:00' --end-time '2026-07-01T11:00:00+08:00' \
685
- --description 'Reviewed rollout' --idempotency-key <uuid>
686
- specflow work-item time-entry update --project-id PAY --work-item-id PAY-7 \
687
- --entry-id <uuid> --start-time '2026-07-01T10:00:00+08:00' \
688
- --end-time '2026-07-01T11:30:00+08:00' --expected-version '"1"' --idempotency-key <uuid>
689
- ```
690
-
691
- Timestamps require an ISO 8601 offset. Omit `--end-time` on creation to record an
692
- unfinished entry; on update, omission preserves the existing end time. Omitted
693
- descriptions are preserved on update. The server computes whole duration seconds;
694
- unfinished entries have no duration and are excluded from `closedDurationSeconds`.
695
- The list returns that exact cumulative value as a decimal string plus `runningCount`.
696
-
697
- Writes require a CLI Session, current task update permission and a UUID command
698
- key. Only the author may update an entry, including when another Member is an
699
- Admin. Reuse the same key and inputs after an interrupted response. Updates require
700
- the read result's opaque `version`; a conflict requires a deliberate reread.
701
- Project Read Tokens can list and retrieve entries but cannot write. Archived
702
- Projects are read-only. There is no time-entry deletion command.
678
+ Version 0.6.0 removes the deprecated `work-item time-entry` command hierarchy
679
+ and its API operations. Scripts using those commands must stop invoking them;
680
+ there is no transition command. The official Skill did not use these commands
681
+ and now pins CLI 0.6.0. Historical activity and notifications remain readable.
703
682
 
704
683
  ### Personal notifications
705
684
 
@@ -824,3 +803,186 @@ the same editing and publication contract. To move a Spec to Unassigned, use
824
803
  `specflow spec update --workspace-id <id> --spec-id <id> --capability-id none
825
804
  --expected-version <version>`. Capability deletion rejects child Capabilities;
826
805
  deleting a leaf moves its Specs to Unassigned and records their placement changes.
806
+
807
+
808
+ Connect 1–50 repositories atomically with one idempotency key:
809
+
810
+ ```bash
811
+ specflow github connection connect-batch --project-id PROJECT_ID \
812
+ --repository owner/tasks:10:20 --repository owner/mobile:10:21 \
813
+ --outbound-repository-id 20 --idempotency-key UUID
814
+ ```
815
+
816
+ Repeat `--repository owner/name:installationId:repositoryId` for each repository.
817
+ Use `--no-outbound` to explicitly select none. Without either option, only the
818
+ first repository of the Project's first batch becomes outbound; later batches
819
+ only create from GitHub. A Project with an outbound repository cannot nominate
820
+ another during connection. Workspace binding conflicts reject the whole batch.
821
+ A real Web/CLI Session with current Workspace settings permission and personal
822
+ GitHub administrator access to every repository is required. The single-repository
823
+ `github connection connect` command remains available.
824
+
825
+ ## Spec responsibility, Scenario discussions and audit pages (0.5.0)
826
+
827
+ Version 0.5.0 adds these commands compatibly to 0.4.0 (ADR 0065). The Skill
828
+ source pins the matching minor version; publishing remains a separate release.
829
+ All commands emit the existing JSON result on stdout; `--json` is accepted
830
+ explicitly. Failures keep the existing structured stderr and exit categories.
831
+
832
+ ```bash
833
+ specflow spec owner read --workspace-id W --spec-id PAY-S1
834
+ specflow spec owner candidates --workspace-id W --spec-id PAY-S1
835
+ specflow spec owner assign --workspace-id W --spec-id PAY-S1 --user-id USER --expected-version '"1"' --idempotency-key UUID
836
+ specflow spec owner clear --workspace-id W --spec-id PAY-S1 --expected-version '"2"' --idempotency-key UUID
837
+ specflow spec discussion targets --workspace-id W --spec-id PAY-S1 --context-kind Published
838
+ specflow spec discussion list --workspace-id W --spec-id PAY-S1 --context-kind Published --scenario-id PAY-S1-1 --limit 30
839
+ specflow spec discussion comments --workspace-id W --spec-id PAY-S1 --thread-id THREAD_UUID --limit 30
840
+ specflow spec discussion start --workspace-id W --spec-id PAY-S1 --scenario-id PAY-S1-1 --context-hash HASH --content 'Question' --idempotency-key UUID
841
+ specflow spec discussion reply --workspace-id W --spec-id PAY-S1 --thread-id THREAD_UUID --context-kind WorkingDraft --context-hash HASH --content 'Reply' --idempotency-key UUID
842
+ specflow spec discussion edit-comment --workspace-id W --spec-id PAY-S1 --thread-id THREAD_UUID --comment-id COMMENT_UUID --content 'Edited' --expected-version '"1"' --idempotency-key UUID
843
+ specflow spec discussion delete-comment --workspace-id W --spec-id PAY-S1 --thread-id THREAD_UUID --comment-id COMMENT_UUID --expected-version '"2"' --idempotency-key UUID
844
+ specflow spec discussion resolve --workspace-id W --spec-id PAY-S1 --thread-id THREAD_UUID --expected-version '"3"' --idempotency-key UUID
845
+ specflow spec discussion reopen --workspace-id W --spec-id PAY-S1 --thread-id THREAD_UUID --expected-version '"4"' --idempotency-key UUID
846
+ specflow project rename --project-id PROJECT_UUID --name 'Delivery' --expected-version '"1"' --idempotency-key UUID
847
+ specflow project audit-log --project-id PROJECT_UUID --limit 50
848
+ specflow workspace audit-log --workspace-id W --limit 50
849
+ ```
850
+
851
+ Owner reads return `{ owner, version }`, candidates return `{ candidates }`, and
852
+ assignment/clear return `{ version }`. Responsibility grants no additional access;
853
+ only currently eligible Workspace members can be assigned. Clearing is explicit.
854
+
855
+ Discussion targets return `{ targets, targetsAvailable, currentContext,
856
+ canComment }`. Obtain the allocated Scenario ID and its `context.hash` there;
857
+ pass the exact hash as `--context-hash` to start/reply. Every discussion command
858
+ accepts `--context-kind Published|WorkingDraft` (default Published). Never use a
859
+ Published hash for different Working Draft content. `SPEC_DISCUSSION_CONTEXT_CHANGED`
860
+ retains its public code and maps to `Invalid Operation`; deliberately reread the
861
+ selected context before submitting a new intent. Edits preserve original comment
862
+ context, and deletion retains a tombstone. Only authors edit/delete their comments;
863
+ initiators or current Spec editors resolve/reopen threads. Use `comments[].version`
864
+ for comment writes and `threads[].version` for status writes; they are independent.
865
+ Discussion writes return `{ threadId, commentId, replayed }`.
866
+
867
+ Thread, comment and audit reads return one bounded page and `nextCursor`; repeat
868
+ with `--cursor <nextCursor>` and the same scope/view/filter to continue. Discussion
869
+ pages have `threads` or `comments`; audit pages have `events` including original
870
+ source and actor attribution. Audit access is checked separately for the Project
871
+ or Workspace. Rename returns the existing `{ project }` lifecycle result; it
872
+ retains Project identity and rejects ordinary writes to Archived Projects.
873
+
874
+ All new writes require an explicit UUID idempotency key. A bounded transport retry
875
+ reuses the same input, observed version, credential and key; retain that key after
876
+ an ambiguous result. Stale versions map to `Resource Changed`. The CLI neither
877
+ fetches a replacement version nor changes the requested context automatically.
878
+ Workspace read Tokens cannot use these private operations. Current Role, eligibility,
879
+ credential and lifecycle rules remain enforced by the existing service endpoints.
880
+
881
+ ## Shared task views, statistics, colors and personal tasks (ZTA-875/876/878)
882
+
883
+ ```sh
884
+ specflow work-item view list --project-id PROJECT
885
+ specflow work-item view save --project-id PROJECT --input '{"id":"UUID","name":"Mine","layout":"list","groupedByStatus":false,"filters":{"assignees":[],"customFields":{},"dueDates":[],"labels":[],"priorities":[],"search":"","sortBy":"number","sortOrder":"asc","statuses":[]}}'
886
+ specflow work-item view save --project-id PROJECT --input '<complete view JSON without version>' --expected-version '"1"'
887
+ specflow work-item statistics --project-id PROJECT --query '{"view":"list","assignee":"USER_ID","priority":"high,urgent"}'
888
+ specflow workspace my-work-items --workspace-id WORKSPACE --limit 50 [--cursor CURSOR]
889
+ specflow work-item-custom-field create --project-id PROJECT --name Risk --type dropdown --option High --option Low --option-colors '["danger",null]'
890
+ specflow work-item-custom-field option-colors --project-id PROJECT --field-id FIELD --colors '["warning",null]' --expected-version '"1"' --idempotency-key UUID
891
+ specflow work-item-custom-field option-colors --project-id PROJECT --field-id FIELD --clear --expected-version '"2"' --idempotency-key UUID
892
+ ```
893
+
894
+ Views retain the existing board/list layout and complete filters, including optional
895
+ `repositoryConnectionId`. Save omits the expected version only for a new ID.
896
+ Identical immediate retries use the same ID, content and observed version; the
897
+ server owns replay and stale-version behavior. No view Idempotency-Key is invented.
898
+ Statistics returns the server aggregate, including trends at `overview.timeline`;
899
+ there is no client page counting. Query accepts existing server selection keys:
900
+ `view`, `repositoryConnectionId`, `assignee`, `customFields`, `due`, `dueAfter`,
901
+ `dueBefore`, `label`, `priority`, `search`, `sortBy`, `sortOrder`, `startAfter`,
902
+ `startBefore`, `status`. CSV and customFields JSON strings retain server semantics.
903
+ Personal tasks returns `total`, Project `groups` and `nextCursor` from the current
904
+ User's authorized unfinished tasks in Active Projects; retain the server cursor.
905
+ Colors align one-to-one with dropdown options; null entries clear individual colors,
906
+ `--clear` clears all. The server validates color values, lengths and field type.
907
+ Assistant can discover views, statistics/trends, option colors and my unfinished
908
+ Work Items. View and color writes wait for approval and retain version preconditions.
909
+
910
+ ## Local Screen image files (ZTA-881 CLI)
911
+
912
+ ```sh
913
+ specflow map screen image-upload --workspace-id WORKSPACE --screen-id SCREEN --file ./image.png --content-type image/png --expected-version '"1"' --idempotency-key RESERVE_KEY --finalize-key FINALIZE_KEY
914
+ specflow map screen image-download --workspace-id WORKSPACE --screen-id SCREEN --asset-id ASSET_UUID --output-file ./download.png
915
+ ```
916
+
917
+ Upload reserves against the observed Screen version, validates the returned fresh
918
+ HTTP(S) reservation, PUTs bytes without Session credentials or redirects, and
919
+ finalizes using a separate retained key and the same version. Local files must be
920
+ nonempty regular files of at most 10 MiB; server MIME/size checks still apply.
921
+ Retain both phase keys and identical inputs after failures. Once finalized, a new
922
+ reservation attempt with the old reserve key returns upload-expired; reread the
923
+ Screen to resolve an ambiguous completion. Existing image-reserve/image-finalize/
924
+ image-remove commands remain available for explicit phase control.
925
+ Download accepts only authorized Workspace/Screen/asset identities, never an
926
+ arbitrary URL, and creates a new owner-only file without overwriting existing files.
927
+ Assistant image handling is outside this CLI slice.
928
+
929
+ Global search uses the server's cross-resource search and current authority:
930
+
931
+ ```sh
932
+ specflow search-global --query 'PAY-12' --limit 20
933
+ specflow search-global --query 'payment' --limit 20 --cursor '<nextCursor>'
934
+ ```
935
+
936
+ The JSON response preserves object kind, ID, owning Workspace/Project, totalCount
937
+ and nextCursor. Continue with the same query until nextCursor is null. The server
938
+ has no type filter. `specflow spec search` retains its published-Spec semantics.
939
+
940
+ ## Work Item automation (ZTA-911, CLI 0.6.0)
941
+
942
+ Existing commands keep full JSON by default. Use `--output summary` for Work Item
943
+ create/read/update/assign/list and relation create/list to omit descriptions while
944
+ retaining IDs, versions, permissions, cursors and replay receipts. Grouped pages
945
+ are summarized too. Summary does not fetch further pages. `relation: null` remains
946
+ null. Unsupported summary commands reject before sending a mutation.
947
+
948
+ Work Item `url` is the server-authorized SpecFlow page URL; `githubIssue.url` remains
949
+ the external GitHub URL. Do not construct links from the API origin. An older server
950
+ that omits `url` still yields a successful business result with one stderr warning.
951
+
952
+ ```sh
953
+ specflow auth whoami
954
+ specflow work-item create --project-id PROJECT --title 'Prepare release' --assignee me --description-file ./release.md --output summary
955
+ cat ./release.md | specflow work-item update --project-id PROJECT --work-item-id GON-78 --expected-version '"3"' --description-file - --output summary
956
+ specflow work-item subtask link --project-id PROJECT --parent GON-78 --child GON-79 --child-project-id OTHER_PROJECT --idempotency-key KEY
957
+ ```
958
+
959
+ `auth whoami` returns `{ user: { id }, credentialKind }` for the selected Session or
960
+ User API Key (`session` or `api-key`). `--assignee me` on create/assign resolves that
961
+ same credential once, without printing the intermediate identity. Read-only Tokens
962
+ cannot resolve `me`; filters and bulk assignment accept User IDs only. Explicit
963
+ credential failure never falls back to another credential. Older servers without
964
+ the identity route require an upgrade or an explicit User ID.
965
+
966
+ Descriptions accept exactly one of inline `--description`, `--description-file`
967
+ (regular UTF-8 file, or `-` for explicit piped stdin), and update's
968
+ `--clear-description` (null). Omission leaves update unchanged and preserves create's
969
+ default. No shell expansion or Markdown parsing occurs. Empty/whitespace content,
970
+ invalid UTF-8, nonregular files and input above 80,000 bytes are rejected locally;
971
+ text must contain 1–20,000 UTF-16 code units after trimming. Interactive stdin is
972
+ rejected: pipe the text or select a file.
973
+
974
+ Subtask source is always parent and target is child. `subtask link` defaults to
975
+ summary; `--project-id` owns the parent and `--child-project-id` defaults to it.
976
+ The existing `relation create --type subtask` remains available:
977
+
978
+ ```sh
979
+ specflow work-item relation create --project-id PROJECT --work-item-id GON-78 --target-project-id PROJECT --target-work-item-id GON-79 --type subtask --idempotency-key KEY
980
+ ```
981
+
982
+ Retain the same relation key and body after an uncertain response; full/summary
983
+ never change server intent. Create retains its automatically generated key within
984
+ one invocation. Transport retries reuse that key and body once; version conflicts
985
+ never fetch a newer version and overwrite automatically. Honor `retryAfter` on 429.
986
+ `LOCAL_OUTPUT_FAILED` means local formatting/output failed after possible server
987
+ success: read the resource before deliberately retrying. It never permits a blind
988
+ write retry. Diagnostics stay on stderr and stdout remains business JSON.
package/dist/bin.js CHANGED
@@ -1,52 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import openBrowser from "open";
3
- import { formatResourceDiagnostic, runCli } from "./cli.js";
4
- import { createCredentialStore, } from "./credential-store.js";
5
- import { readServerFlag, unresolvedSpecFlowApiOrigin, } from "./http-origin.js";
6
- import { assertSupportedNodeVersion } from "./node-version.js";
7
- const arguments_ = process.argv.slice(2);
8
- const usesAuthenticationCli = arguments_.includes("auth") ||
9
- arguments_.includes("--version") ||
10
- arguments_.includes("-V");
11
- if (usesAuthenticationCli) {
12
- const { runSpecFlowCli } = await import("./index.js");
13
- process.exitCode = await runSpecFlowCli(process.argv);
14
- }
15
- else {
16
- try {
17
- assertSupportedNodeVersion(process.versions.node);
18
- const credentialStores = new Map();
19
- const getCredentialStore = (apiKeyId) => {
20
- const slot = apiKeyId ?? "session";
21
- const existing = credentialStores.get(slot);
22
- if (existing !== undefined)
23
- return existing;
24
- const credentialStore = createCredentialStore({
25
- ...(apiKeyId === undefined ? {} : { apiKeyId }),
26
- allowFileFallback: arguments_.includes("--allow-file-fallback"),
27
- serverOrigin: new URL(unresolvedSpecFlowApiOrigin(readServerFlag(arguments_), process.env.SPEC_FLOW_API_URL)).origin,
28
- warning: (value) => process.stderr.write(formatResourceDiagnostic(value)),
29
- });
30
- credentialStores.set(slot, credentialStore);
31
- return credentialStore;
32
- };
33
- process.exitCode = await runCli(arguments_, {
34
- credentialStore: {
35
- read: async () => (await getCredentialStore()).get(),
36
- readApiKey: async (id) => (await getCredentialStore(id)).get(),
37
- writeApiKey: async (id, credential) => (await getCredentialStore(id)).set(credential),
38
- deleteApiKey: async (id) => (await getCredentialStore(id)).delete(),
39
- },
40
- environment: process.env,
41
- fetch: globalThis.fetch,
42
- open: openBrowser,
43
- stderr: (value) => process.stderr.write(value),
44
- stdout: (value) => process.stdout.write(value),
45
- });
46
- }
47
- catch (error) {
48
- process.stderr.write(`${error instanceof Error ? error.message : "SpecFlow CLI failed."}\n`);
49
- process.exitCode = 1;
50
- }
51
- }
2
+ import { runSpecFlowCli } from "./index.js";
3
+ process.stdout.on("error", () => {
4
+ process.exitCode = 4;
5
+ process.stderr.write(`${JSON.stringify({ error: { code: "LOCAL_OUTPUT_FAILED", message: "The output pipe failed; the server operation may have completed. Read the resource before retrying", reason: "Temporary Failure", retryable: false } })}\n`);
6
+ });
7
+ process.exitCode = await runSpecFlowCli(process.argv);
52
8
  //# sourceMappingURL=bin.js.map
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA,OAAO,WAAW,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EACL,qBAAqB,GAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,cAAc,EACd,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,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AAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;IAC9B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,oGAAoG,EAAE,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AACxP,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,QAAQ,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
package/dist/cli.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { Command } from "commander";
2
+ import type { AuthenticationCommandTopology } from "./authentication-command-topology.js";
1
3
  export interface ResourceCredentialStore {
2
4
  readonly read: () => Promise<string | null>;
3
5
  readonly readApiKey?: (apiKeyId: string) => Promise<string | null>;
@@ -5,6 +7,7 @@ export interface ResourceCredentialStore {
5
7
  readonly deleteApiKey?: (apiKeyId: string) => Promise<void>;
6
8
  }
7
9
  export interface CliDependencies {
10
+ readonly registerAuthentication?: (program: Command, authentication: AuthenticationCommandTopology) => void;
8
11
  readonly open?: (url: string) => Promise<unknown>;
9
12
  readonly credentialStore: ResourceCredentialStore;
10
13
  readonly environment: Readonly<Record<string, string | undefined>>;