@notis_ai/cli 0.2.0-beta.156.1 → 0.2.0-beta.158.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.
- package/README.md +11 -45
- package/config/notis_app_design_rules.json +135 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +8893 -10612
- package/dist/base-skills/notis-apps/SKILL.md +25 -573
- package/dist/base-skills/notis-apps/references/architecture.md +147 -0
- package/dist/base-skills/notis-apps/references/design.md +154 -0
- package/dist/base-skills/notis-apps/references/release.md +93 -0
- package/dist/base-skills/notis-apps/references/sdk.md +60 -0
- package/dist/base-skills/notis-apps/references/troubleshooting.md +26 -0
- package/dist/base-skills/notis-cli/SKILL.md +19 -267
- package/dist/base-skills/notis-cli/references/app-delivery.md +18 -0
- package/dist/base-skills/notis-cli/references/native-databases.md +20 -0
- package/dist/base-skills/notis-cli/references/tool-examples.md +56 -0
- package/dist/base-skills/notis-cli/references/troubleshooting.md +39 -0
- package/dist/base-skills/notis-query/SKILL.md +13 -651
- package/dist/base-skills/notis-query/references/database-discovery.md +59 -0
- package/dist/base-skills/notis-query/references/documents.md +50 -0
- package/dist/base-skills/notis-query/references/query.md +543 -0
- package/dist/skill-sync/index.js +24 -7
- package/dist/skill-sync/index.js.map +4 -4
- package/dist/skill-sync-worker.mjs +2989 -0
- package/package.json +1 -2
- package/skills/notis-apps/cli.md +34 -95
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +1 -1
- package/src/cli.js +4 -0
- package/src/command-specs/apps.js +322 -1560
- package/src/command-specs/diagnostics.js +37 -0
- package/src/command-specs/skills.js +23 -5
- package/src/runtime/agent-browser.js +169 -1
- package/src/runtime/app-boundary-validator.js +221 -0
- package/src/runtime/app-platform.js +359 -233
- package/src/runtime/app-test-server.js +292 -0
- package/src/runtime/profiles.js +5 -2
- package/src/runtime/skill-sync/cloud-client.ts +2 -1
- package/src/runtime/skill-sync/index.ts +24 -6
- package/src/runtime/skill-sync/types.ts +2 -0
- package/src/runtime/skill-sync-service.js +109 -0
- package/src/skill-sync-worker-entry.js +2 -0
- package/src/skill-sync-worker.js +50 -0
- package/template/app/page.tsx +45 -44
- package/template/components/page-heading.tsx +23 -0
- package/template/components/ui/badge.tsx +7 -4
- package/template/components/ui/card.tsx +24 -11
- package/template/components/ui/native-select.tsx +24 -0
- package/template/notis.config.ts +0 -1
- package/template/package.json +2 -2
- package/template/packages/sdk/package.json +1 -2
- package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +55 -13
- package/template/packages/sdk/src/components/MultiSelectCheckbox.tsx +3 -1
- package/template/packages/sdk/src/config.ts +0 -2
- package/template/packages/sdk/src/hooks/useCollectionInteractions.ts +138 -28
- package/template/packages/sdk/src/hooks/useLongPressSelection.ts +79 -0
- package/template/packages/sdk/src/hooks/useMultiSelect.ts +2 -8
- package/template/packages/sdk/src/index.ts +3 -0
- package/template/packages/sdk/src/interactions/actions.ts +14 -1
- package/template/packages/sdk/src/interactions/shortcuts.tsx +79 -19
- package/template/packages/sdk/src/interactions/visibility.ts +13 -0
- package/template/packages/sdk/src/interactions.ts +5 -1
- package/template/packages/sdk/src/styles.css +28 -1
- package/src/runtime/app-dev-build-supervisor.js +0 -47
- package/src/runtime/app-dev-build.js +0 -41
- package/src/runtime/app-dev-consumers.js +0 -154
- package/src/runtime/app-dev-host-lock.js +0 -80
- package/src/runtime/app-dev-process-identity.js +0 -111
- package/src/runtime/app-dev-roots.js +0 -284
- package/src/runtime/app-dev-server.js +0 -1136
- package/src/runtime/app-dev-sessions.js +0 -185
- package/src/runtime/cli-mode.generated.js +0 -5
- package/src/runtime/cli-mode.js +0 -34
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notis_ai/cli",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.158.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
|
},
|
package/skills/notis-apps/cli.md
CHANGED
|
@@ -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`.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
- `--
|
|
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
|
|
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
|
|
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
|
|
177
|
+
Build, verify and release the linked Workspace app.
|
|
234
178
|
|
|
235
|
-
When to use:
|
|
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` —
|
|
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:**
|
|
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
|
|
package/src/cli.js
CHANGED
|
@@ -10,6 +10,7 @@ import { reportCliCommand } from './runtime/telemetry.js';
|
|
|
10
10
|
import { reconcileBaseSkillsBestEffort } from './runtime/base-skills.js';
|
|
11
11
|
import { detectedAgentIds } from './runtime/agent-setup.js';
|
|
12
12
|
import { withSkillSyncLock } from './runtime/sync-skills.js';
|
|
13
|
+
import { maybeInstallSkillSyncService } from './runtime/skill-sync-service.js';
|
|
13
14
|
import {
|
|
14
15
|
CHANNEL_SWITCH_ENV,
|
|
15
16
|
resolveChannelSwitch,
|
|
@@ -188,6 +189,9 @@ function attachSpec(program, parentMap, spec, specs, launchContext = {}) {
|
|
|
188
189
|
...launchContext,
|
|
189
190
|
});
|
|
190
191
|
process.exitCode = typeof exitCode === 'number' ? exitCode : 0;
|
|
192
|
+
if (process.exitCode === 0 && !['logout', 'agent-context', 'agent-capture'].includes(spec.command_path[0])) {
|
|
193
|
+
await maybeInstallSkillSyncService(runtime).catch(() => undefined);
|
|
194
|
+
}
|
|
191
195
|
await reportCliCommand({
|
|
192
196
|
spec,
|
|
193
197
|
runtime,
|