@siteoshq/cli 1.3.0 → 1.5.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 CHANGED
@@ -231,3 +231,53 @@ A report records the revision, runtime, observed Edge location, scenario scope a
231
231
  The check covers one route and a bounded observation window, not hidden first-party/server-side
232
232
  tracking, every delayed interaction, visual accessibility or legal compliance. Repeat after
233
233
  website/publication changes and preserve a separate GTM Tag Assistant check where applicable.
234
+
235
+ ### Forms inbox
236
+
237
+ Use `siteos forms submissions list --environment <slug> --form <form-id> --json` to search complete
238
+ history. Filters include `--query`, `--status`, `--from`, `--to`, `--limit` (1–100), and `--cursor`.
239
+ The response contains the filtered total and a continuation cursor. Full answers and the saved
240
+ version's labels are available with `siteos forms submissions read --environment <slug> --form
241
+ <form-id> --submission <id> --json`.
242
+
243
+ `siteos forms submissions status --environment <slug> --form <form-id> --submission <id> --status
244
+ read --expected-status new --json` changes status without overwriting concurrent triage. Statuses
245
+ are `new`, `read`, `archived`, and `spam`. These management commands require the matching Forms inbox
246
+ server release. They use the selected common Project/environment and a scoped Auth grant.
247
+ `forms definition check` compiles the schema locally using the same strict Ajv policy as sync.
248
+
249
+ ### Form archive and deletion
250
+
251
+ These commands require the lifecycle API on the selected server. Owner/admin rights are required
252
+ for changes; members can list and read. Read a form to obtain its current revision before changing it.
253
+
254
+ ```sh
255
+ siteos forms definition list --environment production --status all --json
256
+ siteos forms definition read --environment production --form <form-id> --json
257
+ siteos forms definition archive --environment production --form <form-id> --expected-revision <revision> --json
258
+ siteos forms definition restore --environment production --form <form-id> --expected-revision <revision> --json
259
+ siteos forms definition delete --environment production --form <form-id> --json
260
+ siteos forms definition delete --environment production --form <form-id> --apply --confirm <form-key> --expected-revision <revision> --expected-submissions <count> --json
261
+ ```
262
+
263
+ Delete without `--apply` only previews the exact Project, Environment, form and submitted-answer
264
+ count. Use the values from that reviewed preview when applying; a stale revision or count conflicts.
265
+ Archive stops new submissions and preserves history. Delete permanently removes versions and
266
+ answers from the working database, retaining only a reserved-key tombstone. That form key cannot be
267
+ reused. Shared Environment credentials remain active for other forms. Sync refuses archived/deleted
268
+ keys and never removes forms missing from a local manifest. Backups follow deployment retention;
269
+ they are not an in-app restore mechanism.
270
+
271
+ ### Automatic Forms deployment
272
+
273
+ Generate Forms JSON from the shared host validation schema during build. Install a release-only
274
+ key once with `siteos forms deployment-key issue --environment production --install --json`.
275
+ Store `SITEOS_FORMS_DEPLOYMENT_KEY` in the CI secret store and configure explicit
276
+ `SITEOS_FORMS_PUBLIC_URL`. Keep the submission credential on the website server.
277
+
278
+ Run `siteos forms deploy --manifest .siteos/forms/manifest.json --json` before routing traffic to a
279
+ new release. This needs no interactive Auth or local Project state and publishes atomically.
280
+ Definitions include a generated SHA-256 `sourceExportId`; runtime sends it as `contractVersion`.
281
+ A changed field requires a normal build/release, not a second hand-edited validation schema.
282
+ `forms deployment-key list|revoke` manages release keys; submission keys cannot publish.
283
+ See the SiteOS Forms skill for the portable generator and version serialization contract.