@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.
Files changed (119) hide show
  1. package/dist/a2a/handlers.js +60 -1
  2. package/dist/a2a/server.js +9 -0
  3. package/dist/action-call-classification.d.ts +9 -0
  4. package/dist/action-call-classification.js +18 -0
  5. package/dist/action-conformance.d.ts +81 -0
  6. package/dist/action-conformance.js +392 -0
  7. package/dist/action.d.ts +18 -0
  8. package/dist/action.js +68 -5
  9. package/dist/agent/execution-fence.d.ts +3 -1
  10. package/dist/agent/execution-fence.js +13 -2
  11. package/dist/agent/production-agent.d.ts +3 -0
  12. package/dist/agent/production-agent.js +301 -145
  13. package/dist/agent/run-store.js +11 -0
  14. package/dist/agent/thread-data-builder.d.ts +2 -0
  15. package/dist/agent/thread-data-builder.js +5 -1
  16. package/dist/app-config/schema.d.ts +24 -1
  17. package/dist/application-state/handlers.d.ts +1 -1
  18. package/dist/application-state/navigate-write-guard.d.ts +4 -1
  19. package/dist/application-state/navigate-write-guard.js +15 -1
  20. package/dist/cli/design-connect.js +5 -1
  21. package/dist/cli/matched-check.d.ts +1 -0
  22. package/dist/cli/matched-check.js +76 -0
  23. package/dist/client/agent-chat/index.d.ts +1 -1
  24. package/dist/client/agent-chat/index.js +1 -1
  25. package/dist/client/analytics/index.d.ts +1 -1
  26. package/dist/client/analytics.d.ts +13 -1
  27. package/dist/client/analytics.js +5 -2
  28. package/dist/client/application-state.d.ts +11 -0
  29. package/dist/client/application-state.js +219 -23
  30. package/dist/client/chat/agentkit-agent-native.js +52 -11
  31. package/dist/client/chat/agentkit-protocol.js +23 -2
  32. package/dist/client/chat-first-state.d.ts +6 -0
  33. package/dist/client/chat-first-state.js +36 -1
  34. package/dist/client/feature-flags/use-feature-flag.js +14 -6
  35. package/dist/client/navigation/index.d.ts +2 -0
  36. package/dist/client/navigation/index.js +2 -0
  37. package/dist/client/route-state.js +60 -18
  38. package/dist/client/screen-settled.d.ts +71 -1
  39. package/dist/client/screen-settled.js +221 -3
  40. package/dist/client/sse-event-processor.d.ts +1 -0
  41. package/dist/client/sse-event-processor.js +89 -10
  42. package/dist/client/theme.d.ts +6 -0
  43. package/dist/client/theme.js +7 -1
  44. package/dist/client/use-action.js +32 -10
  45. package/dist/client/use-session.js +36 -18
  46. package/dist/collab/struct-routes.d.ts +1 -1
  47. package/dist/db/client.js +2 -2
  48. package/dist/db/errors.d.ts +2 -0
  49. package/dist/db/errors.js +38 -6
  50. package/dist/feature-flags/actions/get-feature-flags.js +9 -2
  51. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  52. package/dist/framework-package-versions.json +8 -8
  53. package/dist/ingestion/index.d.ts +1 -0
  54. package/dist/ingestion/index.js +1 -0
  55. package/dist/ingestion/matched-capture.d.ts +173 -0
  56. package/dist/ingestion/matched-capture.js +574 -0
  57. package/dist/ingestion/pptx.d.ts +1 -0
  58. package/dist/ingestion/pptx.js +4 -2
  59. package/dist/labs/store.d.ts +3 -1
  60. package/dist/labs/store.js +8 -4
  61. package/dist/manifest/index.d.ts +142 -3
  62. package/dist/manifest/index.js +249 -19
  63. package/dist/mcp/build-server.d.ts +2 -0
  64. package/dist/mcp/build-server.js +8 -1
  65. package/dist/mcp/server.js +3 -1
  66. package/dist/notifications/routes.d.ts +3 -3
  67. package/dist/observability/metrics.d.ts +2 -0
  68. package/dist/observability/metrics.js +7 -0
  69. package/dist/org/index.d.ts +1 -1
  70. package/dist/provider-api/actions/custom-provider-registration.d.ts +10 -10
  71. package/dist/provider-api/actions/provider-api.d.ts +14 -14
  72. package/dist/server/action-routes.js +9 -0
  73. package/dist/server/agent-chat/prompt-resources.js +107 -83
  74. package/dist/server/agent-run-context.d.ts +3 -0
  75. package/dist/server/agent-run-context.js +7 -0
  76. package/dist/server/builder-oauth.d.ts +1 -0
  77. package/dist/server/builder-oauth.js +40 -2
  78. package/dist/server/filesystem-action-entry.js +5 -0
  79. package/dist/server/first-touch-route.d.ts +2 -2
  80. package/dist/server/index.d.ts +2 -2
  81. package/dist/server/index.js +2 -2
  82. package/dist/server/open-route.js +10 -4
  83. package/dist/server/poll.d.ts +3 -0
  84. package/dist/server/poll.js +74 -14
  85. package/dist/server/request-context.d.ts +16 -6
  86. package/dist/server/request-context.js +4 -0
  87. package/dist/server/transcribe-voice.d.ts +1 -1
  88. package/dist/shared/analytics-events.d.ts +7 -0
  89. package/dist/shared/viewport-mode.d.ts +2 -0
  90. package/dist/shared/viewport-mode.js +9 -0
  91. package/dist/templates/chat/.agents/skills/actions/SKILL.md +1 -0
  92. package/dist/templates/chat/.agents/skills/build-an-app/SKILL.md +38 -17
  93. package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +3 -2
  94. package/dist/templates/default/.agents/skills/actions/SKILL.md +1 -0
  95. package/dist/templates/default/.agents/skills/build-an-app/SKILL.md +38 -17
  96. package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +3 -2
  97. package/dist/templates/factory/.agents/skills/review-latest-feedback/SKILL.md +3 -2
  98. package/dist/templates/headless/.agents/skills/actions/SKILL.md +1 -0
  99. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +1 -0
  100. package/dist/templates/workspace-core/.agents/skills/build-an-app/SKILL.md +38 -17
  101. package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +3 -2
  102. package/dist/testing.d.ts +1 -0
  103. package/dist/testing.js +1 -0
  104. package/dist/tracking/action-lifecycle.d.ts +2 -0
  105. package/dist/tracking/action-lifecycle.js +16 -5
  106. package/docs/content/actions-defining.mdx +7 -0
  107. package/docs/content/custom-design-system.mdx +4 -2
  108. package/package.json +3 -3
  109. package/src/templates/chat/.agents/skills/actions/SKILL.md +1 -0
  110. package/src/templates/chat/.agents/skills/build-an-app/SKILL.md +38 -17
  111. package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +3 -2
  112. package/src/templates/default/.agents/skills/actions/SKILL.md +1 -0
  113. package/src/templates/default/.agents/skills/build-an-app/SKILL.md +38 -17
  114. package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +3 -2
  115. package/src/templates/factory/.agents/skills/review-latest-feedback/SKILL.md +3 -2
  116. package/src/templates/headless/.agents/skills/actions/SKILL.md +1 -0
  117. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +1 -0
  118. package/src/templates/workspace-core/.agents/skills/build-an-app/SKILL.md +38 -17
  119. package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +3 -2
@@ -0,0 +1,173 @@
1
+ export interface CropRect {
2
+ left: number;
3
+ top: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export interface BreakpointRecord {
8
+ name: string;
9
+ width: number;
10
+ height: number;
11
+ deviceScaleFactor: number;
12
+ /** Effect bounds in CSS px. Omit to compare the whole viewport. */
13
+ crop?: CropRect;
14
+ reducedMotion?: "no-preference" | "reduce";
15
+ colorSpace?: string;
16
+ orientation?: string;
17
+ }
18
+ export declare const BREAKPOINT_PRESETS: {
19
+ readonly desktop: {
20
+ readonly width: 1440;
21
+ readonly height: 900;
22
+ readonly deviceScaleFactor: 1;
23
+ };
24
+ readonly tablet: {
25
+ readonly width: 900;
26
+ readonly height: 1200;
27
+ readonly deviceScaleFactor: 2;
28
+ };
29
+ readonly mobile: {
30
+ readonly width: 390;
31
+ readonly height: 844;
32
+ readonly deviceScaleFactor: 2;
33
+ };
34
+ };
35
+ export type BreakpointPresetName = keyof typeof BREAKPOINT_PRESETS;
36
+ export type BreakpointInput = BreakpointRecord | ({
37
+ preset: BreakpointPresetName;
38
+ } & Partial<BreakpointRecord>);
39
+ export declare function resolveBreakpoint(input: BreakpointInput): BreakpointRecord;
40
+ export type ClockStrategy = {
41
+ kind: "unpinned";
42
+ } | {
43
+ kind: "playwright-clock";
44
+ timeMs: number;
45
+ } | {
46
+ kind: "hook";
47
+ timeMs: number;
48
+ setter: string;
49
+ readback: string;
50
+ };
51
+ export interface SideCapture {
52
+ image: Uint8Array;
53
+ observed: {
54
+ viewport: {
55
+ width: number;
56
+ height: number;
57
+ };
58
+ devicePixelRatio: number;
59
+ reducedMotion: boolean;
60
+ timeMs: number | null;
61
+ };
62
+ clock: {
63
+ kind: ClockStrategy["kind"];
64
+ requestedTimeMs: number | null;
65
+ pinned: boolean;
66
+ reason?: string;
67
+ };
68
+ motion?: MotionObservation;
69
+ }
70
+ export interface MotionObservation {
71
+ frames: number;
72
+ distinctFrames: number;
73
+ changed: boolean;
74
+ frameSha256: string[];
75
+ }
76
+ export interface SideCaptureRequest {
77
+ side: "source" | "destination";
78
+ target: string;
79
+ breakpoint: BreakpointRecord;
80
+ clock: ClockStrategy;
81
+ motion?: MotionOptions | undefined;
82
+ }
83
+ export interface MotionOptions {
84
+ frames: number;
85
+ intervalMs: number;
86
+ }
87
+ export type SideCapturer = (request: SideCaptureRequest) => Promise<SideCapture>;
88
+ export type CheckStatus = "pass" | "fail" | "could-not-run";
89
+ export interface CheckEntry {
90
+ id: string;
91
+ breakpoint: string;
92
+ status: CheckStatus;
93
+ detail: string;
94
+ }
95
+ export interface ArtifactHandle {
96
+ side: "source" | "destination";
97
+ handle: string;
98
+ sha256: string;
99
+ width: number;
100
+ height: number;
101
+ }
102
+ export interface Fidelity {
103
+ rmsePercent: number;
104
+ meanAbsolutePercent: number;
105
+ width: number;
106
+ height: number;
107
+ threshold: number | null;
108
+ /** null when the caller supplied no threshold. */
109
+ pass: boolean | null;
110
+ }
111
+ export type Validity = "valid" | "invalid" | "unverified" | "could-not-run";
112
+ export interface BreakpointResult {
113
+ breakpoint: string;
114
+ validity: Validity;
115
+ checks: CheckEntry[];
116
+ /** Present only when every validity check passed. */
117
+ fidelity?: Fidelity;
118
+ artifacts: ArtifactHandle[];
119
+ alphaNormalization?: {
120
+ /** "none" when both images were opaque and no background was supplied. */
121
+ background: string;
122
+ sourceHadAlpha: boolean;
123
+ destinationHadAlpha: boolean;
124
+ };
125
+ motion?: {
126
+ source?: MotionObservation | undefined;
127
+ destination?: MotionObservation | undefined;
128
+ note: string;
129
+ };
130
+ diagnostics: string[];
131
+ }
132
+ export interface MatchedCheckReport {
133
+ results: BreakpointResult[];
134
+ totals: {
135
+ breakpoints: number;
136
+ checks: number;
137
+ pass: number;
138
+ fail: number;
139
+ couldNotRun: number;
140
+ };
141
+ }
142
+ export interface MatchedCheckInput {
143
+ source: {
144
+ target: string;
145
+ clock: ClockStrategy;
146
+ };
147
+ destination: {
148
+ target: string;
149
+ clock: ClockStrategy;
150
+ };
151
+ breakpoints: BreakpointInput[];
152
+ /** Opaque background (#rrggbb) both sides are flattened onto. */
153
+ background?: string;
154
+ /** Allowed |observed - requested| and source/destination skew, in ms. */
155
+ clockToleranceMs?: number;
156
+ /** Optional caller-owned RMSE threshold in percent. */
157
+ maxRmsePercent?: number;
158
+ motion?: MotionOptions | undefined;
159
+ concurrency?: number;
160
+ capture: SideCapturer;
161
+ storeArtifact?: (name: string, bytes: Uint8Array) => string | Promise<string>;
162
+ }
163
+ export declare function summarizeResults(results: BreakpointResult[]): MatchedCheckReport;
164
+ export declare function runMatchedCheck(input: MatchedCheckInput): Promise<MatchedCheckReport>;
165
+ export interface PlaywrightCapturer {
166
+ capture: SideCapturer;
167
+ close(): Promise<void>;
168
+ }
169
+ export declare function createPlaywrightCapturer(options?: {
170
+ launchArgs?: string[] | undefined;
171
+ headless?: boolean;
172
+ executablePath?: string | undefined;
173
+ }): PlaywrightCapturer;