@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,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notis-query
|
|
3
|
+
description: Use when agents need to query native Notis databases with direct structured filters, sorts, and pagination through `LOCAL_NOTIS_DATABASE_QUERY`.
|
|
4
|
+
feature_flag: store
|
|
5
|
+
mcp_resource: true
|
|
6
|
+
mcp_tool_patterns: ["LOCAL_NOTIS_DATABASE_*"]
|
|
7
|
+
mcp_references: ["references/database-discovery.md", "references/documents.md", "references/query.md"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Notis Query Skill
|
|
11
|
+
|
|
12
|
+
Use this skill when the user wants to search, filter, sort, or page through records in a native Notis database and the task is best handled with structured criteria instead of semantic search.
|
|
13
|
+
|
|
14
|
+
This skill is the single source of truth for `LOCAL_NOTIS_DATABASE_QUERY`.
|
|
15
|
+
|
|
16
|
+
## Canonical contract source
|
|
17
|
+
|
|
18
|
+
For custom view runtime usage, the canonical contract is always MCP `tools/list` `inputSchema` for `LOCAL_NOTIS_DATABASE_QUERY`.
|
|
19
|
+
|
|
20
|
+
- Use `notisView.listTools()` (or MCP `tools/list`) to read the live schema.
|
|
21
|
+
- Use `notisView.callTool("LOCAL_NOTIS_DATABASE_QUERY", args)` (or MCP `tools/call`) with arguments that match that schema exactly.
|
|
22
|
+
- If this skill text and `inputSchema` ever differ, follow `inputSchema`.
|
|
23
|
+
|
|
24
|
+
This keeps query arguments aligned with the same tool definitions used by agent runtime and avoids maintaining duplicate schema formats.
|
|
25
|
+
|
|
26
|
+
## When to use `LOCAL_NOTIS_DATABASE_QUERY`
|
|
27
|
+
|
|
28
|
+
Use `LOCAL_NOTIS_DATABASE_QUERY` when:
|
|
29
|
+
|
|
30
|
+
- you already know the target native database
|
|
31
|
+
- the user wants structured filtering or sorting
|
|
32
|
+
- you need predictable pagination over database rows
|
|
33
|
+
- you need to find records before reading or updating a specific document
|
|
34
|
+
- you need to find matching records before calling `LOCAL_NOTIS_DATABASE_GET_DOCUMENT` or a generated database upsert tool
|
|
35
|
+
- the task should use direct database criteria instead of semantic memory search
|
|
36
|
+
|
|
37
|
+
Do not use `LOCAL_NOTIS_DATABASE_QUERY` when:
|
|
38
|
+
|
|
39
|
+
- the relevant database is unknown
|
|
40
|
+
- semantic search over broad workspace context is better
|
|
41
|
+
- the task points to one known document by `document_id` or portal URL
|
|
42
|
+
|
|
43
|
+
Use these tools together:
|
|
44
|
+
|
|
45
|
+
- `LOCAL_NOTIS_DATABASE_LIST_DATABASES` to discover available databases and confirm the slug
|
|
46
|
+
- `LOCAL_NOTIS_DATABASE_GET_DATABASE` to inspect read-only schema detail, ordered properties, options, and relation targets
|
|
47
|
+
- `LOCAL_NOTIS_DATABASE_QUERY` to find matching records
|
|
48
|
+
- `LOCAL_NOTIS_DATABASE_GET_DOCUMENT` to inspect one specific matching document in full
|
|
49
|
+
- generated database upsert tools to update or create records after you know the right document or relation IDs
|
|
50
|
+
|
|
51
|
+
Follow the same workflow and use the exact canonical tool names available in the current runtime.
|
|
52
|
+
|
|
53
|
+
Every database has one owning app; inspect its identity/schema before schema writes.
|
|
54
|
+
Known document IDs/URLs use the document guide, not a broad query. For queries,
|
|
55
|
+
use the query guide for exact filter/property/pagination rules; live inputSchema
|
|
56
|
+
is authoritative. Dry-run writes and read back the resulting state.
|
|
57
|
+
|
|
58
|
+
## Task guides
|
|
59
|
+
|
|
60
|
+
Read only the guide needed for this task. Relative links resolve in the skill bundle.
|
|
61
|
+
For hosted MCP, fetch the matching `notis://docs/notis-query/references/<file>.md` URI
|
|
62
|
+
with resources/read or the available Notis resource-fetch tool; the root resource
|
|
63
|
+
also rewrites these links to their published URIs.
|
|
64
|
+
|
|
65
|
+
- [Native Database Workflow](references/database-discovery.md)
|
|
66
|
+
- [Reading documents](references/documents.md)
|
|
67
|
+
- [Supported execution mode](references/query.md)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
## Native Database Workflow
|
|
2
|
+
|
|
3
|
+
### Listing databases
|
|
4
|
+
|
|
5
|
+
Use `LOCAL_NOTIS_DATABASE_LIST_DATABASES` (`notis_list_databases` in legacy
|
|
6
|
+
underscore-form references) when:
|
|
7
|
+
|
|
8
|
+
- you need to confirm which native databases exist
|
|
9
|
+
- you need the database ID or slug before querying or choosing an upsert tool
|
|
10
|
+
- you need database metadata such as name, description, or document counts
|
|
11
|
+
- the orchestrator asks what is available in the user's workspace
|
|
12
|
+
|
|
13
|
+
Always inspect the user's native Notis databases before creating schema updates or choosing where to save work.
|
|
14
|
+
|
|
15
|
+
### Creating databases
|
|
16
|
+
|
|
17
|
+
Use `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE` (`notis_upsert_database` in legacy
|
|
18
|
+
underscore-form references) to create or update native databases.
|
|
19
|
+
|
|
20
|
+
Every native database must belong to a Notis app. When creating a database,
|
|
21
|
+
pass the owning app's slug or id in the `app` field; if the user has no
|
|
22
|
+
suitable app yet, create one first with `LOCAL_NOTIS_CREATE_APP`. Updates do
|
|
23
|
+
not need the `app` field.
|
|
24
|
+
|
|
25
|
+
Define schemas with appropriate property types:
|
|
26
|
+
|
|
27
|
+
- `title`
|
|
28
|
+
- `rich_text`
|
|
29
|
+
- `select`
|
|
30
|
+
- `multi_select`
|
|
31
|
+
- `status`
|
|
32
|
+
- `checkbox`
|
|
33
|
+
- `date`
|
|
34
|
+
- `number`
|
|
35
|
+
- `url`
|
|
36
|
+
- `email`
|
|
37
|
+
- `phone_number`
|
|
38
|
+
- `relation`
|
|
39
|
+
|
|
40
|
+
When adding or updating a `relation` property, always pass the target database explicitly with `database_id`. Do not rely on description text to imply the relation target.
|
|
41
|
+
|
|
42
|
+
Example relation update:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"operation": "update",
|
|
47
|
+
"database_id": "tasks-db-id",
|
|
48
|
+
"properties": [
|
|
49
|
+
{
|
|
50
|
+
"property_id": "prop_list",
|
|
51
|
+
"name": "List",
|
|
52
|
+
"action": "update",
|
|
53
|
+
"type": "relation",
|
|
54
|
+
"database_id": "lists-db-id",
|
|
55
|
+
"description": "Relation to Lists"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Deleting databases
|
|
62
|
+
|
|
63
|
+
Use `LOCAL_NOTIS_DATABASE_DELETE_DATABASE` only when the user asked for a database
|
|
64
|
+
to be removed: it permanently deletes the database and every row, and cannot be
|
|
65
|
+
undone. Pass the exact `database_id` from `LOCAL_NOTIS_DATABASE_LIST_DATABASES`.
|
|
66
|
+
The tool refuses while another database has a relation property pointing to it or
|
|
67
|
+
an automation is triggered by it, and lists them; remove those first (delete the
|
|
68
|
+
relation property with `LOCAL_NOTIS_DATABASE_UPSERT_DATABASE`, action `remove`).
|
|
69
|
+
It also refuses a database its app declares, because the app recreates it empty the
|
|
70
|
+
next time it loads: remove it from the app's databases and deploy, or delete the app.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
### Reading documents
|
|
2
|
+
|
|
3
|
+
Use `LOCAL_NOTIS_DATABASE_GET_DOCUMENT` when:
|
|
4
|
+
|
|
5
|
+
- the task references a specific document by `document_id` or portal URL
|
|
6
|
+
- detailed content from a known document is needed
|
|
7
|
+
|
|
8
|
+
You may pass either a `document_id` or a portal URL such as `https://app.notis.ai/documents/abc123` or `/documents/abc123`.
|
|
9
|
+
|
|
10
|
+
## Native Document Handling
|
|
11
|
+
|
|
12
|
+
### Response requirements
|
|
13
|
+
|
|
14
|
+
- Always include the document title, database name, and a markdown portal link for any document you create or update.
|
|
15
|
+
- Never expose a raw `document_id` in your completion summary unless the user explicitly asked for it.
|
|
16
|
+
- Clearly state whether the document was created or updated.
|
|
17
|
+
- For updates, clearly state whether you replaced the original content or appended to the end.
|
|
18
|
+
|
|
19
|
+
### Upserting with relations
|
|
20
|
+
|
|
21
|
+
When upserting into a database that relates to another database, first query for the related record and use the returned `document_id` for the relation.
|
|
22
|
+
|
|
23
|
+
### Upserting complex documents
|
|
24
|
+
|
|
25
|
+
For copywriting-style work such as articles or social posts, try to find similar writing by the user and match the user's style and tone.
|
|
26
|
+
|
|
27
|
+
### Updating a document
|
|
28
|
+
|
|
29
|
+
1. Retrieve the current content with `LOCAL_NOTIS_DATABASE_GET_DOCUMENT`, `LOCAL_NOTIS_DATABASE_QUERY`, or `LOCAL_NOTIS_SEARCH_MEMORIES` with `memory_kind="native_document"`.
|
|
30
|
+
2. Use the relevant `LOCAL_NOTIS_DATABASE_UPSERT_<DATABASE_SLUG>` tool with the existing `document_id` so the document is updated instead of recreated.
|
|
31
|
+
3. For local edits to an existing document such as appending a bullet, inserting a paragraph, changing one section, or preserving structure, use `edit_mode = "block_operations"` instead of rewriting markdown.
|
|
32
|
+
4. When developer context includes a `<page_context ... resource_type="document" ...>` tag, treat that as the currently open document and fetch it before asking the user for any identifier again.
|
|
33
|
+
|
|
34
|
+
### Default upsert preferences
|
|
35
|
+
|
|
36
|
+
As long as they do not conflict with the user's intent, the existing document style, or the tool contract:
|
|
37
|
+
|
|
38
|
+
- Prefer updating existing documents over creating new ones when the user asked for a modification.
|
|
39
|
+
- Use `replace = true` to replace content and `replace = false` to append when you are in markdown mode.
|
|
40
|
+
- When the user asked to append, insert, tweak, or preserve the rest of an existing document, prefer `block_operations` with `insert_blocks`, `update_block`, `replace_blocks`, or `remove_blocks`.
|
|
41
|
+
- Do not use markdown rewrite mode for surgical edits unless block operations are genuinely impossible for the requested change.
|
|
42
|
+
- Reorganize messy thoughts into a clearer structure.
|
|
43
|
+
- Highlight essential concepts and extract action items.
|
|
44
|
+
- Format notes with markdown titles, subheadings, bold text, blockquotes, ordered lists, and unordered lists when helpful.
|
|
45
|
+
- Add useful insight, challenge weak reasoning, debunk false claims, or enrich the content when appropriate.
|
|
46
|
+
- Fill in missing information the user asked you to complete when the context supports it.
|
|
47
|
+
- Imitate the user's voice when you can infer it from semantic memory search with `memory_kind="native_document"` or existing document context.
|
|
48
|
+
- Save images in document content using standard markdown and in URL properties when relevant.
|
|
49
|
+
- Do not place videos inside document content. Store them only in media properties.
|
|
50
|
+
- Do not add a custom emoji or cover unless the user requested one.
|