@agent-native/core 0.232.0 → 0.233.0-nightly-20261124004026
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/dist/a2a/handlers.js +60 -1
- package/dist/a2a/server.js +9 -0
- package/dist/action-call-classification.d.ts +9 -0
- package/dist/action-call-classification.js +18 -0
- package/dist/action-conformance.d.ts +81 -0
- package/dist/action-conformance.js +392 -0
- package/dist/action.d.ts +18 -0
- package/dist/action.js +68 -5
- package/dist/agent/execution-fence.d.ts +3 -1
- package/dist/agent/execution-fence.js +13 -2
- package/dist/agent/production-agent.d.ts +3 -0
- package/dist/agent/production-agent.js +301 -145
- package/dist/agent/run-store.js +11 -0
- package/dist/agent/thread-data-builder.d.ts +2 -0
- package/dist/agent/thread-data-builder.js +5 -1
- package/dist/app-config/schema.d.ts +24 -1
- package/dist/application-state/handlers.d.ts +1 -1
- package/dist/application-state/navigate-write-guard.d.ts +4 -1
- package/dist/application-state/navigate-write-guard.js +15 -1
- package/dist/cli/design-connect.js +5 -1
- package/dist/cli/matched-check.d.ts +1 -0
- package/dist/cli/matched-check.js +76 -0
- package/dist/client/agent-chat/index.d.ts +1 -1
- package/dist/client/agent-chat/index.js +1 -1
- package/dist/client/analytics/index.d.ts +1 -1
- package/dist/client/analytics.d.ts +13 -1
- package/dist/client/analytics.js +5 -2
- package/dist/client/application-state.d.ts +11 -0
- package/dist/client/application-state.js +219 -23
- package/dist/client/chat/agentkit-agent-native.js +52 -11
- package/dist/client/chat/agentkit-protocol.js +23 -2
- package/dist/client/chat-first-state.d.ts +6 -0
- package/dist/client/chat-first-state.js +36 -1
- package/dist/client/feature-flags/use-feature-flag.js +14 -6
- package/dist/client/navigation/index.d.ts +2 -0
- package/dist/client/navigation/index.js +2 -0
- package/dist/client/route-state.js +60 -18
- package/dist/client/screen-settled.d.ts +71 -1
- package/dist/client/screen-settled.js +221 -3
- package/dist/client/sse-event-processor.d.ts +1 -0
- package/dist/client/sse-event-processor.js +89 -10
- package/dist/client/theme.d.ts +6 -0
- package/dist/client/theme.js +7 -1
- package/dist/client/use-action.js +32 -10
- package/dist/client/use-session.js +36 -18
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/db/client.js +2 -2
- package/dist/db/errors.d.ts +2 -0
- package/dist/db/errors.js +38 -6
- package/dist/feature-flags/actions/get-feature-flags.js +9 -2
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/framework-package-versions.json +8 -8
- package/dist/ingestion/index.d.ts +1 -0
- package/dist/ingestion/index.js +1 -0
- package/dist/ingestion/matched-capture.d.ts +173 -0
- package/dist/ingestion/matched-capture.js +574 -0
- package/dist/ingestion/pptx.d.ts +1 -0
- package/dist/ingestion/pptx.js +4 -2
- package/dist/labs/store.d.ts +3 -1
- package/dist/labs/store.js +8 -4
- package/dist/manifest/index.d.ts +142 -3
- package/dist/manifest/index.js +249 -19
- package/dist/mcp/build-server.d.ts +2 -0
- package/dist/mcp/build-server.js +8 -1
- package/dist/mcp/server.js +3 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/metrics.d.ts +2 -0
- package/dist/observability/metrics.js +7 -0
- package/dist/org/index.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 +14 -14
- package/dist/server/action-routes.js +9 -0
- package/dist/server/agent-chat/prompt-resources.js +107 -83
- package/dist/server/agent-run-context.d.ts +3 -0
- package/dist/server/agent-run-context.js +7 -0
- package/dist/server/builder-oauth.d.ts +1 -0
- package/dist/server/builder-oauth.js +40 -2
- package/dist/server/filesystem-action-entry.js +5 -0
- package/dist/server/first-touch-route.d.ts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +2 -2
- package/dist/server/open-route.js +10 -4
- package/dist/server/poll.d.ts +3 -0
- package/dist/server/poll.js +74 -14
- package/dist/server/request-context.d.ts +16 -6
- package/dist/server/request-context.js +4 -0
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/analytics-events.d.ts +7 -0
- package/dist/shared/viewport-mode.d.ts +2 -0
- package/dist/shared/viewport-mode.js +9 -0
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +1 -0
- package/dist/templates/chat/.agents/skills/build-an-app/SKILL.md +38 -17
- package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +3 -2
- package/dist/templates/default/.agents/skills/actions/SKILL.md +1 -0
- package/dist/templates/default/.agents/skills/build-an-app/SKILL.md +38 -17
- package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +3 -2
- package/dist/templates/factory/.agents/skills/review-latest-feedback/SKILL.md +3 -2
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/build-an-app/SKILL.md +38 -17
- package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +3 -2
- package/dist/testing.d.ts +1 -0
- package/dist/testing.js +1 -0
- package/dist/tracking/action-lifecycle.d.ts +2 -0
- package/dist/tracking/action-lifecycle.js +16 -5
- package/docs/content/actions-defining.mdx +7 -0
- package/docs/content/custom-design-system.mdx +4 -2
- package/package.json +3 -3
- package/src/templates/chat/.agents/skills/actions/SKILL.md +1 -0
- package/src/templates/chat/.agents/skills/build-an-app/SKILL.md +38 -17
- package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +3 -2
- package/src/templates/default/.agents/skills/actions/SKILL.md +1 -0
- package/src/templates/default/.agents/skills/build-an-app/SKILL.md +38 -17
- package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +3 -2
- package/src/templates/factory/.agents/skills/review-latest-feedback/SKILL.md +3 -2
- package/src/templates/headless/.agents/skills/actions/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/build-an-app/SKILL.md +38 -17
- package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +3 -2
|
@@ -25,17 +25,23 @@ order and decisions; use the edit-point reference for the scaffold you have.
|
|
|
25
25
|
|
|
26
26
|
## 1. Orient
|
|
27
27
|
|
|
28
|
-
Read `AGENTS.md`, `DESIGN.md` if present, and `app-quality-bar`.
|
|
29
|
-
|
|
28
|
+
Read `AGENTS.md`, `DESIGN.md` if present, `product-judgment`, and `app-quality-bar`.
|
|
29
|
+
Run `product-judgment` Step 0 before writing code: grep `packages/core` and
|
|
30
|
+
`@agent-native/toolkit/craft` (plus `agent-native-toolkit` kits) so you reuse
|
|
31
|
+
existing primitives instead of rebuilding state boundaries, shortcut managers,
|
|
32
|
+
destructive dialogs, or optimistic hooks. Inspect the closest existing screen or
|
|
33
|
+
action and the files you will edit. Use the bundled docs/source commands in
|
|
30
34
|
`AGENTS.md` only to answer a concrete API question; do not web-research
|
|
31
35
|
framework APIs.
|
|
32
36
|
|
|
33
37
|
## 2. Decide
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
Run `product-judgment` Steps 1–2 before writing code: choose one or two
|
|
40
|
+
interaction patterns, write or update `DESIGN.md` as the single required design
|
|
41
|
+
contract with the 6-Axis Judgment Card and 3-Option Decision Block (chosen and
|
|
42
|
+
rejected UX options), and register `app.manifest.ts` with real screens,
|
|
43
|
+
entities, `viewPolicy`, and `suggestableCapabilities`. Choose these six things
|
|
44
|
+
before writing code:
|
|
39
45
|
|
|
40
46
|
1. **Slice**: the one workflow that proves the app. For a booking app: create a
|
|
41
47
|
booking, reject an overlap, cancel, weekly grid per room. Name what you are
|
|
@@ -119,16 +125,26 @@ The access table, the concurrency pattern, and the security rules are in
|
|
|
119
125
|
- Load and write data with `useActionQuery` and `useActionMutation` from
|
|
120
126
|
`@agent-native/core/client/hooks`. No `fetch`, and no `/api/*` routes for app
|
|
121
127
|
data. Those routes are only for uploads, webhooks, OAuth callbacks, and streaming.
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
`
|
|
128
|
+
- Use `@agent-native/toolkit/craft` primitives by default:
|
|
129
|
+
- `ResourceStateBoundary` for every async surface (requires a layout-matched
|
|
130
|
+
`skeleton`, an actionable `empty` CTA, and an `error` retry path — never a
|
|
131
|
+
spinner, bare `"Loading…"`, or dead-end `"Could not load"` screen).
|
|
132
|
+
- `useOptimisticAction` (or `onMutate` + `setQueryData` with `onError`
|
|
133
|
+
rollback and `toast.error(actionErrorMessage(error) ?? "<fallback>")`) so
|
|
134
|
+
writes acknowledge in `<100ms` and show a pending state within `<400ms`.
|
|
135
|
+
- `SafeDestructiveAction` for destructive verbs: instant optimistic action +
|
|
136
|
+
undo affordance when reversible, accessible `AlertDialog` confirmation when
|
|
137
|
+
irreversible — never `window.confirm`, `alert`, or `prompt`.
|
|
138
|
+
- `useCommandRegistry` for portable `Mod` (`Cmd`/`Ctrl`) shortcuts, `j`/`k`,
|
|
139
|
+
`Esc`, and `?` shortcut help that automatically ignore editable inputs.
|
|
140
|
+
- Style with semantic tokens from `@agent-native/toolkit/styles.css` (which
|
|
141
|
+
bundles `craft-tokens.css`: `--success`/`--warning`/`--info`, `--surface-0..3`,
|
|
142
|
+
`--density-*`, `--dur-instant`/`--dur-fast`/`--dur-panel`, `tabular-nums`, and
|
|
143
|
+
`640px` chat-companion `@container` utilities).
|
|
127
144
|
- Import controls from `@/components/ui/*`. When one is missing (dialog,
|
|
128
145
|
select, skeleton, alert-dialog), add a one-line re-export like `button.tsx`:
|
|
129
146
|
`export * from "@agent-native/toolkit/ui/dialog";`.
|
|
130
|
-
- Use Tabler icons only.
|
|
131
|
-
`alert`, or `prompt`.
|
|
147
|
+
- Use Tabler icons only.
|
|
132
148
|
- Don't add a page title that repeats the nav item, a subtitle under a title,
|
|
133
149
|
or a stats strip. The data is the page. For visual direction, see `frontend-design`.
|
|
134
150
|
- Follow the app's existing localization pattern for user-facing copy.
|
|
@@ -175,10 +191,13 @@ made from a stale view. See `real-time-sync`.
|
|
|
175
191
|
message; read back the saved state through the matching list/get action.
|
|
176
192
|
The CLI prints the failure message, not its structured `errorCode`, so also
|
|
177
193
|
verify any code-specific behavior in the action contract or browser.
|
|
178
|
-
4.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
review
|
|
194
|
+
4. Run the `$0` static craft audit (`pnpm tsx scripts/guard-craft-slop.ts <app-dir>`)
|
|
195
|
+
and review the 5 Human-Team Lenses from `product-judgment` before capturing
|
|
196
|
+
screenshots. Then apply the canonical 12-row visual rubric and capture loop
|
|
197
|
+
from `skills/turn-into-app/references/review-loop.md` and
|
|
198
|
+
`app-quality-bar/visual-review.md`. Give the screenshots, rubric, and brief to
|
|
199
|
+
a blind reviewer and use the lower score per row. Fix and recapture until the
|
|
200
|
+
review passes (mean >= 4.0, every row >= 3, zero automatic fails).
|
|
182
201
|
5. Run the 60-second automated Playwright walkthrough from `app-quality-bar`.
|
|
183
202
|
Cover empty, populated, split pane at 520 px or narrower, and error
|
|
184
203
|
recovery. Click every navigation item, create and edit, reload and verify
|
|
@@ -197,6 +216,8 @@ check you didn't run.
|
|
|
197
216
|
|
|
198
217
|
## Related
|
|
199
218
|
|
|
219
|
+
- `product-judgment`: 5-step pre-flight (primitive inventory, 6-Axis Judgment
|
|
220
|
+
Card, 3-Option Decision Block, 5 Human-Team Lenses, and escalation boundary).
|
|
200
221
|
- `adding-a-feature`: the feature checklist for each later feature in this app.
|
|
201
222
|
- `frontend-design`, `actions`, `sharing`, `real-time-sync`, and `security`:
|
|
202
223
|
go deeper on one area when the references aren't enough.
|
|
@@ -52,8 +52,9 @@ presentation seam.
|
|
|
52
52
|
|
|
53
53
|
Use the app's existing field components and validation pattern. Associate
|
|
54
54
|
errors with their inputs and expose invalid state to assistive technology.
|
|
55
|
-
Icon-only actions need an accessible name and a usable focus target. Use
|
|
56
|
-
|
|
55
|
+
Icon-only actions need an accessible name and a usable focus target. Use Tabler
|
|
56
|
+
Icons (`@tabler/icons-react`) for UI icons, except in Design, which uses Radix
|
|
57
|
+
Icons (`@radix-ui/react-icons`).
|
|
57
58
|
|
|
58
59
|
Do not recreate menus, popovers, dialogs, or confirmations with absolute
|
|
59
60
|
positioning and custom click-outside handlers. Never use browser `alert`,
|