@agent-native/core 0.164.11 → 0.164.12

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 (65) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +84 -0
  3. package/corpus/templates/calendar/AGENTS.md +5 -0
  4. package/corpus/templates/calendar/actions/delete-event.ts +1 -1
  5. package/corpus/templates/calendar/actions/delete-events.ts +508 -0
  6. package/corpus/templates/calendar/actions/event-action-helpers.ts +1 -1
  7. package/corpus/templates/calendar/actions/list-events.ts +53 -0
  8. package/corpus/templates/calendar/changelog/2026-08-18-the-agent-can-now-remove-many-meetings-at-once-such-as-every.md +6 -0
  9. package/corpus/templates/calendar/server/lib/event-weekday.ts +112 -0
  10. package/corpus/templates/factory/AGENTS.md +2 -1
  11. package/corpus/templates/factory/actions/get-factory-graph-version.ts +69 -0
  12. package/corpus/templates/factory/actions/list-factory-graph-versions.ts +82 -0
  13. package/corpus/templates/factory/actions/restore-factory-graph-version.ts +163 -0
  14. package/corpus/templates/factory/actions/save-factory-graph.ts +93 -60
  15. package/corpus/templates/factory/app/components/factory/FactoryHistoryView.tsx +709 -0
  16. package/corpus/templates/factory/app/components/factory/FactoryInspector.tsx +62 -2
  17. package/corpus/templates/factory/app/components/ui/alert-dialog.tsx +1 -0
  18. package/corpus/templates/factory/app/i18n/en-US.ts +43 -0
  19. package/corpus/templates/factory/app/routes/factory.tsx +115 -15
  20. package/corpus/templates/factory/server/plugins/agent-chat.ts +3 -1
  21. package/dist/collab/awareness.d.ts +2 -2
  22. package/dist/collab/struct-routes.d.ts +1 -1
  23. package/dist/notifications/routes.d.ts +3 -3
  24. package/dist/observability/routes.d.ts +3 -3
  25. package/dist/progress/routes.d.ts +1 -1
  26. package/dist/secrets/routes.d.ts +9 -9
  27. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  28. package/dist/server/realtime-token.d.ts +1 -1
  29. package/docs/content/actions-access-control.mdx +136 -2
  30. package/docs/content/actions-agent-tools.mdx +101 -0
  31. package/docs/content/actions-defining.mdx +2 -2
  32. package/docs/content/audit-log.mdx +1 -1
  33. package/docs/content/authentication.mdx +1 -1
  34. package/docs/content/cloudflare.mdx +43 -0
  35. package/docs/content/creating-templates.mdx +1 -1
  36. package/docs/content/deploy-an-app.mdx +109 -0
  37. package/docs/content/deployment-environment-variables.mdx +101 -0
  38. package/docs/content/deployment.mdx +125 -792
  39. package/docs/content/docs-components.mdx +2 -2
  40. package/docs/content/environment-variables.mdx +41 -41
  41. package/docs/content/file-uploads.mdx +74 -40
  42. package/docs/content/harness-agents.mdx +2 -2
  43. package/docs/content/internationalization.mdx +61 -65
  44. package/docs/content/key-concepts.mdx +3 -3
  45. package/docs/content/multi-app-workspace.mdx +2 -2
  46. package/docs/content/netlify.mdx +47 -0
  47. package/docs/content/node-docker.mdx +138 -0
  48. package/docs/content/organizations-teams-permissions.mdx +5 -5
  49. package/docs/content/other-platforms.mdx +27 -0
  50. package/docs/content/ssr-caching.mdx +45 -0
  51. package/docs/content/template-assets-developers.mdx +2 -2
  52. package/docs/content/template-chat-developers.mdx +2 -2
  53. package/docs/content/template-content-developers.mdx +2 -2
  54. package/docs/content/{local-file-mode.mdx → template-content-local-files.mdx} +2 -1
  55. package/docs/content/template-content-sync.mdx +2 -2
  56. package/docs/content/toolkit-agent-ux.mdx +1 -1
  57. package/docs/content/toolkit-resources.mdx +2 -2
  58. package/docs/content/updating-ui-in-production.mdx +35 -0
  59. package/docs/content/vercel.mdx +38 -0
  60. package/docs/content/what-is-agent-native.mdx +1 -1
  61. package/docs/content/workspace-deployment.mdx +350 -0
  62. package/package.json +1 -1
  63. package/docs/content/agents.mdx +0 -9
  64. package/docs/content/database.mdx +0 -317
  65. package/docs/content/human-approval.mdx +0 -156
@@ -1,6 +1,12 @@
1
1
  import { useActionQuery } from "@agent-native/core/client/hooks";
2
2
  import { useT } from "@agent-native/core/client/i18n";
3
- import { IconArrowRight, IconPlus, IconTrash } from "@tabler/icons-react";
3
+ import {
4
+ IconAlertCircle,
5
+ IconArrowRight,
6
+ IconLoader2,
7
+ IconPlus,
8
+ IconTrash,
9
+ } from "@tabler/icons-react";
4
10
  import { useMemo, useState } from "react";
5
11
  import { useSearchParams } from "react-router";
6
12
 
@@ -22,8 +28,13 @@ interface FactoryInspectorProps {
22
28
  factoryId?: string;
23
29
  dirty: boolean;
24
30
  saving: boolean;
31
+ saveError: string | null;
32
+ saveConflictNeedsResolution: boolean;
33
+ refreshing: boolean;
25
34
  onGraphChange: (graph: FactoryCanvasGraph) => void;
26
35
  onSave: () => void;
36
+ onRefresh: () => void;
37
+ onDiscardLocalChanges: () => void;
27
38
  onAddNode: () => void;
28
39
  onDeleteNode: (nodeId: string) => void;
29
40
  onConnect: (sourceId: string, targetId: string) => void;
@@ -54,8 +65,13 @@ export function FactoryInspector({
54
65
  factoryId,
55
66
  dirty,
56
67
  saving,
68
+ saveError,
69
+ saveConflictNeedsResolution,
70
+ refreshing,
57
71
  onGraphChange,
58
72
  onSave,
73
+ onRefresh,
74
+ onDiscardLocalChanges,
59
75
  onAddNode,
60
76
  onDeleteNode,
61
77
  onConnect,
@@ -383,12 +399,56 @@ export function FactoryInspector({
383
399
  </section>
384
400
  </div>
385
401
 
402
+ {saveError ? (
403
+ <div
404
+ className="flex items-start gap-2 border-t border-border/60 bg-destructive/5 p-4 text-sm text-destructive"
405
+ role="alert"
406
+ >
407
+ <IconAlertCircle className="mt-0.5 size-4 shrink-0" />
408
+ <div className="min-w-0 flex-1 space-y-2">
409
+ <p>{saveError}</p>
410
+ {saveConflictNeedsResolution ? (
411
+ <p className="text-xs leading-5 text-destructive/80">
412
+ {t("factoryInspector.saveConflictHint")}
413
+ </p>
414
+ ) : null}
415
+ <div className="flex flex-wrap gap-2">
416
+ {!saveConflictNeedsResolution ? (
417
+ <Button
418
+ type="button"
419
+ variant="link"
420
+ size="sm"
421
+ className="h-auto p-0 text-destructive"
422
+ disabled={refreshing}
423
+ onClick={onRefresh}
424
+ >
425
+ {refreshing ? (
426
+ <IconLoader2 className="size-3.5 animate-spin" />
427
+ ) : null}
428
+ {t("triage.refresh")}
429
+ </Button>
430
+ ) : (
431
+ <Button
432
+ type="button"
433
+ variant="link"
434
+ size="sm"
435
+ className="h-auto p-0 text-destructive"
436
+ onClick={onDiscardLocalChanges}
437
+ >
438
+ {t("factoryInspector.discardLocalChanges")}
439
+ </Button>
440
+ )}
441
+ </div>
442
+ </div>
443
+ </div>
444
+ ) : null}
445
+
386
446
  {(dirty || saving) && (
387
447
  <div className="bg-muted/15 p-4">
388
448
  <Button
389
449
  type="button"
390
450
  className="w-full"
391
- disabled={saving}
451
+ disabled={saving || refreshing}
392
452
  onClick={onSave}
393
453
  >
394
454
  {saving
@@ -0,0 +1 @@
1
+ export * from "@agent-native/toolkit/ui/alert-dialog";
@@ -204,6 +204,46 @@ const messages = {
204
204
  auditUxImpact: "UX impact",
205
205
  auditOwnerArea: "Owner area",
206
206
  auditGuardsLabel: "Guards",
207
+ historyTab: "History",
208
+ historyTitle: "Saved versions",
209
+ historyLoading: "Loading saved versions",
210
+ historyLoadError: "Could not load Factory history.",
211
+ historyEmpty: "No saved versions yet",
212
+ historyEmptyHint:
213
+ "Save the visual graph once and Factory will keep each version here for review and rollback.",
214
+ historyVersion: "Version {{version}}",
215
+ historyCurrent: "Current",
216
+ historySource: "Source",
217
+ historySourceManual: "Visual editor",
218
+ historySourceAi: "Agent proposal",
219
+ historySourceSeed: "Factory seed",
220
+ historySourceRestore: "Rollback",
221
+ historySourceSaved: "Saved graph",
222
+ historyNodes: "Nodes",
223
+ historyConnections: "Connections",
224
+ historyChangeSummary: "Change summary",
225
+ historyNoSummary: "No change summary was recorded.",
226
+ historyCurrentHint: "This is the version currently used by the Factory.",
227
+ historyRestore: "Restore this version",
228
+ historyRestoreTitle: "Restore version {{version}}?",
229
+ historyRestoreDescription:
230
+ "Factory will create a new current version from this snapshot. Existing versions stay available in history.",
231
+ historyRestoreUnsaved:
232
+ "You also have unsaved visual changes. Restoring will discard them.",
233
+ historyCancel: "Cancel",
234
+ historyRestoreConfirm: "Restore version",
235
+ historyRestored: "Version restored. A new current version was created.",
236
+ historyRestoreFailed: "Could not restore this Factory version.",
237
+ historyRestoreConflict:
238
+ "Factory changed while restoring. Review the refreshed history before trying again.",
239
+ historyRefreshFailed:
240
+ "The version was restored, but the Factory view could not refresh.",
241
+ historyLoadOlder: "Load older versions",
242
+ historySnapshotLoadError: "Could not load this version preview.",
243
+ historyRestoreUnverified:
244
+ "Restore completed, but the result could not be verified. Refresh history before trying again.",
245
+ saveConflictFallback:
246
+ "Factory changed while saving. Refresh Factory and try again.",
207
247
  automationsTitle: "Automations",
208
248
  automationsDescription: "Schedule and run Factory prompts.",
209
249
  automationsLoading: "Loading automations...",
@@ -312,6 +352,9 @@ const messages = {
312
352
  addComment: "Add comment",
313
353
  savingGraph: "Saving graph...",
314
354
  saveGraph: "Save factory changes",
355
+ saveConflictHint:
356
+ "Your unsaved edits are preserved. Discard them to load the newer Factory version.",
357
+ discardLocalChanges: "Discard local edits and load current version",
315
358
  savedGraph: "Factory is saved",
316
359
  saveNote: "Saves a new version. Existing runs keep their original context.",
317
360
  factoryName: "Factory name",
@@ -31,6 +31,7 @@ import {
31
31
  type FactoryCanvasGraph,
32
32
  type FactoryCanvasNode,
33
33
  } from "@/components/factory/FactoryCanvas";
34
+ import { FactoryHistoryView } from "@/components/factory/FactoryHistoryView";
34
35
  import { FactoryInspector } from "@/components/factory/FactoryInspector";
35
36
  import { TriageStatusPill } from "@/components/triage/triage-status-pill";
36
37
  import { Button } from "@/components/ui/button";
@@ -131,6 +132,7 @@ type WorkspaceTab =
131
132
  | "automations"
132
133
  | "agents"
133
134
  | "audit"
135
+ | "history"
134
136
  | "settings";
135
137
 
136
138
  type FactoryAutomationRun = {
@@ -184,9 +186,14 @@ export default function FactoryRoute() {
184
186
  const [creating, setCreating] = useState(false);
185
187
  const [draftGraph, setDraftGraph] = useState<FactoryCanvasGraph | null>(null);
186
188
  const [dirty, setDirty] = useState(false);
189
+ const [saveError, setSaveError] = useState<string | null>(null);
190
+ const [saveConflictRemoteGraph, setSaveConflictRemoteGraph] =
191
+ useState<FactoryCanvasGraph | null>(null);
192
+ const [refreshingFactory, setRefreshingFactory] = useState(false);
187
193
  const [selectedNodeId, setSelectedNodeId] = useState<string | null>(null);
188
194
  const [selectedEdgeId, setSelectedEdgeId] = useState<string | null>(null);
189
195
  const [auditRefreshToken, setAuditRefreshToken] = useState(0);
196
+ const draftRevisionRef = useRef(0);
190
197
 
191
198
  function setActiveTab(tab: WorkspaceTab) {
192
199
  setSearchParams(
@@ -194,6 +201,10 @@ export default function FactoryRoute() {
194
201
  const next = new URLSearchParams(current);
195
202
  if (tab === "overview") next.delete("tab");
196
203
  else next.set("tab", tab);
204
+ if (tab === "history") {
205
+ next.delete("node");
206
+ next.delete("edge");
207
+ }
197
208
  return next;
198
209
  },
199
210
  { replace: true },
@@ -255,17 +266,17 @@ export default function FactoryRoute() {
255
266
  const graphData =
256
267
  rawGraphData?.factory.id === factoryId ? rawGraphData : undefined;
257
268
  const graph = draftGraph ?? graphData?.graph ?? null;
258
- const graphVersion = graphData?.factory.graphVersion ?? graph?.version ?? 1;
269
+ const graphVersion = graph?.version ?? graphData?.factory.graphVersion ?? 1;
259
270
  const saveGraphMutation = useActionMutation("save-factory-graph");
260
271
  const factoryList = (factoryListQuery.data ?? []) as FactorySummary[];
261
272
 
262
273
  useEffect(() => {
263
- if (!graphData || creating) return;
274
+ if (!graphData || creating || dirty) return;
264
275
  setDraftGraph(graphData.graph);
265
276
  setDirty(false);
266
277
  setSelectedNodeId(null);
267
278
  setSelectedEdgeId(null);
268
- }, [creating, graphData]);
279
+ }, [creating, dirty, graphData]);
269
280
 
270
281
  useEffect(() => {
271
282
  setSelectedNodeId(searchParams.get("node"));
@@ -313,6 +324,9 @@ export default function FactoryRoute() {
313
324
  }
314
325
 
315
326
  function updateGraph(next: FactoryCanvasGraph) {
327
+ draftRevisionRef.current += 1;
328
+ setSaveError(null);
329
+ setSaveConflictRemoteGraph(null);
316
330
  setDraftGraph(next);
317
331
  setDirty(
318
332
  !graphData?.graph ||
@@ -396,20 +410,87 @@ export default function FactoryRoute() {
396
410
 
397
411
  async function saveGraph() {
398
412
  if (!graph || !selectedFactoryId) return;
399
- await saveGraphMutation.mutateAsync({
400
- factoryId: selectedFactoryId,
401
- name: graph.name,
402
- description: graph.description,
403
- prompt: creating ? "" : (graphData?.factory.prompt ?? ""),
404
- source: "manual",
405
- changeSummary: creating
406
- ? "Created from the Factory visual editor."
407
- : "Updated in the Factory visual editor.",
408
- graph,
409
- });
413
+ const submittedDraftRevision = draftRevisionRef.current;
414
+ setSaveError(null);
415
+ try {
416
+ await saveGraphMutation.mutateAsync({
417
+ factoryId: selectedFactoryId,
418
+ name: graph.name,
419
+ description: graph.description,
420
+ prompt: creating ? "" : (graphData?.factory.prompt ?? ""),
421
+ source: "manual",
422
+ changeSummary: creating
423
+ ? "Created from the Factory visual editor."
424
+ : "Updated in the Factory visual editor.",
425
+ expectedGraphVersion: creating ? 0 : graph.version,
426
+ graph,
427
+ });
428
+ setCreating(false);
429
+ setDirty(draftRevisionRef.current !== submittedDraftRevision);
430
+ setSaveConflictRemoteGraph(null);
431
+ await Promise.all([graphQuery.refetch(), factoryListQuery.refetch()]);
432
+ } catch (error) {
433
+ setSaveError(
434
+ error instanceof Error
435
+ ? error.message
436
+ : t("factoryRoute.saveConflictFallback"),
437
+ );
438
+ }
439
+ }
440
+
441
+ async function refreshFactoryAfterSaveConflict() {
442
+ setRefreshingFactory(true);
443
+ try {
444
+ const results = await Promise.all([
445
+ graphQuery.refetch(),
446
+ factoryListQuery.refetch(),
447
+ ]);
448
+ if (results.some((result) => result.isError)) {
449
+ throw new Error("Factory refresh failed.");
450
+ }
451
+ const remoteGraph = (results[0].data as FactoryGraphResponse | undefined)
452
+ ?.graph;
453
+ if (dirty) {
454
+ if (!remoteGraph) throw new Error("Factory graph refresh failed.");
455
+ setSaveConflictRemoteGraph(remoteGraph);
456
+ setSaveError(t("factoryRoute.saveConflictFallback"));
457
+ return;
458
+ }
459
+ setSaveError(null);
460
+ } catch {
461
+ setSaveError(t("factoryRoute.saveConflictFallback"));
462
+ } finally {
463
+ setRefreshingFactory(false);
464
+ }
465
+ }
466
+
467
+ function discardLocalFactoryChanges() {
468
+ if (!saveConflictRemoteGraph) return;
469
+ setDraftGraph(saveConflictRemoteGraph);
470
+ setSaveConflictRemoteGraph(null);
471
+ setSaveError(null);
472
+ setDirty(false);
473
+ setCreating(false);
474
+ setSelectedNodeId(null);
475
+ setSelectedEdgeId(null);
476
+ }
477
+
478
+ async function handleFactoryRestored(result?: { graph: FactoryCanvasGraph }) {
410
479
  setCreating(false);
480
+ if (result?.graph) setDraftGraph(result.graph);
481
+ else setDraftGraph(null);
411
482
  setDirty(false);
412
- await Promise.all([graphQuery.refetch(), factoryListQuery.refetch()]);
483
+ setSaveError(null);
484
+ setSaveConflictRemoteGraph(null);
485
+ setSelectedNodeId(null);
486
+ setSelectedEdgeId(null);
487
+ const results = await Promise.all([
488
+ graphQuery.refetch(),
489
+ factoryListQuery.refetch(),
490
+ ]);
491
+ if (results.some((result) => result.isError)) {
492
+ throw new Error("Factory view refresh failed.");
493
+ }
413
494
  }
414
495
 
415
496
  if (!selectedFactoryId && activeTab === "agents") {
@@ -659,6 +740,12 @@ export default function FactoryRoute() {
659
740
  >
660
741
  Activity
661
742
  </TabButton>
743
+ <TabButton
744
+ active={activeTab === "history"}
745
+ onClick={() => setActiveTab("history")}
746
+ >
747
+ {t("factoryRoute.historyTab")}
748
+ </TabButton>
662
749
  <TabButton
663
750
  active={activeTab === "settings"}
664
751
  onClick={() => setActiveTab("settings")}
@@ -727,8 +814,13 @@ export default function FactoryRoute() {
727
814
  factoryId={factoryId}
728
815
  dirty={dirty}
729
816
  saving={saveGraphMutation.isPending}
817
+ saveError={saveError}
818
+ saveConflictNeedsResolution={Boolean(saveConflictRemoteGraph)}
819
+ refreshing={refreshingFactory}
730
820
  onGraphChange={updateGraph}
731
821
  onSave={() => void saveGraph()}
822
+ onRefresh={refreshFactoryAfterSaveConflict}
823
+ onDiscardLocalChanges={discardLocalFactoryChanges}
732
824
  onAddNode={addNode}
733
825
  onDeleteNode={deleteNode}
734
826
  onConnect={connectNodes}
@@ -747,6 +839,13 @@ export default function FactoryRoute() {
747
839
  factoryId={factoryId}
748
840
  refreshToken={auditRefreshToken}
749
841
  />
842
+ ) : activeTab === "history" ? (
843
+ <FactoryHistoryView
844
+ key={factoryId}
845
+ factoryId={factoryId}
846
+ hasUnsavedChanges={dirty}
847
+ onRestored={handleFactoryRestored}
848
+ />
750
849
  ) : (
751
850
  <SettingsView t={t} />
752
851
  )}
@@ -783,6 +882,7 @@ function parseWorkspaceTab(value: string | null): WorkspaceTab {
783
882
  value === "automations" ||
784
883
  value === "agents" ||
785
884
  value === "audit" ||
885
+ value === "history" ||
786
886
  value === "settings"
787
887
  ? value
788
888
  : "overview";
@@ -57,7 +57,9 @@ current factory graph, and executes only the explicit automation prompts that
57
57
  are stored in the organization.
58
58
  Use the Factory actions as the source of truth. When a user asks to
59
59
  create or change a factory, first inspect the current graph, then propose a complete
60
- versioned graph through save-factory-graph with source=ai and a concise changeSummary.
60
+ versioned graph through save-factory-graph with source=ai, the inspected graphVersion
61
+ as expectedGraphVersion, and a concise changeSummary. Never save a graph from a
62
+ stale read: refresh and re-propose when the action reports a version conflict.
61
63
  Never hide a graph change in prose: the visual map and the saved graph must agree.
62
64
  The graph is currently a reviewable blueprint, not the runtime router: automation
63
65
  markdown resources are the runtime prompts, while enabled triage rules are evaluated
@@ -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,9 +77,9 @@ 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
  }>>;
@@ -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
- ok?: undefined;
17
16
  error: string;
17
+ ok?: undefined;
18
18
  } | {
19
19
  error?: undefined;
20
20
  ok: boolean;
@@ -11,23 +11,23 @@
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
17
  ok?: undefined;
17
- error?: undefined;
18
18
  } | {
19
+ error?: undefined;
19
20
  count?: undefined;
20
21
  updated: number;
21
22
  ok?: undefined;
22
- error?: undefined;
23
23
  } | {
24
24
  count?: undefined;
25
25
  updated?: undefined;
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
  }>>;
@@ -42,22 +42,22 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
42
42
  avgEvalScore: number;
43
43
  } | {
44
44
  error?: undefined;
45
+ ok?: undefined;
45
46
  summary: import("./types.js").TraceSummary;
46
47
  spans: import("./types.js").TraceSpan[];
47
48
  id?: undefined;
48
- ok?: undefined;
49
49
  } | {
50
50
  error?: undefined;
51
+ ok?: undefined;
51
52
  summary?: undefined;
52
53
  spans?: undefined;
53
54
  id: string;
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
62
  error?: undefined;
63
63
  summary?: undefined;
@@ -15,6 +15,6 @@ 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
  }>>;
@@ -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
- ok?: undefined;
38
37
  status?: undefined;
38
+ ok?: undefined;
39
39
  } | {
40
- error?: undefined;
41
40
  ok: boolean;
42
41
  status: string;
42
+ error?: undefined;
43
43
  } | {
44
- ok?: undefined;
45
44
  error: string;
46
45
  removed?: undefined;
46
+ ok?: undefined;
47
47
  } | {
48
- error?: undefined;
49
48
  ok: boolean;
50
49
  removed: boolean;
50
+ error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — validate an optional candidate value
54
54
  * or the current stored value without changing anything.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
- ok?: undefined;
58
57
  error: string;
59
58
  note?: undefined;
59
+ ok?: undefined;
60
60
  } | {
61
- error?: undefined;
62
61
  ok: boolean;
63
62
  note?: undefined;
64
- } | {
65
63
  error?: undefined;
64
+ } | {
66
65
  ok: boolean;
67
66
  note: string;
67
+ error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,11 +95,11 @@ 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;
99
98
  ok: boolean;
100
99
  key: string;
101
- } | {
102
100
  error?: undefined;
101
+ } | {
103
102
  ok: boolean;
104
103
  removed: boolean;
104
+ error?: undefined;
105
105
  }>>;
@@ -27,10 +27,10 @@ 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;
31
30
  ok: boolean;
32
31
  key: string;
33
32
  baseUrlKey?: string;
34
33
  scope: AgentEngineApiKeyScope;
34
+ error?: undefined;
35
35
  }>>;
36
36
  export {};
@@ -26,8 +26,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
26
26
  expiresAt?: undefined;
27
27
  ttlSeconds?: undefined;
28
28
  } | {
29
+ error?: undefined;
29
30
  token: string;
30
31
  expiresAt: string;
31
32
  ttlSeconds: number;
32
- error?: undefined;
33
33
  }>>;