@agent-native/core 0.66.6 → 0.66.8

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.
Files changed (52) hide show
  1. package/dist/agent/run-manager.d.ts.map +1 -1
  2. package/dist/agent/run-manager.js +29 -4
  3. package/dist/agent/run-manager.js.map +1 -1
  4. package/dist/cli/code-agent-executor.js +2 -2
  5. package/dist/cli/code-agent-executor.js.map +1 -1
  6. package/dist/cli/index.js +2 -2
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/cli/skills.d.ts +9 -3
  9. package/dist/cli/skills.d.ts.map +1 -1
  10. package/dist/cli/skills.js +393 -45
  11. package/dist/cli/skills.js.map +1 -1
  12. package/dist/client/AgentPanel.d.ts.map +1 -1
  13. package/dist/client/AgentPanel.js +5 -6
  14. package/dist/client/AgentPanel.js.map +1 -1
  15. package/dist/client/blocks/library/AnnotatedCodeBlock.js +2 -2
  16. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
  17. package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
  18. package/dist/client/blocks/library/DiffBlock.js +1 -1
  19. package/dist/client/blocks/library/DiffBlock.js.map +1 -1
  20. package/dist/client/blocks/library/annotation-rail.d.ts +3 -1
  21. package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
  22. package/dist/client/blocks/library/annotation-rail.js +32 -4
  23. package/dist/client/blocks/library/annotation-rail.js.map +1 -1
  24. package/dist/client/chat/runtime.d.ts.map +1 -1
  25. package/dist/client/chat/runtime.js +5 -2
  26. package/dist/client/chat/runtime.js.map +1 -1
  27. package/dist/client/error-format.d.ts +1 -1
  28. package/dist/client/error-format.d.ts.map +1 -1
  29. package/dist/client/error-format.js +23 -2
  30. package/dist/client/error-format.js.map +1 -1
  31. package/dist/client/sse-event-processor.d.ts.map +1 -1
  32. package/dist/client/sse-event-processor.js +3 -2
  33. package/dist/client/sse-event-processor.js.map +1 -1
  34. package/dist/file-upload/pre-upload-attachments.js +1 -1
  35. package/dist/file-upload/pre-upload-attachments.js.map +1 -1
  36. package/dist/scripts/runner.d.ts +1 -1
  37. package/dist/scripts/runner.d.ts.map +1 -1
  38. package/dist/scripts/runner.js +40 -6
  39. package/dist/scripts/runner.js.map +1 -1
  40. package/dist/templates/headless/AGENTS.md +1 -1
  41. package/dist/templates/headless/DEVELOPING.md +1 -1
  42. package/dist/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +11 -0
  43. package/docs/content/actions.md +11 -2
  44. package/docs/content/local-file-mode.md +25 -0
  45. package/docs/content/messaging.md +24 -0
  46. package/docs/content/skills-guide.md +3 -0
  47. package/docs/content/template-clips.md +60 -0
  48. package/docs/content/template-content.md +15 -0
  49. package/package.json +1 -1
  50. package/src/templates/headless/AGENTS.md +1 -1
  51. package/src/templates/headless/DEVELOPING.md +1 -1
  52. package/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +11 -0
@@ -213,6 +213,17 @@ The adapter is **only** responsible for:
213
213
  It does **not** know about the queue, the processor, retries, or the agent
214
214
  loop. Those are handled by the shared webhook handler.
215
215
 
216
+ ### Slack non-message events
217
+
218
+ Slack's Events API also sends events that are not agent messages, such as
219
+ `link_shared` for app unfurls. Do not map those into `IncomingMessage` unless
220
+ they should actually run the agent. Handle them as short, provider-specific
221
+ webhook work: verify the Slack signature, return `200 OK` quickly, and call the
222
+ provider API needed for the event (`chat.unfurl` for link previews). If a single
223
+ Slack app must handle both agent chat and app unfurls, put a dispatcher in front
224
+ of the one Slack Events Request URL and route message events to the integration
225
+ webhook flow while routing `link_shared` to the app-specific unfurl handler.
226
+
216
227
  ## Long-Running Agent Work
217
228
 
218
229
  The processor endpoint runs in a fresh function execution with its own full
@@ -56,6 +56,13 @@ export default defineAction({
56
56
 
57
57
  Run it from the same folder:
58
58
 
59
+ ```bash
60
+ pnpm action hello '{"name":"Steve"}'
61
+ ```
62
+
63
+ The CLI accepts a JSON object as the action input, which matches the structured
64
+ tool calls agents already make. Simple flags still work for quick manual runs:
65
+
59
66
  ```bash
60
67
  pnpm action hello --name Steve
61
68
  ```
@@ -415,10 +422,12 @@ headless, render in chat, or grow into a full screen.
415
422
  Every action is runnable via `pnpm action`:
416
423
 
417
424
  ```bash
418
- pnpm action reply-to-email --emailId thread-123 --body "Thanks!"
425
+ pnpm action reply-to-email '{"emailId":"thread-123","body":"Thanks!"}'
419
426
  ```
420
427
 
421
- Flags are parsed into the shape your schema expects. Useful for agent-dev loops, scripts, and cron.
428
+ JSON input is the preferred shape for agents and complex objects. Flags are
429
+ still parsed into the same schema shape for simple manual runs and existing
430
+ scripts. Useful for agent-dev loops, scripts, and cron.
422
431
 
423
432
  ## Calling it from another agent (A2A) {#a2a}
424
433
 
@@ -91,6 +91,31 @@ without requiring you to clone or fork the entire Content app.
91
91
  small sandboxed widgets that can render in app slots while their source stays in
92
92
  the repo.
93
93
 
94
+ ## Install Content Into A Repo
95
+
96
+ For an existing docs, blog, or MDX workspace, install the Content local-files
97
+ skill:
98
+
99
+ ```bash
100
+ npx @agent-native/core@latest skills add content --mode local-files --scope project
101
+ ```
102
+
103
+ This copies the `content` skill into the repo's agent skill folders and writes
104
+ or updates `agent-native.json` with Content defaults:
105
+
106
+ - `mode: "local-files"` at the workspace level
107
+ - `apps.content.mode: "local-files"`
108
+ - content roots for `docs/`, `blog/`, `content/`, and `resources/`
109
+ - `components/` for local MDX components
110
+ - `extensions/` for local extension widgets
111
+
112
+ The installed skill tells coding agents to use Content actions
113
+ (`list-documents`, `get-document`, `edit-document`, `update-document`,
114
+ `share-local-file-document`, and component-file actions) when a local Content app
115
+ or Agent Native Desktop bridge exposes them. If no bridge is running, the skill
116
+ falls back to safe direct repo edits while preserving frontmatter, imports, JSX,
117
+ and unknown MDX.
118
+
94
119
  ## Configuration
95
120
 
96
121
  Add `agent-native.json` to the repo or workspace root:
@@ -58,6 +58,30 @@ Connect your agent to Slack, email, Telegram, or WhatsApp so you can chat with i
58
58
 
59
59
  7. Send your bot a DM in Slack. It should reply.
60
60
 
61
+ ### Optional: app unfurls
62
+
63
+ Slack app unfurls let an app replace Slack's normal link preview with a richer
64
+ preview. Clips uses this for Loom-style playable video previews.
65
+
66
+ Add these extra bot scopes when your app needs unfurls:
67
+
68
+ - `links:read` — lets Slack notify the app when registered domains are posted
69
+ - `links:write` — lets the app replace Slack's default preview
70
+ - `links.embed:write` — lets the app embed approved media/player URLs
71
+
72
+ Then subscribe to the `link_shared` event and register your public app domains
73
+ under **App Unfurl Domains**. For Clips-only playable previews, set the Slack
74
+ Event Subscriptions Request URL to:
75
+
76
+ ```text
77
+ https://your-clips.example.com/api/slack/unfurl
78
+ ```
79
+
80
+ A Slack app has one Events API Request URL. If the same Slack app should handle
81
+ both agent chat events and Clips unfurls, route Slack events through a small
82
+ dispatcher that sends message events to `/_agent-native/integrations/slack/webhook`
83
+ and `link_shared` events to the Clips unfurl handler.
84
+
61
85
  ### Tips
62
86
 
63
87
  - **Channel mentions** — the bot only responds in channels when it's @-mentioned, to avoid noise.
@@ -202,6 +202,9 @@ offline work, or privacy-sensitive use.
202
202
  npx @agent-native/core@latest skills add visual-plan
203
203
  npx @agent-native/core@latest skills add assets
204
204
 
205
+ # Repo-first Content docs/blog/MDX editing.
206
+ npx @agent-native/core@latest skills add content --mode local-files --scope project
207
+
205
208
  # Vercel/open Skills CLI: exported instructions only, no MCP config.
206
209
  npx skills@latest add BuilderIO/agent-native --skill assets
207
210
 
@@ -31,6 +31,8 @@ Think along the lines of Loom + Granola + Wispr Flow rolled into one app — but
31
31
  - **Get an auto-generated title, summary, and chapter markers** for every recording — the agent fills them in and keeps them current.
32
32
  - **Search across every transcript** — screen recordings, meetings, and dictations all in one library. "Find the clip where we discussed the rollout plan."
33
33
  - **Share clips** with per-clip permissions (public, team, private). Link tracking and threaded comments work too.
34
+ - **Preview public clips in Slack** with a Loom-style playable unfurl after the
35
+ workspace installs your Clips Slack app.
34
36
  - **Paste Clips links into agents** so they can discover the agent-readable context: metadata, transcript segments, recommended frames, and timestamped frame images without receiving the raw video file.
35
37
  - **Smart library views.** Group by project, filter by speaker, auto-tag based on content.
36
38
  - **Edit the transcript through chat.** "Fix the mis-transcribed word at 1:42." "Pull three quotes for a blog post." The agent edits the transcript and the UI updates live.
@@ -53,6 +55,11 @@ Password-protected clips require the password once; successful responses return
53
55
  short-lived tokenized links so downstream agents do not need the plaintext
54
56
  password.
55
57
 
58
+ Slack previews use the same sharing boundary. The `/api/slack/unfurl` webhook
59
+ only returns a playable Slack `video` block for ready, public clips without a
60
+ password, expiry hit, archive marker, or trash marker. Other clips still get the
61
+ normal share-page title/thumbnail metadata and require opening Clips.
62
+
56
63
  ```an-api title="Agent context entry point"
57
64
  {
58
65
  "method": "GET",
@@ -137,6 +144,54 @@ Clips is a larger template with a native recorder (it ships a desktop companion
137
144
  1. **Video storage (required).** Connect a storage backend through the onboarding wizard. The easiest path is Builder.io (free during beta, one-click). For self-hosted storage, set `S3_ENDPOINT`, `S3_BUCKET`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY`, and optionally `S3_REGION` and `S3_PUBLIC_BASE_URL`. Cloudflare R2 and DigitalOcean Spaces use the same env vars with the `R2_*` prefix.
138
145
  2. **Google Calendar (optional).** To sync upcoming meetings, connect a Google Calendar account from Settings. The OAuth callback URL in dev is `http://localhost:8094/_agent-native/google/callback`. Set up a Google OAuth client in [Google Cloud Console](https://console.cloud.google.com/) with the Gmail and Google Calendar APIs enabled.
139
146
  3. **Screen-capture permissions.** On macOS, grant Screen Recording permission to the browser (or the desktop companion app) in System Settings → Privacy & Security → Screen Recording.
147
+ 4. **Slack previews (optional).** Create a Slack app with `links:read`, `links:write`, and `links.embed:write`; subscribe to `link_shared`; add your Clips share domain under **App Unfurl Domains**; and set the Request URL to `https://your-clips.example.com/api/slack/unfurl`. Configure `SLACK_BOT_TOKEN` and `SLACK_SIGNING_SECRET` in the Clips deployment.
148
+
149
+ ### Host your own Clips server
150
+
151
+ The hosted Clips app at [clips.agent-native.com](https://clips.agent-native.com)
152
+ is just a deployed copy of the Clips template. To run your own server, scaffold
153
+ the template, deploy it like any other agent-native app, then point the desktop
154
+ tray app at your deployment.
155
+
156
+ 1. **Create the app.**
157
+
158
+ ```bash
159
+ npx @agent-native/core@latest create my-clips --standalone --template clips
160
+ cd my-clips
161
+ pnpm install
162
+ ```
163
+
164
+ 2. **Configure production state.** Set a persistent `DATABASE_URL`, the normal
165
+ production auth/secrets variables from [Deployment](/docs/deployment), and a
166
+ video storage provider. Builder.io Connect is the easiest storage path; for
167
+ self-hosted storage, use `S3_*` or `R2_*` variables for an S3-compatible
168
+ bucket.
169
+
170
+ 3. **Deploy the web app.** For a plain Node deploy:
171
+
172
+ ```bash
173
+ pnpm build
174
+ node .output/server/index.mjs
175
+ ```
176
+
177
+ You can also use any Nitro target from [Deployment](/docs/deployment), such
178
+ as Netlify, Vercel, Cloudflare Pages, AWS Lambda, or Deno Deploy. Make sure
179
+ `BETTER_AUTH_URL` is the public Clips origin, for example
180
+ `https://clips.example.com`.
181
+
182
+ 4. **Connect the desktop tray app.** Open Clips Desktop settings and set
183
+ **Clips server URL** to the public base URL of your deployment, for example
184
+ `https://clips.example.com`. If the app is mounted under a workspace path,
185
+ include that path, such as `https://example.com/clips`. Click **Connect**,
186
+ then sign in with an account on that Clips server.
187
+
188
+ 5. **Connect optional integrations.** Google Calendar powers the Meetings tab,
189
+ `GEMINI_API_KEY` or Builder.io Connect powers transcript cleanup and titles,
190
+ `GROQ_API_KEY` can provide speech-to-text fallback, and Slack credentials
191
+ enable playable Slack unfurls.
192
+
193
+ For local development, run the web app with `pnpm dev` and point the desktop
194
+ tray app at `http://localhost:8094`.
140
195
 
141
196
  ### Key features
142
197
 
@@ -148,6 +203,11 @@ Clips is a larger template with a native recorder (it ships a desktop companion
148
203
 
149
204
  **Agent-readable share links.** Public share links expose transcript and frame APIs so agents can understand recordings without ingesting raw video.
150
205
 
206
+ **Slack playable unfurls.** Public share links can render a Slack `video` block
207
+ that points at the existing `/embed/:id` player. This is a workspace Slack app
208
+ install, not a global crawler behavior: normal Open Graph/Twitter metadata is
209
+ the fallback when the app is not installed.
210
+
151
211
  ### Data model
152
212
 
153
213
  All data lives in SQL via Drizzle ORM. Schema: `templates/clips/server/db/schema.ts`. Recordings, meetings, dictations, calendar accounts, and vocabulary all carry the standard `ownableColumns` and have a matching framework shares table, so they slot into the per-user / per-org sharing model.
@@ -90,6 +90,21 @@ SQL-backed sharing. See [Local File Mode](/docs/local-file-mode) for the
90
90
  standalone repo layout, configuration, custom MDX components, local
91
91
  `extensions/` widgets, and production safety guide.
92
92
 
93
+ To install the Content local-files skill into an existing repo:
94
+
95
+ ```bash
96
+ npx @agent-native/core@latest skills add content --mode local-files --scope project
97
+ ```
98
+
99
+ The installer copies the `content` skill for your coding agent and writes or
100
+ updates `agent-native.json` with Content roots for `docs/`, `blog/`, `content/`,
101
+ and `resources/`. When a local Content app, Agent Native Desktop, or trusted
102
+ local bridge is running, agents should use Content actions such as
103
+ `list-documents`, `get-document`, `edit-document`, `update-document`, and
104
+ `share-local-file-document` instead of raw filesystem writes. Without that local
105
+ bridge, the installed skill still gives the agent the repo-editing contract for
106
+ safe Markdown/MDX edits.
107
+
93
108
  ## For developers
94
109
 
95
110
  The rest of this doc is for anyone forking the Content template or extending it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.66.6",
3
+ "version": "0.66.8",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -45,7 +45,7 @@ features. Prefer this app's own `AGENTS.md` for app-specific rules.
45
45
  Run actions from this app root:
46
46
 
47
47
  ```bash
48
- pnpm action hello --name Builder
48
+ pnpm action hello '{"name":"Builder"}'
49
49
  ```
50
50
 
51
51
  Run the app-agent loop against those actions:
@@ -4,7 +4,7 @@ Install dependencies, then run the hello action:
4
4
 
5
5
  ```bash
6
6
  pnpm install
7
- pnpm action hello --name Builder
7
+ pnpm action hello '{"name":"Builder"}'
8
8
  ```
9
9
 
10
10
  `actions/run.ts` is only the shared CLI dispatcher that powers
@@ -213,6 +213,17 @@ The adapter is **only** responsible for:
213
213
  It does **not** know about the queue, the processor, retries, or the agent
214
214
  loop. Those are handled by the shared webhook handler.
215
215
 
216
+ ### Slack non-message events
217
+
218
+ Slack's Events API also sends events that are not agent messages, such as
219
+ `link_shared` for app unfurls. Do not map those into `IncomingMessage` unless
220
+ they should actually run the agent. Handle them as short, provider-specific
221
+ webhook work: verify the Slack signature, return `200 OK` quickly, and call the
222
+ provider API needed for the event (`chat.unfurl` for link previews). If a single
223
+ Slack app must handle both agent chat and app unfurls, put a dispatcher in front
224
+ of the one Slack Events Request URL and route message events to the integration
225
+ webhook flow while routing `link_shared` to the app-specific unfurl handler.
226
+
216
227
  ## Long-Running Agent Work
217
228
 
218
229
  The processor endpoint runs in a fresh function execution with its own full