@agent-native/core 0.139.0 → 0.140.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 +1 -1
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +44 -1
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +265 -1
- package/corpus/templates/design/actions/create-design-system.ts +9 -10
- package/corpus/templates/design/actions/get-design-system.ts +53 -0
- package/corpus/templates/design/actions/import-design-tokens.ts +5 -71
- package/corpus/templates/design/actions/index-design-tokens.ts +61 -80
- package/corpus/templates/design/actions/update-design-system.ts +7 -10
- package/corpus/templates/design/app/components/design/EditPanel.tsx +45 -2
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +12 -0
- package/corpus/templates/design/app/components/design/edit-panel/design-system-swatches.ts +215 -0
- package/corpus/templates/design/app/components/design/edit-panel/document-colors.ts +10 -6
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +19 -3
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +36 -10
- package/corpus/templates/design/app/components/design/edit-panel/interaction-state-helpers.ts +15 -0
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +19 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-helpers.ts +6 -0
- package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +53 -10
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +142 -4
- package/corpus/templates/design/app/components/design/types.ts +6 -0
- package/corpus/templates/design/app/i18n-data.ts +20 -0
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +1 -1
- package/corpus/templates/design/app/pages/DesignSystems.tsx +78 -1
- package/corpus/templates/design/app/pages/design-editor/html-layer-positioning.ts +6 -1
- package/corpus/templates/design/changelog/2026-08-04-design-system-tokens-show-by-name-in-the-editor.md +6 -0
- package/corpus/templates/design/e2e/helpers.ts +17 -0
- package/corpus/templates/design/server/lib/design-system-tokens.ts +35 -0
- package/corpus/templates/design/shared/authored-color-styles.ts +401 -0
- package/corpus/templates/design/shared/resolve-tweaks.ts +10 -18
- package/dist/brand-kit/index.d.ts +1 -0
- package/dist/brand-kit/index.js +1 -0
- package/dist/brand-kit/tokens.d.ts +92 -0
- package/dist/brand-kit/tokens.js +280 -0
- package/dist/brand-kit/types.d.ts +25 -0
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +8 -8
- package/dist/provider-api/actions/provider-api.d.ts +14 -14
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@agent-native/core/brand-kit/tokens`
|
|
3
|
+
*
|
|
4
|
+
* Pure helpers for the named-token vocabulary a Brand Kit stores alongside its
|
|
5
|
+
* seven color roles. Kept on its own subpath (no `design-token-utils` re-export)
|
|
6
|
+
* so browser code can import the CSS-safety predicates without pulling the
|
|
7
|
+
* server-side extraction stack into the bundle.
|
|
8
|
+
*/
|
|
9
|
+
const BRAND_KIT_TOKEN_TYPES = [
|
|
10
|
+
"color",
|
|
11
|
+
"typography",
|
|
12
|
+
"spacing",
|
|
13
|
+
"radius",
|
|
14
|
+
"shadow",
|
|
15
|
+
"other",
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Upper bound on a single kit's stored vocabulary. Large systems legitimately
|
|
19
|
+
* define hundreds of tokens; this only stops an unbounded scrape landing in SQL.
|
|
20
|
+
*/
|
|
21
|
+
export const MAX_BRAND_KIT_TOKENS = 500;
|
|
22
|
+
const CSS_CUSTOM_PROPERTY_NAME = /^--[-_a-zA-Z0-9]+$/;
|
|
23
|
+
const COLOR_FUNCTION_OR_HEX = /^(#[0-9a-fA-F]{3,8}|rgba?\(|hsla?\(|oklch\(|color\()/i;
|
|
24
|
+
const NAMED_CSS_COLORS = new Set([
|
|
25
|
+
"red",
|
|
26
|
+
"blue",
|
|
27
|
+
"green",
|
|
28
|
+
"yellow",
|
|
29
|
+
"orange",
|
|
30
|
+
"purple",
|
|
31
|
+
"pink",
|
|
32
|
+
"cyan",
|
|
33
|
+
"magenta",
|
|
34
|
+
"teal",
|
|
35
|
+
"navy",
|
|
36
|
+
"maroon",
|
|
37
|
+
"coral",
|
|
38
|
+
"salmon",
|
|
39
|
+
"gold",
|
|
40
|
+
"silver",
|
|
41
|
+
"gray",
|
|
42
|
+
"grey",
|
|
43
|
+
"indigo",
|
|
44
|
+
"violet",
|
|
45
|
+
"lime",
|
|
46
|
+
"olive",
|
|
47
|
+
"aqua",
|
|
48
|
+
"fuchsia",
|
|
49
|
+
"crimson",
|
|
50
|
+
"turquoise",
|
|
51
|
+
"ivory",
|
|
52
|
+
"beige",
|
|
53
|
+
"lavender",
|
|
54
|
+
"tan",
|
|
55
|
+
"khaki",
|
|
56
|
+
"plum",
|
|
57
|
+
"orchid",
|
|
58
|
+
"sienna",
|
|
59
|
+
]);
|
|
60
|
+
export function isSafeCssVarName(value) {
|
|
61
|
+
return CSS_CUSTOM_PROPERTY_NAME.test(value);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Token values are spliced raw into `:root { … }` declarations, so anything that
|
|
65
|
+
* could terminate a declaration or break out of a `<style>` element is unsafe.
|
|
66
|
+
*/
|
|
67
|
+
export function isSafeCssTokenValue(value) {
|
|
68
|
+
return (value.length > 0 &&
|
|
69
|
+
value.length <= 300 &&
|
|
70
|
+
!/[;{}<>]/.test(value) &&
|
|
71
|
+
!/\/\*/.test(value) &&
|
|
72
|
+
!/[\u0000-\u001f\u007f]/.test(value));
|
|
73
|
+
}
|
|
74
|
+
export function isColorTokenValue(value) {
|
|
75
|
+
const normalized = value.trim().toLowerCase();
|
|
76
|
+
return (COLOR_FUNCTION_OR_HEX.test(normalized) || NAMED_CSS_COLORS.has(normalized));
|
|
77
|
+
}
|
|
78
|
+
const COLOR_NAME_HINT = /color|bg|background|text|border|accent|primary|secondary|surface|muted|foreground|fill|stroke/i;
|
|
79
|
+
const DIMENSION_VALUE = /^-?\d*\.?\d+(px|rem|em|ex|ch|%|vh|vw|vmin|vmax|pt|pc|cm|mm|in|s|ms|deg|fr)?$/i;
|
|
80
|
+
/**
|
|
81
|
+
* Bucket a token, trusting the value's shape over the name's keywords.
|
|
82
|
+
*
|
|
83
|
+
* Name-first classification called Primer's `--text-body-size-medium: 1rem` a
|
|
84
|
+
* color because the name contains "text", which then rendered a swatch with
|
|
85
|
+
* `background: 1rem`. A dimension is never a color however the token is named.
|
|
86
|
+
*/
|
|
87
|
+
export function classifyBrandKitToken(name, value) {
|
|
88
|
+
const n = name.toLowerCase();
|
|
89
|
+
if (isColorTokenValue(value))
|
|
90
|
+
return "color";
|
|
91
|
+
if (/radius|rounded/i.test(n))
|
|
92
|
+
return "radius";
|
|
93
|
+
// `line-?height` and `letter` run before the spacing check so
|
|
94
|
+
// `letter-spacing` is type metrics, not layout spacing.
|
|
95
|
+
if (/font|size|leading|line-?height|letter|tracking|weight|heading|body|type/i.test(n)) {
|
|
96
|
+
return "typography";
|
|
97
|
+
}
|
|
98
|
+
if (/spacing|gap|padding|margin|space/i.test(n))
|
|
99
|
+
return "spacing";
|
|
100
|
+
if (/shadow|blur|drop/i.test(n))
|
|
101
|
+
return "shadow";
|
|
102
|
+
if (COLOR_NAME_HINT.test(n) && !DIMENSION_VALUE.test(value.trim())) {
|
|
103
|
+
return "color";
|
|
104
|
+
}
|
|
105
|
+
return "other";
|
|
106
|
+
}
|
|
107
|
+
/** Title-case display name derived from a CSS var, e.g. `--primary-color`. */
|
|
108
|
+
export function friendlyTokenName(cssVar) {
|
|
109
|
+
return cssVar
|
|
110
|
+
.replace(/^--/, "")
|
|
111
|
+
.replace(/[-_]/g, " ")
|
|
112
|
+
.replace(/\b\w/g, (c) => c.toUpperCase());
|
|
113
|
+
}
|
|
114
|
+
function readString(source, key) {
|
|
115
|
+
const value = source[key];
|
|
116
|
+
return typeof value === "string" ? value.trim() : "";
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Coerce untrusted token JSON into storable tokens, reporting every entry it
|
|
120
|
+
* could not accept. Later duplicates of a `cssVar` win, matching the overlay
|
|
121
|
+
* order importers use.
|
|
122
|
+
*/
|
|
123
|
+
export function normalizeBrandKitTokens(input) {
|
|
124
|
+
if (input === undefined || input === null) {
|
|
125
|
+
return { tokens: [], rejected: [] };
|
|
126
|
+
}
|
|
127
|
+
if (!Array.isArray(input)) {
|
|
128
|
+
return { tokens: [], rejected: [{ reason: "malformed", label: "tokens" }] };
|
|
129
|
+
}
|
|
130
|
+
const byCssVar = new Map();
|
|
131
|
+
const rejected = [];
|
|
132
|
+
for (const entry of input) {
|
|
133
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
134
|
+
rejected.push({ reason: "malformed", label: String(entry) });
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const record = entry;
|
|
138
|
+
const cssVar = readString(record, "cssVar");
|
|
139
|
+
const value = readString(record, "value");
|
|
140
|
+
const name = readString(record, "name") || friendlyTokenName(cssVar);
|
|
141
|
+
if (!cssVar || !isSafeCssVarName(cssVar)) {
|
|
142
|
+
rejected.push({ reason: "unsafe-css-var", label: cssVar || name });
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (!isSafeCssTokenValue(value)) {
|
|
146
|
+
rejected.push({ reason: "unsafe-value", label: cssVar });
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const declaredType = readString(record, "type");
|
|
150
|
+
const group = readString(record, "group");
|
|
151
|
+
const source = readString(record, "source");
|
|
152
|
+
byCssVar.set(cssVar, {
|
|
153
|
+
name,
|
|
154
|
+
cssVar,
|
|
155
|
+
value,
|
|
156
|
+
type: BRAND_KIT_TOKEN_TYPES.includes(declaredType)
|
|
157
|
+
? declaredType
|
|
158
|
+
: classifyBrandKitToken(cssVar, value),
|
|
159
|
+
...(group ? { group } : {}),
|
|
160
|
+
...(source ? { source } : {}),
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
const tokens = [...byCssVar.values()];
|
|
164
|
+
if (tokens.length > MAX_BRAND_KIT_TOKENS) {
|
|
165
|
+
for (const token of tokens.slice(MAX_BRAND_KIT_TOKENS)) {
|
|
166
|
+
rejected.push({ reason: "over-limit", label: token.cssVar });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return { tokens: tokens.slice(0, MAX_BRAND_KIT_TOKENS), rejected };
|
|
170
|
+
}
|
|
171
|
+
/** Human-readable summary of why tokens were refused, for thrown errors. */
|
|
172
|
+
export function describeBrandKitTokenRejections(rejected) {
|
|
173
|
+
return rejected
|
|
174
|
+
.slice(0, 10)
|
|
175
|
+
.map((entry) => `${entry.label} (${entry.reason})`)
|
|
176
|
+
.join(", ");
|
|
177
|
+
}
|
|
178
|
+
/** The CSS variable each colour role is published under. */
|
|
179
|
+
const BRAND_KIT_COLOR_ROLE_VARS = {
|
|
180
|
+
primary: "--color-primary",
|
|
181
|
+
secondary: "--color-secondary",
|
|
182
|
+
accent: "--color-accent",
|
|
183
|
+
background: "--color-background",
|
|
184
|
+
surface: "--color-surface",
|
|
185
|
+
text: "--color-text",
|
|
186
|
+
textMuted: "--color-text-muted",
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* The seven colour roles plus radius/spacing, as tokens. Derived from a kit's
|
|
190
|
+
* summary fields rather than named by the source system, so they carry no
|
|
191
|
+
* `group`.
|
|
192
|
+
*/
|
|
193
|
+
export function brandKitRoleTokens(data, source = "Brand Kit") {
|
|
194
|
+
if (!data)
|
|
195
|
+
return [];
|
|
196
|
+
const out = [];
|
|
197
|
+
const push = (cssVar, value) => {
|
|
198
|
+
if (typeof value !== "string" || !value.trim())
|
|
199
|
+
return;
|
|
200
|
+
if (!isSafeCssVarName(cssVar) || !isSafeCssTokenValue(value.trim()))
|
|
201
|
+
return;
|
|
202
|
+
out.push({
|
|
203
|
+
name: friendlyTokenName(cssVar),
|
|
204
|
+
cssVar,
|
|
205
|
+
value: value.trim(),
|
|
206
|
+
type: classifyBrandKitToken(cssVar, value.trim()),
|
|
207
|
+
source,
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
const colors = (data.colors ?? {});
|
|
211
|
+
const spacing = (data.spacing ?? {});
|
|
212
|
+
for (const [role, cssVar] of Object.entries(BRAND_KIT_COLOR_ROLE_VARS)) {
|
|
213
|
+
push(cssVar, colors[role]);
|
|
214
|
+
}
|
|
215
|
+
push("--radius", data.borders?.radius);
|
|
216
|
+
push("--spacing-element-gap", spacing.elementGap);
|
|
217
|
+
push("--spacing-page-padding", spacing.pagePadding);
|
|
218
|
+
return out;
|
|
219
|
+
}
|
|
220
|
+
const CSS_CUSTOM_PROPERTY_DECLARATION = /(--[-_a-zA-Z0-9]+)\s*:\s*([^;{}]+)[;}]/g;
|
|
221
|
+
/**
|
|
222
|
+
* Read a kit's named tokens out of a raw CSS block. A kit's `customCSS` already
|
|
223
|
+
* spells out the source system's real token names. Declaration order wins on
|
|
224
|
+
* duplicates, matching the cascade.
|
|
225
|
+
*/
|
|
226
|
+
export function parseBrandKitTokensFromCss(css, source) {
|
|
227
|
+
const byCssVar = new Map();
|
|
228
|
+
for (const match of css.matchAll(CSS_CUSTOM_PROPERTY_DECLARATION)) {
|
|
229
|
+
const cssVar = match[1];
|
|
230
|
+
const value = match[2].trim();
|
|
231
|
+
if (!isSafeCssVarName(cssVar) || !isSafeCssTokenValue(value))
|
|
232
|
+
continue;
|
|
233
|
+
byCssVar.set(cssVar, {
|
|
234
|
+
name: cssVar.replace(/^--/, ""),
|
|
235
|
+
cssVar,
|
|
236
|
+
value,
|
|
237
|
+
type: classifyBrandKitToken(cssVar, value),
|
|
238
|
+
...(source ? { source } : {}),
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
return [...byCssVar.values()].slice(0, MAX_BRAND_KIT_TOKENS);
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* The kit's named vocabulary: its stored `tokens` when it has them, else the
|
|
245
|
+
* names its `customCSS` declares. Kits predating `tokens` still carry real names
|
|
246
|
+
* in CSS, so reading only `tokens` would report them as having none.
|
|
247
|
+
*/
|
|
248
|
+
export function resolveBrandKitTokens(data, cssSource) {
|
|
249
|
+
if (!data)
|
|
250
|
+
return [];
|
|
251
|
+
const stored = normalizeBrandKitTokens(data.tokens).tokens;
|
|
252
|
+
if (stored.length > 0)
|
|
253
|
+
return stored;
|
|
254
|
+
return typeof data.customCSS === "string"
|
|
255
|
+
? parseBrandKitTokensFromCss(data.customCSS, cssSource)
|
|
256
|
+
: [];
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Group tokens for display, preserving the source's collection paths. Groups sort
|
|
260
|
+
* by token type so colors lead, then alphabetically within a type.
|
|
261
|
+
*/
|
|
262
|
+
export function groupBrandKitTokens(tokens) {
|
|
263
|
+
const groups = new Map();
|
|
264
|
+
for (const token of tokens) {
|
|
265
|
+
const label = token.group?.trim() || token.type;
|
|
266
|
+
const key = `${token.type}::${label}`;
|
|
267
|
+
const existing = groups.get(key);
|
|
268
|
+
if (existing) {
|
|
269
|
+
existing.tokens.push(token);
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
groups.set(key, { label, type: token.type, tokens: [token] });
|
|
273
|
+
}
|
|
274
|
+
return [...groups.values()].sort((a, b) => {
|
|
275
|
+
const byType = BRAND_KIT_TOKEN_TYPES.indexOf(a.type) -
|
|
276
|
+
BRAND_KIT_TOKEN_TYPES.indexOf(b.type);
|
|
277
|
+
return byType !== 0 ? byType : a.label.localeCompare(b.label);
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -23,6 +23,25 @@ export interface BrandKitColors {
|
|
|
23
23
|
text: string;
|
|
24
24
|
textMuted: string;
|
|
25
25
|
}
|
|
26
|
+
/** Semantic category a {@link BrandKitToken} belongs to. */
|
|
27
|
+
export type BrandKitTokenType = "color" | "typography" | "spacing" | "radius" | "shadow" | "other";
|
|
28
|
+
/**
|
|
29
|
+
* One token under the name its source design system uses. The seven
|
|
30
|
+
* {@link BrandKitColors} roles are a summary view, not a substitute: collapsing
|
|
31
|
+
* `interactive-01` into `secondary` discards the only name the design team has.
|
|
32
|
+
*/
|
|
33
|
+
export interface BrandKitToken {
|
|
34
|
+
name: string;
|
|
35
|
+
/** e.g. `--cds-interactive-01`. */
|
|
36
|
+
cssVar: string;
|
|
37
|
+
/** Resolved value, e.g. a hex color or `0.5rem`. */
|
|
38
|
+
value: string;
|
|
39
|
+
type: BrandKitTokenType;
|
|
40
|
+
/** Collection path as the source organises it, e.g. `Colors/Interactive`. */
|
|
41
|
+
group?: string;
|
|
42
|
+
/** e.g. `Carbon v11` or `globals.css`. */
|
|
43
|
+
source?: string;
|
|
44
|
+
}
|
|
26
45
|
/** Brand typography system. */
|
|
27
46
|
export interface BrandKitTypography {
|
|
28
47
|
headingFont: string;
|
|
@@ -76,6 +95,12 @@ export interface BrandKitData {
|
|
|
76
95
|
spacing: BrandKitSpacing;
|
|
77
96
|
borders: BrandKitBorders;
|
|
78
97
|
logos: BrandKitLogo[];
|
|
98
|
+
/**
|
|
99
|
+
* The source system's full named vocabulary. Optional because kits predating
|
|
100
|
+
* it store only the role summary — absent means "never extracted", not "the
|
|
101
|
+
* system has none".
|
|
102
|
+
*/
|
|
103
|
+
tokens?: BrandKitToken[];
|
|
79
104
|
imageStyle?: BrandKitImageStyle;
|
|
80
105
|
customCSS?: string;
|
|
81
106
|
notes?: string;
|
|
@@ -62,11 +62,11 @@ export declare const postAwareness: import("h3").EventHandlerWithFetch<import("h
|
|
|
62
62
|
error: string;
|
|
63
63
|
states?: undefined;
|
|
64
64
|
} | {
|
|
65
|
+
error?: undefined;
|
|
65
66
|
states: {
|
|
66
67
|
clientId: number;
|
|
67
68
|
state: string;
|
|
68
69
|
}[];
|
|
69
|
-
error?: undefined;
|
|
70
70
|
}>>;
|
|
71
71
|
/**
|
|
72
72
|
* GET /_agent-native/collab/:docId/users
|
|
@@ -77,10 +77,10 @@ export declare const getActiveUsers: import("h3").EventHandlerWithFetch<import("
|
|
|
77
77
|
error: string;
|
|
78
78
|
users?: undefined;
|
|
79
79
|
} | {
|
|
80
|
+
error?: undefined;
|
|
80
81
|
users: {
|
|
81
82
|
clientId: number;
|
|
82
83
|
lastSeen: number;
|
|
83
84
|
}[];
|
|
84
|
-
error?: undefined;
|
|
85
85
|
}>>;
|
|
86
86
|
//# sourceMappingURL=awareness.d.ts.map
|
package/dist/collab/routes.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
|
|
|
26
26
|
* Body: { update: string (base64), requestSource?: string }
|
|
27
27
|
*/
|
|
28
28
|
export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
29
|
-
error: string;
|
|
30
29
|
ok?: undefined;
|
|
30
|
+
error: string;
|
|
31
31
|
} | {
|
|
32
32
|
error?: undefined;
|
|
33
33
|
ok: boolean;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
|
|
14
14
|
*/
|
|
15
15
|
export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
16
|
-
error: string;
|
|
17
16
|
ok?: undefined;
|
|
17
|
+
error: string;
|
|
18
18
|
} | {
|
|
19
19
|
error?: undefined;
|
|
20
20
|
ok: boolean;
|
|
@@ -17,12 +17,12 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
17
17
|
id?: undefined;
|
|
18
18
|
provider?: undefined;
|
|
19
19
|
} | {
|
|
20
|
+
error?: undefined;
|
|
20
21
|
configured?: undefined;
|
|
21
22
|
connectPath?: undefined;
|
|
22
23
|
url: string;
|
|
23
24
|
id: string;
|
|
24
25
|
provider: string;
|
|
25
|
-
error?: undefined;
|
|
26
26
|
}>;
|
|
27
27
|
export default _default;
|
|
28
28
|
//# sourceMappingURL=upload-image.d.ts.map
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
* DELETE /_agent-native/notifications/:id — delete
|
|
12
12
|
*/
|
|
13
13
|
export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
|
|
14
|
+
error?: undefined;
|
|
14
15
|
count: number;
|
|
15
16
|
updated?: undefined;
|
|
16
|
-
error?: undefined;
|
|
17
17
|
ok?: undefined;
|
|
18
18
|
} | {
|
|
19
|
+
error?: undefined;
|
|
19
20
|
count?: undefined;
|
|
20
21
|
updated: number;
|
|
21
|
-
error?: undefined;
|
|
22
22
|
ok?: undefined;
|
|
23
23
|
} | {
|
|
24
24
|
count?: undefined;
|
|
@@ -26,9 +26,9 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
|
|
|
26
26
|
error: string;
|
|
27
27
|
ok?: undefined;
|
|
28
28
|
} | {
|
|
29
|
+
error?: undefined;
|
|
29
30
|
count?: undefined;
|
|
30
31
|
updated?: undefined;
|
|
31
32
|
ok: boolean;
|
|
32
|
-
error?: undefined;
|
|
33
33
|
}>>;
|
|
34
34
|
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -75,10 +75,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
75
75
|
user: "user";
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
|
-
deleted?: undefined;
|
|
79
78
|
id?: undefined;
|
|
80
|
-
|
|
81
|
-
found?: undefined;
|
|
79
|
+
deleted?: undefined;
|
|
82
80
|
providers: {
|
|
83
81
|
id: string;
|
|
84
82
|
label: string;
|
|
@@ -89,14 +87,16 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
89
87
|
updatedAt: number;
|
|
90
88
|
}[];
|
|
91
89
|
count: number;
|
|
90
|
+
provider?: undefined;
|
|
91
|
+
found?: undefined;
|
|
92
92
|
registered?: undefined;
|
|
93
93
|
label?: undefined;
|
|
94
94
|
message?: undefined;
|
|
95
95
|
} | {
|
|
96
|
-
deleted?: undefined;
|
|
97
|
-
count?: undefined;
|
|
98
96
|
id?: undefined;
|
|
97
|
+
deleted?: undefined;
|
|
99
98
|
providers?: undefined;
|
|
99
|
+
count?: undefined;
|
|
100
100
|
found: boolean;
|
|
101
101
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
102
102
|
registered?: undefined;
|
|
@@ -104,19 +104,19 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
104
104
|
message?: undefined;
|
|
105
105
|
} | {
|
|
106
106
|
deleted?: undefined;
|
|
107
|
+
providers?: undefined;
|
|
107
108
|
count?: undefined;
|
|
108
109
|
provider?: undefined;
|
|
109
|
-
providers?: undefined;
|
|
110
110
|
found: boolean;
|
|
111
111
|
id: string;
|
|
112
112
|
registered?: undefined;
|
|
113
113
|
label?: undefined;
|
|
114
114
|
message?: undefined;
|
|
115
115
|
} | {
|
|
116
|
+
providers?: undefined;
|
|
116
117
|
count?: undefined;
|
|
117
118
|
provider?: undefined;
|
|
118
119
|
found?: undefined;
|
|
119
|
-
providers?: undefined;
|
|
120
120
|
deleted: boolean;
|
|
121
121
|
id: string;
|
|
122
122
|
registered?: undefined;
|
|
@@ -124,10 +124,10 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
124
124
|
message?: undefined;
|
|
125
125
|
} | {
|
|
126
126
|
deleted?: undefined;
|
|
127
|
+
providers?: undefined;
|
|
127
128
|
count?: undefined;
|
|
128
129
|
provider?: undefined;
|
|
129
130
|
found?: undefined;
|
|
130
|
-
providers?: undefined;
|
|
131
131
|
registered: boolean;
|
|
132
132
|
id: string;
|
|
133
133
|
label: string;
|
|
@@ -311,10 +311,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
311
311
|
notes?: string | undefined;
|
|
312
312
|
scope?: "org" | "user" | undefined;
|
|
313
313
|
}, {
|
|
314
|
-
message?: undefined;
|
|
315
314
|
id?: undefined;
|
|
315
|
+
provider?: undefined;
|
|
316
316
|
deleted?: undefined;
|
|
317
|
-
found?: undefined;
|
|
318
317
|
providers: {
|
|
319
318
|
id: string;
|
|
320
319
|
label: string;
|
|
@@ -325,45 +324,46 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
325
324
|
updatedAt: number;
|
|
326
325
|
}[];
|
|
327
326
|
count: number;
|
|
328
|
-
|
|
327
|
+
found?: undefined;
|
|
329
328
|
registered?: undefined;
|
|
330
329
|
label?: undefined;
|
|
331
|
-
} | {
|
|
332
330
|
message?: undefined;
|
|
331
|
+
} | {
|
|
333
332
|
id?: undefined;
|
|
334
|
-
deleted?: undefined;
|
|
335
333
|
count?: undefined;
|
|
334
|
+
deleted?: undefined;
|
|
336
335
|
providers?: undefined;
|
|
337
336
|
found: boolean;
|
|
338
337
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
339
338
|
registered?: undefined;
|
|
340
339
|
label?: undefined;
|
|
341
|
-
} | {
|
|
342
340
|
message?: undefined;
|
|
343
|
-
|
|
341
|
+
} | {
|
|
344
342
|
count?: undefined;
|
|
345
|
-
providers?: undefined;
|
|
346
343
|
provider?: undefined;
|
|
344
|
+
deleted?: undefined;
|
|
345
|
+
providers?: undefined;
|
|
347
346
|
found: boolean;
|
|
348
347
|
id: string;
|
|
349
348
|
registered?: undefined;
|
|
350
349
|
label?: undefined;
|
|
351
|
-
} | {
|
|
352
350
|
message?: undefined;
|
|
353
|
-
|
|
351
|
+
} | {
|
|
354
352
|
count?: undefined;
|
|
355
|
-
providers?: undefined;
|
|
356
353
|
provider?: undefined;
|
|
354
|
+
providers?: undefined;
|
|
355
|
+
found?: undefined;
|
|
357
356
|
deleted: boolean;
|
|
358
357
|
id: string;
|
|
359
358
|
registered?: undefined;
|
|
360
359
|
label?: undefined;
|
|
360
|
+
message?: undefined;
|
|
361
361
|
} | {
|
|
362
|
-
deleted?: undefined;
|
|
363
|
-
found?: undefined;
|
|
364
362
|
count?: undefined;
|
|
365
|
-
providers?: undefined;
|
|
366
363
|
provider?: undefined;
|
|
364
|
+
deleted?: undefined;
|
|
365
|
+
providers?: undefined;
|
|
366
|
+
found?: undefined;
|
|
367
367
|
registered: boolean;
|
|
368
368
|
id: string;
|
|
369
369
|
label: string;
|
|
@@ -73,7 +73,6 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
73
73
|
offset?: unknown;
|
|
74
74
|
limit?: unknown;
|
|
75
75
|
}, {
|
|
76
|
-
deleted?: undefined;
|
|
77
76
|
jobs: {
|
|
78
77
|
id: string;
|
|
79
78
|
name: string;
|
|
@@ -84,6 +83,7 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
84
83
|
updatedAt: string;
|
|
85
84
|
}[];
|
|
86
85
|
total: number;
|
|
86
|
+
deleted?: undefined;
|
|
87
87
|
jobId?: undefined;
|
|
88
88
|
} | {
|
|
89
89
|
jobs?: undefined;
|
|
@@ -91,9 +91,9 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
91
91
|
deleted: boolean;
|
|
92
92
|
jobId: string;
|
|
93
93
|
} | {
|
|
94
|
-
deleted?: undefined;
|
|
95
94
|
jobs?: undefined;
|
|
96
95
|
total?: undefined;
|
|
96
|
+
deleted?: undefined;
|
|
97
97
|
jobId?: undefined;
|
|
98
98
|
hits: Record<string, unknown>[];
|
|
99
99
|
offset: number;
|
|
@@ -48,8 +48,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
|
|
|
48
48
|
}>;
|
|
49
49
|
/** DELETE /_agent-native/resources/:id — delete a resource */
|
|
50
50
|
export declare function handleDeleteResource(event: any): Promise<{
|
|
51
|
-
error: string;
|
|
52
51
|
ok?: undefined;
|
|
52
|
+
error: string;
|
|
53
53
|
} | {
|
|
54
54
|
error?: undefined;
|
|
55
55
|
ok: boolean;
|
|
@@ -27,11 +27,11 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
|
|
|
27
27
|
export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
28
28
|
error: any;
|
|
29
29
|
} | {
|
|
30
|
+
error?: undefined;
|
|
30
31
|
ok: boolean;
|
|
31
32
|
key: string;
|
|
32
33
|
baseUrlKey?: string;
|
|
33
34
|
scope: AgentEngineApiKeyScope;
|
|
34
|
-
error?: undefined;
|
|
35
35
|
}>>;
|
|
36
36
|
export {};
|
|
37
37
|
//# sourceMappingURL=agent-engine-api-key-route.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.140.0",
|
|
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": {
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"./automation": "./dist/automation/index.js",
|
|
86
86
|
"./brand-kit": "./dist/brand-kit/index.js",
|
|
87
87
|
"./brand-kit/fig": "./dist/brand-kit/fig/index.js",
|
|
88
|
+
"./brand-kit/tokens": "./dist/brand-kit/tokens.js",
|
|
88
89
|
"./data-widgets": "./dist/data-widgets/index.js",
|
|
89
90
|
"./action": {
|
|
90
91
|
"types": "./dist/action.d.ts",
|