@agent-native/core 0.165.3 → 0.167.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/analytics/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/analytics/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/analytics/CHANGELOG.md +740 -2
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +93 -56
- package/corpus/templates/analytics/app/i18n-data.ts +23 -20
- package/corpus/templates/analytics/app/pages/Settings.tsx +0 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +0 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +2 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +0 -1
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +0 -32
- package/corpus/templates/analytics/server/lib/session-replay.ts +1 -5
- package/corpus/templates/assets/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/assets/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/assets/CHANGELOG.md +204 -2
- package/corpus/templates/assets/actions/navigate.ts +2 -2
- package/corpus/templates/assets/actions/save-generated-image.ts +0 -5
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +2 -262
- package/corpus/templates/assets/app/routes/library.tsx +1 -1
- package/corpus/templates/assets/app/routes/settings.tsx +0 -3
- package/corpus/templates/brain/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/brain/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/brain/CHANGELOG.md +145 -2
- package/corpus/templates/brain/actions/ask-brain.ts +0 -1
- package/corpus/templates/brain/actions/navigate.ts +2 -2
- package/corpus/templates/brain/app/routes/sources.tsx +0 -4
- package/corpus/templates/brain/server/lib/capture-sanitization.ts +0 -11
- package/corpus/templates/calendar/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/calendar/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/calendar/CHANGELOG.md +272 -2
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +0 -20
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -1
- package/corpus/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/chat/CHANGELOG.md +89 -2
- package/corpus/templates/chat/actions/navigate.ts +2 -2
- package/corpus/templates/clips/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/clips/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/clips/CHANGELOG.md +865 -2
- package/corpus/templates/clips/actions/import-loom-recording.ts +16 -4
- package/corpus/templates/clips/actions/navigate.ts +2 -2
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +0 -1
- package/corpus/templates/clips/app/components/library/space-dialogs.tsx +0 -1
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +0 -1
- package/corpus/templates/clips/app/components/player/clips-share-trigger.tsx +17 -0
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +3 -3
- package/corpus/templates/clips/app/components/player/video-player.tsx +2 -2
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +0 -1
- package/corpus/templates/clips/app/components/settings/ai-setup-section.tsx +0 -1
- package/corpus/templates/clips/app/global.css +31 -0
- package/corpus/templates/clips/app/hooks/use-playback-position.ts +0 -2
- package/corpus/templates/clips/app/lib/download-release-channel.ts +10 -0
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +1 -3
- package/corpus/templates/clips/app/routes/download.tsx +67 -44
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +7 -12
- package/corpus/templates/clips/app/routes/record.tsx +6 -6
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +26 -29
- package/corpus/templates/clips/changelog/2026-08-20-clip-viewer-share-actions.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-20-preparing-recording-countdown-overlay.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/background.ts +0 -13
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +0 -1
- package/corpus/templates/clips/chrome-extension/src/popup.ts +0 -20
- package/corpus/templates/clips/desktop/src/app.tsx +6 -18
- package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +0 -1
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +0 -8
- package/corpus/templates/clips/desktop/src/overlays/preparing.tsx +4 -6
- package/corpus/templates/clips/desktop/src/styles.css +18 -20
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +9 -17
- package/corpus/templates/content/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/content/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/content/CHANGELOG.md +503 -2
- package/corpus/templates/content/actions/_database-source-utils.ts +0 -3
- package/corpus/templates/content/actions/attach-content-database-source.ts +1 -4
- package/corpus/templates/content/actions/navigate.ts +2 -2
- package/corpus/templates/content/actions/prepare-builder-source-execution.ts +1 -1
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +0 -6
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +0 -580
- package/corpus/templates/content/app/components/editor/database/FormView.tsx +2 -2
- package/corpus/templates/content/app/components/editor/database/filter-sort.ts +1 -1
- package/corpus/templates/content/app/components/editor/database/settings.tsx +0 -23
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +0 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +8 -304
- package/corpus/templates/content/app/hooks/use-documents.ts +0 -1
- package/corpus/templates/content/shared/api.ts +0 -1
- package/corpus/templates/content/shared/builder-mdx.ts +0 -1
- package/corpus/templates/content/shared/nfm.ts +1 -7
- package/corpus/templates/crm/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/crm/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/crm/CHANGELOG.md +31 -2
- package/corpus/templates/crm/actions/merge-crm-records.ts +0 -4
- package/corpus/templates/crm/app/components/crm/record/RecordLists.tsx +0 -1
- package/corpus/templates/crm/server/crm/hubspot-adapter.ts +0 -1
- package/corpus/templates/crm/server/crm/salesforce-adapter.ts +0 -1
- package/corpus/templates/crm/server/db/crm-store.ts +1 -1
- package/corpus/templates/design/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/design/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +1 -14
- package/corpus/templates/design/AGENTS.md +2 -1
- package/corpus/templates/design/CHANGELOG.md +870 -2
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +1 -5
- package/corpus/templates/design/actions/generate-design.ts +0 -1
- package/corpus/templates/design/actions/generate-screens.ts +5 -2
- package/corpus/templates/design/actions/go-to-main-component.ts +2 -2
- package/corpus/templates/design/actions/list-design-systems.ts +10 -0
- package/corpus/templates/design/actions/navigate.ts +2 -2
- package/corpus/templates/design/actions/open-component-source.ts +4 -4
- package/corpus/templates/design/actions/present-design-variants.ts +1 -2
- package/corpus/templates/design/actions/run-design-audit.ts +0 -22
- package/corpus/templates/design/actions/show-design-questions.ts +5 -2
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +19 -8
- package/corpus/templates/design/app/components/design/EditPanel.tsx +11 -183
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +21 -4
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +1 -5
- package/corpus/templates/design/app/components/design/bridge/codegen.ts +1 -1
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +10 -19
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +13 -3
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +38 -32
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -4
- package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +0 -4
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +15 -6
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +2 -2
- package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +0 -1
- package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +1 -1
- package/corpus/templates/design/app/i18n-data.ts +122 -0
- package/corpus/templates/design/app/lib/clipboard-content-lineage.ts +11 -1
- package/corpus/templates/design/app/pages/DesignEditor.tsx +50 -254
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +163 -8
- package/corpus/templates/design/app/pages/Index.tsx +17 -0
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +44 -32
- package/corpus/templates/design/app/pages/design-editor/canvas-primitives.ts +10 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +49 -3
- package/corpus/templates/design/app/pages/design-editor/clone-idrefs.ts +31 -0
- package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +28 -0
- package/corpus/templates/design/app/pages/design-editor/commands/add-auto-layout.ts +3 -3
- package/corpus/templates/design/app/pages/design-editor/commands/align-selection.ts +44 -14
- package/corpus/templates/design/app/pages/design-editor/commands/apply-local-content-update.ts +16 -5
- package/corpus/templates/design/app/pages/design-editor/commands/change-selected-z-index.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/frame-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/group-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/nudge-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/paste-selection.ts +142 -17
- package/corpus/templates/design/app/pages/design-editor/commands/screen-visual-duplicate-change.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/commands/ungroup-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/visual-duplicate-change.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +25 -9
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/measure-child-rects.ts +83 -0
- package/corpus/templates/design/app/pages/design-editor/paste-placement.ts +66 -0
- package/corpus/templates/design/server/routes/[...page].get.ts +0 -1
- package/corpus/templates/design/shared/code-layer.ts +120 -70
- package/corpus/templates/design/shared/design-surface-index.ts +0 -1
- package/corpus/templates/design/shared/pen-path.ts +0 -4
- package/corpus/templates/dispatch/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/dispatch/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/dispatch/CHANGELOG.md +196 -2
- package/corpus/templates/dispatch/app/routes/integrations.tsx +0 -109
- package/corpus/templates/factory/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/factory/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/factory/CHANGELOG.md +121 -2
- package/corpus/templates/factory/actions/navigate.ts +2 -2
- package/corpus/templates/factory/app/components/factory/FactoryAuditView.tsx +0 -13
- package/corpus/templates/factory/app/routes/factory.tsx +0 -1
- package/corpus/templates/factory/server/factory-graph/store.ts +0 -1
- package/corpus/templates/forms/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/forms/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/forms/CHANGELOG.md +166 -2
- package/corpus/templates/macros/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/macros/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/macros/CHANGELOG.md +49 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +0 -1
- package/corpus/templates/mail/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/mail/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/mail/CHANGELOG.md +201 -2
- package/corpus/templates/mail/app/components/email/EmailList.tsx +0 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +2 -2
- package/corpus/templates/mail/shared/markdown.ts +3 -0
- package/corpus/templates/plan/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/plan/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/plan/CHANGELOG.md +277 -2
- package/corpus/templates/slides/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/slides/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/slides/CHANGELOG.md +437 -2
- package/corpus/templates/slides/actions/add-slide.ts +0 -1
- package/corpus/templates/slides/actions/list-decks.ts +1 -1
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -4
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +0 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -6
- package/corpus/templates/tasks/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/tasks/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/tasks/CHANGELOG.md +32 -2
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +0 -1
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +1 -4
- package/corpus/templates/tasks/server/custom-fields/store.ts +1 -6
- package/corpus/templates/tasks/shared/list-screen-snapshot.ts +2 -2
- package/dist/agent/engine/registry.js +27 -14
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/production-agent.d.ts +19 -6
- package/dist/agent/production-agent.js +57 -16
- package/dist/agent/types.d.ts +3 -0
- package/dist/changelog/parse.d.ts +3 -3
- package/dist/changelog/parse.js +35 -16
- package/dist/client/EnvironmentBadge.d.ts +1 -0
- package/dist/client/EnvironmentBadge.js +7 -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/config.d.ts +11 -0
- package/dist/config.js +248 -0
- package/dist/deploy/build.js +12 -1
- package/dist/index.d.ts +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +6 -6
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat/plugin-options.d.ts +3 -2
- package/dist/server/agent-chat-plugin.js +5 -2
- package/dist/server/index.d.ts +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/templates/chat/CHANGELOG.md +89 -2
- package/dist/templates/chat/actions/navigate.ts +2 -2
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/vite/agent-native-config-loader.d.ts +1 -0
- package/dist/vite/agent-native-config-loader.js +3 -3
- package/dist/vite/agents-bundle-plugin.d.ts +1 -1
- package/dist/vite/agents-bundle-plugin.js +13 -1
- package/dist/vite/client.js +14 -14
- package/docs/content/agent-native-config.mdx +62 -11
- package/docs/content/agent-surfaces.mdx +6 -0
- package/docs/content/environment-variables.mdx +5 -2
- package/package.json +3 -3
- package/src/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/src/templates/chat/CHANGELOG.md +89 -2
- package/src/templates/chat/actions/navigate.ts +2 -2
- package/src/templates/default/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
|
@@ -552,26 +552,36 @@ async function resolveProviderBaseUrl(envVar) {
|
|
|
552
552
|
})
|
|
553
553
|
: undefined;
|
|
554
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* `null` means no custody — fall through to keys. Must mirror
|
|
557
|
+
* `BuilderGatewayEngine.stream`'s auth choice exactly: a preflight stricter
|
|
558
|
+
* than the engine rejects turns the engine would have served.
|
|
559
|
+
*/
|
|
560
|
+
async function builderOAuthLaneUsable(identity) {
|
|
561
|
+
const ownerEmail = identity?.userEmail?.trim().toLowerCase() || getRequestUserEmail();
|
|
562
|
+
if (!ownerEmail || !(await hasBuilderOAuthSession(ownerEmail)))
|
|
563
|
+
return null;
|
|
564
|
+
try {
|
|
565
|
+
return Boolean(await resolveBuilderOAuthRequestAccess({
|
|
566
|
+
ownerEmail,
|
|
567
|
+
requiredScope: BUILDER_OAUTH_SCOPE,
|
|
568
|
+
}));
|
|
569
|
+
}
|
|
570
|
+
catch {
|
|
571
|
+
// coercion-ok: custody present but unusable is "not usable", not absent;
|
|
572
|
+
// reconnect UX is owned by /builder/status, not this boolean probe.
|
|
573
|
+
return false;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
555
576
|
/**
|
|
556
577
|
* A Builder connection we could not read is not a missing connection. Throwing
|
|
557
578
|
* keeps that distinction instead of reporting "connect a provider" to a user
|
|
558
579
|
* whose org-shared keys exist but were unreadable.
|
|
559
580
|
*/
|
|
560
581
|
async function hasUsableBuilderConnection(identity) {
|
|
561
|
-
const
|
|
562
|
-
if (
|
|
563
|
-
|
|
564
|
-
return Boolean(await resolveBuilderOAuthRequestAccess({
|
|
565
|
-
ownerEmail,
|
|
566
|
-
requiredScope: BUILDER_OAUTH_SCOPE,
|
|
567
|
-
}));
|
|
568
|
-
}
|
|
569
|
-
catch {
|
|
570
|
-
// coercion-ok: custody present but unusable is "not usable", not absent;
|
|
571
|
-
// reconnect UX is owned by /builder/status, not this boolean probe.
|
|
572
|
-
return false;
|
|
573
|
-
}
|
|
574
|
-
}
|
|
582
|
+
const oauthLane = await builderOAuthLaneUsable(identity);
|
|
583
|
+
if (oauthLane !== null)
|
|
584
|
+
return oauthLane;
|
|
575
585
|
const creds = await resolveBuilderCredentialsDetailed(identity);
|
|
576
586
|
assertCredentialStoreReadable(creds);
|
|
577
587
|
return Boolean(creds.privateKey && creds.publicKey);
|
|
@@ -581,6 +591,9 @@ async function hasUsableBuilderConnection(identity) {
|
|
|
581
591
|
* "did this user connect Builder" and is false on every credits-only site.
|
|
582
592
|
*/
|
|
583
593
|
async function canRunBuilderEngine(identity) {
|
|
594
|
+
const oauthLane = await builderOAuthLaneUsable(identity);
|
|
595
|
+
if (oauthLane !== null)
|
|
596
|
+
return oauthLane;
|
|
584
597
|
const creds = await resolveBuilderGatewayCredentialsDetailed(identity);
|
|
585
598
|
assertCredentialStoreReadable(creds);
|
|
586
599
|
return Boolean(creds.privateKey && creds.publicKey);
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type AgentActionSurface, type AgentActionSurfaceDetails, type AgentLoopFinalResponseGuard, type AgentLoopFinalResponseGuardContext, type AgentLoopFinalResponseGuardResult, type AgentLoopToolCallSummary, type AgentLoopToolResultSummary, } from "./production-agent.js";
|
|
1
|
+
export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type AgentActionSurface, type DefaultAgentActionSurface, type AgentActionSurfaceResolution, type AgentActionSurfaceDetails, type AgentLoopFinalResponseGuard, type AgentLoopFinalResponseGuardContext, type AgentLoopFinalResponseGuardResult, type AgentLoopToolCallSummary, type AgentLoopToolResultSummary, } from "./production-agent.js";
|
|
2
2
|
export { type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, type AgentChatReference, type MentionProvider, type MentionProviderItem, } from "./types.js";
|
|
3
3
|
export { TripWire, type Processor, type ProcessorState, type ProcessorAbort, type ProcessOutputStreamArgs, type ProcessOutputStepArgs, type ProcessOutputResultArgs, } from "./processors.js";
|
|
4
4
|
export { DEFAULT_MODEL } from "./default-model.js";
|
|
@@ -259,6 +259,14 @@ export type AgentExecutionMode = "act" | "plan";
|
|
|
259
259
|
export interface AgentActionSurface {
|
|
260
260
|
allowedActionNames: readonly string[];
|
|
261
261
|
}
|
|
262
|
+
export interface DefaultAgentActionSurface {
|
|
263
|
+
mode: "default";
|
|
264
|
+
}
|
|
265
|
+
export type AgentActionSurfaceResolution = AgentActionSurface | DefaultAgentActionSurface;
|
|
266
|
+
type NormalizedAgentActionSurface = DefaultAgentActionSurface | {
|
|
267
|
+
mode: "allowlist";
|
|
268
|
+
allowedActionNames: string[];
|
|
269
|
+
};
|
|
262
270
|
export interface AgentActionSurfaceDetails {
|
|
263
271
|
event: any;
|
|
264
272
|
ownerEmail: string | null;
|
|
@@ -271,10 +279,14 @@ export interface AgentActionSurfaceDetails {
|
|
|
271
279
|
/** Read a persisted allowlist while preserving legacy absence and failing
|
|
272
280
|
* closed when the field is present but malformed. */
|
|
273
281
|
export declare function readPersistedAllowedActionNames(value: unknown): string[] | undefined;
|
|
274
|
-
export
|
|
282
|
+
export declare function normalizeAgentActionSurfaceResolution(value: unknown): NormalizedAgentActionSurface;
|
|
283
|
+
export type PersistedActionSurface = {
|
|
275
284
|
orgId: string | null;
|
|
276
285
|
allowedActionNames: string[];
|
|
277
|
-
}
|
|
286
|
+
} | {
|
|
287
|
+
orgId: string | null;
|
|
288
|
+
mode: "default";
|
|
289
|
+
};
|
|
278
290
|
/** Read a nested persisted action surface. An absent envelope is legacy;
|
|
279
291
|
* a present but invalid envelope is an explicit org-less, empty surface. */
|
|
280
292
|
export declare function readPersistedActionSurface(value: unknown, propertyName: string): PersistedActionSurface | undefined;
|
|
@@ -342,11 +354,12 @@ export interface ProductionAgentOptions {
|
|
|
342
354
|
}>;
|
|
343
355
|
/**
|
|
344
356
|
* Resolve the exact action registry exposed to one interactive agent-chat
|
|
345
|
-
* request.
|
|
346
|
-
*
|
|
347
|
-
*
|
|
357
|
+
* request. Return an allowlist to remove omitted actions from both provider
|
|
358
|
+
* schemas and the searchable registry, or `{ mode: "default" }` to preserve
|
|
359
|
+
* the normal initial-tool and discovery behavior for that request. Every
|
|
360
|
+
* allowlisted action is loaded directly on the first model request.
|
|
348
361
|
*/
|
|
349
|
-
resolveActionSurface?: (details: AgentActionSurfaceDetails) =>
|
|
362
|
+
resolveActionSurface?: (details: AgentActionSurfaceDetails) => AgentActionSurfaceResolution | Promise<AgentActionSurfaceResolution>;
|
|
350
363
|
/** Optional per-app agent run chunk budget in milliseconds. Defaults to
|
|
351
364
|
* AGENT_RUN_SOFT_TIMEOUT_MS when set, otherwise no framework-imposed
|
|
352
365
|
* timeout. When reached, the client receives an internal auto-continuation
|
|
@@ -411,13 +411,32 @@ export function readPersistedAllowedActionNames(value) {
|
|
|
411
411
|
}
|
|
412
412
|
return [...new Set(names)];
|
|
413
413
|
}
|
|
414
|
+
export function normalizeAgentActionSurfaceResolution(value) {
|
|
415
|
+
if (hasOwn(value, "mode")) {
|
|
416
|
+
if (value.mode === "default" && !hasOwn(value, "allowedActionNames")) {
|
|
417
|
+
return { mode: "default" };
|
|
418
|
+
}
|
|
419
|
+
throw new Error("resolveActionSurface returned an invalid default surface");
|
|
420
|
+
}
|
|
421
|
+
if (!hasOwn(value, "allowedActionNames")) {
|
|
422
|
+
throw new Error("resolveActionSurface returned an invalid action surface");
|
|
423
|
+
}
|
|
424
|
+
const allowedActionNames = value.allowedActionNames;
|
|
425
|
+
if (!Array.isArray(allowedActionNames) ||
|
|
426
|
+
!allowedActionNames.every((name) => typeof name === "string")) {
|
|
427
|
+
throw new Error("resolveActionSurface returned an invalid action surface");
|
|
428
|
+
}
|
|
429
|
+
return {
|
|
430
|
+
mode: "allowlist",
|
|
431
|
+
allowedActionNames: [...new Set(allowedActionNames)],
|
|
432
|
+
};
|
|
433
|
+
}
|
|
414
434
|
/** Read a nested persisted action surface. An absent envelope is legacy;
|
|
415
435
|
* a present but invalid envelope is an explicit org-less, empty surface. */
|
|
416
436
|
export function readPersistedActionSurface(value, propertyName) {
|
|
417
437
|
if (!hasOwn(value, propertyName))
|
|
418
438
|
return undefined;
|
|
419
439
|
const surface = value[propertyName];
|
|
420
|
-
const allowedActionNames = readPersistedAllowedActionNames(surface) ?? [];
|
|
421
440
|
if (!hasOwn(surface, "orgId")) {
|
|
422
441
|
return { orgId: null, allowedActionNames: [] };
|
|
423
442
|
}
|
|
@@ -426,6 +445,13 @@ export function readPersistedActionSurface(value, propertyName) {
|
|
|
426
445
|
(typeof orgId !== "string" || orgId.trim().length === 0)) {
|
|
427
446
|
return { orgId: null, allowedActionNames: [] };
|
|
428
447
|
}
|
|
448
|
+
if (hasOwn(surface, "mode")) {
|
|
449
|
+
if (surface.mode === "default" && !hasOwn(surface, "allowedActionNames")) {
|
|
450
|
+
return { orgId, mode: "default" };
|
|
451
|
+
}
|
|
452
|
+
return { orgId: null, allowedActionNames: [] };
|
|
453
|
+
}
|
|
454
|
+
const allowedActionNames = readPersistedAllowedActionNames(surface) ?? [];
|
|
429
455
|
return { orgId, allowedActionNames };
|
|
430
456
|
}
|
|
431
457
|
export function filterActionsByAllowedNames(actions, allowedActionNames) {
|
|
@@ -6560,6 +6586,7 @@ export function createProductionAgentHandler(options) {
|
|
|
6560
6586
|
availableRequestActions = filterActionsByAllowedNames(availableRequestActions, filterHostedHarnessToolNames(Object.keys(availableRequestActions)));
|
|
6561
6587
|
}
|
|
6562
6588
|
let surfacedRequestActions = availableRequestActions;
|
|
6589
|
+
let useDefaultRequestActionSurface = !options.resolveActionSurface;
|
|
6563
6590
|
if (options.resolveActionSurface) {
|
|
6564
6591
|
const persistedSurface = isBackgroundWorker
|
|
6565
6592
|
? readPersistedActionSurface(body, "__resolvedActionSurface")
|
|
@@ -6575,19 +6602,33 @@ export function createProductionAgentHandler(options) {
|
|
|
6575
6602
|
internalContinuation: Boolean(internalContinuation),
|
|
6576
6603
|
availableActionNames: Object.keys(availableRequestActions),
|
|
6577
6604
|
});
|
|
6578
|
-
|
|
6579
|
-
if (requestedHostedHarness) {
|
|
6580
|
-
surfacedRequestActions = filterActionsByAllowedNames(surfacedRequestActions, filterHostedHarnessToolNames(Object.keys(surfacedRequestActions)));
|
|
6581
|
-
}
|
|
6582
|
-
const allowedNames = Object.keys(surfacedRequestActions);
|
|
6605
|
+
const normalizedSurface = normalizeAgentActionSurfaceResolution(surface);
|
|
6583
6606
|
const runCtx = ensureRequestRunContext();
|
|
6584
|
-
if (
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6607
|
+
if (normalizedSurface.mode === "default") {
|
|
6608
|
+
useDefaultRequestActionSurface = true;
|
|
6609
|
+
if (runCtx)
|
|
6610
|
+
delete runCtx.allowedActionNames;
|
|
6611
|
+
if (!isBackgroundWorker) {
|
|
6612
|
+
body.__resolvedActionSurface = {
|
|
6613
|
+
orgId: getRequestOrgId() ?? null,
|
|
6614
|
+
mode: "default",
|
|
6615
|
+
};
|
|
6616
|
+
}
|
|
6617
|
+
}
|
|
6618
|
+
else {
|
|
6619
|
+
surfacedRequestActions = filterActionsByAllowedNames(availableRequestActions, normalizedSurface.allowedActionNames);
|
|
6620
|
+
if (requestedHostedHarness) {
|
|
6621
|
+
surfacedRequestActions = filterActionsByAllowedNames(surfacedRequestActions, filterHostedHarnessToolNames(Object.keys(surfacedRequestActions)));
|
|
6622
|
+
}
|
|
6623
|
+
const allowedNames = Object.keys(surfacedRequestActions);
|
|
6624
|
+
if (runCtx)
|
|
6625
|
+
runCtx.allowedActionNames = allowedNames;
|
|
6626
|
+
if (!isBackgroundWorker) {
|
|
6627
|
+
body.__resolvedActionSurface = {
|
|
6628
|
+
orgId: getRequestOrgId() ?? null,
|
|
6629
|
+
allowedActionNames: allowedNames,
|
|
6630
|
+
};
|
|
6631
|
+
}
|
|
6591
6632
|
}
|
|
6592
6633
|
}
|
|
6593
6634
|
// DIAGNOSTIC-ONLY: owner/request context prep (resolveAgentOwnerEmail +
|
|
@@ -7075,9 +7116,9 @@ export function createProductionAgentHandler(options) {
|
|
|
7075
7116
|
? createPlanModeActionRegistry(surfacedRequestActions)
|
|
7076
7117
|
: surfacedRequestActions;
|
|
7077
7118
|
const availableRequestTools = getEngineTools(requestActions);
|
|
7078
|
-
const initialRequestTools =
|
|
7079
|
-
? availableRequestTools
|
|
7080
|
-
:
|
|
7119
|
+
const initialRequestTools = useDefaultRequestActionSurface
|
|
7120
|
+
? filterInitialEngineTools(availableRequestTools, options.initialToolNames)
|
|
7121
|
+
: availableRequestTools;
|
|
7081
7122
|
const requestTools = requestMode === "plan"
|
|
7082
7123
|
? preloadPlanModeEngineTools({
|
|
7083
7124
|
request: requestMessage,
|
package/dist/agent/types.d.ts
CHANGED
|
@@ -208,6 +208,9 @@ export interface AgentChatRequest {
|
|
|
208
208
|
__resolvedActionSurface?: {
|
|
209
209
|
orgId: string | null;
|
|
210
210
|
allowedActionNames: string[];
|
|
211
|
+
} | {
|
|
212
|
+
orgId: string | null;
|
|
213
|
+
mode: "default";
|
|
211
214
|
};
|
|
212
215
|
/**
|
|
213
216
|
* Stable identity for the logical assistant turn this request belongs to.
|
|
@@ -34,8 +34,8 @@ export interface PendingChangelogEntry {
|
|
|
34
34
|
text: string;
|
|
35
35
|
}
|
|
36
36
|
export type ChangelogChangeType = "added" | "improved" | "fixed" | "changed" | "removed" | "security";
|
|
37
|
-
export declare const DEFAULT_CHANGELOG_RELEASE_LIMIT =
|
|
38
|
-
export declare const CHANGELOG_ARCHIVE_NOTE = "
|
|
37
|
+
export declare const DEFAULT_CHANGELOG_RELEASE_LIMIT = 100;
|
|
38
|
+
export declare const CHANGELOG_ARCHIVE_NOTE = "For the full list of updates, see the [changelog folder](./changelog/).";
|
|
39
39
|
/**
|
|
40
40
|
* Order changes are grouped under a release heading. Anything not listed here
|
|
41
41
|
* falls back to the "changed" group, then renders in insertion order.
|
|
@@ -78,7 +78,7 @@ export declare function rollupChangelog(existing: string, pending: PendingChange
|
|
|
78
78
|
*/
|
|
79
79
|
export declare function mergePendingChangelog(existing: string, pending: PendingChangelogEntry[]): string;
|
|
80
80
|
/**
|
|
81
|
-
* Keep a
|
|
81
|
+
* Keep a bounded, human-readable release window in `CHANGELOG.md` while the
|
|
82
82
|
* dated `changelog/*.md` files remain the complete source for app history.
|
|
83
83
|
* The Vite raw-import path can still expand the full folder-backed history.
|
|
84
84
|
*/
|
package/dist/changelog/parse.js
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* markdown shape is the conventional "Keep a Changelog" layout — a top-level
|
|
12
12
|
* `# Changelog` heading followed by one `## <release>` section per release.
|
|
13
13
|
*/
|
|
14
|
-
export const DEFAULT_CHANGELOG_RELEASE_LIMIT =
|
|
15
|
-
export const CHANGELOG_ARCHIVE_NOTE =
|
|
14
|
+
export const DEFAULT_CHANGELOG_RELEASE_LIMIT = 100;
|
|
15
|
+
export const CHANGELOG_ARCHIVE_NOTE = "For the full list of updates, see the [changelog folder](./changelog/).";
|
|
16
|
+
const LEGACY_CHANGELOG_ARCHIVE_NOTE = 'Older updates live in [the changelog folder](./changelog/) and are included in the in-app "What\'s new" view.';
|
|
16
17
|
/**
|
|
17
18
|
* Order changes are grouped under a release heading. Anything not listed here
|
|
18
19
|
* falls back to the "changed" group, then renders in insertion order.
|
|
@@ -34,6 +35,9 @@ const GROUP_LABELS = {
|
|
|
34
35
|
security: "Security",
|
|
35
36
|
};
|
|
36
37
|
const ISO_DATE = /(\d{4}-\d{2}-\d{2})/;
|
|
38
|
+
function cleanChangelogBody(value) {
|
|
39
|
+
return value.trim();
|
|
40
|
+
}
|
|
37
41
|
/** Lowercase, hyphenate, and strip to a URL/id-safe slug. */
|
|
38
42
|
export function changelogSlug(value) {
|
|
39
43
|
return value
|
|
@@ -154,7 +158,7 @@ export function parsePendingEntry(content, fallbackDate) {
|
|
|
154
158
|
export function renderReleaseBody(entries) {
|
|
155
159
|
const groups = new Map();
|
|
156
160
|
for (const entry of entries) {
|
|
157
|
-
const text = entry.text
|
|
161
|
+
const text = cleanChangelogBody(entry.text);
|
|
158
162
|
if (!text)
|
|
159
163
|
continue;
|
|
160
164
|
const bullet = text.includes("\n")
|
|
@@ -206,6 +210,13 @@ function changelogHeader(markdown) {
|
|
|
206
210
|
const header = (firstRelease === -1 ? doc : doc.slice(0, firstRelease)).replace(/\s+$/, "") || CHANGELOG_HEADER.trim();
|
|
207
211
|
return header;
|
|
208
212
|
}
|
|
213
|
+
function stripChangelogArchiveNotes(markdown) {
|
|
214
|
+
return markdown
|
|
215
|
+
.replace(CHANGELOG_ARCHIVE_NOTE, "")
|
|
216
|
+
.replace(LEGACY_CHANGELOG_ARCHIVE_NOTE, "")
|
|
217
|
+
.replace(/\n{3,}/g, "\n\n")
|
|
218
|
+
.replace(/\s+$/, "");
|
|
219
|
+
}
|
|
209
220
|
function pendingSectionTitle(entry) {
|
|
210
221
|
return entry.date?.match(ISO_DATE)?.[1] ?? "Unreleased";
|
|
211
222
|
}
|
|
@@ -233,7 +244,8 @@ function normalizedChangelogText(value) {
|
|
|
233
244
|
* without moving or deleting the conflict-free entry files.
|
|
234
245
|
*/
|
|
235
246
|
export function mergePendingChangelog(existing, pending) {
|
|
236
|
-
const
|
|
247
|
+
const cleanExisting = stripChangelogArchiveNotes(existing);
|
|
248
|
+
const existingEntries = parseChangelog(cleanExisting);
|
|
237
249
|
const pendingWithText = pending.filter((entry) => {
|
|
238
250
|
const text = entry.text.trim();
|
|
239
251
|
if (!text)
|
|
@@ -247,8 +259,12 @@ export function mergePendingChangelog(existing, pending) {
|
|
|
247
259
|
return normalizedChangelogText(existingEntry.body).includes(normalizedChangelogText(text));
|
|
248
260
|
});
|
|
249
261
|
});
|
|
250
|
-
if (pendingWithText.length === 0)
|
|
251
|
-
|
|
262
|
+
if (pendingWithText.length === 0) {
|
|
263
|
+
const sections = existingEntries
|
|
264
|
+
.map((entry) => `## ${entry.title}\n\n${cleanChangelogBody(entry.body)}`)
|
|
265
|
+
.join("\n\n");
|
|
266
|
+
return `${changelogHeader(cleanExisting)}${sections ? `\n\n${sections}` : ""}\n\n${CHANGELOG_ARCHIVE_NOTE}\n`;
|
|
267
|
+
}
|
|
252
268
|
const pendingByTitle = new Map();
|
|
253
269
|
for (const entry of pendingWithText) {
|
|
254
270
|
const title = pendingSectionTitle(entry);
|
|
@@ -257,7 +273,7 @@ export function mergePendingChangelog(existing, pending) {
|
|
|
257
273
|
const sections = existingEntries.map((entry) => ({
|
|
258
274
|
title: entry.title,
|
|
259
275
|
date: entry.date,
|
|
260
|
-
body: entry.body,
|
|
276
|
+
body: cleanChangelogBody(entry.body),
|
|
261
277
|
}));
|
|
262
278
|
for (const title of [...pendingByTitle.keys()].sort(pendingSectionSort)) {
|
|
263
279
|
const body = renderReleaseBody(pendingByTitle.get(title) ?? []);
|
|
@@ -267,7 +283,10 @@ export function mergePendingChangelog(existing, pending) {
|
|
|
267
283
|
return entry.date === title || entry.title === title;
|
|
268
284
|
});
|
|
269
285
|
if (existingIndex !== -1) {
|
|
270
|
-
sections[existingIndex].body = [
|
|
286
|
+
sections[existingIndex].body = [
|
|
287
|
+
body,
|
|
288
|
+
cleanChangelogBody(sections[existingIndex].body),
|
|
289
|
+
]
|
|
271
290
|
.filter(Boolean)
|
|
272
291
|
.join("\n\n");
|
|
273
292
|
continue;
|
|
@@ -278,26 +297,26 @@ export function mergePendingChangelog(existing, pending) {
|
|
|
278
297
|
: 0;
|
|
279
298
|
sections.splice(insertAt === -1 ? sections.length : insertAt, 0, newSection);
|
|
280
299
|
}
|
|
281
|
-
return `${changelogHeader(
|
|
282
|
-
.map((entry) => `## ${entry.title}\n\n${entry.body}`)
|
|
283
|
-
.join("\n\n")}\n`;
|
|
300
|
+
return `${changelogHeader(cleanExisting)}\n\n${sections
|
|
301
|
+
.map((entry) => `## ${entry.title}\n\n${cleanChangelogBody(entry.body)}`)
|
|
302
|
+
.join("\n\n")}\n\n${CHANGELOG_ARCHIVE_NOTE}\n`;
|
|
284
303
|
}
|
|
285
304
|
/**
|
|
286
|
-
* Keep a
|
|
305
|
+
* Keep a bounded, human-readable release window in `CHANGELOG.md` while the
|
|
287
306
|
* dated `changelog/*.md` files remain the complete source for app history.
|
|
288
307
|
* The Vite raw-import path can still expand the full folder-backed history.
|
|
289
308
|
*/
|
|
290
309
|
export function compactChangelog(existing, folderEntries, releaseLimit = DEFAULT_CHANGELOG_RELEASE_LIMIT) {
|
|
291
310
|
const merged = mergePendingChangelog(existing, folderEntries);
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
|
|
311
|
+
const cleanMerged = stripChangelogArchiveNotes(merged);
|
|
312
|
+
const entries = parseChangelog(cleanMerged).slice(0, Math.max(1, releaseLimit));
|
|
313
|
+
const header = changelogHeader(cleanMerged)
|
|
295
314
|
.replace(/\n{3,}/g, "\n\n")
|
|
296
315
|
.trim();
|
|
297
316
|
const sections = entries.map((entry) => `## ${entry.title}\n\n${entry.body}`);
|
|
298
317
|
if (sections.length === 0) {
|
|
299
318
|
return `${header || CHANGELOG_HEADER.trim()}\n\n${CHANGELOG_ARCHIVE_NOTE}\n`;
|
|
300
319
|
}
|
|
301
|
-
return `${header || CHANGELOG_HEADER.trim()}\n\n${
|
|
320
|
+
return `${header || CHANGELOG_HEADER.trim()}\n\n${sections.join("\n\n")}\n\n${CHANGELOG_ARCHIVE_NOTE}\n`;
|
|
302
321
|
}
|
|
303
322
|
export { CHANGELOG_HEADER, GROUP_LABELS };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentNativeDeploymentEnvironment, AgentNativeConfig } from "../config.js";
|
|
2
2
|
export { BETA_OPT_OUT_DURATION_MS, BETA_OPT_OUT_QUERY_PARAM, BETA_OPT_OUT_STORAGE_KEY, buildEnvironmentOptOutUrl, buildEnvironmentUrl, resolveEnvironmentTargets, type EnvironmentBadgeTargets, } from "../shared/environment-lanes.js";
|
|
3
3
|
export declare function isBuilderIoEmployee(email: string | null | undefined): boolean;
|
|
4
|
+
export declare function isAgentNativeDesktopUserAgent(userAgent: string | undefined): boolean;
|
|
4
5
|
export declare function resolveEnvironmentChannel(config: AgentNativeConfig, hostname: string | undefined): Extract<AgentNativeDeploymentEnvironment, "beta" | "production"> | null;
|
|
5
6
|
export declare function isBetaOptOutActive(value: string | number | null | undefined, now?: number): boolean;
|
|
6
7
|
/**
|
|
@@ -10,6 +10,9 @@ export { BETA_OPT_OUT_DURATION_MS, BETA_OPT_OUT_QUERY_PARAM, BETA_OPT_OUT_STORAG
|
|
|
10
10
|
export function isBuilderIoEmployee(email) {
|
|
11
11
|
return email?.trim().toLowerCase().endsWith("@builder.io") ?? false;
|
|
12
12
|
}
|
|
13
|
+
export function isAgentNativeDesktopUserAgent(userAgent) {
|
|
14
|
+
return /AgentNativeDesktop/i.test(userAgent ?? "");
|
|
15
|
+
}
|
|
13
16
|
export function resolveEnvironmentChannel(config, hostname) {
|
|
14
17
|
const configured = config.deployment?.environment;
|
|
15
18
|
if (configured === "beta" || configured === "production") {
|
|
@@ -98,6 +101,10 @@ function ProductionEnvironmentBadge({ targets, }) {
|
|
|
98
101
|
if (!isEligible || didAutoRedirect.current) {
|
|
99
102
|
return;
|
|
100
103
|
}
|
|
104
|
+
// Desktop child sessions are minted against their configured production
|
|
105
|
+
// origin. Do not move that WebView to beta after the session is created.
|
|
106
|
+
if (isAgentNativeDesktopUserAgent(window.navigator.userAgent))
|
|
107
|
+
return;
|
|
101
108
|
if (readBetaOptOutUntil() !== null)
|
|
102
109
|
return;
|
|
103
110
|
if (consumeBetaOptOutQueryParam(window.location.href))
|
|
@@ -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
|
}>>;
|
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;
|
package/dist/config.d.ts
CHANGED
|
@@ -101,6 +101,17 @@ export type AgentNativeConfigInput = AgentNativeConfig | AgentNativeConfigFactor
|
|
|
101
101
|
* phase, while the browser only receives the resolved serializable result.
|
|
102
102
|
*/
|
|
103
103
|
export declare function defineAgentNativeConfig(config: AgentNativeConfigInput): AgentNativeConfigInput;
|
|
104
|
+
export declare const AGENT_NATIVE_CONFIG_ENV_PREFIX: "AGENT_NATIVE_CONFIG";
|
|
105
|
+
/** Convert a config path such as `runtime.auth.enabled` to its env name. */
|
|
106
|
+
export declare function agentNativeConfigEnvName(path: readonly string[]): string;
|
|
107
|
+
/**
|
|
108
|
+
* Reads the public config's deterministic environment aliases.
|
|
109
|
+
*
|
|
110
|
+
* `AGENT_NATIVE_CONFIG` contains a complete JSON object. A suffixed name
|
|
111
|
+
* contains a JSON fragment at that config path, or a typed scalar at a leaf.
|
|
112
|
+
* Nodes are applied from shallowest to deepest so a more specific path wins.
|
|
113
|
+
*/
|
|
114
|
+
export declare function readAgentNativeConfigEnv(env: Record<string, string | undefined>): AgentNativeConfig;
|
|
104
115
|
export declare function normalizeAgentNativeConfig(input: unknown, source?: string): AgentNativeConfig;
|
|
105
116
|
export declare function mergeAgentNativeConfigs(base: AgentNativeConfig, override: AgentNativeConfig): AgentNativeConfig;
|
|
106
117
|
export declare function resolveAgentNativeConfig(input: AgentNativeConfigInput | undefined, context: AgentNativeConfigContext): AgentNativeConfig;
|