@notis_ai/cli 0.2.15 → 0.2.17
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 +2 -2
- package/dist/agent-hooks/notis-agent-hook.mjs +616 -198
- package/dist/base-skills/notis-apps/SKILL.md +101 -37
- package/dist/base-skills/notis-cli/SKILL.md +80 -22
- package/package.json +1 -1
- package/skills/notis-apps/cli.md +2 -2
- package/src/command-specs/apps.js +183 -70
- package/src/runtime/app-dev-process-identity.js +111 -0
- package/src/runtime/app-dev-server.js +236 -8
- package/src/runtime/app-platform.js +23 -1
- package/src/runtime/profiles.js +19 -11
- package/src/runtime/sync-skills.js +20 -4
- package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +7 -1
- package/template/packages/sdk/src/config.ts +6 -0
- package/template/packages/sdk/src/hooks/useCollectionInteractions.ts +23 -6
- package/template/packages/sdk/src/hooks/useNotis.ts +3 -0
- package/template/packages/sdk/src/hooks/useNotisNavigation.ts +7 -4
- package/template/packages/sdk/src/interactions/shortcuts.tsx +7 -1
- package/template/packages/sdk/src/runtime.ts +3 -0
|
@@ -23,10 +23,33 @@ All Notis apps are built using the Notis CLI, either locally in a repo workspace
|
|
|
23
23
|
## App Workspace Tool Rules
|
|
24
24
|
|
|
25
25
|
- Apps are the top-level packaging unit in Notis.
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
- Choose the execution path before changing an app. A prompt that says the
|
|
27
|
+
shell is a hosted/Vercel sandbox, or a shell rooted at `/vercel/sandbox`, is
|
|
28
|
+
the **hosted sandbox** path. A shell on the user's computer with Notis
|
|
29
|
+
Desktop available is the **local Desktop** path.
|
|
30
|
+
- In a hosted sandbox, do not run `apps dev`: the user's Desktop cannot mount
|
|
31
|
+
that sandbox filesystem. Unless the user explicitly requests preview-only,
|
|
32
|
+
read-only, or no deployment, a request to create or edit an app authorizes
|
|
33
|
+
deploying that app to the user's Workspace after `apps build` and automated
|
|
34
|
+
`apps verify` pass. An opt-out stops after those tests with no remote app
|
|
35
|
+
create/link, database mutation, deploy, or post-deploy checks. Pulling an existing app provides its exact link. For a new
|
|
36
|
+
app, test first, then reconcile profile state and `apps list --json` against
|
|
37
|
+
the canonical `notis.config.ts` `name` and intended personal/team scope: link
|
|
38
|
+
one exact editable non-development match after a metadata-only
|
|
39
|
+
(`include_documents: false`) detail read proves scope, fail on ambiguity or
|
|
40
|
+
scope mismatch, or create only when none exists. New CLI-created apps default
|
|
41
|
+
to personal scope. Before creation, prove that canonicalizing the config
|
|
42
|
+
`title` yields the config `name`. For personal scope, run `apps create
|
|
43
|
+
"<canonical-config-title>" . --json` exactly once. For explicitly requested
|
|
44
|
+
team scope, discover and inspect `LOCAL_NOTIS_CREATE_APP`, dry-run it, execute
|
|
45
|
+
it exactly once with team visibility and the verified current team scope,
|
|
46
|
+
verify the returned id/slug/team scope/edit permission, then `apps link` that
|
|
47
|
+
exact id. Stop for read-only
|
|
48
|
+
reconciliation if creation is ambiguous or outcome-unknown. In the local
|
|
49
|
+
Desktop path, use `apps dev [folder]`, let the user test the DEV app, and deploy
|
|
50
|
+
that development identity directly only after an explicit request. Use
|
|
51
|
+
`LOCAL_NOTIS_CREATE_APP` only for a hosted team-scoped creation or another
|
|
52
|
+
non-CLI administrative flow that explicitly requires a server-side app row.
|
|
30
53
|
- Use `LOCAL_NOTIS_UPDATE_APP` to update app metadata.
|
|
31
54
|
- Use `LOCAL_NOTIS_LIST_APPS` to discover the user's apps.
|
|
32
55
|
- The full app lifecycle uses the CLI in the shell. Always run it through the registry-resolved package, for example `npx --package @notis_ai/cli@latest -- notis apps init`; use the same prefix for `build` and `deploy`. In hosted shells, the CLI is pre-authenticated through `NOTIS_JWT`.
|
|
@@ -97,16 +120,17 @@ App code never accesses the runtime directly -- it uses SDK hooks (`useTool`, `u
|
|
|
97
120
|
12. **Portal-owned sidebars stay portal-owned** -- If a route uses `collection.sidebar`, treat that sidebar as platform chrome. Do not remove it, recreate it inside app JSX, or replace it with a custom in-app folder rail.
|
|
98
121
|
13. **Portal globals are off-limits** -- Never use `window.__NOTIS_RUNTIME__`, query portal-owned DOM hooks, or create global DOM portals.
|
|
99
122
|
14. **Prefer inline optimistic edits** -- Rename-like edits for collections, app-owned rows, and sidebar-backed entities should use inline editing with an optimistic UI update, then roll back on backend failure. Use modals only when the edit requires multiple fields or destructive confirmation.
|
|
100
|
-
15. **
|
|
101
|
-
16. **Installed app identity is exact and
|
|
123
|
+
15. **The execution environment determines the deploy gate** -- In the local Desktop path, run `apps dev [folder]`, let the **user** test the automatically mounted DEV app, and do not deploy until the user asks; first deploy promotes that `dev_app_id` directly, so never create a second app first. In a hosted sandbox, `apps dev` cannot reach the user's Desktop; bootstrap `agent-browser`, build and verify first, then resolve exact identity/resources and deploy to the user's Workspace, verify the remote version and live runtime, and return the exact Portal URL. Automatic deployment is the default for create/edit requests only; an explicit preview-only, read-only, or no-deploy request wins. This standing sandbox authorization does not authorize Store submission.
|
|
124
|
+
16. **Installed app identity is exact, editable, and scope-proven** -- Validate an explicit persisted link for this API/user profile before using it. Otherwise inspect every accessible exact-canonical-slug row, including development rows; link only one editable non-development candidate whose exact detail proves the intended personal/team scope. Fail closed on a development collision, multiple matches, missing scope proof, or scope mismatch, and never infer identity from display name. After first install, keep the validated profile-scoped link so Portal and CLI update the same app instead of creating duplicates.
|
|
102
125
|
17. **Development identities stay separate** -- `.notis/state.json` uses `dev_app_id` for the hidden development-runtime row and `app_id` only for an accessible installed workspace app, scoped under the authenticated environment. Never pass a runtime app whose manifest has `is_dev: true` to `notis apps link`.
|
|
103
126
|
18. **Automatic mounts are multi-instance and least-authority** -- Prod, Beta, and source-development Desktop instances may mount the same source simultaneously with independent authenticated runtimes. Automatic mounting never grants capabilities: reuse existing grants and leave restricted capabilities denied until approved. Consumer leases expire after crashes so the shared host exits after the last live instance. There are no offline rows or manual start/stop controls.
|
|
104
127
|
19. **Store submission is user-gated** -- Run `apps publish --confirm-ready` only after the user explicitly confirms the current App Details page and Store listing are ready. Deploy the exact approved local state first. The command must reject missing confirmation, incomplete listing media, a local/deployed version mismatch, private visibility, or an existing pending review.
|
|
105
|
-
20. **Bump `notisAppVersion`
|
|
128
|
+
20. **Bump `notisAppVersion` before linked development and every Store update** -- `package.json` must contain a semver `notisAppVersion`. A linked local source substitutes its installed Workspace app only when the local version is strictly greater than the installed manifest's `release_version`; equal, lower, missing, or invalid versions keep serving the online bundle. `apps pull` retrieves the online version, so increment `notisAppVersion` before `apps dev` when continuing development. For an existing Store app, also increment it beyond the currently published registry version before deploy and submission; registry CI rejects equal or lower versions.
|
|
106
129
|
21. **`CHANGELOG.md` owns release history** -- Keep the complete release history in one root `CHANGELOG.md`, newest entry first. Do not add new `versionNotes` values to `notis.config.ts`. Use `## [Release title] - YYYY-MM-DD`, or `{PR_MERGE_DATE}` for an unpublished entry. App Details reads **What’s New** and **Version History** from the deployed package manifest, while the Store reads them from the latest published snapshot; unpublished workspace edits must never change the Store page. The manifest also exposes `package.json` `notisAppVersion` as the package version shown in App Details.
|
|
107
130
|
22. **Database rows are private unless explicitly seeded** -- A string declaration such as `databases: ['notes']` publishes schema only and never includes the developer's rows. Use `{ slug: 'templates', seedDocuments: true }` only for small, intentional starter content that every installer should receive. Never enable it for user-created notes, history, leads, or other personal data.
|
|
108
131
|
23. **Public submissions are complete, reviewable packages** -- The registry PR must contain the full editable source tree, Store assets, exact source-declared database schemas, and only explicitly seeded starter rows. Registry CI validates those boundaries before merge; do not hand-edit `notis-listing.json` or strip source files to make a check pass. Fix the app locally, redeploy, and resubmit.
|
|
109
|
-
24. **New projects
|
|
132
|
+
24. **New projects default to `~/.notis/apps/<slug>`, and `[dir]` overrides it** -- `apps init` and `apps pull` use this stable, predictable home unless the app belongs in a specific repository, monorepo, or user-chosen location. In those cases, pass `[dir]` and report the resulting path. Do not nest an app inside a directory whose local workspace metadata selects an unrelated Notis runtime or profile: later CLI calls inherit that routing and may target the wrong environment.
|
|
133
|
+
25. **Machine names and display titles use different casing** -- In `notis.config.ts`, `name` is the stable machine identity and must be lowercase kebab-case (`name: 'link-building'`). `title` is the human-facing app name and must use deliberate display casing (`title: 'Link Building'`), preserving product spelling and acronyms such as `Notis` and `SEO`. Never put a title-cased phrase in `name`, never show a raw slug as the title, and never change an existing canonical `name` or remote slug merely to repair display casing. The persisted `apps.name`, Workspace sidebar, App Details, and Store listing must use `title`.
|
|
110
134
|
|
|
111
135
|
## Anti-patterns -- NEVER do these
|
|
112
136
|
|
|
@@ -115,7 +139,7 @@ These are the most common mistakes agents make. Each one wastes time and produce
|
|
|
115
139
|
- **NEVER assume app deploys create databases for you** -- Create or update databases through native Notis database tools or the assistant first, then reference them by slug in `notis.config.ts`. Database creation requires the owning app to exist: pass its slug or id in the `app` argument of `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` (create the app first with `LOCAL_NOTIS_CREATE_APP` if needed). A database can only be referenced by the app that owns it.
|
|
116
140
|
- **NEVER bypass the supported workflow by manually stitching together low-level save or lint calls from a local workspace** -- Local agents should go through the NPX Notis CLI for `apps pull`, `apps dev`, `apps build`, `apps verify`, `apps create`, `apps link`, and `apps deploy`.
|
|
117
141
|
- **NEVER use `apps pull` to clone a Store listing** -- `npx --package @notis_ai/cli@latest -- notis apps pull` only pulls source for an app the user can already access as an installed app. To fork a published Store app, run `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from <slug>` instead: it downloads that app's source from the public registry, and installing the app first is not required.
|
|
118
|
-
- **NEVER deploy
|
|
142
|
+
- **NEVER apply the local deploy gate to a hosted sandbox** -- On the user's local computer, a clean `apps build` + `apps verify` is not deploy consent: hand off the DEV app and wait. In a hosted sandbox, the user's create or edit request is deploy consent for that app because `apps dev` cannot reach their Desktop; deploy only after both commands pass, then verify the remote version. Neither path authorizes Store submission.
|
|
119
143
|
- **NEVER submit without explicit approval** -- A deploy request alone does not authorize Store submission. Run `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready` only when the user confirms App Details is ready for Store review.
|
|
120
144
|
- **NEVER write raw `views/<slug>/index.js` files** -- Write standard React pages in `app/`.
|
|
121
145
|
- **NEVER invent `npx --package @notis_ai/cli@latest -- notis apps push` or bypass the review flow** -- Source moves through `apps pull` and `apps deploy`; `apps publish --confirm-ready` submits the deployed snapshot through the same authenticated review endpoint as App Details.
|
|
@@ -130,23 +154,25 @@ These are the most common mistakes agents make. Each one wastes time and produce
|
|
|
130
154
|
**Default to the Store scaffold catalog, not a blank project.** Every published Store app is a scaffold: `notis apps scaffolds list` reads the catalog from the public registry, and `notis apps init --from <slug>` downloads that app's source. Most user requests overlap with a published app, and starting from one is faster than a bare app.
|
|
131
155
|
|
|
132
156
|
1. **Find a starting point.** Run `npx --package @notis_ai/cli@latest -- notis apps scaffolds list` (add `--search <term>` to filter) to list the published Store apps. If something close matches, run `npx --package @notis_ai/cli@latest -- notis apps init "My App" --from <slug>` to download that app's source from the registry. Only run plain `notis apps init "My App"` when no published app fits. Either way the project lands in `~/.notis/apps/<slug>`; add a `[dir]` argument when the user wants it somewhere else (a tracked git repo, an existing monorepo), and report the path you used.
|
|
133
|
-
2. **Pull your own apps; fork Store apps with `--from`.** `apps pull` is for apps the user already has installed or deployed: run `npx --package @notis_ai/cli@latest -- notis apps list`, then `npx --package @notis_ai/cli@latest -- notis apps pull <app-id>` (lands in `~/.notis/apps/<app-slug>`; pass a `[dir]` argument to place it elsewhere). To fork a published Store app, use `apps init --from <slug>` instead -- it downloads the source from the registry and does not require installing the app first.
|
|
134
|
-
3. **Edit the listing source.**
|
|
157
|
+
2. **Pull your own apps; fork Store apps with `--from`.** `apps pull` is for apps the user already has installed or deployed: run `npx --package @notis_ai/cli@latest -- notis apps list`, preserve any local edits in the target directory, then run `npx --package @notis_ai/cli@latest -- notis apps pull <app-id>` (lands in `~/.notis/apps/<app-slug>`; pass a `[dir]` argument to place it elsewhere). A pull reproduces the installed release, so increment `package.json` `notisAppVersion` above that release before `apps dev`; until then the online bundle remains active. To fork a published Store app, use `apps init --from <slug>` instead -- it downloads the source from the registry and does not require installing the app first.
|
|
158
|
+
3. **Edit the listing source.** In `notis.config.ts`, set `name` to the stable lowercase kebab-case identity and set `title` to the correctly cased human-facing name; for example, `name: 'link-building'` with `title: 'Link Building'`. Treat acronym and brand casing as editorial input, not something to derive mechanically from the slug. Then update description, icon, accent, author, categories, tagline, databases, routes, and tools. Declare a database as a string for schema-only Store packaging; use `{ slug: 'templates', seedDocuments: true }` only when its rows are deliberate starter content for every installer. Keep the complete Store release history in the root `CHANGELOG.md`, newest entry first, using `## [Release title] - YYYY-MM-DD` (or `{PR_MERGE_DATE}` before publication). The first entry powers **What’s New** and the same file powers **Version History**. `icon` is a `phosphor:<name>` value or `metadata/icon.png`; when unset the app shows its **two-letter initials** everywhere (store, sidebar, app details). `accent` optionally pins the avatar color to one of `blue|violet|emerald|amber|rose|sky|fuchsia|teal` (default derived from the app id). Icon/accent flow through deploy onto the app row + listing and can also be set later via the `update_app` tool.
|
|
135
159
|
4. **Build pages in `app/`.** Reuse scaffold code wherever it fits.
|
|
136
|
-
5. **
|
|
137
|
-
6. **
|
|
138
|
-
7. **Verify locally.** Run `npm install`, then `npx --package @notis_ai/cli@latest -- notis apps build` and `npx --package @notis_ai/cli@latest -- notis apps verify`. Surface the verify report and fix failures. Incomplete listing media is only a `Store readiness:` warning there; run `notis apps verify --listing` before publish to make it a failure.
|
|
139
|
-
8. **Local-development-first handoff — STOP HERE.** Hand off after the user can see and test the app in its DEV-badged Workspace row. Building a new app to this point, without deploying, is a **complete and expected** result. Do NOT proceed to `apps create` / `apps deploy` yet. **Before handing off, complete all three acceptance checks:**
|
|
160
|
+
5. **Test the source before remote mutation.** Before changing a linked installed app, increment `package.json` `notisAppVersion` above the installed release. In a fresh hosted sandbox, bootstrap Agent Browser with `npm exec --yes --package agent-browser@latest -- agent-browser install`. Generate configured screenshots; use `theme: 'dark'` or `theme: 'light'` where appropriate and reserve screenshot `--raw` for diagnostics. Run `npm install`, run `npx --package @notis_ai/cli@latest -- notis apps build`, then run `npx --yes --package @notis_ai/cli@latest --package agent-browser@latest -- notis apps verify` in the sandbox (or the normal NPX verification command locally). Fix every failure. Do not create an app, mutate a database, or deploy before both checks pass. `--no-browser` is manual triage, not a passing automated gate.
|
|
161
|
+
6. **Finish the local Desktop path at the DEV handoff.** Run `npx --package @notis_ai/cli@latest -- notis apps dev [folder]`; it creates the development identity and materializes available scaffold database snapshots without requiring a hosted app id. Hand off after the user can see and test the app in its DEV-badged Workspace row. Do not deploy until the user asks, and then run `apps deploy` directly so the existing `dev_app_id` is promoted in place; never run `apps create` after `apps dev`. **Before handing off, complete all three acceptance checks:**
|
|
140
162
|
1. Root: `apps roots list` contains the intended folder (or the app is under the implicit default root).
|
|
141
163
|
2. Bundle: the loopback `/snapshot` responds successfully and contains the expected manifest/routes.
|
|
142
164
|
3. Mount and render: the app appears exactly once with a compact `DEV` badge and its default route renders. For multi-instance work, verify each requested Desktop independently.
|
|
143
165
|
See Troubleshooting → *App is missing from the sidebar* if any check fails.
|
|
144
|
-
|
|
166
|
+
7. **Gate and resolve one hosted identity after tests pass.** If the request is preview-only, read-only, or no-deploy, stop after step 5: do not create or link an app, mutate a database, deploy, or run post-deploy checks. Otherwise, existing edits keep the exact profile-scoped id linked by `apps pull`, after a metadata-only (`include_documents: false`) app-detail read validates its edit permission and scope without materializing databases. For a new hosted app, default the intended scope to personal unless the user explicitly requests team scope, inspect `.notis/state.json`, and run `apps list --json`. Consider every accessible exact canonical-slug row, including development rows. Link only one editable, non-development candidate whose metadata-only exact app-detail read proves the intended scope; fail on multiple matches, development-row collisions, missing scope proof, or scope mismatch. Create only when there are zero exact-slug rows. First prove that lowercasing the config `title`, replacing non-alphanumeric runs with `-`, and trimming hyphens yields the config `name`. For personal scope, run `npx --package @notis_ai/cli@latest -- notis apps create "<canonical-config-title>" . --json` exactly once and verify the returned id, remote slug, edit permission, and personal scope. For explicitly requested team scope, use `notis tools search` to discover the team-capable app-creation tool, inspect its schema, dry-run it, then execute `LOCAL_NOTIS_CREATE_APP` exactly once with the canonical display title, `visibility: "team"`, and the exact current `team_id` when resolved. Verify the result's id, canonical slug, `team_id`, team visibility, and edit permission, then run `notis apps link <returned-id> .` before database reconciliation. Never retry an outcome-unknown create; reconcile read-only and stop on ambiguity or any returned identity/scope mismatch.
|
|
167
|
+
8. **Reconcile hosted database schemas safely.** Read the exact app detail and current schemas first; mutate only missing or changed declarations. For creation, pass the exact app id in the database tool's `app` argument. For an update, resolve the exact `database_id`, verify its `owner_app_id` equals the linked app id, update by that `database_id`, then read back slug, owner, and schema. Apply only backward-compatible schema expansion before deployment. Stage breaking or destructive changes through an expand-contract sequence and obtain the required destructive approval; never make the currently deployed bundle incompatible before its replacement is live.
|
|
168
|
+
9. **Deploy and prove the hosted sandbox result.** Use only the exact id established in step 7. Run `npx --package @notis_ai/cli@latest -- notis apps deploy`, read the matching row back with `npx --package @notis_ai/cli@latest -- notis apps list --json`, confirm its id and deployed version, then run `npx --yes --package @notis_ai/cli@latest --package agent-browser@latest -- notis apps verify --mode live`. Return that row's exact profile-appropriate `portal_url` only after every proof passes. Report state precisely: a definite pre-commit rejection is **tested but not deployed**; a timeout/network/incomplete mutation response is **tested, deployment outcome unknown**; a confirmed deploy followed by failed readback is **deployed but not remotely verified**; a failed live check is **deployed but live verification failed**. Never retry an outcome-unknown mutation.
|
|
145
169
|
10. **Submit only after confirmation.** When the user explicitly confirms the current App Details page is ready, ensure the approved state is deployed, then run `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`. The command submits Team apps immediately or opens the Public Store registry review PR. Without that confirmation, stop after deploy.
|
|
146
170
|
|
|
147
171
|
### Quick start
|
|
148
172
|
|
|
149
|
-
|
|
173
|
+
Choose the local or hosted finish after verification. Local deployment is
|
|
174
|
+
user-gated; hosted-sandbox deployment is the default for app create or edit
|
|
175
|
+
tasks unless the user explicitly requests preview-only, read-only, or no deploy.
|
|
150
176
|
|
|
151
177
|
```bash
|
|
152
178
|
# 1. Pick a published Store app as the scaffold (catalog comes from the public registry)
|
|
@@ -157,22 +183,39 @@ npx --package @notis_ai/cli@latest -- notis apps init "My App" --from <slug>
|
|
|
157
183
|
cd ~/.notis/apps/my-app
|
|
158
184
|
npm install
|
|
159
185
|
|
|
160
|
-
# 2.
|
|
161
|
-
#
|
|
162
|
-
# sidebar group. This is the finish line for a build request.
|
|
186
|
+
# 2. LOCAL COMPUTER: register with Desktop and iterate. After the user approves
|
|
187
|
+
# deployment, run deploy directly to promote the existing dev_app_id.
|
|
163
188
|
npx --package @notis_ai/cli@latest -- notis apps dev
|
|
164
|
-
# ...
|
|
165
|
-
|
|
166
|
-
# 3. Build, capture listing screenshots, and verify (still local — no deploy)
|
|
189
|
+
# ... user tests the DEV-badged app ...
|
|
167
190
|
npx --package @notis_ai/cli@latest -- notis apps build
|
|
168
191
|
npx --package @notis_ai/cli@latest -- notis apps screenshot
|
|
169
192
|
npx --package @notis_ai/cli@latest -- notis apps verify
|
|
193
|
+
npx --package @notis_ai/cli@latest -- notis apps deploy
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Hosted sandbox finish — never run `apps dev`. Test first, then reconcile the
|
|
197
|
+
exact app identity and changed databases before deployment:
|
|
170
198
|
|
|
171
|
-
|
|
172
|
-
|
|
199
|
+
```bash
|
|
200
|
+
npm exec --yes --package agent-browser@latest -- agent-browser install
|
|
201
|
+
npx --yes --package @notis_ai/cli@latest --package agent-browser@latest -- notis apps screenshot
|
|
202
|
+
npx --package @notis_ai/cli@latest -- notis apps build
|
|
203
|
+
npx --yes --package @notis_ai/cli@latest --package agent-browser@latest -- notis apps verify
|
|
204
|
+
# New unlinked app only: reconcile exact canonical slug with apps list. If no
|
|
205
|
+
# match exists, create once with the config title and verify the returned slug.
|
|
206
|
+
npx --package @notis_ai/cli@latest -- notis apps list --json
|
|
207
|
+
# Before create, prove canonicalize(config.title) == config.name.
|
|
208
|
+
npx --package @notis_ai/cli@latest -- notis apps create "<canonical-config-title>" . --json
|
|
209
|
+
# Compare schemas, then create only missing databases or update changed ones by
|
|
210
|
+
# verified database_id and read back owner/schema before continuing.
|
|
173
211
|
npx --package @notis_ai/cli@latest -- notis apps deploy
|
|
212
|
+
npx --package @notis_ai/cli@latest -- notis apps list --json
|
|
213
|
+
npx --yes --package @notis_ai/cli@latest --package agent-browser@latest -- notis apps verify --mode live
|
|
214
|
+
```
|
|
174
215
|
|
|
175
|
-
|
|
216
|
+
Store submission on either path remains a separate approval-gated action:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
176
219
|
npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready
|
|
177
220
|
```
|
|
178
221
|
|
|
@@ -184,13 +227,14 @@ npx --package @notis_ai/cli@latest -- notis apps link <app-id> .
|
|
|
184
227
|
npx --package @notis_ai/cli@latest -- notis apps deploy
|
|
185
228
|
```
|
|
186
229
|
|
|
187
|
-
Or if editing an installed app:
|
|
230
|
+
Or if editing an installed app locally:
|
|
188
231
|
|
|
189
232
|
```bash
|
|
190
233
|
npx --package @notis_ai/cli@latest -- notis apps list
|
|
191
234
|
npx --package @notis_ai/cli@latest -- notis apps pull <installed-app-id>
|
|
192
235
|
cd ~/.notis/apps/my-app
|
|
193
236
|
npm install
|
|
237
|
+
# Increment package.json notisAppVersion above the pulled online release.
|
|
194
238
|
npx --package @notis_ai/cli@latest -- notis apps dev
|
|
195
239
|
npx --package @notis_ai/cli@latest -- notis apps build
|
|
196
240
|
npx --package @notis_ai/cli@latest -- notis apps verify
|
|
@@ -199,12 +243,20 @@ npx --package @notis_ai/cli@latest -- notis apps link <installed-app-id> .
|
|
|
199
243
|
npx --package @notis_ai/cli@latest -- notis apps deploy
|
|
200
244
|
```
|
|
201
245
|
|
|
246
|
+
In a hosted sandbox, use the same pull/build/verify sequence but omit `apps
|
|
247
|
+
dev`; bootstrap `agent-browser`, materialize any new or changed database schemas
|
|
248
|
+
against the exact linked id, deploy automatically after verification, read back
|
|
249
|
+
the exact app id/version and `portal_url` with `apps list --json`, run live verification, and return that
|
|
250
|
+
exact Portal URL. Never run `apps publish --confirm-ready` without separate
|
|
251
|
+
Store approval.
|
|
252
|
+
|
|
202
253
|
## Building an App
|
|
203
254
|
|
|
204
255
|
### Step 1: Define the config
|
|
205
256
|
|
|
206
257
|
Create `notis.config.ts` with:
|
|
207
|
-
- **name** --
|
|
258
|
+
- **name** -- Stable machine identity in lowercase kebab-case, such as `link-building`; do not use display casing here
|
|
259
|
+
- **title** -- Human-facing app name with deliberate casing, such as `Link Building`; preserve brands and acronyms exactly
|
|
208
260
|
- **databases** -- Slug references to existing Notis databases
|
|
209
261
|
- **routes** -- Route-first sidebar entries with explicit `slug`, optional `parentSlug`, and optional `collection.sidebar` tree config
|
|
210
262
|
- **tools** -- Final tool names the app can call at runtime. Use the shared discovery flow (`COMPOSIO_SEARCH_TOOLS`, then `COMPOSIO_GET_TOOL_SCHEMAS`) while building the app, and copy the returned final names into this list. Examples include `LOCAL_NOTIS_DATABASE_QUERY`, `LOCAL_NOTIS_MONID_RUN`, `GMAIL_SEND_EMAIL`, `LOCAL_POSTFORME_CREATE_POST`, and `LOCAL_MCP_<SERVER>_<TOOL>`. App code calls each declared name directly through `useTool`; it does not wrap provider or MCP calls in `COMPOSIO_MULTI_EXECUTE_TOOL`. Access stays scoped to the signed-in user's own connections, native database tools stay scoped to the app's databases unless `capabilities.workspaceDatabases: 'read'` is granted, and metered tools use the CLI-equivalent credit-cap and fail-closed usage-billing path.
|
|
@@ -234,6 +286,8 @@ routes: [
|
|
|
234
286
|
|
|
235
287
|
Use the same page template for the root Notes route and collection/sub-collection detail states. The portal sidebar injects live collection items under the static route row when `collection.sidebar.mode === 'tree'`.
|
|
236
288
|
|
|
289
|
+
For arbitrary app-owned resources that are not Notis collection rows, set `resourceDeepLinks: true` on the route. Read the decoded `?resource=` identifier from `useNotis().resourceId`, and link between routes with `toRoute('/inbox', { resourceId })`. Keep collection links on `?item=`. Publish external preview/source links as the resource `url`; the host separately supplies the exact Notis review link as `active_resource.view_url` for opted-in routes. Handle missing or deleted identifiers with a safe view-level fallback.
|
|
290
|
+
|
|
237
291
|
### Step 2: Build pages
|
|
238
292
|
|
|
239
293
|
Standard React pages in `app/`. Use generic SDK tool hooks for data and build on top of the scaffolded shadcn components and portal shell classes (`notis-app-shell`, `notis-app-surface`):
|
|
@@ -341,7 +395,7 @@ Generated by `npx --package @notis_ai/cli@latest -- notis apps build` at `.notis
|
|
|
341
395
|
{
|
|
342
396
|
"version": 1,
|
|
343
397
|
"spec_version": 4,
|
|
344
|
-
"app": { "name": "My App", "description": "...", "icon": "phosphor:..." },
|
|
398
|
+
"app": { "name": "My App", "slug": "my-app", "title": "My App", "description": "...", "icon": "phosphor:..." },
|
|
345
399
|
"routes": [
|
|
346
400
|
{
|
|
347
401
|
"path": "/",
|
|
@@ -444,10 +498,10 @@ already installs `ShortcutProvider`; app code should not add a second provider.
|
|
|
444
498
|
|
|
445
499
|
| API | Signature | Description |
|
|
446
500
|
|-----|-----------|-------------|
|
|
447
|
-
| `useNotis()` | `() => { app, route,
|
|
501
|
+
| `useNotis()` | `() => { app, route, databases, collectionItem, resourceId, ready }` | App metadata, current route, selected collection item, decoded exact-resource id, ready state |
|
|
448
502
|
| `useTool<TArgs, TResult>(name)` | `(name: string) => { call, loading, error }` | Call a declared tool with app-defined argument/result types. Identical idempotent reads may use `call(args, { dedupe: true })`; never dedupe writes |
|
|
449
503
|
| `useTools()` | `() => { tools, loading }` | List available tools |
|
|
450
|
-
| `useNotisNavigation()` | `() => { toRoute, toDocument, toApp }` | Navigate between routes, documents, or the app root |
|
|
504
|
+
| `useNotisNavigation()` | `() => { toRoute, toDocument, toApp }` | Navigate between routes (including `toRoute(path, { resourceId })`), documents, or the app root |
|
|
451
505
|
| `useTopBarSearch(opts)` | `({ value, onChange, placeholder?, onSubmit? }) => { setLoading }` | Bind the current view to the Portal-owned top-bar search input |
|
|
452
506
|
| `useBackend()` | `() => { request }` | Raw backend request proxy with JWT auth |
|
|
453
507
|
| `useDatabaseSubscription(slug, opts?)` | `(slug: string, opts?) => { rows, documents, loading, error, refetch, live }` | Query a database and refetch it when its rows change. `live` is false on hosts without a change feed (dev harness, vite preview) -- keep a manual refresh for those |
|
|
@@ -503,24 +557,34 @@ const result = await queryTasks.call({ database_id: 'tasks-db-id', query: { page
|
|
|
503
557
|
|
|
504
558
|
## Development Modes
|
|
505
559
|
|
|
560
|
+
### Hosted sandbox development
|
|
561
|
+
|
|
562
|
+
Do not run `apps dev` in a hosted sandbox. The sandbox filesystem is not on the
|
|
563
|
+
user's computer, so Desktop cannot mount it. Bootstrap sandbox `agent-browser`,
|
|
564
|
+
then build and verify before any remote mutation. For a create or edit request,
|
|
565
|
+
unless the user explicitly says preview-only, read-only, or no-deploy, resolve
|
|
566
|
+
one exact identity, safely materialize only missing or changed database schemas,
|
|
567
|
+
deploy, read back the exact app id/version, run live verification, and return
|
|
568
|
+
the exact Portal URL. Inspection, review, and diagnosis remain read-only.
|
|
569
|
+
|
|
506
570
|
### Canonical local development
|
|
507
571
|
|
|
508
572
|
```bash
|
|
509
573
|
npx --package @notis_ai/cli@latest -- notis apps dev
|
|
510
574
|
```
|
|
511
575
|
|
|
512
|
-
Runs the real desktop-local development workflow. The CLI should discover all apps in the target workspace
|
|
576
|
+
Runs the real desktop-local development workflow. The CLI should discover all apps in the target workspace and serve their bundles from loopback. Unpublished apps appear in the Electron Portal's Workspace group; linked apps substitute their installed entry only when the local `notisAppVersion` is strictly greater than the installed `release_version`.
|
|
513
577
|
|
|
514
578
|
## Testing
|
|
515
579
|
|
|
516
580
|
1. **Build validation**: `npx --package @notis_ai/cli@latest -- notis apps build` must succeed without errors. Vite surfaces TypeScript and bundling errors during this step.
|
|
517
|
-
2. **Headless render verification** (recommended after every build): run `npx --package @notis_ai/cli@latest -- notis apps verify`. It builds unless `--skip-build` is passed, spins up a loopback harness, drives `agent-browser` against every route, and reports per-route pass/fail with captured render errors and runtime calls.
|
|
518
|
-
3. **Local development acceptance**: Run `notis apps dev [folder]` once to register the root, then verify each signed-in Desktop instance independently
|
|
519
|
-
4. **Post-deploy**:
|
|
581
|
+
2. **Headless render verification** (recommended after every build): run `npx --package @notis_ai/cli@latest -- notis apps verify` locally. In a hosted sandbox, first run `npm exec --yes --package agent-browser@latest -- agent-browser install`, then run `npx --yes --package @notis_ai/cli@latest --package agent-browser@latest -- notis apps verify`. It builds unless `--skip-build` is passed, spins up a loopback harness, drives `agent-browser` against every route, and reports per-route pass/fail with captured render errors and runtime calls.
|
|
582
|
+
3. **Local development acceptance**: Run `notis apps dev [folder]` once to register the root, then verify each signed-in Desktop instance independently. For an unpublished app, expect one DEV-badged Workspace row. For a linked app, first confirm local `notisAppVersion` is strictly greater than installed `release_version`, then expect one substituted DEV-badged row; equal or lower must keep the online row and bundle. Verify the default route renders and live edits appear without restarting the CLI or Desktop. Use `notis apps roots list` as the persistence proof. Loopback bundle health alone does not prove that an authenticated instance mounted or rendered the app.
|
|
583
|
+
4. **Post-deploy**: Read back the exact app id, version, and `portal_url` with `apps list --json`, run `apps verify --mode live`, verify the deployed bundle via `/portal_views/get` -> `runtime_descriptor.bundle.js_url`, and return that profile-appropriate exact Portal URL. A confirmed deploy followed by failed readback is deployed but not remotely verified; a failed live check is deployed but live verification failed. The portal renders app bundles directly as React components, so navigate to the app page when an authenticated browser is available.
|
|
520
584
|
|
|
521
585
|
### Headless harness verification
|
|
522
586
|
|
|
523
|
-
Run `npx --package @notis_ai/cli@latest -- notis apps verify` after `npx --package @notis_ai/cli@latest -- notis apps build`. Use `--mode live` after deploy to exercise the real `/portal_views/runtime_query` with the CLI JWT instead of stub data; live mode also fails a route whose runtime calls all errored, which a well-behaved error state would otherwise hide.
|
|
587
|
+
Run `npx --package @notis_ai/cli@latest -- notis apps verify` after `npx --package @notis_ai/cli@latest -- notis apps build`. Use `--mode live` after deploy to exercise the real `/portal_views/runtime_query` with the CLI JWT instead of stub data; live mode also fails a route whose runtime calls all errored, which a well-behaved error state would otherwise hide. In a hosted sandbox, put `agent-browser` on the verification process's `PATH` with the combined-package command above. `--no-browser` only prints URLs for manual triage and does not satisfy the automated deployment gate.
|
|
524
588
|
|
|
525
589
|
#### What the harness catches that `npx --package @notis_ai/cli@latest -- notis apps build` does not
|
|
526
590
|
|
|
@@ -544,6 +608,6 @@ Run `npx --package @notis_ai/cli@latest -- notis apps verify` after `npx --packa
|
|
|
544
608
|
authenticated API available. Do not bypass DEV-app promotion or installed-app
|
|
545
609
|
identity with a direct database/storage write.
|
|
546
610
|
- **App shows old code after deploy**: Bundle cache is stale. Hard refresh (Cmd+Shift+R) or clear site data in DevTools.
|
|
547
|
-
- **App is missing from the sidebar**: Run `apps roots list`, confirm the app is at the root, one direct child, or `apps/*`, and confirm its first build succeeds. Restarting Desktop reattaches the same persistent roots; no terminal process or manual sidebar action is required.
|
|
611
|
+
- **App is missing from the sidebar**: Run `apps roots list`, confirm the app is at the root, one direct child, or `apps/*`, and confirm its first build succeeds. For a linked app, compare `package.json` `notisAppVersion` with the installed manifest's `release_version`: equal, lower, missing, or invalid intentionally keeps the online app without a DEV badge. If source is stale, preserve any local edits, run `apps pull <app-id> <dir> --force` to refresh it, then increment `notisAppVersion` before continuing development. Restarting Desktop reattaches the same persistent roots; no terminal process or manual sidebar action is required.
|
|
548
612
|
- **`LOCAL_NOTIS_DATABASE_QUERY` returns empty documents**: Check that the database ID passed to the tool matches the intended database. Use `npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_LIST_DATABASES --arguments '{}'` to verify the ID; use the database slug only as a fallback.
|
|
549
613
|
- **Properties are `undefined`**: Keep app-local result types for `useTool<TArgs, TResult>` and guard optional nested properties when reading live data.
|
|
@@ -73,43 +73,99 @@ Treat the Notis CLI the same way you would treat a Composio-style tool router fl
|
|
|
73
73
|
|
|
74
74
|
## Section 1: Developing Notis Apps
|
|
75
75
|
|
|
76
|
-
Use this section when the goal is to create or update a Notis app from a local
|
|
76
|
+
Use this section when the goal is to create or update a Notis app from a local
|
|
77
|
+
workspace or a hosted sandbox.
|
|
77
78
|
|
|
78
|
-
Notis apps are Vite + React projects using `@notis/sdk`.
|
|
79
|
+
Notis apps are Vite + React projects using `@notis/sdk`. After init or pull and editing, choose one terminal branch: local Desktop uses `dev → build → verify → user approval → deploy`; hosted sandbox uses `build → verify → identity/schema reconciliation → deploy`; Store submission is a later, separately confirmed action.
|
|
79
80
|
|
|
80
81
|
Important: `deploy` only updates the installed app artifact for the current user or team. Store submission is a separate, user-gated step. After the user explicitly confirms that the current App Details page and Store listing are ready, `apps publish --confirm-ready` submits the matching deployed version through the backend review flow.
|
|
81
82
|
|
|
83
|
+
Choose the execution path before changing the app:
|
|
84
|
+
|
|
85
|
+
- **Hosted sandbox**: a sandbox instruction or `/vercel/sandbox` working tree
|
|
86
|
+
proves that Desktop cannot mount the source. Do not run `apps dev`. A create
|
|
87
|
+
or edit request authorizes `apps deploy` after `apps build` and automated
|
|
88
|
+
`apps verify` pass unless the user explicitly requests preview-only,
|
|
89
|
+
read-only, or no deployment; inspection, review, and diagnosis stay
|
|
90
|
+
read-only. `apps pull <app-id>` links an existing app. Test before any remote
|
|
91
|
+
mutation. If an opt-out applies, stop there without create/link, database
|
|
92
|
+
mutation, deploy, or post-deploy checks. Otherwise, for a new unlinked app,
|
|
93
|
+
compare profile state and `apps list --json` with the canonical
|
|
94
|
+
`notis.config.ts` `name` and intended personal/team scope: link one exact
|
|
95
|
+
editable non-development match after a metadata-only (`include_documents:
|
|
96
|
+
false`) detail read proves scope, fail on any ambiguity/development
|
|
97
|
+
collision/scope mismatch, or create only on zero exact matches. Default new
|
|
98
|
+
apps to personal scope unless the user explicitly asks for team scope. Prove
|
|
99
|
+
canonicalizing the config title yields its name. For personal creation, run
|
|
100
|
+
`apps create "<canonical-config-title>" . --json` exactly once. For explicit
|
|
101
|
+
team scope, discover/describe and dry-run `LOCAL_NOTIS_CREATE_APP`, execute it
|
|
102
|
+
exactly once with team visibility and verified current team scope, verify the
|
|
103
|
+
returned identity/scope, and link that exact id. In a fresh sandbox, install Agent Browser with `npm exec --yes --package
|
|
104
|
+
agent-browser@latest -- agent-browser install` and run verification through
|
|
105
|
+
`npx --yes --package @notis_ai/cli@latest --package agent-browser@latest --
|
|
106
|
+
notis apps verify`. Read back the exact app id/version and Portal URL with `apps list --json`, run
|
|
107
|
+
the same combined command with `apps verify --mode live`, and return the exact
|
|
108
|
+
Portal URL. Stop before deployment on test failure and before retry on an
|
|
109
|
+
outcome-unknown create or deploy.
|
|
110
|
+
- **Local computer**: run `apps dev`, let the user test the DEV-badged app, and
|
|
111
|
+
deploy that development identity directly only after the user explicitly
|
|
112
|
+
asks; never run `apps create` after `apps dev`.
|
|
113
|
+
|
|
82
114
|
### App development workflow
|
|
83
115
|
|
|
84
116
|
1. Scaffold a new app (every published Store app is a scaffold; `notis apps scaffolds list [--search <term>]` lists them from the public registry, and `--from <slug>` downloads that app's source):
|
|
85
117
|
- `npx --package @notis_ai/cli@latest -- notis apps init ["My App"] [--from <slug>]`
|
|
86
|
-
2. Or pull an existing app's source to edit it
|
|
118
|
+
2. Or pull an existing app's source to edit it (the project is linked automatically):
|
|
87
119
|
- `npx --package @notis_ai/cli@latest -- notis apps pull <app-id>`
|
|
88
|
-
- then run `npm install`, `
|
|
89
|
-
3.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
120
|
+
- then run `npm install`, increment `notisAppVersion`, and edit
|
|
121
|
+
3. **Local Desktop branch:** run `apps dev` for live testing, confirm the DEV
|
|
122
|
+
app and root/mount acceptance checks, then run `apps build` and `apps verify`.
|
|
123
|
+
Let the user test the DEV app and stop for explicit user approval. When
|
|
124
|
+
approved, run exactly one `apps deploy` to promote the existing `dev_app_id`
|
|
125
|
+
(or update the already linked app), then read it back. Never run `apps create`
|
|
126
|
+
after `apps dev`.
|
|
127
|
+
4. **Hosted sandbox branch:** bootstrap Agent Browser as described above, then
|
|
128
|
+
run `apps build` followed by the automated hosted `apps verify`. If automatic
|
|
129
|
+
deployment is opted out, stop after those tests with no app create/link,
|
|
130
|
+
database mutation, deploy, or post-deploy check. Otherwise, for a new hosted
|
|
131
|
+
app, reconcile `.notis/state.json` and `apps list --json` against
|
|
132
|
+
the canonical config `name` and intended scope (personal by default; team
|
|
133
|
+
only when explicitly requested). Include
|
|
134
|
+
development rows as collision checks. Link one exact editable non-dev match
|
|
135
|
+
only after a metadata-only (`include_documents: false`) exact app detail
|
|
136
|
+
proves scope; fail on multiple/scope mismatch, or create only on zero. Prove
|
|
137
|
+
canonicalize(config title) equals config name. For personal creation, run
|
|
138
|
+
`apps create "<canonical-config-title>" . --json` exactly once and verify id,
|
|
139
|
+
slug, edit permission, and personal scope. For explicit team scope, discover
|
|
140
|
+
and describe `LOCAL_NOTIS_CREATE_APP`, dry-run it, then execute it exactly once
|
|
141
|
+
with the canonical title, team visibility, and verified current team scope;
|
|
142
|
+
verify id/slug/team scope/edit permission and `apps link` that exact id. Then
|
|
143
|
+
compare declared databases, mutate only
|
|
144
|
+
missing/changed backward-compatible schemas with ownership proof, run exactly
|
|
145
|
+
one `apps deploy`, and read back id/version/Portal URL before live verify.
|
|
146
|
+
5. Check project health:
|
|
102
147
|
- `npx --package @notis_ai/cli@latest -- notis apps doctor`
|
|
103
|
-
|
|
148
|
+
6. Only after the user explicitly approves the current Store preview, submit the deployed version:
|
|
104
149
|
- `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`
|
|
105
150
|
|
|
106
151
|
### App development rules
|
|
107
152
|
|
|
108
153
|
- Always `build` before `deploy`; run `verify` before deploy when validating an app change.
|
|
154
|
+
- Never run `apps dev` in a hosted sandbox. Deploy every successfully verified
|
|
155
|
+
sandbox app create or edit unless explicitly told preview-only, read-only, or
|
|
156
|
+
no-deploy, then prove the remote id/version and live runtime. Other app tasks
|
|
157
|
+
do not authorize mutation.
|
|
158
|
+
- Deploy does not create databases. Compare first; materialize only missing or
|
|
159
|
+
changed hosted-app schemas, and verify exact ownership before an update.
|
|
160
|
+
- Build and verify before hosted app creation or database mutation. Only
|
|
161
|
+
backward-compatible schema expansion may happen before deployment.
|
|
162
|
+
- In hosted sandboxes, bootstrap `agent-browser` and include its package on the
|
|
163
|
+
verification command's `PATH`; `--no-browser` is not a passing automated gate.
|
|
164
|
+
- Never deploy a local Desktop edit until the user tests the DEV app and asks.
|
|
109
165
|
- Prefer `npx --package @notis_ai/cli@latest -- notis apps deploy` for the first deploy of a project already run with `apps dev`; it promotes the development app in place.
|
|
110
166
|
- Link before `deploy`, or pass `--app-id <id>` when intentionally deploying without writing local link state.
|
|
111
167
|
- Use `npx --package @notis_ai/cli@latest -- notis apps doctor` to diagnose configuration or dependency issues.
|
|
112
|
-
- Use `npx --package @notis_ai/cli@latest -- notis apps list` to discover
|
|
168
|
+
- Use `npx --package @notis_ai/cli@latest -- notis apps list --json` to discover exact slugs, permissions, versions, and Portal links before linking and after deployment; use a metadata-only (`include_documents: false`) exact app-detail read to prove personal/team scope without materializing databases.
|
|
113
169
|
- Never treat deploy approval as Store approval. Set visibility to Team or Public first, then run `apps publish --confirm-ready` only after the user explicitly confirms the current App Details page and Store listing.
|
|
114
170
|
- `apps publish --confirm-ready` submits the deployed snapshot through the same backend review flow as App Details. It must reject missing confirmation, incomplete listing media, a local/deployed version mismatch, private visibility, or an existing pending review.
|
|
115
171
|
|
|
@@ -134,14 +190,16 @@ If the task is specifically about app structure, runtime behavior, or database/v
|
|
|
134
190
|
|
|
135
191
|
## IMPORTANT: When NOT to use tool access for app development
|
|
136
192
|
|
|
137
|
-
When building or deploying a Notis app, do NOT use `npx --package @notis_ai/cli@latest -- notis tools exec` for
|
|
193
|
+
When building or deploying a Notis app, do NOT use `npx --package @notis_ai/cli@latest -- notis tools exec` for app file operations:
|
|
138
194
|
|
|
139
|
-
- Creating databases -- declare them in `notis.config.ts` instead
|
|
140
195
|
- Loading or saving app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` and `npx --package @notis_ai/cli@latest -- notis apps deploy`
|
|
141
196
|
- Linting app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` which validates automatically
|
|
142
197
|
- Managing app routes -- write standard Vite + React pages in `app/`, not raw JS files
|
|
143
198
|
|
|
144
|
-
|
|
199
|
+
Database schemas are the exception: declaring a slug in `notis.config.ts` does
|
|
200
|
+
not create it. Use the discovery-first native database tool workflow to
|
|
201
|
+
create/update and read back each app-owned schema before deployment. Tool calls
|
|
202
|
+
are also valid for testing runtime behavior after deployment.
|
|
145
203
|
|
|
146
204
|
## Section 2: Accessing Tools Through the Notis CLI
|
|
147
205
|
|
package/package.json
CHANGED
package/skills/notis-apps/cli.md
CHANGED
|
@@ -118,7 +118,7 @@ Examples:
|
|
|
118
118
|
|
|
119
119
|
Register a development root and connect its apps to the shared local development host.
|
|
120
120
|
|
|
121
|
-
When to use: Run this once for any folder that should be watched permanently. The folder itself, direct child apps, and apps/* are discovered automatically by every signed-in Notis Desktop instance.
|
|
121
|
+
When to use: Run this once for any folder that should be watched permanently. The folder itself, direct child apps, and apps/* are discovered automatically by every signed-in Notis Desktop instance. A linked app substitutes its online bundle only when local notisAppVersion is strictly greater than the installed release.
|
|
122
122
|
|
|
123
123
|
Options:
|
|
124
124
|
- `--port <number>` — Local bundle server port (default: 5173).
|
|
@@ -218,7 +218,7 @@ Examples:
|
|
|
218
218
|
|
|
219
219
|
Download a Notis app source snapshot into a local project folder.
|
|
220
220
|
|
|
221
|
-
When to use: Edit an installed app locally.
|
|
221
|
+
When to use: Edit an installed app locally. Preserve any local edits, pull and link the latest persisted source, then increment package.json notisAppVersion above that release before notis apps dev; continue with build and deploy.
|
|
222
222
|
|
|
223
223
|
Options:
|
|
224
224
|
- `--force` — Overwrite a non-empty target directory.
|