@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,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Agent-Native Toolkit"
|
|
3
|
+
description: "Reusable app-building kits for collaboration, settings, sharing, navigation, presence, history, setup, and agent UX."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent-Native Toolkit
|
|
7
|
+
|
|
8
|
+
Agent-Native apps should not rebuild workspace plumbing. Apps own their domain
|
|
9
|
+
models, domain actions, and product-specific views. The framework and
|
|
10
|
+
`@agent-native/toolkit` own the reusable product surface that every app should
|
|
11
|
+
inherit: collaboration, sharing, settings, navigation, setup, resource
|
|
12
|
+
organization, agent UX, history, and operational visibility.
|
|
13
|
+
|
|
14
|
+
The point is not only faster app development. The point is that users learn one
|
|
15
|
+
way to share, one way to connect API keys, one way to see the agent editing
|
|
16
|
+
beside them, one way to find settings, and one way to understand what changed.
|
|
17
|
+
|
|
18
|
+
## Toolkit Contract {#toolkit-contract}
|
|
19
|
+
|
|
20
|
+
Move behavior into the toolkit when it is:
|
|
21
|
+
|
|
22
|
+
- **Workspace-wide** - users expect it to work the same across apps.
|
|
23
|
+
- **Agent-visible** - the agent needs the same capability through actions,
|
|
24
|
+
instructions, or application state.
|
|
25
|
+
- **Governed** - permissions, audit history, secrets, org policy, billing, or
|
|
26
|
+
sharing rules apply.
|
|
27
|
+
- **Repeated** - two apps have already built similar UI or logic.
|
|
28
|
+
- **Non-domain-specific** - the app supplies resource names and actions, but the
|
|
29
|
+
interaction pattern is generic.
|
|
30
|
+
|
|
31
|
+
Keep behavior app-local when it is tied to a domain model, a custom workflow, or
|
|
32
|
+
an app-specific mental model that would become awkward as a generic abstraction.
|
|
33
|
+
|
|
34
|
+
## Reusable Kits {#reusable-kits}
|
|
35
|
+
|
|
36
|
+
### Settings Kit {#settings-kit}
|
|
37
|
+
|
|
38
|
+
Every app should get standard settings tabs for account, workspace, AI models,
|
|
39
|
+
LLM keys, connections, secrets, usage, notifications, changelog, and app-specific
|
|
40
|
+
preferences. Persistent configuration should live under the Settings app or a
|
|
41
|
+
registered settings route. The agent sidebar should keep contextual quick
|
|
42
|
+
controls and deep links into the right settings tab, not a second large settings
|
|
43
|
+
surface.
|
|
44
|
+
|
|
45
|
+
Apps register their own settings panels instead of inventing separate settings
|
|
46
|
+
navigation. Standard links should be stable, for example `/settings/ai`,
|
|
47
|
+
`/settings/connections`, `/settings/secrets`, and `/settings/apps/:appId`.
|
|
48
|
+
|
|
49
|
+
### Collaboration Kit {#collaboration-kit}
|
|
50
|
+
|
|
51
|
+
Use the framework collaboration layer for real-time editing, Yjs documents,
|
|
52
|
+
presence, agent presence, live cursors, remote selections, recent edit
|
|
53
|
+
highlights, and shared undo grouping. See
|
|
54
|
+
[Real-Time Collaboration](/docs/real-time-collaboration).
|
|
55
|
+
|
|
56
|
+
Apps should provide adapters for their document shape. The toolkit should
|
|
57
|
+
provide the shared editing chrome: who is here, where the agent is editing,
|
|
58
|
+
whether edits are synced, and how undo/redo behaves when humans and agents edit
|
|
59
|
+
together.
|
|
60
|
+
|
|
61
|
+
### Sharing Kit {#sharing-kit}
|
|
62
|
+
|
|
63
|
+
Resources should share through one privacy and permission model: private,
|
|
64
|
+
workspace, org, public link, invite, role, expiration, and agent-readable access.
|
|
65
|
+
Apps should register resource types and access rules instead of creating one-off
|
|
66
|
+
share dialogs. See [Sharing & Privacy](/docs/sharing).
|
|
67
|
+
|
|
68
|
+
### Navigation And Command Kit {#navigation-and-command-kit}
|
|
69
|
+
|
|
70
|
+
Apps should reuse one shell model for primary nav, breadcrumbs, app switcher,
|
|
71
|
+
command palette entries, recent resources, pinned resources, and global search.
|
|
72
|
+
The app supplies resource routes and commands; the toolkit supplies the chrome,
|
|
73
|
+
keyboard patterns, and indexing conventions.
|
|
74
|
+
|
|
75
|
+
### Organization Kit {#organization-kit}
|
|
76
|
+
|
|
77
|
+
Common organization primitives belong in the toolkit: folders, tags, favorites,
|
|
78
|
+
archive, trash, recents, ownership, workspace membership, and resource metadata.
|
|
79
|
+
This keeps dashboards, documents, decks, forms, recordings, and designs from
|
|
80
|
+
each inventing a different organization system.
|
|
81
|
+
|
|
82
|
+
### Setup And Connections Kit {#setup-and-connections-kit}
|
|
83
|
+
|
|
84
|
+
API keys, OAuth grants, provider connections, model readiness, missing-secret
|
|
85
|
+
states, and onboarding checks should be declarative. Apps register what they
|
|
86
|
+
need; the shared setup surface explains what is missing and links to the
|
|
87
|
+
standard settings tab. See [Workspace Connections](/docs/workspace-connections)
|
|
88
|
+
and [Onboarding](/docs/onboarding).
|
|
89
|
+
|
|
90
|
+
### Agent UX Kit {#agent-ux-kit}
|
|
91
|
+
|
|
92
|
+
The sidebar, composer, staged context, mentions, voice input, run progress,
|
|
93
|
+
human approval, generative UI, and agent-visible screen state should feel like
|
|
94
|
+
one system across apps. Apps should expose context and actions; the toolkit
|
|
95
|
+
should render the agent interaction surface. See
|
|
96
|
+
[Component API](/docs/components) and
|
|
97
|
+
[Context Awareness](/docs/context-awareness).
|
|
98
|
+
|
|
99
|
+
### History And Recovery Kit {#history-and-recovery-kit}
|
|
100
|
+
|
|
101
|
+
Users need one way to answer "what changed?", "who did it?", "can I undo it?",
|
|
102
|
+
and "can I restore an older version?" Audit log, activity feed, version history,
|
|
103
|
+
undo/redo, checkpoints, and restore flows should share a toolkit contract even
|
|
104
|
+
when each app has different resource content. See [Audit Log](/docs/audit-log).
|
|
105
|
+
|
|
106
|
+
### Comments And Review Kit {#comments-and-review-kit}
|
|
107
|
+
|
|
108
|
+
Anchored comments, pins, review requests, resolved threads, mentions, and agent
|
|
109
|
+
follow-up tasks are reusable. Apps provide anchor adapters for text ranges,
|
|
110
|
+
slides, canvas nodes, rows, clips, or dashboard widgets; the toolkit owns the
|
|
111
|
+
thread UX and notification model.
|
|
112
|
+
|
|
113
|
+
### Notifications And Workflow Kit {#notifications-and-workflow-kit}
|
|
114
|
+
|
|
115
|
+
Notifications, approvals, scheduled work, background runs, recurring jobs, and
|
|
116
|
+
automation status should not be app-specific chrome. Apps emit domain events and
|
|
117
|
+
actions; the toolkit handles subscriptions, inboxes, approval prompts, and
|
|
118
|
+
status surfaces. See [Notifications](/docs/notifications),
|
|
119
|
+
[Human Approval](/docs/human-approval), and [Automations](/docs/automations).
|
|
120
|
+
|
|
121
|
+
### Observability Kit {#observability-kit}
|
|
122
|
+
|
|
123
|
+
Agentic apps need first-class traces, feedback, evals, run timelines, tool-call
|
|
124
|
+
inspection, and proof-of-done views. The toolkit should make these available to
|
|
125
|
+
builders and, where appropriate, to end users. See
|
|
126
|
+
[Observability](/docs/observability) and [Progress](/docs/progress).
|
|
127
|
+
|
|
128
|
+
## What Every App Should Inherit {#what-every-app-should-inherit}
|
|
129
|
+
|
|
130
|
+
New apps should start with these defaults:
|
|
131
|
+
|
|
132
|
+
- Standard Settings tabs and stable settings deep links.
|
|
133
|
+
- Shared agent sidebar, composer, command palette, and app shell primitives.
|
|
134
|
+
- Shared setup checks for model keys, OAuth connections, and secrets.
|
|
135
|
+
- Shared sharing dialog and resource permission model.
|
|
136
|
+
- Shared organization primitives for recents, favorites, folders, tags, archive,
|
|
137
|
+
and trash.
|
|
138
|
+
- Shared real-time presence, agent presence, undo/redo, and edit sync indicators
|
|
139
|
+
when the app has collaborative resources.
|
|
140
|
+
- Shared comments, review threads, notifications, and activity history when the
|
|
141
|
+
app has reviewable resources.
|
|
142
|
+
- Shared audit log, version history, restore, and proof-of-done patterns.
|
|
143
|
+
- App-specific actions, resource adapters, and context providers that plug into
|
|
144
|
+
the shared surfaces.
|
|
145
|
+
|
|
146
|
+
## Implementation Order {#implementation-order}
|
|
147
|
+
|
|
148
|
+
1. **Settings** - consolidate durable configuration into standard Settings tabs,
|
|
149
|
+
then replace sidebar settings sprawl with deep links and quick controls.
|
|
150
|
+
2. **Collaboration** - normalize real-time editing, undo/redo, presence, agent
|
|
151
|
+
presence, and recent edit highlights behind shared adapters.
|
|
152
|
+
3. **Navigation and organization** - move sidebars, command palette entries,
|
|
153
|
+
recents, favorites, folders, tags, archive, and trash into shared primitives.
|
|
154
|
+
4. **Resource sharing** - make every shareable app resource register with the
|
|
155
|
+
same sharing, privacy, role, and agent-readable access model.
|
|
156
|
+
5. **History, comments, and review** - give every collaborative resource a
|
|
157
|
+
consistent activity, comment, review, restore, and audit story.
|
|
158
|
+
6. **Workflow and observability** - unify notifications, approvals, background
|
|
159
|
+
run status, traces, evals, and user feedback.
|
|
160
|
+
|
|
161
|
+
This keeps the toolkit opinionated without making every app identical: apps
|
|
162
|
+
bring the domain; the toolkit brings the reusable operating system around it.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "مجموعة أدوات Agent-Native"
|
|
3
|
+
description: "مجموعات قابلة لإعادة الاستخدام للتعاون والإعدادات والمشاركة والتنقل والحضور والسجل والإعداد وتجربة الوكيل."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# مجموعة أدوات Agent-Native
|
|
7
|
+
|
|
8
|
+
لا ينبغي لتطبيقات Agent-Native إعادة بناء بنية الـ workspace المشتركة في كل
|
|
9
|
+
مرة. تمتلك التطبيقات نماذج المجال و actions الخاصة بالمجال وواجهات المنتج. أما
|
|
10
|
+
الإطار و `@agent-native/toolkit` فيمتلكان السطوح القابلة لإعادة الاستخدام التي
|
|
11
|
+
ينبغي أن يرثها كل تطبيق: التعاون، المشاركة، الإعدادات، التنقل، التنظيم،
|
|
12
|
+
الإعداد، تجربة Agent، السجل، والرؤية التشغيلية.
|
|
13
|
+
|
|
14
|
+
يجب أن يتعلم المستخدمون طريقة واحدة للمشاركة، وطريقة واحدة لربط المفاتيح،
|
|
15
|
+
ومكانا واحدا للإعدادات، وطريقة واحدة لرؤية Agent وهو يحرر معهم وفهم ما تغير.
|
|
16
|
+
|
|
17
|
+
## عقد مجموعة الأدوات {#toolkit-contract}
|
|
18
|
+
|
|
19
|
+
انقل السلوك إلى toolkit عندما يكون:
|
|
20
|
+
|
|
21
|
+
- **على مستوى workspace** - يتوقع المستخدمون السلوك نفسه في كل التطبيقات.
|
|
22
|
+
- **مرئيا للـ Agent** - يحتاج Agent إلى القدرة نفسها عبر actions أو instructions
|
|
23
|
+
أو application state.
|
|
24
|
+
- **محكوما** - تنطبق عليه الصلاحيات أو audit أو secrets أو سياسة المؤسسة أو
|
|
25
|
+
billing أو قواعد المشاركة.
|
|
26
|
+
- **متكررا** - بنى تطبيقان بالفعل UI أو logic متشابهين.
|
|
27
|
+
- **غير خاص بالمجال** - يقدم التطبيق أسماء الموارد و actions، لكن نمط التفاعل
|
|
28
|
+
عام.
|
|
29
|
+
|
|
30
|
+
أبق السلوك محليا عندما يكون مرتبطا بنموذج مجال أو workflow خاص بالتطبيق.
|
|
31
|
+
|
|
32
|
+
## مجموعات قابلة لإعادة الاستخدام {#reusable-kits}
|
|
33
|
+
|
|
34
|
+
- **Settings kit** - تبويبات قياسية للحساب، workspace، نماذج AI، مفاتيح LLM،
|
|
35
|
+
الاتصالات، secrets، الاستخدام، notifications، changelog وتفضيلات التطبيق.
|
|
36
|
+
تبقى الإعدادات الدائمة في Settings؛ وتبقى sidebar الخاصة بالـ Agent للروابط
|
|
37
|
+
العميقة والتحكم السياقي فقط.
|
|
38
|
+
- **Collaboration kit** - تحرير فوري، مستندات Yjs، presence، agent presence،
|
|
39
|
+
live cursors، remote selections، recent edit highlights و undo/redo مشترك.
|
|
40
|
+
راجع [Real-Time Collaboration](/docs/real-time-collaboration).
|
|
41
|
+
- **Sharing kit** - نموذج واحد للخصوصية والصلاحيات لـ private و workspace و org
|
|
42
|
+
و public link والدعوات والأدوار والانتهاء و agent-readable access. راجع
|
|
43
|
+
[Sharing & Privacy](/docs/sharing).
|
|
44
|
+
- **Navigation and command kit** - app shell، nav، breadcrumbs، app switcher،
|
|
45
|
+
command palette، recents، pinned resources و search.
|
|
46
|
+
- **Organization kit** - folders، tags، favorites، archive، trash، ownership،
|
|
47
|
+
membership و common metadata.
|
|
48
|
+
- **Setup and connections kit** - API keys، OAuth، connections، model readiness،
|
|
49
|
+
missing secrets و declarative onboarding. راجع
|
|
50
|
+
[Workspace Connections](/docs/workspace-connections).
|
|
51
|
+
- **Agent UX kit** - sidebar، composer، staged context، mentions، voice، human
|
|
52
|
+
approval، generative UI، progress و Agent-visible state.
|
|
53
|
+
- **History and recovery kit** - audit log، activity feed، version history،
|
|
54
|
+
checkpoints، undo، redo، restore و proof-of-done. راجع
|
|
55
|
+
[Audit Log](/docs/audit-log).
|
|
56
|
+
- **Comments and review kit** - anchored comments، pins، mentions، review
|
|
57
|
+
requests، resolved threads و Agent follow-up tasks.
|
|
58
|
+
- **Workflow and observability kit** - notifications، approvals، background
|
|
59
|
+
runs، recurring jobs، traces، evals، feedback و run timelines. راجع
|
|
60
|
+
[Observability](/docs/observability).
|
|
61
|
+
|
|
62
|
+
## ترتيب التنفيذ {#implementation-order}
|
|
63
|
+
|
|
64
|
+
1. اجمع الإعدادات الدائمة في تبويبات Settings القياسية.
|
|
65
|
+
2. وحّد collaboration و presence و agent presence و undo/redo و real-time editing
|
|
66
|
+
خلف adapters مشتركة.
|
|
67
|
+
3. انقل navigation و commands و recents و favorites و folders و tags و archive
|
|
68
|
+
و trash إلى primitives مشتركة.
|
|
69
|
+
4. سجّل كل resource قابل للمشاركة في نموذج permissions و agent-readable access
|
|
70
|
+
نفسه.
|
|
71
|
+
5. امنح كل collaborative resource تجربة متسقة للنشاط والتعليقات والمراجعة
|
|
72
|
+
والاستعادة و audit.
|
|
73
|
+
6. وحّد notifications و approvals و run status و traces و evals و feedback.
|
|
@@ -93,9 +93,10 @@ description: "المشاركة بأسلوب Google-Docs، المضمنة في إ
|
|
|
93
93
|
- **الشرائح** — التشكيلات
|
|
94
94
|
- **التصميم** — التصاميم والأصول
|
|
95
95
|
- **المقاطع** — تسجيلات الشاشة (نمط المنوال)
|
|
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
|
أخبر الوكيل "بمشاركة هذا التصميم مع فريق التسويق كمحررين" وسيقوم باستدعاء `share-resource` مقابل نفس نقطة النهاية التي يستخدمها UI. تظهر النتيجة في مربع حوار المشاركة في العرض التالي.
|
|
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))، فإن مشاركة الأسلاك تكون قصيرة. إضافتان إلى مخططك:
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Agent-Native-Toolkit"
|
|
3
|
+
description: "Wiederverwendbare Kits für Zusammenarbeit, Einstellungen, Teilen, Navigation, Präsenz, Verlauf, Einrichtung und Agent-UX."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent-Native-Toolkit
|
|
7
|
+
|
|
8
|
+
Agent-Native-Apps sollten Workspace-Infrastruktur nicht neu bauen. Apps besitzen
|
|
9
|
+
ihre Domänenmodelle, Domänenaktionen und produktspezifischen Ansichten. Das
|
|
10
|
+
Framework und `@agent-native/toolkit` besitzen die wiederverwendbare
|
|
11
|
+
Produktoberfläche, die jede App erben sollte: Zusammenarbeit, Teilen,
|
|
12
|
+
Einstellungen, Navigation, Organisation, Einrichtung, Agent-UX, Verlauf und
|
|
13
|
+
operative Sichtbarkeit.
|
|
14
|
+
|
|
15
|
+
Nutzer sollen eine einzige Art lernen, Ressourcen zu teilen, Schlüssel zu
|
|
16
|
+
verbinden, den Agenten beim Bearbeiten zu sehen, Einstellungen zu finden und
|
|
17
|
+
Änderungen zu verstehen.
|
|
18
|
+
|
|
19
|
+
## Toolkit-Vertrag {#toolkit-contract}
|
|
20
|
+
|
|
21
|
+
Verschiebe Verhalten in das Toolkit, wenn es:
|
|
22
|
+
|
|
23
|
+
- **Workspace-weit** ist - Nutzer erwarten dasselbe Verhalten in allen Apps.
|
|
24
|
+
- **Für den Agenten sichtbar** ist - der Agent braucht dieselbe Fähigkeit über
|
|
25
|
+
Aktionen, Anweisungen oder Application State.
|
|
26
|
+
- **Governed** ist - Berechtigungen, Audit, Secrets, Org-Policy, Billing oder
|
|
27
|
+
Sharing-Regeln gelten.
|
|
28
|
+
- **Wiederholt** ist - zwei Apps haben bereits ähnliche UI oder Logik gebaut.
|
|
29
|
+
- **Nicht domänenspezifisch** ist - die App liefert Ressourcennamen und
|
|
30
|
+
Aktionen, aber das Interaktionsmuster ist generisch.
|
|
31
|
+
|
|
32
|
+
Behalte Verhalten lokal, wenn es an ein Domänenmodell oder einen
|
|
33
|
+
app-spezifischen Workflow gebunden ist.
|
|
34
|
+
|
|
35
|
+
## Wiederverwendbare Kits {#reusable-kits}
|
|
36
|
+
|
|
37
|
+
- **Settings kit** - Standard-Tabs für Account, Workspace, AI-Modelle,
|
|
38
|
+
LLM-Schlüssel, Connections, Secrets, Usage, Notifications, Changelog und
|
|
39
|
+
App-Präferenzen. Dauerhafte Konfiguration gehört in Settings; die
|
|
40
|
+
Agent-Sidebar behält Kontextkontrollen und Deep Links.
|
|
41
|
+
- **Collaboration kit** - Echtzeitbearbeitung, Yjs-Dokumente, Presence,
|
|
42
|
+
Agent-Presence, Cursor, Remote-Auswahlen, Edit-Highlights und gemeinsames
|
|
43
|
+
Undo/Redo. Siehe [Real-Time Collaboration](/docs/real-time-collaboration).
|
|
44
|
+
- **Sharing kit** - ein Modell für Datenschutz und Berechtigungen: private,
|
|
45
|
+
workspace, org, public link, Einladungen, Rollen, Ablaufzeiten und
|
|
46
|
+
agent-readable access. Siehe [Sharing & Privacy](/docs/sharing).
|
|
47
|
+
- **Navigation and command kit** - App-Shell, Navigation, Breadcrumbs, App
|
|
48
|
+
Switcher, Command Palette, aktuelle Ressourcen, angeheftete Ressourcen und
|
|
49
|
+
Suche.
|
|
50
|
+
- **Organization kit** - Ordner, Tags, Favoriten, Archiv, Papierkorb,
|
|
51
|
+
Eigentümer, Mitgliedschaft und gemeinsame Metadaten.
|
|
52
|
+
- **Setup and connections kit** - API-Schlüssel, OAuth, Connections,
|
|
53
|
+
Modellbereitschaft, fehlende Secrets und deklaratives Onboarding. Siehe
|
|
54
|
+
[Workspace Connections](/docs/workspace-connections).
|
|
55
|
+
- **Agent UX kit** - Sidebar, Composer, staged context, Mentions, Voice, Human
|
|
56
|
+
Approval, generative UI, Fortschritt und für den Agenten sichtbarer Zustand.
|
|
57
|
+
- **History and recovery kit** - Audit Log, Activity Feed, Version History,
|
|
58
|
+
Checkpoints, Undo, Redo, Restore und Proof-of-Done. Siehe
|
|
59
|
+
[Audit Log](/docs/audit-log).
|
|
60
|
+
- **Comments and review kit** - verankerte Kommentare, Pins, Mentions,
|
|
61
|
+
Review-Anfragen, gelöste Threads und Agent-Follow-ups.
|
|
62
|
+
- **Workflow and observability kit** - Notifications, Approvals,
|
|
63
|
+
Background-Runs, recurring jobs, traces, evals, feedback und Run-Timelines.
|
|
64
|
+
Siehe [Observability](/docs/observability).
|
|
65
|
+
|
|
66
|
+
## Implementierungsreihenfolge {#implementation-order}
|
|
67
|
+
|
|
68
|
+
1. Dauerhafte Konfiguration in Standard-Settings-Tabs konsolidieren.
|
|
69
|
+
2. Collaboration, Presence, Agent-Presence, Undo/Redo und Echtzeitbearbeitung
|
|
70
|
+
hinter gemeinsamen Adaptern normalisieren.
|
|
71
|
+
3. Navigation, Commands, Recents, Favoriten, Ordner, Tags, Archiv und Papierkorb
|
|
72
|
+
in gemeinsame Primitive verschieben.
|
|
73
|
+
4. Jede teilbare Ressource im selben Berechtigungs- und agent-readable
|
|
74
|
+
Access-Modell registrieren.
|
|
75
|
+
5. Kollaborativen Ressourcen eine konsistente Story für Aktivität, Kommentare,
|
|
76
|
+
Review, Restore und Audit geben.
|
|
77
|
+
6. Notifications, Approvals, Run-Status, Traces, Evals und Feedback vereinheitlichen.
|
|
@@ -93,9 +93,10 @@ Jede Vorlage, die vom Benutzer erstellte Arbeiten speichert, verwendet dieses Mo
|
|
|
93
93
|
- **Folien** – Decks
|
|
94
94
|
- **Design** – Designs und Assets
|
|
95
95
|
- **Clips** – Bildschirmaufnahmen (Loom-Stil)
|
|
96
|
+
- **Plan** — visual plans and PR recaps
|
|
96
97
|
- **Formulare** – Formulardefinitionen
|
|
97
98
|
- **Kalender** – Veranstaltungen und Buchungslinks
|
|
98
|
-
- **Analytics** –
|
|
99
|
+
- **Analytics** – dashboards, saved analyses, and tokenized session replays
|
|
99
100
|
- **Erweiterungen** – Sandbox-Mini-Apps (siehe [Extensions](/docs/extensions#sharing))
|
|
100
101
|
|
|
101
102
|
Alle davon verwenden denselben `ownableColumns()`-Schema-Helfer, dieselbe `share-resource`-Aktion und denselben `<ShareButton>` UI. Wenn Sie von einer Vorlage zu einer anderen wechseln, sieht der Freigabedialog identisch aus.
|
|
@@ -136,15 +137,22 @@ Fügen Sie bei Listen neben jeder Zeile ein `<VisibilityBadge visibility={row.vi
|
|
|
136
137
|
|
|
137
138
|
Das Framework mountet diese actions automatisch in jeder Vorlage – der Agent nennt sie als Tools und der UI ruft sie über `useActionQuery` / `useActionMutation` auf:
|
|
138
139
|
|
|
139
|
-
| Aktion
|
|
140
|
-
|
|
|
141
|
-
| `share-resource`
|
|
142
|
-
| `unshare-resource`
|
|
143
|
-
| `list-resource-shares`
|
|
144
|
-
| `set-resource-visibility`
|
|
140
|
+
| Aktion | Was es tut |
|
|
141
|
+
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
142
|
+
| `share-resource` | Gewähren Sie einem Benutzer oder einer Organisation Zugriff für eine bestimmte Rolle. Optionales `notify` steuert E-Mail-Benachrichtigungen. |
|
|
143
|
+
| `unshare-resource` | Zugriff für einen Benutzer oder eine Organisation widerrufen. |
|
|
144
|
+
| `list-resource-shares` | Aktuelle Sichtbarkeit sowie alle expliziten Gewährungen anzeigen. |
|
|
145
|
+
| `set-resource-visibility` | Wechseln Sie zu `private`, `org` oder `public`. |
|
|
146
|
+
| `create-agent-resource-link` | Mint a temporary read-only `agent_access` URL for a registered agent-readable resource. |
|
|
145
147
|
|
|
146
148
|
Sagen Sie dem Agenten: „Teilen Sie dieses Design mit dem Marketingteam als Redakteuren“, und er ruft `share-resource` für denselben Endpunkt auf, den UI verwendet. Das Ergebnis wird beim nächsten Rendern im Freigabedialog angezeigt.
|
|
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
|
## In eine neue Vorlage einbauen {#building}
|
|
149
157
|
|
|
150
158
|
Wenn Sie eine Vorlage erstellen (siehe [Creating Templates](/docs/creating-templates)), ist die gemeinsame Nutzung der Verkabelung kurz. Zwei Ergänzungen zu Ihrem Schema:
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Toolkit de Agent-Native"
|
|
3
|
+
description: "Kits reutilizables para colaboración, ajustes, compartir, navegación, presencia, historial, configuración y UX del agente."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Toolkit de Agent-Native
|
|
7
|
+
|
|
8
|
+
Las apps de Agent-Native no deberían reconstruir la fontanería del workspace.
|
|
9
|
+
Las apps son dueñas de sus modelos, acciones y vistas de producto. El framework
|
|
10
|
+
y `@agent-native/toolkit` son dueños de las piezas reutilizables que todas las
|
|
11
|
+
apps deberían heredar: colaboración, compartir, ajustes, navegación,
|
|
12
|
+
organización, configuración, UX del agente, historial y visibilidad operativa.
|
|
13
|
+
|
|
14
|
+
El objetivo es que los usuarios aprendan una sola forma de compartir, conectar
|
|
15
|
+
claves, ver al agente editar junto a ellos, encontrar ajustes y entender qué
|
|
16
|
+
cambió.
|
|
17
|
+
|
|
18
|
+
## Contrato del toolkit {#toolkit-contract}
|
|
19
|
+
|
|
20
|
+
Mueve comportamiento al toolkit cuando sea:
|
|
21
|
+
|
|
22
|
+
- **De workspace** - los usuarios esperan que funcione igual en todas las apps.
|
|
23
|
+
- **Visible para el agente** - el agente necesita la misma capacidad mediante
|
|
24
|
+
acciones, instrucciones o estado de aplicación.
|
|
25
|
+
- **Gobernado** - aplican permisos, auditoría, secretos, política de org,
|
|
26
|
+
facturación o reglas de compartir.
|
|
27
|
+
- **Repetido** - dos apps ya construyeron UI o lógica parecida.
|
|
28
|
+
- **No específico del dominio** - la app aporta nombres y acciones de recursos,
|
|
29
|
+
pero el patrón de interacción es genérico.
|
|
30
|
+
|
|
31
|
+
Mantén lo local cuando dependa de un modelo de dominio o de un flujo propio de
|
|
32
|
+
la app.
|
|
33
|
+
|
|
34
|
+
## Kits reutilizables {#reusable-kits}
|
|
35
|
+
|
|
36
|
+
- **Settings kit** - pestañas estándar para cuenta, workspace, modelos de AI,
|
|
37
|
+
claves LLM, conexiones, secretos, uso, notificaciones, changelog y preferencias
|
|
38
|
+
de app. La configuración durable vive en Settings; la barra lateral del agente
|
|
39
|
+
conserva controles contextuales y enlaces profundos.
|
|
40
|
+
- **Collaboration kit** - edición en tiempo real, documentos Yjs, presencia,
|
|
41
|
+
presencia del agente, cursores, selecciones remotas, resaltado de ediciones y
|
|
42
|
+
undo/redo compartido. Ver
|
|
43
|
+
[Real-Time Collaboration](/docs/real-time-collaboration).
|
|
44
|
+
- **Sharing kit** - un solo modelo de privacidad y permisos para privado,
|
|
45
|
+
workspace, org, enlace público, invitaciones, roles, expiraciones y acceso
|
|
46
|
+
legible por agentes. Ver [Sharing & Privacy](/docs/sharing).
|
|
47
|
+
- **Navigation and command kit** - app shell, navegación, breadcrumbs, app
|
|
48
|
+
switcher, command palette, recursos recientes, recursos fijados y búsqueda.
|
|
49
|
+
- **Organization kit** - carpetas, tags, favoritos, archivo, papelera,
|
|
50
|
+
propietarios, membresía y metadata común.
|
|
51
|
+
- **Setup and connections kit** - claves API, OAuth, conexiones, estado de
|
|
52
|
+
modelos, secretos faltantes y onboarding declarativo. Ver
|
|
53
|
+
[Workspace Connections](/docs/workspace-connections).
|
|
54
|
+
- **Agent UX kit** - sidebar, composer, contexto preparado, menciones, voz,
|
|
55
|
+
aprobación humana, UI generativa, progreso y estado visible para el agente.
|
|
56
|
+
- **History and recovery kit** - audit log, activity feed, version history,
|
|
57
|
+
checkpoints, undo, redo, restore y proof-of-done. Ver
|
|
58
|
+
[Audit Log](/docs/audit-log).
|
|
59
|
+
- **Comments and review kit** - comentarios anclados, pines, menciones,
|
|
60
|
+
solicitudes de revisión, threads resueltos y tareas de seguimiento del agente.
|
|
61
|
+
- **Workflow and observability kit** - notificaciones, aprobaciones, runs en
|
|
62
|
+
background, jobs recurrentes, traces, evals, feedback y líneas de tiempo. Ver
|
|
63
|
+
[Observability](/docs/observability).
|
|
64
|
+
|
|
65
|
+
## Orden de implementación {#implementation-order}
|
|
66
|
+
|
|
67
|
+
1. Consolidar la configuración durable en pestañas estándar de Settings.
|
|
68
|
+
2. Normalizar colaboración, presence, agent presence, undo/redo y edición en
|
|
69
|
+
tiempo real detrás de adapters compartidos.
|
|
70
|
+
3. Mover navegación, comandos, recientes, favoritos, carpetas, tags, archivo y
|
|
71
|
+
papelera a primitivas compartidas.
|
|
72
|
+
4. Registrar todos los recursos compartibles en el mismo modelo de permisos y
|
|
73
|
+
acceso legible por agentes.
|
|
74
|
+
5. Dar a cada recurso colaborativo una historia consistente de actividad,
|
|
75
|
+
comentarios, revisión, restore y auditoría.
|
|
76
|
+
6. Unificar notificaciones, aprobaciones, estado de runs, traces, evals y
|
|
77
|
+
feedback.
|
|
@@ -93,9 +93,10 @@ Cada plantilla que almacena trabajos escritos por usuarios utiliza este modelo.
|
|
|
93
93
|
- **Diapositivas**: presentaciones
|
|
94
94
|
- **Diseño**: diseños y recursos
|
|
95
95
|
- **Clips**: grabaciones de pantalla (estilo Loom)
|
|
96
|
+
- **Plan** — visual plans and PR recaps
|
|
96
97
|
- **Formularios**: definiciones de formulario
|
|
97
98
|
- **Calendario**: enlaces a eventos y reservas
|
|
98
|
-
- **Analytics**:
|
|
99
|
+
- **Analytics**: dashboards, saved analyses, and tokenized session replays
|
|
99
100
|
- **Extensiones**: miniaplicaciones en espacio aislado (consulte [Extensions](/docs/extensions#sharing))
|
|
100
101
|
|
|
101
102
|
Cada uno de estos utiliza el mismo asistente de esquema `ownableColumns()`, la misma acción `share-resource` y el mismo `<ShareButton>` UI. Pase de una plantilla a otra y el cuadro de diálogo para compartir se verá idéntico.
|
|
@@ -136,15 +137,22 @@ Para las listas, coloque un `<VisibilityBadge visibility={row.visibility} />` al
|
|
|
136
137
|
|
|
137
138
|
El marco monta automáticamente estos actions en cada plantilla: el agente los llama como herramientas y el UI los llama a través de `useActionQuery`/`useActionMutation`:
|
|
138
139
|
|
|
139
|
-
| Acción
|
|
140
|
-
|
|
|
141
|
-
| `share-resource`
|
|
142
|
-
| `unshare-resource`
|
|
143
|
-
| `list-resource-shares`
|
|
144
|
-
| `set-resource-visibility`
|
|
140
|
+
| Acción | Qué hace |
|
|
141
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
142
|
+
| `share-resource` | Otorgar acceso a un usuario u organización en una función específica. El `notify` opcional controla las notificaciones por correo electrónico. |
|
|
143
|
+
| `unshare-resource` | Revocar el acceso a un usuario u organización. |
|
|
144
|
+
| `list-resource-shares` | Mostrar visibilidad actual más todas las subvenciones explícitas. |
|
|
145
|
+
| `set-resource-visibility` | Cambiar a `private`, `org` o `public`. |
|
|
146
|
+
| `create-agent-resource-link` | Mint a temporary read-only `agent_access` URL for a registered agent-readable resource. |
|
|
145
147
|
|
|
146
148
|
Dígale al agente "comparta este diseño con el equipo de marketing como editores" y llamará a `share-resource` contra el mismo punto final que utiliza UI. El resultado aparece en el cuadro de diálogo para compartir en el siguiente renderizado.
|
|
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
|
## Construyéndolo en una nueva plantilla {#building}
|
|
149
157
|
|
|
150
158
|
Si está creando una plantilla (consulte [Creating Templates](/docs/creating-templates)), el cableado compartido es corto. Dos adiciones a su esquema:
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Boîte à outils Agent-Native"
|
|
3
|
+
description: "Kits réutilisables pour collaboration, réglages, partage, navigation, présence, historique, configuration et UX agent."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Boîte à outils Agent-Native
|
|
7
|
+
|
|
8
|
+
Les apps Agent-Native ne devraient pas reconstruire toute la plomberie du
|
|
9
|
+
workspace. Les apps possèdent leurs modèles métier, leurs actions métier et
|
|
10
|
+
leurs vues produit. Le framework et `@agent-native/toolkit` possèdent les
|
|
11
|
+
surfaces réutilisables que chaque app devrait hériter : collaboration, partage,
|
|
12
|
+
réglages, navigation, organisation, configuration, UX agent, historique et
|
|
13
|
+
visibilité opérationnelle.
|
|
14
|
+
|
|
15
|
+
L'objectif est que les utilisateurs apprennent une seule manière de partager,
|
|
16
|
+
connecter des clés, voir l'agent modifier avec eux, trouver les réglages et
|
|
17
|
+
comprendre ce qui a changé.
|
|
18
|
+
|
|
19
|
+
## Contrat du toolkit {#toolkit-contract}
|
|
20
|
+
|
|
21
|
+
Déplacez un comportement dans le toolkit quand il est :
|
|
22
|
+
|
|
23
|
+
- **À l'échelle du workspace** - les utilisateurs s'attendent au même
|
|
24
|
+
fonctionnement dans toutes les apps.
|
|
25
|
+
- **Visible par l'agent** - l'agent a besoin de la même capacité via actions,
|
|
26
|
+
instructions ou état applicatif.
|
|
27
|
+
- **Gouverné** - permissions, audit, secrets, politique d'organisation,
|
|
28
|
+
facturation ou règles de partage s'appliquent.
|
|
29
|
+
- **Répété** - deux apps ont déjà construit une UI ou une logique similaire.
|
|
30
|
+
- **Non spécifique au domaine** - l'app fournit les noms et actions de
|
|
31
|
+
ressources, mais le modèle d'interaction est générique.
|
|
32
|
+
|
|
33
|
+
Gardez le comportement local quand il dépend vraiment du domaine ou d'un flux
|
|
34
|
+
spécifique à l'app.
|
|
35
|
+
|
|
36
|
+
## Kits réutilisables {#reusable-kits}
|
|
37
|
+
|
|
38
|
+
- **Settings kit** - onglets standard pour compte, workspace, modèles AI, clés
|
|
39
|
+
LLM, connexions, secrets, usage, notifications, changelog et préférences
|
|
40
|
+
d'app. La configuration durable vit dans Settings ; la sidebar agent garde des
|
|
41
|
+
contrôles contextuels et des liens profonds.
|
|
42
|
+
- **Collaboration kit** - édition temps réel, documents Yjs, présence, présence
|
|
43
|
+
de l'agent, curseurs, sélections distantes, surlignage des éditions et
|
|
44
|
+
undo/redo partagé. Voir
|
|
45
|
+
[Real-Time Collaboration](/docs/real-time-collaboration).
|
|
46
|
+
- **Sharing kit** - un seul modèle de confidentialité et permissions pour privé,
|
|
47
|
+
workspace, org, lien public, invitations, rôles, expirations et accès lisible
|
|
48
|
+
par l'agent. Voir [Sharing & Privacy](/docs/sharing).
|
|
49
|
+
- **Navigation and command kit** - app shell, navigation, breadcrumbs, app
|
|
50
|
+
switcher, command palette, ressources récentes, ressources épinglées et
|
|
51
|
+
recherche.
|
|
52
|
+
- **Organization kit** - dossiers, tags, favoris, archive, corbeille,
|
|
53
|
+
propriétaires, membres et metadata commune.
|
|
54
|
+
- **Setup and connections kit** - clés API, OAuth, connexions, disponibilité des
|
|
55
|
+
modèles, secrets manquants et onboarding déclaratif. Voir
|
|
56
|
+
[Workspace Connections](/docs/workspace-connections).
|
|
57
|
+
- **Agent UX kit** - sidebar, composer, contexte préparé, mentions, voix,
|
|
58
|
+
validation humaine, UI générative, progression et état visible par l'agent.
|
|
59
|
+
- **History and recovery kit** - audit log, activity feed, version history,
|
|
60
|
+
checkpoints, undo, redo, restore et proof-of-done. Voir
|
|
61
|
+
[Audit Log](/docs/audit-log).
|
|
62
|
+
- **Comments and review kit** - commentaires ancrés, pins, mentions, demandes de
|
|
63
|
+
review, threads résolus et tâches de suivi agent.
|
|
64
|
+
- **Workflow and observability kit** - notifications, validations, runs en
|
|
65
|
+
arrière-plan, jobs récurrents, traces, evals, feedback et timelines. Voir
|
|
66
|
+
[Observability](/docs/observability).
|
|
67
|
+
|
|
68
|
+
## Ordre d'implémentation {#implementation-order}
|
|
69
|
+
|
|
70
|
+
1. Consolider la configuration durable dans des onglets Settings standard.
|
|
71
|
+
2. Normaliser collaboration, presence, agent presence, undo/redo et édition
|
|
72
|
+
temps réel derrière des adapters partagés.
|
|
73
|
+
3. Déplacer navigation, commandes, récents, favoris, dossiers, tags, archive et
|
|
74
|
+
corbeille vers des primitives partagées.
|
|
75
|
+
4. Enregistrer chaque ressource partageable dans le même modèle de permissions
|
|
76
|
+
et d'accès lisible par l'agent.
|
|
77
|
+
5. Donner à chaque ressource collaborative une histoire cohérente d'activité,
|
|
78
|
+
commentaires, review, restore et audit.
|
|
79
|
+
6. Unifier notifications, validations, état des runs, traces, evals et feedback.
|