@notis_ai/cli 0.2.0-beta.19.1 → 0.2.0-beta.196.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +822 -135
- 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/config/portal-route-roots.json +48 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +45587 -0
- package/dist/base-skills/notis-apps/SKILL.md +93 -0
- package/dist/base-skills/notis-apps/references/architecture.md +114 -0
- package/dist/base-skills/notis-apps/references/context.md +81 -0
- package/dist/base-skills/notis-apps/references/design.md +97 -0
- package/dist/base-skills/notis-apps/references/memory.md +58 -0
- package/dist/base-skills/notis-apps/references/reading.md +67 -0
- package/dist/base-skills/notis-apps/references/release.md +107 -0
- package/dist/base-skills/notis-apps/references/sdk.md +116 -0
- package/dist/base-skills/notis-apps/references/troubleshooting.md +24 -0
- package/dist/base-skills/notis-apps/references/views.md +142 -0
- package/dist/base-skills/notis-cli/SKILL.md +154 -0
- package/dist/base-skills/notis-cli/references/app-delivery.md +19 -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 +41 -0
- package/dist/base-skills/notis-query/references/database-discovery.md +60 -0
- package/dist/base-skills/notis-query/references/documents.md +63 -0
- package/dist/base-skills/notis-query/references/query.md +76 -0
- package/{template/packages/notis-sdk → dist/sdk}/package.json +14 -4
- package/dist/sdk/src/agentContext.ts +36 -0
- package/dist/sdk/src/bundleModule.ts +79 -0
- package/dist/sdk/src/components/Dialog.tsx +46 -0
- package/dist/sdk/src/components/DocumentEditor.tsx +106 -0
- package/dist/sdk/src/components/DocumentPage.tsx +141 -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/RecordComponents.tsx +33 -0
- package/dist/sdk/src/components/RenderChartData.tsx +19 -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 +239 -0
- package/dist/sdk/src/documents.ts +258 -0
- package/dist/sdk/src/hooks/useAction.ts +28 -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 +95 -0
- package/dist/sdk/src/hooks/useCloudComputerShell.ts +114 -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 +78 -0
- package/dist/sdk/src/hooks/useLongPressSelection.ts +79 -0
- package/dist/sdk/src/hooks/useMultiSelect.ts +95 -0
- package/dist/sdk/src/hooks/useNativeDocumentBody.ts +50 -0
- package/dist/sdk/src/hooks/useNativeDocuments.ts +83 -0
- package/dist/sdk/src/hooks/useNotis.ts +42 -0
- package/dist/sdk/src/hooks/useNotisNavigation.ts +67 -0
- package/dist/sdk/src/hooks/useQuery.ts +74 -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/hooks/useViewParams.ts +121 -0
- package/dist/sdk/src/hooks/useViewerReads.ts +129 -0
- package/dist/sdk/src/index.ts +200 -0
- package/dist/sdk/src/interactions/actions.ts +59 -0
- package/dist/sdk/src/interactions/shortcuts.tsx +740 -0
- package/dist/sdk/src/interactions/visibility.ts +13 -0
- package/dist/sdk/src/interactions.ts +45 -0
- package/dist/sdk/src/nativeData.ts +39 -0
- package/dist/sdk/src/presentation.tsx +82 -0
- package/dist/sdk/src/provider.tsx +49 -0
- package/dist/sdk/src/queryCache.ts +172 -0
- package/dist/sdk/src/queryErrors.ts +51 -0
- package/dist/sdk/src/runtime.ts +603 -0
- package/dist/sdk/src/space.ts +425 -0
- package/dist/sdk/src/styles.css +290 -0
- package/dist/sdk/src/tailwind.ts +66 -0
- package/dist/sdk/src/vite.ts +83 -0
- package/dist/skill-sync/index.js +2143 -0
- package/dist/skill-sync/index.js.map +7 -0
- package/dist/skill-sync-worker.mjs +3487 -0
- package/dist/space-harness/host.js +66 -0
- package/dist/view-renderer/dist/host.css +1 -0
- package/dist/view-renderer/dist/host.js +1042 -0
- package/dist/view-renderer/dist/theme.css +73 -0
- package/dist/view-renderer/src/dom.js +180 -0
- package/dist/view-renderer/src/errors.js +8 -0
- package/dist/view-renderer/src/host.tsx +173 -0
- package/dist/view-renderer/src/index.js +4 -0
- package/dist/view-renderer/src/pool.js +76 -0
- package/dist/view-renderer/src/remote-broker.js +59 -0
- package/dist/view-renderer/src/renderer.js +201 -0
- package/package.json +25 -8
- package/skills/notis-apps/cli.md +406 -0
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +39 -0
- package/skills/notis-onboarding/BRIEF.md +133 -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 +1476 -203
- package/src/command-specs/auth.js +114 -137
- package/src/command-specs/diagnostics.js +730 -0
- package/src/command-specs/files.js +29 -0
- package/src/command-specs/handover.js +374 -0
- package/src/command-specs/helpers.js +86 -82
- package/src/command-specs/index.js +31 -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/skills.js +304 -0
- package/src/command-specs/smoke.js +386 -0
- package/src/command-specs/spaces.js +572 -0
- package/src/command-specs/tools.js +455 -139
- package/src/command-specs/views.js +69 -0
- package/src/runtime/agent-browser.js +700 -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 +407 -0
- package/src/runtime/app-changelog.js +79 -0
- package/src/runtime/app-data-literals.js +82 -0
- package/src/runtime/app-platform.js +2752 -237
- 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/confined-space-build.js +74 -0
- package/src/runtime/confined-space-verify.js +49 -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/native-record-files.js +47 -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/retired-sdk-files.js +20 -0
- package/src/runtime/screenshot-framing.js +85 -0
- package/src/runtime/skill-sync/cloud-client.ts +121 -0
- package/src/runtime/skill-sync/index.ts +905 -0
- package/src/runtime/skill-sync/local-scanner.ts +1259 -0
- package/src/runtime/skill-sync/native-identity.ts +102 -0
- package/src/runtime/skill-sync/native-plan.ts +59 -0
- package/src/runtime/skill-sync/symlink-manager.ts +433 -0
- package/src/runtime/skill-sync/sync-plan.ts +54 -0
- package/src/runtime/skill-sync/types.ts +157 -0
- package/src/runtime/skill-sync/write-cloud-skill.ts +50 -0
- package/src/runtime/skill-sync-service.js +109 -0
- package/src/runtime/source-root.js +32 -0
- package/src/runtime/space-collection-scaffold.js +66 -0
- package/src/runtime/space-database-structures.js +229 -0
- package/src/runtime/space-fixture-broker.js +50 -0
- package/src/runtime/space-lock.js +337 -0
- package/src/runtime/space-platform.js +105 -0
- package/src/runtime/space-source.js +281 -0
- package/src/runtime/space-test-server.js +327 -0
- package/src/runtime/space-verification.js +89 -0
- package/src/runtime/space-verify-browser-worker.js +51 -0
- package/src/runtime/space-view-manifest.js +254 -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 +331 -45
- package/src/runtime/view-render.js +49 -0
- package/src/skill-sync-worker-entry.js +2 -0
- package/src/skill-sync-worker.js +50 -0
- package/src/space-harness-host.ts +103 -0
- package/template/.harness/index.html.tmpl +435 -0
- package/template/CHANGELOG.md +5 -0
- package/template/app/globals.css +29 -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/useNotis.ts +0 -31
- package/template/packages/notis-sdk/src/hooks/useNotisNavigation.ts +0 -49
- 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,116 @@
|
|
|
1
|
+
# SDK reference for Space views
|
|
2
|
+
|
|
3
|
+
Import hooks/components from `@notis/sdk`; configuration helpers are in
|
|
4
|
+
`@notis/sdk/config`. `NotisProvider` already installs shortcut support. Use the
|
|
5
|
+
scoped host runtime—source never owns an account credential or backend transport.
|
|
6
|
+
|
|
7
|
+
## Records and declared reads
|
|
8
|
+
|
|
9
|
+
| API | Use |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `useViewParams<typeof definition>()` | `{params, invalid, missing, declared, ready}` for declared typed URL params. Unknown names are dropped; invalid values use their declared default. |
|
|
12
|
+
| `useShown<Row>(name, options?)` | Execute the native list in `shows[name]` with current params. Options: `sorts`, `pageSize`, `offset`, `includeContent`; result includes `data`, `loading`, `hasData`, `error`, `refetch`. |
|
|
13
|
+
| `useShownAvailable(name)` | Check whether this host exposes the declared native list. A record Site can expose only its exact server-pinned row scope. |
|
|
14
|
+
| `useAction<Inputs, Result>(name)` / `useActionQuery<Result>(name, inputs)` | Call a declared action; identify read-only calls explicitly and retain request IDs/revisions for writes. Never call account-wide tools from a Space. |
|
|
15
|
+
| `useNativeDocumentBody(binding, recordKey, {readAction, writeAction?, enabled?})` | Markdown body adapter. Keep drafts in the view; save with the original content, record/schema revisions and stable request ID. Rich editing normally uses `DocumentEditor`. |
|
|
16
|
+
| `useNotis()` | Host resource, Space/app labels, route and ready state. Use `resource.id` for the current Space identity. |
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
const { resource } = useNotis();
|
|
20
|
+
const nav = useNotisNavigation();
|
|
21
|
+
const { params } = useViewParams<typeof definition>();
|
|
22
|
+
const rows = useShown<{ record_key: string; title: string | null }>('notes');
|
|
23
|
+
// In the row's click handler:
|
|
24
|
+
nav.toSpace(resource.id, { recordKey: row.record_key });
|
|
25
|
+
// In the record branch:
|
|
26
|
+
<DocumentPage recordKey={params.note} breadcrumb={[{ label: 'All notes', onSelect: () => nav.toSpace(resource.id) }]} />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Keep hooks unconditional. Preserve cached content during refresh; `loading` is
|
|
30
|
+
first-read state, not every fetch. Use [Design](design.md#instant-view-loading-contract-required)
|
|
31
|
+
for loading/error/empty states and explicit read caching.
|
|
32
|
+
|
|
33
|
+
## First-party record components
|
|
34
|
+
|
|
35
|
+
| Component | Contract |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `<DocumentPage recordKey>` | The full page of a record that is the view's main content (a note, a document): breadcrumb, Saving or Saved, '...' menu, cover, icon, title, meta strip, properties that save automatically, collaborative body. Slots `breadcrumb`, `actions`, `menuItems`, `aboveBody`, `belowBody`; toggles `share` (off by default), `header`, `meta`, `properties`, `width`; `onSaved`; `layout` to rearrange its parts. Pair with `DocumentPageSkeleton` and `usePrefetchRecord()`. Until the Notis CLI you build with exports it (`spaces build` replaces the Space's `packages/sdk` with the CLI's own SDK, and older ones have no `DocumentPage`, so the import fails the build), reach the same host page through `useNotisRuntime().ui?.DocumentPage` and fall back to `DocumentEditor` when it is missing, as the Notes Spaces do in `lib/document-page.tsx`. |
|
|
38
|
+
| `<DocumentEditor recordKey>` | Native collaborative body, properties, images and attachments. With separate properties use `showProperties={false}`. |
|
|
39
|
+
| `<RecordProperties recordKey>` | Native revision-checked property editing. |
|
|
40
|
+
| `<HtmlFrame recordKey>` | Attached HTML under viewer CSP and an opaque-origin sandbox. Source cannot relax that boundary. |
|
|
41
|
+
| `<ReportFrame recordKey>` | A report row's saved independent implementation in its database's current view. |
|
|
42
|
+
| `<ShareControl recordKey>` | Private/shared record Site, copy link and revoke. |
|
|
43
|
+
|
|
44
|
+
The published Space declares the database binding; the server rechecks record
|
|
45
|
+
scope and binding revision. A Site exposes read-only body/property snapshots and
|
|
46
|
+
HTML for its pinned record, including a declared non-collection record param.
|
|
47
|
+
It has no upload, collaboration credential, authoring controls or sharing mutation.
|
|
48
|
+
Preview source does not gain live record editing. No app-owned credentials or
|
|
49
|
+
filesystem URLs belong in component props.
|
|
50
|
+
|
|
51
|
+
## Navigation
|
|
52
|
+
|
|
53
|
+
`useNotisNavigation()` exposes `toSpace(spaceId, {recordKey?, params?})` and
|
|
54
|
+
`toNamedSpace(alias, {recordKey?, params?})`. Prefer declared portable navigation
|
|
55
|
+
aliases for sibling destinations; the host resolves them under current access.
|
|
56
|
+
Use declared params for view state, for example `{params: {project: key, period: 'week'}}`.
|
|
57
|
+
The destination drops unknown params and authorizes referenced records. Changing
|
|
58
|
+
a slug cannot change identity. Agents cite current server-returned links.
|
|
59
|
+
|
|
60
|
+
## Viewer-only exploration
|
|
61
|
+
|
|
62
|
+
`viewerReads: ['databases', 'skills']` permits read-only inspection of what the
|
|
63
|
+
signed-in viewer already reaches. It creates no shared grant. Use
|
|
64
|
+
`useViewerReadAvailable(family)`, `useViewerDatabases`, `useViewerSkills`, or
|
|
65
|
+
`useViewerRead(operation, input)`. Anonymous Sites cannot use these families.
|
|
66
|
+
Explicit synthetic `viewerReads` fixtures stand in for the viewer's reads offline.
|
|
67
|
+
|
|
68
|
+
## The viewer's cloud computer
|
|
69
|
+
|
|
70
|
+
`cloudComputer: 'shell'` (or `'read'` for facts only) lets a page run one command
|
|
71
|
+
or write one file on the signed-in viewer's own cloud computer, after that viewer
|
|
72
|
+
allows it in the Portal prompt. Use `useCloudComputerShell()`: check `level`, call
|
|
73
|
+
`requestApproval()` when `approved` is false (either level; the facts of
|
|
74
|
+
`useCloudComputer()` are read again once allowed), then, when `available` (`shell`),
|
|
75
|
+
`run(command, options)` or
|
|
76
|
+
`upload({ path, content, content_encoding: 'base64', mode: 0o600 })`. Never put
|
|
77
|
+
secrets in a command; send them as upload content. A run is never repeated for one
|
|
78
|
+
request key: pass `requestId` (run option, or `request_id` in the upload) when the
|
|
79
|
+
page retries a run itself; `cloud_computer_already_ran` means it already ran. The
|
|
80
|
+
approval covers only the exact code the viewer allowed, so every new release asks again. Keep a fallback (a Manager
|
|
81
|
+
draft) for Sites, previews offline and viewers who do not allow it. Declare it only
|
|
82
|
+
when the page's core controls run on the cloud computer.
|
|
83
|
+
|
|
84
|
+
## Visual data and Markdown
|
|
85
|
+
|
|
86
|
+
`<RenderChartData title columns rows>` adds a semantic table for the chart without
|
|
87
|
+
a second visible table. Give it the same labels/values used by the chart. The
|
|
88
|
+
renderer never guesses exact numbers from SVG/canvas geometry: a chart without
|
|
89
|
+
`RenderChartData` contributes only its accessible name to the Markdown.
|
|
90
|
+
|
|
91
|
+
An optional `markdown` source module exports a pure function of `{params, shown}`.
|
|
92
|
+
It must describe the rendered selection and its actual data. Ordinary rendering
|
|
93
|
+
extracts tables, lists, controls and visible document/HTML content automatically.
|
|
94
|
+
|
|
95
|
+
## Host interactions and context
|
|
96
|
+
|
|
97
|
+
- `useHandover()` exposes `{handover, available, pending, error}`. Call a declared
|
|
98
|
+
linked Skill with `handover({skill, prompt})`; fall back when no agent UI exists.
|
|
99
|
+
- `useTopBarSearch` registers a host-owned search field. Do not duplicate host chrome.
|
|
100
|
+
- `useActiveResource` publishes the current resource; `useAgentContext`,
|
|
101
|
+
`NotisSelectionBoundary`, `NotisCommentBoundary` and `NotisCommentBox` support
|
|
102
|
+
explicit reference context. [Context sharing](context.md) owns the contract.
|
|
103
|
+
- `useCollectionInteractions`, selection components and `MultiSelectActionBar`
|
|
104
|
+
support native collection interactions. `Dialog` supplies themed top-layer
|
|
105
|
+
dialogs, focus handling and shortcut isolation.
|
|
106
|
+
- `MarkdownEditor` is for a view-owned Markdown draft/persistence adapter. Native
|
|
107
|
+
documents use `DocumentEditor` so collaboration and file authority stay with Notis.
|
|
108
|
+
|
|
109
|
+
## Offline fixtures
|
|
110
|
+
|
|
111
|
+
Declare a `verificationFixtures` JSON source with `actions` and optional `context`,
|
|
112
|
+
`shown`, `viewerReads`, `documentBodies`, `recordViews`. Cases match exact action
|
|
113
|
+
inputs/list params. Record views use `{operation: 'record'|'html'|'report', record_key,
|
|
114
|
+
result}`; native record snapshots require `writable: false` and no authoring target.
|
|
115
|
+
Keep every fixture fictional and include every load-time read. Failed or missing
|
|
116
|
+
fixtures fail verification; there is no fallback to the user's real account.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Start with the actual failing operation and its exact Space, source/record
|
|
4
|
+
revision and current target. [Delivery](release.md) owns the release sequence.
|
|
5
|
+
|
|
6
|
+
| Failure | Check |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| Build rejects a view | Required `specVersion`, path, descriptions, params, executable shows and memory; use the file/line diagnostic. |
|
|
9
|
+
| Main-view conflict | Inspect current database links/main view. Move the existing claim explicitly or retain it; do not remove main just to publish. |
|
|
10
|
+
| Source creation fails | Check its canonical schema and same-view main record param. Verify creates no resource; promotion is atomic. |
|
|
11
|
+
| View-link warning after a successful write | Use `FIND_VIEWS` with the returned record key. The write is already committed; do not insert again. |
|
|
12
|
+
| Empty list or missing properties | Inspect the live schema, filter, authorized binding and returned projection. Distinguish a successful empty result from a denied/failed read. |
|
|
13
|
+
| Verification fails on a read | Add the exact fictional case to the selected fixture file. Never fill missing fixtures with live private data. |
|
|
14
|
+
| A caught write-on-load fails rendering | Remove the side effect from initial rendering. A read-only check cannot authorize writes. |
|
|
15
|
+
| Stale binding/schema/record | Read current state, preserve the original receipt/intent and merge the intended edit. Do not overwrite concurrent changes. |
|
|
16
|
+
| Old code in Workspace | Read the published revision and requested bundle; source edits or restarting Desktop do not deploy it. |
|
|
17
|
+
| Uncertain deployment | Run `notis doctor`, read the same Space and release/request identity, then reconcile before retrying. |
|
|
18
|
+
| Screenshot misses content | Inspect actual inner scrolling, lazy data and frame layout; keep full-height limits and treat a failed capture as unverified. |
|
|
19
|
+
| Site unexpectedly has editor controls | Recheck the anonymous scoped runtime. A Site cannot borrow an ambient signed-in session or another record's authority. |
|
|
20
|
+
| Memory hit looks current but access/freshness is unknown | Render its current link and verify the relevant value. Do not release historical content from an unverified read set. |
|
|
21
|
+
|
|
22
|
+
For visual defects, compare the installed page at 390px and 1440px in EN/FR,
|
|
23
|
+
including loading, empty and error states. A standalone harness cannot certify
|
|
24
|
+
the Portal parent layout, collaboration or public Site behavior.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# View authoring
|
|
2
|
+
|
|
3
|
+
A view is the presentation of a Space. A record opens in a view; its database has
|
|
4
|
+
one main view. Words in links describe the destination, while IDs choose it.
|
|
5
|
+
Get links from write results or `LOCAL_NOTIS_FIND_VIEWS`, not by joining labels.
|
|
6
|
+
|
|
7
|
+
## Start from the collection scaffold
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
notis spaces init "Notes" ./notes --database-key notes --path notes
|
|
11
|
+
notis spaces build ./notes --space collection
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`init` is local only. For an existing Space, pull its exact ID instead. Keep its
|
|
15
|
+
lock and local source key; one build/deploy changes that selected Space only.
|
|
16
|
+
A container has children but no page; page-only params/shows/memory belong on views.
|
|
17
|
+
|
|
18
|
+
## A complete view declaration
|
|
19
|
+
|
|
20
|
+
The linked `notes` resource below must already resolve to this installation's
|
|
21
|
+
native database. Descriptions explain what a person or agent can do here.
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { defineSpace } from '@notis/sdk/config';
|
|
25
|
+
|
|
26
|
+
export default defineSpace({
|
|
27
|
+
specVersion: 2,
|
|
28
|
+
name: 'Notes',
|
|
29
|
+
path: 'notes',
|
|
30
|
+
description: 'Browse notes and open one with its files.',
|
|
31
|
+
readableContext: 'The note parameter opens one note. The list shows all notes available through this Space.',
|
|
32
|
+
entry: './view.tsx',
|
|
33
|
+
resources: { notes: { kind: 'database', key: 'notes' } },
|
|
34
|
+
collection: { database: 'notes', titleProperty: 'title' },
|
|
35
|
+
params: {
|
|
36
|
+
note: { type: 'record', database: 'notes', main: true,
|
|
37
|
+
description: 'The note to open beside the list.' },
|
|
38
|
+
},
|
|
39
|
+
shows: { notes: { database: 'notes', where: {}, open: 'note' } },
|
|
40
|
+
memory: { markdown: true, attachments: true, screenshot: false, snapshots: [] },
|
|
41
|
+
actions: {
|
|
42
|
+
read: {
|
|
43
|
+
tool: 'LOCAL_NOTIS_DATABASE_QUERY',
|
|
44
|
+
inputs: { type: 'object', additionalProperties: false,
|
|
45
|
+
required: ['request'], properties: { request: {
|
|
46
|
+
type: 'object', additionalProperties: false,
|
|
47
|
+
required: ['filter', 'page_size', 'include_content'],
|
|
48
|
+
properties: {
|
|
49
|
+
filter: { type: 'object', additionalProperties: false,
|
|
50
|
+
required: ['field', 'op', 'value'], properties: {
|
|
51
|
+
field: { type: 'object', additionalProperties: false,
|
|
52
|
+
required: ['column'], properties: { column: { const: 'record_key' } } },
|
|
53
|
+
op: { const: 'equals' }, value: { type: 'string', format: 'uuid' },
|
|
54
|
+
} },
|
|
55
|
+
page_size: { const: 1 }, include_content: { const: true },
|
|
56
|
+
},
|
|
57
|
+
} } },
|
|
58
|
+
arguments: { database_id: { $asset: 'notes' }, request: { $input: 'request' } },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Use `useViewParams<typeof definition>()`, `useShown('notes')`, and
|
|
65
|
+
`<DocumentPage recordKey={params.note}>` (the whole note page; use `DocumentEditor` only to embed a body
|
|
66
|
+
inside a layout of your own; if `spaces build` reports no `DocumentPage` export, your CLI predates it: use
|
|
67
|
+
`useNotisRuntime().ui?.DocumentPage` with a `DocumentEditor` fallback, see the SDK reference). Keep hooks unconditional; conditional
|
|
68
|
+
record/list branches can be separate components. The SDK reference covers the
|
|
69
|
+
components and exact navigation helpers. The saved `read` action is deliberately
|
|
70
|
+
constrained to one native record for body/Site reads; `shows.notes` owns the
|
|
71
|
+
Editor’s collection list. Keep both tied to the same declared resource.
|
|
72
|
+
|
|
73
|
+
## Params and declared lists
|
|
74
|
+
|
|
75
|
+
- Param types: `record`, `enum`, `text`, `number`, `date`, `boolean`. Each needs a
|
|
76
|
+
description. Enum values and defaults are typed; a required param has no default.
|
|
77
|
+
- Record params name a declared database and have no default record. `main: true`
|
|
78
|
+
claims that database's main view. `slugProperty` is a title/number property used
|
|
79
|
+
for readable link text, not record identity.
|
|
80
|
+
- `path` is descriptive lowercase words, up to four slash-separated segments;
|
|
81
|
+
do not put IDs, credentials or reserved product routes in it.
|
|
82
|
+
- `shows` for native data is `{database, where, open?}`. `where` is the native filter
|
|
83
|
+
grammar and is what `useShown` executes, not commentary beside a different query.
|
|
84
|
+
`open` names a record param over the same database.
|
|
85
|
+
- A project-scoped task list can use
|
|
86
|
+
`{field: {property: 'Project'}, op: 'contains', value: '{project}'}` with a declared
|
|
87
|
+
project record param. `{project.Status}` reads a property of that authorized record.
|
|
88
|
+
- For connected-service content use `{about, services?}` and declared actions.
|
|
89
|
+
This descriptive form is not a native executable list; use `useAction` for reads.
|
|
90
|
+
- Preserve the application's real semantics and option names. For the existing
|
|
91
|
+
Tasks migration, Inbox is **Project empty OR Status equals Inbox**. Keep imported
|
|
92
|
+
rows, statuses and creation defaults; add the Inbox option only if absent. Its
|
|
93
|
+
native filter is `{or: [{field: {property: 'Project'}, op: 'is_empty'},
|
|
94
|
+
{field: {property: 'Status'}, op: 'equals', value: 'Inbox'}]}`. Other applications
|
|
95
|
+
must use their own inspected schema rather than copying these labels blindly.
|
|
96
|
+
|
|
97
|
+
## Create a database in the same release
|
|
98
|
+
|
|
99
|
+
Replace an existing database reference with:
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
resources: {
|
|
103
|
+
notes: { kind: 'database', create: {
|
|
104
|
+
name: 'Notes',
|
|
105
|
+
schema: {
|
|
106
|
+
schema_version: 1, value_encoding_version: 1, coercion_version: 1,
|
|
107
|
+
title_property_id: 'title', property_order: ['title'],
|
|
108
|
+
properties: { title: { id: 'title', name: 'Name', kind: 'title',
|
|
109
|
+
storage_family: 'textish', description: '', order: 0, config: {} } },
|
|
110
|
+
},
|
|
111
|
+
} },
|
|
112
|
+
},
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The same view declares a record param over `notes` with `main: true`. Promotion
|
|
116
|
+
creates the database, link, main view, optional fictional `starterRows` and source
|
|
117
|
+
atomically; a later failure leaves none of them behind. Verification does not create
|
|
118
|
+
it. `create` is creation-only: later schema edits use native database tools;
|
|
119
|
+
`spaces pull` refreshes the declaration from the live schema.
|
|
120
|
+
|
|
121
|
+
The separate native schema-tool creation route requires `links.add` and
|
|
122
|
+
`main_view: {space_id, param}` in that linked Space. Until the Space next deploys
|
|
123
|
+
that main param, record links open the Space and writes return `view_warning`.
|
|
124
|
+
Inspect current tools for exact argument shapes; do not repeatedly insert rows
|
|
125
|
+
because a pending main view cannot yet open one.
|
|
126
|
+
|
|
127
|
+
## Rendering and memory
|
|
128
|
+
|
|
129
|
+
Choose [memory](memory.md) deliberately. `chrome: 'hidden'` is for full-screen
|
|
130
|
+
presentations such as the HTML Space; ordinary collection views keep Portal chrome.
|
|
131
|
+
A Space whose published view hides chrome starts hidden from each person's sidebar,
|
|
132
|
+
like Skill review Spaces; it stays reachable by link and search, and each person
|
|
133
|
+
can show it from the sidebar's hidden Spaces list or the Space's menu.
|
|
134
|
+
Optional `markdown: './markdown.ts'` names a module exporting a pure function of
|
|
135
|
+
`{params, shown}`. Its output must represent this view, not make hidden writes.
|
|
136
|
+
Use `<RenderChartData>` with the chart's actual rows so rendered Markdown contains
|
|
137
|
+
precise labels and values as well as its image.
|
|
138
|
+
|
|
139
|
+
Add synthetic action/list/body/record fixtures, then build and verify. Verification
|
|
140
|
+
and live rendering share the read-only renderer; fixture success does not prove
|
|
141
|
+
live permissions or data. After an authorized deploy, render the returned view link
|
|
142
|
+
with `notis views render` and inspect both the Markdown and full-height screenshot.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notis-cli
|
|
3
|
+
description: Use when agents should work through the Notis CLI, especially to develop Notis Spaces 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 Spaces (views, their source and linked Skills) 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, pull, build, verify, preview, deploy or promote a Notis Space 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
|
+
- [Space 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,19 @@
|
|
|
1
|
+
# Space 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 Space development
|
|
8
|
+
|
|
9
|
+
When building or deploying a Space, do NOT use `npx --package @notis_ai/cli@latest -- notis tools exec` for source operations:
|
|
10
|
+
|
|
11
|
+
- Loading, building or publishing source -- use `notis spaces pull`, `spaces build`, `spaces verify`, `spaces preview`, `spaces deploy` and `spaces promote` as the release guide orders them
|
|
12
|
+
- Validating views -- `spaces build` and `spaces verify` check declarations, fixtures and renders
|
|
13
|
+
- Writing pages -- write standard Vite + React views with `@notis/sdk`, not raw JS files
|
|
14
|
+
|
|
15
|
+
Database schemas have two routes: the native database tool (create with `links.add`
|
|
16
|
+
and `main_view`), or a `create` declaration in Space source that the deploy applies
|
|
17
|
+
atomically. Tool calls are also valid for testing runtime behavior after deployment.
|
|
18
|
+
`notis apps` is the legacy App group for accounts not yet moved to Spaces; a legacy
|
|
19
|
+
App cannot declare Skills.
|
|
@@ -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. A new database is linked to a Space in the same call (`links.add`) and names its main view; change a database used in Spaces through protocol 1 with its exact Space binding target
|
|
9
|
+
- `LOCAL_NOTIS_DATABASE_DELETE_DATABASE` -- permanently delete a database and all its rows by `database_id`. It is refused for every database a Space links (`database_linked_to_space`: move it instead; a database used only in one Space is deleted with that Space from the bin), for a legacy App 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 a Space view:
|
|
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_id":"<id from LIST_DATABASES>"}'
|
|
18
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"protocol":1,"target":{"space_id":"<space id>","binding":"<binding id>"},"input":{"mode":"rows","page_size":1}}'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Most databases are used in Spaces. Such a database is read only through one of its links: `GET_DATABASE` with a bare `database_id` returns `resolved_target` (the main view's `{space_id, binding}`), and a bare-id `QUERY` answers `database_in_spaces` with every link. Reuse that exact target with `protocol: 1`. Every database lives in a Space; a `database_slug` resolves among every database you can reach, and a slug several of them share answers `database_slug_ambiguous` with each `database_id` and its Spaces.
|
|
@@ -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_id":"<tasks database id>"}'
|
|
36
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --dry-run --arguments '{"protocol":1,"target":{"space_id":"<space id>","binding":"<binding id>"},"input":{"mode":"rows","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_id":"<tasks database id>"}'
|
|
43
|
+
npx --package @notis_ai/cli@latest -- notis tools exec LOCAL_NOTIS_DATABASE_QUERY --arguments '{"protocol":1,"target":{"space_id":"<space id>","binding":"<binding id>"},"input":{"mode":"rows","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
|
+
```
|