@agent-native/core 0.115.1 → 0.115.3

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 (40) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +12 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/agent/production-agent.ts +17 -0
  5. package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +19 -2
  6. package/corpus/core/src/client/blocks/library/wireframe.tsx +3 -1
  7. package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +19 -2
  8. package/corpus/templates/plan/AGENTS.md +10 -0
  9. package/corpus/templates/plan/actions/create-prototype-plan.ts +27 -3
  10. package/corpus/templates/plan/actions/get-plan-blocks.ts +1 -1
  11. package/corpus/templates/plan/actions/update-visual-plan.ts +3 -2
  12. package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +18 -4
  13. package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +10 -3
  14. package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +3 -1
  15. package/corpus/templates/plan/app/i18n/en-US.ts +6 -0
  16. package/corpus/templates/plan/app/lib/create-plan-routing.ts +39 -0
  17. package/corpus/templates/plan/app/pages/PlansPage.tsx +31 -107
  18. package/corpus/templates/plan/changelog/2026-07-22-high-fidelity-mockup-requests-now-preserve-branded-css-use-d.md +6 -0
  19. package/corpus/templates/plan/shared/plan-content.ts +110 -2
  20. package/dist/agent/production-agent.d.ts.map +1 -1
  21. package/dist/agent/production-agent.js +14 -0
  22. package/dist/agent/production-agent.js.map +1 -1
  23. package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
  24. package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
  25. package/dist/cli/skills-content/visual-plan-skill.js +19 -2
  26. package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
  27. package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
  28. package/dist/client/blocks/library/wireframe.js +3 -2
  29. package/dist/client/blocks/library/wireframe.js.map +1 -1
  30. package/dist/collab/awareness.d.ts +2 -2
  31. package/dist/collab/awareness.d.ts.map +1 -1
  32. package/dist/collab/routes.d.ts +2 -2
  33. package/dist/observability/routes.d.ts +5 -5
  34. package/dist/progress/routes.d.ts +1 -1
  35. package/dist/secrets/routes.d.ts +9 -9
  36. package/dist/server/transcribe-voice.d.ts +1 -1
  37. package/package.json +3 -3
  38. package/src/agent/production-agent.ts +17 -0
  39. package/src/cli/skills-content/visual-plan-skill.ts +19 -2
  40. package/src/client/blocks/library/wireframe.tsx +3 -1
@@ -41,28 +41,28 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
41
41
  thumbsUpRate: number;
42
42
  avgEvalScore: number;
43
43
  } | {
44
+ error?: undefined;
45
+ ok?: undefined;
44
46
  summary: import("./types.js").TraceSummary;
45
47
  spans: import("./types.js").TraceSpan[];
46
48
  id?: undefined;
49
+ } | {
47
50
  error?: undefined;
48
51
  ok?: undefined;
49
- } | {
50
52
  summary?: undefined;
51
53
  spans?: undefined;
52
54
  id: string;
53
- error?: undefined;
54
- ok?: undefined;
55
55
  } | {
56
+ ok?: undefined;
56
57
  summary?: undefined;
57
58
  spans?: undefined;
58
59
  id?: undefined;
59
60
  error: any;
60
- ok?: undefined;
61
61
  } | {
62
+ error?: undefined;
62
63
  summary?: undefined;
63
64
  spans?: undefined;
64
65
  id?: undefined;
65
66
  ok: boolean;
66
- error?: undefined;
67
67
  }>>;
68
68
  //# sourceMappingURL=routes.d.ts.map
@@ -15,7 +15,7 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- ok: boolean;
19
18
  error?: undefined;
19
+ ok: boolean;
20
20
  }>>;
21
21
  //# sourceMappingURL=routes.d.ts.map
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- status?: undefined;
38
37
  ok?: undefined;
38
+ status?: undefined;
39
39
  } | {
40
+ error?: undefined;
40
41
  ok: boolean;
41
42
  status: string;
42
- error?: undefined;
43
43
  } | {
44
+ ok?: undefined;
44
45
  error: string;
45
46
  removed?: undefined;
46
- ok?: undefined;
47
47
  } | {
48
+ error?: undefined;
48
49
  ok: boolean;
49
50
  removed: boolean;
50
- error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — re-run the validator against the
54
54
  * current stored value without changing anything. Useful for the "Test" button.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
+ ok?: undefined;
57
58
  error: string;
58
59
  note?: undefined;
59
- ok?: undefined;
60
60
  } | {
61
+ error?: undefined;
61
62
  ok: boolean;
62
63
  note?: undefined;
63
- error?: undefined;
64
64
  } | {
65
+ error?: undefined;
65
66
  ok: boolean;
66
67
  note: string;
67
- error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,12 +95,12 @@ export interface AdHocSecretPayload {
95
95
  export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
96
96
  error: string;
97
97
  } | {
98
+ error?: undefined;
98
99
  ok: boolean;
99
100
  key: string;
100
- error?: undefined;
101
101
  } | {
102
+ error?: undefined;
102
103
  ok: boolean;
103
104
  removed: boolean;
104
- error?: undefined;
105
105
  }>>;
106
106
  //# sourceMappingURL=routes.d.ts.map
@@ -20,7 +20,7 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- text: string;
24
23
  error?: undefined;
24
+ text: string;
25
25
  }>>;
26
26
  //# sourceMappingURL=transcribe-voice.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.115.1",
3
+ "version": "0.115.3",
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": {
@@ -385,8 +385,8 @@
385
385
  "y-protocols": "^1.0.7",
386
386
  "yjs": "^13.6.31",
387
387
  "zod": "^4.3.6",
388
- "@agent-native/recap-cli": "0.5.0",
389
- "@agent-native/toolkit": "^0.9.0"
388
+ "@agent-native/toolkit": "^0.9.0",
389
+ "@agent-native/recap-cli": "0.5.0"
390
390
  },
391
391
  "devDependencies": {
392
392
  "@ai-sdk/anthropic": "^3.0.71",
@@ -3087,6 +3087,21 @@ function normalizeToolCallInputForHistory(
3087
3087
  return { rawInput: input };
3088
3088
  }
3089
3089
 
3090
+ function dedupeAssistantToolCallsById(
3091
+ content: import("./engine/types.js").EngineContentPart[],
3092
+ ): import("./engine/types.js").EngineContentPart[] {
3093
+ const seenToolCallIds = new Set<string>();
3094
+ const deduped: import("./engine/types.js").EngineContentPart[] = [];
3095
+ for (const part of content) {
3096
+ if (part.type === "tool-call") {
3097
+ if (seenToolCallIds.has(part.id)) continue;
3098
+ seenToolCallIds.add(part.id);
3099
+ }
3100
+ deduped.push(part);
3101
+ }
3102
+ return deduped;
3103
+ }
3104
+
3090
3105
  function toolInputSchemaErrorResult(
3091
3106
  toolName: string,
3092
3107
  input: unknown,
@@ -3996,6 +4011,8 @@ export async function runAgentLoop(opts: {
3996
4011
  }
3997
4012
  }
3998
4013
 
4014
+ assistantContent = dedupeAssistantToolCallsById(assistantContent);
4015
+
3999
4016
  const assistantContentForHistory = assistantContent.map((part) =>
4000
4017
  part.type === "tool-call"
4001
4018
  ? {
@@ -301,6 +301,18 @@ and screen ids across both surfaces. The canvas is the inspectable static refere
301
301
  the prototype is the interactive version of that same flow, not a separate
302
302
  design direction.
303
303
 
304
+ Treat “higher fidelity,” “pixel-accurate,” “polished mockup,” “production-like,”
305
+ “real design,” and “not a sketch/wireframe” as design-first language even when
306
+ the request also says “mockup.” For a new plan, use \`create-plan-design\`. For
307
+ an existing plan, keep the same plan id and call \`update-visual-plan\` with a
308
+ \`set-visual-render-mode\` patch using \`renderMode: "design"\` plus the upgraded
309
+ screen HTML/CSS in the same update. Ground the result in the real app shell,
310
+ tokens, typography, spacing, and states, and add stable \`data-design-id\`
311
+ targets. Put scoped styles in each screen's \`css\` field, never in a \`<style>\`
312
+ tag. The viewer-local Clean toggle only changes one browser's wireframe
313
+ preference; it is not a fidelity upgrade. Do not create a duplicate plan to
314
+ handle a fidelity follow-up.
315
+
304
316
  ## Wireframe quality — read \`references/wireframe.md\`
305
317
 
306
318
  UI recap/plan wireframes must meet a strict quality bar — full-width chrome,
@@ -349,7 +361,9 @@ directory before authoring a plan.
349
361
  visual surface, canvas only, or canvas + prototype.
350
362
  - \`create-ui-plan\`: start a UI-first plan when the work is primarily product UI.
351
363
  - \`create-prototype-plan\`: start a prototype-first plan with a functional top
352
- review surface.
364
+ review surface. If the interaction itself must also be high fidelity, set each
365
+ screen's \`renderMode\` to \`design\` and pass scoped styles through \`css\`;
366
+ otherwise use \`create-plan-design\` for design-first review.
353
367
  - \`create-plan-design\`: start a full-fidelity branded Design-tab plan with an
354
368
  optional matching Prototype tab.
355
369
  - \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
@@ -357,7 +371,10 @@ directory before authoring a plan.
357
371
  - \`create-visual-questions\`: use only when the user explicitly asks for a visual
358
372
  intake questionnaire, not as \`/visual-plan\` preflight.
359
373
  - \`update-visual-plan\`: revise content, status, or comments with targeted
360
- \`contentPatches\` (see Core Workflow steps 6-7). \`replace-blocks\` and full
374
+ \`contentPatches\` (see Core Workflow steps 6-7). Use
375
+ \`set-visual-render-mode\` with \`renderMode: "design"\` when promoting an
376
+ existing plan to high fidelity, together with deliberate screen HTML/CSS;
377
+ render mode alone only removes sketch treatment. \`replace-blocks\` and full
361
378
  \`content\` replacement require \`expectedUpdatedAt\` from a fresh
362
379
  \`get-visual-plan\` call.
363
380
  - \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
@@ -142,7 +142,7 @@ function ArtboardFrame({
142
142
  const fitRef = useRef<HTMLDivElement>(null);
143
143
  const isDark = useIsDark();
144
144
  const theme: "light" | "dark" = isDark ? "dark" : "light";
145
- const style = useWireframeStyle();
145
+ const preferredStyle = useWireframeStyle();
146
146
  const preset = SURFACE_PRESETS[surface] ?? SURFACE_PRESETS.desktop;
147
147
  const width = canvasWidth ?? preset.width;
148
148
  // AUTO-HEIGHT: with no explicit `canvasSize` the artboard height is driven by
@@ -164,6 +164,7 @@ function ArtboardFrame({
164
164
  fixedHeight ?? null,
165
165
  );
166
166
  const designMode = renderMode === "design";
167
+ const style = designMode ? "clean" : preferredStyle;
167
168
  const sketchy = !designMode && style === "sketchy" && !skeleton;
168
169
  const roughEnabled = sketchy && roughOverlay;
169
170
  const frameBorder = skeleton
@@ -409,6 +410,7 @@ function KitArtboard({
409
410
  surface={data.surface}
410
411
  compact={compact}
411
412
  skeleton={data.skeleton}
413
+ renderMode={data.renderMode}
412
414
  showFrame={showFrame}
413
415
  selector="[data-rough]"
414
416
  caption={data.caption}