@agent-native/core 0.114.0 → 0.114.2
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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +15 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/create.ts +23 -0
- package/corpus/core/src/cli/skills.ts +24 -0
- package/corpus/core/src/client/build-compatibility.ts +77 -0
- package/corpus/core/src/client/route-chunk-recovery/index.ts +1 -0
- package/corpus/core/src/client/use-action.ts +32 -1
- package/corpus/core/src/deploy/build.ts +4 -1
- package/corpus/core/src/org/context.ts +56 -30
- package/corpus/core/src/server/action-routes.ts +52 -2
- package/corpus/core/src/server/auth-plugin.ts +9 -4
- package/corpus/core/src/server/better-auth-instance.ts +5 -1
- package/corpus/core/src/shared/mcp-embed-headers.ts +1 -1
- package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/core/src/templates/default/AGENTS.md +4 -1
- package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/core/src/templates/headless/AGENTS.md +5 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +26 -0
- package/corpus/core/src/templates/workspace-core/AGENTS.md +3 -1
- package/corpus/core/src/templates/workspace-root/AGENTS.md +3 -1
- package/corpus/core/src/vite/client.ts +17 -0
- package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/analytics/AGENTS.md +5 -0
- package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/assets/AGENTS.md +5 -0
- package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/brain/AGENTS.md +5 -0
- package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/calendar/AGENTS.md +5 -0
- package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/chat/AGENTS.md +4 -1
- package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/clips/AGENTS.md +5 -0
- package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/content/AGENTS.md +7 -0
- package/corpus/templates/content/actions/_content-database-personal-view.ts +49 -5
- package/corpus/templates/content/actions/_content-document-access.ts +21 -0
- package/corpus/templates/content/actions/_content-favorites.ts +91 -0
- package/corpus/templates/content/actions/_content-files.ts +79 -23
- package/corpus/templates/content/actions/_content-sidebar-state.ts +24 -0
- package/corpus/templates/content/actions/_content-space-access.ts +15 -17
- package/corpus/templates/content/actions/_content-space-catalog-guards.ts +20 -0
- package/corpus/templates/content/actions/_content-spaces.ts +364 -167
- package/corpus/templates/content/actions/_database-source-utils.ts +8 -0
- package/corpus/templates/content/actions/_database-utils.ts +249 -15
- package/corpus/templates/content/actions/_delete-content-space.ts +84 -0
- package/corpus/templates/content/actions/_files-system-properties.ts +499 -0
- package/corpus/templates/content/actions/_local-file-documents.ts +0 -1
- package/corpus/templates/content/actions/_property-utils.ts +18 -9
- package/corpus/templates/content/actions/bind-content-database-source-field.ts +3 -0
- package/corpus/templates/content/actions/configure-document-property.ts +3 -0
- package/corpus/templates/content/actions/create-content-database.ts +2 -2
- package/corpus/templates/content/actions/create-content-space.ts +34 -0
- package/corpus/templates/content/actions/create-document.ts +4 -1
- package/corpus/templates/content/actions/delete-content-space.ts +19 -0
- package/corpus/templates/content/actions/delete-database-items.ts +28 -1
- package/corpus/templates/content/actions/delete-document-property.ts +3 -0
- package/corpus/templates/content/actions/delete-document.ts +39 -2
- package/corpus/templates/content/actions/duplicate-database-item.ts +6 -0
- package/corpus/templates/content/actions/duplicate-database-items.ts +6 -0
- package/corpus/templates/content/actions/duplicate-document-property.ts +3 -0
- package/corpus/templates/content/actions/get-content-database.ts +11 -2
- package/corpus/templates/content/actions/get-content-sidebar-state.ts +23 -0
- package/corpus/templates/content/actions/get-document.ts +32 -7
- package/corpus/templates/content/actions/import-content-source.ts +33 -1
- package/corpus/templates/content/actions/list-content-spaces.ts +34 -2
- package/corpus/templates/content/actions/list-documents.ts +39 -7
- package/corpus/templates/content/actions/reorder-document-property.ts +9 -0
- package/corpus/templates/content/actions/set-document-property.ts +41 -23
- package/corpus/templates/content/actions/share-local-file-document.ts +15 -0
- package/corpus/templates/content/actions/submit-content-database-form.ts +7 -0
- package/corpus/templates/content/actions/sync-local-folder-source.ts +14 -0
- package/corpus/templates/content/actions/update-content-database-view.ts +1 -0
- package/corpus/templates/content/actions/update-content-sidebar-state.ts +27 -0
- package/corpus/templates/content/actions/update-document.ts +158 -66
- package/corpus/templates/content/app/components/EmptyState.tsx +4 -57
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +8 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +519 -178
- package/corpus/templates/content/app/components/editor/DocumentInfoPanel.tsx +39 -0
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +266 -7
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +430 -152
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +467 -66
- package/corpus/templates/content/app/components/editor/database/view-config.ts +9 -3
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +720 -196
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +173 -1
- package/corpus/templates/content/app/components/sidebar/document-sidebar-sections.ts +1 -1
- package/corpus/templates/content/app/components/sidebar/select-content-space.ts +91 -16
- package/corpus/templates/content/app/entry.client.tsx +5 -1
- package/corpus/templates/content/app/hooks/use-content-database.ts +84 -3
- package/corpus/templates/content/app/hooks/use-content-spaces.ts +60 -2
- package/corpus/templates/content/app/hooks/use-create-page.ts +30 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +270 -19
- package/corpus/templates/content/app/i18n-data.ts +243 -20
- package/corpus/templates/content/app/lib/local-folder-picker-safety.ts +54 -0
- package/corpus/templates/content/app/lib/local-folder-picker-support.ts +18 -0
- package/corpus/templates/content/app/routes/_app.favorites.tsx +30 -0
- package/corpus/templates/content/app/routes/_app.local-files.tsx +18 -6
- package/corpus/templates/content/changelog/2026-07-17-workspace-files-now-stay-in-a-loading-state-until-automatic-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-17-workspace-switching-now-opens-the-selected-files-database-pr.md +6 -0
- package/corpus/templates/content/changelog/2026-07-17-workspaces-now-expand-above-their-own-files-list-without-dup.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-create-named-workspaces-each-with-its-own-private-files-data.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-favorites-align-with-workspace-and-file-rows-in-the-sidebar.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-local-folder-selection-no-longer-invokes-the-unsafe-native-p.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-made-content-workspaces-independently-expandable-restored-or.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-page-details-now-live-in-a-shared-info-and-comments-rail-dat.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-workspace-database-views-now-control-sidebar-workspace-navig.md +6 -0
- package/corpus/templates/content/changelog/2026-07-18-workspace-navigation-now-aligns-favorites-with-workspace-pag.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-favorites-now-open-as-a-table-and-compact-breadcrumbs-make-w.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-files-databases-now-start-unfiltered-sidebar-rows-exactly-fo.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-sidebar-page-trees-now-open-only-when-expanded-remember-thei.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-workspace-file-databases-now-use-the-workspace-name-open-as-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-workspace-navigation-now-stays-stable-on-hover-uses-folder-i.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-workspace-rows-now-use-folder-icons-and-deleting-a-user-crea.md +6 -0
- package/corpus/templates/content/changelog/2026-07-19-workspaces-can-be-created-without-leaving-the-workspaces-dat.md +6 -0
- package/corpus/templates/content/e2e/global-setup.ts +3 -2
- package/corpus/templates/content/parity/matrix.md +28 -28
- package/corpus/templates/content/parity/matrix.ts +8 -2
- package/corpus/templates/content/server/db/index.ts +1 -0
- package/corpus/templates/content/server/db/schema.ts +10 -0
- package/corpus/templates/content/server/lib/documents.ts +12 -7
- package/corpus/templates/content/server/plugins/db.ts +17 -0
- package/corpus/templates/content/shared/api.ts +9 -0
- package/corpus/templates/content/shared/database-form.ts +11 -2
- package/corpus/templates/content/vite.config.ts +1 -0
- package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/design/AGENTS.md +5 -0
- package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/dispatch/AGENTS.md +5 -0
- package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/forms/AGENTS.md +5 -0
- package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/macros/AGENTS.md +5 -0
- package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/mail/AGENTS.md +5 -0
- package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/plan/AGENTS.md +5 -0
- package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/slides/AGENTS.md +5 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/corpus/templates/tasks/AGENTS.md +5 -0
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +21 -0
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +19 -0
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/build-compatibility.d.ts +11 -0
- package/dist/client/build-compatibility.d.ts.map +1 -0
- package/dist/client/build-compatibility.js +56 -0
- package/dist/client/build-compatibility.js.map +1 -0
- package/dist/client/route-chunk-recovery/index.d.ts +1 -0
- package/dist/client/route-chunk-recovery/index.d.ts.map +1 -1
- package/dist/client/route-chunk-recovery/index.js +1 -0
- package/dist/client/route-chunk-recovery/index.js.map +1 -1
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +19 -1
- package/dist/client/use-action.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/deploy/build.js +2 -1
- package/dist/deploy/build.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +3 -3
- package/dist/org/context.d.ts +4 -2
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/context.js +44 -22
- package/dist/org/context.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +10 -10
- package/dist/provider-api/actions/provider-api.d.ts +12 -12
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +32 -2
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/auth-plugin.d.ts.map +1 -1
- package/dist/server/auth-plugin.js +9 -5
- package/dist/server/auth-plugin.js.map +1 -1
- package/dist/server/better-auth-instance.d.ts.map +1 -1
- package/dist/server/better-auth-instance.js +4 -1
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/mcp-embed-headers.d.ts +1 -1
- package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
- package/dist/shared/mcp-embed-headers.js +1 -1
- package/dist/shared/mcp-embed-headers.js.map +1 -1
- package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/dist/templates/chat/AGENTS.md +4 -1
- package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/dist/templates/default/AGENTS.md +4 -1
- package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/dist/templates/headless/AGENTS.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +26 -0
- package/dist/templates/workspace-core/AGENTS.md +3 -1
- package/dist/templates/workspace-root/AGENTS.md +3 -1
- package/dist/vite/client.d.ts +6 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +8 -0
- package/dist/vite/client.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/create.ts +23 -0
- package/src/cli/skills.ts +24 -0
- package/src/client/build-compatibility.ts +77 -0
- package/src/client/route-chunk-recovery/index.ts +1 -0
- package/src/client/use-action.ts +32 -1
- package/src/deploy/build.ts +4 -1
- package/src/org/context.ts +56 -30
- package/src/server/action-routes.ts +52 -2
- package/src/server/auth-plugin.ts +9 -4
- package/src/server/better-auth-instance.ts +5 -1
- package/src/shared/mcp-embed-headers.ts +1 -1
- package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/src/templates/chat/AGENTS.md +4 -1
- package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/src/templates/default/AGENTS.md +4 -1
- package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
- package/src/templates/headless/AGENTS.md +5 -1
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +26 -0
- package/src/templates/workspace-core/AGENTS.md +3 -1
- package/src/templates/workspace-root/AGENTS.md +3 -1
- package/src/vite/client.ts +17 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-native-toolkit
|
|
3
|
+
description: >-
|
|
4
|
+
Inventory and ownership rules for shared Agent Native workspace UI. Use
|
|
5
|
+
before building app chrome, settings, navigation, sharing, collaboration,
|
|
6
|
+
setup, history, comments, chat rails, agent UX, or repeated workspace behavior.
|
|
7
|
+
scope: dev
|
|
8
|
+
metadata:
|
|
9
|
+
internal: true
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Agent-Native Toolkit
|
|
13
|
+
|
|
14
|
+
Use this skill when deciding whether app chrome, settings, collaboration,
|
|
15
|
+
sharing, navigation, organization, setup, history, comments, or agent UX should
|
|
16
|
+
be built app-locally or moved into reusable framework/toolkit pieces.
|
|
17
|
+
|
|
18
|
+
## Core Rule
|
|
19
|
+
|
|
20
|
+
Apps own domain models, domain actions, and product-specific workflows. The
|
|
21
|
+
framework and `@agent-native/toolkit` own repeated workspace behavior users
|
|
22
|
+
expect to work the same everywhere.
|
|
23
|
+
|
|
24
|
+
Move behavior into shared toolkit primitives when it is:
|
|
25
|
+
|
|
26
|
+
- workspace-wide, such as settings, nav, search, org membership, or setup
|
|
27
|
+
- agent-visible, such as context, actions, run progress, or proof-of-done
|
|
28
|
+
- governed, such as secrets, permissions, sharing, audit, or billing
|
|
29
|
+
- repeated by two or more apps
|
|
30
|
+
- not tied to one domain model
|
|
31
|
+
|
|
32
|
+
Keep behavior app-local when the abstraction would hide important domain
|
|
33
|
+
language or make a simple app-specific workflow harder to understand.
|
|
34
|
+
|
|
35
|
+
## Discover Before Building
|
|
36
|
+
|
|
37
|
+
Before creating an app-local version of repeated workspace or agent UI:
|
|
38
|
+
|
|
39
|
+
1. Check the reusable kits below and the installed package documentation.
|
|
40
|
+
2. Search installed public components and source with `docs-search` and
|
|
41
|
+
`source-search`.
|
|
42
|
+
3. Run `agent-native eject --list` to see the version-matched units published
|
|
43
|
+
by the packages installed in this app.
|
|
44
|
+
4. Read `customizing-agent-native` and configure, compose, or eject the
|
|
45
|
+
smallest unit instead of recreating shared behavior from memory.
|
|
46
|
+
|
|
47
|
+
Use public package exports at runtime. Published source and ejection manifests
|
|
48
|
+
are discovery and ownership-transfer mechanisms, not private runtime APIs.
|
|
49
|
+
|
|
50
|
+
## Settings Direction
|
|
51
|
+
|
|
52
|
+
Durable settings belong in the Settings app or a registered settings route. The
|
|
53
|
+
agent sidebar should not become a second settings app. It can show contextual
|
|
54
|
+
quick controls and deep links such as:
|
|
55
|
+
|
|
56
|
+
- `/settings/ai`
|
|
57
|
+
- `/settings/connections`
|
|
58
|
+
- `/settings/secrets`
|
|
59
|
+
- `/settings/usage`
|
|
60
|
+
- `/settings/apps/:appId`
|
|
61
|
+
|
|
62
|
+
When adding a new API key, OAuth grant, provider connection, model selector, app
|
|
63
|
+
preference, notification preference, or usage/billing surface, register it as a
|
|
64
|
+
settings tab or app settings panel first. Only add sidebar UI when it is needed
|
|
65
|
+
in the moment of agent use.
|
|
66
|
+
|
|
67
|
+
## Reusable Kits
|
|
68
|
+
|
|
69
|
+
- **Settings kit**: a searchable settings page with account, workspace, AI
|
|
70
|
+
models, LLM keys, connections, secrets, usage, notifications, changelog, and
|
|
71
|
+
app-specific panels. Search is on by default; register a `SettingsSearchEntry`
|
|
72
|
+
per control so users find settings by name across tabs.
|
|
73
|
+
- **Collaboration kit**: Yjs docs, presence, agent presence, live cursors,
|
|
74
|
+
remote selections, recent edit highlights, real-time sync indicators, and
|
|
75
|
+
undo/redo grouping.
|
|
76
|
+
- **Sharing kit**: private/workspace/org/public-link access, invites, roles,
|
|
77
|
+
expirations, agent-readable links, and resource registration.
|
|
78
|
+
- **Navigation and command kit**: app shell, side nav, breadcrumbs, app switcher,
|
|
79
|
+
command palette entries, recent resources, pinned resources, and global search.
|
|
80
|
+
- **Organization kit**: folders, tags, favorites, archive, trash, ownership,
|
|
81
|
+
membership, and common resource metadata.
|
|
82
|
+
- **Setup and connections kit**: declarative setup requirements, model readiness,
|
|
83
|
+
missing-secret states, OAuth grants, and provider connection health.
|
|
84
|
+
- **Agent UX kit**: sidebar, composer, staged context, mentions, voice, human
|
|
85
|
+
approval, generative UI, progress, and screen-state exposure.
|
|
86
|
+
- **Chat history kit**: presentational chat lists and recent-chat rails belong
|
|
87
|
+
in Toolkit; Core keeps thread persistence, agent execution, transport, and
|
|
88
|
+
page-to-sidebar handoff. Apps inject routing, labels, and domain actions.
|
|
89
|
+
- **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
|
|
90
|
+
`@agent-native/core/client`) with Context, Files, Connections, Jobs, and
|
|
91
|
+
Access tabs plus a Personal/Organization scope toggle. The canonical home
|
|
92
|
+
for context transparency, MCP servers, A2A remote agents, recurring
|
|
93
|
+
jobs/automations, and external-client connect flows. See the `agent-page`
|
|
94
|
+
skill.
|
|
95
|
+
- **History and recovery kit**: audit log, activity feed, version history,
|
|
96
|
+
checkpoints, undo, redo, restore, and proof-of-done.
|
|
97
|
+
- **Comments and review kit**: anchored comments, pins, mentions, review
|
|
98
|
+
requests, resolved threads, agent follow-up tasks, and notifications.
|
|
99
|
+
- **Workflow and observability kit**: notifications, approvals, scheduled work,
|
|
100
|
+
background runs, recurring jobs, traces, evals, feedback, and run timelines.
|
|
101
|
+
|
|
102
|
+
## Implementation Checklist
|
|
103
|
+
|
|
104
|
+
When adding or refactoring one of these areas:
|
|
105
|
+
|
|
106
|
+
1. Search existing framework and template code for duplicated UI or actions.
|
|
107
|
+
2. Decide the shared contract: data shape, action API, React component/hook, and
|
|
108
|
+
app adapter points.
|
|
109
|
+
3. Keep shared data provider-agnostic and scoped by auth/sharing rules.
|
|
110
|
+
4. Expose the same capability to the UI and agent through actions or documented
|
|
111
|
+
client helpers.
|
|
112
|
+
5. Register app-specific labels, routes, resource adapters, and settings panels
|
|
113
|
+
instead of hardcoding app names in core UI.
|
|
114
|
+
6. Update docs and relevant skills so future apps discover the shared path.
|
|
115
|
+
7. Keep the component easy to adopt piecemeal: expose props/slots first and
|
|
116
|
+
ship readable source plus a complete ejection unit so apps can take ownership
|
|
117
|
+
of the smallest feature when needed. See `customizing-agent-native` for the
|
|
118
|
+
configure → compose → eject → propose seam ladder.
|
|
119
|
+
|
|
120
|
+
## Related Skills
|
|
121
|
+
|
|
122
|
+
Read these alongside this skill when the work touches the specific area:
|
|
123
|
+
|
|
124
|
+
- `sharing`
|
|
125
|
+
- `real-time-collab`
|
|
126
|
+
- `real-time-sync`
|
|
127
|
+
- `client-side-routing`
|
|
128
|
+
- `context-awareness`
|
|
129
|
+
- `onboarding`
|
|
130
|
+
- `secrets`
|
|
131
|
+
- `audit-log`
|
|
132
|
+
- `observability`
|
|
133
|
+
- `frontend-design`
|
|
@@ -34,7 +34,9 @@ first-party template patterns ships in `node_modules/@agent-native/core/corpus`.
|
|
|
34
34
|
`node_modules/@agent-native/core/docs/content/` directly with `rg`. Search
|
|
35
35
|
`node_modules/@agent-native/core/corpus/` for source examples.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Before building common workspace or agent UI, read `agent-native-toolkit` to
|
|
38
|
+
inventory existing public kits and installed package seams. When intentionally
|
|
39
|
+
customizing shared UI, read `customizing-agent-native`.
|
|
38
40
|
Use the supported ladder: configure → compose → eject the smallest unit →
|
|
39
41
|
propose a shared seam. Preview `agent-native eject <unit>` before `--apply`,
|
|
40
42
|
commit `agent-native.ejections.json`, and never edit `node_modules`, deep-import
|
|
@@ -164,6 +166,7 @@ Skills in `.agents/skills/` provide detailed guidance for each architectural rul
|
|
|
164
166
|
| Skill | When to read |
|
|
165
167
|
| -------------------------- | --------------------------------------------------------------------------------- |
|
|
166
168
|
| `agent-native-docs` | Before using advanced Agent Native framework APIs or generated-app features |
|
|
169
|
+
| `agent-native-toolkit` | Before building common workspace, chat, settings, navigation, or collaboration UI |
|
|
167
170
|
| `customizing-agent-native` | Before configuring, composing, or ejecting shared Agent Native features |
|
|
168
171
|
| `adding-a-feature` | **Read first when adding ANY new feature** — the four-area parity checklist |
|
|
169
172
|
| `feature-flags` | Before shipping a staged production rollout or replacing a compile-time switch |
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-native-toolkit
|
|
3
|
+
description: >-
|
|
4
|
+
Inventory and ownership rules for shared Agent Native workspace UI. Use
|
|
5
|
+
before building app chrome, settings, navigation, sharing, collaboration,
|
|
6
|
+
setup, history, comments, chat rails, agent UX, or repeated workspace behavior.
|
|
7
|
+
scope: dev
|
|
8
|
+
metadata:
|
|
9
|
+
internal: true
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Agent-Native Toolkit
|
|
13
|
+
|
|
14
|
+
Use this skill when deciding whether app chrome, settings, collaboration,
|
|
15
|
+
sharing, navigation, organization, setup, history, comments, or agent UX should
|
|
16
|
+
be built app-locally or moved into reusable framework/toolkit pieces.
|
|
17
|
+
|
|
18
|
+
## Core Rule
|
|
19
|
+
|
|
20
|
+
Apps own domain models, domain actions, and product-specific workflows. The
|
|
21
|
+
framework and `@agent-native/toolkit` own repeated workspace behavior users
|
|
22
|
+
expect to work the same everywhere.
|
|
23
|
+
|
|
24
|
+
Move behavior into shared toolkit primitives when it is:
|
|
25
|
+
|
|
26
|
+
- workspace-wide, such as settings, nav, search, org membership, or setup
|
|
27
|
+
- agent-visible, such as context, actions, run progress, or proof-of-done
|
|
28
|
+
- governed, such as secrets, permissions, sharing, audit, or billing
|
|
29
|
+
- repeated by two or more apps
|
|
30
|
+
- not tied to one domain model
|
|
31
|
+
|
|
32
|
+
Keep behavior app-local when the abstraction would hide important domain
|
|
33
|
+
language or make a simple app-specific workflow harder to understand.
|
|
34
|
+
|
|
35
|
+
## Discover Before Building
|
|
36
|
+
|
|
37
|
+
Before creating an app-local version of repeated workspace or agent UI:
|
|
38
|
+
|
|
39
|
+
1. Check the reusable kits below and the installed package documentation.
|
|
40
|
+
2. Search installed public components and source with `docs-search` and
|
|
41
|
+
`source-search`.
|
|
42
|
+
3. Run `agent-native eject --list` to see the version-matched units published
|
|
43
|
+
by the packages installed in this app.
|
|
44
|
+
4. Read `customizing-agent-native` and configure, compose, or eject the
|
|
45
|
+
smallest unit instead of recreating shared behavior from memory.
|
|
46
|
+
|
|
47
|
+
Use public package exports at runtime. Published source and ejection manifests
|
|
48
|
+
are discovery and ownership-transfer mechanisms, not private runtime APIs.
|
|
49
|
+
|
|
50
|
+
## Settings Direction
|
|
51
|
+
|
|
52
|
+
Durable settings belong in the Settings app or a registered settings route. The
|
|
53
|
+
agent sidebar should not become a second settings app. It can show contextual
|
|
54
|
+
quick controls and deep links such as:
|
|
55
|
+
|
|
56
|
+
- `/settings/ai`
|
|
57
|
+
- `/settings/connections`
|
|
58
|
+
- `/settings/secrets`
|
|
59
|
+
- `/settings/usage`
|
|
60
|
+
- `/settings/apps/:appId`
|
|
61
|
+
|
|
62
|
+
When adding a new API key, OAuth grant, provider connection, model selector, app
|
|
63
|
+
preference, notification preference, or usage/billing surface, register it as a
|
|
64
|
+
settings tab or app settings panel first. Only add sidebar UI when it is needed
|
|
65
|
+
in the moment of agent use.
|
|
66
|
+
|
|
67
|
+
## Reusable Kits
|
|
68
|
+
|
|
69
|
+
- **Settings kit**: a searchable settings page with account, workspace, AI
|
|
70
|
+
models, LLM keys, connections, secrets, usage, notifications, changelog, and
|
|
71
|
+
app-specific panels. Search is on by default; register a `SettingsSearchEntry`
|
|
72
|
+
per control so users find settings by name across tabs.
|
|
73
|
+
- **Collaboration kit**: Yjs docs, presence, agent presence, live cursors,
|
|
74
|
+
remote selections, recent edit highlights, real-time sync indicators, and
|
|
75
|
+
undo/redo grouping.
|
|
76
|
+
- **Sharing kit**: private/workspace/org/public-link access, invites, roles,
|
|
77
|
+
expirations, agent-readable links, and resource registration.
|
|
78
|
+
- **Navigation and command kit**: app shell, side nav, breadcrumbs, app switcher,
|
|
79
|
+
command palette entries, recent resources, pinned resources, and global search.
|
|
80
|
+
- **Organization kit**: folders, tags, favorites, archive, trash, ownership,
|
|
81
|
+
membership, and common resource metadata.
|
|
82
|
+
- **Setup and connections kit**: declarative setup requirements, model readiness,
|
|
83
|
+
missing-secret states, OAuth grants, and provider connection health.
|
|
84
|
+
- **Agent UX kit**: sidebar, composer, staged context, mentions, voice, human
|
|
85
|
+
approval, generative UI, progress, and screen-state exposure.
|
|
86
|
+
- **Chat history kit**: presentational chat lists and recent-chat rails belong
|
|
87
|
+
in Toolkit; Core keeps thread persistence, agent execution, transport, and
|
|
88
|
+
page-to-sidebar handoff. Apps inject routing, labels, and domain actions.
|
|
89
|
+
- **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
|
|
90
|
+
`@agent-native/core/client`) with Context, Files, Connections, Jobs, and
|
|
91
|
+
Access tabs plus a Personal/Organization scope toggle. The canonical home
|
|
92
|
+
for context transparency, MCP servers, A2A remote agents, recurring
|
|
93
|
+
jobs/automations, and external-client connect flows. See the `agent-page`
|
|
94
|
+
skill.
|
|
95
|
+
- **History and recovery kit**: audit log, activity feed, version history,
|
|
96
|
+
checkpoints, undo, redo, restore, and proof-of-done.
|
|
97
|
+
- **Comments and review kit**: anchored comments, pins, mentions, review
|
|
98
|
+
requests, resolved threads, agent follow-up tasks, and notifications.
|
|
99
|
+
- **Workflow and observability kit**: notifications, approvals, scheduled work,
|
|
100
|
+
background runs, recurring jobs, traces, evals, feedback, and run timelines.
|
|
101
|
+
|
|
102
|
+
## Implementation Checklist
|
|
103
|
+
|
|
104
|
+
When adding or refactoring one of these areas:
|
|
105
|
+
|
|
106
|
+
1. Search existing framework and template code for duplicated UI or actions.
|
|
107
|
+
2. Decide the shared contract: data shape, action API, React component/hook, and
|
|
108
|
+
app adapter points.
|
|
109
|
+
3. Keep shared data provider-agnostic and scoped by auth/sharing rules.
|
|
110
|
+
4. Expose the same capability to the UI and agent through actions or documented
|
|
111
|
+
client helpers.
|
|
112
|
+
5. Register app-specific labels, routes, resource adapters, and settings panels
|
|
113
|
+
instead of hardcoding app names in core UI.
|
|
114
|
+
6. Update docs and relevant skills so future apps discover the shared path.
|
|
115
|
+
7. Keep the component easy to adopt piecemeal: expose props/slots first and
|
|
116
|
+
ship readable source plus a complete ejection unit so apps can take ownership
|
|
117
|
+
of the smallest feature when needed. See `customizing-agent-native` for the
|
|
118
|
+
configure → compose → eject → propose seam ladder.
|
|
119
|
+
|
|
120
|
+
## Related Skills
|
|
121
|
+
|
|
122
|
+
Read these alongside this skill when the work touches the specific area:
|
|
123
|
+
|
|
124
|
+
- `sharing`
|
|
125
|
+
- `real-time-collab`
|
|
126
|
+
- `real-time-sync`
|
|
127
|
+
- `client-side-routing`
|
|
128
|
+
- `context-awareness`
|
|
129
|
+
- `onboarding`
|
|
130
|
+
- `secrets`
|
|
131
|
+
- `audit-log`
|
|
132
|
+
- `observability`
|
|
133
|
+
- `frontend-design`
|
|
@@ -39,7 +39,9 @@ first-party template patterns ships in `node_modules/@agent-native/core/corpus`.
|
|
|
39
39
|
`node_modules/@agent-native/core/docs/content/` directly with `rg`. Search
|
|
40
40
|
`node_modules/@agent-native/core/corpus/` for source examples.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Before building common workspace or agent UI, read `agent-native-toolkit` to
|
|
43
|
+
inventory existing public kits and installed package seams. When adding or
|
|
44
|
+
customizing a browser UI, read `customizing-agent-native`.
|
|
43
45
|
Use the supported ladder: configure → compose → eject the smallest unit →
|
|
44
46
|
propose a shared seam. Preview `agent-native eject <unit>` before `--apply`,
|
|
45
47
|
commit `agent-native.ejections.json`, and never edit `node_modules`, deep-import
|
|
@@ -88,5 +90,7 @@ pnpm agent "Call the hello action for Builder and explain the result"
|
|
|
88
90
|
Skills in `.agents/skills/` provide detailed guidance. Read
|
|
89
91
|
`.agents/skills/agent-native-docs/SKILL.md` before using advanced Agent Native
|
|
90
92
|
framework APIs, generated-app features, automations, A2A, sharing, or MCP.
|
|
93
|
+
Read `.agents/skills/agent-native-toolkit/SKILL.md` before adding common
|
|
94
|
+
workspace, agent, chat, settings, navigation, or collaboration UI.
|
|
91
95
|
Read `.agents/skills/customizing-agent-native/SKILL.md` before adding UI or
|
|
92
96
|
overriding shared Agent Native features.
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-native-toolkit
|
|
3
|
+
description: >-
|
|
4
|
+
Inventory and ownership rules for shared Agent Native workspace UI. Use
|
|
5
|
+
before building app chrome, settings, navigation, sharing, collaboration,
|
|
6
|
+
setup, history, comments, chat rails, agent UX, or repeated workspace behavior.
|
|
7
|
+
scope: dev
|
|
8
|
+
metadata:
|
|
9
|
+
internal: true
|
|
10
|
+
---
|
|
11
|
+
|
|
1
12
|
# Agent-Native Toolkit
|
|
2
13
|
|
|
3
14
|
Use this skill when deciding whether app chrome, settings, collaboration,
|
|
@@ -21,6 +32,21 @@ Move behavior into shared toolkit primitives when it is:
|
|
|
21
32
|
Keep behavior app-local when the abstraction would hide important domain
|
|
22
33
|
language or make a simple app-specific workflow harder to understand.
|
|
23
34
|
|
|
35
|
+
## Discover Before Building
|
|
36
|
+
|
|
37
|
+
Before creating an app-local version of repeated workspace or agent UI:
|
|
38
|
+
|
|
39
|
+
1. Check the reusable kits below and the installed package documentation.
|
|
40
|
+
2. Search installed public components and source with `docs-search` and
|
|
41
|
+
`source-search`.
|
|
42
|
+
3. Run `agent-native eject --list` to see the version-matched units published
|
|
43
|
+
by the packages installed in this app.
|
|
44
|
+
4. Read `customizing-agent-native` and configure, compose, or eject the
|
|
45
|
+
smallest unit instead of recreating shared behavior from memory.
|
|
46
|
+
|
|
47
|
+
Use public package exports at runtime. Published source and ejection manifests
|
|
48
|
+
are discovery and ownership-transfer mechanisms, not private runtime APIs.
|
|
49
|
+
|
|
24
50
|
## Settings Direction
|
|
25
51
|
|
|
26
52
|
Durable settings belong in the Settings app or a registered settings route. The
|
|
@@ -25,7 +25,9 @@ first-party template patterns ships in `node_modules/@agent-native/core/corpus`.
|
|
|
25
25
|
Use package docs for framework APIs, the package corpus for reusable
|
|
26
26
|
framework/template patterns, and this `AGENTS.md` plus `.agents/skills/` for
|
|
27
27
|
workspace-specific conventions.
|
|
28
|
-
|
|
28
|
+
Before building common workspace or agent UI, read `agent-native-toolkit` to
|
|
29
|
+
inventory existing public kits and installed package seams. Read
|
|
30
|
+
`customizing-agent-native` before adapting shared UI. Use the supported
|
|
29
31
|
ladder: configure → compose → eject the smallest unit → propose a shared seam.
|
|
30
32
|
Preview before `--apply`, commit `agent-native.ejections.json`, and never edit
|
|
31
33
|
`node_modules` or eject protected runtime contracts.
|
|
@@ -27,7 +27,9 @@ first-party template patterns ships in `node_modules/@agent-native/core/corpus`.
|
|
|
27
27
|
Use package docs for framework APIs, the package corpus for reusable
|
|
28
28
|
framework/template patterns, and `packages/shared/AGENTS.md` plus
|
|
29
29
|
`packages/shared/.agents/skills/` for workspace-specific conventions.
|
|
30
|
-
|
|
30
|
+
Before building common workspace or agent UI, read `agent-native-toolkit` to
|
|
31
|
+
inventory existing public kits and installed package seams. Read
|
|
32
|
+
`customizing-agent-native` before adapting shared UI. Use the supported
|
|
31
33
|
ladder: configure → compose → eject the smallest unit → propose a shared seam.
|
|
32
34
|
Preview before `--apply`, commit `agent-native.ejections.json`, and never edit
|
|
33
35
|
`node_modules` or eject protected runtime contracts.
|
package/src/vite/client.ts
CHANGED
|
@@ -1351,6 +1351,12 @@ export interface ClientConfigOptions {
|
|
|
1351
1351
|
optimizeDeps?: NonNullable<UserConfig["optimizeDeps"]>;
|
|
1352
1352
|
/** Additional Vite define constants. */
|
|
1353
1353
|
define?: UserConfig["define"];
|
|
1354
|
+
/**
|
|
1355
|
+
* Browser/server compatibility epoch for app changes that cannot safely run
|
|
1356
|
+
* across a cached client and a newer action backend. Bump only for an
|
|
1357
|
+
* incompatible protocol or data-model transition, not for every deploy.
|
|
1358
|
+
*/
|
|
1359
|
+
clientCompatibilityVersion?: string;
|
|
1354
1360
|
/**
|
|
1355
1361
|
* Framework route warmup behavior mounted by AgentSidebar.
|
|
1356
1362
|
*
|
|
@@ -2685,6 +2691,13 @@ function createAgentNativeConfig(
|
|
|
2685
2691
|
userConfig: UserConfig = {},
|
|
2686
2692
|
): UserConfig {
|
|
2687
2693
|
const cwd = process.cwd();
|
|
2694
|
+
const buildId =
|
|
2695
|
+
process.env.DEPLOY_ID?.trim() ||
|
|
2696
|
+
process.env.COMMIT_REF?.trim() ||
|
|
2697
|
+
process.env.VERCEL_GIT_COMMIT_SHA?.trim() ||
|
|
2698
|
+
process.env.CF_PAGES_COMMIT_SHA?.trim() ||
|
|
2699
|
+
process.env.AGENT_NATIVE_BUILD_SHA?.trim() ||
|
|
2700
|
+
"development";
|
|
2688
2701
|
|
|
2689
2702
|
// Workspace env fallback. If this app is inside a workspace, tell Vite to
|
|
2690
2703
|
// also look for .env files at the workspace root. Per-app .env still wins
|
|
@@ -2769,6 +2782,10 @@ function createAgentNativeConfig(
|
|
|
2769
2782
|
define: {
|
|
2770
2783
|
...(userConfig.define ?? {}),
|
|
2771
2784
|
...(options.define ?? {}),
|
|
2785
|
+
__AGENT_NATIVE_BUILD_ID__: JSON.stringify(buildId),
|
|
2786
|
+
__AGENT_NATIVE_CLIENT_COMPATIBILITY_VERSION__: JSON.stringify(
|
|
2787
|
+
options.clientCompatibilityVersion?.trim() || "",
|
|
2788
|
+
),
|
|
2772
2789
|
__AGENT_NATIVE_BUILD_GA_MEASUREMENT_ID__: JSON.stringify(
|
|
2773
2790
|
process.env.GA_MEASUREMENT_ID?.trim() || "",
|
|
2774
2791
|
),
|