@agent-native/core 0.87.0 → 0.88.0
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 +6 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +162 -0
- package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +73 -0
- package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +77 -0
- package/corpus/core/docs/content/locales/de-DE/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +77 -0
- package/corpus/core/docs/content/locales/es-ES/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +79 -0
- package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +74 -0
- package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +67 -0
- package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +63 -0
- package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +77 -0
- package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +61 -0
- package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +15 -7
- package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +61 -0
- package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +15 -7
- package/corpus/core/docs/content/sharing.mdx +39 -7
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/server/action-discovery.ts +4 -0
- package/corpus/core/src/server/action-routes.ts +8 -1
- package/corpus/core/src/server/index.ts +9 -0
- package/corpus/core/src/shared/agent-readable-resource.ts +111 -0
- package/corpus/core/src/shared/index.ts +9 -0
- package/corpus/core/src/sharing/actions/create-agent-resource-link.ts +91 -0
- package/corpus/core/src/sharing/registry.ts +19 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +92 -0
- package/corpus/core/src/vite/client.ts +1 -0
- package/corpus/templates/analytics/actions/get-sql-dashboard.ts +9 -113
- package/corpus/templates/analytics/server/db/index.ts +14 -0
- package/corpus/templates/analytics/server/lib/agent-readable-resource-context.ts +156 -0
- package/corpus/templates/analytics/server/routes/[...page].get.ts +92 -25
- package/corpus/templates/analytics/server/routes/api/analysis-agent-context.json.get.ts +94 -0
- package/corpus/templates/analytics/server/routes/api/dashboard-agent-context.json.get.ts +109 -0
- package/corpus/templates/analytics/shared/resource-agent-access.ts +6 -0
- package/corpus/templates/content/app/routes/p.$id.tsx +114 -9
- package/corpus/templates/content/server/db/index.ts +9 -0
- package/corpus/templates/content/server/routes/api/document-agent-context.json.get.ts +90 -0
- package/corpus/templates/content/shared/agent-readable.ts +56 -0
- package/corpus/templates/design/server/db/index.ts +8 -0
- package/corpus/templates/design/server/routes/[...page].get.ts +94 -1
- package/corpus/templates/design/server/routes/api/design-agent-context.json.get.ts +84 -0
- package/corpus/templates/design/shared/agent-readable.ts +2 -0
- package/corpus/templates/plan/server/db/index.ts +12 -0
- package/corpus/templates/plan/server/plans.ts +25 -1
- package/corpus/templates/plan/server/routes/[...page].get.ts +107 -1
- package/corpus/templates/plan/server/routes/api/plan-agent-context.json.get.ts +65 -0
- package/corpus/templates/plan/shared/agent-readable.ts +2 -0
- package/corpus/templates/slides/app/routes/p.$id.tsx +126 -12
- package/corpus/templates/slides/app/routes/share.$token.tsx +55 -8
- package/corpus/templates/slides/server/db/index.ts +9 -0
- package/corpus/templates/slides/server/routes/api/deck-agent-context.json.get.ts +97 -0
- package/corpus/templates/slides/shared/agent-readable.ts +2 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +4 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +8 -2
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/shared/agent-readable-resource.d.ts +29 -0
- package/dist/shared/agent-readable-resource.d.ts.map +1 -0
- package/dist/shared/agent-readable-resource.js +60 -0
- package/dist/shared/agent-readable-resource.js.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/sharing/actions/create-agent-resource-link.d.ts +13 -0
- package/dist/sharing/actions/create-agent-resource-link.d.ts.map +1 -0
- package/dist/sharing/actions/create-agent-resource-link.js +72 -0
- package/dist/sharing/actions/create-agent-resource-link.js.map +1 -0
- package/dist/sharing/registry.d.ts +17 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +92 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +1 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +162 -0
- package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +73 -0
- package/docs/content/locales/ar-SA/sharing.mdx +15 -7
- package/docs/content/locales/de-DE/agent-native-toolkit.mdx +77 -0
- package/docs/content/locales/de-DE/sharing.mdx +15 -7
- package/docs/content/locales/es-ES/agent-native-toolkit.mdx +77 -0
- package/docs/content/locales/es-ES/sharing.mdx +15 -7
- package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +79 -0
- package/docs/content/locales/fr-FR/sharing.mdx +15 -7
- package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +74 -0
- package/docs/content/locales/hi-IN/sharing.mdx +15 -7
- package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +67 -0
- package/docs/content/locales/ja-JP/sharing.mdx +15 -7
- package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +63 -0
- package/docs/content/locales/ko-KR/sharing.mdx +15 -7
- package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +77 -0
- package/docs/content/locales/pt-BR/sharing.mdx +15 -7
- package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +61 -0
- package/docs/content/locales/zh-CN/sharing.mdx +15 -7
- package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +61 -0
- package/docs/content/locales/zh-TW/sharing.mdx +15 -7
- package/docs/content/sharing.mdx +39 -7
- package/package.json +2 -1
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +92 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Agent-Native 工具包"
|
|
3
|
+
description: "用於協作、設定、分享、導覽、線上狀態、歷史、配置和 Agent UX 的可重用套件。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent-Native 工具包
|
|
7
|
+
|
|
8
|
+
Agent-Native 應用程式不應重複建置 workspace 的通用能力。應用程式負責自己的領域模型、
|
|
9
|
+
領域 actions 和產品視圖。Framework 與 `@agent-native/toolkit` 負責每個應用程式都應繼承的
|
|
10
|
+
可重用產品表面:協作、分享、設定、導覽、組織、配置、Agent UX、歷史和營運可見性。
|
|
11
|
+
|
|
12
|
+
使用者應該只學會一種分享方式、一種連接金鑰的方式、一種看到 Agent 一起編輯的方式、一個設定入口,
|
|
13
|
+
以及一種理解變更的方式。
|
|
14
|
+
|
|
15
|
+
## 工具包契約 {#toolkit-contract}
|
|
16
|
+
|
|
17
|
+
當行為符合以下條件時,應移到 toolkit:
|
|
18
|
+
|
|
19
|
+
- **Workspace 層級** - 使用者期待所有應用程式都一致。
|
|
20
|
+
- **Agent 可見** - Agent 需要透過 actions、instructions 或 application state 使用同一能力。
|
|
21
|
+
- **受治理** - 權限、audit、secrets、組織政策、billing 或分享規則會參與。
|
|
22
|
+
- **重複出現** - 兩個應用程式已經建了相似 UI 或邏輯。
|
|
23
|
+
- **非領域專屬** - 應用程式提供 resource 名稱與 actions,但互動模式是通用的。
|
|
24
|
+
|
|
25
|
+
如果行為綁定領域模型、專屬 workflow 或應用程式自己的心智模型,就保持 app-local。
|
|
26
|
+
|
|
27
|
+
## 可重用套件 {#reusable-kits}
|
|
28
|
+
|
|
29
|
+
- **Settings kit** - account、workspace、AI models、LLM keys、connections、secrets、
|
|
30
|
+
usage、notifications、changelog 和 app preferences 的標準 tabs。持久設定放在 Settings;
|
|
31
|
+
Agent sidebar 只保留情境 quick controls 與 deep links。
|
|
32
|
+
- **Collaboration kit** - real-time editing、Yjs docs、presence、agent presence、live
|
|
33
|
+
cursors、remote selections、recent edit highlights 和 shared undo/redo。請參閱
|
|
34
|
+
[Real-Time Collaboration](/docs/real-time-collaboration)。
|
|
35
|
+
- **Sharing kit** - 用一個隱私與權限模型處理 private、workspace、org、public link、invites、
|
|
36
|
+
roles、expirations 和 agent-readable access。請參閱 [Sharing & Privacy](/docs/sharing)。
|
|
37
|
+
- **Navigation and command kit** - app shell、nav、breadcrumbs、app switcher、command
|
|
38
|
+
palette、recents、pinned resources 和 search。
|
|
39
|
+
- **Organization kit** - folders、tags、favorites、archive、trash、ownership、membership
|
|
40
|
+
和 common metadata。
|
|
41
|
+
- **Setup and connections kit** - API keys、OAuth、connections、model readiness、
|
|
42
|
+
missing secrets 和 declarative onboarding。請參閱
|
|
43
|
+
[Workspace Connections](/docs/workspace-connections)。
|
|
44
|
+
- **Agent UX kit** - sidebar、composer、staged context、mentions、voice、human approval、
|
|
45
|
+
generative UI、progress 和 Agent-visible state。
|
|
46
|
+
- **History and recovery kit** - audit log、activity feed、version history、checkpoints、
|
|
47
|
+
undo、redo、restore 和 proof-of-done。請參閱 [Audit Log](/docs/audit-log)。
|
|
48
|
+
- **Comments and review kit** - anchored comments、pins、mentions、review requests、
|
|
49
|
+
resolved threads 和 Agent follow-up tasks。
|
|
50
|
+
- **Workflow and observability kit** - notifications、approvals、background runs、
|
|
51
|
+
recurring jobs、traces、evals、feedback 和 run timelines。請參閱
|
|
52
|
+
[Observability](/docs/observability)。
|
|
53
|
+
|
|
54
|
+
## 實作順序 {#implementation-order}
|
|
55
|
+
|
|
56
|
+
1. 將持久設定合併到標準 Settings tabs。
|
|
57
|
+
2. 用共享 adapters 統一 collaboration、presence、agent presence、undo/redo 和 real-time editing。
|
|
58
|
+
3. 將 navigation、commands、recents、favorites、folders、tags、archive 和 trash 移入共享 primitives。
|
|
59
|
+
4. 讓所有可分享 resource 註冊到同一 permissions 和 agent-readable access 模型。
|
|
60
|
+
5. 為每個 collaborative resource 提供一致的 activity、comments、review、restore 和 audit 體驗。
|
|
61
|
+
6. 統一 notifications、approvals、run status、traces、evals 和 feedback。
|
|
@@ -93,9 +93,10 @@ description: "Google Docs 風格的共用,內建於框架中。每個使用者
|
|
|
93
93
|
- **幻燈片** — 幻燈片
|
|
94
94
|
- **設計** — 設計和資產
|
|
95
95
|
- **剪輯** — 螢幕錄製(Loom 風格)
|
|
96
|
+
- **Plan** — visual plans and PR recaps
|
|
96
97
|
- **表單** — 表單定義
|
|
97
98
|
- **行事曆** — 活動和預訂連結
|
|
98
|
-
- **分析** -
|
|
99
|
+
- **分析** - dashboards, saved analyses, and tokenized session replays
|
|
99
100
|
- **擴充功能** - 沙盒迷你應用程式(參見 [Extensions](/docs/extensions#sharing))
|
|
100
101
|
|
|
101
102
|
其中每一個都使用相同的 `ownableColumns()` 模式助手、相同的 `share-resource` 操作和相同的 `<ShareButton>` UI。從一個範本行動到另一個範本,共用對話框看起來相同。
|
|
@@ -136,15 +137,22 @@ import { ShareButton } from "@agent-native/core/client";
|
|
|
136
137
|
|
|
137
138
|
框架在每個範本中自動安裝這些 actions - 代理將它們稱為工具,UI 透過 `useActionQuery` / `useActionMutation` 呼叫它們:
|
|
138
139
|
|
|
139
|
-
| 行動
|
|
140
|
-
|
|
|
141
|
-
| `share-resource`
|
|
142
|
-
| `unshare-resource`
|
|
143
|
-
| `list-resource-shares`
|
|
144
|
-
| `set-resource-visibility`
|
|
140
|
+
| 行動 | 它的作用 |
|
|
141
|
+
| ---------------------------- | --------------------------------------------------------------------------------------- |
|
|
142
|
+
| `share-resource` | 授予使用者或組織特定角色的存取權限。可選的 `notify` 控制電子郵件通知。 |
|
|
143
|
+
| `unshare-resource` | 撤銷使用者或組織的存取權限。 |
|
|
144
|
+
| `list-resource-shares` | 顯示目前可見性以及所有顯式授權。 |
|
|
145
|
+
| `set-resource-visibility` | 更改為 `private`、`org` 或 `public`。 |
|
|
146
|
+
| `create-agent-resource-link` | Mint a temporary read-only `agent_access` URL for a registered agent-readable resource. |
|
|
145
147
|
|
|
146
148
|
告訴代理“與作為編輯的行銷團隊共用此設計”,它會針對 UI 使用的同一端點呼叫 `share-resource`。結果將顯示在下一次渲染的共用對話框中。
|
|
147
149
|
|
|
150
|
+
## Agent-readable share links {#agent-readable-links}
|
|
151
|
+
|
|
152
|
+
Human share links should also work for agents when the resource is a document-like artifact: plans, documents, decks, designs, analytics dashboards, saved analyses, clips, and similar "things you would send to a person." Public links expose a small SSR discovery script that points at structured JSON. Private resources use a short-lived `agent_access` token scoped to exactly one resource.
|
|
153
|
+
|
|
154
|
+
Register the resource with `agentReadable`, add a read-only JSON context endpoint, inject the SSR discovery script with `renderAgentReadableResourceDiscoveryScript()`, and let agents call `create-agent-resource-link` when they need a temporary private URL. The endpoint must return data only when the row is `public` or `verifyScopedAgentAccessToken()` accepts the token for that exact `resourceKind` and `resourceId`.
|
|
155
|
+
|
|
148
156
|
## 將其建置到新範本中 {#building}
|
|
149
157
|
|
|
150
158
|
如果您正在建立範本(請參閱 [Creating Templates](/docs/creating-templates)),則共用接線會很短。您的架構中新增了兩項內容:
|
package/docs/content/sharing.mdx
CHANGED
|
@@ -93,9 +93,10 @@ Every template that stores user-authored work uses this model. Concretely:
|
|
|
93
93
|
- **Slides** — decks
|
|
94
94
|
- **Design** — designs and assets
|
|
95
95
|
- **Clips** — screen recordings (Loom-style)
|
|
96
|
+
- **Plan** — visual plans and PR recaps
|
|
96
97
|
- **Forms** — form definitions
|
|
97
98
|
- **Calendar** — events and booking links
|
|
98
|
-
- **Analytics** — dashboards
|
|
99
|
+
- **Analytics** — dashboards, saved analyses, and tokenized session replays
|
|
99
100
|
- **Extensions** — sandboxed mini-apps (see [Extensions](/docs/extensions#sharing))
|
|
100
101
|
|
|
101
102
|
Every one of these uses the same `ownableColumns()` schema helper, the same `share-resource` action, and the same `<ShareButton>` UI. Move from one template to another and the share dialog looks identical.
|
|
@@ -136,15 +137,46 @@ For lists, drop a `<VisibilityBadge visibility={row.visibility} />` next to each
|
|
|
136
137
|
|
|
137
138
|
The framework auto-mounts these actions in every template — the agent calls them as tools, and the UI calls them through `useActionQuery` / `useActionMutation`:
|
|
138
139
|
|
|
139
|
-
| Action
|
|
140
|
-
|
|
|
141
|
-
| `share-resource`
|
|
142
|
-
| `unshare-resource`
|
|
143
|
-
| `list-resource-shares`
|
|
144
|
-
| `set-resource-visibility`
|
|
140
|
+
| Action | What it does |
|
|
141
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
142
|
+
| `share-resource` | Grant a user or org access at a specific role. Optional `notify` controls email notifications. |
|
|
143
|
+
| `unshare-resource` | Revoke access for a user or org. |
|
|
144
|
+
| `list-resource-shares` | Show current visibility plus all explicit grants. |
|
|
145
|
+
| `set-resource-visibility` | Change to `private`, `org`, or `public`. |
|
|
146
|
+
| `create-agent-resource-link` | Mint a temporary read-only `agent_access` URL for a registered agent-readable resource. |
|
|
145
147
|
|
|
146
148
|
Tell the agent "share this design with the marketing team as editors" and it calls `share-resource` against the same endpoint the UI uses. The result shows up in the share dialog the next render.
|
|
147
149
|
|
|
150
|
+
## Agent-readable share links {#agent-readable-links}
|
|
151
|
+
|
|
152
|
+
Human share links should also work for agents when the resource is a document-like artifact: plans, documents, decks, designs, analytics dashboards, saved analyses, clips, and similar "things you would send to a person." Public links expose a small SSR discovery script that points at structured JSON. Private resources use a short-lived `agent_access` token scoped to exactly one resource.
|
|
153
|
+
|
|
154
|
+
The default flow is:
|
|
155
|
+
|
|
156
|
+
1. Register the resource with `agentReadable`.
|
|
157
|
+
2. Add a read-only JSON endpoint that returns the same content a viewer can see.
|
|
158
|
+
3. Add an SSR discovery script on the human page with `renderAgentReadableResourceDiscoveryScript()`.
|
|
159
|
+
4. Let agents call `create-agent-resource-link` when they need a temporary private URL.
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
registerShareableResource({
|
|
163
|
+
type: "deck",
|
|
164
|
+
resourceTable: schema.decks,
|
|
165
|
+
sharesTable: schema.deckShares,
|
|
166
|
+
displayName: "Deck",
|
|
167
|
+
titleColumn: "title",
|
|
168
|
+
getResourcePath: (deck) => `/p/${deck.id}`,
|
|
169
|
+
agentReadable: {
|
|
170
|
+
resourceKind: "slides:deck",
|
|
171
|
+
getContextPath: () => "/api/deck-agent-context.json",
|
|
172
|
+
getPagePath: (deck) => `/p/${deck.id}`,
|
|
173
|
+
},
|
|
174
|
+
getDb,
|
|
175
|
+
});
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The context endpoint must be read-only. It should return data only when the row is `public` or `verifyScopedAgentAccessToken()` accepts the token for that exact `resourceKind` and `resourceId`. Set `Cache-Control: no-store`, `Referrer-Policy: no-referrer`, and avoid including write credentials, provider blob URLs, or secrets. Token links should not change the resource visibility.
|
|
179
|
+
|
|
148
180
|
## Building it into a new template {#building}
|
|
149
181
|
|
|
150
182
|
If you're creating a template (see [Creating Templates](/docs/creating-templates)), wiring sharing in is short. Two additions to your schema:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
"./sharing/actions/unshare-resource": "./dist/sharing/actions/unshare-resource.js",
|
|
133
133
|
"./sharing/actions/list-resource-shares": "./dist/sharing/actions/list-resource-shares.js",
|
|
134
134
|
"./sharing/actions/set-resource-visibility": "./dist/sharing/actions/set-resource-visibility.js",
|
|
135
|
+
"./sharing/actions/create-agent-resource-link": "./dist/sharing/actions/create-agent-resource-link.js",
|
|
135
136
|
"./client/sharing": "./dist/client/sharing/index.js",
|
|
136
137
|
"./client/extensions": "./dist/client/extensions/index.js",
|
|
137
138
|
"./client/tools": "./dist/client/extensions/index.js",
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Agent-Native Toolkit
|
|
2
|
+
|
|
3
|
+
Use this skill when deciding whether app chrome, settings, collaboration,
|
|
4
|
+
sharing, navigation, organization, setup, history, comments, or agent UX should
|
|
5
|
+
be built app-locally or moved into reusable framework/toolkit pieces.
|
|
6
|
+
|
|
7
|
+
## Core Rule
|
|
8
|
+
|
|
9
|
+
Apps own domain models, domain actions, and product-specific workflows. The
|
|
10
|
+
framework and `@agent-native/toolkit` own repeated workspace behavior users
|
|
11
|
+
expect to work the same everywhere.
|
|
12
|
+
|
|
13
|
+
Move behavior into shared toolkit primitives when it is:
|
|
14
|
+
|
|
15
|
+
- workspace-wide, such as settings, nav, search, org membership, or setup
|
|
16
|
+
- agent-visible, such as context, actions, run progress, or proof-of-done
|
|
17
|
+
- governed, such as secrets, permissions, sharing, audit, or billing
|
|
18
|
+
- repeated by two or more apps
|
|
19
|
+
- not tied to one domain model
|
|
20
|
+
|
|
21
|
+
Keep behavior app-local when the abstraction would hide important domain
|
|
22
|
+
language or make a simple app-specific workflow harder to understand.
|
|
23
|
+
|
|
24
|
+
## Settings Direction
|
|
25
|
+
|
|
26
|
+
Durable settings belong in the Settings app or a registered settings route. The
|
|
27
|
+
agent sidebar should not become a second settings app. It can show contextual
|
|
28
|
+
quick controls and deep links such as:
|
|
29
|
+
|
|
30
|
+
- `/settings/ai`
|
|
31
|
+
- `/settings/connections`
|
|
32
|
+
- `/settings/secrets`
|
|
33
|
+
- `/settings/usage`
|
|
34
|
+
- `/settings/apps/:appId`
|
|
35
|
+
|
|
36
|
+
When adding a new API key, OAuth grant, provider connection, model selector, app
|
|
37
|
+
preference, notification preference, or usage/billing surface, register it as a
|
|
38
|
+
settings tab or app settings panel first. Only add sidebar UI when it is needed
|
|
39
|
+
in the moment of agent use.
|
|
40
|
+
|
|
41
|
+
## Reusable Kits
|
|
42
|
+
|
|
43
|
+
- **Settings kit**: account, workspace, AI models, LLM keys, connections,
|
|
44
|
+
secrets, usage, notifications, changelog, and app-specific panels.
|
|
45
|
+
- **Collaboration kit**: Yjs docs, presence, agent presence, live cursors,
|
|
46
|
+
remote selections, recent edit highlights, real-time sync indicators, and
|
|
47
|
+
undo/redo grouping.
|
|
48
|
+
- **Sharing kit**: private/workspace/org/public-link access, invites, roles,
|
|
49
|
+
expirations, agent-readable links, and resource registration.
|
|
50
|
+
- **Navigation and command kit**: app shell, side nav, breadcrumbs, app switcher,
|
|
51
|
+
command palette entries, recent resources, pinned resources, and global search.
|
|
52
|
+
- **Organization kit**: folders, tags, favorites, archive, trash, ownership,
|
|
53
|
+
membership, and common resource metadata.
|
|
54
|
+
- **Setup and connections kit**: declarative setup requirements, model readiness,
|
|
55
|
+
missing-secret states, OAuth grants, and provider connection health.
|
|
56
|
+
- **Agent UX kit**: sidebar, composer, staged context, mentions, voice, human
|
|
57
|
+
approval, generative UI, progress, and screen-state exposure.
|
|
58
|
+
- **History and recovery kit**: audit log, activity feed, version history,
|
|
59
|
+
checkpoints, undo, redo, restore, and proof-of-done.
|
|
60
|
+
- **Comments and review kit**: anchored comments, pins, mentions, review
|
|
61
|
+
requests, resolved threads, agent follow-up tasks, and notifications.
|
|
62
|
+
- **Workflow and observability kit**: notifications, approvals, scheduled work,
|
|
63
|
+
background runs, recurring jobs, traces, evals, feedback, and run timelines.
|
|
64
|
+
|
|
65
|
+
## Implementation Checklist
|
|
66
|
+
|
|
67
|
+
When adding or refactoring one of these areas:
|
|
68
|
+
|
|
69
|
+
1. Search existing framework and template code for duplicated UI or actions.
|
|
70
|
+
2. Decide the shared contract: data shape, action API, React component/hook, and
|
|
71
|
+
app adapter points.
|
|
72
|
+
3. Keep shared data provider-agnostic and scoped by auth/sharing rules.
|
|
73
|
+
4. Expose the same capability to the UI and agent through actions or documented
|
|
74
|
+
client helpers.
|
|
75
|
+
5. Register app-specific labels, routes, resource adapters, and settings panels
|
|
76
|
+
instead of hardcoding app names in core UI.
|
|
77
|
+
6. Update docs and relevant skills so future apps discover the shared path.
|
|
78
|
+
|
|
79
|
+
## Related Skills
|
|
80
|
+
|
|
81
|
+
Read these alongside this skill when the work touches the specific area:
|
|
82
|
+
|
|
83
|
+
- `sharing`
|
|
84
|
+
- `real-time-collab`
|
|
85
|
+
- `real-time-sync`
|
|
86
|
+
- `client-side-routing`
|
|
87
|
+
- `context-awareness`
|
|
88
|
+
- `onboarding`
|
|
89
|
+
- `secrets`
|
|
90
|
+
- `audit-log`
|
|
91
|
+
- `observability`
|
|
92
|
+
- `frontend-design`
|