@superblocksteam/vite-plugin-file-sync 2.0.119-next.0 → 2.0.119-next.1
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/dist/ai-service/agent/middleware.d.ts.map +1 -1
- package/dist/ai-service/agent/middleware.js +5 -2
- package/dist/ai-service/agent/middleware.js.map +1 -1
- package/dist/ai-service/agent/prompts/build-base-system-prompt.d.ts.map +1 -1
- package/dist/ai-service/agent/prompts/build-base-system-prompt.js +11 -17
- package/dist/ai-service/agent/prompts/build-base-system-prompt.js.map +1 -1
- package/dist/ai-service/agent/tool-message-utils.d.ts.map +1 -1
- package/dist/ai-service/agent/tool-message-utils.js +3 -27
- package/dist/ai-service/agent/tool-message-utils.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.d.ts +0 -4
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.js +5 -16
- package/dist/ai-service/agent/tools/apis/api-validation-orchestrator.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/get-api-docs.d.ts +1 -1
- package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js +13 -18
- package/dist/ai-service/agent/tools/apis/get-sdk-api-docs.js.map +1 -1
- package/dist/ai-service/agent/tools/apis/test-api.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/apis/test-api.js +2 -138
- package/dist/ai-service/agent/tools/apis/test-api.js.map +1 -1
- package/dist/ai-service/agent/tools/build-debug.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-debug.js +5 -17
- package/dist/ai-service/agent/tools/build-debug.js.map +1 -1
- package/dist/ai-service/agent/tools/build-finalize.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-finalize.js +50 -42
- package/dist/ai-service/agent/tools/build-finalize.js.map +1 -1
- package/dist/ai-service/agent/tools/build-manage-checklist.d.ts +5 -7
- package/dist/ai-service/agent/tools/build-manage-checklist.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-manage-checklist.js +108 -54
- package/dist/ai-service/agent/tools/build-manage-checklist.js.map +1 -1
- package/dist/ai-service/agent/tools/get-logs.d.ts +1 -1
- package/dist/ai-service/agent/tools/index.d.ts +0 -4
- package/dist/ai-service/agent/tools/index.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/index.js +0 -4
- package/dist/ai-service/agent/tools/index.js.map +1 -1
- package/dist/ai-service/agent/tools/integrations/execute-request.d.ts +1 -1
- package/dist/ai-service/agent/tools/integrations/index.d.ts +0 -1
- package/dist/ai-service/agent/tools/integrations/index.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/integrations/index.js +0 -1
- package/dist/ai-service/agent/tools/integrations/index.js.map +1 -1
- package/dist/ai-service/agent/tools/integrations/metadata.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/integrations/metadata.js +4 -30
- package/dist/ai-service/agent/tools/integrations/metadata.js.map +1 -1
- package/dist/ai-service/agent/tools.d.ts +0 -2
- package/dist/ai-service/agent/tools.d.ts.map +1 -1
- package/dist/ai-service/agent/tools.js +6 -74
- package/dist/ai-service/agent/tools.js.map +1 -1
- package/dist/ai-service/agent/tools2/example.js +1 -1
- package/dist/ai-service/agent/tools2/example.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/ask-multi-choice.d.ts +0 -7
- package/dist/ai-service/agent/tools2/tools/ask-multi-choice.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/ask-multi-choice.js +1 -11
- package/dist/ai-service/agent/tools2/tools/ask-multi-choice.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.d.ts +0 -7
- package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.js +1 -3
- package/dist/ai-service/agent/tools2/tools/ask-searchable-dropdown.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/download-attachments.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/download-attachments.js +3 -4
- package/dist/ai-service/agent/tools2/tools/download-attachments.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/exit-plan-mode.d.ts +0 -9
- package/dist/ai-service/agent/tools2/tools/exit-plan-mode.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js +1 -15
- package/dist/ai-service/agent/tools2/tools/exit-plan-mode.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/list-attachments.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/list-attachments.js +4 -8
- package/dist/ai-service/agent/tools2/tools/list-attachments.js.map +1 -1
- package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.d.ts +4 -21
- package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.js +11 -87
- package/dist/ai-service/agent/tools2/tools/spawn-coding-subagents.js.map +1 -1
- package/dist/ai-service/agent/tools2/types.d.ts +2 -10
- package/dist/ai-service/agent/tools2/types.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/types.js.map +1 -1
- package/dist/ai-service/agent/utils.d.ts.map +1 -1
- package/dist/ai-service/agent/utils.js +0 -2
- package/dist/ai-service/agent/utils.js.map +1 -1
- package/dist/ai-service/app-interface/filesystem/draft-manager.d.ts +1 -1
- package/dist/ai-service/app-interface/filesystem/draft-manager.d.ts.map +1 -1
- package/dist/ai-service/app-interface/filesystem/draft-manager.js.map +1 -1
- package/dist/ai-service/app-interface/shell.d.ts +0 -38
- package/dist/ai-service/app-interface/shell.d.ts.map +1 -1
- package/dist/ai-service/app-interface/shell.js +1 -222
- package/dist/ai-service/app-interface/shell.js.map +1 -1
- package/dist/ai-service/attachments/uploaded-content-part.d.ts +0 -5
- package/dist/ai-service/attachments/uploaded-content-part.d.ts.map +1 -1
- package/dist/ai-service/attachments/uploaded-content-part.js +21 -31
- package/dist/ai-service/attachments/uploaded-content-part.js.map +1 -1
- package/dist/ai-service/context-download.d.ts +1 -14
- package/dist/ai-service/context-download.d.ts.map +1 -1
- package/dist/ai-service/context-download.js +0 -80
- package/dist/ai-service/context-download.js.map +1 -1
- package/dist/ai-service/features.d.ts +0 -16
- package/dist/ai-service/features.d.ts.map +1 -1
- package/dist/ai-service/features.js +0 -10
- package/dist/ai-service/features.js.map +1 -1
- package/dist/ai-service/index.d.ts +1 -11
- package/dist/ai-service/index.d.ts.map +1 -1
- package/dist/ai-service/index.js +13 -81
- package/dist/ai-service/index.js.map +1 -1
- package/dist/ai-service/integrations/store.d.ts +0 -5
- package/dist/ai-service/integrations/store.d.ts.map +1 -1
- package/dist/ai-service/integrations/store.js +2 -19
- package/dist/ai-service/integrations/store.js.map +1 -1
- package/dist/ai-service/judge/tools/submit-feedback.d.ts +1 -1
- package/dist/ai-service/llm/context-v2/manager.d.ts +1 -8
- package/dist/ai-service/llm/context-v2/manager.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/manager.js +1 -17
- package/dist/ai-service/llm/context-v2/manager.js.map +1 -1
- package/dist/ai-service/llm/context-v2/prompts/compaction.d.ts +1 -1
- package/dist/ai-service/llm/context-v2/prompts/compaction.d.ts.map +1 -1
- package/dist/ai-service/llm/context-v2/prompts/compaction.js +3 -3
- package/dist/ai-service/llm/impl/clark.d.ts.map +1 -1
- package/dist/ai-service/llm/impl/clark.js +3 -3
- package/dist/ai-service/llm/impl/clark.js.map +1 -1
- package/dist/ai-service/llm/provider.d.ts.map +1 -1
- package/dist/ai-service/llm/provider.js +7 -22
- package/dist/ai-service/llm/provider.js.map +1 -1
- package/dist/ai-service/llm/types.d.ts +1 -14
- package/dist/ai-service/llm/types.d.ts.map +1 -1
- package/dist/ai-service/llmobs/otel-exporter.d.ts +0 -23
- package/dist/ai-service/llmobs/otel-exporter.d.ts.map +1 -1
- package/dist/ai-service/llmobs/otel-exporter.js +10 -112
- package/dist/ai-service/llmobs/otel-exporter.js.map +1 -1
- package/dist/ai-service/llmobs/tracer.d.ts +0 -7
- package/dist/ai-service/llmobs/tracer.d.ts.map +1 -1
- package/dist/ai-service/llmobs/tracer.js +0 -38
- package/dist/ai-service/llmobs/tracer.js.map +1 -1
- package/dist/ai-service/skills/system/_registry.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/_registry.generated.js +0 -2
- package/dist/ai-service/skills/system/_registry.generated.js.map +1 -1
- package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.d.ts +1 -1
- package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.js +0 -2
- package/dist/ai-service/skills/system/superblocks-frontend/skill.generated.js.map +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.d.ts +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.js +1 -3
- package/dist/ai-service/skills/system/superblocks-migration/references/focused-debug.generated.js.map +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.d.ts +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.js +0 -29
- package/dist/ai-service/skills/system/superblocks-migration/references/yaml-block-mapping.generated.js.map +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js +6 -112
- package/dist/ai-service/skills/system/superblocks-migration/skill.generated.js.map +1 -1
- package/dist/ai-service/skills/system/third-party-migration/skill.generated.d.ts +1 -1
- package/dist/ai-service/skills/system/third-party-migration/skill.generated.d.ts.map +1 -1
- package/dist/ai-service/skills/system/third-party-migration/skill.generated.js +3 -33
- package/dist/ai-service/skills/system/third-party-migration/skill.generated.js.map +1 -1
- package/dist/ai-service/state-machine/clark-fsm.d.ts +0 -21
- package/dist/ai-service/state-machine/clark-fsm.d.ts.map +1 -1
- package/dist/ai-service/state-machine/clark-fsm.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/agent-planning.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/agent-planning.js +6 -79
- package/dist/ai-service/state-machine/handlers/agent-planning.js.map +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.d.ts +0 -10
- package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.js +41 -69
- package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
- package/dist/ai-service/state-machine/helpers/peer.d.ts +7 -35
- package/dist/ai-service/state-machine/helpers/peer.d.ts.map +1 -1
- package/dist/ai-service/state-machine/helpers/peer.js +15 -81
- package/dist/ai-service/state-machine/helpers/peer.js.map +1 -1
- package/dist/ai-service/template-renderer.d.ts +1 -14
- package/dist/ai-service/template-renderer.d.ts.map +1 -1
- package/dist/ai-service/template-renderer.js +41 -144
- package/dist/ai-service/template-renderer.js.map +1 -1
- package/dist/ai-service/transform/api-builder/to-sdk-transformer.js +2 -2
- package/dist/ai-service/transform/api-builder/to-sdk-transformer.js.map +1 -1
- package/dist/ai-service/transform/api-builder/to-yaml-transformer.js +2 -2
- package/dist/ai-service/transform/api-builder/to-yaml-transformer.js.map +1 -1
- package/dist/draft-interface.d.ts +1 -1
- package/dist/draft-interface.d.ts.map +1 -1
- package/dist/file-sync-vite-plugin.d.ts.map +1 -1
- package/dist/file-sync-vite-plugin.js +27 -34
- package/dist/file-sync-vite-plugin.js.map +1 -1
- package/dist/file-system-helpers.d.ts +0 -4
- package/dist/file-system-helpers.d.ts.map +1 -1
- package/dist/file-system-helpers.js +0 -13
- package/dist/file-system-helpers.js.map +1 -1
- package/dist/inject-index-vite-plugin.d.ts.map +1 -1
- package/dist/inject-index-vite-plugin.js +1 -15
- package/dist/inject-index-vite-plugin.js.map +1 -1
- package/dist/injected-index.d.ts.map +1 -1
- package/dist/injected-index.js +1 -15
- package/dist/injected-index.js.map +1 -1
- package/dist/lock-service/index.d.ts.map +1 -1
- package/dist/lock-service/index.js +10 -8
- package/dist/lock-service/index.js.map +1 -1
- package/dist/migration/migration-checklist.d.ts +2 -51
- package/dist/migration/migration-checklist.d.ts.map +1 -1
- package/dist/migration/migration-checklist.js +151 -79
- package/dist/migration/migration-checklist.js.map +1 -1
- package/dist/migration/migration-routes.d.ts.map +1 -1
- package/dist/migration/migration-routes.js +30 -290
- package/dist/migration/migration-routes.js.map +1 -1
- package/dist/migration/restructure.d.ts +2 -9
- package/dist/migration/restructure.d.ts.map +1 -1
- package/dist/migration/restructure.js +5 -116
- package/dist/migration/restructure.js.map +1 -1
- package/dist/migration/unsupported-integrations.d.ts.map +1 -1
- package/dist/migration/unsupported-integrations.js +0 -9
- package/dist/migration/unsupported-integrations.js.map +1 -1
- package/dist/migration-templates/app-fullstack/client/components/hooks/use-mobile.ts +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/accordion.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/avatar.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/breadcrumb.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/button.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/calendar.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/chart.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/file-dropzone.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/file-input.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/hover-card.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/image.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/input.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/label.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/navigation-menu.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/pagination.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/popover.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/progress.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/select.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/sheet.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/sidebar.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/slider.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/switch.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/table.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/tabs.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/toggle-group.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/toggle.tsx +1 -1
- package/dist/migration-templates/app-fullstack/client/components/ui/tooltip.tsx +1 -1
- package/dist/socket-manager.d.ts.map +1 -1
- package/dist/socket-manager.js +0 -8
- package/dist/socket-manager.js.map +1 -1
- package/dist/sync-service/hash-dir-tree.d.ts +1 -1
- package/dist/sync-service/hash-dir-tree.d.ts.map +1 -1
- package/dist/sync-service/hash-dir-tree.js +3 -3
- package/dist/sync-service/hash-dir-tree.js.map +1 -1
- package/dist/sync-service/index.d.ts +14 -0
- package/dist/sync-service/index.d.ts.map +1 -1
- package/dist/sync-service/index.js +44 -1
- package/dist/sync-service/index.js.map +1 -1
- package/dist/sync-service/list-dir.d.ts +1 -1
- package/dist/sync-service/list-dir.d.ts.map +1 -1
- package/dist/sync-service/list-dir.js +3 -36
- package/dist/sync-service/list-dir.js.map +1 -1
- package/dist/sync-service/snapshot/take-snapshot.d.ts +1 -1
- package/dist/sync-service/snapshot/take-snapshot.d.ts.map +1 -1
- package/dist/sync-service/snapshot/take-snapshot.js +8 -4
- package/dist/sync-service/snapshot/take-snapshot.js.map +1 -1
- package/dist/util/log-sanitizer.d.ts +5 -6
- package/dist/util/log-sanitizer.d.ts.map +1 -1
- package/dist/util/log-sanitizer.js +6 -21
- package/dist/util/log-sanitizer.js.map +1 -1
- package/package.json +8 -9
- package/dist/ai-service/agent/prompts/build-security-scan-prompt.d.ts +0 -17
- package/dist/ai-service/agent/prompts/build-security-scan-prompt.d.ts.map +0 -1
- package/dist/ai-service/agent/prompts/build-security-scan-prompt.js +0 -219
- package/dist/ai-service/agent/prompts/build-security-scan-prompt.js.map +0 -1
- package/dist/ai-service/agent/tools/apis/api-comparator.d.ts +0 -36
- package/dist/ai-service/agent/tools/apis/api-comparator.d.ts.map +0 -1
- package/dist/ai-service/agent/tools/apis/api-comparator.js +0 -369
- package/dist/ai-service/agent/tools/apis/api-comparator.js.map +0 -1
- package/dist/ai-service/agent/tools/build-copy-directory.d.ts +0 -12
- package/dist/ai-service/agent/tools/build-copy-directory.d.ts.map +0 -1
- package/dist/ai-service/agent/tools/build-copy-directory.js +0 -51
- package/dist/ai-service/agent/tools/build-copy-directory.js.map +0 -1
- package/dist/ai-service/agent/tools/build-copy-file.d.ts +0 -12
- package/dist/ai-service/agent/tools/build-copy-file.d.ts.map +0 -1
- package/dist/ai-service/agent/tools/build-copy-file.js +0 -52
- package/dist/ai-service/agent/tools/build-copy-file.js.map +0 -1
- package/dist/ai-service/agent/tools/build-copy-utils.d.ts +0 -57
- package/dist/ai-service/agent/tools/build-copy-utils.d.ts.map +0 -1
- package/dist/ai-service/agent/tools/build-copy-utils.js +0 -37
- package/dist/ai-service/agent/tools/build-copy-utils.js.map +0 -1
- package/dist/ai-service/agent/tools/databases/dev-database.d.ts +0 -103
- package/dist/ai-service/agent/tools/databases/dev-database.d.ts.map +0 -1
- package/dist/ai-service/agent/tools/databases/dev-database.js +0 -117
- package/dist/ai-service/agent/tools/databases/dev-database.js.map +0 -1
- package/dist/ai-service/agent/tools/integrations/delete-integration.d.ts +0 -18
- package/dist/ai-service/agent/tools/integrations/delete-integration.d.ts.map +0 -1
- package/dist/ai-service/agent/tools/integrations/delete-integration.js +0 -99
- package/dist/ai-service/agent/tools/integrations/delete-integration.js.map +0 -1
- package/dist/ai-service/agent/tools/report-security-findings.d.ts +0 -163
- package/dist/ai-service/agent/tools/report-security-findings.d.ts.map +0 -1
- package/dist/ai-service/agent/tools/report-security-findings.js +0 -52
- package/dist/ai-service/agent/tools/report-security-findings.js.map +0 -1
- package/dist/ai-service/app-interface/npm-registry.d.ts +0 -137
- package/dist/ai-service/app-interface/npm-registry.d.ts.map +0 -1
- package/dist/ai-service/app-interface/npm-registry.js +0 -415
- package/dist/ai-service/app-interface/npm-registry.js.map +0 -1
- package/dist/ai-service/checklist/persisted-checklist-store.d.ts +0 -105
- package/dist/ai-service/checklist/persisted-checklist-store.d.ts.map +0 -1
- package/dist/ai-service/checklist/persisted-checklist-store.js +0 -498
- package/dist/ai-service/checklist/persisted-checklist-store.js.map +0 -1
- package/dist/ai-service/dev-database-client.d.ts +0 -90
- package/dist/ai-service/dev-database-client.d.ts.map +0 -1
- package/dist/ai-service/dev-database-client.js +0 -166
- package/dist/ai-service/dev-database-client.js.map +0 -1
- package/dist/ai-service/llmobs/context-registry.d.ts +0 -62
- package/dist/ai-service/llmobs/context-registry.d.ts.map +0 -1
- package/dist/ai-service/llmobs/context-registry.js +0 -115
- package/dist/ai-service/llmobs/context-registry.js.map +0 -1
- package/dist/ai-service/skills/system/third-party-migration/claude-design.generated.d.ts +0 -2
- package/dist/ai-service/skills/system/third-party-migration/claude-design.generated.d.ts.map +0 -1
- package/dist/ai-service/skills/system/third-party-migration/claude-design.generated.js +0 -107
- package/dist/ai-service/skills/system/third-party-migration/claude-design.generated.js.map +0 -1
- package/dist/migration/migration-verification.d.ts +0 -206
- package/dist/migration/migration-verification.d.ts.map +0 -1
- package/dist/migration/migration-verification.js +0 -1006
- package/dist/migration/migration-verification.js.map +0 -1
- package/dist/migration/yaml-walk.d.ts +0 -18
- package/dist/migration/yaml-walk.d.ts.map +0 -1
- package/dist/migration/yaml-walk.js +0 -45
- package/dist/migration/yaml-walk.js.map +0 -1
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Log Sanitizer for Vite Plugin
|
|
3
3
|
*
|
|
4
|
-
* Sanitizes secrets
|
|
4
|
+
* Sanitizes secrets from log messages while preserving debugging information.
|
|
5
5
|
* This is a lightweight version for the vite-plugin, avoiding a dependency
|
|
6
6
|
* on the telemetry package.
|
|
7
7
|
*
|
|
8
|
-
* DESIGN DECISION:
|
|
9
|
-
*
|
|
10
|
-
* dev mode (AGENT-2560). Preserve file paths and stack traces for troubleshooting.
|
|
8
|
+
* DESIGN DECISION: Only sanitize actual secrets (API keys, tokens, JWTs).
|
|
9
|
+
* Preserve debugging info (emails, file paths, stack traces) for troubleshooting.
|
|
11
10
|
*
|
|
12
11
|
* @see engineering/projects/o11y-refactor/managed-cloud-telemetry.md#logging-strategy
|
|
13
12
|
*/
|
|
14
13
|
/**
|
|
15
|
-
* Sanitizes secrets
|
|
16
|
-
* Preserves debugging info (file paths,
|
|
14
|
+
* Sanitizes secrets from a log message string.
|
|
15
|
+
* Preserves debugging info (emails, file paths, etc.) for troubleshooting.
|
|
17
16
|
*/
|
|
18
17
|
export declare function sanitizeLogMessage(message: string): string;
|
|
19
18
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-sanitizer.d.ts","sourceRoot":"","sources":["../../src/util/log-sanitizer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"log-sanitizer.d.ts","sourceRoot":"","sources":["../../src/util/log-sanitizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAuDH;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAa1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOtD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,SAAI,GAAG,CAAC,CAsCzD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAM9D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,OAAO,EACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GACtB,MAAM,CAyDR"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Log Sanitizer for Vite Plugin
|
|
3
3
|
*
|
|
4
|
-
* Sanitizes secrets
|
|
4
|
+
* Sanitizes secrets from log messages while preserving debugging information.
|
|
5
5
|
* This is a lightweight version for the vite-plugin, avoiding a dependency
|
|
6
6
|
* on the telemetry package.
|
|
7
7
|
*
|
|
8
|
-
* DESIGN DECISION:
|
|
9
|
-
*
|
|
10
|
-
* dev mode (AGENT-2560). Preserve file paths and stack traces for troubleshooting.
|
|
8
|
+
* DESIGN DECISION: Only sanitize actual secrets (API keys, tokens, JWTs).
|
|
9
|
+
* Preserve debugging info (emails, file paths, stack traces) for troubleshooting.
|
|
11
10
|
*
|
|
12
11
|
* @see engineering/projects/o11y-refactor/managed-cloud-telemetry.md#logging-strategy
|
|
13
12
|
*/
|
|
@@ -36,17 +35,6 @@ const SECRET_PATTERNS = [
|
|
|
36
35
|
replacement: "[API_KEY_REDACTED]",
|
|
37
36
|
},
|
|
38
37
|
];
|
|
39
|
-
// ============================================================================
|
|
40
|
-
// PII Patterns - Should not appear in dev-server logs
|
|
41
|
-
// ============================================================================
|
|
42
|
-
const PII_PATTERNS = [
|
|
43
|
-
// Match email addresses; requires an alphabetic TLD to avoid false positives on @mentions
|
|
44
|
-
// and npm/pnpm version strings (e.g. package@1.2.3)
|
|
45
|
-
{
|
|
46
|
-
pattern: /[\w.+-]+@(?:[\w-]+\.)+[a-zA-Z]{2,}/g,
|
|
47
|
-
replacement: "[EMAIL REDACTED]",
|
|
48
|
-
},
|
|
49
|
-
];
|
|
50
38
|
/**
|
|
51
39
|
* Fields that contain secrets and should be stripped from log objects.
|
|
52
40
|
* Only includes actual secret field names - NOT debugging info like stack traces.
|
|
@@ -71,18 +59,15 @@ const SECRET_FIELDS = new Set([
|
|
|
71
59
|
// Public API
|
|
72
60
|
// ============================================================================
|
|
73
61
|
/**
|
|
74
|
-
* Sanitizes secrets
|
|
75
|
-
* Preserves debugging info (file paths,
|
|
62
|
+
* Sanitizes secrets from a log message string.
|
|
63
|
+
* Preserves debugging info (emails, file paths, etc.) for troubleshooting.
|
|
76
64
|
*/
|
|
77
65
|
export function sanitizeLogMessage(message) {
|
|
78
66
|
if (!message || typeof message !== "string") {
|
|
79
67
|
return message;
|
|
80
68
|
}
|
|
81
69
|
let sanitized = message;
|
|
82
|
-
for (const { pattern, replacement } of
|
|
83
|
-
...SECRET_PATTERNS,
|
|
84
|
-
...PII_PATTERNS,
|
|
85
|
-
]) {
|
|
70
|
+
for (const { pattern, replacement } of SECRET_PATTERNS) {
|
|
86
71
|
pattern.lastIndex = 0;
|
|
87
72
|
sanitized = sanitized.replace(pattern, replacement);
|
|
88
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-sanitizer.js","sourceRoot":"","sources":["../../src/util/log-sanitizer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"log-sanitizer.js","sourceRoot":"","sources":["../../src/util/log-sanitizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,+EAA+E;AAC/E,sDAAsD;AACtD,+EAA+E;AAE/E,MAAM,eAAe,GAAoD;IACvE,oBAAoB;IACpB;QACE,OAAO,EAAE,sCAAsC;QAC/C,WAAW,EAAE,cAAc;KAC5B;IACD;QACE,OAAO,EACL,oEAAoE;QACtE,WAAW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AAO,KAAK,KAAK,UAAU,EAAE,CAAC;YAChC,OAAO,cAAc,KAAK,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC;QACpD,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,YAAY,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC;QACzC,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,YAAY,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC;QACzC,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,EACD,KAAK,CACN,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/vite-plugin-file-sync",
|
|
3
|
-
"version": "2.0.119-next.
|
|
3
|
+
"version": "2.0.119-next.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"vite-plugin"
|
|
6
6
|
],
|
|
@@ -103,18 +103,17 @@
|
|
|
103
103
|
"yaml": "^2.7.1",
|
|
104
104
|
"yauzl": "^3.2.0",
|
|
105
105
|
"zod": "3.25.76",
|
|
106
|
-
"@superblocksteam/ai-service-templates": "2.0.119-next.
|
|
107
|
-
"@superblocksteam/clark": "2.0.119-next.
|
|
108
|
-
"@superblocksteam/library-shared": "2.0.119-next.
|
|
109
|
-
"@superblocksteam/sdk-api": "2.0.119-next.
|
|
110
|
-
"@superblocksteam/shared": "0.
|
|
111
|
-
"@superblocksteam/util": "2.0.119-next.
|
|
106
|
+
"@superblocksteam/ai-service-templates": "2.0.119-next.1",
|
|
107
|
+
"@superblocksteam/clark": "2.0.119-next.1",
|
|
108
|
+
"@superblocksteam/library-shared": "2.0.119-next.1",
|
|
109
|
+
"@superblocksteam/sdk-api": "2.0.119-next.1",
|
|
110
|
+
"@superblocksteam/shared": "0.9586.9",
|
|
111
|
+
"@superblocksteam/util": "2.0.119-next.1"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@ai-sdk/amazon-bedrock": "^4.0.96",
|
|
115
115
|
"@ai-sdk/google-vertex": "^4.0.112",
|
|
116
116
|
"@ai-sdk/test-server": "^1.0.3",
|
|
117
|
-
"@aws-sdk/credential-providers": "^3.848.0",
|
|
118
117
|
"@dotenvx/dotenvx": "^1.59.1",
|
|
119
118
|
"@eslint/js": "^9.39.2",
|
|
120
119
|
"@types/archiver": "^6.0.2",
|
|
@@ -149,7 +148,7 @@
|
|
|
149
148
|
"react-dom": "^18.3.1",
|
|
150
149
|
"tsx": "^4.19.3",
|
|
151
150
|
"typescript": "^5.9.3",
|
|
152
|
-
"typescript-eslint": "^8.
|
|
151
|
+
"typescript-eslint": "^8.54.0",
|
|
153
152
|
"vitest": "^4.0.17"
|
|
154
153
|
},
|
|
155
154
|
"engines": {
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Three-layer prompt architecture for the Security Agent.
|
|
3
|
-
*
|
|
4
|
-
* Layer 1: System Skeleton — agent identity, behavioral rules, output contract, safety.
|
|
5
|
-
* Layer 2: App Context — dynamic, per-app metadata to prevent false positives.
|
|
6
|
-
* Layer 3: Admin Policy Prompt — what to look for (from template or IT admin).
|
|
7
|
-
*/
|
|
8
|
-
export interface SecurityAgentAppContext {
|
|
9
|
-
integrations: Array<{
|
|
10
|
-
name: string;
|
|
11
|
-
pluginType: string;
|
|
12
|
-
}>;
|
|
13
|
-
}
|
|
14
|
-
export declare function buildSecurityAgentSkeleton(): string;
|
|
15
|
-
export declare function buildSecurityAgentAppContext(context: SecurityAgentAppContext): string;
|
|
16
|
-
export declare function composeSecurityAgentPrompt(appContext: SecurityAgentAppContext, adminPrompt?: string): string;
|
|
17
|
-
//# sourceMappingURL=build-security-scan-prompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-security-scan-prompt.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/agent/prompts/build-security-scan-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,KAAK,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;CACJ;AAOD,wBAAgB,0BAA0B,IAAI,MAAM,CAoDnD;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,uBAAuB,GAC/B,MAAM,CAwJR;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,uBAAuB,EACnC,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAYR"}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Three-layer prompt architecture for the Security Agent.
|
|
3
|
-
*
|
|
4
|
-
* Layer 1: System Skeleton — agent identity, behavioral rules, output contract, safety.
|
|
5
|
-
* Layer 2: App Context — dynamic, per-app metadata to prevent false positives.
|
|
6
|
-
* Layer 3: Admin Policy Prompt — what to look for (from template or IT admin).
|
|
7
|
-
*/
|
|
8
|
-
// Templates are stored in the review_policy_agent_template DB table and loaded
|
|
9
|
-
// at scan time. The fallback below is only used when no prompt is provided.
|
|
10
|
-
const DEFAULT_ADMIN_PROMPT = "Perform a comprehensive security review of this application. Report any security concern you find.";
|
|
11
|
-
export function buildSecurityAgentSkeleton() {
|
|
12
|
-
const today = new Date().toISOString().split("T")[0];
|
|
13
|
-
return `## Role
|
|
14
|
-
|
|
15
|
-
You are a policy enforcement agent for a Superblocks application. Your sole purpose is to
|
|
16
|
-
analyze the application's source files against the provided policy and produce a
|
|
17
|
-
structured findings report. You are NOT a builder — you must never modify files.
|
|
18
|
-
|
|
19
|
-
Today is ${today}.
|
|
20
|
-
|
|
21
|
-
## Scanning Procedure
|
|
22
|
-
|
|
23
|
-
1. **List files** — Use the file listing tools to enumerate all application files.
|
|
24
|
-
2. **Triage** — Prioritize security-relevant files: server-side code, API definitions, auth logic, config files, and files that handle user input. Skip auto-generated files, pure CSS/styling, and large JSON data fixtures.
|
|
25
|
-
3. **Read priority files** — Read the prioritized files. For large applications (100+ files), use grep to search for suspicious patterns (secrets, eval, dangerouslySetInnerHTML, etc.) across ALL files first, then read specific files flagged by grep.
|
|
26
|
-
4. **Analyze integrations** — Inspect integration configurations for leaked credentials or insecure settings.
|
|
27
|
-
5. **Deep dive** — Read additional files as needed based on grep results and cross-references.
|
|
28
|
-
6. **Report findings** — Call the \`reportReviewRun\` tool with your structured findings. Do NOT output JSON as text — always use the tool.
|
|
29
|
-
|
|
30
|
-
## Output Contract
|
|
31
|
-
|
|
32
|
-
You MUST call the \`reportReviewRun\` tool exactly once as your final action. The tool enforces the required schema. Example input:
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
"findings": [
|
|
36
|
-
{
|
|
37
|
-
"id": "finding-1",
|
|
38
|
-
"category": "secret",
|
|
39
|
-
"severity": "critical",
|
|
40
|
-
"title": "Hardcoded API key in config",
|
|
41
|
-
"description": "An API key is hardcoded in the configuration file.",
|
|
42
|
-
"location": { "file": "config.ts", "line": 42 },
|
|
43
|
-
"evidence": "const API_KEY = '***'",
|
|
44
|
-
"suggestedFix": "Move the API key to an environment variable or integration secret.",
|
|
45
|
-
"confidence": "high"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"summary": { "critical": 1, "high": 0, "medium": 0, "low": 0, "info": 0, "total": 1 },
|
|
49
|
-
"scannedFiles": 12,
|
|
50
|
-
"scanComplete": true
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
## Critical Rules
|
|
54
|
-
|
|
55
|
-
- **ALWAYS call \`reportReviewRun\`** to submit your results. Never output findings as raw text or JSON.
|
|
56
|
-
- **NEVER include raw secret values** in your output. Redact them with \`***\` (e.g., \`"const API_KEY = '***'"\`).
|
|
57
|
-
- **NEVER modify files.** You are a read-only reviewer. Do not call any write, edit, or delete tools.
|
|
58
|
-
- **NEVER hallucinate findings.** Only report issues backed by evidence you found in the source code. If a file is clean, do not invent problems.
|
|
59
|
-
- **Respect developer comments explaining security decisions.** If a comment explains why a particular pattern is used (e.g., a platform limitation, a deliberate trade-off), acknowledge it in your finding, adjust severity accordingly, and do NOT suggest a fix the comment already says does not work.
|
|
60
|
-
- **Severity must match actual exploitability.** "critical" means an attacker can exploit it with no mitigations. If the code has mitigations (input validation, escaping, platform-level access control), lower the severity. Manual SQL escaping with a documented platform limitation is NOT "critical" — it is "medium" or "low".
|
|
61
|
-
- If no issues are found, call \`reportReviewRun\` with an empty findings array, all summary counts at zero, and \`scanComplete: true\`.`;
|
|
62
|
-
}
|
|
63
|
-
export function buildSecurityAgentAppContext(context) {
|
|
64
|
-
const sections = [
|
|
65
|
-
`## Superblocks Application Context
|
|
66
|
-
|
|
67
|
-
This is a Superblocks application. Superblocks is a low-code platform where applications
|
|
68
|
-
are built with React components on the client side and server-side API steps that run in
|
|
69
|
-
a sandboxed environment. Understanding the platform's architecture is critical to avoid
|
|
70
|
-
false positives.
|
|
71
|
-
|
|
72
|
-
**Authentication and authorization are handled by the platform.** Users must be authenticated
|
|
73
|
-
to access any Superblocks application, and each application has its own access control list.
|
|
74
|
-
Only users who have been granted access to an application can view it or call its APIs.
|
|
75
|
-
Do NOT flag APIs for "missing authentication" or "missing authorization" simply because
|
|
76
|
-
the API code does not contain explicit auth checks — the platform enforces these before
|
|
77
|
-
any application code runs. Only flag authorization issues when an API accepts a sensitive
|
|
78
|
-
identifier (like a user ID or role) from client input and uses it for access decisions
|
|
79
|
-
instead of reading the authenticated user from the server-side context (\`Global.user\`
|
|
80
|
-
or \`ctx.user\`).`,
|
|
81
|
-
];
|
|
82
|
-
sections.push(`### Execution Model
|
|
83
|
-
|
|
84
|
-
- **Client code** runs in the browser (React components, pages, custom components).
|
|
85
|
-
- **Server code** runs in a sandboxed environment (API steps, backend logic). Console output
|
|
86
|
-
from server steps is internal and not exposed to end users.
|
|
87
|
-
- **Bindings** use \`{{ }}\` syntax (e.g., \`{{ Input1.value }}\`). These are NOT eval-style
|
|
88
|
-
injection — they are evaluated in a controlled sandbox.
|
|
89
|
-
- Each API step runs in isolation. Variables do not leak between steps unless explicitly passed.`);
|
|
90
|
-
sections.push(`### Integration Model
|
|
91
|
-
|
|
92
|
-
Superblocks manages database and API connections through **integrations**. Integrations are
|
|
93
|
-
configured via the platform's UI and referenced in code by their UUID. Important:
|
|
94
|
-
|
|
95
|
-
- **Integration UUIDs are NOT hardcoded secrets.** They are internal references to managed
|
|
96
|
-
connections. Do NOT flag them as hardcoded credentials.
|
|
97
|
-
- Credentials for integrations (passwords, API keys, connection strings) are stored securely
|
|
98
|
-
by the platform and injected at runtime — they never appear in application source code.
|
|
99
|
-
- If you see a UUID like \`228d92c5-d4e3-44d2-824c-7fd0674351d3\` used as an integration
|
|
100
|
-
reference, this is expected platform behavior.`);
|
|
101
|
-
if (context.integrations.length > 0) {
|
|
102
|
-
const integrationList = context.integrations
|
|
103
|
-
.map((i) => `- **${i.name}** (${i.pluginType})`)
|
|
104
|
-
.join("\n");
|
|
105
|
-
sections.push(`### Integrations In Use
|
|
106
|
-
|
|
107
|
-
This application has the following integrations configured:
|
|
108
|
-
|
|
109
|
-
${integrationList}
|
|
110
|
-
|
|
111
|
-
These are managed connections. Their presence in code as references is expected.`);
|
|
112
|
-
}
|
|
113
|
-
sections.push(`### Server-Side API Model
|
|
114
|
-
|
|
115
|
-
Server-side logic is defined as **API steps** — TypeScript (or YAML) functions that run
|
|
116
|
-
in a sandboxed Node.js environment on the server. Key points:
|
|
117
|
-
|
|
118
|
-
- Client code calls APIs via hooks from \`@superblocksteam/library\`:
|
|
119
|
-
- \`useApiData("GetUsers", { email })\` — declarative, auto-fetches on mount and when inputs change.
|
|
120
|
-
- \`useApi("CreateOrder")\` — imperative, call \`run()\` manually for event-driven actions.
|
|
121
|
-
- \`executeApi("MyApi", { param })\` — plain Promise outside React (utility functions, event handlers).
|
|
122
|
-
These are standard, platform-sanctioned patterns — not security concerns.
|
|
123
|
-
- Each API step runs in isolation. Variables do not leak between steps unless explicitly
|
|
124
|
-
passed via \`return\` / \`output\`.
|
|
125
|
-
- Console output from API steps is internal (visible to the developer in the editor) and
|
|
126
|
-
NOT exposed to end users in deployed apps.
|
|
127
|
-
- API steps can reference integrations by UUID to execute queries against databases or
|
|
128
|
-
external services. The platform injects credentials at runtime.
|
|
129
|
-
|
|
130
|
-
#### SQL Parameterization
|
|
131
|
-
|
|
132
|
-
Superblocks SQL blocks support **parameterized queries** using \`parameters: "[var1, var2]"\`
|
|
133
|
-
with database-specific placeholders (e.g., \`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake,
|
|
134
|
-
\`@PARAM_1\` for MSSQL). When reviewing SQL code:
|
|
135
|
-
|
|
136
|
-
- **Parameterized queries are safe.** If a query uses placeholders and a \`parameters\` array,
|
|
137
|
-
it is NOT vulnerable to SQL injection — do not flag it.
|
|
138
|
-
- **Binding functions for dynamic SQL elements** (table names, column names) are acceptable
|
|
139
|
-
platform patterns: \`statement: ({ tableName }) => \\\`SELECT * FROM \\\${tableName}\\\`\`.
|
|
140
|
-
These run in the sandbox and cannot be manipulated by end users unless the input originates
|
|
141
|
-
from unvalidated user input.
|
|
142
|
-
- **Flag as injection risk** only when raw user input is interpolated directly into SQL
|
|
143
|
-
without parameterization or validation.
|
|
144
|
-
|
|
145
|
-
#### Permissions (Global Object)
|
|
146
|
-
|
|
147
|
-
Server-side API steps have access to a \`Global\` object injected by the platform:
|
|
148
|
-
|
|
149
|
-
\`\`\`typescript
|
|
150
|
-
Global.user // { email, username, id, name, groups }
|
|
151
|
-
Global.groups // Group[] — organization groups
|
|
152
|
-
\`\`\`
|
|
153
|
-
|
|
154
|
-
The standard authorization pattern is \`Global.groups.some(g => g.name === "Admin")\`.
|
|
155
|
-
This is the correct way to implement RBAC in Superblocks APIs — it is NOT a security
|
|
156
|
-
concern. However, DO flag authorization checks that rely solely on frontend data
|
|
157
|
-
(e.g., a user role passed as an API input from the client) instead of \`Global\`.`);
|
|
158
|
-
sections.push(`### Platform Hooks (Safe Patterns)
|
|
159
|
-
|
|
160
|
-
Superblocks provides built-in React hooks that are part of the platform. Their usage is
|
|
161
|
-
expected and should NOT be flagged as security concerns:
|
|
162
|
-
|
|
163
|
-
- \`useSuperblocksUser()\` — returns current user info (name, email, id, groups). This is
|
|
164
|
-
the standard way to access the authenticated user. It is NOT PII leakage.
|
|
165
|
-
- \`useSuperblocksGroups()\` — returns organization groups. Standard RBAC pattern.
|
|
166
|
-
- \`useSuperblocksDataTags()\` / \`setDataTag()\` — switches between data environments
|
|
167
|
-
(e.g., staging vs production data). This is a platform feature, not a config leak.
|
|
168
|
-
- \`getAppMode()\` — returns "EDIT", "PREVIEW", or "PUBLISHED". Safe runtime context.
|
|
169
|
-
- \`useEmbedProperties()\` — reads properties from a parent iframe embedder. This is
|
|
170
|
-
the standard Superblocks embed SDK pattern, not a postMessage injection risk.
|
|
171
|
-
- \`useEmbedEvent()\` / \`useEmitEmbedEvent()\` — bidirectional event communication with
|
|
172
|
-
the embedding page. Part of the official embed SDK.
|
|
173
|
-
- \`logoutIntegrations()\` — clears OAuth tokens for integrations. Standard logout pattern.`);
|
|
174
|
-
sections.push(`### Environments & Data Tags
|
|
175
|
-
|
|
176
|
-
Superblocks apps run in three environments: **Edit** (developer), **Preview** (testing),
|
|
177
|
-
and **Production** (deployed). Each environment can have different **data tags** (also
|
|
178
|
-
called "profiles") that control which data sources, credentials, and configurations are
|
|
179
|
-
active.
|
|
180
|
-
|
|
181
|
-
- Superblocks does NOT use traditional feature flags or environment variables. Instead,
|
|
182
|
-
apps use \`getAppMode()\` to branch behavior by environment, and \`useSuperblocksDataTags()\`
|
|
183
|
-
to switch between data contexts (e.g., staging vs production databases).
|
|
184
|
-
- When suggesting fixes that require environment-specific behavior (e.g., "enable this
|
|
185
|
-
only in development"), recommend using \`getAppMode()\` or data tags — not feature flags
|
|
186
|
-
or environment variables, which are not available in the Superblocks runtime.`);
|
|
187
|
-
sections.push(`### Framework & Runtime
|
|
188
|
-
|
|
189
|
-
- UI is built with **React** and **Tailwind CSS v4** with shadcn/Radix UI components.
|
|
190
|
-
- Routing uses **react-router v7** in data mode.
|
|
191
|
-
- Custom components are sandboxed — they can use React hooks and local state but cannot
|
|
192
|
-
call APIs directly (data must be passed via props).
|
|
193
|
-
- The design system uses semantic tokens defined in \`index.css\`.`);
|
|
194
|
-
sections.push(`### Additional Platform Documentation
|
|
195
|
-
|
|
196
|
-
For deeper understanding of Superblocks patterns, you can read the platform skill files
|
|
197
|
-
using \`build_readFile\`:
|
|
198
|
-
|
|
199
|
-
- \`skills/system/superblocks-frontend/SKILL.md\` — frontend patterns, hooks, component model.
|
|
200
|
-
- \`skills/system/superblocks-api/SKILL.md\` — API block types, SQL patterns, control flow.
|
|
201
|
-
- \`skills/system/superblocks-api/references/sql-databases.md\` — database-specific parameterization syntax.
|
|
202
|
-
|
|
203
|
-
Read these if you encounter code patterns you do not recognize and need to determine
|
|
204
|
-
whether they are safe platform conventions or genuine security concerns.`);
|
|
205
|
-
return sections.join("\n\n");
|
|
206
|
-
}
|
|
207
|
-
export function composeSecurityAgentPrompt(appContext, adminPrompt) {
|
|
208
|
-
const skeleton = buildSecurityAgentSkeleton();
|
|
209
|
-
const context = buildSecurityAgentAppContext(appContext);
|
|
210
|
-
const policy = adminPrompt ?? DEFAULT_ADMIN_PROMPT;
|
|
211
|
-
return `${skeleton}
|
|
212
|
-
|
|
213
|
-
${context}
|
|
214
|
-
|
|
215
|
-
## Policy: What to Review
|
|
216
|
-
|
|
217
|
-
${policy}`;
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=build-security-scan-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-security-scan-prompt.js","sourceRoot":"","sources":["../../../../src/ai-service/agent/prompts/build-security-scan-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,+EAA+E;AAC/E,4EAA4E;AAC5E,MAAM,oBAAoB,GACxB,oGAAoG,CAA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;AAC/B,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,UAAmC,EACnC,WAAoB;IAEpB,MAAM,QAAQ,GAAG,0BAA0B,EAAE,CAAC;IAC9C,MAAM,OAAO,GAAG,4BAA4B,CAAC,UAAU,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,WAAW,IAAI,oBAAoB,CAAC;IAEnD,OAAO,GAAG,QAAQ;;EAElB,OAAO;;;;EAIP,MAAM,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ApiExecutionResult } from "./api-executor.js";
|
|
2
|
-
export interface ApiComparisonDiffEntry {
|
|
3
|
-
path: string;
|
|
4
|
-
kind: "missing_key" | "extra_key" | "type_mismatch" | "null_mismatch" | "cardinality_mismatch" | "value_mismatch";
|
|
5
|
-
expectedType?: string;
|
|
6
|
-
actualType?: string;
|
|
7
|
-
expectedLength?: number;
|
|
8
|
-
actualLength?: number;
|
|
9
|
-
expectedHash?: string;
|
|
10
|
-
actualHash?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Human-readable failure message when one side errored. Only set by the
|
|
13
|
-
* one-sided-failure divergence path in runMigrationVerification (where the
|
|
14
|
-
* underlying side has a systemError or errors[] available); never set by
|
|
15
|
-
* the structural diff in compareApiResults (whose entries describe value
|
|
16
|
-
* shape differences, not execution failures).
|
|
17
|
-
*/
|
|
18
|
-
failureMessage?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ApiComparisonDiffValueEntry {
|
|
21
|
-
path: string;
|
|
22
|
-
expected: unknown;
|
|
23
|
-
actual: unknown;
|
|
24
|
-
reason: string;
|
|
25
|
-
}
|
|
26
|
-
export interface ApiComparisonDiff {
|
|
27
|
-
empty: boolean;
|
|
28
|
-
valuesForUi: ApiComparisonDiffValueEntry[];
|
|
29
|
-
summaryForAgent: ApiComparisonDiffEntry[];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Compare the outputs of a v2 YAML execution against a v3 TS execution.
|
|
33
|
-
* Pure function: no I/O, no side effects.
|
|
34
|
-
*/
|
|
35
|
-
export declare function compareApiResults(v2: Pick<ApiExecutionResult, "success" | "outputs">, v3: Pick<ApiExecutionResult, "success" | "outputs">): ApiComparisonDiff;
|
|
36
|
-
//# sourceMappingURL=api-comparator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-comparator.d.ts","sourceRoot":"","sources":["../../../../../src/ai-service/agent/tools/apis/api-comparator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EACA,aAAa,GACb,WAAW,GACX,eAAe,GACf,eAAe,GACf,sBAAsB,GACtB,gBAAgB,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAC3C,eAAe,EAAE,sBAAsB,EAAE,CAAC;CAC3C;AA+YD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,SAAS,CAAC,EACnD,EAAE,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,SAAS,CAAC,GAClD,iBAAiB,CAwBnB"}
|