@notis_ai/cli 0.2.0-beta.19.1 → 0.2.0-beta.191.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 +421 -133
- package/bin/check-runtime.js +15 -0
- package/bin/notis.js +2 -0
- package/config/notis_app_boundary_rules.json +50 -0
- package/config/notis_app_design_rules.json +135 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +19299 -0
- package/dist/base-skills/notis-apps/SKILL.md +72 -0
- package/dist/base-skills/notis-apps/references/architecture.md +167 -0
- package/dist/base-skills/notis-apps/references/context.md +81 -0
- package/dist/base-skills/notis-apps/references/design.md +178 -0
- package/dist/base-skills/notis-apps/references/reading.md +89 -0
- package/dist/base-skills/notis-apps/references/release.md +145 -0
- package/dist/base-skills/notis-apps/references/sdk.md +63 -0
- package/dist/base-skills/notis-apps/references/troubleshooting.md +23 -0
- package/dist/base-skills/notis-cli/SKILL.md +154 -0
- package/dist/base-skills/notis-cli/references/app-delivery.md +18 -0
- package/dist/base-skills/notis-cli/references/intelligence.md +94 -0
- package/dist/base-skills/notis-cli/references/native-databases.md +21 -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 +67 -0
- package/dist/base-skills/notis-query/references/database-discovery.md +70 -0
- package/dist/base-skills/notis-query/references/documents.md +50 -0
- package/dist/base-skills/notis-query/references/query.md +543 -0
- package/{template/packages/notis-sdk → dist/sdk}/package.json +14 -4
- package/dist/sdk/src/agentContext.ts +36 -0
- package/dist/sdk/src/components/Dialog.tsx +46 -0
- package/dist/sdk/src/components/DocumentEditor.tsx +103 -0
- package/dist/sdk/src/components/Markdown.tsx +60 -0
- package/dist/sdk/src/components/MarkdownEditor.tsx +121 -0
- package/dist/sdk/src/components/MultiSelectActionBar.tsx +285 -0
- package/dist/sdk/src/components/MultiSelectCheckbox.tsx +97 -0
- package/dist/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
- package/dist/sdk/src/components/NotisCommentBoundary.tsx +172 -0
- package/dist/sdk/src/components/NotisSelectionBoundary.tsx +59 -0
- package/dist/sdk/src/components/ShortcutHints.tsx +56 -0
- package/dist/sdk/src/components/Skeleton.tsx +24 -0
- package/dist/sdk/src/config.ts +261 -0
- package/dist/sdk/src/documents.ts +256 -0
- package/dist/sdk/src/hooks/useActiveResource.ts +19 -0
- package/dist/sdk/src/hooks/useAgentContext.ts +23 -0
- package/dist/sdk/src/hooks/useCloudComputer.ts +64 -0
- package/dist/sdk/src/hooks/useCollectionInteractions.ts +838 -0
- package/dist/sdk/src/hooks/useDatabaseSchema.ts +49 -0
- package/dist/sdk/src/hooks/useDatabaseSubscription.ts +76 -0
- package/dist/sdk/src/hooks/useDocument.ts +43 -0
- package/dist/sdk/src/hooks/useDocuments.ts +84 -0
- package/dist/sdk/src/hooks/useHandover.ts +77 -0
- package/dist/sdk/src/hooks/useLongPressSelection.ts +79 -0
- package/dist/sdk/src/hooks/useMultiSelect.ts +95 -0
- package/{template/packages/notis-sdk → dist/sdk}/src/hooks/useNotis.ts +12 -4
- package/{template/packages/notis-sdk → dist/sdk}/src/hooks/useNotisNavigation.ts +11 -8
- package/dist/sdk/src/hooks/useQuery.ts +71 -0
- package/dist/sdk/src/hooks/useTool.ts +65 -0
- package/dist/sdk/src/hooks/useToolQuery.ts +12 -0
- package/dist/sdk/src/hooks/useTopBarSearch.ts +81 -0
- package/dist/sdk/src/hooks/useUpsertDocument.ts +95 -0
- package/dist/sdk/src/index.ts +164 -0
- package/dist/sdk/src/interactions/actions.ts +59 -0
- package/dist/sdk/src/interactions/shortcuts.tsx +726 -0
- package/dist/sdk/src/interactions/visibility.ts +13 -0
- package/dist/sdk/src/interactions.ts +45 -0
- package/dist/sdk/src/provider.tsx +44 -0
- package/dist/sdk/src/queryCache.ts +170 -0
- package/dist/sdk/src/runtime.ts +465 -0
- package/dist/sdk/src/styles.css +266 -0
- package/dist/sdk/src/tailwind.ts +66 -0
- package/dist/sdk/src/vite.ts +73 -0
- package/dist/skill-sync/index.js +1753 -0
- package/dist/skill-sync/index.js.map +7 -0
- package/dist/skill-sync-worker.mjs +3113 -0
- package/package.json +18 -7
- package/skills/notis-apps/cli.md +299 -0
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +39 -0
- package/skills/notis-onboarding/BRIEF.md +129 -0
- package/skills/notis-query/cli.md +39 -0
- package/src/agent-hook-entry.js +5 -0
- package/src/cli.js +294 -25
- package/src/command-specs/agents.js +392 -0
- package/src/command-specs/apps.js +1483 -203
- package/src/command-specs/auth.js +114 -137
- package/src/command-specs/diagnostics.js +730 -0
- package/src/command-specs/handover.js +374 -0
- package/src/command-specs/helpers.js +85 -82
- package/src/command-specs/index.js +25 -6
- package/src/command-specs/meta.js +150 -18
- package/src/command-specs/onboarding.js +290 -0
- package/src/command-specs/profile.js +358 -0
- package/src/command-specs/reports.js +97 -0
- package/src/command-specs/skills.js +75 -0
- package/src/command-specs/smoke.js +386 -0
- package/src/command-specs/tools.js +455 -139
- package/src/runtime/agent-browser.js +677 -0
- package/src/runtime/agent-memory-state.js +126 -0
- package/src/runtime/agent-setup.js +383 -0
- package/src/runtime/app-boundary-validator.js +404 -0
- package/src/runtime/app-changelog.js +79 -0
- package/src/runtime/app-platform.js +2652 -205
- package/src/runtime/app-registry-scaffolds.js +367 -0
- package/src/runtime/app-test-server.js +293 -0
- package/src/runtime/assets/store-screenshot-dark.png +0 -0
- package/src/runtime/auth-recovery.js +110 -0
- package/src/runtime/base-skills.d.ts +20 -0
- package/src/runtime/base-skills.js +167 -0
- package/src/runtime/channel.js +133 -0
- package/src/runtime/delegated-context.js +68 -0
- package/src/runtime/errors.js +1 -0
- package/src/runtime/git.js +233 -0
- package/src/runtime/login-listener.js +15 -0
- package/src/runtime/oauth.js +2622 -0
- package/src/runtime/output.js +37 -5
- package/src/runtime/ports.js +31 -0
- package/src/runtime/profiles.js +906 -55
- package/src/runtime/screenshot-framing.js +85 -0
- package/src/runtime/skill-sync/cloud-client.ts +99 -0
- package/src/runtime/skill-sync/index.ts +786 -0
- package/src/runtime/skill-sync/local-scanner.ts +1151 -0
- package/src/runtime/skill-sync/symlink-manager.ts +433 -0
- package/src/runtime/skill-sync/sync-plan.ts +47 -0
- package/src/runtime/skill-sync/types.ts +131 -0
- package/src/runtime/skill-sync/write-cloud-skill.ts +50 -0
- package/src/runtime/skill-sync-service.js +109 -0
- package/src/runtime/store-screenshot.js +146 -0
- package/src/runtime/sync-skills.d.ts +37 -0
- package/src/runtime/sync-skills.js +231 -0
- package/src/runtime/telemetry.js +92 -0
- package/src/runtime/transport.js +324 -45
- package/src/skill-sync-worker-entry.js +2 -0
- package/src/skill-sync-worker.js +50 -0
- package/template/.harness/index.html.tmpl +435 -0
- package/template/CHANGELOG.md +5 -0
- package/template/app/globals.css +28 -3
- package/template/app/layout.tsx +6 -3
- package/template/app/page.tsx +49 -42
- package/template/components/page-heading.tsx +23 -0
- package/template/components/ui/badge.tsx +7 -4
- package/template/components/ui/button.tsx +1 -1
- package/template/components/ui/card.tsx +24 -11
- package/template/components/ui/native-select.tsx +24 -0
- package/template/notis.config.ts +24 -6
- package/template/package-lock.json +3642 -0
- package/template/package.json +19 -16
- package/template/postcss.config.mjs +1 -1
- package/template/tailwind.config.ts +1 -6
- package/template/tsconfig.json +1 -0
- package/src/command-specs/db.js +0 -163
- package/src/runtime/app-preview-server.js +0 -312
- package/template/packages/notis-sdk/src/config.ts +0 -48
- package/template/packages/notis-sdk/src/helpers.ts +0 -131
- package/template/packages/notis-sdk/src/hooks/useAppState.ts +0 -50
- package/template/packages/notis-sdk/src/hooks/useCollectionItem.ts +0 -58
- package/template/packages/notis-sdk/src/hooks/useDatabase.ts +0 -87
- package/template/packages/notis-sdk/src/hooks/useDocument.ts +0 -61
- package/template/packages/notis-sdk/src/hooks/useTool.ts +0 -49
- package/template/packages/notis-sdk/src/hooks/useUpsertDocument.ts +0 -57
- package/template/packages/notis-sdk/src/index.ts +0 -47
- package/template/packages/notis-sdk/src/provider.tsx +0 -44
- package/template/packages/notis-sdk/src/runtime.ts +0 -159
- package/template/packages/notis-sdk/src/styles.css +0 -123
- package/template/packages/notis-sdk/src/vite.ts +0 -54
- package/template/packages/notis-sdk/tsconfig.json +0 -15
- /package/{template/packages/notis-sdk → dist/sdk}/src/hooks/useBackend.ts +0 -0
- /package/{template/packages/notis-sdk → dist/sdk}/src/hooks/useTools.ts +0 -0
- /package/{template/packages/notis-sdk → dist/sdk}/src/ui.ts +0 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
## Delivery
|
|
2
|
+
|
|
3
|
+
Workspace runs released versions only. Local and cloud agents use the same
|
|
4
|
+
workflow. Run Notis commands through
|
|
5
|
+
`npx --package @notis_ai/cli@latest -- notis ...`.
|
|
6
|
+
|
|
7
|
+
A create/edit request normally authorizes updating that app after checks pass,
|
|
8
|
+
**unless user or repository policy requires explicit deployment consent**.
|
|
9
|
+
Preserve authorization already given. Read-only, preview-only, and no-deploy
|
|
10
|
+
instructions stop at local source, build, and stub verification: no remote
|
|
11
|
+
resource mutation, app activation, or live verification. Store publication always
|
|
12
|
+
needs separate explicit approval. Do not deploy just to obtain visual proof when
|
|
13
|
+
deployment is not authorized; report that the host check remains unverified.
|
|
14
|
+
|
|
15
|
+
## Update an app
|
|
16
|
+
|
|
17
|
+
1. **Check identity.** Inspect the effective CLI profile and `apps list --json`.
|
|
18
|
+
Preserve local edits, then pull the exact editable app ID and intended
|
|
19
|
+
personal/team scope. Keep its profile-scoped link, current version, and revision.
|
|
20
|
+
Never silently advance a stale checkout or create a duplicate to avoid a conflict.
|
|
21
|
+
2. **Build and inspect.** Edit the source, increment `notisAppVersion`, and update
|
|
22
|
+
`CHANGELOG.md`. Run `apps build` and automated `apps verify`, then do the
|
|
23
|
+
[visual check](design.md#look-at-the-result). For a new app, complete these
|
|
24
|
+
local checks before creating remote resources.
|
|
25
|
+
3. **Prepare only missing resources.** For an existing app, retain its identity.
|
|
26
|
+
For a new app, reconcile the exact canonical name, edit permission, and scope
|
|
27
|
+
against `apps list --json`; reuse one matching editable identity, stop on
|
|
28
|
+
ambiguity, or create only when none exists. Use `apps create "<display title>"
|
|
29
|
+
<dir>` (with a verified `--team-id` for team scope), and read back the same ID.
|
|
30
|
+
Create only necessary missing databases against that app. Verify ownership
|
|
31
|
+
and database IDs before changing schemas; read back changes. Breaking changes
|
|
32
|
+
require separate coordination. Never mutate user data merely to test the UI.
|
|
33
|
+
4. **Update Workspace.** Run `apps deploy` against that linked app. It builds and
|
|
34
|
+
verifies a frozen source/artifact snapshot before activation. `--skip-build`
|
|
35
|
+
accepts only unchanged valid output and still verifies. Use the supported
|
|
36
|
+
backend path; do not bypass checks or write directly to storage.
|
|
37
|
+
5. **Verify delivery.** Read back the app ID, integer version, and Portal URL with
|
|
38
|
+
`apps list --json`. Run `apps verify --mode live`, then open the released app
|
|
39
|
+
inside Notis and inspect the affected screen and main interaction. Confirm the
|
|
40
|
+
intended bundle/version, not just the existence of an app with the same name.
|
|
41
|
+
A successful live harness check alone is not visual proof inside Notis.
|
|
42
|
+
6. **Report accurately.** Give the app link and a brief description of what changed
|
|
43
|
+
and what was verified. Distinguish local-only, deployed and verified, deployed
|
|
44
|
+
but unverified, failed before activation, and outcome unknown. If create/deploy
|
|
45
|
+
has an uncertain outcome, reconcile its exact identity/version before retrying.
|
|
46
|
+
|
|
47
|
+
## What the checks prove
|
|
48
|
+
|
|
49
|
+
`build` validates the package, enforces design rules, and refreshes its embedded
|
|
50
|
+
SDK. Automated `verify` checks every route at desktop (1280px) and phone (390px)
|
|
51
|
+
widths, render errors, runtime calls, nested boxes, small text, lingering loading
|
|
52
|
+
placeholders, and horizontal overflow. It uses a temporary server and browser;
|
|
53
|
+
printed URLs or `--no-browser` are not passing verification. If tooling is missing,
|
|
54
|
+
install it with `npm exec --yes --package agent-browser@latest -- agent-browser install`.
|
|
55
|
+
|
|
56
|
+
Stub verification does not establish real account data, permissions, host layout,
|
|
57
|
+
or visual quality. Live verification exercises the authenticated runtime but still
|
|
58
|
+
uses the harness. The final installed-app check establishes the result inside Notis.
|
|
59
|
+
If that surface cannot be inspected, say so rather than claim it passed. No extra
|
|
60
|
+
approval round is needed for an already-authorized check.
|
|
61
|
+
|
|
62
|
+
`apps screenshot` supports declared scenarios and stub fixtures, including
|
|
63
|
+
`theme: 'dark'`; `--raw` gives uncomposited captures. Store listing screenshots are
|
|
64
|
+
not required for an ordinary Workspace update.
|
|
65
|
+
|
|
66
|
+
## Special cases — read only when relevant
|
|
67
|
+
|
|
68
|
+
### Publication privacy and portability gate
|
|
69
|
+
|
|
70
|
+
Before submitting or updating a Store listing:
|
|
71
|
+
|
|
72
|
+
1. Inventory the exact public source archive, listing text/media, database schemas,
|
|
73
|
+
starter rows, bundled skills (including scripts/references), and automation
|
|
74
|
+
prompts/configuration. Review their actual contents, not just filenames or
|
|
75
|
+
a passing secret scan. Exclude personal records, transcripts, health/journal
|
|
76
|
+
history, customer details, private repository/account identifiers, credentials,
|
|
77
|
+
local paths, run logs, and private links. Do not merely replace a person's name
|
|
78
|
+
in otherwise real data. Rebuild examples from wholly fictional scenarios.
|
|
79
|
+
2. Keep live owner databases structure-only (`seedDocuments` absent or false).
|
|
80
|
+
Opting in seeds the database's live rows, including folders: it is not a
|
|
81
|
+
fixture selector. Use fictional screenshot fixtures and an explicit, idempotent
|
|
82
|
+
onboarding demo-data option. If starter rows are needed in the install snapshot,
|
|
83
|
+
publish only from an isolated, verified fictional dataset; never replace or
|
|
84
|
+
delete the owner's real data to prepare a submission. When the user asks for
|
|
85
|
+
examples to come with the app, include them in that verified install snapshot:
|
|
86
|
+
screenshot fixtures or an optional onboarding seed step do not satisfy this.
|
|
87
|
+
3. Bundle the full dependency closure of every app/automation skill, including
|
|
88
|
+
referenced helpers and resources. Remove private account-specific defaults;
|
|
89
|
+
resolve the installer's databases, connections, repository, timezone and
|
|
90
|
+
delivery choices at runtime. Preserve existing owner's schedules and data.
|
|
91
|
+
4. Declare a source-owned onboarding skill. It must work through available MCP
|
|
92
|
+
tools or the Notis CLI in any agent harness, without requiring Notis Manager,
|
|
93
|
+
vendor-specific delegation tools, hidden local files, or publisher access.
|
|
94
|
+
Discover tools and inspect schemas before calls; reconcile existing resources
|
|
95
|
+
before creating them. Obtain installer choices before enabling automation or
|
|
96
|
+
external actions. Installing examples must not activate external deliveries.
|
|
97
|
+
5. Test onboarding as an independent harness-native proof agent using an account
|
|
98
|
+
isolated from the publisher, then rerun to prove no duplicates. Exercise each
|
|
99
|
+
route and its interactions with fictional data, including empty/error states.
|
|
100
|
+
Record exact identities, versions, results and run-created resource cleanup in
|
|
101
|
+
a private Notis document owned by the app, never only in local files; never use
|
|
102
|
+
owner records as writable test fixtures.
|
|
103
|
+
For bundled starter-data claims, install the actual published listing into an
|
|
104
|
+
empty test account and read back its rows before onboarding or any manual data
|
|
105
|
+
writes. Confirm the installed listing version and remapped relations; do not
|
|
106
|
+
substitute an editable-source deployment for this Store-install test.
|
|
107
|
+
6. Inspect the final submitted snapshot and media after packaging. Record the
|
|
108
|
+
privacy audit and verification against that exact source version in the same
|
|
109
|
+
private Notis document. Any unknown
|
|
110
|
+
provenance, missing dependency, untested onboarding or suspected personal data
|
|
111
|
+
blocks submission until resolved. Never equate submission with review approval
|
|
112
|
+
or Store publication.
|
|
113
|
+
|
|
114
|
+
### Unreleased container or stale checkout
|
|
115
|
+
|
|
116
|
+
An unreleased container has no source to pull. Recover its original local source,
|
|
117
|
+
or scaffold only if it cannot be recovered; verify the exact ID and scope and use
|
|
118
|
+
`apps link <app-id> <dir> --expected-version 0`. Reuse the container after a failed
|
|
119
|
+
first release; do not duplicate or automatically delete it. If another release
|
|
120
|
+
has appeared, pull it into a fresh directory and reapply the intended edits without
|
|
121
|
+
replacing its deployment base. Link/deploy guards must reject races and conflicts.
|
|
122
|
+
|
|
123
|
+
### Restore an older source
|
|
124
|
+
|
|
125
|
+
Pull the current release into a fresh checkout and the historical source into a
|
|
126
|
+
separate folder (`apps pull <id> <dir> --source-version <n>`). Replace source without
|
|
127
|
+
replacing the current `.notis` link/base, then check and deploy as a new release.
|
|
128
|
+
Preserve app/database/skill IDs. Never decrement versions or imply that source
|
|
129
|
+
restoration undoes user data or external actions.
|
|
130
|
+
|
|
131
|
+
### Release history and Store publication
|
|
132
|
+
|
|
133
|
+
Keep all release history in root `CHANGELOG.md`, newest first, with headings
|
|
134
|
+
`## [Release title] - YYYY-MM-DD` (or `{PR_MERGE_DATE}` while unpublished). Do not add
|
|
135
|
+
`versionNotes` to the config. App Details reads deployed history; the Store reads
|
|
136
|
+
its published snapshot. Local edits must not change the published listing.
|
|
137
|
+
|
|
138
|
+
`apps deploy` updates Workspace only. Use `apps publish --confirm-ready` only after
|
|
139
|
+
the user explicitly approves the current App Details and Store listing. Deploy the
|
|
140
|
+
exact approved source first. Respect listing completeness, visibility, version,
|
|
141
|
+
and pending-review guards. A public submission includes editable source, Store
|
|
142
|
+
assets, source-declared database schemas, and only explicitly opted-in starter
|
|
143
|
+
rows. Do not hand-edit `notis-listing.json` or strip files to pass review; fix the
|
|
144
|
+
source, redeploy, and resubmit. To start from a Store app, use `apps init --from
|
|
145
|
+
<slug>`; `apps pull` is for an accessible installed app, not a Store listing clone.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
## SDK Hook Reference
|
|
2
|
+
|
|
3
|
+
All hooks and components below are imported from `@notis/sdk`. `NotisProvider`
|
|
4
|
+
already installs `ShortcutProvider`; app code should not add a second provider.
|
|
5
|
+
|
|
6
|
+
| API | Signature | Description |
|
|
7
|
+
|-----|-----------|-------------|
|
|
8
|
+
| `useNotis()` | `() => { app, route, databases, collectionItem, resourceId, ready }` | App metadata, current route, selected collection item, decoded exact-resource id, ready state |
|
|
9
|
+
| `useTool<TArgs, TResult>(name)` | `(name: string) => { call, loading, error }` | Call a declared tool with app-defined argument/result types. Identified reads use `call(args, { readOnly: true, dedupe: true })`; never dedupe writes. See [cached-read ownership](design.md#instant-view-loading-contract-required). |
|
|
10
|
+
| `useTools()` | `() => { tools, loading }` | List available tools |
|
|
11
|
+
| `useDocuments(slug, opts?)` | `(slug: string, opts?) => { documents, loading, hasData, error, refetch }` | Query an app database. Bodies are included by default. For metadata-only lists, opt into `includeContent: false`; load the opened record with `useDocument` and defer any full-body search query until needed. Metadata and full-content query caches are separate. |
|
|
12
|
+
| `useNotisNavigation()` | `() => { toRoute, toDocument, toApp }` | Navigate between routes (including `toRoute(path, { resourceId })`), documents, or the app root |
|
|
13
|
+
| `useTopBarSearch(opts)` | `({ value, onChange, placeholder?, onSubmit? }) => { setLoading }` | Bind the current view to the Portal-owned top-bar search input |
|
|
14
|
+
| `useBackend()` | `() => { request }` | Raw backend request proxy with JWT auth |
|
|
15
|
+
| `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 (temporary test harness, vite preview) -- keep a manual refresh for those |
|
|
16
|
+
| `useHandover()` | `() => { handover, pending, error, available }` | Open manager chat with app/resource context plus an optional starter prompt or declared skill. Omit `prompt` for a context-only composer. `available` is false on hosts with no chat -- fall back to a copyable prompt |
|
|
17
|
+
| `useCloudComputer()` | `() => { facts, loading, error, refresh }` | Read-only cloud computer facts: sandbox existence/status and whether the GitHub CLI is signed in. Requires `capabilities.cloudComputer: 'read'` plus the user's approval; `facts.available === false` means answer from the app's own fallback |
|
|
18
|
+
| `useActiveResource(resource)` | `(ContextResource \| null) => void` | Publish the record currently open in the app so manager handover and context menus stay grounded |
|
|
19
|
+
| `useCollectionInteractions(opts)` | `(opts) => CollectionInteractionController` | Keyboard navigation, active-row state, range/toggle selection, marquee selection, and action dispatch for collection UIs |
|
|
20
|
+
| `useShortcuts(definitions, opts?)` | `(definitions, opts?) => void` | Register scoped keyboard shortcuts. Editable targets are ignored unless explicitly allowed; use `ShortcutHints` to display them |
|
|
21
|
+
| `MarkdownEditor` | `(NotisMarkdownEditorProps) => ReactElement` | Use the host editor with app-owned persistence, stable `resourceKey`, revision-aware `onSave`, and optional `onUploadFile` returning a durable URL |
|
|
22
|
+
| `useAgentContext()` / `NotisCommentBoundary` / `NotisCommentBox` | generic context API and optional UI | App-defined pills, icons, context, attachments and nearby comments; see [Context sharing](context.md) |
|
|
23
|
+
| `NotisSelectionBoundary` | `(NotisSelectionBoundaryProps) => ReactElement` | Attach structured, explicitly untrusted app/resource/selection context to selected content and copy operations |
|
|
24
|
+
| `SelectionCheckbox` / `SelectionMarquee` | components | Standard selection controls backed by `useCollectionInteractions` |
|
|
25
|
+
| `MultiSelectActionBar` | component | Standard bulk actions with pending/disabled state and shortcut support |
|
|
26
|
+
| `Dialog` | `{ open, onClose, title, description?, role?, children }` | Themed native modal with top-layer stacking, focus handling and background shortcut isolation. Use `role="alertdialog"` for destructive confirmation; put the safe action first. |
|
|
27
|
+
|
|
28
|
+
Import headless collection action types and helpers from
|
|
29
|
+
`@notis/sdk/interactions`. Keep an open detail view synchronized with
|
|
30
|
+
`useActiveResource`, and wrap its selectable content in
|
|
31
|
+
`NotisSelectionBoundary` so the manager receives both the active record and the
|
|
32
|
+
user's exact selection. For `MarkdownEditor`, keep `resourceKey` stable per
|
|
33
|
+
record, pass the latest revision back from `onSave`, reject revision conflicts
|
|
34
|
+
instead of overwriting newer data, and implement `onUploadFile` whenever the
|
|
35
|
+
editor should accept media or file blocks.
|
|
36
|
+
|
|
37
|
+
### App configuration additions
|
|
38
|
+
|
|
39
|
+
- `toolBindings` is only for provider-generated public tool names whose upstream
|
|
40
|
+
action cannot be reconstructed. Keep the exact final public `name` in
|
|
41
|
+
`tools`, then bind it to `providerToolName`; the public name remains the
|
|
42
|
+
permission boundary.
|
|
43
|
+
|
|
44
|
+
### Typed tool calls
|
|
45
|
+
|
|
46
|
+
`useTool` accepts generic argument and result types. Query the database at dev time to discover actual property shapes, then keep those types in the app:
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
type QueryTasksArgs = { database_id?: string; database_slug?: string; query: { page_size?: number } };
|
|
50
|
+
interface TaskDoc {
|
|
51
|
+
title: string;
|
|
52
|
+
properties: {
|
|
53
|
+
Status: string;
|
|
54
|
+
Priority: string;
|
|
55
|
+
Due: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
type QueryTasksResult = { documents: TaskDoc[] };
|
|
59
|
+
|
|
60
|
+
const queryTasks = useTool<QueryTasksArgs, QueryTasksResult>('LOCAL_NOTIS_DATABASE_QUERY');
|
|
61
|
+
const result = await queryTasks.call({ database_id: 'tasks-db-id', query: { page_size: 25 } });
|
|
62
|
+
// result.documents[0].properties.Status is typed as string
|
|
63
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Troubleshooting
|
|
2
|
+
|
|
3
|
+
Start with the failing screen or operation. Do not invent a second app workflow;
|
|
4
|
+
use the [delivery guide](release.md) and supported Notis CLI commands.
|
|
5
|
+
|
|
6
|
+
- **App looks wrong despite passing checks:** open it inside Notis and compare
|
|
7
|
+
the affected region with the request. Check loading and loaded states, viewport
|
|
8
|
+
sizing, scrolling, and theme. A standalone harness does not reproduce the host's
|
|
9
|
+
parent layout or shadow boundary. Do not assume the cause from a screenshot alone.
|
|
10
|
+
- **Build reports a design violation:** use the scaffold component or theme token
|
|
11
|
+
suggested by the diagnostic. Fix the reported file/line rather than hiding the
|
|
12
|
+
pattern elsewhere. Existing validator exceptions are for justified cases, not a
|
|
13
|
+
shortcut around visual review.
|
|
14
|
+
- **The configured sidebar is missing:** preserve `routes` and `collection.sidebar`;
|
|
15
|
+
investigate the host mismatch instead of duplicating the sidebar in app code.
|
|
16
|
+
- **The app shows old code or is missing from Workspace:** check the exact installed
|
|
17
|
+
app/version and requested bundle first. Local source edits and Desktop restarts
|
|
18
|
+
do not update a released app. Refresh after confirming the correct release exists.
|
|
19
|
+
- **Deploy transport failure:** run `notis doctor` and read back the exact app/version.
|
|
20
|
+
Reconcile the outcome before retrying; do not bypass the backend with storage writes.
|
|
21
|
+
- **Database query is empty or properties are undefined:** inspect the actual schema,
|
|
22
|
+
database ID, and returned property shape through the CLI. Keep types in the app,
|
|
23
|
+
guard optional fields, and distinguish an error from a successful empty result.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notis-cli
|
|
3
|
+
description: Use when agents should work through the Notis CLI, especially to develop Notis apps locally or to access Notis, Composio, or MCP tools they do not currently have loaded directly.
|
|
4
|
+
mcp_resource: true
|
|
5
|
+
mcp_tool_patterns: ["LOCAL_NOTIS_GET_INTELLIGENCE_POLICY"]
|
|
6
|
+
mcp_references: ["references/app-delivery.md", "references/tool-examples.md", "references/native-databases.md", "references/troubleshooting.md", "references/intelligence.md"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Notis CLI Skill
|
|
10
|
+
|
|
11
|
+
Use this skill when the user wants work done through the Notis CLI.
|
|
12
|
+
|
|
13
|
+
This skill covers two main CLI workflows:
|
|
14
|
+
|
|
15
|
+
1. Developing Notis apps locally.
|
|
16
|
+
2. Accessing Notis, Composio, and MCP tools through the CLI.
|
|
17
|
+
## When to use this skill
|
|
18
|
+
|
|
19
|
+
Activate this skill when:
|
|
20
|
+
|
|
21
|
+
- the user wants to init, develop, build, verify, link, pull, or deploy a Notis app through the CLI
|
|
22
|
+
- the current agent does not have the tool it needs in its direct tool list
|
|
23
|
+
- the user wants direct MCP access through Notis
|
|
24
|
+
- the user wants to use an integration-backed capability through Notis rather than a first-class local tool
|
|
25
|
+
- the task mentions the `notis` CLI directly
|
|
26
|
+
|
|
27
|
+
Use the registry-resolved published npm package everywhere:
|
|
28
|
+
|
|
29
|
+
- `npx --package @notis_ai/cli@latest -- notis ...`
|
|
30
|
+
|
|
31
|
+
Always use this NPX command form so the agent runs the current published CLI. In hosted shells, the CLI is pre-authenticated through `NOTIS_JWT`. On a local machine the CLI holds its own OAuth grant: `notis login` authorizes one in the browser, and signing in to the Notis desktop app authorizes one automatically for that account. Either way the grant belongs to the CLI, which refreshes it without the desktop app running.
|
|
32
|
+
|
|
33
|
+
`@latest` is correct for every account, including beta ones. Each deployment reports which published build belongs to it, `notis login` pins that on the profile, and a later run that finds itself on the wrong build hands the invocation to the right one before doing anything. Never substitute a channel by hand: pinning `@beta` on a production profile is how a machine ends up running a build its API does not expect. `notis doctor` reports the active channel, and `NOTIS_CLI_AUTO_CHANNEL=0` turns the hand-off off for a run.
|
|
34
|
+
|
|
35
|
+
The CLI bundles this `notis-cli` base skill and refreshes its canonical copy under `~/.notis/skills/base/` on every launch. It is independent of account-skill sync, feature flags, target selection, and cloud deletion.
|
|
36
|
+
|
|
37
|
+
## Profiles: accounts and endpoints
|
|
38
|
+
|
|
39
|
+
A profile is one account paired with one API endpoint. Profiles live side by side; switching between them never signs any of them out.
|
|
40
|
+
|
|
41
|
+
- `npx --package @notis_ai/cli@latest -- notis profile list` — every profile on this machine, with its endpoint, user, and whether it is signed in. The active one is marked.
|
|
42
|
+
- `npx --package @notis_ai/cli@latest -- notis profile use <name>` — change which account subsequent commands run as.
|
|
43
|
+
- `npx --package @notis_ai/cli@latest -- notis --profile <name> <command>` — run a single command as another account without changing the active one.
|
|
44
|
+
- `npx --package @notis_ai/cli@latest -- notis login --profile <name>` — add an account. The existing profiles keep their credentials.
|
|
45
|
+
- `npx --package @notis_ai/cli@latest -- notis logout` — sign out of the active profile only; pass `--all-profiles` to clear every one.
|
|
46
|
+
|
|
47
|
+
Read the profile before acting on the user's data. `notis whoami` reports the account and endpoint a command will hit; if that is not the account the user meant, switch profiles rather than proceeding.
|
|
48
|
+
|
|
49
|
+
### Working against a local `./dev.sh` backend
|
|
50
|
+
|
|
51
|
+
`./dev.sh` exposes its test account as a lease-backed profile (`dev-<workspace>-<hash>`) pointing at the local backend, and prints the name on startup. Its credential stays in that worktree and it is the automatic default there, so `notis ...` targets the local API and test user with no extra flags. It is not a stored account profile and cannot be selected outside the worktree.
|
|
52
|
+
|
|
53
|
+
Two rules follow from the dev credential being scoped to that local backend:
|
|
54
|
+
|
|
55
|
+
- A `dev-*` profile only exists while its `./dev.sh` lease is running. If it is stopped, the CLI fails with `dev_runtime_unavailable` instead of sending the test user's token to the live API.
|
|
56
|
+
- To reach a real account from inside a worktree — including when the local backend is wedged — name a real profile explicitly: `notis --profile <name> ...`. That is the supported escape hatch.
|
|
57
|
+
|
|
58
|
+
## Critical rule for missing tools
|
|
59
|
+
|
|
60
|
+
If the tool you need is not already available in your current tool surface, do not stop and do not assume the task is blocked.
|
|
61
|
+
|
|
62
|
+
Use the Notis CLI as the fallback access layer.
|
|
63
|
+
|
|
64
|
+
This is especially important when:
|
|
65
|
+
|
|
66
|
+
- you need direct MCP tools
|
|
67
|
+
- you need a Composio-backed integration tool
|
|
68
|
+
- you need a Notis tool that is not exposed as a first-class command in your current environment
|
|
69
|
+
- you need to discover the canonical tool name before execution
|
|
70
|
+
|
|
71
|
+
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.
|
|
72
|
+
|
|
73
|
+
## User and repository policy takes precedence
|
|
74
|
+
|
|
75
|
+
Default delivery below applies only when no more restrictive user or repository
|
|
76
|
+
instruction exists. Explicit preview-only/no-deploy requests and standing requirements
|
|
77
|
+
for explicit deployment consent override the default. Preserve that authority across
|
|
78
|
+
local and cloud runs. For local-only work, build and run stub verification; do not
|
|
79
|
+
create remote resources or activate an app. Use the CLI's documented
|
|
80
|
+
build/verification harness. Store publication remains
|
|
81
|
+
separately authorized.
|
|
82
|
+
|
|
83
|
+
### Tool access workflow
|
|
84
|
+
|
|
85
|
+
1. List available toolkit namespaces:
|
|
86
|
+
- `npx --package @notis_ai/cli@latest -- notis tools toolkits --timeout-ms 90000`
|
|
87
|
+
2. Search for the capability you need using natural language:
|
|
88
|
+
- `npx --package @notis_ai/cli@latest -- notis tools search "<query>" --timeout-ms 90000`
|
|
89
|
+
- optionally add known field hints with `--known-fields "<key:value>"`
|
|
90
|
+
3. If needed, inspect the exact tool and parameter schema:
|
|
91
|
+
- `npx --package @notis_ai/cli@latest -- notis tools describe <tool-name> --timeout-ms 90000`
|
|
92
|
+
- `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --get-schema --timeout-ms 90000`
|
|
93
|
+
4. Validate arguments before execution when the tool is mutating or the schema is non-trivial:
|
|
94
|
+
- `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --dry-run --arguments '<json>'`
|
|
95
|
+
5. Execute the tool:
|
|
96
|
+
- `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --arguments '<json>'`
|
|
97
|
+
6. If multiple independent calls are needed, use:
|
|
98
|
+
- `npx --package @notis_ai/cli@latest -- notis tools exec-parallel '<json-array>'`
|
|
99
|
+
7. If the toolkit is not connected yet, start its connection flow:
|
|
100
|
+
- `npx --package @notis_ai/cli@latest -- notis tools link <toolkit>`
|
|
101
|
+
- For a revoked or invalid credential-based connection, reconnect with credential JSON on stdin: `npx --package @notis_ai/cli@latest -- notis tools link <toolkit> --reconnect --credentials -`
|
|
102
|
+
|
|
103
|
+
### Discovery latency and caching
|
|
104
|
+
|
|
105
|
+
The discovery bridge may query several connected MCP servers on a cold run and
|
|
106
|
+
can legitimately take longer than the CLI's general 30-second timeout. Always
|
|
107
|
+
use `--timeout-ms 90000` for `tools toolkits`, `tools search`, `tools describe`,
|
|
108
|
+
and schema-only discovery calls. If a discovery call returns `network_timeout`,
|
|
109
|
+
retry that same command once with `--timeout-ms 90000`; do not start a new
|
|
110
|
+
query, invent a tool name, or loop on the default 30-second command.
|
|
111
|
+
|
|
112
|
+
Discovery is idempotent but should be bounded: run the toolkit listing once per
|
|
113
|
+
task, run one natural-language search per distinct capability, and cache the
|
|
114
|
+
returned canonical tool names and schemas for the rest of the current turn.
|
|
115
|
+
After a successful search/schema response, call the returned canonical tool
|
|
116
|
+
directly (with a dry-run before mutations) instead of repeating the same
|
|
117
|
+
discovery request before every connected-service action.
|
|
118
|
+
|
|
119
|
+
### Tool access rules
|
|
120
|
+
|
|
121
|
+
- Never guess tool names. Discover them with `npx --package @notis_ai/cli@latest -- notis tools search` first.
|
|
122
|
+
- Prefer first-class CLI commands when they exist, but use `npx --package @notis_ai/cli@latest -- notis tools ...` whenever the capability is not covered by a dedicated command.
|
|
123
|
+
- When you know the tool name but not the argument shape, use `npx --package @notis_ai/cli@latest -- notis tools describe` or `--get-schema` before execution.
|
|
124
|
+
- Use `--dry-run` before mutating calls when you want schema validation without execution.
|
|
125
|
+
- If a toolkit is missing, use `npx --package @notis_ai/cli@latest -- notis tools link <toolkit>` to start the connection flow.
|
|
126
|
+
- Use `--reconnect` to replace an existing connection. If multiple accounts exist, select one with `--connection-id <id>`.
|
|
127
|
+
- For API keys, basic auth, or other credential JSON, prefer `--credentials -` and pipe or redirect stdin. Avoid inline secrets because they can enter shell history and process listings.
|
|
128
|
+
|
|
129
|
+
## Task guides
|
|
130
|
+
|
|
131
|
+
Read only the guide needed for this task. Relative links resolve in the skill bundle.
|
|
132
|
+
For hosted MCP, fetch the matching `notis://docs/notis-cli/references/<file>.md` URI
|
|
133
|
+
with resources/read or the available Notis resource-fetch tool; the root resource
|
|
134
|
+
also rewrites these links to their published URIs.
|
|
135
|
+
|
|
136
|
+
- [App delivery](references/app-delivery.md)
|
|
137
|
+
- [Toolkit mental model](references/tool-examples.md)
|
|
138
|
+
- [Native database access](references/native-databases.md)
|
|
139
|
+
- [Supporting commands](references/troubleshooting.md)
|
|
140
|
+
|
|
141
|
+
## Intelligence for skills and delegated work
|
|
142
|
+
|
|
143
|
+
Skills request `low`, `medium`, or `high`, never a fixed model name. Discover the
|
|
144
|
+
read-only `LOCAL_NOTIS_GET_INTELLIGENCE_POLICY` tool to obtain the shared `contract`
|
|
145
|
+
and current mapping
|
|
146
|
+
for `notis`, `codex`, or `claude_code` and the requested `level`. Resolve model and
|
|
147
|
+
reasoning effort together at the start of each job; validate the selected options
|
|
148
|
+
with the executing harness. Explicit invocation overrides win. A fixed-model
|
|
149
|
+
harness may inherit and disclose that the level was not applied; an automated
|
|
150
|
+
launcher needing an exact selection stops before side effects if policy is unavailable.
|
|
151
|
+
Repository and installed skills consume that same response; neither needs a
|
|
152
|
+
checkout-relative document. Record actual execution receipts, not the level name, as model provenance. Media
|
|
153
|
+
engines remain separate capabilities selected by their tools. See
|
|
154
|
+
[the intelligence contract](references/intelligence.md) for cross-environment details.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# App delivery
|
|
2
|
+
|
|
3
|
+
Use the canonical `notis-apps` skill’s entrypoint and [release guide](../../notis-apps/references/release.md).
|
|
4
|
+
For hosted MCP fetch `notis://docs/notis-apps` and `notis://docs/notis-apps/references/release.md`.
|
|
5
|
+
User/repository no-deploy and explicit-consent policies take precedence over default delivery.
|
|
6
|
+
|
|
7
|
+
## IMPORTANT: When NOT to use tool access for app development
|
|
8
|
+
|
|
9
|
+
When building or deploying a Notis app, do NOT use `npx --package @notis_ai/cli@latest -- notis tools exec` for app file operations:
|
|
10
|
+
|
|
11
|
+
- 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`
|
|
12
|
+
- Linting app files -- use `npx --package @notis_ai/cli@latest -- notis apps build` which validates automatically
|
|
13
|
+
- Managing app routes -- write standard Vite + React pages in `app/`, not raw JS files
|
|
14
|
+
|
|
15
|
+
Database schemas are the exception: declaring a slug in `notis.config.ts` does
|
|
16
|
+
not create it. Use the discovery-first native database tool workflow to
|
|
17
|
+
create/update and read back each app-owned schema before deployment. Tool calls
|
|
18
|
+
are also valid for testing runtime behavior after deployment.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Agent intelligence levels
|
|
2
|
+
|
|
3
|
+
This is one shared contract for repository skills and account-installed skills.
|
|
4
|
+
Read it from the `contract` field returned by `LOCAL_NOTIS_GET_INTELLIGENCE_POLICY`,
|
|
5
|
+
directly as a native tool or through the authenticated Notis CLI. The same response
|
|
6
|
+
contains current harness mappings and a `contract_revision` fingerprint. No local
|
|
7
|
+
repository document is a runtime prerequisite. This bundled guide is the source
|
|
8
|
+
served by that lookup, not a separate environment-specific contract.
|
|
9
|
+
|
|
10
|
+
Skills request **low**, **medium**, or **high**. They never maintain model names,
|
|
11
|
+
version pins, family aliases, effort tables, or price scorecards. The current
|
|
12
|
+
Notis runtime policy is the source of truth, on every operating system and host.
|
|
13
|
+
|
|
14
|
+
## Choosing a level
|
|
15
|
+
|
|
16
|
+
| Level | Work |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| **low** | Bounded extraction, classification against a supplied rubric, formatting, and repetitive generation from complete inputs. |
|
|
19
|
+
| **medium** | Synthesis, writing and reviewing prose from supplied evidence, and moderately complex bounded work. |
|
|
20
|
+
| **high** | The skill default when unspecified: complex reasoning, investigation, coding, code review, and orchestration. |
|
|
21
|
+
|
|
22
|
+
These are skill defaults, not changes to account or product defaults. The user's
|
|
23
|
+
explicit instruction for this invocation wins: level, exact model, effort,
|
|
24
|
+
harness, or inheritance from the current session. Preserve the scope of that
|
|
25
|
+
override; never save a lasting preference unless asked. Maximum-depth requests
|
|
26
|
+
are invocation overrides, not a fourth Notis level.
|
|
27
|
+
|
|
28
|
+
## Resolve at execution time
|
|
29
|
+
|
|
30
|
+
Discover **get current Notis intelligence policy for each harness** through the
|
|
31
|
+
Notis tool catalogue. The read-only tool is `LOCAL_NOTIS_GET_INTELLIGENCE_POLICY`:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_GET_INTELLIGENCE_POLICY \
|
|
35
|
+
--arguments '{"harness":"codex","level":"low"}'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Omit arguments to read all levels. Harness keys are `notis`, `codex`, and
|
|
39
|
+
`claude_code`. A local Mac, Windows host, cloud sandbox, or CI runner uses the
|
|
40
|
+
same contract. Cursor or another host must identify its actual execution engine;
|
|
41
|
+
it must not pretend to be a supported harness based on installed binaries.
|
|
42
|
+
|
|
43
|
+
The projection is generated from the backend native intelligence configuration and external-harness policy. It contains no
|
|
44
|
+
second mapping. Weekly policy changes therefore require no skill edits.
|
|
45
|
+
|
|
46
|
+
- Resolve **both model and reasoning effort**. Level names are not effort names.
|
|
47
|
+
- Resolve once per delegated job; keep its `policy_revision` and selection stable
|
|
48
|
+
through claim, generation, retry and completion. A new job gets a fresh policy.
|
|
49
|
+
- Explicit user choices override the selection; validate them with the executing
|
|
50
|
+
harness. Never substitute another model, buy API capacity, or change accounts
|
|
51
|
+
because a selection is unavailable.
|
|
52
|
+
- Validate the request against advertised harness capabilities. Policy is not
|
|
53
|
+
evidence of entitlement, quota, installed support or successful execution.
|
|
54
|
+
- Use native `intelligence_mode` when the Notis delegation interface supports it.
|
|
55
|
+
External launchers translate the returned selection into their supported options.
|
|
56
|
+
- Do not downgrade or restart the main session to enforce a skill default.
|
|
57
|
+
- A single-model harness can inherit its current configuration and disclose that
|
|
58
|
+
the requested level was not applied. Unknown or unavailable mappings are not
|
|
59
|
+
permission to guess a model. Automated launchers that require an exact selection
|
|
60
|
+
stop before claiming jobs or producing side effects and explain the missing policy.
|
|
61
|
+
- Before this lookup is deployed, use a current runtime-injected policy if present;
|
|
62
|
+
otherwise use the transparent inheritance behavior above. Do not copy a temporary
|
|
63
|
+
model table into skills as a rollout workaround.
|
|
64
|
+
|
|
65
|
+
## Modalities, product assertions and provenance
|
|
66
|
+
|
|
67
|
+
Image, speech, video, embedding and provider-research engines are capabilities,
|
|
68
|
+
not interchangeable text-reasoning levels. Skills discover the current native
|
|
69
|
+
capability and let its backend select the engine. External scripts requiring an
|
|
70
|
+
exact provider-specific identifier must resolve current supported configuration
|
|
71
|
+
or take an explicit invocation override; they must not pass `low` as an engine ID.
|
|
72
|
+
|
|
73
|
+
Test specs assert behavior against the current backend configuration, rather than
|
|
74
|
+
freezing last month's model names. Preserve exact comparisons: derive the expected
|
|
75
|
+
identifier from the owning policy or tool configuration, then compare the receipt.
|
|
76
|
+
Do not weaken a routing test to merely check that some model name exists.
|
|
77
|
+
|
|
78
|
+
Persist **the actual model that ran**, not an intelligence level. Resolve before
|
|
79
|
+
claiming jobs when the identifier participates in a prompt hash or lease contract.
|
|
80
|
+
Verify execution readback before certifying provenance; aliases and requested
|
|
81
|
+
settings are not actual-model receipts. Preserve historical evidence and existing
|
|
82
|
+
records. Do not rewrite an old receipt as today's policy.
|
|
83
|
+
|
|
84
|
+
## Subscription execution
|
|
85
|
+
|
|
86
|
+
A level chooses intelligence, not payment authority. Use the current harness's
|
|
87
|
+
sub-agents or the user's subscription CLI. The existing direct-provider approval
|
|
88
|
+
boundary remains in the workspace/account provider-approval policy.
|
|
89
|
+
|
|
90
|
+
For subscription CLI subprocesses, remove provider API-key/base-URL variables
|
|
91
|
+
from the child environment. Preserve native subscription credentials; never log
|
|
92
|
+
out or rewrite account authentication to enforce a level. Check the harness's
|
|
93
|
+
execution/authentication readback. Resolve only once per job, batch bounded items
|
|
94
|
+
where appropriate, and keep existing concurrency and usage limits.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Native database access
|
|
2
|
+
|
|
3
|
+
Native Notis databases are accessed through the generic tool workflow, not a first-class database command group. Use these canonical tool names:
|
|
4
|
+
|
|
5
|
+
- `LOCAL_NOTIS_DATABASE_LIST_DATABASES` -- list databases accessible to the current profile
|
|
6
|
+
- `LOCAL_NOTIS_DATABASE_GET_DATABASE` -- inspect read-only metadata and schema detail
|
|
7
|
+
- `LOCAL_NOTIS_DATABASE_QUERY` -- query documents from a database
|
|
8
|
+
- `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` -- create or update a database schema. Every database belongs to a Notis app: creation requires the owning app's slug or id in the `app` argument (create the app first with `LOCAL_NOTIS_CREATE_APP` if needed)
|
|
9
|
+
- `LOCAL_NOTIS_DATABASE_DELETE_DATABASE` -- permanently delete a database and all its rows by `database_id`. It is refused for a database its app declares, and while another database relates to it or an automation is triggered by it; the error says what to remove first
|
|
10
|
+
|
|
11
|
+
Example workflow before building an app:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"
|
|
15
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_LIST_DATABASES --arguments '{}'
|
|
16
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --get-schema
|
|
17
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_slug":"social_media_calendar"}'
|
|
18
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"database_id":"social-media-calendar-db-id","query":{"page_size":1}}'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
When `LOCAL_NOTIS_DATABASE_LIST_DATABASES` or `LOCAL_NOTIS_DATABASE_GET_DATABASE` returns a database ID, prefer `database_id` for `LOCAL_NOTIS_DATABASE_QUERY`; `database_slug` remains supported as a fallback.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
### Toolkit mental model
|
|
2
|
+
|
|
3
|
+
Typical toolkit namespaces include:
|
|
4
|
+
|
|
5
|
+
- `notis` for native Notis tools
|
|
6
|
+
- `composio-*` for Composio-backed integrations
|
|
7
|
+
- `mcp-*` for MCP-backed tools
|
|
8
|
+
|
|
9
|
+
The pattern is:
|
|
10
|
+
|
|
11
|
+
1. discover toolkits
|
|
12
|
+
2. search tools
|
|
13
|
+
3. inspect schema if needed
|
|
14
|
+
4. execute the canonical tool
|
|
15
|
+
|
|
16
|
+
### Tool access examples
|
|
17
|
+
|
|
18
|
+
Find a tool:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx --package @notis_ai/cli@latest -- notis tools toolkits
|
|
22
|
+
npx --package @notis_ai/cli@latest -- notis tools search "list today's calendar events"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Inspect a tool before execution:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx --package @notis_ai/cli@latest -- notis tools describe composio-googlecalendar-list_events
|
|
29
|
+
npx --package @notis_ai/cli@latest -- notis tools exec composio-googlecalendar-list_events --get-schema
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Dry-run a tool call:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --dry-run --arguments '{"database_slug":"tasks"}'
|
|
36
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --dry-run --arguments '{"database_id":"tasks-db-id","query":{"page_size":10}}'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Execute a tool call:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_GET_DATABASE --arguments '{"database_slug":"tasks"}'
|
|
43
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"database_id":"tasks-db-id","query":{"page_size":10}}'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Connect a missing toolkit:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx --package @notis_ai/cli@latest -- notis tools link github
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Reconnect a credential-based toolkit without putting the secret in shell history:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npx --package @notis_ai/cli@latest -- notis tools link dataforseo --reconnect --credentials - < credentials.json
|
|
56
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
## Supporting commands
|
|
2
|
+
|
|
3
|
+
- `npx --package @notis_ai/cli@latest -- notis whoami` — confirm which account and endpoint a command will target
|
|
4
|
+
- `npx --package @notis_ai/cli@latest -- notis doctor` — verify CLI config, auth, routing, and API reachability before relying on the CLI
|
|
5
|
+
- `npx --package @notis_ai/cli@latest -- notis describe <command...>` — get the exact command contract for first-class CLI commands
|
|
6
|
+
|
|
7
|
+
## Troubleshooting
|
|
8
|
+
|
|
9
|
+
### CLI returns `auth_expired` or `auth_missing`
|
|
10
|
+
|
|
11
|
+
The profile's browser authorization has lapsed or was never granted. Run
|
|
12
|
+
`notis login` (add `--profile <name>` when the failing profile is not the
|
|
13
|
+
active one) and have the user approve the browser prompt. In JSON/agent mode
|
|
14
|
+
the first hint is the exact command to run. Do not copy refresh tokens into
|
|
15
|
+
commands or try to mint a credential yourself.
|
|
16
|
+
|
|
17
|
+
If the profile is a `dev-*` one, the fix is to restart `./dev.sh` in the
|
|
18
|
+
workspace it belongs to, or to switch to a real account profile.
|
|
19
|
+
|
|
20
|
+
### Deploy fails with "network_error" or "fetch failed"
|
|
21
|
+
|
|
22
|
+
Run `notis doctor` to verify the effective profile and endpoint. Read back the exact app ID,
|
|
23
|
+
version and release state before retrying. An uncertain network response is not proof of rollback.
|
|
24
|
+
There is no direct storage deployment path. Repair authentication when needed without changing the
|
|
25
|
+
intended profile, then reconcile the previous outcome before starting a new release.
|
|
26
|
+
|
|
27
|
+
Localhost backends are a Notis-developer test lane owned by `./dev.sh` and its lease-backed profile.
|
|
28
|
+
Do not silently switch between that lane and a live account.
|
|
29
|
+
|
|
30
|
+
### Health or tool-roundtrip errors
|
|
31
|
+
|
|
32
|
+
Local scaffold/build and stub verification can run without an API connection (dependencies and
|
|
33
|
+
browser tooling must already be available). `link`, `pull`, `create`, `list`, `deploy`, live verification
|
|
34
|
+
and Store operations require the intended backend. Never bypass it.
|
|
35
|
+
|
|
36
|
+
### Stale bundle in Portal after an update
|
|
37
|
+
|
|
38
|
+
Every successful release gets a new integer deployment version. Read back that version, then use
|
|
39
|
+
normal refresh/navigation to load it. Never overwrite or decrement an existing deployment version.
|