@slycode/slycode 0.2.22 → 0.2.24
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/bridge/api.d.ts +2 -1
- package/dist/bridge/api.js +114 -1
- package/dist/bridge/api.js.map +1 -1
- package/dist/bridge/git-utils.d.ts +9 -0
- package/dist/bridge/git-utils.js +49 -0
- package/dist/bridge/git-utils.js.map +1 -0
- package/dist/bridge/index.js +8 -2
- package/dist/bridge/index.js.map +1 -1
- package/dist/bridge/response-store.d.ts +46 -0
- package/dist/bridge/response-store.js +95 -0
- package/dist/bridge/response-store.js.map +1 -0
- package/dist/bridge/session-manager.d.ts +33 -1
- package/dist/bridge/session-manager.js +185 -2
- package/dist/bridge/session-manager.js.map +1 -1
- package/dist/bridge/types.d.ts +37 -0
- package/dist/data/scaffold-templates/tutorial-project/documentation/kanban.json +1 -1
- package/dist/messaging/bridge-client.d.ts +4 -0
- package/dist/messaging/bridge-client.js +20 -1
- package/dist/messaging/bridge-client.js.map +1 -1
- package/dist/messaging/index.js +38 -10
- package/dist/messaging/index.js.map +1 -1
- package/dist/scripts/kanban.js +448 -2
- package/dist/scripts/scaffold.js +40 -1
- package/dist/store/actions/approve.md +1 -1
- package/dist/store/actions/challenge-implementation.md +149 -0
- package/dist/store/actions/challenge.md +119 -0
- package/dist/store/actions/checkpoint.md +2 -2
- package/dist/store/actions/context.md +3 -3
- package/dist/store/actions/create-card.md +1 -1
- package/dist/store/actions/deep-design.md +13 -3
- package/dist/store/actions/design-requirements.md +11 -1
- package/dist/store/actions/explore.md +1 -1
- package/dist/store/actions/implement.md +1 -1
- package/dist/store/actions/onboard.md +2 -4
- package/dist/store/actions/show-card.md +2 -2
- package/dist/store/actions/summarize.md +3 -3
- package/dist/store/actions/test-review.md +1 -1
- package/dist/store/skills/kanban/SKILL.md +77 -3
- package/dist/web/.next/BUILD_ID +1 -1
- package/dist/web/.next/app-path-routes-manifest.json +1 -0
- package/dist/web/.next/build-manifest.json +2 -2
- package/dist/web/.next/prerender-manifest.json +3 -3
- package/dist/web/.next/routes-manifest.json +6 -0
- package/dist/web/.next/server/app/_global-error.html +2 -2
- package/dist/web/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/app/_not-found.html +1 -1
- package/dist/web/.next/server/app/_not-found.rsc +10 -10
- package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +10 -10
- package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/web/.next/server/app/api/changelog/route/app-paths-manifest.json +3 -0
- package/dist/web/.next/server/app/api/changelog/route/build-manifest.json +11 -0
- package/dist/web/.next/server/app/api/changelog/route/server-reference-manifest.json +4 -0
- package/dist/web/.next/server/app/api/changelog/route.js +7 -0
- package/dist/web/.next/server/app/api/changelog/route.js.map +5 -0
- package/dist/web/.next/server/app/api/changelog/route.js.nft.json +1 -0
- package/dist/web/.next/server/app/api/changelog/route_client-reference-manifest.js +2 -0
- package/dist/web/.next/server/app/api/cli-assets/assistant/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/fix/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/import/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/store/preview/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/store/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/sync/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/updates/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/dashboard/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/file/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/git-status/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/kanban/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/kanban/stream/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/projects/reorder/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/scheduler/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/search/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/sly-actions/invalidate/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/sly-actions/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/version-check/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/page.js.nft.json +1 -1
- package/dist/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/app/project/[id]/page.js.nft.json +1 -1
- package/dist/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/app-paths-manifest.json +1 -0
- package/dist/web/.next/server/chunks/[root-of-the-server]__92f81907._.js +1 -1
- package/dist/web/.next/server/chunks/[root-of-the-server]__a259539f._.js +3 -0
- package/dist/web/.next/server/chunks/_next-internal_server_app_api_changelog_route_actions_d6e239bf.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_18324462.js +1 -1
- package/dist/web/.next/server/chunks/src_lib_scheduler_ts_03988e3e._.js +1 -1
- package/dist/web/.next/server/chunks/src_lib_scheduler_ts_7120457c._.js +1 -1
- package/dist/web/.next/server/chunks/ssr/[root-of-the-server]__1f5fc489._.js +4 -3
- package/dist/web/.next/server/chunks/ssr/{[root-of-the-server]__077f472c._.js → [root-of-the-server]__6183d28c._.js} +1 -1
- package/dist/web/.next/server/chunks/ssr/[root-of-the-server]__bcbe4bf2._.js +4 -3
- package/dist/web/.next/server/chunks/ssr/src_components_Dashboard_tsx_efc4dc27._.js +1 -1
- package/dist/web/.next/server/chunks/ssr/src_components_c4135402._.js +1 -1
- package/dist/web/.next/server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js +1 -1
- package/dist/web/.next/server/pages/404.html +1 -1
- package/dist/web/.next/server/pages/500.html +2 -2
- package/dist/web/.next/server/server-reference-manifest.js +1 -1
- package/dist/web/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/.next/static/chunks/293449b828207656.css +1 -0
- package/dist/web/.next/static/chunks/{8415039c5941cf5c.js → 3a5721af09d1c753.js} +4 -3
- package/dist/web/.next/static/chunks/{8fb2a99c64580de7.js → 98311243e9a5a0ec.js} +1 -1
- package/dist/web/.next/static/chunks/{b8e0c1aeea4a14bc.js → a47f36b030917d1f.js} +1 -1
- package/dist/web/.next/static/chunks/d60c422421920130.js +5 -0
- package/dist/web/.next/static/chunks/{f55f3c8c1a52f80c.js → f566a4b05a9cd6ba.js} +1 -1
- package/dist/web/.next/static/chunks/{4049cceee6a49323.js → fa78afe3ceed998b.js} +1 -1
- package/dist/web/src/app/api/changelog/route.ts +45 -0
- package/dist/web/src/app/api/kanban/route.ts +52 -12
- package/dist/web/src/app/api/terminal-classes/route.ts +43 -4
- package/dist/web/src/components/ActivityFeed.tsx +3 -0
- package/dist/web/src/components/BranchTab.tsx +115 -0
- package/dist/web/src/components/ChangelogModal.tsx +233 -0
- package/dist/web/src/components/Dashboard.tsx +11 -0
- package/dist/web/src/components/GlobalClaudePanel.tsx +6 -0
- package/dist/web/src/components/ProjectKanban.tsx +38 -8
- package/dist/web/src/components/VersionUpdateToast.tsx +6 -4
- package/dist/web/src/components/VoiceControlBar.tsx +1 -1
- package/dist/web/src/lib/scheduler.ts +2 -1
- package/dist/web/src/lib/types.ts +24 -0
- package/dist/web/tsconfig.tsbuildinfo +1 -1
- package/lib/cli/sync.d.ts +7 -0
- package/lib/cli/sync.d.ts.map +1 -1
- package/lib/cli/sync.js +25 -0
- package/lib/cli/sync.js.map +1 -1
- package/lib/cli/update.d.ts.map +1 -1
- package/lib/cli/update.js +9 -0
- package/lib/cli/update.js.map +1 -1
- package/package.json +1 -1
- package/templates/changelog.json +268 -0
- package/templates/kanban-seed.json +1 -1
- package/templates/store/actions/approve.md +1 -1
- package/templates/store/actions/challenge-implementation.md +149 -0
- package/templates/store/actions/challenge.md +119 -0
- package/templates/store/actions/checkpoint.md +2 -2
- package/templates/store/actions/context.md +3 -3
- package/templates/store/actions/create-card.md +1 -1
- package/templates/store/actions/deep-design.md +13 -3
- package/templates/store/actions/design-requirements.md +11 -1
- package/templates/store/actions/explore.md +1 -1
- package/templates/store/actions/implement.md +1 -1
- package/templates/store/actions/onboard.md +2 -4
- package/templates/store/actions/show-card.md +2 -2
- package/templates/store/actions/summarize.md +3 -3
- package/templates/store/actions/test-review.md +1 -1
- package/templates/store/skills/kanban/SKILL.md +77 -3
- package/templates/terminal-classes.json +51 -0
- package/templates/tutorial-project/documentation/kanban.json +1 -1
- package/templates/updates/actions/approve.md +1 -1
- package/templates/updates/actions/challenge-implementation.md +149 -0
- package/templates/updates/actions/challenge.md +119 -0
- package/templates/updates/actions/checkpoint.md +2 -2
- package/templates/updates/actions/context.md +3 -3
- package/templates/updates/actions/create-card.md +1 -1
- package/templates/updates/actions/deep-design.md +13 -3
- package/templates/updates/actions/design-requirements.md +11 -1
- package/templates/updates/actions/explore.md +1 -1
- package/templates/updates/actions/implement.md +1 -1
- package/templates/updates/actions/onboard.md +2 -4
- package/templates/updates/actions/show-card.md +2 -2
- package/templates/updates/actions/summarize.md +3 -3
- package/templates/updates/actions/test-review.md +1 -1
- package/templates/updates/skills/kanban/SKILL.md +77 -3
- package/dist/web/.next/static/chunks/18cfbdd7e977bb01.css +0 -1
- package/dist/web/.next/static/chunks/a0f5f9cdee8a22c1.js +0 -4
- /package/dist/web/.next/static/{b2V8jC3HBMi4vgm7Kie3H → O1Ine2WtyXv6EQJcwHyOV}/_buildManifest.js +0 -0
- /package/dist/web/.next/static/{b2V8jC3HBMi4vgm7Kie3H → O1Ine2WtyXv6EQJcwHyOV}/_clientMiddlewareManifest.json +0 -0
- /package/dist/web/.next/static/{b2V8jC3HBMi4vgm7Kie3H → O1Ine2WtyXv6EQJcwHyOV}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../README.md","../../../../../eslint.config.mjs","../../../../../next.config.ts","../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js","../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../node_modules/next/dist/lib/constants.js","../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../node_modules/next/dist/lib/is-error.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../node_modules/next/package.json","../../../../../package-lock.json","../../../../../package.json","../../../../../postcss.config.mjs","../../../../../public/favicon.png","../../../../../public/file.svg","../../../../../public/globe.svg","../../../../../public/next.svg","../../../../../public/slycode.webp","../../../../../public/slycode_light.webp","../../../../../public/slycode_logo.webp","../../../../../public/slycode_logo_light.webp","../../../../../public/vercel.svg","../../../../../public/window.svg","../../../../../src/app/api/areas/route.ts","../../../../../src/app/api/bridge/[...path]/route.ts","../../../../../src/app/api/cli-assets/assistant/route.ts","../../../../../src/app/api/cli-assets/fix/route.ts","../../../../../src/app/api/cli-assets/import/route.ts","../../../../../src/app/api/cli-assets/route.ts","../../../../../src/app/api/cli-assets/store/preview/route.ts","../../../../../src/app/api/cli-assets/store/route.ts","../../../../../src/app/api/cli-assets/sync/route.ts","../../../../../src/app/api/cli-assets/updates/route.ts","../../../../../src/app/api/dashboard/route.ts","../../../../../src/app/api/events/route.ts","../../../../../src/app/api/file/route.ts","../../../../../src/app/api/git-status/route.ts","../../../../../src/app/api/kanban/route.ts","../../../../../src/app/api/kanban/stream/route.ts","../../../../../src/app/api/projects/[id]/route.ts","../../../../../src/app/api/projects/analyze/route.ts","../../../../../src/app/api/projects/reorder/route.ts","../../../../../src/app/api/projects/route.ts","../../../../../src/app/api/providers/route.ts","../../../../../src/app/api/scheduler/route.ts","../../../../../src/app/api/search/route.ts","../../../../../src/app/api/settings/route.ts","../../../../../src/app/api/sly-actions/invalidate/route.ts","../../../../../src/app/api/sly-actions/route.ts","../../../../../src/app/api/sly-actions/stream/route.ts","../../../../../src/app/api/system-stats/route.ts","../../../../../src/app/api/terminal-classes/route.ts","../../../../../src/app/api/transcribe/route.ts","../../../../../src/app/api/version-check/route.ts","../../../../../src/app/globals.css","../../../../../src/app/layout.tsx","../../../../../src/app/page.tsx","../../../../../src/app/project/[id]/page.tsx","../../../../../src/components/ActionUpdatesModal.tsx","../../../../../src/components/ActivityFeed.tsx","../../../../../src/components/AddProjectModal.tsx","../../../../../src/components/AssetAssistant.tsx","../../../../../src/components/AssetMatrix.tsx","../../../../../src/components/AssetViewer.tsx","../../../../../src/components/AutomationConfig.tsx","../../../../../src/components/AutomationsScreen.tsx","../../../../../src/components/CardModal.tsx","../../../../../src/components/ClaudeTerminalPanel.tsx","../../../../../src/components/CliAssetsTab.tsx","../../../../../src/components/ConfirmDialog.tsx","../../../../../src/components/ConnectionStatusIndicator.tsx","../../../../../src/components/ContextMenu.tsx","../../../../../src/components/Dashboard.tsx","../../../../../src/components/FloatingVoiceWidget.tsx","../../../../../src/components/GlobalClaudePanel.tsx","../../../../../src/components/HealthDot.tsx","../../../../../src/components/HealthMonitor.tsx","../../../../../src/components/KanbanCardItem.tsx","../../../../../src/components/KanbanColumn.tsx","../../../../../src/components/MarkdownContent.tsx","../../../../../src/components/PlatformBadges.tsx","../../../../../src/components/ProjectCard.tsx","../../../../../src/components/ProjectHeader.tsx","../../../../../src/components/ProjectKanban.tsx","../../../../../src/components/ProjectPageClient.tsx","../../../../../src/components/ProjectView.tsx","../../../../../src/components/SearchBar.tsx","../../../../../src/components/SkillDiffViewer.tsx","../../../../../src/components/SlyActionConfigModal.tsx","../../../../../src/components/StoreView.tsx","../../../../../src/components/Terminal.tsx","../../../../../src/components/ThemeToggle.tsx","../../../../../src/components/UpdatesView.tsx","../../../../../src/components/VersionUpdateToast.tsx","../../../../../src/components/VoiceControlBar.tsx","../../../../../src/components/VoiceErrorPopup.tsx","../../../../../src/components/VoiceSettingsPopover.tsx","../../../../../src/contexts/VoiceContext.tsx","../../../../../src/hooks/useConnectionStatus.ts","../../../../../src/hooks/useKeyboardShortcuts.ts","../../../../../src/hooks/usePolling.ts","../../../../../src/hooks/useSettings.ts","../../../../../src/hooks/useSlyActionsConfig.ts","../../../../../src/hooks/useVoiceRecorder.ts","../../../../../src/hooks/useVoiceShortcuts.ts","../../../../../src/instrumentation.ts","../../../../../src/lib/action-scanner.ts","../../../../../src/lib/asset-scanner.ts","../../../../../src/lib/connection-manager.ts","../../../../../src/lib/cron-utils.ts","../../../../../src/lib/event-log.ts","../../../../../src/lib/health-score.ts","../../../../../src/lib/kanban-paths.ts","../../../../../src/lib/mcp-common.ts","../../../../../src/lib/paths.ts","../../../../../src/lib/provider-paths.ts","../../../../../src/lib/registry.ts","../../../../../src/lib/scheduler.ts","../../../../../src/lib/sly-actions.ts","../../../../../src/lib/store-scanner.ts","../../../../../src/lib/tab-sync.ts","../../../../../src/lib/terminal-events.ts","../../../../../src/lib/types.ts","../../../../../src/lib/webm-to-ogg-opus.ts","../../../../../tsconfig.json","../../../../../tsconfig.tsbuildinfo","../../../chunks/ssr/[root-of-the-server]__0841f0b5._.js","../../../chunks/ssr/[root-of-the-server]__193dbb5b._.js","../../../chunks/ssr/[root-of-the-server]__2f64210a._.js","../../../chunks/ssr/[root-of-the-server]__43d93717._.js","../../../chunks/ssr/[root-of-the-server]__72142a5d._.js","../../../chunks/ssr/[root-of-the-server]__b6871b66._.js","../../../chunks/ssr/[root-of-the-server]__bcbe4bf2._.js","../../../chunks/ssr/[turbopack]_runtime.js","../../../chunks/ssr/_3fbadc17._.js","../../../chunks/ssr/_8afd7611._.js","../../../chunks/ssr/_next-internal_server_app_project_[id]_page_actions_d20b4a2c.js","../../../chunks/ssr/node_modules_next_dist_174ae28d._.js","../../../chunks/ssr/node_modules_next_dist_4b63a0e1._.js","../../../chunks/ssr/node_modules_next_dist_client_components_9774470f._.js","../../../chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js","../../../chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js","../../../chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js","../../../chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js","../../../chunks/ssr/node_modules_next_dist_f9713a08._.js","../../../chunks/ssr/src_components_c4135402._.js","../../../chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js","../../../chunks/ssr/src_lib_registry_ts_2fc87c9c._.js","./page/react-loadable-manifest.json","./page_client-reference-manifest.js"]}
|
|
1
|
+
{"version":1,"files":["../../../../../README.md","../../../../../eslint.config.mjs","../../../../../next.config.ts","../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js","../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../node_modules/next/dist/lib/constants.js","../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../node_modules/next/dist/lib/is-error.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../node_modules/next/package.json","../../../../../package-lock.json","../../../../../package.json","../../../../../postcss.config.mjs","../../../../../public/favicon.png","../../../../../public/file.svg","../../../../../public/globe.svg","../../../../../public/next.svg","../../../../../public/slycode.webp","../../../../../public/slycode_light.webp","../../../../../public/slycode_logo.webp","../../../../../public/slycode_logo_light.webp","../../../../../public/vercel.svg","../../../../../public/window.svg","../../../../../src/app/api/areas/route.ts","../../../../../src/app/api/bridge/[...path]/route.ts","../../../../../src/app/api/changelog/route.ts","../../../../../src/app/api/cli-assets/assistant/route.ts","../../../../../src/app/api/cli-assets/fix/route.ts","../../../../../src/app/api/cli-assets/import/route.ts","../../../../../src/app/api/cli-assets/route.ts","../../../../../src/app/api/cli-assets/store/preview/route.ts","../../../../../src/app/api/cli-assets/store/route.ts","../../../../../src/app/api/cli-assets/sync/route.ts","../../../../../src/app/api/cli-assets/updates/route.ts","../../../../../src/app/api/dashboard/route.ts","../../../../../src/app/api/events/route.ts","../../../../../src/app/api/file/route.ts","../../../../../src/app/api/git-status/route.ts","../../../../../src/app/api/kanban/route.ts","../../../../../src/app/api/kanban/stream/route.ts","../../../../../src/app/api/projects/[id]/route.ts","../../../../../src/app/api/projects/analyze/route.ts","../../../../../src/app/api/projects/reorder/route.ts","../../../../../src/app/api/projects/route.ts","../../../../../src/app/api/providers/route.ts","../../../../../src/app/api/scheduler/route.ts","../../../../../src/app/api/search/route.ts","../../../../../src/app/api/settings/route.ts","../../../../../src/app/api/sly-actions/invalidate/route.ts","../../../../../src/app/api/sly-actions/route.ts","../../../../../src/app/api/sly-actions/stream/route.ts","../../../../../src/app/api/system-stats/route.ts","../../../../../src/app/api/terminal-classes/route.ts","../../../../../src/app/api/transcribe/route.ts","../../../../../src/app/api/version-check/route.ts","../../../../../src/app/globals.css","../../../../../src/app/layout.tsx","../../../../../src/app/page.tsx","../../../../../src/app/project/[id]/page.tsx","../../../../../src/components/ActionUpdatesModal.tsx","../../../../../src/components/ActivityFeed.tsx","../../../../../src/components/AddProjectModal.tsx","../../../../../src/components/AssetAssistant.tsx","../../../../../src/components/AssetMatrix.tsx","../../../../../src/components/AssetViewer.tsx","../../../../../src/components/AutomationConfig.tsx","../../../../../src/components/AutomationsScreen.tsx","../../../../../src/components/BranchTab.tsx","../../../../../src/components/CardModal.tsx","../../../../../src/components/ChangelogModal.tsx","../../../../../src/components/ClaudeTerminalPanel.tsx","../../../../../src/components/CliAssetsTab.tsx","../../../../../src/components/ConfirmDialog.tsx","../../../../../src/components/ConnectionStatusIndicator.tsx","../../../../../src/components/ContextMenu.tsx","../../../../../src/components/Dashboard.tsx","../../../../../src/components/FloatingVoiceWidget.tsx","../../../../../src/components/GlobalClaudePanel.tsx","../../../../../src/components/HealthDot.tsx","../../../../../src/components/HealthMonitor.tsx","../../../../../src/components/KanbanCardItem.tsx","../../../../../src/components/KanbanColumn.tsx","../../../../../src/components/MarkdownContent.tsx","../../../../../src/components/PlatformBadges.tsx","../../../../../src/components/ProjectCard.tsx","../../../../../src/components/ProjectHeader.tsx","../../../../../src/components/ProjectKanban.tsx","../../../../../src/components/ProjectPageClient.tsx","../../../../../src/components/ProjectView.tsx","../../../../../src/components/SearchBar.tsx","../../../../../src/components/SkillDiffViewer.tsx","../../../../../src/components/SlyActionConfigModal.tsx","../../../../../src/components/StoreView.tsx","../../../../../src/components/Terminal.tsx","../../../../../src/components/ThemeToggle.tsx","../../../../../src/components/UpdatesView.tsx","../../../../../src/components/VersionUpdateToast.tsx","../../../../../src/components/VoiceControlBar.tsx","../../../../../src/components/VoiceErrorPopup.tsx","../../../../../src/components/VoiceSettingsPopover.tsx","../../../../../src/contexts/VoiceContext.tsx","../../../../../src/hooks/useConnectionStatus.ts","../../../../../src/hooks/useKeyboardShortcuts.ts","../../../../../src/hooks/usePolling.ts","../../../../../src/hooks/useSettings.ts","../../../../../src/hooks/useSlyActionsConfig.ts","../../../../../src/hooks/useVoiceRecorder.ts","../../../../../src/hooks/useVoiceShortcuts.ts","../../../../../src/instrumentation.ts","../../../../../src/lib/action-scanner.ts","../../../../../src/lib/asset-scanner.ts","../../../../../src/lib/connection-manager.ts","../../../../../src/lib/cron-utils.ts","../../../../../src/lib/event-log.ts","../../../../../src/lib/health-score.ts","../../../../../src/lib/kanban-paths.ts","../../../../../src/lib/mcp-common.ts","../../../../../src/lib/paths.ts","../../../../../src/lib/provider-paths.ts","../../../../../src/lib/registry.ts","../../../../../src/lib/scheduler.ts","../../../../../src/lib/sly-actions.ts","../../../../../src/lib/store-scanner.ts","../../../../../src/lib/tab-sync.ts","../../../../../src/lib/terminal-events.ts","../../../../../src/lib/types.ts","../../../../../src/lib/webm-to-ogg-opus.ts","../../../../../tsconfig.json","../../../../../tsconfig.tsbuildinfo","../../../chunks/ssr/[root-of-the-server]__0841f0b5._.js","../../../chunks/ssr/[root-of-the-server]__193dbb5b._.js","../../../chunks/ssr/[root-of-the-server]__2f64210a._.js","../../../chunks/ssr/[root-of-the-server]__43d93717._.js","../../../chunks/ssr/[root-of-the-server]__72142a5d._.js","../../../chunks/ssr/[root-of-the-server]__b6871b66._.js","../../../chunks/ssr/[root-of-the-server]__bcbe4bf2._.js","../../../chunks/ssr/[turbopack]_runtime.js","../../../chunks/ssr/_3fbadc17._.js","../../../chunks/ssr/_8afd7611._.js","../../../chunks/ssr/_next-internal_server_app_project_[id]_page_actions_d20b4a2c.js","../../../chunks/ssr/node_modules_next_dist_174ae28d._.js","../../../chunks/ssr/node_modules_next_dist_4b63a0e1._.js","../../../chunks/ssr/node_modules_next_dist_client_components_9774470f._.js","../../../chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js","../../../chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js","../../../chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js","../../../chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js","../../../chunks/ssr/node_modules_next_dist_f9713a08._.js","../../../chunks/ssr/src_components_c4135402._.js","../../../chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js","../../../chunks/ssr/src_lib_registry_ts_2fc87c9c._.js","./page/react-loadable-manifest.json","./page_client-reference-manifest.js"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
|
|
2
|
-
globalThis.__RSC_MANIFEST["/project/[id]/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx <module evaluation>":{"id":1088,"name":"*","chunks":["/_next/static/chunks/
|
|
2
|
+
globalThis.__RSC_MANIFEST["/project/[id]/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx <module evaluation>":{"id":1088,"name":"*","chunks":["/_next/static/chunks/a47f36b030917d1f.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx":{"id":1088,"name":"*","chunks":["/_next/static/chunks/a47f36b030917d1f.js"],"async":false},"[project]/src/components/ProjectView.tsx <module evaluation>":{"id":72630,"name":"*","chunks":["/_next/static/chunks/a47f36b030917d1f.js","/_next/static/chunks/94b526560cbd7bc0.js","/_next/static/chunks/3a5721af09d1c753.js","/_next/static/chunks/fa78afe3ceed998b.js"],"async":false},"[project]/src/components/ProjectView.tsx":{"id":72630,"name":"*","chunks":["/_next/static/chunks/a47f36b030917d1f.js","/_next/static/chunks/94b526560cbd7bc0.js","/_next/static/chunks/3a5721af09d1c753.js","/_next/static/chunks/fa78afe3ceed998b.js"],"async":false},"[project]/src/components/ProjectPageClient.tsx <module evaluation>":{"id":27444,"name":"*","chunks":["/_next/static/chunks/a47f36b030917d1f.js","/_next/static/chunks/94b526560cbd7bc0.js","/_next/static/chunks/3a5721af09d1c753.js","/_next/static/chunks/fa78afe3ceed998b.js"],"async":false},"[project]/src/components/ProjectPageClient.tsx":{"id":27444,"name":"*","chunks":["/_next/static/chunks/a47f36b030917d1f.js","/_next/static/chunks/94b526560cbd7bc0.js","/_next/static/chunks/3a5721af09d1c753.js","/_next/static/chunks/fa78afe3ceed998b.js"],"async":false}},"ssrModuleMapping":{"39756":{"*":{"id":2420,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"37457":{"*":{"id":24017,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"47257":{"*":{"id":77682,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"92825":{"*":{"id":97296,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"68017":{"*":{"id":61660,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"27201":{"*":{"id":60704,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"97367":{"*":{"id":90574,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"68027":{"*":{"id":40622,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"1088":{"*":{"id":7491,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__72142a5d._.js","server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js"],"async":false}},"72630":{"*":{"id":15704,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__72142a5d._.js","server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js","server/chunks/ssr/[root-of-the-server]__2f64210a._.js","server/chunks/ssr/[root-of-the-server]__bcbe4bf2._.js","server/chunks/ssr/src_components_c4135402._.js"],"async":false}},"27444":{"*":{"id":77788,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__72142a5d._.js","server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js","server/chunks/ssr/[root-of-the-server]__2f64210a._.js","server/chunks/ssr/[root-of-the-server]__bcbe4bf2._.js","server/chunks/ssr/src_components_c4135402._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"39756":{"*":{"id":26768,"name":"*","chunks":[],"async":false}},"37457":{"*":{"id":17910,"name":"*","chunks":[],"async":false}},"47257":{"*":{"id":92977,"name":"*","chunks":[],"async":false}},"92825":{"*":{"id":48552,"name":"*","chunks":[],"async":false}},"68017":{"*":{"id":83919,"name":"*","chunks":[],"async":false}},"27201":{"*":{"id":40771,"name":"*","chunks":[],"async":false}},"97367":{"*":{"id":24150,"name":"*","chunks":[],"async":false}},"68027":{"*":{"id":82509,"name":"*","chunks":[],"async":false}},"1088":{"*":{"id":21229,"name":"*","chunks":[],"async":false}},"72630":{"*":{"id":50165,"name":"*","chunks":[],"async":false}},"27444":{"*":{"id":76100,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/node_modules/next/dist/client/components/builtin/global-error":[],"[project]/src/app/layout":[{"path":"static/chunks/43bfca92afbacd38.css","inlined":false},{"path":"static/chunks/293449b828207656.css","inlined":false}],"[project]/src/app/project/[id]/page":[{"path":"static/chunks/43bfca92afbacd38.css","inlined":false},{"path":"static/chunks/293449b828207656.css","inlined":false}]},"entryJSFiles":{"[project]/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/ff1a16fafef87110.js","static/chunks/e24d6768d85df882.js"],"[project]/src/app/layout":["static/chunks/a47f36b030917d1f.js"],"[project]/src/app/project/[id]/page":["static/chunks/a47f36b030917d1f.js","static/chunks/94b526560cbd7bc0.js","static/chunks/3a5721af09d1c753.js","static/chunks/fa78afe3ceed998b.js"]}}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"/_not-found/page": "app/_not-found/page.js",
|
|
4
4
|
"/api/areas/route": "app/api/areas/route.js",
|
|
5
5
|
"/api/bridge/[...path]/route": "app/api/bridge/[...path]/route.js",
|
|
6
|
+
"/api/changelog/route": "app/api/changelog/route.js",
|
|
6
7
|
"/api/cli-assets/assistant/route": "app/api/cli-assets/assistant/route.js",
|
|
7
8
|
"/api/cli-assets/fix/route": "app/api/cli-assets/fix/route.js",
|
|
8
9
|
"/api/cli-assets/import/route": "app/api/cli-assets/import/route.js",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},7367,e=>{"use strict";var t=e.i(14747),r=e.i(22734),a=e.i(46786);function n(e){return(e=e.replace(/^[\u02dc\uff5e]/,"~")).startsWith("~/")||"~"===e?e.replace(/^~/,a.default.homedir()):e}function s(){if(process.env.SLYCODE_HOME)return process.env.SLYCODE_HOME;let e=process.cwd();return(console.warn("[paths] SLYCODE_HOME not set in production — falling back to cwd:",e),e.endsWith("/web")||e.endsWith("\\web"))?t.default.dirname(e):e}function
|
|
1
|
+
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},7367,e=>{"use strict";var t=e.i(14747),r=e.i(22734),a=e.i(46786);function n(e){return(e=e.replace(/^[\u02dc\uff5e]/,"~")).startsWith("~/")||"~"===e?e.replace(/^~/,a.default.homedir()):e}function s(){if(process.env.SLYCODE_HOME)return process.env.SLYCODE_HOME;let e=process.cwd();return(console.warn("[paths] SLYCODE_HOME not set in production — falling back to cwd:",e),e.endsWith("/web")||e.endsWith("\\web"))?t.default.dirname(e):e}function i(){let e=s(),a=t.default.join(e,"node_modules","@slycode","slycode","dist");return r.default.existsSync(a)?a:e}function o(){return process.env.BRIDGE_URL?process.env.BRIDGE_URL:"http://127.0.0.1:3004"}e.s(["expandTilde",()=>n,"getBridgeUrl",()=>o,"getPackageDir",()=>i,"getSlycodeRoot",()=>s])},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},20752,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),x=e.i(74838),h=e.i(10372),R=e.i(93695);e.i(52474);var m=e.i(220),v=e.i(89171),g=e.i(24868),w=e.i(22734),y=e.i(14747),E=e.i(7367);function C(){return y.default.join((0,E.getSlycodeRoot)(),"documentation","terminal-classes.json")}async function j(){let e=C();try{let t=await g.default.readFile(e,"utf-8"),r=JSON.parse(t);return v.NextResponse.json(r)}catch{let t=function(){let e=(0,E.getPackageDir)(),t=y.default.join(e,"templates","terminal-classes.json");if(w.default.existsSync(t))return t;let r=y.default.join((0,E.getSlycodeRoot)(),"documentation","terminal-classes.json");return w.default.existsSync(r)?r:null}();if(t)try{let r=await g.default.readFile(t,"utf-8"),a=JSON.parse(r);try{await g.default.mkdir(y.default.dirname(e),{recursive:!0}),await g.default.writeFile(e,r)}catch{}return v.NextResponse.json(a)}catch{}return v.NextResponse.json({version:"1.0",classes:[]})}}async function N(e){try{let t=await e.json();if(!t.classes||!Array.isArray(t.classes))return v.NextResponse.json({error:"Invalid format: classes array required"},{status:400});let r={$schema:"./terminal-classes.schema.json",version:t.version||"1.0",classes:t.classes};return await g.default.writeFile(C(),JSON.stringify(r,null,2)),v.NextResponse.json({success:!0})}catch(e){return console.error("Failed to write terminal-classes.json:",e),v.NextResponse.json({error:"Failed to save configuration"},{status:500})}}e.s(["GET",()=>j,"PUT",()=>N],32378);var A=e.i(32378);let S=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/terminal-classes/route",pathname:"/api/terminal-classes",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/terminal-classes/route.ts",nextConfigOutput:"standalone",userland:A}),{workAsyncStorage:b,workUnitAsyncStorage:O,serverHooks:T}=S;function P(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:O})}async function _(e,t,a){S.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/terminal-classes/route";v=v.replace(/\/index$/,"")||"/";let g=await S.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:y,nextConfig:E,parsedUrl:C,isDraftMode:j,prerenderManifest:N,routerServerContext:A,isOnDemandRevalidate:b,revalidateOnlyGenerated:O,resolvedPathname:T,clientReferenceManifest:P,serverActionsManifest:_}=g,k=(0,o.normalizeAppPath)(v),q=!!(N.dynamicRoutes[k]||N.routes[T]),D=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,C,!1):t.end("This page could not be found"),null);if(q&&!j){let e=!!N.routes[T],t=N.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await D();throw new R.NoFallbackError}}let H=null;!q||S.isDev||j||(H="/index"===(H=T)?"/":H);let U=!0===S.isDev||!q,I=q&&!U;_&&P&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:_});let M=e.method||"GET",F=(0,s.getTracer)(),L=F.getActiveScopeSpan(),$={params:y,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>S.onRequestError(e,t,a,n,A)},sharedContext:{buildId:w}},B=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let i=async e=>S.handle(G,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${v}`)}),o=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!o&&b&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=$.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(B,K,s,$.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[h.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,a=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await S.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:b})},!1,A),t}},u=await S.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:O,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:o});if(!q)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",b?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),j&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let R=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&q||R.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||R.get("Cache-Control")||R.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(B,K,new Response(u.value.body,{headers:R,status:u.value.status||200})),null};L?await l(L):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof R.NoFallbackError||await S.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:b})},!1,A),q)throw t;return await (0,p.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>P,"routeModule",()=>S,"serverHooks",()=>T,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>O],20752)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__92f81907._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},7367,e=>{"use strict";var t=e.i(14747),r=e.i(22734),n=e.i(46786);function a(e){return(e=e.replace(/^[\u02dc\uff5e]/,"~")).startsWith("~/")||"~"===e?e.replace(/^~/,n.default.homedir()):e}function o(){if(process.env.SLYCODE_HOME)return process.env.SLYCODE_HOME;let e=process.cwd();return(console.warn("[paths] SLYCODE_HOME not set in production — falling back to cwd:",e),e.endsWith("/web")||e.endsWith("\\web"))?t.default.dirname(e):e}function s(){let e=o(),n=t.default.join(e,"node_modules","@slycode","slycode","dist");return r.default.existsSync(n)?n:e}function i(){return process.env.BRIDGE_URL?process.env.BRIDGE_URL:"http://127.0.0.1:3004"}e.s(["expandTilde",()=>a,"getBridgeUrl",()=>i,"getPackageDir",()=>s,"getSlycodeRoot",()=>o])},84638,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),o=e.i(61916),s=e.i(74677),i=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),x=e.i(74838),g=e.i(10372),f=e.i(93695);e.i(52474);var R=e.i(220),v=e.i(89171),E=e.i(22734),m=e.i(14747),y=e.i(7367);async function w(){let e=(0,y.getSlycodeRoot)();for(let t of[m.default.join(e,"node_modules","@slycode","slycode","templates","changelog.json"),m.default.join(e,"data","changelog.json")])if((0,E.existsSync)(t))try{let e=(0,E.readFileSync)(t,"utf-8"),r=JSON.parse(e);if(!Array.isArray(r)){console.warn(`[changelog] ${t}: root is not an array, skipping`);continue}return v.NextResponse.json(r)}catch(e){console.warn(`[changelog] ${t}: failed to parse:`,e instanceof Error?e.message:e)}return v.NextResponse.json([])}e.s(["GET",()=>w],4428);var C=e.i(4428);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/changelog/route",pathname:"/api/changelog",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/changelog/route.ts",nextConfigOutput:"standalone",userland:C}),{workAsyncStorage:b,workUnitAsyncStorage:O,serverHooks:S}=A;function _(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:O})}async function N(e,t,n){A.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/changelog/route";v=v.replace(/\/index$/,"")||"/";let E=await A.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:m,params:y,nextConfig:w,parsedUrl:C,isDraftMode:b,prerenderManifest:O,routerServerContext:S,isOnDemandRevalidate:_,revalidateOnlyGenerated:N,resolvedPathname:T,clientReferenceManifest:j,serverActionsManifest:k}=E,P=(0,i.normalizeAppPath)(v),q=!!(O.dynamicRoutes[P]||O.routes[T]),H=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,C,!1):t.end("This page could not be found"),null);if(q&&!b){let e=!!O.routes[T],t=O.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(w.experimental.adapterPath)return await H();throw new f.NoFallbackError}}let D=null;!q||A.isDev||b||(D="/index"===(D=T)?"/":D);let U=!0===A.isDev||!q,I=q&&!U;k&&j&&(0,s.setManifestsSingleton)({page:v,clientReferenceManifest:j,serverActionsManifest:k});let M=e.method||"GET",$=(0,o.getTracer)(),L=$.getActiveScopeSpan(),F={params:y,prerenderManifest:O,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:w.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>A.onRequestError(e,t,n,a,S)},sharedContext:{buildId:m}},B=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let s=async e=>A.handle(G,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${v}`)}),i=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var o,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&_&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await s(a);e.fetchMetrics=F.renderOpts.fetchMetrics;let l=F.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=F.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(B,K,o,F.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(o.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,n=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:_})},!1,S),t}},u=await A.handleResponse({req:e,nextConfig:w,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:_,revalidateOnlyGenerated:N,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:i});if(!q)return null;if((null==u||null==(o=u.value)?void 0:o.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",_?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&q||f.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(B,K,new Response(u.value.body,{headers:f,status:u.value.status||200})),null};L?await l(L):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:o.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof f.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:_})},!1,S),q)throw t;return await (0,p.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>_,"routeModule",()=>A,"serverHooks",()=>S,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>O],84638)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__a259539f._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[69497,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),o=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),g=e.i(70101),f=e.i(74838),h=e.i(10372),m=e.i(93695);e.i(52474);var w=e.i(220),R=e.i(89171),y=e.i(22734),v=e.i(14747),b=e.i(32695),E=e.i(1365),x=e.i(71741);let k={backlog:[],design:[],implementation:[],testing:[],done:[]};function C(e){return(e.backlog?.length||0)+(e.design?.length||0)+(e.implementation?.length||0)+(e.testing?.length||0)+(e.done?.length||0)}function N(e){return Array.isArray(e)?[...e].sort((e,t)=>e.order-t.order).map((e,t)=>({...e,order:(t+1)*10})):[]}async function O(e){try{return(await y.promises.stat(e)).mtime}catch{return null}}async function S(e,t,a){try{let a=await (0,x.getTieredBackupPath)(e,t,3);await y.promises.unlink(a)}catch{}for(let a=2;a>=1;a--){let r=await (0,x.getTieredBackupPath)(e,t,a),n=await (0,x.getTieredBackupPath)(e,t,a+1);try{await y.promises.rename(r,n)}catch{}}let r=await (0,x.getTieredBackupPath)(e,t,1);await y.promises.writeFile(r,a)}async function j(e,t){try{let a;try{a=await y.promises.readFile(t,"utf-8");let e=JSON.parse(a);if(0===C(e.stages||{}))return}catch{return}let r=Date.now(),n=await (0,x.getArchiveDir)(e);for(let[t,o]of(await y.promises.mkdir(n,{recursive:!0}),Object.entries(x.BACKUP_TIERS))){let n=await (0,x.getTieredBackupPath)(e,t,1),i=await O(n);(!i||r-i.getTime()>=o)&&await S(e,t,a)}}catch(e){console.error("Failed to update tiered backups:",e)}}async function P(e){try{for(let t of(await (0,x.getLegacyBackupPaths)(e)))try{await y.promises.unlink(t),console.log(`Cleaned up legacy backup: ${t}`)}catch{}}catch(e){console.error("Failed to cleanup legacy backups:",e)}}async function A(e){let{searchParams:t}=new URL(e.url),a=t.get("projectId");if(!a)return R.NextResponse.json({error:"projectId required"},{status:400});try{let e=await (0,x.getKanbanPath)(a);try{let t=await y.promises.readFile(e,"utf-8"),a=JSON.parse(t);for(let e of Object.values(a.stages))for(let t of e)if(t.automation?.enabled&&t.automation.schedule&&"recurring"===t.automation.scheduleType){let e=(0,b.getNextRun)(t.automation.schedule,"recurring");e&&(t.automation.nextRun=e.toISOString())}return R.NextResponse.json(a)}catch{return R.NextResponse.json({project_id:a,stages:k,last_updated:new Date().toISOString()})}}catch(e){if(e instanceof x.ProjectResolutionError)return R.NextResponse.json({error:e.message},{status:404});return console.error("Failed to get kanban:",e),R.NextResponse.json({error:"Failed to load kanban"},{status:500})}}async function T(e){try{var t;let a,{projectId:r,stages:n,changedCardIds:o}=await e.json(),i=n;if(!r)return R.NextResponse.json({error:"projectId required"},{status:400});if(!i||"object"!=typeof i)return R.NextResponse.json({error:"stages must be an object"},{status:400});try{a=await (0,x.getKanbanPath)(r)}catch(e){if(e instanceof x.ProjectResolutionError)return R.NextResponse.json({error:e.message},{status:404});throw e}let s=C(i);if(0===s)try{let e=await y.promises.readFile(a,"utf-8"),t=JSON.parse(e),r=C(t.stages||{});if(r>0)return console.warn(`BLOCKED: Attempted to save empty kanban (would wipe ${r} cards)`),R.NextResponse.json({error:"Refusing to save empty kanban - would delete existing cards"},{status:400})}catch{}if(await j(r,a),await P(r),o&&o.length>0)try{let e=await y.promises.readFile(a,"utf-8"),t=JSON.parse(e).stages||k,r=new Map;for(let[e,t]of Object.entries(i))for(let a of t||[])o.includes(a.id)&&r.set(a.id,{card:{...a,last_modified_by:"web"},stage:e});let n={backlog:[...t.backlog||[]],design:[...t.design||[]],implementation:[...t.implementation||[]],testing:[...t.testing||[]],done:[...t.done||[]]};for(let e of o)for(let t of Object.keys(n))n[t]=n[t].filter(t=>t.id!==e);for(let[,{card:e,stage:t}]of r)n[t]=[...n[t],e];i=n}catch{}let l=(t=i,{backlog:N(t.backlog||[]),design:N(t.design||[]),implementation:N(t.implementation||[]),testing:N(t.testing||[]),done:N(t.done||[])}),d={project_id:r,stages:l,last_updated:new Date().toISOString()},u=null;try{let e=await y.promises.readFile(a,"utf-8");u=JSON.parse(e).stages}catch{}if(await y.promises.mkdir(v.default.dirname(a),{recursive:!0}),await y.promises.writeFile(a,JSON.stringify(d,null,2)),u){let e=new Map;for(let[t,a]of Object.entries(u))for(let r of a||[])e.set(r.id,{card:r,stage:t});let t=o?"web":void 0;for(let[a,n]of Object.entries(l))for(let i of n||[]){let n=e.get(i.id);try{n?n.stage!==a?(0,E.appendEvent)({type:"card_moved",project:r,card:i.id,detail:`Card '${i.title}' moved from ${n.stage} to ${a}`,...t&&{source:t},timestamp:new Date().toISOString()}):o?.includes(i.id)&&(0,E.appendEvent)({type:"card_updated",project:r,card:i.id,detail:`Card '${i.title}' updated`,source:"web",timestamp:new Date().toISOString()}):(0,E.appendEvent)({type:"card_created",project:r,card:i.id,detail:`Card '${i.title}' created in ${a}`,...t&&{source:t},timestamp:new Date().toISOString()})}catch{}}}return R.NextResponse.json({success:!0,last_updated:d.last_updated})}catch(e){return console.error("Failed to save kanban:",e),R.NextResponse.json({error:"Failed to save"},{status:500})}}e.s(["GET",()=>A,"POST",()=>T],97891);var _=e.i(97891);let I=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/kanban/route",pathname:"/api/kanban",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/kanban/route.ts",nextConfigOutput:"standalone",userland:_}),{workAsyncStorage:D,workUnitAsyncStorage:F,serverHooks:U}=I;function H(){return(0,r.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:F})}async function $(e,t,r){I.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/kanban/route";R=R.replace(/\/index$/,"")||"/";let y=await I.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:v,params:b,nextConfig:E,parsedUrl:x,isDraftMode:k,prerenderManifest:C,routerServerContext:N,isOnDemandRevalidate:O,revalidateOnlyGenerated:S,resolvedPathname:j,clientReferenceManifest:P,serverActionsManifest:A}=y,T=(0,s.normalizeAppPath)(R),_=!!(C.dynamicRoutes[T]||C.routes[j]),D=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,x,!1):t.end("This page could not be found"),null);if(_&&!k){let e=!!C.routes[j],t=C.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await D();throw new m.NoFallbackError}}let F=null;!_||I.isDev||k||(F="/index"===(F=j)?"/":F);let U=!0===I.isDev||!_,H=_&&!U;A&&P&&(0,i.setManifestsSingleton)({page:R,clientReferenceManifest:P,serverActionsManifest:A});let $=e.method||"GET",q=(0,o.getTracer)(),M=q.getActiveScopeSpan(),B={params:b,prerenderManifest:C,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>I.onRequestError(e,t,r,n,N)},sharedContext:{buildId:v}},K=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),J=d.NextRequestAdapter.fromNodeNextRequest(K,(0,d.signalFromNodeResponse)(t));try{let i=async e=>I.handle(J,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=q.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${$} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${$} ${R}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var o,l;let d=async({previousCacheEntry:a})=>{try{if(!s&&O&&S&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=B.renderOpts.fetchMetrics;let l=B.renderOpts.pendingWaitUntil;l&&r.waitUntil&&(r.waitUntil(l),l=void 0);let d=B.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(K,L,o,B.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,g.toNodeOutgoingHttpHeaders)(o.headers);d&&(t[h.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,r=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:O})},!1,N),t}},u=await I.handleResponse({req:e,nextConfig:E,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:S,responseGenerator:d,waitUntil:r.waitUntil,isMinimalMode:s});if(!_)return null;if((null==u||null==(o=u.value)?void 0:o.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,g.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&_||m.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(K,L,new Response(u.value.body,{headers:m,status:u.value.status||200})),null};M?await l(M):await q.withPropagatedContext(e.headers,()=>q.trace(u.BaseServerSpan.handleRequest,{spanName:`${$} ${R}`,kind:o.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},l))}catch(t){if(t instanceof m.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:O})},!1,N),_)throw t;return await (0,p.sendResponse)(K,L,new Response(null,{status:500})),null}}e.s(["handler",()=>$,"patchFetch",()=>H,"routeModule",()=>I,"serverHooks",()=>U,"workAsyncStorage",()=>D,"workUnitAsyncStorage",()=>F],69497)}];
|
|
1
|
+
module.exports=[69497,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),g=e.i(74838),h=e.i(10372),m=e.i(93695);e.i(52474);var w=e.i(220),R=e.i(89171),y=e.i(22734),v=e.i(14747),b=e.i(32695),E=e.i(1365),x=e.i(71741);let k={backlog:[],design:[],implementation:[],testing:[],done:[]};function O(e){return(e.backlog?.length||0)+(e.design?.length||0)+(e.implementation?.length||0)+(e.testing?.length||0)+(e.done?.length||0)}function C(e){return Array.isArray(e)?[...e].sort((e,t)=>e.order-t.order).map((e,t)=>({...e,order:(t+1)*10})):[]}async function N(e){try{return(await y.promises.stat(e)).mtime}catch{return null}}async function S(e,t,a){try{let a=await (0,x.getTieredBackupPath)(e,t,3);await y.promises.unlink(a)}catch{}for(let a=2;a>=1;a--){let r=await (0,x.getTieredBackupPath)(e,t,a),n=await (0,x.getTieredBackupPath)(e,t,a+1);try{await y.promises.rename(r,n)}catch{}}let r=await (0,x.getTieredBackupPath)(e,t,1);await y.promises.writeFile(r,a)}async function j(e,t){try{let a;try{a=await y.promises.readFile(t,"utf-8");let e=JSON.parse(a);if(0===O(e.stages||{}))return}catch{return}let r=Date.now(),n=await (0,x.getArchiveDir)(e);for(let[t,i]of(await y.promises.mkdir(n,{recursive:!0}),Object.entries(x.BACKUP_TIERS))){let n=await (0,x.getTieredBackupPath)(e,t,1),o=await N(n);(!o||r-o.getTime()>=i)&&await S(e,t,a)}}catch(e){console.error("Failed to update tiered backups:",e)}}async function _(e){try{for(let t of(await (0,x.getLegacyBackupPaths)(e)))try{await y.promises.unlink(t),console.log(`Cleaned up legacy backup: ${t}`)}catch{}}catch(e){console.error("Failed to cleanup legacy backups:",e)}}async function P(e){let{searchParams:t}=new URL(e.url),a=t.get("projectId");if(!a)return R.NextResponse.json({error:"projectId required"},{status:400});try{let e=await (0,x.getKanbanPath)(a);try{let t=await y.promises.readFile(e,"utf-8"),a=JSON.parse(t);for(let e of Object.values(a.stages))for(let t of e)if(t.automation?.enabled&&t.automation.schedule&&"recurring"===t.automation.scheduleType){let e=(0,b.getNextRun)(t.automation.schedule,"recurring");e&&(t.automation.nextRun=e.toISOString())}return R.NextResponse.json(a)}catch{return R.NextResponse.json({project_id:a,stages:k,last_updated:new Date().toISOString()})}}catch(e){if(e instanceof x.ProjectResolutionError)return R.NextResponse.json({error:e.message},{status:404});return console.error("Failed to get kanban:",e),R.NextResponse.json({error:"Failed to load kanban"},{status:500})}}async function A(e){try{var t;let a,{projectId:r,stages:n,changedCardIds:i,changedCards:o}=await e.json(),s=n;if(!r)return R.NextResponse.json({error:"projectId required"},{status:400});if(!s||"object"!=typeof s)return R.NextResponse.json({error:"stages must be an object"},{status:400});try{a=await (0,x.getKanbanPath)(r)}catch(e){if(e instanceof x.ProjectResolutionError)return R.NextResponse.json({error:e.message},{status:404});throw e}let l=O(s);if(0===l)try{let e=await y.promises.readFile(a,"utf-8"),t=JSON.parse(e),r=O(t.stages||{});if(r>0)return console.warn(`BLOCKED: Attempted to save empty kanban (would wipe ${r} cards)`),R.NextResponse.json({error:"Refusing to save empty kanban - would delete existing cards"},{status:400})}catch{}await j(r,a),await _(r);let d=o?.map(e=>e.id)??i;if(d&&d.length>0)try{let e=await y.promises.readFile(a,"utf-8"),t=JSON.parse(e).stages||k,r=new Map;if(o)for(let e of o)r.set(e.id,e.type);let n=new Map;for(let[,e]of Object.entries(t))for(let t of e||[])n.set(t.id,t);let i=new Map;for(let[e,t]of Object.entries(s))for(let a of t||[])if(d.includes(a.id)){let t,o=r.get(a.id)||"edit";if("move"===o){let e=n.get(a.id);if(!e)continue;t={...e,order:a.order,updated_at:a.updated_at,last_modified_by:"web"}}else t={...a,last_modified_by:"web"};i.set(a.id,{card:t,stage:e})}let l={backlog:[...t.backlog||[]],design:[...t.design||[]],implementation:[...t.implementation||[]],testing:[...t.testing||[]],done:[...t.done||[]]};for(let e of d)for(let t of Object.keys(l))l[t]=l[t].filter(t=>t.id!==e);for(let[,{card:e,stage:t}]of i)l[t]=[...l[t],e];s=l}catch{}let u=(t=s,{backlog:C(t.backlog||[]),design:C(t.design||[]),implementation:C(t.implementation||[]),testing:C(t.testing||[]),done:C(t.done||[])}),c={project_id:r,stages:u,last_updated:new Date().toISOString()},p=null;try{let e=await y.promises.readFile(a,"utf-8");p=JSON.parse(e).stages}catch{}if(await y.promises.mkdir(v.default.dirname(a),{recursive:!0}),await y.promises.writeFile(a,JSON.stringify(c,null,2)),p){let e=new Map;for(let[t,a]of Object.entries(p))for(let r of a||[])e.set(r.id,{card:r,stage:t});let t=i?"web":void 0;for(let[a,n]of Object.entries(u))for(let o of n||[]){let n=e.get(o.id);try{n?n.stage!==a?(0,E.appendEvent)({type:"card_moved",project:r,card:o.id,detail:`Card '${o.title}' moved from ${n.stage} to ${a}`,...t&&{source:t},timestamp:new Date().toISOString()}):i?.includes(o.id)&&(0,E.appendEvent)({type:"card_updated",project:r,card:o.id,detail:`Card '${o.title}' updated`,source:"web",timestamp:new Date().toISOString()}):(0,E.appendEvent)({type:"card_created",project:r,card:o.id,detail:`Card '${o.title}' created in ${a}`,...t&&{source:t},timestamp:new Date().toISOString()})}catch{}}}return R.NextResponse.json({success:!0,last_updated:c.last_updated,stages:u})}catch(e){return console.error("Failed to save kanban:",e),R.NextResponse.json({error:"Failed to save"},{status:500})}}e.s(["GET",()=>P,"POST",()=>A],97891);var T=e.i(97891);let I=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/kanban/route",pathname:"/api/kanban",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/kanban/route.ts",nextConfigOutput:"standalone",userland:T}),{workAsyncStorage:D,workUnitAsyncStorage:F,serverHooks:U}=I;function H(){return(0,r.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:F})}async function $(e,t,r){I.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/kanban/route";R=R.replace(/\/index$/,"")||"/";let y=await I.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:v,params:b,nextConfig:E,parsedUrl:x,isDraftMode:k,prerenderManifest:O,routerServerContext:C,isOnDemandRevalidate:N,revalidateOnlyGenerated:S,resolvedPathname:j,clientReferenceManifest:_,serverActionsManifest:P}=y,A=(0,s.normalizeAppPath)(R),T=!!(O.dynamicRoutes[A]||O.routes[j]),D=async()=>((null==C?void 0:C.render404)?await C.render404(e,t,x,!1):t.end("This page could not be found"),null);if(T&&!k){let e=!!O.routes[j],t=O.dynamicRoutes[A];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await D();throw new m.NoFallbackError}}let F=null;!T||I.isDev||k||(F="/index"===(F=j)?"/":F);let U=!0===I.isDev||!T,H=T&&!U;P&&_&&(0,o.setManifestsSingleton)({page:R,clientReferenceManifest:_,serverActionsManifest:P});let $=e.method||"GET",q=(0,i.getTracer)(),M=q.getActiveScopeSpan(),B={params:b,prerenderManifest:O,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>I.onRequestError(e,t,r,n,C)},sharedContext:{buildId:v}},K=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),J=d.NextRequestAdapter.fromNodeNextRequest(K,(0,d.signalFromNodeResponse)(t));try{let o=async e=>I.handle(J,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=q.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${$} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${$} ${R}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var i,l;let d=async({previousCacheEntry:a})=>{try{if(!s&&N&&S&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(n);e.fetchMetrics=B.renderOpts.fetchMetrics;let l=B.renderOpts.pendingWaitUntil;l&&r.waitUntil&&(r.waitUntil(l),l=void 0);let d=B.renderOpts.collectedTags;if(!T)return await (0,p.sendResponse)(K,L,i,B.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[h.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,r=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:N})},!1,C),t}},u=await I.handleResponse({req:e,nextConfig:E,cacheKey:F,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:S,responseGenerator:d,waitUntil:r.waitUntil,isMinimalMode:s});if(!T)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&T||m.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,g.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(K,L,new Response(u.value.body,{headers:m,status:u.value.status||200})),null};M?await l(M):await q.withPropagatedContext(e.headers,()=>q.trace(u.BaseServerSpan.handleRequest,{spanName:`${$} ${R}`,kind:i.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},l))}catch(t){if(t instanceof m.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:A,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:N})},!1,C),T)throw t;return await (0,p.sendResponse)(K,L,new Response(null,{status:500})),null}}e.s(["handler",()=>$,"patchFetch",()=>H,"routeModule",()=>I,"serverHooks",()=>U,"workAsyncStorage",()=>D,"workUnitAsyncStorage",()=>F],69497)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=node_modules_next_dist_esm_build_templates_app-route_18324462.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[92739,t=>{"use strict";var e=t.i(22734),r=t.i(14747),i=t.i(46786);function s(t){return Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)}function a(t,e){return t.y===e.y&&t.m===e.m&&t.d===e.d&&t.h===e.h&&t.i===e.i&&t.s===e.s}function n(t,e,r){return o(function(t,e){let r=new Date(Date.parse(t));if(isNaN(r))throw Error("Invalid ISO8601 passed to timezone parser.");let i=t.substring(9);return i.includes("Z")||i.includes("+")||i.includes("-")?l(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),"Etc/UTC"):l(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),e)}(t,e),r)}function o(t,e){let r=new Date(s(t)),i=h(r,t.tz),n=s(t),o=s(i),l=new Date(r.getTime()+(n-o)),u=h(l,t.tz);if(a(u,t)){let e=new Date(l.getTime()-36e5);return a(h(e,t.tz),t)?e:l}let d=new Date(l.getTime()+s(t)-s(u));if(a(h(d,t.tz),t))return d;if(e)throw Error("Invalid date passed to fromTZ()");return l.getTime()>d.getTime()?l:d}function h(t,e){let r;try{r=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(t)}catch(r){let t=r instanceof Error?r.message:String(r);throw RangeError(`toTZ: Invalid timezone '${e}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${t}`)}let i={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let t of r)("year"===t.type||"month"===t.type||"day"===t.type||"hour"===t.type||"minute"===t.type||"second"===t.type)&&(i[t.type]=parseInt(t.value,10));if(isNaN(i.year)||isNaN(i.month)||isNaN(i.day)||isNaN(i.hour)||isNaN(i.minute)||isNaN(i.second))throw Error(`toTZ: Failed to parse all date components from timezone '${e}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(i)}`);return 24===i.hour&&(i.hour=0),{y:i.year,m:i.month,d:i.day,h:i.hour,i:i.minute,s:i.second,tz:e}}function l(t,e,r,i,s,a,n){return{y:t,m:e,d:r,h:i,i:s,s:a,tz:n}}var u=[1,2,4,8,16],d=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(t,e,r){this.pattern=t,this.timezone=e,this.mode=r?.mode??"auto",this.alternativeWeekdays=r?.alternativeWeekdays??!1,this.sloppyRanges=r?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!("string"==typeof this.pattern||this.pattern instanceof String))throw TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.match(/\S+/g)||[""],e=t.length;if(t.length<5||t.length>7)throw TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if("auto"!==this.mode){let t;switch(this.mode){case"5-part":t=5;break;case"6-part":t=6;break;case"7-part":t=7;break;case"5-or-6-parts":t=[5,6];break;case"6-or-7-parts":t=[6,7];break;default:t=0}if(!(Array.isArray(t)?t.includes(e):e===t)){let r=Array.isArray(t)?t.join(" or "):t.toString();throw TypeError(`CronPattern: mode '${this.mode}' requires exactly ${r} parts, but pattern '${this.pattern}' has ${e} parts.`)}}if(5===t.length&&t.unshift("0"),6===t.length&&t.push("*"),"LW"===t[3].toUpperCase()?(this.lastWeekday=!0,t[3]=""):t[3].toUpperCase().indexOf("L")>=0&&(t[3]=t[3].replace(/L/gi,""),this.lastDayOfMonth=!0),"*"==t[3]&&(this.starDOM=!0),"*"==t[6]&&(this.starYear=!0),t[4].length>=3&&(t[4]=this.replaceAlphaMonths(t[4])),t[5].length>=3&&(t[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(t[5]):this.replaceAlphaDays(t[5])),t[5].startsWith("+")&&(this.useAndLogic=!0,t[5]=t[5].substring(1),""===t[5]))throw TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch("*"==t[5]&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&(t[0]=t[0].replace(/\?/g,"*"),t[1]=t[1].replace(/\?/g,"*"),t[2]=t[2].replace(/\?/g,"*"),t[3]=t[3].replace(/\?/g,"*"),t[4]=t[4].replace(/\?/g,"*"),t[5]=t[5].replace(/\?/g,"*"),t[6]&&(t[6]=t[6].replace(/\?/g,"*"))),this.mode){case"5-part":t[0]="0",t[6]="*";break;case"6-part":case"5-or-6-parts":t[6]="*"}this.throwAtIllegalCharacters(t),this.partToArray("second",t[0],0,1),this.partToArray("minute",t[1],0,1),this.partToArray("hour",t[2],0,1),this.partToArray("day",t[3],-1,1),this.partToArray("month",t[4],-1,1);let r=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",t[5],r,63),this.partToArray("year",t[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(t,e,r,i){let s=this[t],a="day"===t&&this.lastDayOfMonth,n="day"===t&&this.lastWeekday;if(""===e&&!a&&!n)throw TypeError("CronPattern: configuration entry "+t+" ("+e+") is empty, check for trailing spaces.");if("*"===e)return s.fill(i);let o=e.split(",");if(o.length>1)for(let e=0;e<o.length;e++)this.partToArray(t,o[e],r,i);else -1!==e.indexOf("-")&&-1!==e.indexOf("/")?this.handleRangeWithStepping(e,t,r,i):-1!==e.indexOf("-")?this.handleRange(e,t,r,i):-1!==e.indexOf("/")?this.handleStepping(e,t,r,i):""!==e&&this.handleNumber(e,t,r,i)}throwAtIllegalCharacters(t){for(let e=0;e<t.length;e++)if((3===e?/[^/*0-9,\-WwLl]+/:5===e?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(t[e]))throw TypeError("CronPattern: configuration entry "+e+" ("+t[e]+") contains illegal characters.")}handleNumber(t,e,r,i){let s=this.extractNth(t,e),a=t.toUpperCase().includes("W");if("day"!==e&&a)throw TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");a&&(e="nearestWeekdays");let n=parseInt(s[0],10)+r;if(isNaN(n))throw TypeError("CronPattern: "+e+" is not a number: '"+t+"'");this.setPart(e,n,s[1]||i)}setPart(t,e,r){if(!Object.prototype.hasOwnProperty.call(this,t))throw TypeError("CronPattern: Invalid part specified: "+t);if("dayOfWeek"===t){if(7===e&&(e=0),e<0||e>6)throw RangeError("CronPattern: Invalid value for dayOfWeek: "+e);this.setNthWeekdayOfMonth(e,r);return}if("second"===t||"minute"===t){if(e<0||e>=60)throw RangeError("CronPattern: Invalid value for "+t+": "+e)}else if("hour"===t){if(e<0||e>=24)throw RangeError("CronPattern: Invalid value for "+t+": "+e)}else if("day"===t||"nearestWeekdays"===t){if(e<0||e>=31)throw RangeError("CronPattern: Invalid value for "+t+": "+e)}else if("month"===t){if(e<0||e>=12)throw RangeError("CronPattern: Invalid value for "+t+": "+e)}else if("year"===t&&(e<1||e>=1e4))throw RangeError("CronPattern: Invalid value for "+t+": "+e+" (supported range: 1-9999)");this[t][e]=r}validateNotNaN(t,e){if(isNaN(t))throw TypeError(e)}validateRange(t,e,r,i,s){if(t>e)throw TypeError("CronPattern: From value is larger than to value: '"+s+"'");if(void 0!==r){if(0===r)throw TypeError("CronPattern: Syntax error, illegal stepping: 0");if(r>this[i].length)throw TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[i].length+")")}}handleRangeWithStepping(t,e,r,i){if(t.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let s=this.extractNth(t,e),a=s[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(null===a)throw TypeError("CronPattern: Syntax error, illegal range with stepping: '"+t+"'");let[,n,o,h]=a,l=parseInt(n,10)+r,u=parseInt(o,10)+r,d=parseInt(h,10);this.validateNotNaN(l,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(u,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(d,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(l,u,d,e,t);for(let t=l;t<=u;t+=d)this.setPart(e,t,s[1]||i)}extractNth(t,e){let r=t,i;if(r.includes("#")){if("dayOfWeek"!==e)throw Error("CronPattern: nth (#) only allowed in day-of-week field");i=r.split("#")[1],r=r.split("#")[0]}else if(r.toUpperCase().endsWith("L")){if("dayOfWeek"!==e)throw Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");i="L",r=r.slice(0,-1)}return[r,i]}handleRange(t,e,r,i){if(t.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in a range.");let s=this.extractNth(t,e),a=s[0].split("-");if(2!==a.length)throw TypeError("CronPattern: Syntax error, illegal range: '"+t+"'");let n=parseInt(a[0],10)+r,o=parseInt(a[1],10)+r;this.validateNotNaN(n,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(o,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(n,o,void 0,e,t);for(let t=n;t<=o;t++)this.setPart(e,t,s[1]||i)}handleStepping(t,e,r,i){if(t.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let s=this.extractNth(t,e),a=s[0].split("/");if(2!==a.length)throw TypeError("CronPattern: Syntax error, illegal stepping: '"+t+"'");if(this.sloppyRanges)""===a[0]&&(a[0]="*");else{if(""===a[0])throw TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if("*"!==a[0])throw TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let n=0;"*"!==a[0]&&(n=parseInt(a[0],10)+r);let o=parseInt(a[1],10);this.validateNotNaN(o,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[e].length-1,o,e,t);for(let t=n;t<this[e].length;t+=o)this.setPart(e,t,s[1]||i)}replaceAlphaDays(t){return t.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz(t){return t.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths(t){return t.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(t){let e=t.trim().toLowerCase();if("@yearly"===e||"@annually"===e)return"0 0 1 1 *";if("@monthly"===e)return"0 0 1 * *";if("@weekly"===e)return"0 0 * * 0";if("@daily"===e||"@midnight"===e)return"0 0 * * *";if("@hourly"===e)return"0 * * * *";if("@reboot"===e)throw TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return t}setNthWeekdayOfMonth(t,e){if("number"!=typeof e&&"L"===e.toUpperCase())this.dayOfWeek[t]=32|this.dayOfWeek[t];else if(63===e)this.dayOfWeek[t]=63;else if(e<6&&e>0)this.dayOfWeek[t]=this.dayOfWeek[t]|u[e-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},c=[31,28,31,30,31,30,31,31,30,31,30,31],f=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],p=class t{tz;ms;second;minute;hour;day;month;year;constructor(e,r){if(this.tz=r,e&&e instanceof Date)if(isNaN(e))throw TypeError("CronDate: Invalid date passed to CronDate constructor");else this.fromDate(e);else if(null==e)this.fromDate(new Date);else if(e&&"string"==typeof e)this.fromString(e);else if(e instanceof t)this.fromCronDate(e);else throw TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}getLastDayOfMonth(t,e){return 1!==e?c[e]:new Date(Date.UTC(t,e+1,0)).getUTCDate()}getLastWeekday(t,e){let r=this.getLastDayOfMonth(t,e),i=new Date(Date.UTC(t,e,r)).getUTCDay();return 0===i?r-2:6===i?r-1:r}getNearestWeekday(t,e,r){let i=this.getLastDayOfMonth(t,e);if(r>i)return -1;let s=new Date(Date.UTC(t,e,r)).getUTCDay();return 0===s?r===i?r-2:r+1:6===s?1===r?r+2:r-1:r}isNthWeekdayOfMonth(t,e,r,i){let s=new Date(Date.UTC(t,e,r)).getUTCDay(),a=0;for(let i=1;i<=r;i++)new Date(Date.UTC(t,e,i)).getUTCDay()===s&&a++;if(63&i&&u[a-1]&i)return!0;if(32&i){let i=this.getLastDayOfMonth(t,e);for(let a=r+1;a<=i;a++)if(new Date(Date.UTC(t,e,a)).getUTCDay()===s)return!1;return!0}return!1}fromDate(t){if(void 0!==this.tz)if("number"==typeof this.tz)this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes()+this.tz,this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),this.apply();else try{let e=h(t,this.tz);this.ms=t.getMilliseconds(),this.second=e.s,this.minute=e.i,this.hour=e.h,this.day=e.d,this.month=e.m-1,this.year=e.y}catch(e){let t=e instanceof Error?e.message:String(e);throw TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${t}`)}else this.ms=t.getMilliseconds(),this.second=t.getSeconds(),this.minute=t.getMinutes(),this.hour=t.getHours(),this.day=t.getDate(),this.month=t.getMonth(),this.year=t.getFullYear()}fromCronDate(t){this.tz=t.tz,this.year=t.year,this.month=t.month,this.day=t.day,this.hour=t.hour,this.minute=t.minute,this.second=t.second,this.ms=t.ms}apply(){if(!(this.month>11)&&!(this.month<0)&&!(this.day>c[this.month])&&!(this.day<1)&&!(this.hour>59)&&!(this.minute>59)&&!(this.second>59)&&!(this.hour<0)&&!(this.minute<0)&&!(this.second<0))return!1;{let t=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes(),this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),!0}}fromString(t){if("number"!=typeof this.tz)return this.fromDate(n(t,this.tz));{let e=n(t);this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply()}}findNext(t,e,r,i){return this._findMatch(t,e,r,i,1)}_findMatch(t,e,r,i,s){let a=this[e],n;r.lastDayOfMonth&&(n=this.getLastDayOfMonth(this.year,this.month));let o=r.starDOW||"day"!=e?void 0:new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),h=this[e]+i,l=1===s?t=>t<r[e].length:t=>t>=0;for(let u=h;l(u);u+=s){let s=r[e][u];if("day"===e&&!s){for(let t=0;t<r.nearestWeekdays.length;t++)if(r.nearestWeekdays[t]){let e=this.getNearestWeekday(this.year,this.month,t-i);if(-1===e)continue;if(e===u-i){s=1;break}}}if("day"===e&&r.lastWeekday&&u-i===this.getLastWeekday(this.year,this.month)&&(s=1),"day"===e&&r.lastDayOfMonth&&u-i==n&&(s=1),"day"===e&&!r.starDOW){let e=r.dayOfWeek[(o+(u-i-1))%7];if(e&&63&e)e=+!!this.isNthWeekdayOfMonth(this.year,this.month,u-i,e);else if(e)throw Error(`CronDate: Invalid value for dayOfWeek encountered. ${e}`);s=r.useAndLogic||t.domAndDow||r.starDOM?s&&e:s||e}if(s)return this[e]=u-i,a!==this[e]?2:1}return 3}recurse(t,e,r){if(0===r&&!t.starYear){if(this.year>=0&&this.year<t.year.length&&0===t.year[this.year]){let e=-1;for(let r=this.year+1;r<t.year.length&&r<1e4;r++)if(1===t.year[r]){e=r;break}if(-1===e)return null;this.year=e,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let i=this.findNext(e,f[r][0],t,f[r][2]);if(i>1){let s=r+1;for(;s<f.length;)this[f[s][0]]=-f[s][2],s++;if(3===i){if(this[f[r][1]]++,this[f[r][0]]=-f[r][2],this.apply(),0===r&&!t.starYear){for(;this.year>=0&&this.year<t.year.length&&0===t.year[this.year]&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=t.year.length)return null}return this.recurse(t,e,0)}if(this.apply())return this.recurse(t,e,r-1)}return(r+=1)>=f.length?this:(t.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(t,e,r)}increment(t,e,r){return this.second+=void 0!==e.interval&&e.interval>1&&r?e.interval:1,this.ms=0,this.apply(),this.recurse(t,e,0)}decrement(t,e){return this.second-=void 0!==e.interval&&e.interval>1?e.interval:1,this.ms=0,this.apply(),this.recurseBackward(t,e,0,0)}recurseBackward(t,e,r,i=0){if(i>1e4)return null;if(0===r&&!t.starYear){if(this.year>=0&&this.year<t.year.length&&0===t.year[this.year]){let e=-1;for(let r=this.year-1;r>=0;r--)if(1===t.year[r]){e=r;break}if(-1===e)return null;this.year=e,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let s=this.findPrevious(e,f[r][0],t,f[r][2]);if(s>1){let a=r+1;for(;a<f.length;){let e=f[a][0],r=f[a][2],i=this.getMaxPatternValue(e,t,r);this[e]=i,a++}if(3===s){if(this[f[r][1]]--,0===r){let t=this.getLastDayOfMonth(this.year,this.month);this.day>t&&(this.day=t)}if(1===r)if(this.day<=0)this.day=1;else{let t=this.year,e=this.month;for(;e<0;)e+=12,t--;for(;e>11;)e-=12,t++;let r=1!==e?c[e]:new Date(Date.UTC(t,e+1,0)).getUTCDate();this.day>r&&(this.day=r)}this.apply();let s=f[r][0],a=f[r][2],n=this.getMaxPatternValue(s,t,a);if("day"===s){let t=this.getLastDayOfMonth(this.year,this.month);this[s]=Math.min(n,t)}else this[s]=n;if(this.apply(),0===r){let e=f[1][2],r=Math.min(this.getMaxPatternValue("day",t,e),this.getLastDayOfMonth(this.year,this.month));r!==this.day&&(this.day=r,this.hour=this.getMaxPatternValue("hour",t,f[2][2]),this.minute=this.getMaxPatternValue("minute",t,f[3][2]),this.second=this.getMaxPatternValue("second",t,f[4][2]))}if(0===r&&!t.starYear){for(;this.year>=0&&this.year<t.year.length&&0===t.year[this.year];)this.year--;if(this.year<0)return null}return this.recurseBackward(t,e,0,i+1)}if(this.apply())return this.recurseBackward(t,e,r-1,i+1)}return(r+=1)>=f.length?this:this.year<0?null:this.recurseBackward(t,e,r,i+1)}getMaxPatternValue(t,e,r){if("day"===t&&e.lastDayOfMonth||"day"===t&&!e.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let i=e[t].length-1;i>=0;i--)if(e[t][i])return i-r;return e[t].length-1-r}findPrevious(t,e,r,i){return this._findMatch(t,e,r,i,-1)}getDate(t){return t||void 0===this.tz?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):"number"==typeof this.tz?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):o(l(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(t,e){if(!t.starYear&&(this.year<0||this.year>=t.year.length||0===t.year[this.year]))return!1;for(let r=0;r<f.length;r++){let i=f[r][0],s=f[r][2],a=this[i];if(a+s<0||a+s>=t[i].length)return!1;let n=t[i][a+s];if("day"===i){if(!n){for(let e=0;e<t.nearestWeekdays.length;e++)if(t.nearestWeekdays[e]){let t=this.getNearestWeekday(this.year,this.month,e-s);if(-1!==t&&t===a){n=1;break}}}if(t.lastWeekday&&a===this.getLastWeekday(this.year,this.month)&&(n=1),t.lastDayOfMonth&&a===this.getLastDayOfMonth(this.year,this.month)&&(n=1),!t.starDOW){let r=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),i=t.dayOfWeek[(r+(a-1))%7];i&&63&i&&(i=+!!this.isNthWeekdayOfMonth(this.year,this.month,a,i)),n=t.useAndLogic||e.domAndDow||t.starDOM?n&&i:n||i}}if(!n)return!1}return!0}};function y(t){return"[object Function]"===Object.prototype.toString.call(t)||"function"==typeof t||t instanceof Function}var g=[],m=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(t){if(void 0!==this.options.dayOffset&&0!==this.options.dayOffset){let e=24*this.options.dayOffset*36e5;return new Date(t.getTime()+e)}return t}constructor(t,e,r){let i,s;if(y(e))s=e;else if("object"==typeof e)i=e;else if(void 0!==e)throw Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(y(r))s=r;else if("object"==typeof r)i=r;else if(void 0!==r)throw Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=i?.name,this.options=function(t){if(void 0===t&&(t={}),delete t.name,void 0!==t.legacyMode&&void 0===t.domAndDow?t.domAndDow=!t.legacyMode:void 0===t.domAndDow&&(t.domAndDow=!1),t.legacyMode=!t.domAndDow,t.paused=void 0!==t.paused&&t.paused,t.maxRuns=void 0===t.maxRuns?1/0:t.maxRuns,t.catch=void 0!==t.catch&&t.catch,t.interval=void 0===t.interval?0:parseInt(t.interval.toString(),10),t.utcOffset=void 0===t.utcOffset?void 0:parseInt(t.utcOffset.toString(),10),t.dayOffset=void 0===t.dayOffset?0:parseInt(t.dayOffset.toString(),10),t.unref=void 0!==t.unref&&t.unref,t.mode=void 0===t.mode?"auto":t.mode,t.alternativeWeekdays=void 0!==t.alternativeWeekdays&&t.alternativeWeekdays,t.sloppyRanges=void 0!==t.sloppyRanges&&t.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes(t.mode))throw Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if(t.startAt&&(t.startAt=new p(t.startAt,t.timezone)),t.stopAt&&(t.stopAt=new p(t.stopAt,t.timezone)),null!==t.interval){if(isNaN(t.interval))throw Error("CronOptions: Supplied value for interval is not a number");if(t.interval<0)throw Error("CronOptions: Supplied value for interval can not be negative")}if(void 0!==t.utcOffset){if(isNaN(t.utcOffset))throw Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(t.utcOffset<-870||t.utcOffset>870)throw Error("CronOptions: utcOffset out of bounds.");if(void 0!==t.utcOffset&&t.timezone)throw Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(!0!==t.unref&&!1!==t.unref)throw Error("CronOptions: Unref should be either true, false or undefined(false).");if(void 0!==t.dayOffset&&0!==t.dayOffset&&isNaN(t.dayOffset))throw Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return t}(i),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:i?i.maxRuns:void 0,paused:!!i&&i.paused,pattern:new d("* * * * *",void 0,{mode:"auto"})},t&&(t instanceof Date||"string"==typeof t&&t.indexOf(":")>0)?this._states.once=new p(t,this.getTz()):this._states.pattern=new d(t,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(g.find(t=>t.name===this.name))throw Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");g.push(this)}return void 0!==s&&function(t){return y(t)}(s)&&(this.fn=s,this.schedule()),this}nextRun(t){let e=this._next(t);return e?this.applyDayOffset(e.getDate(!1)):null}nextRuns(t,e){void 0!==this._states.maxRuns&&t>this._states.maxRuns&&(t=this._states.maxRuns);let r=e||this._states.currentRun||void 0;return this._enumerateRuns(t,r,"next")}previousRuns(t,e){return this._enumerateRuns(t,e||void 0,"previous")}_enumerateRuns(t,e,r){let i=[],s=e?new p(e,this.getTz()):null,a="next"===r?this._next:this._previous;for(;t--;){let t=a.call(this,s);if(!t)break;let e=t.getDate(!1);i.push(this.applyDayOffset(e)),s=t}return i}match(t){if(this._states.once){let e=new p(t,this.getTz());e.ms=0;let r=new p(this._states.once,this.getTz());return r.ms=0,e.getTime()===r.getTime()}let e=new p(t,this.getTz());return e.ms=0,e.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let t=this.nextRun(this._states.currentRun),e=!this._states.paused,r=void 0!==this.fn,i=!this._states.kill;return e&&r&&i&&null!==t}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(t){let e=this._next(t);return e?t instanceof p||t instanceof Date?e.getTime()-t.getTime():e.getTime()-new p(t).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let t=g.indexOf(this);t>=0&&g.splice(t,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(t){var e;if(t&&this.fn)throw Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");t&&(this.fn=t);let r=this.msToNext(),i=this.nextRun(this._states.currentRun);return null==r||isNaN(r)||null===i||(r>3e4&&(r=3e4),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(i),r),this._states.currentTimeout&&this.options.unref&&(e=this._states.currentTimeout,"u">typeof Deno&&"u">typeof Deno.unrefTimer?Deno.unrefTimer(e):e&&"u">typeof e.unref&&e.unref())),this}async _trigger(t){this._states.blocking=!0,this._states.currentRun=new p(void 0,this.getTz());try{if(this.options.catch)try{void 0!==this.fn&&await this.fn(this,this.options.context)}catch(t){if(y(this.options.catch))try{this.options.catch(t,this)}catch{}}else void 0!==this.fn&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new p(t,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(t){let e=new Date,r=!this._states.paused&&e.getTime()>=t.getTime(),i=this._states.blocking&&this.options.protect;r&&!i?(void 0!==this._states.maxRuns&&this._states.maxRuns--,this._trigger()):r&&i&&y(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(t){let e=!!(t||this._states.currentRun),r=!1;!t&&this.options.startAt&&this.options.interval&&([t,e]=this._calculatePreviousRun(t,e),r=!t),t=new p(t,this.getTz()),this.options.startAt&&t&&t.getTime()<this.options.startAt.getTime()&&(t=this.options.startAt);let i=this._states.once||new p(t,this.getTz());return r||i===this._states.once||(i=i.increment(this._states.pattern,this.options,e)),this._states.once&&this._states.once.getTime()<=t.getTime()||null===i||void 0!==this._states.maxRuns&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&i.getTime()>=this.options.stopAt.getTime()?null:i}_previous(t){let e=new p(t,this.getTz());this.options.stopAt&&e.getTime()>this.options.stopAt.getTime()&&(e=this.options.stopAt);let r=new p(e,this.getTz());return this._states.once?this._states.once.getTime()<e.getTime()?this._states.once:null:null===(r=r.decrement(this._states.pattern,this.options))||this.options.startAt&&r.getTime()<this.options.startAt.getTime()?null:r}_calculatePreviousRun(t,e){let r=new p(void 0,this.getTz()),i=t;if(this.options.startAt.getTime()<=r.getTime()){let t=(i=this.options.startAt).getTime()+1e3*this.options.interval;for(;t<=r.getTime();)t=(i=new p(i,this.getTz()).increment(this._states.pattern,this.options,!0)).getTime()+1e3*this.options.interval;e=!0}return null===i&&(i=void 0),[i,e]}};function w(){if(process.env.SLYCODE_HOME)return process.env.SLYCODE_HOME;let t=process.cwd();return(console.warn("[paths] SLYCODE_HOME not set in production — falling back to cwd:",t),t.endsWith("/web")||t.endsWith("\\web"))?r.default.dirname(t):t}t.i(33405),t.i(54799);let T=w();r.default.basename(T),r.default.join(w(),"store",".ignored-updates.json");let v=function(){if(process.env.SLYCODE_HOME)return process.env.SLYCODE_HOME;let t=process.cwd();return t.endsWith("/web")||t.endsWith("\\web")?r.default.dirname(t):t}(),C=r.default.join(v,"projects","registry.json");async function D(){try{let t=await e.promises.readFile(C,"utf-8");return JSON.parse(t)}catch(t){throw console.error("Failed to load registry:",t),Error(`Failed to load registry from ${C}`)}}let O=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];!function(){try{let t=r.default.join(w(),".env");for(let r of(0,e.readFileSync)(t,"utf-8").split("\n")){let t=r.trim();if(!t||t.startsWith("#"))continue;let e=t.indexOf("=");if(e<0)continue;let i=t.slice(0,e).trim(),s=t.slice(e+1).trim();process.env[i]||(process.env[i]=s)}}catch{}}();let k=process.env.BRIDGE_URL?process.env.BRIDGE_URL:"http://127.0.0.1:3004",S=process.env.TZ||"UTC",N=r.default.join(i.default.homedir(),".slycode","logs","automation.log");async function $(t,e){let r=new AbortController,i=setTimeout(()=>r.abort(),1e4);try{return await fetch(t,{...e,signal:r.signal})}finally{clearTimeout(i)}}async function x(t){try{let i=r.default.dirname(N);await e.promises.mkdir(i,{recursive:!0});let s=JSON.stringify(t)+"\n";await e.promises.appendFile(N,s);try{if((await e.promises.stat(N)).size>1e6){let t=(await e.promises.readFile(N,"utf-8")).trim().split("\n"),r=t.slice(Math.floor(t.length/2));await e.promises.writeFile(N,r.join("\n")+"\n")}}catch{}}catch(t){console.error("[scheduler] Failed to write automation log:",t)}}async function _(t){await new Promise(t=>setTimeout(t,2e4));try{let e=await $(`${k}/sessions/${encodeURIComponent(t)}`);if(!e.ok)return{status:"unknown"};let r=await e.json();if("stopped"===r.status)return{status:"stopped",exitCode:r.exitCode,exitedAt:r.exitedAt};if("running"===r.status||"detached"===r.status)return{status:"running"};return{status:"unknown"}}catch{return{status:"unknown"}}}function A(){try{let t=new Intl.DateTimeFormat("en-US",{timeZone:S,timeZoneName:"short"}).formatToParts(new Date),e=t.find(t=>"timeZoneName"===t.type)?.value||S;return{timezone:S,abbreviation:e}}catch{return{timezone:"UTC",abbreviation:"UTC"}}}let b="__scheduler_state__",R="__scheduler_timer__",U=globalThis;U[b]||(U[b]={running:!1,lastCheck:null,activeKickoffs:new Set}),void 0===U[R]&&(U[R]=null);let W=U[b];function M(){return U[R]??null}function E(t,e){if("one-shot"===e){let e=new Date(t);return isNaN(e.getTime())?null:e}try{return new m(t,{timezone:S}).nextRun()}catch{return null}}async function P(t){await new Promise(t=>setTimeout(t,1e4));let e=0;try{let r=await $(`${k}/sessions/${encodeURIComponent(t)}`);if(!r.ok)return!1;let i=await r.json();if("stopped"===i.status)return!1;e=i.lastOutputAt?new Date(i.lastOutputAt).getTime():0}catch{return!1}await new Promise(t=>setTimeout(t,5e3));try{let r=await $(`${k}/sessions/${encodeURIComponent(t)}`);if(!r.ok)return!1;let i=await r.json();if("stopped"===i.status)return!1;return(i.lastOutputAt?new Date(i.lastOutputAt).getTime():0)>e}catch{return!1}}function I(t){let e=t.toLocaleDateString("en-US",{weekday:"long",timeZone:S}),r=new Intl.DateTimeFormat("en-US",{day:"numeric",timeZone:S}).format(t),i=t.toLocaleDateString("en-US",{month:"short",timeZone:S}),s=new Intl.DateTimeFormat("en-US",{year:"numeric",timeZone:S}).format(t),a=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:S}),{abbreviation:n}=A();return`${e}, ${r} ${i} ${s}, ${a} ${n}`}async function z(t,e,r,i={trigger:"scheduled"}){let s=t.automation;if(!s)return{cardId:t.id,projectId:e,success:!1,error:"No automation config"};let a=s.provider||"claude",n=`${e}:${a}:card:${t.id}`,o=s.workingDirectory||r,h=[function(t,e,r){let i=new Date,s=["=== AUTOMATION RUN ==="];if(s.push(`Time: ${I(i)}`),s.push(`Card: ${t.title} (${t.id})`),"manual"===r)s.push("Trigger: manual");else{let t=function(t,e,r="Not set",i){if("one-shot"===e)try{let e=new Date(t);if(isNaN(e.getTime()))return t||r;return`Once on ${e.toLocaleDateString()} at ${e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`}catch{return t||r}if(!t)return r;let s=t.split(" ");if(5!==s.length)return t;let[a,n,o,,h]=s,l=n.match(/^(\d+)-(\d+)\/(\d+)$/);if(l&&"*"===o&&"*"===h){let[,t,e,r]=l;return`Every ${r}h from ${t.padStart(2,"0")}:${a.padStart(2,"0")} to ${e.padStart(2,"0")}:${a.padStart(2,"0")}`}if(n.includes(",")&&"*"===o&&"*"===h){let t=n.split(",").map(Number);if(t.length>=2){let e=(t[1]-t[0]+24)%24;if(e>0){let r=String(t[0]).padStart(2,"0"),i=String(t[t.length-1]).padStart(2,"0");return`Every ${e}h from ${r}:${a.padStart(2,"0")} to ${i}:${a.padStart(2,"0")}`}}}if("*"===n&&"*"===o&&"*"===h)return`Every hour at :${a.padStart(2,"0")}`;if("*"===o&&"*"===h)return`Daily at ${n}:${a.padStart(2,"0")}`;if("*"===o&&"*"!==h){let t=h.split(",").map(t=>O[parseInt(t)]||t).join(", ");return`Weekly on ${t} at ${n}:${a.padStart(2,"0")}`}return"*"!==o&&"*"===h?`Monthly on day ${o} at ${n}:${a.padStart(2,"0")}`:t}(e.schedule,e.scheduleType);s.push(`Trigger: scheduled (${t.toLowerCase()})`)}if(e.lastRun){let t=new Date(e.lastRun);s.push(`Last run: ${I(t)} (${function(t,e){let r=e.getTime()-t.getTime();if(r<0)return"in the future";let i=Math.floor(r/6e4),s=Math.floor(i/60),a=Math.floor(s/24);return a>0?`${a}d ${s%24}h ago`:s>0?`${s}h ${i%60}m ago`:i>0?`${i}m ago`:"just now"}(t,i)})`)}else s.push("Last run: never");return s.push("======================"),s.join("\n")}(t,s,i.trigger),""];if(t.areas.length>0&&h.push(`Areas: ${t.areas.join(", ")}`),t.tags.length>0&&h.push(`Tags: ${t.tags.join(", ")}`),t.checklist.length>0){let e=t.checklist.filter(t=>!t.done);e.length>0&&h.push(`Pending checklist: ${e.map(t=>t.text).join("; ")}`)}h.push("","---","",t.description);let l=h.join("\n");s.reportViaMessaging&&(l+='\n\nAfter completing the task, send a summary of the results using the messaging skill: sly-messaging send "<your summary>"');let u=s.freshSession||!1,d=Date.now(),c=null,f=null,p=async r=>(await x({timestamp:new Date().toISOString(),cardId:t.id,cardTitle:t.title,projectId:e,trigger:i.trigger,provider:a,sessionName:n,fresh:u,bridgeRequest:c,livenessCheck:f,outcome:r.success?"success":"error",error:r.error||null,elapsedMs:Date.now()-d}),r);try{console.log(`[scheduler] Creating session: ${n} (fresh: ${u}, provider: ${a})`);let r=await $(`${k}/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n,provider:a,skipPermissions:!0,cwd:o,prompt:l,fresh:u})});if(r.ok||409!==r.status||u)if(r.ok){let t=await r.json();c={status:r.status,resumed:t.resumed,pid:t.pid},console.log(`[scheduler] Session created: ${n} (status: ${t.status}, resumed: ${t.resumed}, pid: ${t.pid})`)}else{let i;try{let t=await r.json();i=t.error||JSON.stringify(t)}catch{i=await r.text()}return c={status:r.status,error:i},p({cardId:t.id,projectId:e,success:!1,error:`Session create failed (${r.status}): ${i}`})}else{c={status:409},console.log(`[scheduler] Session ${n} returned 409, sending prompt via input endpoint`);let r=await $(`${k}/sessions/${encodeURIComponent(n)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:l})});if(r.ok&&(await new Promise(t=>setTimeout(t,600)),await $(`${k}/sessions/${encodeURIComponent(n)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:"\r"})})),!r.ok){let i=await r.text();return p({cardId:t.id,projectId:e,success:!1,error:`Input failed (${r.status}): ${i}`})}}if(u){let r=await _(n);if(f={type:"checkSessionAlive",result:r.status,delayMs:2e4,exitCode:r.exitCode,exitedAt:r.exitedAt},"stopped"===r.status){if(0===r.exitCode)return p({cardId:t.id,projectId:e,success:!0,sessionName:n});let i=void 0!==r.exitCode?` (exit code ${r.exitCode})`:"",s=r.exitedAt?`, alive ${((new Date(r.exitedAt).getTime()-d)/1e3).toFixed(1)}s`:"";return p({cardId:t.id,projectId:e,success:!1,sessionName:n,error:`Session stopped during startup${i}${s}`})}return p({cardId:t.id,projectId:e,success:!0,sessionName:n})}if(await P(n))return f={type:"waitForActivity",result:"active"},p({cardId:t.id,projectId:e,success:!0,sessionName:n});console.log(`[scheduler] No activity for ${t.id} (resume path), retrying via input...`),await new Promise(t=>setTimeout(t,3e3));let i=`\x1b[200~${l}\x1b[201~`;if((await $(`${k}/sessions/${encodeURIComponent(n)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:i})})).ok&&(await new Promise(t=>setTimeout(t,600)),await $(`${k}/sessions/${encodeURIComponent(n)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:"\r"})}),await P(n)))return f={type:"waitForActivity",result:"active (retry)"},p({cardId:t.id,projectId:e,success:!0,sessionName:n});return f={type:"waitForActivity",result:"inactive after retry"},p({cardId:t.id,projectId:e,success:!1,sessionName:n,error:"No activity detected after retry"})}catch(r){return p({cardId:t.id,projectId:e,success:!1,sessionName:n,error:r.message})}}async function L(t,i,s){let a=r.default.join(t,"documentation","kanban.json");try{let t=await e.promises.readFile(a,"utf-8"),r=JSON.parse(t);for(let t of Object.values(r.stages))for(let e of t)if(e.id===i&&e.automation){Object.assign(e.automation,s);break}await e.promises.writeFile(a,JSON.stringify(r,null,2)+"\n")}catch(t){console.error(`[scheduler] Failed to update card ${i}:`,t)}}async function j(e,r,i){try{let{execSync:s}=await t.A(44264),a=[`Automation failed: ${e}`];i&&a.push(`Session: ${i}`),a.push(`Error: ${r}`),a.push("Log: ~/.slycode/logs/automation.log");let n=a.join("\n").replace(/"/g,'\\"');s(`sly-messaging send "${n}"`,{timeout:1e4,stdio:"pipe"})}catch{console.error(`[scheduler] Failed to send error notification for "${e}"`)}}async function F(){W.lastCheck=new Date().toISOString();try{for(let t of(await D()).projects){let i,s=r.default.join(t.path,"documentation","kanban.json");try{let t=await e.promises.readFile(s,"utf-8");i=JSON.parse(t)}catch{continue}for(let[,e]of Object.entries(i.stages))for(let r of e)r.automation&&r.automation.enabled&&!r.archived&&!W.activeKickoffs.has(r.id)&&function(t){if(!t.enabled||!t.schedule)return!1;if("one-shot"===t.scheduleType){let e=new Date(t.schedule);return!isNaN(e.getTime())&&e.getTime()<=Date.now()}try{let e=new m(t.schedule,{timezone:S}),r=Date.now(),i=new Date(t.lastRun?Math.max(new Date(t.lastRun).getTime(),r-6e4):r),s=e.nextRun(i);if(!s)return!1;return s.getTime()<=r}catch{return!1}}(r.automation)&&(W.activeKickoffs.add(r.id),await L(t.path,r.id,{lastRun:new Date().toISOString()}),(async()=>{try{console.log(`[scheduler] Firing automation: ${r.title} (${r.id})`);let e=await z(r,t.id,t.path),i={lastResult:e.success?"success":"error"};if("one-shot"===r.automation.scheduleType)i.enabled=!1;else{let t=E(r.automation.schedule,"recurring");t&&(i.nextRun=t.toISOString())}await L(t.path,r.id,i),e.success||(console.error(`[scheduler] Kickoff failed for ${r.id}: ${e.error}`),e.error&&(e.error.includes("Session create failed")||e.error.includes("Session stopped")||e.error.includes("Input failed")||e.error.includes("No automation config"))?await j(r.title,e.error||"Unknown error",e.sessionName):console.log(`[scheduler] Soft failure for ${r.id}, skipping notification: ${e.error}`))}catch(t){console.error(`[scheduler] Error processing ${r.id}:`,t)}finally{W.activeKickoffs.delete(r.id)}})())}}catch(t){console.error("[scheduler] Check loop error:",t)}}function Y(){var t;let e=M();e&&(clearInterval(e),U[R]=null),W.running||(W.running=!0,console.log("[scheduler] Started. Checking every 30s."),F(),t=setInterval(F,3e4),U[R]=t)}function Z(){if(!W.running)return;W.running=!1;let t=M();t&&(clearInterval(t),U[R]=null);console.log("[scheduler] Stopped.")}function J(){return W.running||(console.log("[scheduler] Auto-starting on status check"),Y()),{running:W.running,lastCheck:W.lastCheck,activeKickoffs:Array.from(W.activeKickoffs)}}t.s(["getConfiguredTimezone",()=>A,"getNextRun",()=>E,"getSchedulerStatus",()=>J,"startScheduler",()=>Y,"stopScheduler",()=>Z,"triggerAutomation",()=>z,"updateCardAutomation",()=>L],92739)}];
|
|
1
|
+
module.exports=[92739,t=>{"use strict";var e=t.i(22734),r=t.i(14747),i=t.i(46786);function s(t){return Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)}function a(t,e){return t.y===e.y&&t.m===e.m&&t.d===e.d&&t.h===e.h&&t.i===e.i&&t.s===e.s}function n(t,e,r){return o(function(t,e){let r=new Date(Date.parse(t));if(isNaN(r))throw Error("Invalid ISO8601 passed to timezone parser.");let i=t.substring(9);return i.includes("Z")||i.includes("+")||i.includes("-")?l(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),"Etc/UTC"):l(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),e)}(t,e),r)}function o(t,e){let r=new Date(s(t)),i=h(r,t.tz),n=s(t),o=s(i),l=new Date(r.getTime()+(n-o)),u=h(l,t.tz);if(a(u,t)){let e=new Date(l.getTime()-36e5);return a(h(e,t.tz),t)?e:l}let d=new Date(l.getTime()+s(t)-s(u));if(a(h(d,t.tz),t))return d;if(e)throw Error("Invalid date passed to fromTZ()");return l.getTime()>d.getTime()?l:d}function h(t,e){let r;try{r=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(t)}catch(r){let t=r instanceof Error?r.message:String(r);throw RangeError(`toTZ: Invalid timezone '${e}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${t}`)}let i={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let t of r)("year"===t.type||"month"===t.type||"day"===t.type||"hour"===t.type||"minute"===t.type||"second"===t.type)&&(i[t.type]=parseInt(t.value,10));if(isNaN(i.year)||isNaN(i.month)||isNaN(i.day)||isNaN(i.hour)||isNaN(i.minute)||isNaN(i.second))throw Error(`toTZ: Failed to parse all date components from timezone '${e}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(i)}`);return 24===i.hour&&(i.hour=0),{y:i.year,m:i.month,d:i.day,h:i.hour,i:i.minute,s:i.second,tz:e}}function l(t,e,r,i,s,a,n){return{y:t,m:e,d:r,h:i,i:s,s:a,tz:n}}var u=[1,2,4,8,16],d=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(t,e,r){this.pattern=t,this.timezone=e,this.mode=r?.mode??"auto",this.alternativeWeekdays=r?.alternativeWeekdays??!1,this.sloppyRanges=r?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!("string"==typeof this.pattern||this.pattern instanceof String))throw TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.match(/\S+/g)||[""],e=t.length;if(t.length<5||t.length>7)throw TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if("auto"!==this.mode){let t;switch(this.mode){case"5-part":t=5;break;case"6-part":t=6;break;case"7-part":t=7;break;case"5-or-6-parts":t=[5,6];break;case"6-or-7-parts":t=[6,7];break;default:t=0}if(!(Array.isArray(t)?t.includes(e):e===t)){let r=Array.isArray(t)?t.join(" or "):t.toString();throw TypeError(`CronPattern: mode '${this.mode}' requires exactly ${r} parts, but pattern '${this.pattern}' has ${e} parts.`)}}if(5===t.length&&t.unshift("0"),6===t.length&&t.push("*"),"LW"===t[3].toUpperCase()?(this.lastWeekday=!0,t[3]=""):t[3].toUpperCase().indexOf("L")>=0&&(t[3]=t[3].replace(/L/gi,""),this.lastDayOfMonth=!0),"*"==t[3]&&(this.starDOM=!0),"*"==t[6]&&(this.starYear=!0),t[4].length>=3&&(t[4]=this.replaceAlphaMonths(t[4])),t[5].length>=3&&(t[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(t[5]):this.replaceAlphaDays(t[5])),t[5].startsWith("+")&&(this.useAndLogic=!0,t[5]=t[5].substring(1),""===t[5]))throw TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch("*"==t[5]&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&(t[0]=t[0].replace(/\?/g,"*"),t[1]=t[1].replace(/\?/g,"*"),t[2]=t[2].replace(/\?/g,"*"),t[3]=t[3].replace(/\?/g,"*"),t[4]=t[4].replace(/\?/g,"*"),t[5]=t[5].replace(/\?/g,"*"),t[6]&&(t[6]=t[6].replace(/\?/g,"*"))),this.mode){case"5-part":t[0]="0",t[6]="*";break;case"6-part":case"5-or-6-parts":t[6]="*"}this.throwAtIllegalCharacters(t),this.partToArray("second",t[0],0,1),this.partToArray("minute",t[1],0,1),this.partToArray("hour",t[2],0,1),this.partToArray("day",t[3],-1,1),this.partToArray("month",t[4],-1,1);let r=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",t[5],r,63),this.partToArray("year",t[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(t,e,r,i){let s=this[t],a="day"===t&&this.lastDayOfMonth,n="day"===t&&this.lastWeekday;if(""===e&&!a&&!n)throw TypeError("CronPattern: configuration entry "+t+" ("+e+") is empty, check for trailing spaces.");if("*"===e)return s.fill(i);let o=e.split(",");if(o.length>1)for(let e=0;e<o.length;e++)this.partToArray(t,o[e],r,i);else -1!==e.indexOf("-")&&-1!==e.indexOf("/")?this.handleRangeWithStepping(e,t,r,i):-1!==e.indexOf("-")?this.handleRange(e,t,r,i):-1!==e.indexOf("/")?this.handleStepping(e,t,r,i):""!==e&&this.handleNumber(e,t,r,i)}throwAtIllegalCharacters(t){for(let e=0;e<t.length;e++)if((3===e?/[^/*0-9,\-WwLl]+/:5===e?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(t[e]))throw TypeError("CronPattern: configuration entry "+e+" ("+t[e]+") contains illegal characters.")}handleNumber(t,e,r,i){let s=this.extractNth(t,e),a=t.toUpperCase().includes("W");if("day"!==e&&a)throw TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");a&&(e="nearestWeekdays");let n=parseInt(s[0],10)+r;if(isNaN(n))throw TypeError("CronPattern: "+e+" is not a number: '"+t+"'");this.setPart(e,n,s[1]||i)}setPart(t,e,r){if(!Object.prototype.hasOwnProperty.call(this,t))throw TypeError("CronPattern: Invalid part specified: "+t);if("dayOfWeek"===t){if(7===e&&(e=0),e<0||e>6)throw RangeError("CronPattern: Invalid value for dayOfWeek: "+e);this.setNthWeekdayOfMonth(e,r);return}if("second"===t||"minute"===t){if(e<0||e>=60)throw RangeError("CronPattern: Invalid value for "+t+": "+e)}else if("hour"===t){if(e<0||e>=24)throw RangeError("CronPattern: Invalid value for "+t+": "+e)}else if("day"===t||"nearestWeekdays"===t){if(e<0||e>=31)throw RangeError("CronPattern: Invalid value for "+t+": "+e)}else if("month"===t){if(e<0||e>=12)throw RangeError("CronPattern: Invalid value for "+t+": "+e)}else if("year"===t&&(e<1||e>=1e4))throw RangeError("CronPattern: Invalid value for "+t+": "+e+" (supported range: 1-9999)");this[t][e]=r}validateNotNaN(t,e){if(isNaN(t))throw TypeError(e)}validateRange(t,e,r,i,s){if(t>e)throw TypeError("CronPattern: From value is larger than to value: '"+s+"'");if(void 0!==r){if(0===r)throw TypeError("CronPattern: Syntax error, illegal stepping: 0");if(r>this[i].length)throw TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[i].length+")")}}handleRangeWithStepping(t,e,r,i){if(t.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let s=this.extractNth(t,e),a=s[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(null===a)throw TypeError("CronPattern: Syntax error, illegal range with stepping: '"+t+"'");let[,n,o,h]=a,l=parseInt(n,10)+r,u=parseInt(o,10)+r,d=parseInt(h,10);this.validateNotNaN(l,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(u,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(d,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(l,u,d,e,t);for(let t=l;t<=u;t+=d)this.setPart(e,t,s[1]||i)}extractNth(t,e){let r=t,i;if(r.includes("#")){if("dayOfWeek"!==e)throw Error("CronPattern: nth (#) only allowed in day-of-week field");i=r.split("#")[1],r=r.split("#")[0]}else if(r.toUpperCase().endsWith("L")){if("dayOfWeek"!==e)throw Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");i="L",r=r.slice(0,-1)}return[r,i]}handleRange(t,e,r,i){if(t.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in a range.");let s=this.extractNth(t,e),a=s[0].split("-");if(2!==a.length)throw TypeError("CronPattern: Syntax error, illegal range: '"+t+"'");let n=parseInt(a[0],10)+r,o=parseInt(a[1],10)+r;this.validateNotNaN(n,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(o,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(n,o,void 0,e,t);for(let t=n;t<=o;t++)this.setPart(e,t,s[1]||i)}handleStepping(t,e,r,i){if(t.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let s=this.extractNth(t,e),a=s[0].split("/");if(2!==a.length)throw TypeError("CronPattern: Syntax error, illegal stepping: '"+t+"'");if(this.sloppyRanges)""===a[0]&&(a[0]="*");else{if(""===a[0])throw TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if("*"!==a[0])throw TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let n=0;"*"!==a[0]&&(n=parseInt(a[0],10)+r);let o=parseInt(a[1],10);this.validateNotNaN(o,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[e].length-1,o,e,t);for(let t=n;t<this[e].length;t+=o)this.setPart(e,t,s[1]||i)}replaceAlphaDays(t){return t.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz(t){return t.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths(t){return t.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(t){let e=t.trim().toLowerCase();if("@yearly"===e||"@annually"===e)return"0 0 1 1 *";if("@monthly"===e)return"0 0 1 * *";if("@weekly"===e)return"0 0 * * 0";if("@daily"===e||"@midnight"===e)return"0 0 * * *";if("@hourly"===e)return"0 * * * *";if("@reboot"===e)throw TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return t}setNthWeekdayOfMonth(t,e){if("number"!=typeof e&&"L"===e.toUpperCase())this.dayOfWeek[t]=32|this.dayOfWeek[t];else if(63===e)this.dayOfWeek[t]=63;else if(e<6&&e>0)this.dayOfWeek[t]=this.dayOfWeek[t]|u[e-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},c=[31,28,31,30,31,30,31,31,30,31,30,31],f=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],p=class t{tz;ms;second;minute;hour;day;month;year;constructor(e,r){if(this.tz=r,e&&e instanceof Date)if(isNaN(e))throw TypeError("CronDate: Invalid date passed to CronDate constructor");else this.fromDate(e);else if(null==e)this.fromDate(new Date);else if(e&&"string"==typeof e)this.fromString(e);else if(e instanceof t)this.fromCronDate(e);else throw TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}getLastDayOfMonth(t,e){return 1!==e?c[e]:new Date(Date.UTC(t,e+1,0)).getUTCDate()}getLastWeekday(t,e){let r=this.getLastDayOfMonth(t,e),i=new Date(Date.UTC(t,e,r)).getUTCDay();return 0===i?r-2:6===i?r-1:r}getNearestWeekday(t,e,r){let i=this.getLastDayOfMonth(t,e);if(r>i)return -1;let s=new Date(Date.UTC(t,e,r)).getUTCDay();return 0===s?r===i?r-2:r+1:6===s?1===r?r+2:r-1:r}isNthWeekdayOfMonth(t,e,r,i){let s=new Date(Date.UTC(t,e,r)).getUTCDay(),a=0;for(let i=1;i<=r;i++)new Date(Date.UTC(t,e,i)).getUTCDay()===s&&a++;if(63&i&&u[a-1]&i)return!0;if(32&i){let i=this.getLastDayOfMonth(t,e);for(let a=r+1;a<=i;a++)if(new Date(Date.UTC(t,e,a)).getUTCDay()===s)return!1;return!0}return!1}fromDate(t){if(void 0!==this.tz)if("number"==typeof this.tz)this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes()+this.tz,this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),this.apply();else try{let e=h(t,this.tz);this.ms=t.getMilliseconds(),this.second=e.s,this.minute=e.i,this.hour=e.h,this.day=e.d,this.month=e.m-1,this.year=e.y}catch(e){let t=e instanceof Error?e.message:String(e);throw TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${t}`)}else this.ms=t.getMilliseconds(),this.second=t.getSeconds(),this.minute=t.getMinutes(),this.hour=t.getHours(),this.day=t.getDate(),this.month=t.getMonth(),this.year=t.getFullYear()}fromCronDate(t){this.tz=t.tz,this.year=t.year,this.month=t.month,this.day=t.day,this.hour=t.hour,this.minute=t.minute,this.second=t.second,this.ms=t.ms}apply(){if(!(this.month>11)&&!(this.month<0)&&!(this.day>c[this.month])&&!(this.day<1)&&!(this.hour>59)&&!(this.minute>59)&&!(this.second>59)&&!(this.hour<0)&&!(this.minute<0)&&!(this.second<0))return!1;{let t=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes(),this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),!0}}fromString(t){if("number"!=typeof this.tz)return this.fromDate(n(t,this.tz));{let e=n(t);this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply()}}findNext(t,e,r,i){return this._findMatch(t,e,r,i,1)}_findMatch(t,e,r,i,s){let a=this[e],n;r.lastDayOfMonth&&(n=this.getLastDayOfMonth(this.year,this.month));let o=r.starDOW||"day"!=e?void 0:new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),h=this[e]+i,l=1===s?t=>t<r[e].length:t=>t>=0;for(let u=h;l(u);u+=s){let s=r[e][u];if("day"===e&&!s){for(let t=0;t<r.nearestWeekdays.length;t++)if(r.nearestWeekdays[t]){let e=this.getNearestWeekday(this.year,this.month,t-i);if(-1===e)continue;if(e===u-i){s=1;break}}}if("day"===e&&r.lastWeekday&&u-i===this.getLastWeekday(this.year,this.month)&&(s=1),"day"===e&&r.lastDayOfMonth&&u-i==n&&(s=1),"day"===e&&!r.starDOW){let e=r.dayOfWeek[(o+(u-i-1))%7];if(e&&63&e)e=+!!this.isNthWeekdayOfMonth(this.year,this.month,u-i,e);else if(e)throw Error(`CronDate: Invalid value for dayOfWeek encountered. ${e}`);s=r.useAndLogic||t.domAndDow||r.starDOM?s&&e:s||e}if(s)return this[e]=u-i,a!==this[e]?2:1}return 3}recurse(t,e,r){if(0===r&&!t.starYear){if(this.year>=0&&this.year<t.year.length&&0===t.year[this.year]){let e=-1;for(let r=this.year+1;r<t.year.length&&r<1e4;r++)if(1===t.year[r]){e=r;break}if(-1===e)return null;this.year=e,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let i=this.findNext(e,f[r][0],t,f[r][2]);if(i>1){let s=r+1;for(;s<f.length;)this[f[s][0]]=-f[s][2],s++;if(3===i){if(this[f[r][1]]++,this[f[r][0]]=-f[r][2],this.apply(),0===r&&!t.starYear){for(;this.year>=0&&this.year<t.year.length&&0===t.year[this.year]&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=t.year.length)return null}return this.recurse(t,e,0)}if(this.apply())return this.recurse(t,e,r-1)}return(r+=1)>=f.length?this:(t.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(t,e,r)}increment(t,e,r){return this.second+=void 0!==e.interval&&e.interval>1&&r?e.interval:1,this.ms=0,this.apply(),this.recurse(t,e,0)}decrement(t,e){return this.second-=void 0!==e.interval&&e.interval>1?e.interval:1,this.ms=0,this.apply(),this.recurseBackward(t,e,0,0)}recurseBackward(t,e,r,i=0){if(i>1e4)return null;if(0===r&&!t.starYear){if(this.year>=0&&this.year<t.year.length&&0===t.year[this.year]){let e=-1;for(let r=this.year-1;r>=0;r--)if(1===t.year[r]){e=r;break}if(-1===e)return null;this.year=e,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let s=this.findPrevious(e,f[r][0],t,f[r][2]);if(s>1){let a=r+1;for(;a<f.length;){let e=f[a][0],r=f[a][2],i=this.getMaxPatternValue(e,t,r);this[e]=i,a++}if(3===s){if(this[f[r][1]]--,0===r){let t=this.getLastDayOfMonth(this.year,this.month);this.day>t&&(this.day=t)}if(1===r)if(this.day<=0)this.day=1;else{let t=this.year,e=this.month;for(;e<0;)e+=12,t--;for(;e>11;)e-=12,t++;let r=1!==e?c[e]:new Date(Date.UTC(t,e+1,0)).getUTCDate();this.day>r&&(this.day=r)}this.apply();let s=f[r][0],a=f[r][2],n=this.getMaxPatternValue(s,t,a);if("day"===s){let t=this.getLastDayOfMonth(this.year,this.month);this[s]=Math.min(n,t)}else this[s]=n;if(this.apply(),0===r){let e=f[1][2],r=Math.min(this.getMaxPatternValue("day",t,e),this.getLastDayOfMonth(this.year,this.month));r!==this.day&&(this.day=r,this.hour=this.getMaxPatternValue("hour",t,f[2][2]),this.minute=this.getMaxPatternValue("minute",t,f[3][2]),this.second=this.getMaxPatternValue("second",t,f[4][2]))}if(0===r&&!t.starYear){for(;this.year>=0&&this.year<t.year.length&&0===t.year[this.year];)this.year--;if(this.year<0)return null}return this.recurseBackward(t,e,0,i+1)}if(this.apply())return this.recurseBackward(t,e,r-1,i+1)}return(r+=1)>=f.length?this:this.year<0?null:this.recurseBackward(t,e,r,i+1)}getMaxPatternValue(t,e,r){if("day"===t&&e.lastDayOfMonth||"day"===t&&!e.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let i=e[t].length-1;i>=0;i--)if(e[t][i])return i-r;return e[t].length-1-r}findPrevious(t,e,r,i){return this._findMatch(t,e,r,i,-1)}getDate(t){return t||void 0===this.tz?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):"number"==typeof this.tz?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):o(l(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(t,e){if(!t.starYear&&(this.year<0||this.year>=t.year.length||0===t.year[this.year]))return!1;for(let r=0;r<f.length;r++){let i=f[r][0],s=f[r][2],a=this[i];if(a+s<0||a+s>=t[i].length)return!1;let n=t[i][a+s];if("day"===i){if(!n){for(let e=0;e<t.nearestWeekdays.length;e++)if(t.nearestWeekdays[e]){let t=this.getNearestWeekday(this.year,this.month,e-s);if(-1!==t&&t===a){n=1;break}}}if(t.lastWeekday&&a===this.getLastWeekday(this.year,this.month)&&(n=1),t.lastDayOfMonth&&a===this.getLastDayOfMonth(this.year,this.month)&&(n=1),!t.starDOW){let r=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),i=t.dayOfWeek[(r+(a-1))%7];i&&63&i&&(i=+!!this.isNthWeekdayOfMonth(this.year,this.month,a,i)),n=t.useAndLogic||e.domAndDow||t.starDOM?n&&i:n||i}}if(!n)return!1}return!0}};function y(t){return"[object Function]"===Object.prototype.toString.call(t)||"function"==typeof t||t instanceof Function}var g=[],m=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(t){if(void 0!==this.options.dayOffset&&0!==this.options.dayOffset){let e=24*this.options.dayOffset*36e5;return new Date(t.getTime()+e)}return t}constructor(t,e,r){let i,s;if(y(e))s=e;else if("object"==typeof e)i=e;else if(void 0!==e)throw Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(y(r))s=r;else if("object"==typeof r)i=r;else if(void 0!==r)throw Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=i?.name,this.options=function(t){if(void 0===t&&(t={}),delete t.name,void 0!==t.legacyMode&&void 0===t.domAndDow?t.domAndDow=!t.legacyMode:void 0===t.domAndDow&&(t.domAndDow=!1),t.legacyMode=!t.domAndDow,t.paused=void 0!==t.paused&&t.paused,t.maxRuns=void 0===t.maxRuns?1/0:t.maxRuns,t.catch=void 0!==t.catch&&t.catch,t.interval=void 0===t.interval?0:parseInt(t.interval.toString(),10),t.utcOffset=void 0===t.utcOffset?void 0:parseInt(t.utcOffset.toString(),10),t.dayOffset=void 0===t.dayOffset?0:parseInt(t.dayOffset.toString(),10),t.unref=void 0!==t.unref&&t.unref,t.mode=void 0===t.mode?"auto":t.mode,t.alternativeWeekdays=void 0!==t.alternativeWeekdays&&t.alternativeWeekdays,t.sloppyRanges=void 0!==t.sloppyRanges&&t.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes(t.mode))throw Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if(t.startAt&&(t.startAt=new p(t.startAt,t.timezone)),t.stopAt&&(t.stopAt=new p(t.stopAt,t.timezone)),null!==t.interval){if(isNaN(t.interval))throw Error("CronOptions: Supplied value for interval is not a number");if(t.interval<0)throw Error("CronOptions: Supplied value for interval can not be negative")}if(void 0!==t.utcOffset){if(isNaN(t.utcOffset))throw Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(t.utcOffset<-870||t.utcOffset>870)throw Error("CronOptions: utcOffset out of bounds.");if(void 0!==t.utcOffset&&t.timezone)throw Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(!0!==t.unref&&!1!==t.unref)throw Error("CronOptions: Unref should be either true, false or undefined(false).");if(void 0!==t.dayOffset&&0!==t.dayOffset&&isNaN(t.dayOffset))throw Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return t}(i),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:i?i.maxRuns:void 0,paused:!!i&&i.paused,pattern:new d("* * * * *",void 0,{mode:"auto"})},t&&(t instanceof Date||"string"==typeof t&&t.indexOf(":")>0)?this._states.once=new p(t,this.getTz()):this._states.pattern=new d(t,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(g.find(t=>t.name===this.name))throw Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");g.push(this)}return void 0!==s&&function(t){return y(t)}(s)&&(this.fn=s,this.schedule()),this}nextRun(t){let e=this._next(t);return e?this.applyDayOffset(e.getDate(!1)):null}nextRuns(t,e){void 0!==this._states.maxRuns&&t>this._states.maxRuns&&(t=this._states.maxRuns);let r=e||this._states.currentRun||void 0;return this._enumerateRuns(t,r,"next")}previousRuns(t,e){return this._enumerateRuns(t,e||void 0,"previous")}_enumerateRuns(t,e,r){let i=[],s=e?new p(e,this.getTz()):null,a="next"===r?this._next:this._previous;for(;t--;){let t=a.call(this,s);if(!t)break;let e=t.getDate(!1);i.push(this.applyDayOffset(e)),s=t}return i}match(t){if(this._states.once){let e=new p(t,this.getTz());e.ms=0;let r=new p(this._states.once,this.getTz());return r.ms=0,e.getTime()===r.getTime()}let e=new p(t,this.getTz());return e.ms=0,e.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let t=this.nextRun(this._states.currentRun),e=!this._states.paused,r=void 0!==this.fn,i=!this._states.kill;return e&&r&&i&&null!==t}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(t){let e=this._next(t);return e?t instanceof p||t instanceof Date?e.getTime()-t.getTime():e.getTime()-new p(t).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let t=g.indexOf(this);t>=0&&g.splice(t,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(t){var e;if(t&&this.fn)throw Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");t&&(this.fn=t);let r=this.msToNext(),i=this.nextRun(this._states.currentRun);return null==r||isNaN(r)||null===i||(r>3e4&&(r=3e4),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(i),r),this._states.currentTimeout&&this.options.unref&&(e=this._states.currentTimeout,"u">typeof Deno&&"u">typeof Deno.unrefTimer?Deno.unrefTimer(e):e&&"u">typeof e.unref&&e.unref())),this}async _trigger(t){this._states.blocking=!0,this._states.currentRun=new p(void 0,this.getTz());try{if(this.options.catch)try{void 0!==this.fn&&await this.fn(this,this.options.context)}catch(t){if(y(this.options.catch))try{this.options.catch(t,this)}catch{}}else void 0!==this.fn&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new p(t,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(t){let e=new Date,r=!this._states.paused&&e.getTime()>=t.getTime(),i=this._states.blocking&&this.options.protect;r&&!i?(void 0!==this._states.maxRuns&&this._states.maxRuns--,this._trigger()):r&&i&&y(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(t){let e=!!(t||this._states.currentRun),r=!1;!t&&this.options.startAt&&this.options.interval&&([t,e]=this._calculatePreviousRun(t,e),r=!t),t=new p(t,this.getTz()),this.options.startAt&&t&&t.getTime()<this.options.startAt.getTime()&&(t=this.options.startAt);let i=this._states.once||new p(t,this.getTz());return r||i===this._states.once||(i=i.increment(this._states.pattern,this.options,e)),this._states.once&&this._states.once.getTime()<=t.getTime()||null===i||void 0!==this._states.maxRuns&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&i.getTime()>=this.options.stopAt.getTime()?null:i}_previous(t){let e=new p(t,this.getTz());this.options.stopAt&&e.getTime()>this.options.stopAt.getTime()&&(e=this.options.stopAt);let r=new p(e,this.getTz());return this._states.once?this._states.once.getTime()<e.getTime()?this._states.once:null:null===(r=r.decrement(this._states.pattern,this.options))||this.options.startAt&&r.getTime()<this.options.startAt.getTime()?null:r}_calculatePreviousRun(t,e){let r=new p(void 0,this.getTz()),i=t;if(this.options.startAt.getTime()<=r.getTime()){let t=(i=this.options.startAt).getTime()+1e3*this.options.interval;for(;t<=r.getTime();)t=(i=new p(i,this.getTz()).increment(this._states.pattern,this.options,!0)).getTime()+1e3*this.options.interval;e=!0}return null===i&&(i=void 0),[i,e]}};function w(){if(process.env.SLYCODE_HOME)return process.env.SLYCODE_HOME;let t=process.cwd();return(console.warn("[paths] SLYCODE_HOME not set in production — falling back to cwd:",t),t.endsWith("/web")||t.endsWith("\\web"))?r.default.dirname(t):t}t.i(33405),t.i(54799);let T=w();r.default.basename(T),r.default.join(w(),"store",".ignored-updates.json");let v=function(){if(process.env.SLYCODE_HOME)return process.env.SLYCODE_HOME;let t=process.cwd();return t.endsWith("/web")||t.endsWith("\\web")?r.default.dirname(t):t}(),C=r.default.join(v,"projects","registry.json");async function D(){try{let t=await e.promises.readFile(C,"utf-8");return JSON.parse(t)}catch(t){throw console.error("Failed to load registry:",t),Error(`Failed to load registry from ${C}`)}}let O=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];!function(){try{let t=r.default.join(w(),".env");for(let r of(0,e.readFileSync)(t,"utf-8").split("\n")){let t=r.trim();if(!t||t.startsWith("#"))continue;let e=t.indexOf("=");if(e<0)continue;let i=t.slice(0,e).trim(),s=t.slice(e+1).trim();process.env[i]||(process.env[i]=s)}}catch{}}();let k=process.env.BRIDGE_URL?process.env.BRIDGE_URL:"http://127.0.0.1:3004",S=process.env.TZ||"UTC",N=r.default.join(i.default.homedir(),".slycode","logs","automation.log");async function $(t,e){let r=new AbortController,i=setTimeout(()=>r.abort(),1e4);try{return await fetch(t,{...e,signal:r.signal})}finally{clearTimeout(i)}}async function x(t){try{let i=r.default.dirname(N);await e.promises.mkdir(i,{recursive:!0});let s=JSON.stringify(t)+"\n";await e.promises.appendFile(N,s);try{if((await e.promises.stat(N)).size>1e6){let t=(await e.promises.readFile(N,"utf-8")).trim().split("\n"),r=t.slice(Math.floor(t.length/2));await e.promises.writeFile(N,r.join("\n")+"\n")}}catch{}}catch(t){console.error("[scheduler] Failed to write automation log:",t)}}async function _(t){await new Promise(t=>setTimeout(t,2e4));try{let e=await $(`${k}/sessions/${encodeURIComponent(t)}`);if(!e.ok)return{status:"unknown"};let r=await e.json();if("stopped"===r.status)return{status:"stopped",exitCode:r.exitCode,exitedAt:r.exitedAt};if("running"===r.status||"detached"===r.status)return{status:"running"};return{status:"unknown"}}catch{return{status:"unknown"}}}function A(){try{let t=new Intl.DateTimeFormat("en-US",{timeZone:S,timeZoneName:"short"}).formatToParts(new Date),e=t.find(t=>"timeZoneName"===t.type)?.value||S;return{timezone:S,abbreviation:e}}catch{return{timezone:"UTC",abbreviation:"UTC"}}}let b="__scheduler_state__",R="__scheduler_timer__",U=globalThis;U[b]||(U[b]={running:!1,lastCheck:null,activeKickoffs:new Set}),void 0===U[R]&&(U[R]=null);let W=U[b];function M(){return U[R]??null}function E(t,e){if("one-shot"===e){let e=new Date(t);return isNaN(e.getTime())?null:e}try{return new m(t,{timezone:S}).nextRun()}catch{return null}}async function P(t){await new Promise(t=>setTimeout(t,1e4));let e=0;try{let r=await $(`${k}/sessions/${encodeURIComponent(t)}`);if(!r.ok)return!1;let i=await r.json();if("stopped"===i.status)return!1;e=i.lastOutputAt?new Date(i.lastOutputAt).getTime():0}catch{return!1}await new Promise(t=>setTimeout(t,5e3));try{let r=await $(`${k}/sessions/${encodeURIComponent(t)}`);if(!r.ok)return!1;let i=await r.json();if("stopped"===i.status)return!1;return(i.lastOutputAt?new Date(i.lastOutputAt).getTime():0)>e}catch{return!1}}function I(t){let e=t.toLocaleDateString("en-US",{weekday:"long",timeZone:S}),r=new Intl.DateTimeFormat("en-US",{day:"numeric",timeZone:S}).format(t),i=t.toLocaleDateString("en-US",{month:"short",timeZone:S}),s=new Intl.DateTimeFormat("en-US",{year:"numeric",timeZone:S}).format(t),a=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:S}),{abbreviation:n}=A();return`${e}, ${r} ${i} ${s}, ${a} ${n}`}async function z(t,e,r,i={trigger:"scheduled"}){let s=t.automation;if(!s)return{cardId:t.id,projectId:e,success:!1,error:"No automation config"};let a=s.provider||"claude",n=`${e}:${a}:card:${t.id}`,o=s.workingDirectory||r,h=[function(t,e,r){let i=new Date,s=["=== AUTOMATION RUN ==="];if(s.push(`Time: ${I(i)}`),s.push(`Card: ${t.title} (${t.id})`),"manual"===r)s.push("Trigger: manual");else{let t=function(t,e,r="Not set",i){if("one-shot"===e)try{let e=new Date(t);if(isNaN(e.getTime()))return t||r;return`Once on ${e.toLocaleDateString()} at ${e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`}catch{return t||r}if(!t)return r;let s=t.split(" ");if(5!==s.length)return t;let[a,n,o,,h]=s,l=n.match(/^(\d+)-(\d+)\/(\d+)$/);if(l&&"*"===o&&"*"===h){let[,t,e,r]=l;return`Every ${r}h from ${t.padStart(2,"0")}:${a.padStart(2,"0")} to ${e.padStart(2,"0")}:${a.padStart(2,"0")}`}if(n.includes(",")&&"*"===o&&"*"===h){let t=n.split(",").map(Number);if(t.length>=2){let e=(t[1]-t[0]+24)%24;if(e>0){let r=String(t[0]).padStart(2,"0"),i=String(t[t.length-1]).padStart(2,"0");return`Every ${e}h from ${r}:${a.padStart(2,"0")} to ${i}:${a.padStart(2,"0")}`}}}if("*"===n&&"*"===o&&"*"===h)return`Every hour at :${a.padStart(2,"0")}`;if("*"===o&&"*"===h)return`Daily at ${n}:${a.padStart(2,"0")}`;if("*"===o&&"*"!==h){let t=h.split(",").map(t=>O[parseInt(t)]||t).join(", ");return`Weekly on ${t} at ${n}:${a.padStart(2,"0")}`}return"*"!==o&&"*"===h?`Monthly on day ${o} at ${n}:${a.padStart(2,"0")}`:t}(e.schedule,e.scheduleType);s.push(`Trigger: scheduled (${t.toLowerCase()})`)}if(e.lastRun){let t=new Date(e.lastRun);s.push(`Last run: ${I(t)} (${function(t,e){let r=e.getTime()-t.getTime();if(r<0)return"in the future";let i=Math.floor(r/6e4),s=Math.floor(i/60),a=Math.floor(s/24);return a>0?`${a}d ${s%24}h ago`:s>0?`${s}h ${i%60}m ago`:i>0?`${i}m ago`:"just now"}(t,i)})`)}else s.push("Last run: never");return s.push("======================"),s.join("\n")}(t,s,i.trigger),""];if(t.areas.length>0&&h.push(`Areas: ${t.areas.join(", ")}`),t.tags.length>0&&h.push(`Tags: ${t.tags.join(", ")}`),t.checklist.length>0){let e=t.checklist.filter(t=>!t.done);e.length>0&&h.push(`Pending checklist: ${e.map(t=>t.text).join("; ")}`)}h.push("","---","",t.description);let l=h.join("\n");s.reportViaMessaging&&(l+='\n\nAfter completing the task, send a summary of the results using the messaging skill: sly-messaging send "<your summary>"');let u=s.freshSession||!1,d=Date.now(),c=null,f=null,p=async r=>(await x({timestamp:new Date().toISOString(),cardId:t.id,cardTitle:t.title,projectId:e,trigger:i.trigger,provider:a,sessionName:n,fresh:u,bridgeRequest:c,livenessCheck:f,outcome:r.success?"success":"error",error:r.error||null,elapsedMs:Date.now()-d}),r);try{console.log(`[scheduler] Creating session: ${n} (fresh: ${u}, provider: ${a})`);let r=await $(`${k}/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n,provider:a,skipPermissions:!0,cwd:o,prompt:l,fresh:u})});if(r.ok||409!==r.status||u)if(r.ok){let t=await r.json();c={status:r.status,resumed:t.resumed,pid:t.pid},console.log(`[scheduler] Session created: ${n} (status: ${t.status}, resumed: ${t.resumed}, pid: ${t.pid})`)}else{let i;try{let t=await r.json();i=t.error||JSON.stringify(t)}catch{i=await r.text()}return c={status:r.status,error:i},p({cardId:t.id,projectId:e,success:!1,error:`Session create failed (${r.status}): ${i}`})}else{c={status:409},console.log(`[scheduler] Session ${n} returned 409, sending prompt via input endpoint`);let r=await $(`${k}/sessions/${encodeURIComponent(n)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:l})});if(r.ok&&(await new Promise(t=>setTimeout(t,600)),await $(`${k}/sessions/${encodeURIComponent(n)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:"\r"})})),!r.ok){let i=await r.text();return p({cardId:t.id,projectId:e,success:!1,error:`Input failed (${r.status}): ${i}`})}}if(u){let r=await _(n);if(f={type:"checkSessionAlive",result:r.status,delayMs:2e4,exitCode:r.exitCode,exitedAt:r.exitedAt},"stopped"===r.status){if(0===r.exitCode)return p({cardId:t.id,projectId:e,success:!0,sessionName:n});let i=void 0!==r.exitCode?` (exit code ${r.exitCode})`:"",s=r.exitedAt?`, alive ${((new Date(r.exitedAt).getTime()-d)/1e3).toFixed(1)}s`:"";return p({cardId:t.id,projectId:e,success:!1,sessionName:n,error:`Session stopped during startup${i}${s}`})}return p({cardId:t.id,projectId:e,success:!0,sessionName:n})}if(await P(n))return f={type:"waitForActivity",result:"active"},p({cardId:t.id,projectId:e,success:!0,sessionName:n});console.log(`[scheduler] No activity for ${t.id} (resume path), retrying via input...`),await new Promise(t=>setTimeout(t,3e3));let i=`\x1b[200~${l}\x1b[201~`;if((await $(`${k}/sessions/${encodeURIComponent(n)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:i})})).ok&&(await new Promise(t=>setTimeout(t,600)),await $(`${k}/sessions/${encodeURIComponent(n)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:"\r"})}),await P(n)))return f={type:"waitForActivity",result:"active (retry)"},p({cardId:t.id,projectId:e,success:!0,sessionName:n});return f={type:"waitForActivity",result:"inactive after retry"},p({cardId:t.id,projectId:e,success:!1,sessionName:n,error:"No activity detected after retry"})}catch(r){return p({cardId:t.id,projectId:e,success:!1,sessionName:n,error:r.message})}}async function L(t,i,s){let a=r.default.join(t,"documentation","kanban.json");try{let t=await e.promises.readFile(a,"utf-8"),r=JSON.parse(t);for(let t of Object.values(r.stages))for(let e of t)if(e.id===i&&e.automation){Object.assign(e.automation,s);break}await e.promises.writeFile(a,JSON.stringify(r,null,2)+"\n")}catch(t){console.error(`[scheduler] Failed to update card ${i}:`,t)}}async function j(e,r,i){try{let{execSync:s}=await t.A(44264),a=[`Automation failed: ${e}`];i&&a.push(`Session: ${i}`),a.push(`Error: ${r}`),a.push("Log: ~/.slycode/logs/automation.log");let n=a.join("\n").replace(/"/g,'\\"');s(`sly-messaging send "${n}"`,{timeout:1e4,stdio:"pipe"})}catch{console.error(`[scheduler] Failed to send error notification for "${e}"`)}}async function F(){W.lastCheck=new Date().toISOString();try{for(let t of(await D()).projects){let i,s=r.default.join(t.path,"documentation","kanban.json");try{let t=await e.promises.readFile(s,"utf-8");i=JSON.parse(t)}catch{continue}for(let[,e]of Object.entries(i.stages))for(let r of e)r.automation&&r.automation.enabled&&!r.archived&&!W.activeKickoffs.has(r.id)&&function(t){if(!t.enabled||!t.schedule)return!1;if("one-shot"===t.scheduleType){let e=new Date(t.schedule);return!isNaN(e.getTime())&&e.getTime()<=Date.now()}try{let e=new m(t.schedule,{timezone:S}),r=Date.now(),i=new Date(t.lastRun?Math.max(new Date(t.lastRun).getTime(),r-6e4):r),s=e.nextRun(i);if(!s)return!1;return s.getTime()<=r}catch{return!1}}(r.automation)&&(W.activeKickoffs.add(r.id),await L(t.path,r.id,{lastRun:new Date().toISOString()}),(async()=>{try{console.log(`[scheduler] Firing automation: ${r.title} (${r.id})`);let e=await z(r,t.id,t.path),i={lastResult:e.success?"success":"error"};if("one-shot"===r.automation.scheduleType)i.enabled=!1;else{let t=E(r.automation.schedule,"recurring");t&&(i.nextRun=t.toISOString())}await L(t.path,r.id,i),e.success||(console.error(`[scheduler] Kickoff failed for ${r.id}: ${e.error}`),e.error&&(e.error.includes("Session create failed")||e.error.includes("Session stopped")||e.error.includes("Input failed")||e.error.includes("No automation config")||e.error.includes("No activity detected"))?await j(r.title,e.error||"Unknown error",e.sessionName):console.log(`[scheduler] Soft failure for ${r.id}, skipping notification: ${e.error}`))}catch(t){console.error(`[scheduler] Error processing ${r.id}:`,t)}finally{W.activeKickoffs.delete(r.id)}})())}}catch(t){console.error("[scheduler] Check loop error:",t)}}function Y(){var t;let e=M();e&&(clearInterval(e),U[R]=null),W.running||(W.running=!0,console.log("[scheduler] Started. Checking every 30s."),F(),t=setInterval(F,3e4),U[R]=t)}function Z(){if(!W.running)return;W.running=!1;let t=M();t&&(clearInterval(t),U[R]=null);console.log("[scheduler] Stopped.")}function J(){return W.running||(console.log("[scheduler] Auto-starting on status check"),Y()),{running:W.running,lastCheck:W.lastCheck,activeKickoffs:Array.from(W.activeKickoffs)}}t.s(["getConfiguredTimezone",()=>A,"getNextRun",()=>E,"getSchedulerStatus",()=>J,"startScheduler",()=>Y,"stopScheduler",()=>Z,"triggerAutomation",()=>z,"updateCardAutomation",()=>L],92739)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_lib_scheduler_ts_03988e3e._.js.map
|