@gonovus-ai/spec-flow-cli 0.7.0 → 1.0.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 +48 -7
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +16 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/client-compatibility.d.ts +3 -0
- package/dist/commands/client-compatibility.js +191 -0
- package/dist/commands/client-compatibility.js.map +1 -0
- package/dist/commands/guide.d.ts +2 -0
- package/dist/commands/guide.js +35 -0
- package/dist/commands/guide.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/program.js +4 -1
- package/dist/program.js.map +1 -1
- package/dist/runtime/client-compatibility.d.ts +13 -0
- package/dist/runtime/client-compatibility.js +79 -0
- package/dist/runtime/client-compatibility.js.map +1 -0
- package/dist/runtime/npm-upgrade.d.ts +32 -0
- package/dist/runtime/npm-upgrade.js +132 -0
- package/dist/runtime/npm-upgrade.js.map +1 -0
- package/guides/authoring.md +178 -0
- package/guides/delivery.md +60 -0
- package/guides/discussions-audit.md +32 -0
- package/guides/errors.md +41 -0
- package/guides/glossary.md +40 -0
- package/guides/map-and-screens.md +31 -0
- package/guides/search.md +9 -0
- package/guides/work-items.md +195 -0
- package/guides/workspace-admin.md +130 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -22,8 +22,11 @@ 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
|
-
|
|
26
|
-
|
|
25
|
+
CLI Contract 1.0.0 starts the stable release series. Breaking changes require a
|
|
26
|
+
new major version. The official Skill declares a compatible CLI range and an
|
|
27
|
+
exact npm bootstrap version.
|
|
28
|
+
|
|
29
|
+
The Workspace knowledge contract introduced in CLI 0.6.2 breaks 0.2.0 callers: Spec, Capability, Glossary, Proposal and
|
|
27
30
|
authoring-history commands address shared knowledge with `--workspace-id` instead of
|
|
28
31
|
`--project-id`, `project directory` is replaced by `spec list`, Session grants
|
|
29
32
|
separate `WorkspaceKnowledge` and `ProjectTasks` targets, and Workspace read-only
|
|
@@ -36,7 +39,7 @@ seven-day Better Auth CLI Session. It supports the Node.js 24 runtime line;
|
|
|
36
39
|
Node.js 22 and unverified future major versions are intentionally unsupported.
|
|
37
40
|
|
|
38
41
|
```bash
|
|
39
|
-
npm install --global @gonovus-ai/spec-flow-cli@0.
|
|
42
|
+
npm install --global @gonovus-ai/spec-flow-cli@1.0.0
|
|
40
43
|
specflow auth login
|
|
41
44
|
specflow auth status
|
|
42
45
|
specflow auth logout
|
|
@@ -58,6 +61,34 @@ default, provide `SPEC_FLOW_DEFAULT_API_URL` to the CLI build command. The packe
|
|
|
58
61
|
installation smoke uses an isolated `.invalid` test origin when no build value is
|
|
59
62
|
provided; it never substitutes a deployment URL into source.
|
|
60
63
|
|
|
64
|
+
## Compatibility and upgrades
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
specflow version --json --skill-version 0.6.0 --compatible-cli "^1.0.0"
|
|
68
|
+
specflow upgrade
|
|
69
|
+
specflow upgrade --yes
|
|
70
|
+
specflow upgrade --to 1.0.0
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`version` shows the installed CLI and public advice from the selected origin.
|
|
74
|
+
With `--skill-version`, it also reports the Skill's status and update commands.
|
|
75
|
+
With `--compatible-cli`, it classifies the installed CLI against that range as
|
|
76
|
+
`in-range`, `older` or `newer` and returns the recommended version as `target`
|
|
77
|
+
only when it satisfies the range.
|
|
78
|
+
Older or unreachable servers yield an `unknown` compatibility status.
|
|
79
|
+
`specflow --version` prints only the installed CLI version without a network request.
|
|
80
|
+
|
|
81
|
+
`upgrade` previews the exact npm command. `--yes` applies it only to an
|
|
82
|
+
installation owned by the active npm global prefix and verifies the resulting
|
|
83
|
+
package version. Other installation methods and permission errors return a
|
|
84
|
+
Skill Error with the manual command. Give `--to` to choose an exact version,
|
|
85
|
+
including when intentionally downgrading or working without server advice.
|
|
86
|
+
Use `--json` for structured results and check stderr for Skill Errors.
|
|
87
|
+
|
|
88
|
+
Ordinary HTTP commands may print one upgrade recommendation per origin every
|
|
89
|
+
24 hours as an NDJSON warning diagnostic. Set `SPECFLOW_NO_UPDATE_CHECK=1` or a non-empty `CI` to disable these
|
|
90
|
+
stderr messages.
|
|
91
|
+
|
|
61
92
|
After login, resource commands reuse the stored CLI Session and emit structured JSON
|
|
62
93
|
on stdout. Existing-Project commands always require an explicit `--project-id`:
|
|
63
94
|
|
|
@@ -88,7 +119,7 @@ SPEC_FLOW_API_URL=https://specflow.example specflow proposal discard --workspace
|
|
|
88
119
|
SPEC_FLOW_API_URL=https://specflow.example specflow authoring-history --workspace-id <workspace-id>
|
|
89
120
|
```
|
|
90
121
|
|
|
91
|
-
Every official CLI service request sends the versioned `@
|
|
122
|
+
Every official CLI service request sends the versioned `@ztalkai/spec-flow-cli/<version>`
|
|
92
123
|
User-Agent. Diagnostics use stderr, and stable Skill Errors use documented reason and
|
|
93
124
|
exit-status categories.
|
|
94
125
|
|
|
@@ -560,9 +591,19 @@ Source Reference URLs accept only HTTP or HTTPS and must not contain URL userinf
|
|
|
560
591
|
(`username` or `password`). Keep external credentials in the Agent's own authorized
|
|
561
592
|
source-reading tool; never embed them in SpecFlow metadata.
|
|
562
593
|
|
|
563
|
-
The repository-owned official Skill
|
|
564
|
-
CLI
|
|
565
|
-
|
|
594
|
+
The repository-owned official Skill at `skills/specflow/SKILL.md` declares a
|
|
595
|
+
bootstrap CLI and a compatible version range. It requires explicit User
|
|
596
|
+
confirmation immediately before Spec or Glossary Publish and Rollback. The
|
|
597
|
+
CLI and API accept no proof of that confirmation.
|
|
598
|
+
|
|
599
|
+
### Command reference
|
|
600
|
+
|
|
601
|
+
Run `specflow guide` to list the topics shipped with the installed CLI, or
|
|
602
|
+
`specflow guide authoring` to print a topic in Markdown. Use `--json` to read
|
|
603
|
+
the list as `{ topics: [{ topic, summary }] }` or a topic as
|
|
604
|
+
`{ topic, summary, markdown }`. The command reads local package files and
|
|
605
|
+
requires no credentials or server connection. Unknown topics return
|
|
606
|
+
`Invalid Operation` with exit status 2.
|
|
566
607
|
|
|
567
608
|
The CLI stores its Session credential in macOS Keychain, Windows Credential
|
|
568
609
|
Manager, or Linux Secret Service. It does not print or persist the credential in
|
package/dist/cli.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export interface CliDependencies {
|
|
|
16
16
|
readonly stdout: (value: string) => void;
|
|
17
17
|
}
|
|
18
18
|
export declare function formatResourceDiagnostic(message: string): string;
|
|
19
|
-
export declare function runCli(arguments_: readonly string[],
|
|
19
|
+
export declare function runCli(arguments_: readonly string[], originalDependencies: CliDependencies): Promise<number>;
|
package/dist/cli.js
CHANGED
|
@@ -2,6 +2,7 @@ import { CommanderError, InvalidArgumentError } from "commander";
|
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { addAuthenticationCommandTopology } from "./authentication-command-topology.js";
|
|
5
|
+
import { registerClientCompatibilityCommands } from "./commands/client-compatibility.js";
|
|
5
6
|
import { itemOutput, itemListOutput, relationListOutput, relationReceiptOutput, } from "./commands/work-item-output.js";
|
|
6
7
|
import { registerCustomFieldColorCommands, parseOptionColors, } from "./custom-field-color-commands.js";
|
|
7
8
|
import { registerGitHubAccountCommands } from "./github-account-commands.js";
|
|
@@ -9,6 +10,7 @@ import { readDescription, singleDescriptionSource } from "./input/text-source.js
|
|
|
9
10
|
import { registerProductMapCommands } from "./product-map-commands.js";
|
|
10
11
|
import { createProgram } from "./program.js";
|
|
11
12
|
import { registerProjectAdministrationCommands } from "./project-administration-commands.js";
|
|
13
|
+
import { observeCompatibility } from "./runtime/client-compatibility.js";
|
|
12
14
|
import { writeSkillError, skillErrorExitCode } from "./runtime/errors.js";
|
|
13
15
|
import { execute, } from "./runtime/execute.js";
|
|
14
16
|
import { readIdentity } from "./runtime/identity.js";
|
|
@@ -148,13 +150,26 @@ const findingCreateInputSchema = z
|
|
|
148
150
|
targets: z.array(findingTargetSchema).min(1).max(10),
|
|
149
151
|
})
|
|
150
152
|
.strict();
|
|
151
|
-
export async function runCli(arguments_,
|
|
153
|
+
export async function runCli(arguments_, originalDependencies) {
|
|
152
154
|
let exitCode = 0;
|
|
155
|
+
const observe = observeCompatibility(originalDependencies);
|
|
156
|
+
const dependencies = {
|
|
157
|
+
...originalDependencies,
|
|
158
|
+
fetch: async (request) => {
|
|
159
|
+
const response = await originalDependencies.fetch(request);
|
|
160
|
+
if (new URL(request.url).pathname !== "/v1/client-compatibility")
|
|
161
|
+
await observe(request.url, response);
|
|
162
|
+
return response;
|
|
163
|
+
},
|
|
164
|
+
};
|
|
153
165
|
let outputMode = "full";
|
|
154
166
|
const warnMissingUrl = () => {
|
|
155
167
|
dependencies.stderr(formatResourceDiagnostic("This server version does not support Work Item URLs; upgrade the server. The business operation succeeded."));
|
|
156
168
|
};
|
|
157
169
|
const program = createProgram(dependencies);
|
|
170
|
+
registerClientCompatibilityCommands(program, dependencies, (code) => {
|
|
171
|
+
exitCode = code;
|
|
172
|
+
});
|
|
158
173
|
const run = async (request, options = {}) => {
|
|
159
174
|
const selected = await selectSession(dependencies, options, program.getOptionValue("server"), program.getOptionValue("apiKeyId"));
|
|
160
175
|
if ("exitCode" in selected)
|