@gonovus-ai/spec-flow-cli 0.5.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.
- package/README.md +57 -28
- package/dist/bin.js +6 -50
- package/dist/bin.js.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +103 -397
- package/dist/cli.js.map +1 -1
- package/dist/commands/work-item-output.d.ts +390 -0
- package/dist/commands/work-item-output.js +36 -0
- package/dist/commands/work-item-output.js.map +1 -0
- package/dist/http-origin.js +3 -0
- package/dist/http-origin.js.map +1 -1
- package/dist/index.js +50 -28
- package/dist/index.js.map +1 -1
- package/dist/input/text-source.d.ts +9 -0
- package/dist/input/text-source.js +74 -0
- package/dist/input/text-source.js.map +1 -0
- package/dist/program.d.ts +3 -0
- package/dist/program.js +19 -0
- package/dist/program.js.map +1 -0
- package/dist/runtime/errors.d.ts +28 -0
- package/dist/runtime/errors.js +133 -0
- package/dist/runtime/errors.js.map +1 -0
- package/dist/runtime/execute.d.ts +23 -0
- package/dist/runtime/execute.js +25 -0
- package/dist/runtime/execute.js.map +1 -0
- package/dist/runtime/identity.d.ts +183 -0
- package/dist/runtime/identity.js +17 -0
- package/dist/runtime/identity.js.map +1 -0
- package/dist/runtime/output.d.ts +3 -0
- package/dist/runtime/output.js +13 -0
- package/dist/runtime/output.js.map +1 -0
- package/dist/runtime/session.d.ts +16 -0
- package/dist/runtime/session.js +123 -0
- package/dist/runtime/session.js.map +1 -0
- package/package.json +1 -1
- package/dist/work-item-time-entry-input.d.ts +0 -4
- package/dist/work-item-time-entry-input.js +0 -27
- 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.
|
|
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.
|
|
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
|
-
###
|
|
676
|
+
### Time recording removal (0.6.0)
|
|
677
677
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
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
|
|
|
@@ -957,3 +936,53 @@ specflow search-global --query 'payment' --limit 20 --cursor '<nextCursor>'
|
|
|
957
936
|
The JSON response preserves object kind, ID, owning Workspace/Project, totalCount
|
|
958
937
|
and nextCursor. Continue with the same query until nextCursor is null. The server
|
|
959
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
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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,
|
|
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>>;
|