@clue-ai/cli 0.0.4 → 0.0.6
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 +59 -2
- package/bin/clue-cli.mjs +836 -17
- package/commands/claude-code/clue-init.md +7 -1
- package/commands/codex/clue-init.md +7 -1
- package/package.json +1 -1
- package/src/ai-provider.mjs +146 -0
- package/src/command-spec.mjs +7 -7
- package/src/contracts.mjs +53 -14
- package/src/init-tool.mjs +153 -20
- package/src/lifecycle-guard.mjs +141 -0
- package/src/lifecycle-init.mjs +91 -73
- package/src/path-policy.mjs +2 -0
- package/src/public-schema.cjs +27 -1
- package/src/semantic-ci.mjs +771 -122
- package/src/setup-check.mjs +436 -0
- package/src/setup-detect.mjs +198 -0
- package/src/setup-prepare.mjs +289 -0
- package/src/setup-tool.mjs +94 -27
package/README.md
CHANGED
|
@@ -8,6 +8,13 @@ The Clue product repository keeps SDKs, shared schemas, and API contracts. Tool
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
/clue-init
|
|
11
|
+
clue-ai setup --clue-api-key <key> --clue-api-base-url <url> --project-key <key> --environment dev
|
|
12
|
+
clue-ai setup-detect --repo .
|
|
13
|
+
clue-ai semantic-inventory --framework fastapi --backend-root-path backend --repo . --output .clue/semantic-routes.json
|
|
14
|
+
clue-ai semantic-workflow --framework fastapi --backend-root-path backend --repo .
|
|
15
|
+
clue-ai lifecycle-apply --plan clue-lifecycle-plan.json --repo .
|
|
16
|
+
clue-ai setup-check --framework fastapi --backend-root-path backend --repo . --target codex --require-sdk-lifecycle
|
|
17
|
+
clue-ai setup-watch --project-key <key> --environment dev --clue-api-base-url <clue-api-base-url> --watch-targets frontend:web[init,identify,set-account,event-sent]=<frontend-url>,backend:api[init,identify,set-account,logout,event-sent]=<backend-url>
|
|
11
18
|
clue-ai init --request clue-init-request.json --repo .
|
|
12
19
|
clue-ai semantic-ci --request clue-semantic-request.json --repo .
|
|
13
20
|
```
|
|
@@ -16,10 +23,60 @@ clue-ai semantic-ci --request clue-semantic-request.json --repo .
|
|
|
16
23
|
wrappers. The command collects structured setup inputs and invokes the same
|
|
17
24
|
tool request/report contract as `clue-ai init`.
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
`clue-ai semantic-workflow` mechanically writes the GitHub Actions workflow that
|
|
27
|
+
generates `.clue/semantic-request.runtime.json` only inside CI and then runs
|
|
28
|
+
`clue-ai semantic-ci`. Do not commit runtime semantic request files to client
|
|
29
|
+
repositories.
|
|
30
|
+
|
|
31
|
+
`clue-ai setup` installs the target AI-tool skills and, when backend routes are
|
|
32
|
+
detectable, also runs the machine-owned setup preparation:
|
|
33
|
+
|
|
34
|
+
- detects the FastAPI backend root
|
|
35
|
+
- writes `.clue/semantic-routes.json`
|
|
36
|
+
- writes `.github/workflows/clue-semantic-snapshot.yml`
|
|
37
|
+
- writes `.clue/setup-manifest.json`
|
|
38
|
+
|
|
39
|
+
The AI prompt should use those generated artifacts as inputs and should not
|
|
40
|
+
hand-edit route inventory or semantic CI workflow files.
|
|
41
|
+
|
|
42
|
+
`clue-ai setup-detect` mechanically detects FastAPI route candidates and returns
|
|
43
|
+
the framework, backend root path, service key candidate, route files, and route
|
|
44
|
+
count before any AI interpretation.
|
|
45
|
+
|
|
46
|
+
`clue-ai lifecycle-apply` mechanically applies an AI-produced exact replacement
|
|
47
|
+
plan after validating edit paths, lifecycle API names, no broad tracking, and no
|
|
48
|
+
DOM clue tags.
|
|
49
|
+
|
|
50
|
+
`clue-ai setup-check` mechanically verifies installed setup skills, route
|
|
51
|
+
inventory, semantic workflow shape, runtime request absence, obvious secret
|
|
52
|
+
leaks, and SDK lifecycle presence when requested.
|
|
53
|
+
|
|
54
|
+
`clue-ai setup-watch` polls the Clue API setup-check endpoint while you operate
|
|
55
|
+
the local service. `--clue-api-base-url` is the Clue API URL, not the customer
|
|
56
|
+
frontend URL. Use `--watch-targets` to list every local frontend/backend app by
|
|
57
|
+
service key and the lifecycle checks expected for that service, for example
|
|
58
|
+
`frontend:web[init,identify,set-account,event-sent]=<frontend-url>,backend:api[init,identify,set-account,logout,event-sent]=<backend-url>`.
|
|
59
|
+
Do not assume localhost ports; use the actual URLs printed by the repository's
|
|
60
|
+
dev scripts or configured in its local env.
|
|
61
|
+
|
|
62
|
+
`clue-ai setup` reads Clue values from the setup screen flags, detects local
|
|
63
|
+
services, writes `.clue/setup-manifest.json`, and prints service-specific env
|
|
64
|
+
blocks. Do not hand-write `CLUE_SERVICE_KEY`; use the value printed for each
|
|
65
|
+
detected service.
|
|
66
|
+
|
|
67
|
+
## Required Environment
|
|
20
68
|
|
|
21
69
|
- `CLUE_API_KEY`
|
|
22
|
-
- `
|
|
70
|
+
- `CLUE_AI_PROVIDER`
|
|
71
|
+
- `CLUE_AI_PROVIDER_API_KEY`
|
|
72
|
+
- `CLUE_AI_MODEL`
|
|
73
|
+
|
|
74
|
+
`CLUE_AI_PROVIDER` selects the AI provider used by semantic snapshot generation and
|
|
75
|
+
lifecycle implementation planning. Use `openai` for OpenAI-compatible Chat
|
|
76
|
+
Completions providers and `anthropic` for Claude Messages API. `CLUE_AI_PROVIDER_API_KEY`
|
|
77
|
+
must match the selected provider. `CLUE_AI_MODEL` is the selected provider's model
|
|
78
|
+
name. Keep it in environment configuration so provider/model upgrades do not
|
|
79
|
+
require CLI code changes.
|
|
23
80
|
|
|
24
81
|
## Boundaries
|
|
25
82
|
|