@notis_ai/cli 0.2.0-beta.191.1 → 0.2.0-beta.196.1

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.
Files changed (106) hide show
  1. package/README.md +479 -80
  2. package/config/portal-route-roots.json +48 -0
  3. package/dist/agent-hooks/notis-agent-hook.mjs +29072 -2784
  4. package/dist/base-skills/notis-apps/SKILL.md +88 -67
  5. package/dist/base-skills/notis-apps/references/architecture.md +114 -167
  6. package/dist/base-skills/notis-apps/references/design.md +26 -107
  7. package/dist/base-skills/notis-apps/references/memory.md +58 -0
  8. package/dist/base-skills/notis-apps/references/reading.md +52 -74
  9. package/dist/base-skills/notis-apps/references/release.md +104 -142
  10. package/dist/base-skills/notis-apps/references/sdk.md +113 -60
  11. package/dist/base-skills/notis-apps/references/troubleshooting.md +22 -21
  12. package/dist/base-skills/notis-apps/references/views.md +142 -0
  13. package/dist/base-skills/notis-cli/SKILL.md +4 -4
  14. package/dist/base-skills/notis-cli/references/app-delivery.md +12 -11
  15. package/dist/base-skills/notis-cli/references/native-databases.md +6 -6
  16. package/dist/base-skills/notis-cli/references/tool-examples.md +4 -4
  17. package/dist/base-skills/notis-query/SKILL.md +34 -60
  18. package/dist/base-skills/notis-query/references/database-discovery.md +59 -69
  19. package/dist/base-skills/notis-query/references/documents.md +63 -50
  20. package/dist/base-skills/notis-query/references/query.md +57 -524
  21. package/dist/sdk/src/bundleModule.ts +79 -0
  22. package/dist/sdk/src/components/DocumentEditor.tsx +6 -3
  23. package/dist/sdk/src/components/DocumentPage.tsx +141 -0
  24. package/dist/sdk/src/components/RecordComponents.tsx +33 -0
  25. package/dist/sdk/src/components/RenderChartData.tsx +19 -0
  26. package/dist/sdk/src/config.ts +4 -26
  27. package/dist/sdk/src/documents.ts +2 -0
  28. package/dist/sdk/src/hooks/useAction.ts +28 -0
  29. package/dist/sdk/src/hooks/useCloudComputer.ts +35 -4
  30. package/dist/sdk/src/hooks/useCloudComputerShell.ts +114 -0
  31. package/dist/sdk/src/hooks/useHandover.ts +5 -4
  32. package/dist/sdk/src/hooks/useNativeDocumentBody.ts +50 -0
  33. package/dist/sdk/src/hooks/useNativeDocuments.ts +83 -0
  34. package/dist/sdk/src/hooks/useNotis.ts +3 -0
  35. package/dist/sdk/src/hooks/useNotisNavigation.ts +26 -11
  36. package/dist/sdk/src/hooks/useQuery.ts +7 -4
  37. package/dist/sdk/src/hooks/useViewParams.ts +121 -0
  38. package/dist/sdk/src/hooks/useViewerReads.ts +129 -0
  39. package/dist/sdk/src/index.ts +36 -0
  40. package/dist/sdk/src/interactions/shortcuts.tsx +17 -3
  41. package/dist/sdk/src/nativeData.ts +39 -0
  42. package/dist/sdk/src/presentation.tsx +82 -0
  43. package/dist/sdk/src/provider.tsx +9 -4
  44. package/dist/sdk/src/queryCache.ts +5 -3
  45. package/dist/sdk/src/queryErrors.ts +51 -0
  46. package/dist/sdk/src/runtime.ts +146 -8
  47. package/dist/sdk/src/space.ts +425 -0
  48. package/dist/sdk/src/styles.css +96 -72
  49. package/dist/sdk/src/vite.ts +11 -1
  50. package/dist/skill-sync/index.js +458 -68
  51. package/dist/skill-sync/index.js.map +4 -4
  52. package/dist/skill-sync-worker.mjs +451 -77
  53. package/dist/space-harness/host.js +66 -0
  54. package/dist/view-renderer/dist/host.css +1 -0
  55. package/dist/view-renderer/dist/host.js +1042 -0
  56. package/dist/view-renderer/dist/theme.css +73 -0
  57. package/dist/view-renderer/src/dom.js +180 -0
  58. package/dist/view-renderer/src/errors.js +8 -0
  59. package/dist/view-renderer/src/host.tsx +173 -0
  60. package/dist/view-renderer/src/index.js +4 -0
  61. package/dist/view-renderer/src/pool.js +76 -0
  62. package/dist/view-renderer/src/remote-broker.js +59 -0
  63. package/dist/view-renderer/src/renderer.js +201 -0
  64. package/package.json +11 -5
  65. package/skills/notis-apps/cli.md +270 -163
  66. package/skills/notis-cli/AGENT_INSTRUCTIONS.md +2 -2
  67. package/skills/notis-onboarding/BRIEF.md +7 -3
  68. package/src/command-specs/apps.js +1 -8
  69. package/src/command-specs/files.js +29 -0
  70. package/src/command-specs/helpers.js +1 -0
  71. package/src/command-specs/index.js +10 -4
  72. package/src/command-specs/skills.js +229 -0
  73. package/src/command-specs/spaces.js +572 -0
  74. package/src/command-specs/views.js +69 -0
  75. package/src/runtime/agent-browser.js +30 -7
  76. package/src/runtime/app-boundary-validator.js +7 -4
  77. package/src/runtime/app-data-literals.js +82 -0
  78. package/src/runtime/app-platform.js +321 -253
  79. package/src/runtime/confined-space-build.js +74 -0
  80. package/src/runtime/confined-space-verify.js +49 -0
  81. package/src/runtime/native-record-files.js +47 -0
  82. package/src/runtime/retired-sdk-files.js +20 -0
  83. package/src/runtime/skill-sync/cloud-client.ts +26 -4
  84. package/src/runtime/skill-sync/index.ts +154 -35
  85. package/src/runtime/skill-sync/local-scanner.ts +125 -17
  86. package/src/runtime/skill-sync/native-identity.ts +102 -0
  87. package/src/runtime/skill-sync/native-plan.ts +59 -0
  88. package/src/runtime/skill-sync/sync-plan.ts +16 -9
  89. package/src/runtime/skill-sync/types.ts +32 -6
  90. package/src/runtime/source-root.js +32 -0
  91. package/src/runtime/space-collection-scaffold.js +66 -0
  92. package/src/runtime/space-database-structures.js +229 -0
  93. package/src/runtime/space-fixture-broker.js +50 -0
  94. package/src/runtime/space-lock.js +337 -0
  95. package/src/runtime/space-platform.js +105 -0
  96. package/src/runtime/space-source.js +281 -0
  97. package/src/runtime/space-test-server.js +327 -0
  98. package/src/runtime/space-verification.js +89 -0
  99. package/src/runtime/space-verify-browser-worker.js +51 -0
  100. package/src/runtime/space-view-manifest.js +254 -0
  101. package/src/runtime/sync-skills.js +1 -1
  102. package/src/runtime/transport.js +8 -1
  103. package/src/runtime/view-render.js +49 -0
  104. package/src/space-harness-host.ts +103 -0
  105. package/template/app/globals.css +1 -0
  106. package/src/command-specs/reports.js +0 -97
@@ -1,34 +1,26 @@
1
- # Notis CLI — App Development Workflow
1
+ # Notis CLI: Space Development Workflow
2
2
 
3
- When running outside the Notis container, use the `notis` CLI to work with Notis Apps locally.
3
+ When running outside the Notis container, use the `notis` CLI to build Notis Spaces locally. Space views are
4
+ Vite + React source using `@notis/sdk`. The product `notis-apps` skill and its release guide own the workflow;
5
+ this file lists the commands generated from the CLI's own help.
4
6
 
5
- Notis apps are Vite + React projects using `@notis/sdk`. Workspace runs released versions only.
6
- Local and cloud create/edit requests authorize Workspace delivery after checks; explicit read-only,
7
- preview-only or no-deploy requests stop at local artifacts without remote mutation. Store publication
8
- requires separate approval.
7
+ Create and edit requests authorize delivery to the installed Space after checks; explicit read-only, preview-only
8
+ or no-deploy requests stop at local artifacts without remote mutation. Store publication requires separate approval.
9
9
 
10
10
  ## Core workflow
11
11
 
12
- 1. Preserve local edits; pull the exact existing released app and current deployment base. For an
13
- unreleased container, recover original source (or scaffold locally if unrecoverable), reconcile
14
- its exact ID/current version/edit permission/scope and run apps link <app-id> <source-directory>
15
- --expected-version 0. If a release has appeared, preserve local source separately and pull/reapply
16
- on that current release. Never pull missing source or create another remote recovery app.
17
- 2. Build and automatically verify before new remote creation. Browser tooling is required.
18
- 3. Reconcile exact profile/app identity and personal/team scope. Create only if absent; never duplicate
19
- a failed first-release container. Prepare only necessary backward-compatible resource changes.
20
- 4. Deploy the same linked app. Deploy builds, verifies a frozen snapshot, then uploads those bytes.
21
- `--skip-build` still verifies and rejects stale output. No Store media requirement applies.
22
- 5. Read back the exact installed ID/version/Portal URL, run live verification, and open the installed
23
- app in Portal. Report unknown or deployed-but-unverified outcomes; never blindly redeploy.
12
+ 1. `spaces pull` the exact existing Space (source, resource list, Skill folders and lock file), or `spaces init`
13
+ a new collection view.
14
+ 2. `spaces build` and `spaces verify` the selected source with fictional fixtures.
15
+ 3. `spaces deploy`, or `spaces preview` then `spaces promote`, within the user's authorization. Changed Skill
16
+ folders and resource links commit with the source release.
17
+ 4. Read back the published revision, then `views find` and `views render` its live view link.
24
18
 
25
- For source restoration, pull the current release into a fresh checkout and historical source into
26
- another folder. Replace source while retaining the current profile/app link and deployment base,
27
- change the package release label, check resource compatibility and deploy as a new release.
19
+ `notis apps` is the legacy App group for accounts not yet moved to Spaces; a legacy App cannot declare Skills.
28
20
 
29
- ## Reports
21
+ ## Reports and HTML
30
22
 
31
- For a standalone live report, use `reports init → build → verify/preview → save` instead of the app deployment workflow above. Author exactly one route with kind: report, declare its tools, and supply a readable context file. No installed app or database is required. Revisions preserve the record ID and require its freshly read revision. See the product `notis-reports` skill for source recovery, ownership and readback. These commands do not deploy an app or publish a Store listing.
23
+ New reports are independent Space views. Existing database report payloads render inside their database's main view. Use the installed HTML Space's saving Skill for self-contained HTML. See the canonical product guidance for build, revision, native file and view-link rules.
32
24
 
33
25
  ## Commands
34
26
 
@@ -42,258 +34,373 @@ Examples:
42
34
  - `npx --package @notis_ai/cli@latest -- notis doctor`
43
35
  - `npx --package @notis_ai/cli@latest -- notis doctor --json`
44
36
 
45
- ### `npx --package @notis_ai/cli@latest -- notis apps list`
37
+ ### `npx --package @notis_ai/cli@latest -- notis spaces screenshot <url>`
46
38
 
47
- List apps the current profile can access.
39
+ Capture a full-height PNG of a live view with your current access.
48
40
 
49
- When to use: Discover existing apps before linking or deploying.
41
+ When to use: Check the actual deployed view; writes are blocked and current access is checked again before any output is saved.
42
+
43
+ Options:
44
+ - `--width <pixels>` — 1440 (default) or 390.
45
+ - `--output-dir <path>` — New output directory; defaults to a unique .notis/renders directory. Existing files are never overwritten.
46
+
47
+ Examples:
48
+ - `npx --package @notis_ai/cli@latest -- notis spaces screenshot <view-link> --width 390`
49
+
50
+ ### `npx --package @notis_ai/cli@latest -- notis spaces init <name> [dir]`
51
+
52
+ Scaffold an editable collection view with first-party record components.
53
+
54
+ When to use: Start a local Space collection source for an existing linked database. Does not create or deploy remote resources.
55
+
56
+ Options:
57
+ - `--database-key <key>` — Portable key of the database this Space links.
58
+ - `--path <path>` — Descriptive view path; defaults to records.
59
+ - `--title-property <id>` — Canonical title/number property ID, or the title column (default).
60
+
61
+ Examples:
62
+ - `npx --package @notis_ai/cli@latest -- notis spaces init Notes ./notes --database-key notes --path notes`
63
+
64
+ ### `npx --package @notis_ai/cli@latest -- notis spaces navigation bind <space-id>`
65
+
66
+ Bind a named destination for the next source publication without granting target access.
67
+
68
+ When to use: Connect a portable navigation alias to an existing Space or exact record before building and publishing.
69
+
70
+ Options:
71
+ - `--alias <name>` — Declared portable navigation alias.
72
+ - `--target <json>` — Exact {space_id,document_id?}, or null to remove the draft binding.
73
+ - `--revision <number>` — Current source Space metadata revision.
74
+ - `--dry-run` — Check current source/target access and revision without changing anything.
75
+
76
+ Examples:
77
+ - `npx --package @notis_ai/cli@latest -- notis spaces navigation bind <space-id> --alias history --target '{"space_id":"<history-id>"}' --revision 2 --dry-run`
78
+
79
+ ### `npx --package @notis_ai/cli@latest -- notis spaces resources name <space-id> <binding-id>`
80
+
81
+ Give an included resource a portable alias before the first source revision.
82
+
83
+ When to use: Prepare staged resources for source authoring without replacing their IDs, scope or owners.
84
+
85
+ Options:
86
+ - `--alias <name>` — Stable lowercase alias to use in source.
87
+ - `--revision <number>` — Current Space metadata revision.
88
+ - `--dry-run` — Check naming, current access and revision without changing metadata.
50
89
 
51
90
  Examples:
52
- - `npx --package @notis_ai/cli@latest -- notis apps list`
53
- - `npx --package @notis_ai/cli@latest -- notis apps list --json`
91
+ - `npx --package @notis_ai/cli@latest -- notis spaces resources name <space-id> <binding-id> --alias weekly-report --revision 0 --dry-run`
54
92
 
55
- ### `npx --package @notis_ai/cli@latest -- notis apps init <name> [dir]`
93
+ ### `npx --package @notis_ai/cli@latest -- notis spaces pull <space-id> [dir]`
56
94
 
57
- Scaffold a new Notis app project.
95
+ Pull one editable Space source snapshot, its resource list and its Skill folders into an empty directory.
58
96
 
59
- When to use: Start a new Notis app. Use --from with a published Store app when one is close to the desired app; otherwise creates the bare Vite + React project.
97
+ When to use: Edit a Space you can administer: the source, its links (resources.json) and every editable linked Skill (skills/<alias>/) arrive together, with a local lock file so a later deploy sends only what you changed.
60
98
 
61
99
  Options:
62
- - `--from <slug>` — Start from a published Store app listed by `notis apps scaffolds list`. Downloads its source from the public app registry.
100
+ - `--revision <number>` — Exact published source revision; defaults to the current one.
63
101
 
64
102
  Examples:
65
- - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
66
- - `npx --package @notis_ai/cli@latest -- notis apps init "Mind the Flo"`
67
- - `npx --package @notis_ai/cli@latest -- notis apps init "My CRM" --from databases`
68
- - `npx --package @notis_ai/cli@latest -- notis apps init "My App" ~/code/my-app`
103
+ - `npx --package @notis_ai/cli@latest -- notis spaces pull <space-id> ./space-source`
69
104
 
70
- ### `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
105
+ ### `npx --package @notis_ai/cli@latest -- notis spaces verify [dir]`
71
106
 
72
- List published Store apps available as scaffolds.
107
+ Render one frozen Space with offline fixtures and validate its current action authorizations.
73
108
 
74
- When to use: Discover published Store apps to start from before creating a new app. Every app published to the public Store is automatically a scaffold; use --search to narrow the catalog.
109
+ When to use: Check immutable build bytes and authoring compatibility without executing actions or publishing.
75
110
 
76
111
  Options:
77
- - `--search <term>` — Filter scaffolds by name, tagline, description, or category.
112
+ - `--space <key>` — Exact source key from the workspace index.
113
+ - `--space-id <id>` — Exact existing destination Space.
114
+ - `--reuse-grants <json>` — Explicit action-key to saved-grant-ID map. Otherwise your own connections are used.
115
+ - `--reuse-grants-only` — Never authorize new actions. Reuse only the supplied saved grants; other declarations remain unavailable. Requires existing bound databases.
78
116
 
79
117
  Examples:
80
- - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list`
81
- - `npx --package @notis_ai/cli@latest -- notis apps scaffolds list --search journal`
82
- - `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from databases`
118
+ - `npx --package @notis_ai/cli@latest -- notis spaces verify . --space overview --space-id <space-id>`
83
119
 
84
- ### `npx --package @notis_ai/cli@latest -- notis apps create <name> [dir]`
120
+ ### `npx --package @notis_ai/cli@latest -- notis spaces preview [dir]`
85
121
 
86
- Create a new remote Notis app and optionally link a local project to it.
122
+ Seal a checked unpublished revision of the same Space and return its authenticated preview link.
87
123
 
88
- When to use: Provision a fresh remote app before the first deploy. Pass a project directory to link it immediately.
124
+ When to use: Review a checked candidate using current Editor access without changing live source or cloning the Space.
89
125
 
90
126
  Options:
91
- - `--team-id <id>` — Create or reuse the exact team-scoped app (default: personal).
127
+ - `--space <key>` — Exact source key from the workspace index.
128
+ - `--space-id <id>` — Exact existing destination Space.
129
+ - `--reuse-grants <json>` — Explicit action-key to saved-grant-ID map. Otherwise your own connections are used.
130
+ - `--reuse-grants-only` — Never authorize new actions. Reuse only the supplied saved grants; other declarations remain unavailable. Requires existing bound databases.
131
+ - `--request-id <key>` — Stable intent key. Reuse after timeouts or lost replies.
132
+ - `--dry-run` — Validate without uploading or publishing.
133
+
134
+ Examples:
135
+ - `npx --package @notis_ai/cli@latest -- notis spaces preview . --space overview --space-id <space-id> --request-id release-1`
136
+
137
+ ### `npx --package @notis_ai/cli@latest -- notis spaces deploy [dir]`
138
+
139
+ Publish one built Space with a retry-safe, independent source revision.
140
+
141
+ When to use: Update only the selected existing Space; this does not publish to the Store or change siblings.
142
+
143
+ Options:
144
+ - `--space <key>` — Exact source key from the workspace index.
145
+ - `--space-id <id>` — Exact existing destination Space.
146
+ - `--reuse-grants <json>` — Explicit action-key to saved-grant-ID map. Otherwise your own connections are used.
147
+ - `--reuse-grants-only` — Never authorize new actions. Reuse only the supplied saved grants; other declarations remain unavailable. Requires existing bound databases.
148
+ - `--request-id <key>` — Stable intent key. Reuse after timeouts or lost replies.
149
+ - `--dry-run` — Validate without uploading or publishing.
150
+
151
+ Examples:
152
+ - `npx --package @notis_ai/cli@latest -- notis spaces deploy . --space overview --space-id <space-id> --request-id release-1`
153
+
154
+ ### `npx --package @notis_ai/cli@latest -- notis spaces promote <release-id> [dir]`
155
+
156
+ Publish the exact sealed Space revision, with its pending Skill and link changes, after current permission and concurrency checks.
157
+
158
+ When to use: Finish a reviewed preview without rebuilding or substituting a different candidate. The Skill edits, new Skills and list changes the preview carried go live in the same transaction.
92
159
 
93
160
  Examples:
94
- - `npx --package @notis_ai/cli@latest -- notis apps create "My App"`
95
- - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
161
+ - `npx --package @notis_ai/cli@latest -- notis spaces promote <release-id>`
96
162
 
97
- ### `npx --package @notis_ai/cli@latest -- notis apps build [dir]`
163
+ ### `npx --package @notis_ai/cli@latest -- notis spaces abandon <release-id>`
98
164
 
99
- Build and package the app into .notis/output/.
165
+ Close an unpublished Space preview without changing its live source, Skills or links, or deleting action history.
100
166
 
101
- When to use: Prepare the app for verification or deployment.
167
+ When to use: Stop using a candidate while preserving live source and completed effects.
102
168
 
103
169
  Examples:
104
- - `npx --package @notis_ai/cli@latest -- notis apps build`
105
- - `npx --package @notis_ai/cli@latest -- notis apps build ./my-app`
170
+ - `npx --package @notis_ai/cli@latest -- notis spaces abandon <release-id>`
171
+
172
+ ### `npx --package @notis_ai/cli@latest -- notis spaces list`
173
+
174
+ List Spaces currently available to your account.
106
175
 
107
- ### `npx --package @notis_ai/cli@latest -- notis apps verify [dir]`
176
+ When to use: Discover accessible Spaces without exposing an issuer-wide resource catalogue.
177
+
178
+ Examples:
179
+ - `npx --package @notis_ai/cli@latest -- notis spaces list`
108
180
 
109
- Validate that every route renders and reports Store listing readiness.
181
+ ### `npx --package @notis_ai/cli@latest -- notis spaces get <space-id>`
110
182
 
111
- When to use: Any time after notis apps build, and before deploy. Catches render-time crashes and missing runtime calls. Incomplete listing media is reported as a warning; pass --listing to fail on it instead.
183
+ Read one accessible Space and its scoped resources.
184
+
185
+ When to use: Inspect the current published revision and named capabilities before executing.
112
186
 
113
187
  Options:
114
- - `--routes <slugs>` — Comma-separated route slugs. Default: every route in manifest.
115
- - `--port <n>` — Loopback port. Default: auto-pick.
116
- - `--skip-build` — Skip notis apps build; reuse existing .notis/output/.
117
- - `--mode <mode>` — stub | live. Default stub. Live posts to /portal_views/runtime_query with the CLI JWT and fails routes whose runtime calls all errored.
118
- - `--listing` — Fail instead of warn when the Store listing (tagline, categories, screenshots, changelog) is incomplete.
119
- - `--no-browser` — Start the harness server and print URLs; do not drive agent-browser.
120
- - `--keep-open` — Leave server + browser session running after report (for manual triage).
188
+ - `--record <record-key>` — Fixed record context, when this is a record-scoped Space.
121
189
 
122
190
  Examples:
123
- - `npx --package @notis_ai/cli@latest -- notis apps verify`
124
- - `npx --package @notis_ai/cli@latest -- notis apps verify --routes notes`
125
- - `npx --package @notis_ai/cli@latest -- notis apps verify --mode live`
126
- - `npx --package @notis_ai/cli@latest -- notis apps verify --listing # gate on Store listing readiness before publish`
127
- - `npx --package @notis_ai/cli@latest -- notis apps verify --no-browser # start the harness, drive agent-browser yourself`
191
+ - `npx --package @notis_ai/cli@latest -- notis spaces get <space-id>`
128
192
 
129
- ### `npx --package @notis_ai/cli@latest -- notis apps screenshot [dir]`
193
+ ### `npx --package @notis_ai/cli@latest -- notis spaces action <space-id> <action-id>`
130
194
 
131
- Capture configured listing route/scenario states via the headless harness.
195
+ Execute a declared action using its saved authorization.
132
196
 
133
- When to use: Generate the 3–6 declared metadata/screenshot-N.png files for the App Store listing. Apps are icon-led (like Raycast) — there is no cover image, only these screenshots. Each screenshot may set a focus selector to remove empty canvas and a light or dark theme that also controls its Store frame. Run before notis apps verify / deploy / publish.
197
+ When to use: Use Space capabilities as the actual actor, with the saved issuer connection and payer.
134
198
 
135
199
  Options:
136
- - `--routes <slugs>` — Comma-separated route slugs. Default: every configured screenshot state.
137
- - `--port <n>` — Loopback port. Default: auto-pick.
138
- - `--width <px>` — Viewport width. Default: 2000.
139
- - `--height <px>` — Viewport height. Default: 1250 (16:10).
140
- - `--output-dir <dir>` — Where to write screenshot-N.png. Default: metadata/.
141
- - `--mode <mode>` — stub | live. Default stub. Live renders against real data via the CLI JWT (requires a linked app), so screenshots show actual content instead of empty states.
142
- - `--raw` — Write the unframed harness capture instead of the default Store presentation.
143
- - `--skip-build` — Skip notis apps build; reuse existing .notis/output/.
200
+ - `--revision <number>` — Exact published source revision.
201
+ - `--preview-release <id>` — Exact sealed candidate ID; requires current Editor access.
202
+ - `--schema-revision <number>` — Native schema revision; required for native row writes.
203
+ - `--inputs <json>` — Declared action input values; defaults to {}.
204
+ - `--record <record-key>` — Fixed record context, when this is a record-scoped Space.
205
+ - `--request-id <key>` — Stable intent key. Reuse after timeouts or lost replies.
206
+ - `--dry-run` — Validate current access and action inputs without executing or billing.
144
207
 
145
208
  Examples:
146
- - `npx --package @notis_ai/cli@latest -- notis apps screenshot # honors notis.config.ts screenshot scenarios`
147
- - `npx --package @notis_ai/cli@latest -- notis apps screenshot --routes home,history`
148
- - `npx --package @notis_ai/cli@latest -- notis apps screenshot --mode live # populated screenshots from real data`
149
- - `npx --package @notis_ai/cli@latest -- notis apps screenshot --raw # diagnostic capture without Store framing`
209
+ - `npx --package @notis_ai/cli@latest -- notis spaces action <space-id> refresh --revision 1 --inputs '{}' --request-id refresh-1 --dry-run`
150
210
 
151
- ### `npx --package @notis_ai/cli@latest -- notis apps link <app-id> [dir]`
211
+ ### `npx --package @notis_ai/cli@latest -- notis spaces viewer-read <space-id> <operation>`
152
212
 
153
- Link a local project to a remote Notis app.
213
+ Run one declared viewer read as yourself.
154
214
 
155
- When to use: Connect a local project to an existing app for deployment.
215
+ When to use: Check what an explorer Space shows you: the databases or Skills you can open, with your own access and never an issuer grant.
156
216
 
157
217
  Options:
158
- - `--expected-version <version>` — Link only if the remote deployment version still matches this non-negative integer.
218
+ - `--revision <number>` — Exact published source revision.
219
+ - `--preview-release <id>` — Exact sealed candidate ID; requires current Editor access.
220
+ - `--input <json>` — Read input, e.g. {"database_id":"<id>"}; defaults to {}.
221
+ - `--record <record-key>` — Fixed record context, when this is a record-scoped Space.
159
222
 
160
223
  Examples:
161
- - `npx --package @notis_ai/cli@latest -- notis apps link abc123`
162
- - `npx --package @notis_ai/cli@latest -- notis apps link abc123 ./my-app`
163
- - `npx --package @notis_ai/cli@latest -- notis apps link abc123 ./recovered-app --expected-version 0`
224
+ - `npx --package @notis_ai/cli@latest -- notis spaces viewer-read <space-id> list_databases --revision 3`
225
+ - `npx --package @notis_ai/cli@latest -- notis spaces viewer-read <space-id> query_database --revision 3 --input '{"database_id":"<id>","request":{"page_size":20}}'`
164
226
 
165
- ### `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir]`
227
+ ### `npx --package @notis_ai/cli@latest -- notis spaces grants list <space-id>`
166
228
 
167
- Download a Notis app source snapshot into a local project folder.
229
+ Inspect authorization records for a Space you can edit.
168
230
 
169
- When to use: Edit an installed app. Preserve local edits, pull and link its persisted source, then build, verify and deploy.
231
+ When to use: Inspect issuers and exact constraints without exposing connection secrets.
170
232
 
171
233
  Options:
172
- - `--force` — Overwrite a non-empty target directory.
173
- - `--source-version <n>` — Pull a specific app source version (default: latest).
234
+ - `--record <record-key>` — Fixed record context, when this is a record-scoped Space.
235
+
236
+ Examples:
237
+ - `npx --package @notis_ai/cli@latest -- notis spaces grants list <space-id>`
238
+
239
+ ### `npx --package @notis_ai/cli@latest -- notis spaces grants create <space-id>`
240
+
241
+ Authorize an exact template using your current connection.
242
+
243
+ When to use: Create a Space-bound authorization; the server resolves the signed-in issuer connection.
244
+
245
+ Options:
246
+ - `--template <file>` — Canonical action template JSON file.
247
+ - `--record <record-key>` — Fixed record context, when this is a record-scoped Space.
248
+ - `--request-id <key>` — Stable intent key. Reuse after timeouts or lost replies.
249
+ - `--dry-run` — Validate the template and Editor access without creating a grant.
250
+
251
+ Examples:
252
+ - `npx --package @notis_ai/cli@latest -- notis spaces grants create <space-id> --template action.json --request-id grant-1 --dry-run`
253
+
254
+ ### `npx --package @notis_ai/cli@latest -- notis spaces grants revoke <grant-id>`
255
+
256
+ Revoke one saved Space authorization.
257
+
258
+ When to use: Stop future dispatches for an authorization you issued or can administer.
174
259
 
175
260
  Examples:
176
- - `npx --package @notis_ai/cli@latest -- notis apps pull abc123`
177
- - `npx --package @notis_ai/cli@latest -- notis apps pull abc123 ./my-app --force --source-version 3`
261
+ - `npx --package @notis_ai/cli@latest -- notis spaces grants revoke <grant-id>`
178
262
 
179
- ### `npx --package @notis_ai/cli@latest -- notis apps deploy [dir]`
263
+ ### `npx --package @notis_ai/cli@latest -- notis spaces store list`
180
264
 
181
- Build, verify and release the linked Workspace app.
265
+ List Space Store listings you can see.
182
266
 
183
- When to use: Build, verify and release the linked personal or team Workspace app. This command does not publish to the Store.
267
+ When to use: Find Space templates published to your team or approved for everyone, and your own listings.
184
268
 
185
269
  Options:
186
- - `--app-id <id>` — Override linked app ID.
187
- - `--skip-build` — Reuse unchanged build output; automated verification still runs.
270
+ - `--channel <team|public>` — Only one channel.
188
271
 
189
272
  Examples:
273
+ - `npx --package @notis_ai/cli@latest -- notis spaces store list --channel team`
274
+
275
+ ### `npx --package @notis_ai/cli@latest -- notis spaces store get <listing-id>`
276
+
277
+ Read one Store listing with its versions and your installs.
190
278
 
191
- ### `npx --package @notis_ai/cli@latest -- notis apps publish [dir]`
279
+ When to use: Check what a listing contains, its review state and whether your copies have an update.
280
+
281
+ Examples:
282
+ - `npx --package @notis_ai/cli@latest -- notis spaces store get <listing-id>`
192
283
 
193
- Submit the deployed app for Store review.
284
+ ### `npx --package @notis_ai/cli@latest -- notis spaces store installs`
285
+
286
+ List the Spaces you installed from the Store.
287
+
288
+ When to use: See which installed copies have an update or conflicts to resolve.
289
+
290
+ Examples:
291
+ - `npx --package @notis_ai/cli@latest -- notis spaces store installs`
194
292
 
195
- When to use: After the user explicitly confirms the App Details page and Store listing are ready. Requires the current local project to match the latest deployed version.
293
+ ### `npx --package @notis_ai/cli@latest -- notis spaces store publish <space-id>`
294
+
295
+ Publish a Space and its sub-Spaces as the next Store version.
296
+
297
+ When to use: Share a Space as an installable template: team listings publish at once, public ones wait for review.
196
298
 
197
299
  Options:
198
- - `--app-id <id>` — Override linked app ID.
199
- - `--confirm-ready` — Confirm the user approved the current App Details page for Store submission.
300
+ - `--channel <team|public>` — Where to publish.
301
+ - `--metadata <json>` — Listing name, tagline, description, category, icon, accent.
302
+ - `--starter <json>` — Starter row IDs per database ({"<database-id>":["<record-key>"]}).
303
+ - `--notes <text>` — Release notes for this version.
304
+ - `--request-id <key>` — Stable intent key. Reuse after timeouts or lost replies.
305
+ - `--dry-run` — Show the package counts and review diff without publishing.
200
306
 
201
307
  Examples:
202
- - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`
203
- - `npx --package @notis_ai/cli@latest -- notis apps publish ./my-app --confirm-ready`
308
+ - `npx --package @notis_ai/cli@latest -- notis spaces store publish <space-id> --channel team --request-id publish-1 --dry-run`
204
309
 
205
- ### `npx --package @notis_ai/cli@latest -- notis apps duplicate [dir]`
310
+ ### `npx --package @notis_ai/cli@latest -- notis spaces store install <listing-id>`
206
311
 
207
- Duplicate an app into an independent copy with its own databases.
312
+ Install a Store listing as your own independent copy.
208
313
 
209
- When to use: When the same app should run for a second purpose - a notes app for blog drafts alongside one for bookmarks. The copy shares no data with the source.
314
+ When to use: Add a published Space template to your account; your copy keeps your changes on later updates.
210
315
 
211
316
  Options:
212
- - `--app-id <id>` — App to duplicate. Defaults to the app this project is linked to.
213
- - `--name <name>` — Name for the duplicate (default: the source name followed by "copy").
214
- - `--copy-documents <mode>` — Which rows to copy: 'declared' (default, the starter content a fresh install would have), 'all', or 'none'.
317
+ - `--name <name>` — Name of the installed top Space.
318
+ - `--parent <space-id>` — Install under one of your Spaces.
319
+ - `--request-id <key>` — Stable intent key. Reuse after timeouts or lost replies.
320
+ - `--dry-run` — Show what the copy contains without installing.
215
321
 
216
322
  Examples:
217
- - `npx --package @notis_ai/cli@latest -- notis apps duplicate --name "Blog"`
218
- - `npx --package @notis_ai/cli@latest -- notis apps duplicate --app-id abc123 --name "Bookmarks" --copy-documents none`
323
+ - `npx --package @notis_ai/cli@latest -- notis spaces store install <listing-id> --request-id install-1`
219
324
 
220
- ### `npx --package @notis_ai/cli@latest -- notis apps doctor [dir]`
325
+ ### `npx --package @notis_ai/cli@latest -- notis spaces store update <install-id>`
221
326
 
222
- Check project health and readiness.
327
+ Update an installed copy, keeping your changes, or resolve its conflicts.
223
328
 
224
- When to use: Diagnose issues with a Notis app project.
329
+ When to use: Take a newer Store version: unchanged parts update, your edits stay, and parts both sides changed become conflicts you resolve.
330
+
331
+ Options:
332
+ - `--resolve <json>` — Per conflict key: "keep_mine" or "take_theirs".
333
+ - `--request-id <key>` — Stable intent key. Reuse after timeouts or lost replies.
334
+ - `--dry-run` — Show the three-way plan without changing anything.
225
335
 
226
336
  Examples:
227
- - `npx --package @notis_ai/cli@latest -- notis apps doctor`
228
- - `npx --package @notis_ai/cli@latest -- notis apps doctor ./my-app`
337
+ - `npx --package @notis_ai/cli@latest -- notis spaces store update <install-id> --request-id update-1 --dry-run`
338
+ - `npx --package @notis_ai/cli@latest -- notis spaces store update <install-id> --resolve '{"skill:<key>":"keep_mine"}' --request-id resolve-1`
229
339
 
230
- ### `npx --package @notis_ai/cli@latest -- notis reports init <name> [dir]`
340
+ ### `npx --package @notis_ai/cli@latest -- notis spaces store unpublish <listing-id>`
231
341
 
232
- Init a standalone live SDK report.
342
+ Stop new installs of a Store listing.
233
343
 
234
- When to use: Author a private standalone document using the shared view runtime; no app or database is required.
344
+ When to use: Withdraw a listing: existing copies keep working and a version waiting for review is withdrawn.
345
+
346
+ Options:
347
+ - `--request-id <key>` — Stable intent key. Reuse after timeouts or lost replies.
235
348
 
236
349
  Examples:
237
- - `npx --package @notis_ai/cli@latest -- notis reports init "Weekly report" ./weekly-report`
350
+ - `npx --package @notis_ai/cli@latest -- notis spaces store unpublish <listing-id> --request-id unpublish-1`
238
351
 
239
- ### `npx --package @notis_ai/cli@latest -- notis reports build [dir]`
352
+ ### `npx --package @notis_ai/cli@latest -- notis spaces build [dir]`
240
353
 
241
- Build a standalone live SDK report.
354
+ Build one independent Space and save its frozen source/artifact snapshot.
242
355
 
243
- When to use: Author a private standalone document using the shared view runtime; no app or database is required.
356
+ When to use: Prepare a selected Space for verification without publishing it or changing siblings.
357
+
358
+ Options:
359
+ - `--space <key>` — Exact source key from the workspace Space index.
244
360
 
245
361
  Examples:
246
- - `npx --package @notis_ai/cli@latest -- notis reports build ./weekly-report`
362
+ - `npx --package @notis_ai/cli@latest -- notis spaces build . --space overview`
247
363
 
248
- ### `npx --package @notis_ai/cli@latest -- notis reports verify [dir]`
364
+ ### `npx --package @notis_ai/cli@latest -- notis spaces inspect [dir]`
249
365
 
250
- Verify a standalone live SDK report.
366
+ Inspect one local Space definition and its declared capabilities.
251
367
 
252
- When to use: Author a private standalone document using the shared view runtime; no app or database is required.
368
+ When to use: Read the selected source definition without loading sibling definitions or account resources.
253
369
 
254
370
  Options:
255
- - `--routes <slugs>` — Comma-separated route slugs. Default: every route in manifest.
256
- - `--port <n>` — Loopback port. Default: auto-pick.
257
- - `--skip-build` — Skip notis apps build; reuse existing .notis/output/.
258
- - `--mode <mode>` — stub | live. Default stub. Live posts to /portal_views/runtime_query with the CLI JWT and fails routes whose runtime calls all errored.
259
- - `--no-browser` — Start the harness server and print URLs; do not drive agent-browser.
260
- - `--keep-open` — Leave server + browser session running after report (for manual triage).
261
- - `--document-id <id>` — Saved report for live verification.
262
- - `--expected-revision <revision>` — Saved report revision for live verification.
371
+ - `--space <key>` — Exact source key from the workspace Space index.
263
372
 
264
373
  Examples:
265
- - `npx --package @notis_ai/cli@latest -- notis reports verify ./weekly-report`
374
+ - `npx --package @notis_ai/cli@latest -- notis spaces inspect . --space overview`
266
375
 
267
- ### `npx --package @notis_ai/cli@latest -- notis reports preview [dir]`
376
+ ### `npx --package @notis_ai/cli@latest -- notis views find`
268
377
 
269
- Preview a standalone live SDK report.
378
+ Find the views you can open for a record, database, view link, Space or search.
270
379
 
271
- When to use: Author a private standalone document using the shared view runtime; no app or database is required.
380
+ When to use: Get fresh view-qualified links and declared URL parameters before citing or opening a view.
272
381
 
273
382
  Options:
274
- - `--routes <slugs>` — Comma-separated route slugs. Default: every route in manifest.
275
- - `--port <n>` — Loopback port. Default: auto-pick.
276
- - `--skip-build` — Skip notis apps build; reuse existing .notis/output/.
277
- - `--mode <mode>` — stub | live. Default stub. Live posts to /portal_views/runtime_query with the CLI JWT and fails routes whose runtime calls all errored.
278
- - `--no-browser` — Start the harness server and print URLs; do not drive agent-browser.
279
- - `--keep-open` — Leave server + browser session running after report (for manual triage).
280
- - `--document-id <id>` — Saved report for live verification.
281
- - `--expected-revision <revision>` — Saved report revision for live verification.
383
+ - `--record-key <id>` — Find views that show this exact native record.
384
+ - `--database-id <id>` — Find views over this database.
385
+ - `--url <url>` — Resolve this view link and its current parameters.
386
+ - `--space-id <id>` — Describe this Space view.
387
+ - `--query <text>` — Search accessible view names, descriptions and readable context.
282
388
 
283
389
  Examples:
284
- - `npx --package @notis_ai/cli@latest -- notis reports preview ./weekly-report`
390
+ - `npx --package @notis_ai/cli@latest -- notis views find --record-key <record-key>`
391
+ - `npx --package @notis_ai/cli@latest -- notis views find --url <view-link>`
392
+ - `npx --package @notis_ai/cli@latest -- notis views find --query inbox`
285
393
 
286
- ### `npx --package @notis_ai/cli@latest -- notis reports save [dir]`
394
+ ### `npx --package @notis_ai/cli@latest -- notis views render <url>`
287
395
 
288
- Build, verify and save a standalone live report document.
396
+ Render a live view as Markdown and a full-height PNG with your current access.
289
397
 
290
- When to use: Persist an independently owned report, not an app release.
398
+ When to use: Check the actual deployed view; writes are blocked and current access is checked again before any output is saved.
291
399
 
292
400
  Options:
293
- - `--document-id <id>` — Existing report document to update.
294
- - `--expected-revision <revision>` — Current saved report revision; required for updates.
295
- - `--title <title>` — Required, including updates. Document title.
296
- - `--context-file <file>` — Required. UTF-8 readable report content and structure.
401
+ - `--outputs <kinds>` — Comma-separated markdown,screenshot (default both).
402
+ - `--width <pixels>` — 1440 (default) or 390.
403
+ - `--output-dir <path>` — New output directory; defaults to a unique .notis/renders directory. Existing files are never overwritten.
297
404
 
298
405
  Examples:
299
- - `npx --package @notis_ai/cli@latest -- notis reports save ./weekly-report --title "Weekly review" --context-file ./context.md`
406
+ - `npx --package @notis_ai/cli@latest -- notis views render <view-link> --outputs markdown,screenshot`
@@ -1,7 +1,7 @@
1
1
  <!-- notis-cli:instructions:start -->
2
2
  ## Notis CLI
3
3
 
4
- Use the Notis CLI (`npx --package @notis_ai/cli@latest -- notis ...`) whenever the task involves the user's personal data or connected services: integrations (Gmail, Google Calendar, Notion, Slack, GitHub, ...), long-term memories, reminders, automations, native Notis databases and notes, public deep research, or Notis apps. Prefer it over telling the user to operate another app manually, and never treat a task as blocked merely because a capability is absent from the current tool list—reach it through the CLI.
4
+ Use the Notis CLI (`npx --package @notis_ai/cli@latest -- notis ...`) whenever the task involves the user's personal data or connected services: integrations (Gmail, Google Calendar, Notion, Slack, GitHub, ...), long-term memories, reminders, automations, native Notis databases and notes, public deep research, or Notis Spaces and apps. Prefer it over telling the user to operate another app manually, and never treat a task as blocked merely because a capability is absent from the current tool list—reach it through the CLI.
5
5
 
6
6
  On a local machine, `notis login` authorizes a scoped, revocable OAuth profile in the browser. Notis Desktop may authorize that profile automatically, but the Desktop app does not need to remain running. Hosted Notis shells use `NOTIS_JWT`. Before acting on personal data, run `notis whoami` when the intended account or endpoint is not already clear.
7
7
 
@@ -24,7 +24,7 @@ Tool name shapes: `LOCAL_NOTIS_*` (native Notis), `LOCAL_NOTIS_DATABASE_*` (data
24
24
  - **Automations:** `LOCAL_NOTIS_INSERT_AUTOMATION`, `LOCAL_NOTIS_UPDATE_AUTOMATION`, and `LOCAL_NOTIS_RUN_AUTOMATION` run an agent prompt on a cron schedule or event trigger; `LOCAL_NOTIS_LIST_INTEGRATION_TRIGGERS` lists triggers. Fixed text at a time is a reminder; work an agent must perform is an automation.
25
25
  - **Databases and notes:** `LOCAL_NOTIS_DATABASE_QUERY` reads; generated `LOCAL_NOTIS_DATABASE_UPSERT_<SLUG>` tools write rows; `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` creates or alters a schema. Discover the exact per-database tool names before use.
26
26
  - **Deep research:** `LOCAL_NOTIS_DEEP_SEARCH` performs public multi-source research.
27
- - **Notis apps:** Use the notis-apps skill and release-only workflow. App create/edit requests authorize Workspace deployment after checks on local and cloud computers. Explicit read-only, preview-only or no-deploy requests stop at local checks without remote mutations. Preserve exact app identity and deployment base. Verify the installed result. Store publication requires separate approval.
27
+ - **Spaces and legacy apps:** Use the notis-apps skill's release workflow. For accounts moved to Spaces, source work uses `notis spaces`; `notis apps` is only for accounts that have not moved. Never use the legacy App path to modify a migrated Space. Create/edit requests authorize Workspace deployment after checks on local and cloud computers. Explicit read-only, preview-only or no-deploy requests stop at local checks without remote mutations. Preserve the exact Space or app identity and deployment base. Verify the installed result. Store publication requires separate approval.
28
28
 
29
29
  ### Rules
30
30