@notis_ai/cli 0.2.0-beta.155.1 → 0.2.0-beta.157.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 (47) hide show
  1. package/README.md +11 -45
  2. package/config/notis_app_design_rules.json +135 -0
  3. package/dist/agent-hooks/notis-agent-hook.mjs +5180 -7281
  4. package/dist/base-skills/notis-apps/SKILL.md +141 -224
  5. package/dist/base-skills/notis-cli/SKILL.md +64 -131
  6. package/package.json +1 -2
  7. package/skills/notis-apps/cli.md +34 -95
  8. package/skills/notis-cli/AGENT_INSTRUCTIONS.md +1 -1
  9. package/src/command-specs/apps.js +326 -1562
  10. package/src/runtime/agent-browser.js +169 -1
  11. package/src/runtime/app-boundary-validator.js +221 -0
  12. package/src/runtime/app-platform.js +359 -233
  13. package/src/runtime/app-test-server.js +292 -0
  14. package/template/app/page.tsx +47 -45
  15. package/template/components/page-heading.tsx +23 -0
  16. package/template/components/ui/badge.tsx +7 -4
  17. package/template/components/ui/card.tsx +24 -11
  18. package/template/components/ui/native-select.tsx +24 -0
  19. package/template/notis.config.ts +0 -1
  20. package/template/package.json +2 -2
  21. package/template/packages/sdk/package.json +1 -2
  22. package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +62 -8
  23. package/template/packages/sdk/src/components/Skeleton.tsx +24 -0
  24. package/template/packages/sdk/src/config.ts +0 -2
  25. package/template/packages/sdk/src/hooks/useCloudComputer.ts +15 -48
  26. package/template/packages/sdk/src/hooks/useDatabaseSchema.ts +17 -53
  27. package/template/packages/sdk/src/hooks/useDatabaseSubscription.ts +2 -2
  28. package/template/packages/sdk/src/hooks/useDocument.ts +12 -47
  29. package/template/packages/sdk/src/hooks/useDocuments.ts +18 -58
  30. package/template/packages/sdk/src/hooks/useQuery.ts +71 -0
  31. package/template/packages/sdk/src/hooks/useToolQuery.ts +12 -0
  32. package/template/packages/sdk/src/hooks/useTopBarSearch.ts +15 -7
  33. package/template/packages/sdk/src/index.ts +8 -0
  34. package/template/packages/sdk/src/interactions.ts +2 -1
  35. package/template/packages/sdk/src/queryCache.ts +162 -0
  36. package/template/packages/sdk/src/runtime.ts +5 -0
  37. package/template/packages/sdk/src/styles.css +28 -1
  38. package/src/runtime/app-dev-build-supervisor.js +0 -47
  39. package/src/runtime/app-dev-build.js +0 -41
  40. package/src/runtime/app-dev-consumers.js +0 -154
  41. package/src/runtime/app-dev-host-lock.js +0 -80
  42. package/src/runtime/app-dev-process-identity.js +0 -111
  43. package/src/runtime/app-dev-roots.js +0 -284
  44. package/src/runtime/app-dev-server.js +0 -1136
  45. package/src/runtime/app-dev-sessions.js +0 -185
  46. package/src/runtime/cli-mode.generated.js +0 -5
  47. package/src/runtime/cli-mode.js +0 -34
@@ -71,122 +71,57 @@ This is especially important when:
71
71
 
72
72
  Treat the Notis CLI the same way you would treat a Composio-style tool router flow: discover what is available first, then execute the right tool through the CLI.
73
73
 
74
- ## Section 1: Developing Notis Apps
75
-
76
- Use this section when the goal is to create or update a Notis app from a local
77
- workspace or a hosted sandbox.
78
-
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.
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.
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
-
114
- ### App development workflow
115
-
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):
117
- - `npx --package @notis_ai/cli@latest -- notis apps init ["My App"] [--from <slug>]`
118
- 2. Or pull an existing app's source to edit it (the project is linked automatically):
119
- - `npx --package @notis_ai/cli@latest -- notis apps pull <app-id>`
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:
147
- - `npx --package @notis_ai/cli@latest -- notis apps doctor`
148
- 6. Only after the user explicitly approves the current Store preview, submit the deployed version:
149
- - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready`
150
-
151
- ### App development rules
152
-
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.
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.
166
- - Link before `deploy`, or pass `--app-id <id>` when intentionally deploying without writing local link state.
167
- - Use `npx --package @notis_ai/cli@latest -- notis apps doctor` to diagnose configuration or dependency issues.
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.
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.
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.
171
-
172
- ### App development command reference
173
-
174
- - `npx --package @notis_ai/cli@latest -- notis apps list` -- list accessible apps
175
- - `npx --package @notis_ai/cli@latest -- notis apps init` -- scaffold a new Vite + React + `@notis/sdk` project
176
- - `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir] [--force] [--source-version <n>]` -- download the persisted source snapshot for an installed app and link the local directory to that app/version; legacy apps must be redeployed once with the current CLI before they can be pulled
177
- - `npx --package @notis_ai/cli@latest -- notis apps dev` -- discover local apps, register desktop-local dev sessions, and load them as DEV-badged Workspace rows in the Electron Portal
178
- - `npx --package @notis_ai/cli@latest -- notis apps build` -- compile the production artifact
179
- - `npx --package @notis_ai/cli@latest -- notis apps verify` -- headless render-smoke packaged routes before deploy
180
- - `npx --package @notis_ai/cli@latest -- notis apps create` -- create a fresh remote app and optionally link the local project
181
- - `npx --package @notis_ai/cli@latest -- notis apps link` -- associate the project with a remote app
182
- - `npx --package @notis_ai/cli@latest -- notis apps deploy` -- upload the artifact and editable source snapshot to the linked installed app in Notis
183
- - `npx --package @notis_ai/cli@latest -- notis apps deploy --direct` -- deploy directly to Supabase storage, bypassing the backend server (auto-fallback when server is down)
184
- - `npx --package @notis_ai/cli@latest -- notis apps publish --confirm-ready` -- submit the matching deployed version for Team or Public Store review after explicit user confirmation
185
- - `npx --package @notis_ai/cli@latest -- notis apps doctor` -- run project diagnostics
186
-
187
- App Details remains the visual review surface and offers the same Publish/Update action. The CLI command is for agents completing an already approved submission; it does not weaken the separate confirmation gate.
188
-
189
- If the task is specifically about app structure, runtime behavior, or database/view packaging, pair this skill with the `notis-apps` skill. Use `notis-cli` for the command workflow and `notis-apps` for the product/runtime contract.
74
+ ## Release-only delivery
75
+
76
+ Workspace runs released app versions only. Local and cloud agents use the same workflow.
77
+ A request to create or edit app source authorizes updating that app in Workspace after checks pass.
78
+ Explicit read-only, preview-only or no-deploy requests stop at local artifacts and checks: no remote
79
+ app/resource creation or mutation, Workspace preview, deployment or live verification. Store
80
+ publication always needs separate explicit approval.
81
+
82
+ 1. Inspect the effective CLI profile and the exact app's current version with `apps list --json`.
83
+ For an existing released app, preserve local edits and pull its exact app ID into the intended
84
+ directory. Retain the profile/app link, deployment version and revision. An unreleased container
85
+ has no source to pull: recover its original local source and edits, or scaffold locally only if
86
+ that source cannot be recovered. Confirm its exact ID, edit permission and personal/team scope,
87
+ then run `apps link <app-id> <source-directory> --expected-version 0` to resume that same container.
88
+ If a release has appeared, preserve local source separately, pull the current release into a fresh
89
+ directory and reapply the intended edits. The link guard compares against the same remote read
90
+ whose version/revision it saves; deploy still rejects a release racing after that read. Do not pull
91
+ missing source or create another remote app to recover a failed first release.
92
+ 2. Scaffold a new app locally, or edit the pulled source. Run `apps build` and automated
93
+ `apps verify` before new remote creation. Missing browser tooling or failed checks blocks delivery;
94
+ printed URLs and `--no-browser` are not passing verification. Install browser tooling with
95
+ `npm exec --yes --package agent-browser@latest -- agent-browser install`; if needed run
96
+ `npx --yes --package @notis_ai/cli@latest --package agent-browser@latest -- notis apps verify`.
97
+ 3. Reconcile `apps list --json` and the exact intended name/slug, edit permission and personal/team
98
+ scope. Default to personal only when no team was requested. Reuse a matching editable identity;
99
+ stop on ambiguous matches or conflicting identity/scope. Create only when none exists, using
100
+ `apps create "<exact app name>" .` (or `--team-id <verified team ID>`). Read back the same ID.
101
+ A failed first release leaves a container: reuse it, never duplicate or automatically delete it.
102
+ 4. Compare existing app-owned schemas. Create only necessary missing databases against that exact
103
+ app ID. Change existing schemas by verified database ID and ownership, and only with backward-
104
+ compatible changes before release. Read back each change. Breaking changes need separate coordination.
105
+ Ordinary note/record edits and existing resource editors remain immediate.
106
+ 5. Run `apps deploy` against the same linked app. It builds, verifies a frozen source/artifact
107
+ snapshot with stubs, then sends that snapshot to the backend. `--skip-build` accepts only unchanged,
108
+ valid output and still verifies. Do not bypass the backend or create implicitly on deploy.
109
+ 6. Read back the exact installed app ID, integer version and Portal URL with `apps list --json`.
110
+ Run `apps verify --mode live` and open the installed app in the actual Portal for surface proof.
111
+ A live harness check alone does not prove the deployed bundle rendered in Portal.
112
+ 7. Report **failed before activation**, **deployed but unverified**, or **outcome unknown** accurately.
113
+ Never blindly replay an uncertain create/deploy response; reconcile its exact identity/version first.
114
+ `apps publish --confirm-ready` is **Publish to Store**, separately approved and listing-gated.
115
+ Workspace delivery is **Update app**, with no Store screenshot/readiness requirement.
116
+
117
+ ### Restore historical source as a new release
118
+
119
+ Pull the current release into a fresh checkout first. Retrieve historical source into a different
120
+ folder (`apps pull <id> <historical-dir> --source-version <n>`). Replace source in the current checkout
121
+ without replacing its `.notis` profile/app link or deployment base. Update `package.json`'s
122
+ `notisAppVersion`, check compatibility with current resources, build, verify and deploy as a new
123
+ release. Preserve app/database/skill IDs. Never decrement the deployment counter, rewrite snapshots,
124
+ or claim to undo user data or external actions.
190
125
 
191
126
  ## IMPORTANT: When NOT to use tool access for app development
192
127
 
@@ -366,23 +301,21 @@ workspace it belongs to, or to switch to a real account profile.
366
301
 
367
302
  ### Deploy fails with "network_error" or "fetch failed"
368
303
 
369
- The CLI defaults to the live Notis API (`https://api.notis.ai`, or
370
- `https://api-beta.notis.ai` when the signed-in user is on beta). Solutions:
304
+ Run `notis doctor` to verify the effective profile and endpoint. Read back the exact app ID,
305
+ version and release state before retrying. An uncertain network response is not proof of rollback.
306
+ There is no direct storage deployment path. Repair authentication when needed without changing the
307
+ intended profile, then reconcile the previous outcome before starting a new release.
371
308
 
372
- 1. Run `npx --package @notis_ai/cli@latest -- notis doctor` and confirm `api_base` is a live Notis host
373
- 2. Use `--direct` for app deploys when you only need Supabase storage upload: `npx --package @notis_ai/cli@latest -- notis apps deploy --direct`
374
- 3. If auth looks stale, run `npx --package @notis_ai/cli@latest -- notis login` and retry
309
+ Localhost backends are a Notis-developer test lane owned by `./dev.sh` and its lease-backed profile.
310
+ Do not silently switch between that lane and a live account.
375
311
 
376
- Localhost backends are a Notis-developer test lane only. Do not retarget the CLI at loopback from this skill — that path is owned by `./dev.sh`, which exposes its own lease-backed `dev-*` profile.
312
+ ### Health or tool-roundtrip errors
377
313
 
378
- ### `npx --package @notis_ai/cli@latest -- notis doctor` shows health/tool_roundtrip errors
314
+ Local scaffold/build and stub verification can run without an API connection (dependencies and
315
+ browser tooling must already be available). `link`, `pull`, `create`, `list`, `deploy`, live verification
316
+ and Store operations require the intended backend. Never bypass it.
379
317
 
380
- The CLI health check pings the configured live API. App development commands that are `backend_call: local` (`init`, `build`, `verify`, `link`, `doctor`) work offline. `dev`, `pull`, `create`, `list`, and normal `deploy` need the live API; `deploy --direct` can bypass it when Supabase credentials are available.
318
+ ### Stale bundle in Portal after an update
381
319
 
382
- ### Stale bundle in the portal after deploy
383
-
384
- The portal caches app bundles by version. If you re-deploy to the same version, the portal may serve the cached old bundle. Solutions:
385
-
386
- 1. Hard refresh the portal page (Cmd+Shift+R)
387
- 2. Open browser DevTools > Application > Storage > Clear site data
388
- 3. The bundle cache key includes version number -- incrementing the version forces a fresh load
320
+ Every successful release gets a new integer deployment version. Read back that version, then use
321
+ normal refresh/navigation to load it. Never overwrite or decrement an existing deployment version.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notis_ai/cli",
3
- "version": "0.2.0-beta.155.1",
3
+ "version": "0.2.0-beta.157.1",
4
4
  "description": "Agent-first Notis CLI for apps and generic tool execution",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,7 +22,6 @@
22
22
  "prepack": "npm run build",
23
23
  "pretest": "npm run build",
24
24
  "release:prepare": "npm run build && node ./scripts/prepare-publish.js --apply",
25
- "cli:set-mode": "node ./scripts/set-cli-mode.js",
26
25
  "smoke": "node ./scripts/smoke-package.js",
27
26
  "test": "node --test --test-timeout=120000"
28
27
  },
@@ -2,56 +2,29 @@
2
2
 
3
3
  When running outside the Notis container, use the `notis` CLI to work with Notis Apps locally.
4
4
 
5
- Notis apps are Vite + React projects using `@notis/sdk`. The workflow is init, dev, build, verify, create/link, pull, deploy, and doctor.
6
-
7
- Important: `notis apps deploy` updates the linked installed app. It is not an app-store publishing flow.
8
-
9
- ## Setup
10
-
11
- Run `npx --package @notis_ai/cli@latest -- notis login` to authorize the CLI. Run commands through NPX, for example `npx --package @notis_ai/cli@latest -- notis apps list`.
12
-
13
- For CI, hosted agents, or internal scripts, pass a non-persisted token with `NOTIS_JWT=<token>` and use `--api-base <server-url>` when targeting a non-default server.
14
-
15
- ## Core Workflow
16
-
17
- 1. Scaffold a new app:
18
-
19
- ```bash
20
- npx --package @notis_ai/cli@latest -- notis apps init
21
- ```
22
-
23
- 2. Or pull an installed app's saved source snapshot:
24
-
25
- ```bash
26
- npx --package @notis_ai/cli@latest -- notis apps pull <app-id> ./my-app
27
- cd ./my-app
28
- npm install
29
- ```
30
-
31
- 3. Develop locally with live reload:
32
-
33
- ```bash
34
- npx --package @notis_ai/cli@latest -- notis apps dev
35
- ```
36
-
37
- 4. Build the production artifact:
38
-
39
- ```bash
40
- npx --package @notis_ai/cli@latest -- notis apps build
41
- ```
42
-
43
- 5. Verify the built artifact headlessly:
44
-
45
- ```bash
46
- npx --package @notis_ai/cli@latest -- notis apps verify
47
- ```
48
-
49
- 6. Link the project if it was not created or pulled from an app, then deploy:
50
-
51
- ```bash
52
- npx --package @notis_ai/cli@latest -- notis apps link <app-id>
53
- npx --package @notis_ai/cli@latest -- notis apps deploy
54
- ```
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.
9
+
10
+ ## Core workflow
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.
24
+
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.
55
28
 
56
29
  ## Commands
57
30
 
@@ -110,45 +83,12 @@ Create a new remote Notis app and optionally link a local project to it.
110
83
 
111
84
  When to use: Provision a fresh remote app before the first deploy. Pass a project directory to link it immediately.
112
85
 
113
- Examples:
114
- - `npx --package @notis_ai/cli@latest -- notis apps create "My App"`
115
- - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
116
-
117
- ### `npx --package @notis_ai/cli@latest -- notis apps dev [dir]`
118
-
119
- Register a development root and connect its apps to the shared local development host.
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. A linked app substitutes its online bundle only when local notisAppVersion is strictly greater than the installed release.
122
-
123
86
  Options:
124
- - `--port <number>` — Local bundle server port (default: 5173).
125
- - `--scratch` — Use isolated empty databases, bundled skills, and bundled automations for this session instead of the installed app's resources. For fixture work and destructive experiments.
126
- - `--live-data` — Deprecated: using the installed app's real resources is now the default. Accepted as a no-op; use `--scratch` for the old isolated behavior.
127
- - `--grant-cloud-shell` — Approve a cloudComputer: 'shell' declaration without the interactive prompt. The grant persists for this dev app; authorship alone never grants it.
128
-
129
- Examples:
130
- - `npx --package @notis_ai/cli@latest -- notis apps dev`
131
- - `npx --package @notis_ai/cli@latest -- notis apps dev ./my-app`
132
- - `npx --package @notis_ai/cli@latest -- notis apps dev ./workspace --port 5200`
133
- - `npx --package @notis_ai/cli@latest -- notis apps dev --scratch # isolated resources for fixture or schema experiments`
134
-
135
- ### `npx --package @notis_ai/cli@latest -- notis apps roots list`
136
-
137
- List persistent machine-local Notis app development roots.
138
-
139
- When to use: See which folders every local Notis Desktop instance watches for development apps.
87
+ - `--team-id <id>` — Create or reuse the exact team-scoped app (default: personal).
140
88
 
141
89
  Examples:
142
- - `npx --package @notis_ai/cli@latest -- notis apps roots list`
143
-
144
- ### `npx --package @notis_ai/cli@latest -- notis apps roots remove <folder>`
145
-
146
- Stop watching a registered Notis app development root.
147
-
148
- When to use: Remove a persistent development root. The built-in ~/.notis/apps root cannot be removed.
149
-
150
- Examples:
151
- - `npx --package @notis_ai/cli@latest -- notis apps roots remove ./old-apps`
90
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App"`
91
+ - `npx --package @notis_ai/cli@latest -- notis apps create "My App" .`
152
92
 
153
93
  ### `npx --package @notis_ai/cli@latest -- notis apps build [dir]`
154
94
 
@@ -210,15 +150,19 @@ Link a local project to a remote Notis app.
210
150
 
211
151
  When to use: Connect a local project to an existing app for deployment.
212
152
 
153
+ Options:
154
+ - `--expected-version <version>` — Link only if the remote deployment version still matches this non-negative integer.
155
+
213
156
  Examples:
214
157
  - `npx --package @notis_ai/cli@latest -- notis apps link abc123`
215
158
  - `npx --package @notis_ai/cli@latest -- notis apps link abc123 ./my-app`
159
+ - `npx --package @notis_ai/cli@latest -- notis apps link abc123 ./recovered-app --expected-version 0`
216
160
 
217
161
  ### `npx --package @notis_ai/cli@latest -- notis apps pull <app-id> [dir]`
218
162
 
219
163
  Download a Notis app source snapshot into a local project folder.
220
164
 
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.
165
+ When to use: Edit an installed app. Preserve local edits, pull and link its persisted source, then build, verify and deploy.
222
166
 
223
167
  Options:
224
168
  - `--force` — Overwrite a non-empty target directory.
@@ -230,20 +174,15 @@ Examples:
230
174
 
231
175
  ### `npx --package @notis_ai/cli@latest -- notis apps deploy [dir]`
232
176
 
233
- Build and upload the app to the linked Notis app.
177
+ Build, verify and release the linked Workspace app.
234
178
 
235
- When to use: Ship the installed app to production for the linked user/team app. A project that has only a development app is promoted in place on first deploy: same app id, same databases, dev markers removed. This command does not publish to the app store.
179
+ When to use: Build, verify and release the linked personal or team Workspace app. This command does not publish to the Store.
236
180
 
237
181
  Options:
238
182
  - `--app-id <id>` — Override linked app ID.
239
- - `--skip-build` — Skip the build step (use existing .notis/output/).
240
- - `--direct` — Explicitly upload to Supabase storage, bypassing the backend server.
183
+ - `--skip-build` — Reuse unchanged build output; automated verification still runs.
241
184
 
242
185
  Examples:
243
- - `npx --package @notis_ai/cli@latest -- notis apps deploy`
244
- - `npx --package @notis_ai/cli@latest -- notis apps deploy --skip-build`
245
- - `npx --package @notis_ai/cli@latest -- notis apps deploy --app-id abc123`
246
- - `npx --package @notis_ai/cli@latest -- notis apps deploy --direct`
247
186
 
248
187
  ### `npx --package @notis_ai/cli@latest -- notis apps publish [dir]`
249
188
 
@@ -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:** `notis apps init|pull|dev|build|verify|create|link|deploy|doctor`. For local testing, stop after `apps dev`. If deployment is explicitly requested, build and verify first. Store submission is separate: never run `apps publish --confirm-ready` without explicit approval of the current Store preview.
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.
28
28
 
29
29
  ### Rules
30
30