@promptframe/cli 0.1.31 → 0.1.33

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
@@ -4,7 +4,7 @@ PromptFrame component authoring CLI.
4
4
 
5
5
  Use it to inspect the public component standard, check component folders, validate manifests, inspect the local preview envelope, package source archives, upload components, check build status, rebuild evidence indexes, and rerun layout/security probes.
6
6
 
7
- Current npm registry baseline is `@promptframe/cli@0.1.31`, `@promptframe/contracts@0.1.13`, `@promptframe/component-kit@0.1.11`, and `create-promptframe-component@0.1.18`. The published CLI consumes the contracts AST-aware public security policy evaluator, reports `securityPolicyDigest` / `securityEvaluatorMode` in JSON output, reports `publicResources` for component-level public assets, keeps native `<img>` / `<video>` source checks case-sensitive so Remotion `<Img>` / `<Video>` remain valid, supports endpoint discovery, project list/current diagnostics, self-service CI token create/list/revoke, single-component and workspace GitHub workflow setup, `promptframe-workspace.json` validation, workspace upload source metadata headers, and packages sanitized lockfile evidence for platform admission.
7
+ Current npm registry baseline is `@promptframe/cli@0.1.33`, `@promptframe/contracts@0.1.13`, `@promptframe/component-kit@0.1.11`, and `create-promptframe-component@0.1.22`. The published CLI consumes the contracts AST-aware public security policy evaluator, reports `securityPolicyDigest` / `securityEvaluatorMode` in JSON output, reports `publicResources` for component-level public assets, keeps native `<img>` / `<video>` source checks case-sensitive so Remotion `<Img>` / `<Video>` remain valid, supports endpoint discovery, project list/current diagnostics, self-service CI token create/list/revoke, single-component and workspace GitHub workflow setup, dynamic workspace matrix discovery, `RUNNER_LABELS` and pnpm 10 workflow support, pnpm workspace root lockfile evidence without component symlinks, `promptframe-workspace.json` validation, workspace upload source metadata headers, packages sanitized lockfile evidence for platform admission, and supports `status --fail-on-build-failed` for CI build-status gating.
8
8
 
9
9
  ```bash
10
10
  npm install -D @promptframe/cli
@@ -18,6 +18,9 @@ npx promptframe login --endpoint https://your-promptframe.example/api-proxy
18
18
  npx promptframe whoami
19
19
  npx promptframe discovery
20
20
  npx promptframe project list
21
+ npx promptframe init . --endpoint https://your-promptframe.example/api-proxy
22
+ npx promptframe component create @project-namespace/my-component --display-name "My Component"
23
+ npx promptframe component list
21
24
  npx promptframe ci-token create --name "GitHub release" --scope component.upload --scope component.status.read --upload-target marketplace_authoring
22
25
  npx promptframe upload ./component.zip --endpoint https://your-promptframe.example/api-proxy
23
26
  npx promptframe upload ./component.zip --target project_private_generation --endpoint https://your-promptframe.example/api-proxy
@@ -31,6 +34,7 @@ Endpoint resolution is explicit and public-safe:
31
34
  2. `PROMPTFRAME_API_BASE`
32
35
  3. `REMOTION_MEDIA_API_BASE`
33
36
  4. local config written by `promptframe configure --endpoint <url>`
37
+ 5. secret-free `.promptframerc` in the current directory or a parent directory
34
38
 
35
39
  The CLI embeds no production, Tailscale, local Docker, or private PromptFrame endpoint default. `dev .` starts the component template's local Vite preview shell. `check .` runs the local public policy checks, reports standard freshness for the selected upload lane, and emits deterministic `localReusability` diagnostics so low-reuse marketplace submissions are visible before upload. If no platform endpoint is available, `dev` / `check` return `standard.freshness.offline_degraded` as a warning instead of pretending the online standard was verified. `preview .` reads `src/preview-props.json` and reports the local preview envelope; `preview . --write-local-report` also validates saved `.promptframe/local-previews/*.json` cases and writes `.promptframe/local-previews/preview-report.json` for local author evidence. Neither command runs a custom runtime or replaces the platform iframe preview/render pipeline. Upload success only means the platform accepted the source package for trust-pipeline admission; use `status`, `reindex`, and `probe` to inspect build readiness, evidence/search readiness, and layout/security diagnostics.
36
40
 
@@ -38,6 +42,23 @@ Formal platform endpoints use bearer authentication. `promptframe login --endpoi
38
42
 
39
43
  The platform derives tenant, user, and project from the browser-approved CLI token or scoped CI token. External authors should not hand-enter internal IDs, and formal endpoints reject dev identity headers. `whoami --json` is the safe way to inspect the current token kind, display identity, endpoint, scopes, upload targets, and project binding without exposing the token secret. `discovery --json` reports endpoint capabilities, and `project list --json` / `project current --json` report accessible projects. Server-side project switching is not a public CLI contract yet, so the CLI does not pretend that local config can override the platform principal. CI tokens are project-scoped automation credentials; store them in secret managers such as GitHub Actions secrets, not in source files.
40
44
 
45
+ Project context is a source-safe convenience file, not a credential. After login, run:
46
+
47
+ ```bash
48
+ npx promptframe init . --endpoint "$PROMPTFRAME_API_BASE" --json
49
+ ```
50
+
51
+ This writes `.promptframerc` with schema `promptframe-project-context.v0.1.0`, endpoint, tenant/project identifiers, project namespace, default upload target, and workspace config name. It must not contain token secrets, cookies, passwords, API keys, authorization headers, Auth0 subjects, or CI token material. Tokens stay in the local CLI config or CI secret store.
52
+
53
+ Project components are explicit declarations owned by the platform Project:
54
+
55
+ ```bash
56
+ npx promptframe component create @project-namespace/my-component --display-name "My Component" --json
57
+ npx promptframe component list --json
58
+ ```
59
+
60
+ `component create` and `component list` use bearer auth and do not send owner override fields. CI upload of an undeclared component can fail with `component_registry.not_declared`; create the component first from Admin Project Setup or with `promptframe component create`.
61
+
41
62
  After browser login, authors can create and manage their own project-scoped CI tokens without asking an administrator:
42
63
 
43
64
  ```bash
@@ -120,6 +141,9 @@ npx promptframe login --endpoint "$PROMPTFRAME_API_BASE" --json
120
141
  npx promptframe whoami --json
121
142
  npx promptframe discovery --json
122
143
  npx promptframe project list --json
144
+ npx promptframe init . --json
145
+ npx promptframe component list --json
146
+ npx promptframe component create @marketplace/my-component --display-name "My Component" --json
123
147
  npx promptframe ci-token list --status active --json
124
148
  npx promptframe upload ./component.zip --endpoint "$PROMPTFRAME_API_BASE" --json
125
149
  npx promptframe status <buildId> --json
@@ -128,7 +152,7 @@ npx promptframe probe <buildId> --level standard --json
128
152
  npx promptframe logout --json
129
153
  ```
130
154
 
131
- Every JSON response includes a stable `diagnostic.code`, for example `standard.completed`, `doctor.completed`, `validate.completed`, `check.completed`, `upgrade.dry_run`, `dev.ready`, `preview.ready`, `preview.local_report.written`, `login.completed`, `whoami.completed`, `discovery.completed`, `project.list.completed`, `project.current.completed`, `ci_token.create.completed`, `ci_token.list.completed`, `ci_token.revoke.completed`, `logout.completed`, `upload.completed`, `status.completed`, `reindex.completed`, or `probe.completed`. `standard --json`, `validate --json`, and `check --json` report the active public security policy metadata; use `securityPolicyVersion`, `securityPolicyDigest`, and `securityEvaluatorMode` to compare release cohorts instead of scraping prose. `validate --json` and `check --json` also report `checkedRuleIds` for the public policy checks they ran. `upgrade --dry-run --json` reports package floor changes without writing files. `dev --dry-run --json` reports the local preview command without starting a long-running process. JSON failures include `failureReason` and `retryable`. Missing endpoint failures exit with code `2` and use `<command>.endpoint.missing`; missing credentials use `cli.auth.login_required`.
155
+ Every JSON response includes a stable `diagnostic.code`, for example `standard.completed`, `doctor.completed`, `validate.completed`, `check.completed`, `upgrade.dry_run`, `dev.ready`, `preview.ready`, `preview.local_report.written`, `login.completed`, `whoami.completed`, `discovery.completed`, `project.list.completed`, `project.current.completed`, `project_context.init.completed`, `component.list.completed`, `component.create.completed`, `ci_token.create.completed`, `ci_token.list.completed`, `ci_token.revoke.completed`, `logout.completed`, `upload.completed`, `status.completed`, `reindex.completed`, or `probe.completed`. `standard --json`, `validate --json`, and `check --json` report the active public security policy metadata; use `securityPolicyVersion`, `securityPolicyDigest`, and `securityEvaluatorMode` to compare release cohorts instead of scraping prose. `validate --json` and `check --json` also report `checkedRuleIds` for the public policy checks they ran. `upgrade --dry-run --json` reports package floor changes without writing files. `dev --dry-run --json` reports the local preview command without starting a long-running process. JSON failures include `failureReason` and `retryable`. Missing endpoint failures exit with code `2` and use `<command>.endpoint.missing`; missing credentials use `cli.auth.login_required`.
132
156
 
133
157
  `standard --json` also returns `authoringStandardRelease` and `freshness`. These fields are the public SSOT for package floors, upload targets, standard source hash, and local freshness decisions:
134
158