@agent-native/core 0.96.0 → 0.98.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/README.md +6 -0
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +71 -0
- package/corpus/core/docs/content/audit-log.mdx +2 -1
- package/corpus/core/docs/content/authentication.mdx +3 -3
- package/corpus/core/docs/content/automations.mdx +7 -7
- package/corpus/core/docs/content/creating-templates.mdx +1 -1
- package/corpus/core/docs/content/doctor.mdx +170 -0
- package/corpus/core/docs/content/external-agents.mdx +8 -7
- package/corpus/core/docs/content/internationalization.mdx +2 -1
- package/corpus/core/docs/content/locales/ar-SA/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ar-SA/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ar-SA/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/ar-SA/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/ar-SA/security.mdx +10 -0
- package/corpus/core/docs/content/locales/de-DE/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/de-DE/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/de-DE/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/de-DE/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/package-lifecycle.mdx +22 -0
- package/corpus/core/docs/content/locales/de-DE/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/de-DE/security.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/es-ES/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/es-ES/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/es-ES/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/package-lifecycle.mdx +22 -0
- package/corpus/core/docs/content/locales/es-ES/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/es-ES/security.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/fr-FR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/fr-FR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/fr-FR/sandbox-adapters.mdx +19 -8
- package/corpus/core/docs/content/locales/fr-FR/security.mdx +10 -0
- package/corpus/core/docs/content/locales/hi-IN/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/hi-IN/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/hi-IN/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/package-lifecycle.mdx +20 -0
- package/corpus/core/docs/content/locales/hi-IN/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/hi-IN/security.mdx +10 -0
- package/corpus/core/docs/content/locales/ja-JP/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ja-JP/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ja-JP/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/ja-JP/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/ja-JP/security.mdx +10 -0
- package/corpus/core/docs/content/locales/ko-KR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ko-KR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ko-KR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/package-lifecycle.mdx +20 -0
- package/corpus/core/docs/content/locales/ko-KR/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/ko-KR/security.mdx +10 -0
- package/corpus/core/docs/content/locales/pt-BR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/pt-BR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/pt-BR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/pt-BR/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/pt-BR/security.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-CN/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/zh-CN/getting-started.mdx +6 -4
- package/corpus/core/docs/content/locales/zh-CN/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/zh-CN/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/zh-CN/security.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-TW/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/zh-TW/getting-started.mdx +6 -4
- package/corpus/core/docs/content/locales/zh-TW/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/zh-TW/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/zh-TW/security.mdx +10 -0
- package/corpus/core/docs/content/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/package-lifecycle.mdx +51 -0
- package/corpus/core/docs/content/sandbox-adapters.mdx +16 -5
- package/corpus/core/docs/content/security.mdx +2 -0
- package/corpus/core/package.json +13 -2
- package/corpus/core/scripts/finalize-build.mjs +63 -3
- package/corpus/core/scripts/materialize-source-corpus.mjs +101 -15
- package/corpus/core/src/a2a/auth-policy.ts +33 -0
- package/corpus/core/src/action.ts +42 -0
- package/corpus/core/src/agent/durable-background.ts +15 -7
- package/corpus/core/src/agent/engine/builder-engine.ts +3 -0
- package/corpus/core/src/agent/engine/context-directives-transform.ts +69 -0
- package/corpus/core/src/agent/engine/continuation-dispatch-retry.ts +168 -0
- package/corpus/core/src/agent/engine/tool-call-journal-seed.ts +85 -0
- package/corpus/core/src/agent/production-agent.ts +129 -244
- package/corpus/core/src/agent/run-store.ts +13 -4
- package/corpus/core/src/audit/actions/export-audit-events.ts +162 -0
- package/corpus/core/src/audit/store.ts +8 -3
- package/corpus/core/src/audit/types.ts +3 -0
- package/corpus/core/src/cli/doctor.ts +402 -0
- package/corpus/core/src/cli/index.ts +56 -0
- package/corpus/core/src/cli/info.ts +3 -3
- package/corpus/core/src/cli/package-lifecycle.ts +821 -0
- package/corpus/core/src/cli/plan-local.ts +10 -2
- package/corpus/core/src/cli/skills-content/assets-skill.ts +83 -0
- package/corpus/core/src/cli/skills-content/canvas.ts +153 -0
- package/corpus/core/src/cli/skills-content/connection.ts +52 -0
- package/corpus/core/src/cli/skills-content/content-skill.ts +109 -0
- package/corpus/core/src/cli/skills-content/design-exploration-skill.ts +118 -0
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +228 -0
- package/corpus/core/src/cli/skills-content/document-quality.ts +196 -0
- package/corpus/core/src/cli/skills-content/exemplar.ts +69 -0
- package/corpus/core/src/cli/skills-content/help.ts +77 -0
- package/corpus/core/src/cli/skills-content/index.ts +22 -0
- package/corpus/core/src/cli/skills-content/local-files.ts +95 -0
- package/corpus/core/src/cli/skills-content/plan-setup-auth.ts +80 -0
- package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +470 -0
- package/corpus/core/src/cli/skills-content/visual-recap-skill.ts +547 -0
- package/corpus/core/src/cli/skills-content/visualize-repo-skill.ts +93 -0
- package/corpus/core/src/cli/skills-content/wireframe.ts +349 -0
- package/corpus/core/src/cli/skills.ts +27 -2733
- package/corpus/core/src/client/AgentPanel.tsx +6 -5
- package/corpus/core/src/client/CommandMenu.tsx +16 -5
- package/corpus/core/src/client/FeedbackButton.tsx +2 -2
- package/corpus/core/src/client/agent-chat-adapter.ts +9 -9
- package/corpus/core/src/client/app-providers.tsx +18 -5
- package/corpus/core/src/client/chat/tool-call-display.tsx +3 -3
- package/corpus/core/src/client/composer/PastedTextChip.tsx +1 -1
- package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +143 -45
- package/corpus/core/src/client/composer/TiptapComposer.tsx +1 -1
- package/corpus/core/src/client/composer/VoiceButton.tsx +21 -5
- package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +107 -10
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +5 -2
- package/corpus/core/src/client/extensions/ExtensionEditor.tsx +37 -4
- package/corpus/core/src/client/extensions/ExtensionQueryErrorState.tsx +47 -0
- package/corpus/core/src/client/extensions/ExtensionSlot.tsx +39 -10
- package/corpus/core/src/client/extensions/ExtensionViewer.tsx +44 -6
- package/corpus/core/src/client/extensions/ExtensionsListPage.tsx +12 -3
- package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +49 -11
- package/corpus/core/src/client/index.ts +0 -13
- package/corpus/core/src/client/progress/RunsTray.tsx +10 -3
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +7 -0
- package/corpus/core/src/client/settings/useBuilderStatus.ts +6 -0
- package/corpus/core/src/client/tool-cells/EditCell.tsx +19 -16
- package/corpus/core/src/client/tool-cells/FilesChangedSummary.tsx +26 -23
- package/corpus/core/src/client/tool-cells/WriteCell.tsx +19 -16
- package/corpus/core/src/client/visual-style-controls.tsx +1 -1
- package/corpus/core/src/deploy/build.ts +36 -14
- package/corpus/core/src/guards/db-tool-scoping.ts +129 -0
- package/corpus/core/src/guards/index.ts +23 -0
- package/corpus/core/src/guards/no-drizzle-push.ts +116 -0
- package/corpus/core/src/guards/no-env-credentials.ts +229 -0
- package/corpus/core/src/guards/no-env-mutation.ts +114 -0
- package/corpus/core/src/guards/no-localhost-fallback.ts +124 -0
- package/corpus/core/src/guards/no-unscoped-credentials.ts +227 -0
- package/corpus/core/src/guards/no-unscoped-queries.ts +834 -0
- package/corpus/core/src/guards/scan-utils.ts +105 -0
- package/corpus/core/src/guards/types.ts +30 -0
- package/corpus/core/src/integrations/google-docs-poller.ts +23 -2
- package/corpus/core/src/integrations/plugin.ts +10 -0
- package/corpus/core/src/integrations/webhook-handler.ts +27 -2
- package/corpus/core/src/jobs/scheduler.ts +28 -2
- package/corpus/core/src/localization/default-messages.ts +8 -1
- package/corpus/core/src/mcp/oauth-token.ts +6 -1
- package/corpus/core/src/observability/routes.ts +36 -0
- package/corpus/core/src/observability/sentiment.ts +261 -0
- package/corpus/core/src/observability/store.ts +23 -0
- package/corpus/core/src/observability/traces.ts +49 -63
- package/corpus/core/src/observability/tracking-identity.ts +55 -0
- package/corpus/core/src/observability/types.ts +13 -0
- package/corpus/core/src/org/accept-pending.ts +9 -1
- package/corpus/core/src/org/migrations.ts +41 -0
- package/corpus/core/src/package-lifecycle/index.ts +1 -0
- package/corpus/core/src/package-lifecycle/manifest.ts +120 -0
- package/corpus/core/src/provider-api/custom-registry.ts +56 -0
- package/corpus/core/src/provider-api/index.ts +2 -0
- package/corpus/core/src/secrets/storage.ts +114 -30
- package/corpus/core/src/server/action-discovery.ts +4 -0
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +199 -0
- package/corpus/core/src/server/agent-chat/browser-team-tools.ts +510 -0
- package/corpus/core/src/server/agent-chat/context-tools.ts +595 -0
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +470 -0
- package/corpus/core/src/server/agent-chat/lazy-fs.ts +11 -0
- package/corpus/core/src/server/agent-chat/mcp-glue.ts +91 -0
- package/corpus/core/src/server/agent-chat/plugin-options.ts +350 -0
- package/corpus/core/src/server/agent-chat/process-run-failure.ts +62 -0
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +688 -0
- package/corpus/core/src/server/agent-chat/recurring-jobs-runtime.ts +80 -0
- package/corpus/core/src/server/agent-chat/request-surface.ts +71 -0
- package/corpus/core/src/server/agent-chat/run-code-tools.ts +67 -0
- package/corpus/core/src/server/agent-chat/script-entries.ts +779 -0
- package/corpus/core/src/server/agent-chat/shared-thread.ts +301 -0
- package/corpus/core/src/server/agent-chat/skill-frontmatter.ts +41 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +403 -4179
- package/corpus/core/src/server/agent-teams.ts +26 -3
- package/corpus/core/src/server/auth.ts +55 -57
- package/corpus/core/src/server/core-routes-plugin.ts +30 -14
- package/corpus/core/src/server/credential-provider.ts +22 -25
- package/corpus/core/src/server/csrf.ts +24 -5
- package/corpus/core/src/server/edge.ts +1 -0
- package/corpus/core/src/server/framework-request-handler.ts +34 -0
- package/corpus/core/src/server/google-realtime-session.ts +1 -36
- package/corpus/core/src/server/onboarding-html.ts +1 -16
- package/corpus/core/src/server/poll.ts +24 -2
- package/corpus/core/src/server/realtime-voice.ts +49 -5
- package/corpus/core/src/server/request-origin.ts +67 -0
- package/corpus/core/src/server/ssr-handler.ts +55 -2
- package/corpus/core/src/server/transcribe-voice.ts +1 -50
- package/corpus/core/src/sharing/access.ts +155 -11
- package/corpus/core/src/sharing/registry.ts +7 -0
- package/corpus/core/src/styles/agent-native.css +15 -14
- package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +6 -0
- package/corpus/core/src/templates/default/package.json +2 -2
- package/corpus/core/src/templates/headless/package.json +0 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/corpus/core/src/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/corpus/core/src/templates/workspace-core/package.json +0 -1
- package/corpus/core/src/templates/workspace-core/src/server/index.ts +4 -2
- package/corpus/core/src/templates/workspace-root/package.json +0 -1
- package/corpus/core/src/testing.ts +26 -0
- package/corpus/core/src/triggers/actions.ts +11 -3
- package/corpus/core/src/triggers/dispatcher.ts +23 -2
- package/corpus/core/src/triggers/types.ts +7 -1
- package/corpus/core/src/vite/client.ts +126 -2
- package/corpus/core/tsconfig.cli.json +1 -1
- package/corpus/core/tsconfig.json +5 -1
- package/corpus/templates/analytics/.agents/skills/bigquery/SKILL.md +2 -2
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/analytics/AGENTS.md +19 -6
- package/corpus/templates/analytics/actions/compose-dashboard.ts +65 -37
- package/corpus/templates/analytics/actions/install-dashboard-template.ts +79 -43
- package/corpus/templates/analytics/actions/list-explorer-dashboards.ts +3 -3
- package/corpus/templates/analytics/actions/list-sql-dashboards.ts +8 -3
- package/corpus/templates/analytics/actions/mutate-dashboard.ts +73 -24
- package/corpus/templates/analytics/actions/rename-analysis.ts +8 -2
- package/corpus/templates/analytics/actions/rename-dashboard.ts +8 -7
- package/corpus/templates/analytics/actions/reorder-dashboard-panels.ts +16 -13
- package/corpus/templates/analytics/actions/update-dashboard.ts +53 -42
- package/corpus/templates/analytics/actions/view-screen.ts +4 -23
- package/corpus/templates/analytics/app/components/ResourceLoadError.tsx +42 -0
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +85 -70
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +107 -89
- package/corpus/templates/analytics/app/components/layout/SidebarLoadError.tsx +24 -0
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +15 -5
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/analytics/app/i18n-data.ts +40 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +6 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +36 -20
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +34 -20
- package/corpus/templates/analytics/app/pages/adhoc/explorer/use-explorer-config.ts +42 -41
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +43 -36
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +11 -2
- package/corpus/templates/analytics/app/root.tsx +13 -1
- package/corpus/templates/analytics/app/routes/_index.tsx +14 -2
- package/corpus/templates/analytics/changelog/2026-07-03-agent-llm-observability-dashboard.md +1 -1
- package/corpus/templates/analytics/changelog/2026-07-10-dashboard-edits-from-the-agent-and-the-ui-at-the-same-time-n.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-timed-out-bigquery-jobs-are-now-cancelled-so-they-stop-consu.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-agent-feedback-sentiment-dashboard.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-analytics-chats-now-start-faster-by-loading-metric-definitio.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-command-and-sql-previews-now-respond-without-lag.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-command-search-now-reports-loading-failures-and-lets-you-ret.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-dashboard-navigation-now-loads-faster-and-reports-request-fa.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-inferred-message-sentiment-dashboard.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-microphone-settings-from-realtime-voice-mode-now-open-the-vo.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-more-dashboard-edit-paths-are-now-safe-against-simultaneous-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-renaming-a-dashboard-is-now-safe-against-simultaneous-agent-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-renaming-an-analysis-is-now-safe-against-simultaneous-edits.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-workspace-mounted-analytics-now-opens-ask-reliably-and-route.md +6 -0
- package/corpus/templates/analytics/docs/schemas/first-party-analytics.md +37 -3
- package/corpus/templates/analytics/package.json +1 -2
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +339 -1
- package/corpus/templates/analytics/server/lib/bigquery.ts +3 -2
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -24
- package/corpus/templates/analytics/server/lib/dashboard-seeds.ts +0 -5
- package/corpus/templates/analytics/server/lib/dashboards-store.ts +443 -31
- package/corpus/templates/analytics/server/lib/data-dictionary-context.ts +106 -34
- package/corpus/templates/analytics/server/lib/demo-dashboards.ts +4 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -39
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +30 -4
- package/corpus/templates/assets/app/routes/library.tsx +49 -5
- package/corpus/templates/assets/changelog/2026-07-11-library-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/assets/package.json +1 -2
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/brain/package.json +1 -2
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/calendar/.env.example +5 -0
- package/corpus/templates/calendar/app/components/calendar/EventCard.tsx +2 -2
- package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/calendar/app/i18n-data.ts +20 -0
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +37 -1
- package/corpus/templates/calendar/app/pages/BookingsList.tsx +20 -3
- package/corpus/templates/calendar/changelog/2026-07-11-booking-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-11-event-cards-give-subtle-press-feedback-and-smoother-hover.md +6 -0
- package/corpus/templates/calendar/package.json +1 -2
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/chat/package.json +1 -2
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/clips/actions/decline-invite.ts +8 -0
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +209 -187
- package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +2 -2
- package/corpus/templates/clips/app/components/player/reactions-tray.tsx +17 -5
- package/corpus/templates/clips/app/components/player/scrubber.tsx +5 -3
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +2 -2
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +119 -95
- package/corpus/templates/clips/app/global.css +45 -0
- package/corpus/templates/clips/app/root.tsx +4 -0
- package/corpus/templates/clips/app/routes/_app.notifications.tsx +23 -2
- package/corpus/templates/clips/app/routes/_app.trash.tsx +24 -2
- package/corpus/templates/clips/changelog/2026-07-10-atomic-view-tracking.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-controls-and-folders-now-move-more-smoothly.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-declining-an-invitation-now-requires-being-its-recipient.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-recording-overlays-are-lighter-weight-and-no-longer-cause-pa.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-workspace-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/clips/chrome-extension/package.json +3 -2
- package/corpus/templates/clips/chrome-extension/src/overlay.css +34 -5
- package/corpus/templates/clips/chrome-extension/src/styles.css +2 -2
- package/corpus/templates/clips/desktop/package.json +6 -4
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +26 -13
- package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +4 -1
- package/corpus/templates/clips/desktop/src/styles.css +71 -26
- package/corpus/templates/clips/package.json +1 -2
- package/corpus/templates/clips/server/db/schema.ts +29 -17
- package/corpus/templates/clips/server/plugins/db.ts +8 -0
- package/corpus/templates/clips/server/routes/api/view-event.post.ts +260 -105
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/notion-integration/SKILL.md +16 -0
- package/corpus/templates/content/AGENTS.md +72 -62
- package/corpus/templates/content/actions/_content-database-source-adapters.ts +84 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +206 -96
- package/corpus/templates/content/actions/_notion-database-source-adapter.ts +216 -0
- package/corpus/templates/content/actions/_position-utils.ts +76 -0
- package/corpus/templates/content/actions/_property-utils.ts +31 -20
- package/corpus/templates/content/actions/add-database-item.ts +52 -39
- package/corpus/templates/content/actions/attach-content-database-source.ts +95 -11
- package/corpus/templates/content/actions/change-content-database-source-role.ts +24 -1
- package/corpus/templates/content/actions/configure-document-property.ts +36 -27
- package/corpus/templates/content/actions/create-content-database.ts +40 -30
- package/corpus/templates/content/actions/create-document.ts +39 -32
- package/corpus/templates/content/actions/duplicate-document-property.ts +37 -28
- package/corpus/templates/content/actions/list-notion-database-sources.ts +80 -0
- package/corpus/templates/content/actions/move-document.ts +93 -61
- package/corpus/templates/content/actions/refresh-content-database-source.ts +42 -3
- package/corpus/templates/content/actions/share-local-file-document.ts +36 -27
- package/corpus/templates/content/actions/suggest-source-join-key.ts +39 -16
- package/corpus/templates/content/app/components/QueryErrorState.tsx +39 -0
- package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +323 -1467
- package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +368 -0
- package/corpus/templates/content/app/components/editor/database/ListView.tsx +353 -0
- package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +580 -0
- package/corpus/templates/content/app/components/editor/database/settings.tsx +1 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +11 -2
- package/corpus/templates/content/app/global.css +19 -19
- package/corpus/templates/content/app/hooks/use-content-database.ts +18 -1
- package/corpus/templates/content/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/content/app/i18n-data.ts +40 -0
- package/corpus/templates/content/app/root.tsx +2 -2
- package/corpus/templates/content/app/routes/_app._index.tsx +11 -1
- package/corpus/templates/content/changelog/2026-07-10-failed-row-creation-and-source-attach-now-show-an-error-inst.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-items-added-at-the-same-time-no-longer-end-up-with-identical.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-notion-databases-can-add-read-only-details-to-content-tables.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-document-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-editor-toggle-feedback-now-feels-more-responsive.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-moving-documents-at-the-same-time-no-longer-scrambles-their-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-public-document-chats-now-start-faster-while-keeping-full-do.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-reopening-a-comment-now-uses-consistent-permissions-everywhe.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-sidebar-resizing-now-tracks-your-cursor-instantly-instead-of.md +6 -0
- package/corpus/templates/content/package.json +1 -2
- package/corpus/templates/content/parity/matrix.md +25 -25
- package/corpus/templates/content/parity/matrix.ts +1 -0
- package/corpus/templates/content/server/lib/public-documents.ts +47 -10
- package/corpus/templates/content/server/routes/api/comments/[id].patch.ts +24 -24
- package/corpus/templates/content/server/routes/api/documents/[id]/move.patch.ts +43 -26
- package/corpus/templates/content/shared/api.ts +16 -1
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +8 -4
- package/corpus/templates/design/AGENTS.md +12 -2
- package/corpus/templates/design/DEVELOPING.md +10 -6
- package/corpus/templates/design/actions/apply-visual-edit.ts +191 -6
- package/corpus/templates/design/actions/duplicate-design.ts +31 -25
- package/corpus/templates/design/app/components/QueryErrorState.tsx +24 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +1 -1
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +5 -2
- package/corpus/templates/design/app/components/design/EditPanel.tsx +326 -319
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +198 -193
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +11 -4
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +1 -1
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/design/app/pages/DesignSystems.tsx +7 -1
- package/corpus/templates/design/app/pages/Index.tsx +14 -2
- package/corpus/templates/design/app/pages/Present.tsx +16 -3
- package/corpus/templates/design/app/pages/Templates.tsx +10 -4
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +484 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +378 -0
- package/corpus/templates/design/app/pages/design-editor/design-data-geometry-utils.ts +138 -0
- package/corpus/templates/design/app/pages/design-editor/dom-utils.ts +15 -0
- package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +180 -0
- package/corpus/templates/design/app/pages/design-editor/html-layer-positioning.ts +226 -0
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +5 -1
- package/corpus/templates/design/app/pages/design-editor/png-export-render.ts +348 -0
- package/corpus/templates/design/app/pages/design-editor/screen-command-utils.ts +160 -0
- package/corpus/templates/design/app/pages/design-editor/text-edit-utils.ts +238 -0
- package/corpus/templates/design/app/pages/design-editor/tool-state.ts +23 -1
- package/corpus/templates/design/app/pages/design-editor/types.ts +25 -0
- package/corpus/templates/design/app/root.tsx +10 -1
- package/corpus/templates/design/changelog/2026-07-10-duplicating-a-design-can-no-longer-produce-a-copy-with-missi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-local-visual-edits-can-now-save-safe-leaf-text-class-and.md +6 -0
- package/corpus/templates/design/changelog/2026-07-11-canvas-context-menus-now-open-without-motion-jitter.md +6 -0
- package/corpus/templates/design/changelog/2026-07-11-design-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/design/changelog/2026-07-11-inspector-tooltips-appear-instantly-as-you-sweep-across-icon.md +6 -0
- package/corpus/templates/design/package.json +1 -1
- package/corpus/templates/design/shared/local-jsx-visual-edit.ts +388 -0
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +10 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +123 -0
- package/corpus/templates/dispatch/app/routes/integrations.tsx +163 -144
- package/corpus/templates/dispatch/changelog/2026-07-11-dispatch-mcp-connections-now-start-with-safer-app-access-and.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-11-overview-and-chat-now-share-a-cleaner-more-stable-flow.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-11-query-errors-now-show-a-retry-option.md +6 -0
- package/corpus/templates/dispatch/package.json +1 -2
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/forms/actions/patch-form-fields.ts +82 -44
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/forms/app/root.tsx +34 -8
- package/corpus/templates/forms/changelog/2026-07-10-simultaneous-edits-to-different-form-fields-no-longer-overwr.md +6 -0
- package/corpus/templates/forms/package.json +1 -2
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/macros/app/components/DailyProgress.tsx +25 -5
- package/corpus/templates/macros/app/components/QueryErrorState.tsx +31 -0
- package/corpus/templates/macros/app/components/WeightTracker.tsx +5 -1
- package/corpus/templates/macros/app/components/ui/button.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/progress.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/tabs.tsx +1 -1
- package/corpus/templates/macros/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/macros/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/macros/app/i18n/en-US.ts +2 -0
- package/corpus/templates/macros/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/macros/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/macros/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/macros/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/macros/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/macros/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/macros/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/macros/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/macros/app/routes/_index.tsx +22 -12
- package/corpus/templates/macros/app/routes/analytics.tsx +31 -10
- package/corpus/templates/macros/changelog/2026-07-11-daily-tracking-now-loads-and-updates-more-quickly.md +6 -0
- package/corpus/templates/macros/changelog/2026-07-11-data-load-failures-now-show-a-clear-error-with-a-retry-actio.md +6 -0
- package/corpus/templates/macros/package.json +1 -2
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/mail/.env.example +16 -11
- package/corpus/templates/mail/actions/list-emails.ts +39 -35
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +58 -6
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +35 -2
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +3 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +113 -104
- package/corpus/templates/mail/app/root.tsx +8 -10
- package/corpus/templates/mail/changelog/2026-07-10-fixed-calendar-rsvp-buttons-in-emails-firing-duplicate-respo.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-11-compose-and-navigation-motion-now-feel-faster-and-smoother.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-11-swipe-to-archive-or-snooze-now-responds-to-quick-flicks-not-.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-11-the-assistant-now-sees-the-same-inbox-you-do-snoozed-mail-st.md +6 -0
- package/corpus/templates/mail/package.json +1 -2
- package/corpus/templates/mail/server/handlers/emails.ts +25 -69
- package/corpus/templates/mail/server/lib/list-inbox-emails.ts +169 -0
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/plan/.env.example +4 -0
- package/corpus/templates/plan/actions/create-plan-design.ts +89 -81
- package/corpus/templates/plan/actions/create-prototype-plan.ts +72 -59
- package/corpus/templates/plan/actions/create-ui-plan.ts +70 -55
- package/corpus/templates/plan/actions/create-visual-plan.ts +65 -51
- package/corpus/templates/plan/actions/restore-plan-version.ts +126 -96
- package/corpus/templates/plan/actions/update-local-plan-folder.ts +43 -30
- package/corpus/templates/plan/actions/update-visual-plan.ts +81 -64
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +17 -0
- package/corpus/templates/plan/app/components/ui/tabs.tsx +1 -1
- package/corpus/templates/plan/app/i18n/ar-SA.ts +10 -0
- package/corpus/templates/plan/app/i18n/de-DE.ts +10 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +10 -0
- package/corpus/templates/plan/app/i18n/es-ES.ts +10 -0
- package/corpus/templates/plan/app/i18n/fr-FR.ts +10 -0
- package/corpus/templates/plan/app/i18n/hi-IN.ts +10 -0
- package/corpus/templates/plan/app/i18n/ja-JP.ts +10 -0
- package/corpus/templates/plan/app/i18n/ko-KR.ts +10 -0
- package/corpus/templates/plan/app/i18n/pt-BR.ts +10 -0
- package/corpus/templates/plan/app/i18n/zh-CN.ts +10 -0
- package/corpus/templates/plan/app/i18n/zh-TW.ts +10 -0
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +80 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +152 -4
- package/corpus/templates/plan/app/root.tsx +11 -0
- package/corpus/templates/plan/changelog/2026-07-10-restoring-a-plan-version-can-no-longer-leave-a-plan-half-res.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-11-local-plans-now-explain-and-recover-from-browser-permission-.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-11-plan-edits-now-save-atomically-and-can-no-longer-partially-a.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-11-plan-lists-now-show-a-clear-error-with-a-retry-action-when-t.md +6 -0
- package/corpus/templates/plan/package.json +1 -2
- package/corpus/templates/plan/server/plans.ts +9 -2
- package/corpus/templates/plan/shared/plan-content.ts +546 -260
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/slides/actions/delete-slide-comment.ts +49 -0
- package/corpus/templates/slides/actions/list-decks.ts +28 -0
- package/corpus/templates/slides/actions/update-slide-comment.ts +93 -0
- package/corpus/templates/slides/actions/view-screen.ts +14 -6
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +33 -10
- package/corpus/templates/slides/app/components/deck/MermaidRenderer.tsx +41 -26
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +4 -8
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +3 -5
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +5 -9
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +5 -12
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -2
- package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +3 -6
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -6
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +2 -5
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +4 -2
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +4 -3
- package/corpus/templates/slides/app/context/DeckContext.tsx +56 -4
- package/corpus/templates/slides/app/i18n/ar-SA.ts +6 -0
- package/corpus/templates/slides/app/i18n/de-DE.ts +6 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +6 -0
- package/corpus/templates/slides/app/i18n/es-ES.ts +6 -0
- package/corpus/templates/slides/app/i18n/fr-FR.ts +6 -0
- package/corpus/templates/slides/app/i18n/hi-IN.ts +6 -0
- package/corpus/templates/slides/app/i18n/ja-JP.ts +6 -0
- package/corpus/templates/slides/app/i18n/ko-KR.ts +6 -0
- package/corpus/templates/slides/app/i18n/pt-BR.ts +6 -0
- package/corpus/templates/slides/app/i18n/zh-CN.ts +5 -0
- package/corpus/templates/slides/app/i18n/zh-TW.ts +5 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +11 -30
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +23 -2
- package/corpus/templates/slides/app/pages/Index.tsx +31 -4
- package/corpus/templates/slides/app/root.tsx +0 -5
- package/corpus/templates/slides/changelog/2026-07-10-deck-lists-load-much-faster-and-no-longer-re-download-slide-.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-comment-load-failures-now-show-a-retry-action-instead-of-say.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-comment-pins-now-clear-with-a-faster-smoother-confirmation.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-deck-and-design-system-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-editor-toggles-and-toolbar-menus-now-animate-smoothly.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-the-assistant-can-now-resolve-reopen-and-delete-slide-commen.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-viewing-slides-no-longer-loads-every-deck-s-full-contents-in.md +6 -0
- package/corpus/templates/slides/package.json +1 -2
- package/corpus/templates/slides/server/routes/api/comments/[id].delete.ts +29 -48
- package/corpus/templates/slides/server/routes/api/comments/[id].patch.ts +29 -65
- package/dist/a2a/auth-policy.d.ts +19 -0
- package/dist/a2a/auth-policy.d.ts.map +1 -1
- package/dist/a2a/auth-policy.js +32 -0
- package/dist/a2a/auth-policy.js.map +1 -1
- package/dist/action.d.ts +23 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +13 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/durable-background.d.ts +8 -5
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +15 -8
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +3 -0
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/engine/context-directives-transform.d.ts +25 -0
- package/dist/agent/engine/context-directives-transform.d.ts.map +1 -0
- package/dist/agent/engine/context-directives-transform.js +53 -0
- package/dist/agent/engine/context-directives-transform.js.map +1 -0
- package/dist/agent/engine/continuation-dispatch-retry.d.ts +40 -0
- package/dist/agent/engine/continuation-dispatch-retry.d.ts.map +1 -0
- package/dist/agent/engine/continuation-dispatch-retry.js +109 -0
- package/dist/agent/engine/continuation-dispatch-retry.js.map +1 -0
- package/dist/agent/engine/tool-call-journal-seed.d.ts +46 -0
- package/dist/agent/engine/tool-call-journal-seed.d.ts.map +1 -0
- package/dist/agent/engine/tool-call-journal-seed.js +60 -0
- package/dist/agent/engine/tool-call-journal-seed.js.map +1 -0
- package/dist/agent/production-agent.d.ts +7 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +102 -222
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +9 -4
- package/dist/agent/run-store.js.map +1 -1
- package/dist/audit/actions/export-audit-events.d.ts +27 -0
- package/dist/audit/actions/export-audit-events.d.ts.map +1 -0
- package/dist/audit/actions/export-audit-events.js +144 -0
- package/dist/audit/actions/export-audit-events.js.map +1 -0
- package/dist/audit/store.d.ts +1 -0
- package/dist/audit/store.d.ts.map +1 -1
- package/dist/audit/store.js +8 -3
- package/dist/audit/store.js.map +1 -1
- package/dist/audit/types.d.ts +3 -0
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js.map +1 -1
- package/dist/cli/doctor.d.ts +83 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +281 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/index.js +50 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/info.js +3 -3
- package/dist/cli/info.js.map +1 -1
- package/dist/cli/package-lifecycle.d.ts +50 -0
- package/dist/cli/package-lifecycle.d.ts.map +1 -0
- package/dist/cli/package-lifecycle.js +560 -0
- package/dist/cli/package-lifecycle.js.map +1 -0
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +8 -2
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/skills-content/assets-skill.d.ts +2 -0
- package/dist/cli/skills-content/assets-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/assets-skill.js +84 -0
- package/dist/cli/skills-content/assets-skill.js.map +1 -0
- package/dist/cli/skills-content/canvas.d.ts +4 -0
- package/dist/cli/skills-content/canvas.d.ts.map +1 -0
- package/dist/cli/skills-content/canvas.js +152 -0
- package/dist/cli/skills-content/canvas.js.map +1 -0
- package/dist/cli/skills-content/connection.d.ts +2 -0
- package/dist/cli/skills-content/connection.d.ts.map +1 -0
- package/dist/cli/skills-content/connection.js +53 -0
- package/dist/cli/skills-content/connection.js.map +1 -0
- package/dist/cli/skills-content/content-skill.d.ts +2 -0
- package/dist/cli/skills-content/content-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/content-skill.js +110 -0
- package/dist/cli/skills-content/content-skill.js.map +1 -0
- package/dist/cli/skills-content/design-exploration-skill.d.ts +2 -0
- package/dist/cli/skills-content/design-exploration-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/design-exploration-skill.js +119 -0
- package/dist/cli/skills-content/design-exploration-skill.js.map +1 -0
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +2 -0
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/design-visual-edit-skill.js +229 -0
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -0
- package/dist/cli/skills-content/document-quality.d.ts +4 -0
- package/dist/cli/skills-content/document-quality.d.ts.map +1 -0
- package/dist/cli/skills-content/document-quality.js +195 -0
- package/dist/cli/skills-content/document-quality.js.map +1 -0
- package/dist/cli/skills-content/exemplar.d.ts +4 -0
- package/dist/cli/skills-content/exemplar.d.ts.map +1 -0
- package/dist/cli/skills-content/exemplar.js +68 -0
- package/dist/cli/skills-content/exemplar.js.map +1 -0
- package/dist/cli/skills-content/help.d.ts +2 -0
- package/dist/cli/skills-content/help.d.ts.map +1 -0
- package/dist/cli/skills-content/help.js +78 -0
- package/dist/cli/skills-content/help.js.map +1 -0
- package/dist/cli/skills-content/index.d.ts +23 -0
- package/dist/cli/skills-content/index.d.ts.map +1 -0
- package/dist/cli/skills-content/index.js +23 -0
- package/dist/cli/skills-content/index.js.map +1 -0
- package/dist/cli/skills-content/local-files.d.ts +2 -0
- package/dist/cli/skills-content/local-files.d.ts.map +1 -0
- package/dist/cli/skills-content/local-files.js +96 -0
- package/dist/cli/skills-content/local-files.js.map +1 -0
- package/dist/cli/skills-content/plan-setup-auth.d.ts +9 -0
- package/dist/cli/skills-content/plan-setup-auth.d.ts.map +1 -0
- package/dist/cli/skills-content/plan-setup-auth.js +81 -0
- package/dist/cli/skills-content/plan-setup-auth.js.map +1 -0
- package/dist/cli/skills-content/visual-plan-skill.d.ts +2 -0
- package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visual-plan-skill.js +471 -0
- package/dist/cli/skills-content/visual-plan-skill.js.map +1 -0
- package/dist/cli/skills-content/visual-recap-skill.d.ts +2 -0
- package/dist/cli/skills-content/visual-recap-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visual-recap-skill.js +548 -0
- package/dist/cli/skills-content/visual-recap-skill.js.map +1 -0
- package/dist/cli/skills-content/visualize-repo-skill.d.ts +2 -0
- package/dist/cli/skills-content/visualize-repo-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visualize-repo-skill.js +94 -0
- package/dist/cli/skills-content/visualize-repo-skill.js.map +1 -0
- package/dist/cli/skills-content/wireframe.d.ts +4 -0
- package/dist/cli/skills-content/wireframe.d.ts.map +1 -0
- package/dist/cli/skills-content/wireframe.js +347 -0
- package/dist/cli/skills-content/wireframe.js.map +1 -0
- package/dist/cli/skills.d.ts +2 -10
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +2 -2710
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +4 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +15 -3
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/FeedbackButton.js +2 -2
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/agent-chat-adapter.js +7 -3
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/app-providers.d.ts +13 -5
- package/dist/client/app-providers.d.ts.map +1 -1
- package/dist/client/app-providers.js +9 -6
- package/dist/client/app-providers.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +4 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +3 -3
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/composer/PastedTextChip.js +1 -1
- package/dist/client/composer/PastedTextChip.js.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts +3 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.js +35 -14
- package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +1 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/VoiceButton.d.ts +2 -0
- package/dist/client/composer/VoiceButton.d.ts.map +1 -1
- package/dist/client/composer/VoiceButton.js +9 -3
- package/dist/client/composer/VoiceButton.js.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.d.ts +5 -0
- package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.js +91 -12
- package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +4 -1
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/extensions/ExtensionEditor.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionEditor.js +15 -5
- package/dist/client/extensions/ExtensionEditor.js.map +1 -1
- package/dist/client/extensions/ExtensionQueryErrorState.d.ts +8 -0
- package/dist/client/extensions/ExtensionQueryErrorState.d.ts.map +1 -0
- package/dist/client/extensions/ExtensionQueryErrorState.js +11 -0
- package/dist/client/extensions/ExtensionQueryErrorState.js.map +1 -0
- package/dist/client/extensions/ExtensionSlot.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionSlot.js +17 -7
- package/dist/client/extensions/ExtensionSlot.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +17 -7
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.js +5 -3
- package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.js +21 -8
- package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
- package/dist/client/index.d.ts +0 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +0 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +7 -3
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +4 -0
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts +2 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +4 -0
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/tool-cells/EditCell.d.ts.map +1 -1
- package/dist/client/tool-cells/EditCell.js +2 -1
- package/dist/client/tool-cells/EditCell.js.map +1 -1
- package/dist/client/tool-cells/FilesChangedSummary.d.ts.map +1 -1
- package/dist/client/tool-cells/FilesChangedSummary.js +2 -1
- package/dist/client/tool-cells/FilesChangedSummary.js.map +1 -1
- package/dist/client/tool-cells/WriteCell.d.ts.map +1 -1
- package/dist/client/tool-cells/WriteCell.js +2 -1
- package/dist/client/tool-cells/WriteCell.js.map +1 -1
- package/dist/client/visual-style-controls.js +1 -1
- package/dist/client/visual-style-controls.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +36 -14
- package/dist/deploy/build.js.map +1 -1
- package/dist/guards/db-tool-scoping.d.ts +38 -0
- package/dist/guards/db-tool-scoping.d.ts.map +1 -0
- package/dist/guards/db-tool-scoping.js +114 -0
- package/dist/guards/db-tool-scoping.js.map +1 -0
- package/dist/guards/index.d.ts +23 -0
- package/dist/guards/index.d.ts.map +1 -0
- package/dist/guards/index.js +19 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/guards/no-drizzle-push.d.ts +14 -0
- package/dist/guards/no-drizzle-push.d.ts.map +1 -0
- package/dist/guards/no-drizzle-push.js +97 -0
- package/dist/guards/no-drizzle-push.js.map +1 -0
- package/dist/guards/no-env-credentials.d.ts +36 -0
- package/dist/guards/no-env-credentials.d.ts.map +1 -0
- package/dist/guards/no-env-credentials.js +204 -0
- package/dist/guards/no-env-credentials.js.map +1 -0
- package/dist/guards/no-env-mutation.d.ts +23 -0
- package/dist/guards/no-env-mutation.d.ts.map +1 -0
- package/dist/guards/no-env-mutation.js +90 -0
- package/dist/guards/no-env-mutation.js.map +1 -0
- package/dist/guards/no-localhost-fallback.d.ts +30 -0
- package/dist/guards/no-localhost-fallback.d.ts.map +1 -0
- package/dist/guards/no-localhost-fallback.js +105 -0
- package/dist/guards/no-localhost-fallback.js.map +1 -0
- package/dist/guards/no-unscoped-credentials.d.ts +28 -0
- package/dist/guards/no-unscoped-credentials.d.ts.map +1 -0
- package/dist/guards/no-unscoped-credentials.js +199 -0
- package/dist/guards/no-unscoped-credentials.js.map +1 -0
- package/dist/guards/no-unscoped-queries.d.ts +32 -0
- package/dist/guards/no-unscoped-queries.d.ts.map +1 -0
- package/dist/guards/no-unscoped-queries.js +720 -0
- package/dist/guards/no-unscoped-queries.js.map +1 -0
- package/dist/guards/scan-utils.d.ts +28 -0
- package/dist/guards/scan-utils.d.ts.map +1 -0
- package/dist/guards/scan-utils.js +92 -0
- package/dist/guards/scan-utils.js.map +1 -0
- package/dist/guards/types.d.ts +28 -0
- package/dist/guards/types.d.ts.map +1 -0
- package/dist/guards/types.js +11 -0
- package/dist/guards/types.js.map +1 -0
- package/dist/integrations/google-docs-poller.d.ts +7 -0
- package/dist/integrations/google-docs-poller.d.ts.map +1 -1
- package/dist/integrations/google-docs-poller.js +13 -3
- package/dist/integrations/google-docs-poller.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +10 -0
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts +11 -0
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +16 -4
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +12 -0
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +13 -3
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +7 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +8 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp/oauth-token.d.ts +1 -1
- package/dist/mcp/oauth-token.d.ts.map +1 -1
- package/dist/mcp/oauth-token.js +6 -1
- package/dist/mcp/oauth-token.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts.map +1 -1
- package/dist/observability/routes.js +32 -0
- package/dist/observability/routes.js.map +1 -1
- package/dist/observability/sentiment.d.ts +42 -0
- package/dist/observability/sentiment.d.ts.map +1 -0
- package/dist/observability/sentiment.js +196 -0
- package/dist/observability/sentiment.js.map +1 -0
- package/dist/observability/store.d.ts +5 -0
- package/dist/observability/store.d.ts.map +1 -1
- package/dist/observability/store.js +17 -0
- package/dist/observability/store.js.map +1 -1
- package/dist/observability/traces.d.ts +2 -0
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +42 -57
- package/dist/observability/traces.js.map +1 -1
- package/dist/observability/tracking-identity.d.ts +3 -0
- package/dist/observability/tracking-identity.d.ts.map +1 -0
- package/dist/observability/tracking-identity.js +51 -0
- package/dist/observability/tracking-identity.js.map +1 -0
- package/dist/observability/types.d.ts +10 -0
- package/dist/observability/types.d.ts.map +1 -1
- package/dist/observability/types.js +3 -0
- package/dist/observability/types.js.map +1 -1
- package/dist/org/accept-pending.d.ts.map +1 -1
- package/dist/org/accept-pending.js +9 -1
- package/dist/org/accept-pending.js.map +1 -1
- package/dist/org/migrations.d.ts +7 -2
- package/dist/org/migrations.d.ts.map +1 -1
- package/dist/org/migrations.js +41 -0
- package/dist/org/migrations.js.map +1 -1
- package/dist/package-lifecycle/index.d.ts +2 -0
- package/dist/package-lifecycle/index.d.ts.map +1 -0
- package/dist/package-lifecycle/index.js +2 -0
- package/dist/package-lifecycle/index.js.map +1 -0
- package/dist/package-lifecycle/manifest.d.ts +24 -0
- package/dist/package-lifecycle/manifest.d.ts.map +1 -0
- package/dist/package-lifecycle/manifest.js +81 -0
- package/dist/package-lifecycle/manifest.js.map +1 -0
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/provider-api/custom-registry.d.ts +32 -1
- package/dist/provider-api/custom-registry.d.ts.map +1 -1
- package/dist/provider-api/custom-registry.js +41 -1
- package/dist/provider-api/custom-registry.js.map +1 -1
- package/dist/provider-api/index.d.ts +1 -1
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +1 -1
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/storage.d.ts +6 -0
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +105 -29
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +4 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +50 -0
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -0
- package/dist/server/agent-chat/action-filters-a2a.js +127 -0
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -0
- package/dist/server/agent-chat/browser-team-tools.d.ts +21 -0
- package/dist/server/agent-chat/browser-team-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/browser-team-tools.js +417 -0
- package/dist/server/agent-chat/browser-team-tools.js.map +1 -0
- package/dist/server/agent-chat/context-tools.d.ts +33 -0
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/context-tools.js +520 -0
- package/dist/server/agent-chat/context-tools.js.map +1 -0
- package/dist/server/agent-chat/framework-prompts.d.ts +65 -0
- package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -0
- package/dist/server/agent-chat/framework-prompts.js +403 -0
- package/dist/server/agent-chat/framework-prompts.js.map +1 -0
- package/dist/server/agent-chat/lazy-fs.d.ts +2 -0
- package/dist/server/agent-chat/lazy-fs.d.ts.map +1 -0
- package/dist/server/agent-chat/lazy-fs.js +11 -0
- package/dist/server/agent-chat/lazy-fs.js.map +1 -0
- package/dist/server/agent-chat/mcp-glue.d.ts +9 -0
- package/dist/server/agent-chat/mcp-glue.d.ts.map +1 -0
- package/dist/server/agent-chat/mcp-glue.js +63 -0
- package/dist/server/agent-chat/mcp-glue.js.map +1 -0
- package/dist/server/agent-chat/plugin-options.d.ts +322 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -0
- package/dist/server/agent-chat/plugin-options.js +2 -0
- package/dist/server/agent-chat/plugin-options.js.map +1 -0
- package/dist/server/agent-chat/process-run-failure.d.ts +12 -0
- package/dist/server/agent-chat/process-run-failure.d.ts.map +1 -0
- package/dist/server/agent-chat/process-run-failure.js +24 -0
- package/dist/server/agent-chat/process-run-failure.js.map +1 -0
- package/dist/server/agent-chat/prompt-resources.d.ts +28 -0
- package/dist/server/agent-chat/prompt-resources.d.ts.map +1 -0
- package/dist/server/agent-chat/prompt-resources.js +514 -0
- package/dist/server/agent-chat/prompt-resources.js.map +1 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.d.ts +5 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.d.ts.map +1 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.js +53 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.js.map +1 -0
- package/dist/server/agent-chat/request-surface.d.ts +8 -0
- package/dist/server/agent-chat/request-surface.d.ts.map +1 -0
- package/dist/server/agent-chat/request-surface.js +56 -0
- package/dist/server/agent-chat/request-surface.js.map +1 -0
- package/dist/server/agent-chat/run-code-tools.d.ts +17 -0
- package/dist/server/agent-chat/run-code-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/run-code-tools.js +55 -0
- package/dist/server/agent-chat/run-code-tools.js.map +1 -0
- package/dist/server/agent-chat/script-entries.d.ts +47 -0
- package/dist/server/agent-chat/script-entries.d.ts.map +1 -0
- package/dist/server/agent-chat/script-entries.js +633 -0
- package/dist/server/agent-chat/script-entries.js.map +1 -0
- package/dist/server/agent-chat/shared-thread.d.ts +33 -0
- package/dist/server/agent-chat/shared-thread.d.ts.map +1 -0
- package/dist/server/agent-chat/shared-thread.js +242 -0
- package/dist/server/agent-chat/shared-thread.js.map +1 -0
- package/dist/server/agent-chat/skill-frontmatter.d.ts +7 -0
- package/dist/server/agent-chat/skill-frontmatter.d.ts.map +1 -0
- package/dist/server/agent-chat/skill-frontmatter.js +26 -0
- package/dist/server/agent-chat/skill-frontmatter.js.map +1 -0
- package/dist/server/agent-chat-plugin.d.ts +45 -486
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +217 -3015
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-teams.d.ts +10 -0
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +13 -3
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +50 -52
- package/dist/server/auth.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +23 -12
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +22 -21
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/csrf.js +18 -5
- package/dist/server/csrf.js.map +1 -1
- package/dist/server/edge.d.ts +1 -0
- package/dist/server/edge.d.ts.map +1 -1
- package/dist/server/edge.js +1 -0
- package/dist/server/edge.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +34 -0
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/google-realtime-session.d.ts.map +1 -1
- package/dist/server/google-realtime-session.js +2 -34
- package/dist/server/google-realtime-session.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +1 -16
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/poll.d.ts.map +1 -1
- package/dist/server/poll.js +24 -2
- package/dist/server/poll.js.map +1 -1
- package/dist/server/realtime-voice.d.ts +3 -0
- package/dist/server/realtime-voice.d.ts.map +1 -1
- package/dist/server/realtime-voice.js +38 -5
- package/dist/server/realtime-voice.js.map +1 -1
- package/dist/server/request-origin.d.ts +10 -0
- package/dist/server/request-origin.d.ts.map +1 -0
- package/dist/server/request-origin.js +63 -0
- package/dist/server/request-origin.js.map +1 -0
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +47 -2
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts.map +1 -1
- package/dist/server/transcribe-voice.js +2 -48
- package/dist/server/transcribe-voice.js.map +1 -1
- package/dist/sharing/access.d.ts +63 -3
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +53 -15
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/registry.d.ts +7 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/styles/agent-native.css +15 -14
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/dist/templates/default/app/i18n/ar-SA.ts +6 -0
- package/dist/templates/default/app/i18n/de-DE.ts +6 -0
- package/dist/templates/default/app/i18n/en-US.ts +6 -0
- package/dist/templates/default/app/i18n/es-ES.ts +6 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +6 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +6 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +6 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +6 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +6 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +6 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +6 -0
- package/dist/templates/default/package.json +2 -2
- package/dist/templates/headless/package.json +0 -1
- package/dist/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/dist/templates/workspace-core/package.json +0 -1
- package/dist/templates/workspace-core/src/server/index.ts +4 -2
- package/dist/templates/workspace-root/package.json +0 -1
- package/dist/testing.d.ts +16 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +16 -0
- package/dist/testing.js.map +1 -0
- package/dist/triggers/actions.d.ts.map +1 -1
- package/dist/triggers/actions.js +8 -3
- package/dist/triggers/actions.js.map +1 -1
- package/dist/triggers/dispatcher.d.ts +7 -0
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +13 -3
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/triggers/types.d.ts +7 -1
- package/dist/triggers/types.d.ts.map +1 -1
- package/dist/triggers/types.js.map +1 -1
- package/dist/vite/client.d.ts +16 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +105 -2
- package/dist/vite/client.js.map +1 -1
- package/docs/content/audit-log.mdx +2 -1
- package/docs/content/authentication.mdx +3 -3
- package/docs/content/automations.mdx +7 -7
- package/docs/content/creating-templates.mdx +1 -1
- package/docs/content/doctor.mdx +170 -0
- package/docs/content/external-agents.mdx +8 -7
- package/docs/content/internationalization.mdx +2 -1
- package/docs/content/locales/ar-SA/audit-log.mdx +2 -1
- package/docs/content/locales/ar-SA/authentication.mdx +2 -2
- package/docs/content/locales/ar-SA/automations.mdx +7 -7
- package/docs/content/locales/ar-SA/external-agents.mdx +8 -7
- package/docs/content/locales/ar-SA/getting-started.mdx +7 -1
- package/docs/content/locales/ar-SA/internationalization.mdx +1 -1
- package/docs/content/locales/ar-SA/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ar-SA/package-lifecycle.mdx +19 -0
- package/docs/content/locales/ar-SA/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/ar-SA/security.mdx +10 -0
- package/docs/content/locales/de-DE/audit-log.mdx +2 -1
- package/docs/content/locales/de-DE/authentication.mdx +1 -1
- package/docs/content/locales/de-DE/automations.mdx +7 -7
- package/docs/content/locales/de-DE/external-agents.mdx +8 -7
- package/docs/content/locales/de-DE/getting-started.mdx +7 -1
- package/docs/content/locales/de-DE/internationalization.mdx +1 -1
- package/docs/content/locales/de-DE/mcp-protocol.mdx +1 -1
- package/docs/content/locales/de-DE/package-lifecycle.mdx +22 -0
- package/docs/content/locales/de-DE/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/de-DE/security.mdx +10 -0
- package/docs/content/locales/es-ES/audit-log.mdx +2 -1
- package/docs/content/locales/es-ES/authentication.mdx +2 -2
- package/docs/content/locales/es-ES/automations.mdx +7 -7
- package/docs/content/locales/es-ES/external-agents.mdx +8 -7
- package/docs/content/locales/es-ES/getting-started.mdx +7 -1
- package/docs/content/locales/es-ES/internationalization.mdx +1 -1
- package/docs/content/locales/es-ES/mcp-protocol.mdx +1 -1
- package/docs/content/locales/es-ES/package-lifecycle.mdx +22 -0
- package/docs/content/locales/es-ES/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/es-ES/security.mdx +10 -0
- package/docs/content/locales/fr-FR/audit-log.mdx +2 -1
- package/docs/content/locales/fr-FR/authentication.mdx +1 -1
- package/docs/content/locales/fr-FR/automations.mdx +7 -7
- package/docs/content/locales/fr-FR/external-agents.mdx +8 -7
- package/docs/content/locales/fr-FR/getting-started.mdx +7 -1
- package/docs/content/locales/fr-FR/internationalization.mdx +1 -1
- package/docs/content/locales/fr-FR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/fr-FR/package-lifecycle.mdx +21 -0
- package/docs/content/locales/fr-FR/sandbox-adapters.mdx +19 -8
- package/docs/content/locales/fr-FR/security.mdx +10 -0
- package/docs/content/locales/hi-IN/audit-log.mdx +2 -1
- package/docs/content/locales/hi-IN/authentication.mdx +2 -2
- package/docs/content/locales/hi-IN/automations.mdx +7 -7
- package/docs/content/locales/hi-IN/external-agents.mdx +8 -7
- package/docs/content/locales/hi-IN/getting-started.mdx +7 -1
- package/docs/content/locales/hi-IN/internationalization.mdx +1 -1
- package/docs/content/locales/hi-IN/mcp-protocol.mdx +1 -1
- package/docs/content/locales/hi-IN/package-lifecycle.mdx +20 -0
- package/docs/content/locales/hi-IN/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/hi-IN/security.mdx +10 -0
- package/docs/content/locales/ja-JP/audit-log.mdx +2 -1
- package/docs/content/locales/ja-JP/authentication.mdx +2 -2
- package/docs/content/locales/ja-JP/automations.mdx +7 -7
- package/docs/content/locales/ja-JP/external-agents.mdx +8 -7
- package/docs/content/locales/ja-JP/getting-started.mdx +7 -1
- package/docs/content/locales/ja-JP/internationalization.mdx +1 -1
- package/docs/content/locales/ja-JP/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ja-JP/package-lifecycle.mdx +21 -0
- package/docs/content/locales/ja-JP/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/ja-JP/security.mdx +10 -0
- package/docs/content/locales/ko-KR/audit-log.mdx +2 -1
- package/docs/content/locales/ko-KR/authentication.mdx +2 -2
- package/docs/content/locales/ko-KR/automations.mdx +7 -7
- package/docs/content/locales/ko-KR/external-agents.mdx +8 -7
- package/docs/content/locales/ko-KR/getting-started.mdx +7 -1
- package/docs/content/locales/ko-KR/internationalization.mdx +1 -1
- package/docs/content/locales/ko-KR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ko-KR/package-lifecycle.mdx +20 -0
- package/docs/content/locales/ko-KR/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/ko-KR/security.mdx +10 -0
- package/docs/content/locales/pt-BR/audit-log.mdx +2 -1
- package/docs/content/locales/pt-BR/authentication.mdx +2 -2
- package/docs/content/locales/pt-BR/automations.mdx +7 -7
- package/docs/content/locales/pt-BR/external-agents.mdx +8 -7
- package/docs/content/locales/pt-BR/getting-started.mdx +7 -1
- package/docs/content/locales/pt-BR/internationalization.mdx +1 -1
- package/docs/content/locales/pt-BR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/pt-BR/package-lifecycle.mdx +21 -0
- package/docs/content/locales/pt-BR/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/pt-BR/security.mdx +10 -0
- package/docs/content/locales/zh-CN/audit-log.mdx +2 -1
- package/docs/content/locales/zh-CN/authentication.mdx +2 -2
- package/docs/content/locales/zh-CN/automations.mdx +7 -7
- package/docs/content/locales/zh-CN/external-agents.mdx +8 -7
- package/docs/content/locales/zh-CN/getting-started.mdx +6 -4
- package/docs/content/locales/zh-CN/internationalization.mdx +1 -1
- package/docs/content/locales/zh-CN/mcp-protocol.mdx +1 -1
- package/docs/content/locales/zh-CN/package-lifecycle.mdx +19 -0
- package/docs/content/locales/zh-CN/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/zh-CN/security.mdx +10 -0
- package/docs/content/locales/zh-TW/audit-log.mdx +2 -1
- package/docs/content/locales/zh-TW/authentication.mdx +2 -2
- package/docs/content/locales/zh-TW/automations.mdx +7 -7
- package/docs/content/locales/zh-TW/external-agents.mdx +8 -7
- package/docs/content/locales/zh-TW/getting-started.mdx +6 -4
- package/docs/content/locales/zh-TW/internationalization.mdx +1 -1
- package/docs/content/locales/zh-TW/mcp-protocol.mdx +1 -1
- package/docs/content/locales/zh-TW/package-lifecycle.mdx +19 -0
- package/docs/content/locales/zh-TW/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/zh-TW/security.mdx +10 -0
- package/docs/content/mcp-protocol.mdx +1 -1
- package/docs/content/package-lifecycle.mdx +51 -0
- package/docs/content/sandbox-adapters.mdx +16 -5
- package/docs/content/security.mdx +2 -0
- package/package.json +14 -3
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/src/templates/default/app/i18n/ar-SA.ts +6 -0
- package/src/templates/default/app/i18n/de-DE.ts +6 -0
- package/src/templates/default/app/i18n/en-US.ts +6 -0
- package/src/templates/default/app/i18n/es-ES.ts +6 -0
- package/src/templates/default/app/i18n/fr-FR.ts +6 -0
- package/src/templates/default/app/i18n/hi-IN.ts +6 -0
- package/src/templates/default/app/i18n/ja-JP.ts +6 -0
- package/src/templates/default/app/i18n/ko-KR.ts +6 -0
- package/src/templates/default/app/i18n/pt-BR.ts +6 -0
- package/src/templates/default/app/i18n/zh-CN.ts +6 -0
- package/src/templates/default/app/i18n/zh-TW.ts +6 -0
- package/src/templates/default/package.json +2 -2
- package/src/templates/headless/package.json +0 -1
- package/src/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/src/templates/workspace-core/package.json +0 -1
- package/src/templates/workspace-core/src/server/index.ts +4 -2
- package/src/templates/workspace-root/package.json +0 -1
- package/corpus/core/src/client/ProductionAgentPanel.tsx +0 -9
- package/corpus/core/src/client/auth-redirect-url.ts +0 -23
- package/corpus/core/src/client/useProductionAgent.ts +0 -253
- package/corpus/core/src/shared/auth-redirect-url.ts +0 -1
- package/corpus/templates/analytics/app/pages/Index.tsx +0 -16
- package/corpus/templates/analytics/seeds/dashboards/agent-observability-llm.json +0 -173
- package/corpus/templates/slides/app/components/ui/toast.tsx +0 -1
- package/corpus/templates/slides/app/components/ui/toaster.tsx +0 -1
- package/corpus/templates/slides/app/hooks/use-toast.ts +0 -1
- package/dist/client/ProductionAgentPanel.d.ts +0 -6
- package/dist/client/ProductionAgentPanel.d.ts.map +0 -1
- package/dist/client/ProductionAgentPanel.js +0 -6
- package/dist/client/ProductionAgentPanel.js.map +0 -1
- package/dist/client/auth-redirect-url.d.ts +0 -2
- package/dist/client/auth-redirect-url.d.ts.map +0 -1
- package/dist/client/auth-redirect-url.js +0 -19
- package/dist/client/auth-redirect-url.js.map +0 -1
- package/dist/client/useProductionAgent.d.ts +0 -24
- package/dist/client/useProductionAgent.d.ts.map +0 -1
- package/dist/client/useProductionAgent.js +0 -179
- package/dist/client/useProductionAgent.js.map +0 -1
- package/dist/shared/auth-redirect-url.d.ts +0 -2
- package/dist/shared/auth-redirect-url.d.ts.map +0 -1
- package/dist/shared/auth-redirect-url.js +0 -2
- package/dist/shared/auth-redirect-url.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scanEnvMutation — ported from `scripts/guard-no-env-mutation.mjs`.
|
|
3
|
+
*
|
|
4
|
+
* Refuse to let production code MUTATE `process.env` (e.g.
|
|
5
|
+
* `process.env.AGENT_USER_EMAIL = userEmail`). `process.env` is
|
|
6
|
+
* process-scoped, not request-scoped — on serverless, every warm container
|
|
7
|
+
* handles many concurrent requests in one Node process, so mutating
|
|
8
|
+
* `process.env` in a request handler leaks state across requests. Use
|
|
9
|
+
* `runWithRequestContext` instead.
|
|
10
|
+
*
|
|
11
|
+
* Conditional guard — per report 005's V1 guard set table: the original
|
|
12
|
+
* has 9 `ALLOWED_PATH_PREDICATES`; 4 are monorepo-only
|
|
13
|
+
* (`packages/core/src/dev`, `templates/*\/test(s)/`, `packages/cli/`,
|
|
14
|
+
* `packages/create-agent-native/`) and dropped here. The 5 portable ones
|
|
15
|
+
* (`scripts/**`, `*.spec.*`, `*.test.*`, `/cli/`, `/scaffold/`) are kept
|
|
16
|
+
* verbatim — they already work unmodified for a generated app.
|
|
17
|
+
*
|
|
18
|
+
* Opt-out (same line, or the line immediately above):
|
|
19
|
+
* process.env.X = y // guard:allow-env-mutation — short reason
|
|
20
|
+
*/
|
|
21
|
+
import type { GuardResult, GuardScanOptions } from "./types.js";
|
|
22
|
+
export declare function scanEnvMutation(options: GuardScanOptions): GuardResult;
|
|
23
|
+
//# sourceMappingURL=no-env-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-env-mutation.d.ts","sourceRoot":"","sources":["../../src/guards/no-env-mutation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AASH,OAAO,KAAK,EAAgB,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AA+C9E,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,WAAW,CAsCtE"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scanEnvMutation — ported from `scripts/guard-no-env-mutation.mjs`.
|
|
3
|
+
*
|
|
4
|
+
* Refuse to let production code MUTATE `process.env` (e.g.
|
|
5
|
+
* `process.env.AGENT_USER_EMAIL = userEmail`). `process.env` is
|
|
6
|
+
* process-scoped, not request-scoped — on serverless, every warm container
|
|
7
|
+
* handles many concurrent requests in one Node process, so mutating
|
|
8
|
+
* `process.env` in a request handler leaks state across requests. Use
|
|
9
|
+
* `runWithRequestContext` instead.
|
|
10
|
+
*
|
|
11
|
+
* Conditional guard — per report 005's V1 guard set table: the original
|
|
12
|
+
* has 9 `ALLOWED_PATH_PREDICATES`; 4 are monorepo-only
|
|
13
|
+
* (`packages/core/src/dev`, `templates/*\/test(s)/`, `packages/cli/`,
|
|
14
|
+
* `packages/create-agent-native/`) and dropped here. The 5 portable ones
|
|
15
|
+
* (`scripts/**`, `*.spec.*`, `*.test.*`, `/cli/`, `/scaffold/`) are kept
|
|
16
|
+
* verbatim — they already work unmodified for a generated app.
|
|
17
|
+
*
|
|
18
|
+
* Opt-out (same line, or the line immediately above):
|
|
19
|
+
* process.env.X = y // guard:allow-env-mutation — short reason
|
|
20
|
+
*/
|
|
21
|
+
import { isCommentLine, lineColForOffset, readFileSafe, relPosix, walk, } from "./scan-utils.js";
|
|
22
|
+
const ALLOWED_PATH_PREDICATES = [
|
|
23
|
+
(rel) => /^scripts\//.test(rel),
|
|
24
|
+
(rel) => /\.spec\.[tj]sx?$/.test(rel),
|
|
25
|
+
(rel) => /\.test\.[tj]sx?$/.test(rel),
|
|
26
|
+
(rel) => /\/cli\//.test(rel),
|
|
27
|
+
(rel) => /\/scaffold\//.test(rel),
|
|
28
|
+
];
|
|
29
|
+
const OPT_OUT_MARKER = /\/\/\s*guard:allow-env-mutation\b[^\n]*/;
|
|
30
|
+
const OPT_OUT_REQUIRES_REASON = /\/\/\s*guard:allow-env-mutation\s*[—-]\s*\S/;
|
|
31
|
+
const ASSIGN_TAIL = String.raw `(?:\s*(?:=(?!=)|\+=|-=|\*=|/=|\?\?=|\|\|=|&&=))`;
|
|
32
|
+
const MEMBER_FORM = new RegExp(String.raw `process\.env\.[A-Z_][A-Z0-9_]*${ASSIGN_TAIL}`, "g");
|
|
33
|
+
const BRACKET_FORM = new RegExp(String.raw `process\.env\[\s*["'][A-Z_][A-Z0-9_]+["']\s*\]${ASSIGN_TAIL}`, "g");
|
|
34
|
+
const DELETE_MEMBER_FORM = new RegExp(String.raw `\bdelete\s+process\.env\.[A-Z_][A-Z0-9_]*\b`, "g");
|
|
35
|
+
const DELETE_BRACKET_FORM = new RegExp(String.raw `\bdelete\s+process\.env\[\s*["'][A-Z_][A-Z0-9_]+["']\s*\]`, "g");
|
|
36
|
+
function isAllowedPath(rel) {
|
|
37
|
+
return ALLOWED_PATH_PREDICATES.some((p) => p(rel));
|
|
38
|
+
}
|
|
39
|
+
function hasValidOptOut(lines, lineIdx) {
|
|
40
|
+
const cur = lines[lineIdx] ?? "";
|
|
41
|
+
if (OPT_OUT_MARKER.test(cur)) {
|
|
42
|
+
return OPT_OUT_REQUIRES_REASON.test(cur);
|
|
43
|
+
}
|
|
44
|
+
const prev = lines[lineIdx - 1] ?? "";
|
|
45
|
+
if (/^\s*\/\//.test(prev) && OPT_OUT_MARKER.test(prev)) {
|
|
46
|
+
return OPT_OUT_REQUIRES_REASON.test(prev);
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
export function scanEnvMutation(options) {
|
|
51
|
+
const { root } = options;
|
|
52
|
+
const findings = [];
|
|
53
|
+
for (const file of walk(root)) {
|
|
54
|
+
if (!/\.(ts|tsx|mts|cts|js|mjs|cjs)$/.test(file))
|
|
55
|
+
continue;
|
|
56
|
+
if (file.endsWith(".d.ts"))
|
|
57
|
+
continue;
|
|
58
|
+
const rel = relPosix(root, file);
|
|
59
|
+
if (isAllowedPath(rel))
|
|
60
|
+
continue;
|
|
61
|
+
const contents = readFileSafe(file);
|
|
62
|
+
if (contents === null || !contents.includes("process.env"))
|
|
63
|
+
continue;
|
|
64
|
+
const lines = contents.split("\n");
|
|
65
|
+
for (const re of [
|
|
66
|
+
MEMBER_FORM,
|
|
67
|
+
BRACKET_FORM,
|
|
68
|
+
DELETE_MEMBER_FORM,
|
|
69
|
+
DELETE_BRACKET_FORM,
|
|
70
|
+
]) {
|
|
71
|
+
re.lastIndex = 0;
|
|
72
|
+
let m;
|
|
73
|
+
while ((m = re.exec(contents)) !== null) {
|
|
74
|
+
const { line } = lineColForOffset(contents, m.index);
|
|
75
|
+
const lineText = lines[line - 1] ?? "";
|
|
76
|
+
if (isCommentLine(lineText))
|
|
77
|
+
continue;
|
|
78
|
+
if (hasValidOptOut(lines, line - 1))
|
|
79
|
+
continue;
|
|
80
|
+
findings.push({
|
|
81
|
+
file: rel,
|
|
82
|
+
line,
|
|
83
|
+
message: `process.env mutated in production code: ${lineText.trim()}. process.env is process-scoped, not request-scoped — use runWithRequestContext instead.`,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return { name: "no-env-mutation", findings };
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=no-env-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-env-mutation.js","sourceRoot":"","sources":["../../src/guards/no-env-mutation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,IAAI,GACL,MAAM,iBAAiB,CAAC;AAGzB,MAAM,uBAAuB,GAAoC;IAC/D,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;IAC/B,CAAC,GAAG,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;IACrC,CAAC,GAAG,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;IACrC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;IAC5B,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc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AI,GAAG,CAAC,CAAC;oBAAE,SAAS;gBAC9C,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,GAAG;oBACT,IAAI;oBACJ,OAAO,EAAE,2CAA2C,QAAQ,CAAC,IAAI,EAAE,0FAA0F;iBAC9J,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC;AAC/C,CAAC","sourcesContent":["/**\n * scanEnvMutation — ported from `scripts/guard-no-env-mutation.mjs`.\n *\n * Refuse to let production code MUTATE `process.env` (e.g.\n * `process.env.AGENT_USER_EMAIL = userEmail`). `process.env` is\n * process-scoped, not request-scoped — on serverless, every warm container\n * handles many concurrent requests in one Node process, so mutating\n * `process.env` in a request handler leaks state across requests. Use\n * `runWithRequestContext` instead.\n *\n * Conditional guard — per report 005's V1 guard set table: the original\n * has 9 `ALLOWED_PATH_PREDICATES`; 4 are monorepo-only\n * (`packages/core/src/dev`, `templates/*\\/test(s)/`, `packages/cli/`,\n * `packages/create-agent-native/`) and dropped here. The 5 portable ones\n * (`scripts/**`, `*.spec.*`, `*.test.*`, `/cli/`, `/scaffold/`) are kept\n * verbatim — they already work unmodified for a generated app.\n *\n * Opt-out (same line, or the line immediately above):\n * process.env.X = y // guard:allow-env-mutation — short reason\n */\n\nimport {\n isCommentLine,\n lineColForOffset,\n readFileSafe,\n relPosix,\n walk,\n} from \"./scan-utils.js\";\nimport type { GuardFinding, GuardResult, GuardScanOptions } from \"./types.js\";\n\nconst ALLOWED_PATH_PREDICATES: Array<(rel: string) => boolean> = [\n (rel) => /^scripts\\//.test(rel),\n (rel) => /\\.spec\\.[tj]sx?$/.test(rel),\n (rel) => /\\.test\\.[tj]sx?$/.test(rel),\n (rel) => /\\/cli\\//.test(rel),\n (rel) => /\\/scaffold\\//.test(rel),\n];\n\nconst OPT_OUT_MARKER = /\\/\\/\\s*guard:allow-env-mutation\\b[^\\n]*/;\nconst OPT_OUT_REQUIRES_REASON = /\\/\\/\\s*guard:allow-env-mutation\\s*[—-]\\s*\\S/;\n\nconst ASSIGN_TAIL = String.raw`(?:\\s*(?:=(?!=)|\\+=|-=|\\*=|/=|\\?\\?=|\\|\\|=|&&=))`;\nconst MEMBER_FORM = new RegExp(\n String.raw`process\\.env\\.[A-Z_][A-Z0-9_]*${ASSIGN_TAIL}`,\n \"g\",\n);\nconst BRACKET_FORM = new RegExp(\n String.raw`process\\.env\\[\\s*[\"'][A-Z_][A-Z0-9_]+[\"']\\s*\\]${ASSIGN_TAIL}`,\n \"g\",\n);\nconst DELETE_MEMBER_FORM = new RegExp(\n String.raw`\\bdelete\\s+process\\.env\\.[A-Z_][A-Z0-9_]*\\b`,\n \"g\",\n);\nconst DELETE_BRACKET_FORM = new RegExp(\n String.raw`\\bdelete\\s+process\\.env\\[\\s*[\"'][A-Z_][A-Z0-9_]+[\"']\\s*\\]`,\n \"g\",\n);\n\nfunction isAllowedPath(rel: string): boolean {\n return ALLOWED_PATH_PREDICATES.some((p) => p(rel));\n}\n\nfunction hasValidOptOut(lines: string[], lineIdx: number): boolean {\n const cur = lines[lineIdx] ?? \"\";\n if (OPT_OUT_MARKER.test(cur)) {\n return OPT_OUT_REQUIRES_REASON.test(cur);\n }\n const prev = lines[lineIdx - 1] ?? \"\";\n if (/^\\s*\\/\\//.test(prev) && OPT_OUT_MARKER.test(prev)) {\n return OPT_OUT_REQUIRES_REASON.test(prev);\n }\n return false;\n}\n\nexport function scanEnvMutation(options: GuardScanOptions): GuardResult {\n const { root } = options;\n const findings: GuardFinding[] = [];\n\n for (const file of walk(root)) {\n if (!/\\.(ts|tsx|mts|cts|js|mjs|cjs)$/.test(file)) continue;\n if (file.endsWith(\".d.ts\")) continue;\n const rel = relPosix(root, file);\n if (isAllowedPath(rel)) continue;\n\n const contents = readFileSafe(file);\n if (contents === null || !contents.includes(\"process.env\")) continue;\n\n const lines = contents.split(\"\\n\");\n\n for (const re of [\n MEMBER_FORM,\n BRACKET_FORM,\n DELETE_MEMBER_FORM,\n DELETE_BRACKET_FORM,\n ]) {\n re.lastIndex = 0;\n let m: RegExpExecArray | null;\n while ((m = re.exec(contents)) !== null) {\n const { line } = lineColForOffset(contents, m.index);\n const lineText = lines[line - 1] ?? \"\";\n if (isCommentLine(lineText)) continue;\n if (hasValidOptOut(lines, line - 1)) continue;\n findings.push({\n file: rel,\n line,\n message: `process.env mutated in production code: ${lineText.trim()}. process.env is process-scoped, not request-scoped — use runWithRequestContext instead.`,\n });\n }\n }\n }\n\n return { name: \"no-env-mutation\", findings };\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scanLocalhostFallback — ported from
|
|
3
|
+
* `scripts/guard-no-localhost-fallback.mjs`.
|
|
4
|
+
*
|
|
5
|
+
* Refuse to let production code use the literal `local@localhost` (or the
|
|
6
|
+
* `DEV_MODE_USER_EMAIL` symbolic alias) as a fallback identity when no
|
|
7
|
+
* session is present — that pools every unauthenticated request onto one
|
|
8
|
+
* shared tenant. The right behavior in production is to throw/401 when
|
|
9
|
+
* there's no session, not fall back to a sentinel identity.
|
|
10
|
+
*
|
|
11
|
+
* Conditional guard — per report 005's V1 guard set table: the original
|
|
12
|
+
* hardcodes framework-file exemptions (`packages/core/src/server/auth.ts`,
|
|
13
|
+
* `packages/core/src/org/context.ts`, etc. — files that either define or
|
|
14
|
+
* intentionally handle the dev-mode sentinel). Those live in `node_modules`
|
|
15
|
+
* for a generated app and are already excluded by `SKIP_DIRS`, so they're
|
|
16
|
+
* moved behind an optional `extraExemptPaths` param (default `[]`) instead
|
|
17
|
+
* of hardcoded. The generic allowlist predicates (`*.spec.*`, `*.test.*`,
|
|
18
|
+
* `scripts/**`, `**\/seed(s)/**`) are kept verbatim.
|
|
19
|
+
*
|
|
20
|
+
* Opt-out (same line, or the line immediately above):
|
|
21
|
+
* const x = email ?? "local@localhost" // guard:allow-localhost-fallback — short reason
|
|
22
|
+
*/
|
|
23
|
+
import type { GuardResult, GuardScanOptions } from "./types.js";
|
|
24
|
+
export interface LocalhostFallbackOptions extends GuardScanOptions {
|
|
25
|
+
/** Exact repo-relative paths to exempt in addition to the generic
|
|
26
|
+
* predicates (spec/test/scripts/seed). Default `[]`. */
|
|
27
|
+
extraExemptPaths?: string[];
|
|
28
|
+
}
|
|
29
|
+
export declare function scanLocalhostFallback(options: LocalhostFallbackOptions): GuardResult;
|
|
30
|
+
//# sourceMappingURL=no-localhost-fallback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-localhost-fallback.d.ts","sourceRoot":"","sources":["../../src/guards/no-localhost-fallback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AASH,OAAO,KAAK,EAAgB,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9E,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE;4DACwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAsCD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,wBAAwB,GAChC,WAAW,CA+Cb"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scanLocalhostFallback — ported from
|
|
3
|
+
* `scripts/guard-no-localhost-fallback.mjs`.
|
|
4
|
+
*
|
|
5
|
+
* Refuse to let production code use the literal `local@localhost` (or the
|
|
6
|
+
* `DEV_MODE_USER_EMAIL` symbolic alias) as a fallback identity when no
|
|
7
|
+
* session is present — that pools every unauthenticated request onto one
|
|
8
|
+
* shared tenant. The right behavior in production is to throw/401 when
|
|
9
|
+
* there's no session, not fall back to a sentinel identity.
|
|
10
|
+
*
|
|
11
|
+
* Conditional guard — per report 005's V1 guard set table: the original
|
|
12
|
+
* hardcodes framework-file exemptions (`packages/core/src/server/auth.ts`,
|
|
13
|
+
* `packages/core/src/org/context.ts`, etc. — files that either define or
|
|
14
|
+
* intentionally handle the dev-mode sentinel). Those live in `node_modules`
|
|
15
|
+
* for a generated app and are already excluded by `SKIP_DIRS`, so they're
|
|
16
|
+
* moved behind an optional `extraExemptPaths` param (default `[]`) instead
|
|
17
|
+
* of hardcoded. The generic allowlist predicates (`*.spec.*`, `*.test.*`,
|
|
18
|
+
* `scripts/**`, `**\/seed(s)/**`) are kept verbatim.
|
|
19
|
+
*
|
|
20
|
+
* Opt-out (same line, or the line immediately above):
|
|
21
|
+
* const x = email ?? "local@localhost" // guard:allow-localhost-fallback — short reason
|
|
22
|
+
*/
|
|
23
|
+
import { isCommentLine, lineColForOffset, readFileSafe, relPosix, walk, } from "./scan-utils.js";
|
|
24
|
+
const GENERIC_ALLOWED_PATH_PREDICATES = [
|
|
25
|
+
(rel) => /\.spec\.[tj]sx?$/.test(rel),
|
|
26
|
+
(rel) => /\.test\.[tj]sx?$/.test(rel),
|
|
27
|
+
(rel) => /^scripts\//.test(rel),
|
|
28
|
+
(rel) => /\/seed\//.test(rel),
|
|
29
|
+
(rel) => /\/seeds\//.test(rel),
|
|
30
|
+
];
|
|
31
|
+
const OPT_OUT_MARKER = /\/\/\s*guard:allow-localhost-fallback\b[^\n]*/;
|
|
32
|
+
const OPT_OUT_REQUIRES_REASON = /\/\/\s*guard:allow-localhost-fallback\s*[—-]\s*\S/;
|
|
33
|
+
const LITERAL_RE = /(?:"local@localhost"|'local@localhost'|`local@localhost`)/g;
|
|
34
|
+
const SYMBOLIC_FALLBACK_RE = /(?:\?\?|\|\|)\s*DEV_MODE_USER_EMAIL\b/g;
|
|
35
|
+
const SQL_DEFAULT_RE = /\bDEFAULT\s+['"`]local@localhost['"`]/i;
|
|
36
|
+
const DRIZZLE_DEFAULT_RE = /\.default\s*\(\s*['"`]local@localhost['"`]\s*\)/;
|
|
37
|
+
function isAllowedPath(rel, extraExemptPaths) {
|
|
38
|
+
if (extraExemptPaths?.includes(rel))
|
|
39
|
+
return true;
|
|
40
|
+
return GENERIC_ALLOWED_PATH_PREDICATES.some((p) => p(rel));
|
|
41
|
+
}
|
|
42
|
+
function hasValidOptOut(lines, lineIdx) {
|
|
43
|
+
const cur = lines[lineIdx] ?? "";
|
|
44
|
+
if (OPT_OUT_MARKER.test(cur)) {
|
|
45
|
+
return OPT_OUT_REQUIRES_REASON.test(cur);
|
|
46
|
+
}
|
|
47
|
+
const prev = lines[lineIdx - 1] ?? "";
|
|
48
|
+
if (/^\s*\/\//.test(prev) && OPT_OUT_MARKER.test(prev)) {
|
|
49
|
+
return OPT_OUT_REQUIRES_REASON.test(prev);
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
export function scanLocalhostFallback(options) {
|
|
54
|
+
const { root, extraExemptPaths } = options;
|
|
55
|
+
const findings = [];
|
|
56
|
+
for (const file of walk(root)) {
|
|
57
|
+
if (!/\.(ts|tsx|mts|cts|js|mjs|cjs)$/.test(file))
|
|
58
|
+
continue;
|
|
59
|
+
if (file.endsWith(".d.ts"))
|
|
60
|
+
continue;
|
|
61
|
+
const rel = relPosix(root, file);
|
|
62
|
+
if (isAllowedPath(rel, extraExemptPaths))
|
|
63
|
+
continue;
|
|
64
|
+
const contents = readFileSafe(file);
|
|
65
|
+
if (contents === null || !contents.includes("local@localhost"))
|
|
66
|
+
continue;
|
|
67
|
+
const lines = contents.split("\n");
|
|
68
|
+
LITERAL_RE.lastIndex = 0;
|
|
69
|
+
let m;
|
|
70
|
+
while ((m = LITERAL_RE.exec(contents)) !== null) {
|
|
71
|
+
const { line } = lineColForOffset(contents, m.index);
|
|
72
|
+
const lineText = lines[line - 1] ?? "";
|
|
73
|
+
if (isCommentLine(lineText))
|
|
74
|
+
continue;
|
|
75
|
+
if (SQL_DEFAULT_RE.test(lineText))
|
|
76
|
+
continue;
|
|
77
|
+
if (DRIZZLE_DEFAULT_RE.test(lineText))
|
|
78
|
+
continue;
|
|
79
|
+
if (hasValidOptOut(lines, line - 1))
|
|
80
|
+
continue;
|
|
81
|
+
findings.push({
|
|
82
|
+
file: rel,
|
|
83
|
+
line,
|
|
84
|
+
message: `"local@localhost" used as a fallback identity: ${lineText.trim()}. Throw/401 on missing session instead — this pools every unauthenticated request onto one shared tenant.`,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
SYMBOLIC_FALLBACK_RE.lastIndex = 0;
|
|
88
|
+
let s;
|
|
89
|
+
while ((s = SYMBOLIC_FALLBACK_RE.exec(contents)) !== null) {
|
|
90
|
+
const { line } = lineColForOffset(contents, s.index);
|
|
91
|
+
const lineText = lines[line - 1] ?? "";
|
|
92
|
+
if (isCommentLine(lineText))
|
|
93
|
+
continue;
|
|
94
|
+
if (hasValidOptOut(lines, line - 1))
|
|
95
|
+
continue;
|
|
96
|
+
findings.push({
|
|
97
|
+
file: rel,
|
|
98
|
+
line,
|
|
99
|
+
message: `DEV_MODE_USER_EMAIL used as a fallback identity: ${lineText.trim()}. Throw/401 on missing session instead.`,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return { name: "no-localhost-fallback", findings };
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=no-localhost-fallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-localhost-fallback.js","sourceRoot":"","sources":["../../src/guards/no-localhost-fallback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,IAAI,GACL,MAAM,iBAAiB,CAAC;AASzB,MAAM,+BAA+B,GAAoC;IACvE,CAAC,GAAG,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;IACrC,CAAC,GAAG,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;IACrC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;IAC/B,CAAC,GAAG,EAAE,EAAE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I,EAAE,GAAG;gBACT,IAAI;gBACJ,OAAO,EAAE,kDAAkD,QAAQ,CAAC,IAAI,EAAE,2GAA2G;aACtL,CAAC,CAAC;QACL,CAAC;QAED,oBAAoB,CAAC,SAAS,GAAG,CAAC,CAAC;QACnC,IAAI,CAAyB,CAAC;QAC9B,OAAO,CAAC,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAC1D,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;YACrD,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;YACvC,IAAI,aAAa,CAAC,QAAQ,CAAC;gBAAE,SAAS;YACtC,IAAI,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC;gBAAE,SAAS;YAC9C,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,GAAG;gBACT,IAAI;gBACJ,OAAO,EAAE,oDAAoD,QAAQ,CAAC,IAAI,EAAE,yCAAyC;aACtH,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,QAAQ,EAAE,CAAC;AACrD,CAAC","sourcesContent":["/**\n * scanLocalhostFallback — ported from\n * `scripts/guard-no-localhost-fallback.mjs`.\n *\n * Refuse to let production code use the literal `local@localhost` (or the\n * `DEV_MODE_USER_EMAIL` symbolic alias) as a fallback identity when no\n * session is present — that pools every unauthenticated request onto one\n * shared tenant. The right behavior in production is to throw/401 when\n * there's no session, not fall back to a sentinel identity.\n *\n * Conditional guard — per report 005's V1 guard set table: the original\n * hardcodes framework-file exemptions (`packages/core/src/server/auth.ts`,\n * `packages/core/src/org/context.ts`, etc. — files that either define or\n * intentionally handle the dev-mode sentinel). Those live in `node_modules`\n * for a generated app and are already excluded by `SKIP_DIRS`, so they're\n * moved behind an optional `extraExemptPaths` param (default `[]`) instead\n * of hardcoded. The generic allowlist predicates (`*.spec.*`, `*.test.*`,\n * `scripts/**`, `**\\/seed(s)/**`) are kept verbatim.\n *\n * Opt-out (same line, or the line immediately above):\n * const x = email ?? \"local@localhost\" // guard:allow-localhost-fallback — short reason\n */\n\nimport {\n isCommentLine,\n lineColForOffset,\n readFileSafe,\n relPosix,\n walk,\n} from \"./scan-utils.js\";\nimport type { GuardFinding, GuardResult, GuardScanOptions } from \"./types.js\";\n\nexport interface LocalhostFallbackOptions extends GuardScanOptions {\n /** Exact repo-relative paths to exempt in addition to the generic\n * predicates (spec/test/scripts/seed). Default `[]`. */\n extraExemptPaths?: string[];\n}\n\nconst GENERIC_ALLOWED_PATH_PREDICATES: Array<(rel: string) => boolean> = [\n (rel) => /\\.spec\\.[tj]sx?$/.test(rel),\n (rel) => /\\.test\\.[tj]sx?$/.test(rel),\n (rel) => /^scripts\\//.test(rel),\n (rel) => /\\/seed\\//.test(rel),\n (rel) => /\\/seeds\\//.test(rel),\n];\n\nconst OPT_OUT_MARKER = /\\/\\/\\s*guard:allow-localhost-fallback\\b[^\\n]*/;\nconst OPT_OUT_REQUIRES_REASON =\n /\\/\\/\\s*guard:allow-localhost-fallback\\s*[—-]\\s*\\S/;\n\nconst LITERAL_RE = /(?:\"local@localhost\"|'local@localhost'|`local@localhost`)/g;\n\nconst SYMBOLIC_FALLBACK_RE = /(?:\\?\\?|\\|\\|)\\s*DEV_MODE_USER_EMAIL\\b/g;\n\nconst SQL_DEFAULT_RE = /\\bDEFAULT\\s+['\"`]local@localhost['\"`]/i;\nconst DRIZZLE_DEFAULT_RE = /\\.default\\s*\\(\\s*['\"`]local@localhost['\"`]\\s*\\)/;\n\nfunction isAllowedPath(rel: string, extraExemptPaths?: string[]): boolean {\n if (extraExemptPaths?.includes(rel)) return true;\n return GENERIC_ALLOWED_PATH_PREDICATES.some((p) => p(rel));\n}\n\nfunction hasValidOptOut(lines: string[], lineIdx: number): boolean {\n const cur = lines[lineIdx] ?? \"\";\n if (OPT_OUT_MARKER.test(cur)) {\n return OPT_OUT_REQUIRES_REASON.test(cur);\n }\n const prev = lines[lineIdx - 1] ?? \"\";\n if (/^\\s*\\/\\//.test(prev) && OPT_OUT_MARKER.test(prev)) {\n return OPT_OUT_REQUIRES_REASON.test(prev);\n }\n return false;\n}\n\nexport function scanLocalhostFallback(\n options: LocalhostFallbackOptions,\n): GuardResult {\n const { root, extraExemptPaths } = options;\n const findings: GuardFinding[] = [];\n\n for (const file of walk(root)) {\n if (!/\\.(ts|tsx|mts|cts|js|mjs|cjs)$/.test(file)) continue;\n if (file.endsWith(\".d.ts\")) continue;\n const rel = relPosix(root, file);\n if (isAllowedPath(rel, extraExemptPaths)) continue;\n\n const contents = readFileSafe(file);\n if (contents === null || !contents.includes(\"local@localhost\")) continue;\n\n const lines = contents.split(\"\\n\");\n\n LITERAL_RE.lastIndex = 0;\n let m: RegExpExecArray | null;\n while ((m = LITERAL_RE.exec(contents)) !== null) {\n const { line } = lineColForOffset(contents, m.index);\n const lineText = lines[line - 1] ?? \"\";\n if (isCommentLine(lineText)) continue;\n if (SQL_DEFAULT_RE.test(lineText)) continue;\n if (DRIZZLE_DEFAULT_RE.test(lineText)) continue;\n if (hasValidOptOut(lines, line - 1)) continue;\n findings.push({\n file: rel,\n line,\n message: `\"local@localhost\" used as a fallback identity: ${lineText.trim()}. Throw/401 on missing session instead — this pools every unauthenticated request onto one shared tenant.`,\n });\n }\n\n SYMBOLIC_FALLBACK_RE.lastIndex = 0;\n let s: RegExpExecArray | null;\n while ((s = SYMBOLIC_FALLBACK_RE.exec(contents)) !== null) {\n const { line } = lineColForOffset(contents, s.index);\n const lineText = lines[line - 1] ?? \"\";\n if (isCommentLine(lineText)) continue;\n if (hasValidOptOut(lines, line - 1)) continue;\n findings.push({\n file: rel,\n line,\n message: `DEV_MODE_USER_EMAIL used as a fallback identity: ${lineText.trim()}. Throw/401 on missing session instead.`,\n });\n }\n }\n\n return { name: \"no-localhost-fallback\", findings };\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scanUnscopedCredentials — ported from
|
|
3
|
+
* `scripts/guard-no-unscoped-credentials.mjs`.
|
|
4
|
+
*
|
|
5
|
+
* Refuse to let any caller invoke `resolveCredential` / `hasCredential` /
|
|
6
|
+
* `saveCredential` / `deleteCredential` with only one argument. The
|
|
7
|
+
* contract requires a second argument carrying the per-user / per-org
|
|
8
|
+
* context object — `(key, { userEmail, orgId })` — so the credential
|
|
9
|
+
* lookup is scoped to the requesting principal.
|
|
10
|
+
*
|
|
11
|
+
* Generic guard, shipped as-is: the detection regex, arg-balancing parser,
|
|
12
|
+
* and marker semantics are unchanged from the monorepo original. The one
|
|
13
|
+
* difference from the monorepo script is scan scope: the original restricts
|
|
14
|
+
* its walk to `packages/`, `templates/`, `app/` — a monorepo-specific
|
|
15
|
+
* optimization that also happens to exclude its own dotfile/doc trees. A
|
|
16
|
+
* generated app's source lives at `actions/`, `app/`, `server/` (no
|
|
17
|
+
* `packages/`/`templates/` wrapper — see report 005's "Path resolution"),
|
|
18
|
+
* so keeping that literal subtree filter would silently skip `actions/`
|
|
19
|
+
* and `server/`. This port scans the whole app root (still respecting
|
|
20
|
+
* `SKIP_DIRS`) instead, which is a superset of the original's coverage and
|
|
21
|
+
* has no false-negative risk for a single-app tree.
|
|
22
|
+
*
|
|
23
|
+
* Opt-out (same line only):
|
|
24
|
+
* resolveCredential(key) // guard:allow-unscoped-credential — short reason
|
|
25
|
+
*/
|
|
26
|
+
import type { GuardResult, GuardScanOptions } from "./types.js";
|
|
27
|
+
export declare function scanUnscopedCredentials(options: GuardScanOptions): GuardResult;
|
|
28
|
+
//# sourceMappingURL=no-unscoped-credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unscoped-credentials.d.ts","sourceRoot":"","sources":["../../src/guards/no-unscoped-credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAQH,OAAO,KAAK,EAAgB,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAqI9E,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,gBAAgB,GACxB,WAAW,CA2Db"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scanUnscopedCredentials — ported from
|
|
3
|
+
* `scripts/guard-no-unscoped-credentials.mjs`.
|
|
4
|
+
*
|
|
5
|
+
* Refuse to let any caller invoke `resolveCredential` / `hasCredential` /
|
|
6
|
+
* `saveCredential` / `deleteCredential` with only one argument. The
|
|
7
|
+
* contract requires a second argument carrying the per-user / per-org
|
|
8
|
+
* context object — `(key, { userEmail, orgId })` — so the credential
|
|
9
|
+
* lookup is scoped to the requesting principal.
|
|
10
|
+
*
|
|
11
|
+
* Generic guard, shipped as-is: the detection regex, arg-balancing parser,
|
|
12
|
+
* and marker semantics are unchanged from the monorepo original. The one
|
|
13
|
+
* difference from the monorepo script is scan scope: the original restricts
|
|
14
|
+
* its walk to `packages/`, `templates/`, `app/` — a monorepo-specific
|
|
15
|
+
* optimization that also happens to exclude its own dotfile/doc trees. A
|
|
16
|
+
* generated app's source lives at `actions/`, `app/`, `server/` (no
|
|
17
|
+
* `packages/`/`templates/` wrapper — see report 005's "Path resolution"),
|
|
18
|
+
* so keeping that literal subtree filter would silently skip `actions/`
|
|
19
|
+
* and `server/`. This port scans the whole app root (still respecting
|
|
20
|
+
* `SKIP_DIRS`) instead, which is a superset of the original's coverage and
|
|
21
|
+
* has no false-negative risk for a single-app tree.
|
|
22
|
+
*
|
|
23
|
+
* Opt-out (same line only):
|
|
24
|
+
* resolveCredential(key) // guard:allow-unscoped-credential — short reason
|
|
25
|
+
*/
|
|
26
|
+
import { lineColForOffset, readFileSafe, relPosix, walk, } from "./scan-utils.js";
|
|
27
|
+
const FUNCTIONS = [
|
|
28
|
+
"resolveCredential",
|
|
29
|
+
"hasCredential",
|
|
30
|
+
"saveCredential",
|
|
31
|
+
"deleteCredential",
|
|
32
|
+
];
|
|
33
|
+
const FUNC_NAME_RE = new RegExp(`(?<![\\w$.])(${FUNCTIONS.join("|")})\\s*\\(`, "g");
|
|
34
|
+
const OPT_OUT_MARKER = /\/\/\s*guard:allow-unscoped-credential\b[^\n]*[—-]\s*\S/;
|
|
35
|
+
/** Files that legitimately use the one-arg form because they ARE the
|
|
36
|
+
* implementation under guard — the definition file itself. In an app this
|
|
37
|
+
* file only ever exists inside `node_modules`, already excluded by
|
|
38
|
+
* SKIP_DIRS, so this allowlist is effectively a no-op for app mode; kept
|
|
39
|
+
* for parity with the source guard. */
|
|
40
|
+
const FILE_ALLOWLIST = new Set(["packages/core/src/credentials/index.ts"]);
|
|
41
|
+
/**
|
|
42
|
+
* Starting at openParenIdx (the index of the `(` after the function name),
|
|
43
|
+
* walk forward, balancing nested parens / braces / brackets / strings, and
|
|
44
|
+
* return the top-level comma count. Ported verbatim.
|
|
45
|
+
*/
|
|
46
|
+
function analyzeArgs(contents, openParenIdx) {
|
|
47
|
+
let depth = 0;
|
|
48
|
+
let topLevelCommas = 0;
|
|
49
|
+
let i = openParenIdx;
|
|
50
|
+
let mode = "code";
|
|
51
|
+
let templateDepth = 0;
|
|
52
|
+
while (i < contents.length) {
|
|
53
|
+
const ch = contents[i];
|
|
54
|
+
const next = contents[i + 1];
|
|
55
|
+
if (mode === "code") {
|
|
56
|
+
if (ch === "/" && next === "/") {
|
|
57
|
+
while (i < contents.length && contents[i] !== "\n")
|
|
58
|
+
i++;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (ch === "/" && next === "*") {
|
|
62
|
+
i += 2;
|
|
63
|
+
while (i < contents.length - 1 &&
|
|
64
|
+
!(contents[i] === "*" && contents[i + 1] === "/"))
|
|
65
|
+
i++;
|
|
66
|
+
i += 2;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (ch === '"' || ch === "'") {
|
|
70
|
+
mode = ch;
|
|
71
|
+
i++;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (ch === "`") {
|
|
75
|
+
mode = "tmpl";
|
|
76
|
+
i++;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (ch === "(" || ch === "[" || ch === "{") {
|
|
80
|
+
depth++;
|
|
81
|
+
i++;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (ch === ")" || ch === "]" || ch === "}") {
|
|
85
|
+
depth--;
|
|
86
|
+
if (depth === 0 && ch === ")") {
|
|
87
|
+
return { topLevelCommas, endIdx: i };
|
|
88
|
+
}
|
|
89
|
+
i++;
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
if (ch === "," && depth === 1) {
|
|
93
|
+
topLevelCommas++;
|
|
94
|
+
i++;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
i++;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (mode === '"' || mode === "'") {
|
|
101
|
+
if (ch === "\\") {
|
|
102
|
+
i += 2;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
if (ch === mode) {
|
|
106
|
+
mode = "code";
|
|
107
|
+
i++;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
i++;
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (mode === "tmpl") {
|
|
114
|
+
if (ch === "\\") {
|
|
115
|
+
i += 2;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (ch === "`" && templateDepth === 0) {
|
|
119
|
+
mode = "code";
|
|
120
|
+
i++;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (ch === "$" && next === "{") {
|
|
124
|
+
templateDepth++;
|
|
125
|
+
i += 2;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (ch === "}" && templateDepth > 0) {
|
|
129
|
+
templateDepth--;
|
|
130
|
+
i++;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
i++;
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
i++;
|
|
137
|
+
}
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
export function scanUnscopedCredentials(options) {
|
|
141
|
+
const { root } = options;
|
|
142
|
+
const findings = [];
|
|
143
|
+
for (const file of walk(root)) {
|
|
144
|
+
if (!/\.(ts|tsx|mts|cts|js|mjs|cjs)$/.test(file))
|
|
145
|
+
continue;
|
|
146
|
+
if (file.endsWith(".d.ts"))
|
|
147
|
+
continue;
|
|
148
|
+
const rel = relPosix(root, file);
|
|
149
|
+
if (FILE_ALLOWLIST.has(rel))
|
|
150
|
+
continue;
|
|
151
|
+
const contents = readFileSafe(file);
|
|
152
|
+
if (contents === null)
|
|
153
|
+
continue;
|
|
154
|
+
let anyHit = false;
|
|
155
|
+
for (const fn of FUNCTIONS) {
|
|
156
|
+
if (contents.includes(fn + "(") || contents.includes(fn + " (")) {
|
|
157
|
+
anyHit = true;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (!anyHit)
|
|
162
|
+
continue;
|
|
163
|
+
const lines = contents.split("\n");
|
|
164
|
+
FUNC_NAME_RE.lastIndex = 0;
|
|
165
|
+
let m;
|
|
166
|
+
while ((m = FUNC_NAME_RE.exec(contents)) !== null) {
|
|
167
|
+
const fnName = m[1];
|
|
168
|
+
const openParenIdx = m.index + m[0].length - 1;
|
|
169
|
+
const before = contents.slice(Math.max(0, m.index - 30), m.index);
|
|
170
|
+
if (/\bfunction\s+$/.test(before) ||
|
|
171
|
+
/\bexport\s+(default\s+)?(async\s+)?function\s+$/.test(before) ||
|
|
172
|
+
/\b(const|let|var)\s+$/.test(before)) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
const { line } = lineColForOffset(contents, m.index);
|
|
176
|
+
const lineText = lines[line - 1] ?? "";
|
|
177
|
+
const trimmed = lineText.trimStart();
|
|
178
|
+
if (trimmed.startsWith("*") ||
|
|
179
|
+
trimmed.startsWith("//") ||
|
|
180
|
+
trimmed.startsWith("/*")) {
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
const analysis = analyzeArgs(contents, openParenIdx);
|
|
184
|
+
if (!analysis)
|
|
185
|
+
continue;
|
|
186
|
+
if (analysis.topLevelCommas >= 1)
|
|
187
|
+
continue;
|
|
188
|
+
if (OPT_OUT_MARKER.test(lineText))
|
|
189
|
+
continue;
|
|
190
|
+
findings.push({
|
|
191
|
+
file: rel,
|
|
192
|
+
line,
|
|
193
|
+
message: `${fnName}(...) called with only one argument — must pass a context object: ${fnName}(key, { userEmail, orgId })`,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return { name: "no-unscoped-credentials", findings };
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=no-unscoped-credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unscoped-credentials.js","sourceRoot":"","sources":["../../src/guards/no-unscoped-credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,IAAI,GACL,MAAM,iBAAiB,CAAC;AAGzB,MAAM,SAAS,GAAG;IAChB,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;CACnB,CAAC;AAEF,MAAM,YAAY,GAAG,IAAI,MAAM,CAC7B,gBAAgB,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAC7C,GAAG,CACJ,CAAC;AAEF,MAAM,cAAc,GAClB,yDAAyD,CAAC;AAE5D;;;;uCAIuC;AACvC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,wCAAwC,CAAC,CAAC,CAAC;AAO3E;;;;GAIG;AACH,SAAS,WAAW,CAClB,QAAgB,EAChB,YAA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,EAAE,YAAY,CAAC,CAAC;YACrD,IAAI,CAAC,QAAQ;gBAAE,SAAS;YACxB,IAAI,QAAQ,CAAC,cAAc,IAAI,CAAC;gBAAE,SAAS;YAC3C,IAAI,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAAE,SAAS;YAC5C,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,GAAG;gBACT,IAAI;gBACJ,OAAO,EAAE,GAAG,MAAM,qEAAqE,MAAM,6BAA6B;aAC3H,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,yBAAyB,EAAE,QAAQ,EAAE,CAAC;AACvD,CAAC","sourcesContent":["/**\n * scanUnscopedCredentials — ported from\n * `scripts/guard-no-unscoped-credentials.mjs`.\n *\n * Refuse to let any caller invoke `resolveCredential` / `hasCredential` /\n * `saveCredential` / `deleteCredential` with only one argument. The\n * contract requires a second argument carrying the per-user / per-org\n * context object — `(key, { userEmail, orgId })` — so the credential\n * lookup is scoped to the requesting principal.\n *\n * Generic guard, shipped as-is: the detection regex, arg-balancing parser,\n * and marker semantics are unchanged from the monorepo original. The one\n * difference from the monorepo script is scan scope: the original restricts\n * its walk to `packages/`, `templates/`, `app/` — a monorepo-specific\n * optimization that also happens to exclude its own dotfile/doc trees. A\n * generated app's source lives at `actions/`, `app/`, `server/` (no\n * `packages/`/`templates/` wrapper — see report 005's \"Path resolution\"),\n * so keeping that literal subtree filter would silently skip `actions/`\n * and `server/`. This port scans the whole app root (still respecting\n * `SKIP_DIRS`) instead, which is a superset of the original's coverage and\n * has no false-negative risk for a single-app tree.\n *\n * Opt-out (same line only):\n * resolveCredential(key) // guard:allow-unscoped-credential — short reason\n */\n\nimport {\n lineColForOffset,\n readFileSafe,\n relPosix,\n walk,\n} from \"./scan-utils.js\";\nimport type { GuardFinding, GuardResult, GuardScanOptions } from \"./types.js\";\n\nconst FUNCTIONS = [\n \"resolveCredential\",\n \"hasCredential\",\n \"saveCredential\",\n \"deleteCredential\",\n];\n\nconst FUNC_NAME_RE = new RegExp(\n `(?<![\\\\w$.])(${FUNCTIONS.join(\"|\")})\\\\s*\\\\(`,\n \"g\",\n);\n\nconst OPT_OUT_MARKER =\n /\\/\\/\\s*guard:allow-unscoped-credential\\b[^\\n]*[—-]\\s*\\S/;\n\n/** Files that legitimately use the one-arg form because they ARE the\n * implementation under guard — the definition file itself. In an app this\n * file only ever exists inside `node_modules`, already excluded by\n * SKIP_DIRS, so this allowlist is effectively a no-op for app mode; kept\n * for parity with the source guard. */\nconst FILE_ALLOWLIST = new Set([\"packages/core/src/credentials/index.ts\"]);\n\ninterface ArgAnalysis {\n topLevelCommas: number;\n endIdx: number;\n}\n\n/**\n * Starting at openParenIdx (the index of the `(` after the function name),\n * walk forward, balancing nested parens / braces / brackets / strings, and\n * return the top-level comma count. Ported verbatim.\n */\nfunction analyzeArgs(\n contents: string,\n openParenIdx: number,\n): ArgAnalysis | null {\n let depth = 0;\n let topLevelCommas = 0;\n let i = openParenIdx;\n let mode: \"code\" | '\"' | \"'\" | \"tmpl\" = \"code\";\n let templateDepth = 0;\n while (i < contents.length) {\n const ch = contents[i];\n const next = contents[i + 1];\n if (mode === \"code\") {\n if (ch === \"/\" && next === \"/\") {\n while (i < contents.length && contents[i] !== \"\\n\") i++;\n continue;\n }\n if (ch === \"/\" && next === \"*\") {\n i += 2;\n while (\n i < contents.length - 1 &&\n !(contents[i] === \"*\" && contents[i + 1] === \"/\")\n )\n i++;\n i += 2;\n continue;\n }\n if (ch === '\"' || ch === \"'\") {\n mode = ch;\n i++;\n continue;\n }\n if (ch === \"`\") {\n mode = \"tmpl\";\n i++;\n continue;\n }\n if (ch === \"(\" || ch === \"[\" || ch === \"{\") {\n depth++;\n i++;\n continue;\n }\n if (ch === \")\" || ch === \"]\" || ch === \"}\") {\n depth--;\n if (depth === 0 && ch === \")\") {\n return { topLevelCommas, endIdx: i };\n }\n i++;\n continue;\n }\n if (ch === \",\" && depth === 1) {\n topLevelCommas++;\n i++;\n continue;\n }\n i++;\n continue;\n }\n if (mode === '\"' || mode === \"'\") {\n if (ch === \"\\\\\") {\n i += 2;\n continue;\n }\n if (ch === mode) {\n mode = \"code\";\n i++;\n continue;\n }\n i++;\n continue;\n }\n if (mode === \"tmpl\") {\n if (ch === \"\\\\\") {\n i += 2;\n continue;\n }\n if (ch === \"`\" && templateDepth === 0) {\n mode = \"code\";\n i++;\n continue;\n }\n if (ch === \"$\" && next === \"{\") {\n templateDepth++;\n i += 2;\n continue;\n }\n if (ch === \"}\" && templateDepth > 0) {\n templateDepth--;\n i++;\n continue;\n }\n i++;\n continue;\n }\n i++;\n }\n return null;\n}\n\nexport function scanUnscopedCredentials(\n options: GuardScanOptions,\n): GuardResult {\n const { root } = options;\n const findings: GuardFinding[] = [];\n\n for (const file of walk(root)) {\n if (!/\\.(ts|tsx|mts|cts|js|mjs|cjs)$/.test(file)) continue;\n if (file.endsWith(\".d.ts\")) continue;\n const rel = relPosix(root, file);\n if (FILE_ALLOWLIST.has(rel)) continue;\n\n const contents = readFileSafe(file);\n if (contents === null) continue;\n\n let anyHit = false;\n for (const fn of FUNCTIONS) {\n if (contents.includes(fn + \"(\") || contents.includes(fn + \" (\")) {\n anyHit = true;\n break;\n }\n }\n if (!anyHit) continue;\n\n const lines = contents.split(\"\\n\");\n FUNC_NAME_RE.lastIndex = 0;\n let m: RegExpExecArray | null;\n while ((m = FUNC_NAME_RE.exec(contents)) !== null) {\n const fnName = m[1];\n const openParenIdx = m.index + m[0].length - 1;\n const before = contents.slice(Math.max(0, m.index - 30), m.index);\n if (\n /\\bfunction\\s+$/.test(before) ||\n /\\bexport\\s+(default\\s+)?(async\\s+)?function\\s+$/.test(before) ||\n /\\b(const|let|var)\\s+$/.test(before)\n ) {\n continue;\n }\n const { line } = lineColForOffset(contents, m.index);\n const lineText = lines[line - 1] ?? \"\";\n const trimmed = lineText.trimStart();\n if (\n trimmed.startsWith(\"*\") ||\n trimmed.startsWith(\"//\") ||\n trimmed.startsWith(\"/*\")\n ) {\n continue;\n }\n const analysis = analyzeArgs(contents, openParenIdx);\n if (!analysis) continue;\n if (analysis.topLevelCommas >= 1) continue;\n if (OPT_OUT_MARKER.test(lineText)) continue;\n findings.push({\n file: rel,\n line,\n message: `${fnName}(...) called with only one argument — must pass a context object: ${fnName}(key, { userEmail, orgId })`,\n });\n }\n }\n\n return { name: \"no-unscoped-credentials\", findings };\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scanUnscopedQueries — ported from `scripts/guard-no-unscoped-queries.mjs`.
|
|
3
|
+
*
|
|
4
|
+
* Refuse to let any code query an "ownable" resource table (one that
|
|
5
|
+
* spreads `...ownableColumns()`) without going through framework access
|
|
6
|
+
* control: `accessFilter` / `resolveAccess` / `assertAccess`, or an
|
|
7
|
+
* explicit `ownerEmail` / `userEmail` / `orgId` filter. The check is
|
|
8
|
+
* per-STATEMENT, scoped to the enclosing block, so a sibling `if` branch
|
|
9
|
+
* that correctly scopes its query does not defuse an unscoped sibling.
|
|
10
|
+
*
|
|
11
|
+
* Conditional guard — per report 005's V1 guard set table: the original
|
|
12
|
+
* restricts scanning to `templates/[^/]+/(server|actions)/` and
|
|
13
|
+
* `packages/[^/]+/src/`, and hardcodes a `FILE_ALLOWLIST` of this
|
|
14
|
+
* framework's own sharing-primitive implementation files. For a generated
|
|
15
|
+
* app (no `templates/`/`packages/` wrapper — source lives at `actions/`
|
|
16
|
+
* and `server/` under the app root), this port scans `actions/` and
|
|
17
|
+
* `server/` directly and drops the hardcoded allowlist in favor of an
|
|
18
|
+
* optional `extraExemptPaths` param (default `[]`).
|
|
19
|
+
*
|
|
20
|
+
* Opt-out (within the enclosing block, or as a file header for whole-file
|
|
21
|
+
* opt-outs):
|
|
22
|
+
* // guard:allow-unscoped — short reason
|
|
23
|
+
*/
|
|
24
|
+
import type { GuardResult, GuardScanOptions } from "./types.js";
|
|
25
|
+
export interface UnscopedQueriesOptions extends GuardScanOptions {
|
|
26
|
+
/** Exact repo-relative paths to exempt from the per-statement scan
|
|
27
|
+
* (e.g. this app's own sharing-primitive implementation, if any).
|
|
28
|
+
* Default `[]`. */
|
|
29
|
+
extraExemptPaths?: string[];
|
|
30
|
+
}
|
|
31
|
+
export declare function scanUnscopedQueries(options: UnscopedQueriesOptions): GuardResult;
|
|
32
|
+
//# sourceMappingURL=no-unscoped-queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unscoped-queries.d.ts","sourceRoot":"","sources":["../../src/guards/no-unscoped-queries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAgB,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9E,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D;;uBAEmB;IACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AA6vBD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,sBAAsB,GAC9B,WAAW,CAkCb"}
|