prjct-cli 0.11.5 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +81 -25
- package/bin/dev.js +1 -1
- package/bin/generate-views.js +209 -0
- package/bin/migrate-to-json.js +742 -0
- package/bin/prjct +5 -5
- package/bin/serve.js +226 -50
- package/core/__tests__/agentic/{memory-system.test.js → memory-system.test.ts} +12 -23
- package/core/__tests__/agentic/{plan-mode.test.js → plan-mode.test.ts} +26 -24
- package/core/__tests__/agentic/{prompt-builder.test.js → prompt-builder.test.ts} +3 -8
- package/core/__tests__/utils/{date-helper.test.js → date-helper.test.ts} +19 -30
- package/core/__tests__/utils/{output.test.js → output.test.ts} +12 -24
- package/core/agentic/agent-router.ts +137 -0
- package/core/agentic/chain-of-thought.ts +228 -0
- package/core/agentic/command-executor/command-executor.ts +384 -0
- package/core/agentic/command-executor/index.ts +16 -0
- package/core/agentic/command-executor/status-signal.ts +38 -0
- package/core/agentic/command-executor/types.ts +79 -0
- package/core/agentic/command-executor.ts +8 -0
- package/core/agentic/{context-builder.js → context-builder.ts} +92 -81
- package/core/agentic/context-filter.ts +365 -0
- package/core/agentic/ground-truth/index.ts +76 -0
- package/core/agentic/ground-truth/types.ts +33 -0
- package/core/agentic/ground-truth/utils.ts +48 -0
- package/core/agentic/ground-truth/verifiers/analyze.ts +54 -0
- package/core/agentic/ground-truth/verifiers/done.ts +75 -0
- package/core/agentic/ground-truth/verifiers/feature.ts +70 -0
- package/core/agentic/ground-truth/verifiers/index.ts +37 -0
- package/core/agentic/ground-truth/verifiers/init.ts +52 -0
- package/core/agentic/ground-truth/verifiers/now.ts +57 -0
- package/core/agentic/ground-truth/verifiers/ship.ts +85 -0
- package/core/agentic/ground-truth/verifiers/spec.ts +45 -0
- package/core/agentic/ground-truth/verifiers/sync.ts +47 -0
- package/core/agentic/ground-truth/verifiers.ts +6 -0
- package/core/agentic/ground-truth.ts +8 -0
- package/core/agentic/loop-detector/error-analysis.ts +97 -0
- package/core/agentic/loop-detector/hallucination.ts +71 -0
- package/core/agentic/loop-detector/index.ts +41 -0
- package/core/agentic/loop-detector/loop-detector.ts +222 -0
- package/core/agentic/loop-detector/types.ts +66 -0
- package/core/agentic/loop-detector.ts +8 -0
- package/core/agentic/memory-system/history.ts +53 -0
- package/core/agentic/memory-system/index.ts +192 -0
- package/core/agentic/memory-system/patterns.ts +156 -0
- package/core/agentic/memory-system/semantic-memories.ts +277 -0
- package/core/agentic/memory-system/session.ts +21 -0
- package/core/agentic/memory-system/types.ts +159 -0
- package/core/agentic/memory-system.ts +8 -0
- package/core/agentic/parallel-tools.ts +165 -0
- package/core/agentic/plan-mode/approval.ts +57 -0
- package/core/agentic/plan-mode/constants.ts +44 -0
- package/core/agentic/plan-mode/index.ts +28 -0
- package/core/agentic/plan-mode/plan-mode.ts +406 -0
- package/core/agentic/plan-mode/types.ts +193 -0
- package/core/agentic/plan-mode.ts +8 -0
- package/core/agentic/prompt-builder.ts +566 -0
- package/core/agentic/response-templates.ts +164 -0
- package/core/agentic/semantic-compression.ts +273 -0
- package/core/agentic/services.ts +206 -0
- package/core/agentic/smart-context.ts +476 -0
- package/core/agentic/{template-loader.js → template-loader.ts} +27 -16
- package/core/agentic/think-blocks.ts +202 -0
- package/core/agentic/tool-registry.ts +119 -0
- package/core/agentic/validation-rules.ts +313 -0
- package/core/agents/index.ts +28 -0
- package/core/agents/performance.ts +444 -0
- package/core/agents/types.ts +126 -0
- package/core/bus/{index.js → index.ts} +57 -61
- package/core/command-registry/categories.ts +23 -0
- package/core/command-registry/commands.ts +15 -0
- package/core/command-registry/core-commands.ts +319 -0
- package/core/command-registry/index.ts +158 -0
- package/core/command-registry/optional-commands.ts +119 -0
- package/core/command-registry/setup-commands.ts +53 -0
- package/core/command-registry/types.ts +59 -0
- package/core/command-registry.ts +9 -0
- package/core/commands/analysis.ts +298 -0
- package/core/commands/analytics.ts +288 -0
- package/core/commands/base.ts +273 -0
- package/core/commands/index.ts +211 -0
- package/core/commands/maintenance.ts +226 -0
- package/core/commands/planning.ts +311 -0
- package/core/commands/setup.ts +309 -0
- package/core/commands/shipping.ts +188 -0
- package/core/commands/types.ts +183 -0
- package/core/commands/workflow.ts +226 -0
- package/core/commands.ts +11 -0
- package/core/constants/formats.ts +187 -0
- package/core/constants/index.ts +7 -0
- package/core/{context-sync.js → context-sync.ts} +59 -26
- package/core/data/agents-manager.ts +76 -0
- package/core/data/analysis-manager.ts +83 -0
- package/core/data/base-manager.ts +156 -0
- package/core/data/ideas-manager.ts +81 -0
- package/core/data/index.ts +32 -0
- package/core/data/outcomes-manager.ts +96 -0
- package/core/data/project-manager.ts +75 -0
- package/core/data/roadmap-manager.ts +118 -0
- package/core/data/shipped-manager.ts +65 -0
- package/core/data/state-manager.ts +214 -0
- package/core/domain/{agent-generator.js → agent-generator.ts} +77 -57
- package/core/domain/{agent-loader.js → agent-loader.ts} +65 -56
- package/core/domain/{agent-matcher.js → agent-matcher.ts} +51 -24
- package/core/domain/{agent-validator.js → agent-validator.ts} +70 -37
- package/core/domain/{analyzer.js → analyzer.ts} +91 -85
- package/core/domain/{architect-session.js → architect-session.ts} +49 -34
- package/core/domain/{architecture-generator.js → architecture-generator.ts} +25 -13
- package/core/domain/{context-estimator.js → context-estimator.ts} +57 -36
- package/core/domain/{product-standards.js → product-standards.ts} +40 -26
- package/core/domain/{smart-cache.js → smart-cache.ts} +39 -30
- package/core/domain/{snapshot-manager.js → snapshot-manager.ts} +103 -100
- package/core/domain/{task-analyzer.js → task-analyzer.ts} +82 -43
- package/core/domain/task-stack/index.ts +19 -0
- package/core/domain/task-stack/parser.ts +86 -0
- package/core/domain/task-stack/storage.ts +123 -0
- package/core/domain/task-stack/task-stack.ts +340 -0
- package/core/domain/task-stack/types.ts +51 -0
- package/core/domain/task-stack.ts +8 -0
- package/core/{index.js → index.ts} +61 -18
- package/core/infrastructure/{agent-detector.js → agent-detector.ts} +55 -19
- package/core/infrastructure/agents/{claude-agent.js → claude-agent.ts} +61 -21
- package/core/infrastructure/{author-detector.js → author-detector.ts} +42 -49
- package/core/infrastructure/{capability-installer.js → capability-installer.ts} +51 -27
- package/core/infrastructure/{command-installer.js → command-installer/command-installer.ts} +43 -144
- package/core/infrastructure/command-installer/global-config.ts +106 -0
- package/core/infrastructure/command-installer/index.ts +25 -0
- package/core/infrastructure/command-installer/types.ts +41 -0
- package/core/infrastructure/command-installer.ts +8 -0
- package/core/infrastructure/{config-manager.js → config-manager.ts} +60 -80
- package/core/infrastructure/{editors-config.js → editors-config.ts} +33 -31
- package/core/infrastructure/legacy-installer-detector/cleanup.ts +216 -0
- package/core/infrastructure/legacy-installer-detector/detection.ts +95 -0
- package/core/infrastructure/legacy-installer-detector/index.ts +171 -0
- package/core/infrastructure/legacy-installer-detector/migration.ts +87 -0
- package/core/infrastructure/legacy-installer-detector/types.ts +42 -0
- package/core/infrastructure/legacy-installer-detector.ts +7 -0
- package/core/infrastructure/migrator/file-operations.ts +125 -0
- package/core/infrastructure/migrator/index.ts +288 -0
- package/core/infrastructure/migrator/project-scanner.ts +89 -0
- package/core/infrastructure/migrator/reports.ts +117 -0
- package/core/infrastructure/migrator/types.ts +124 -0
- package/core/infrastructure/migrator/validation.ts +94 -0
- package/core/infrastructure/migrator/version-migration.ts +117 -0
- package/core/infrastructure/migrator.ts +10 -0
- package/core/infrastructure/{path-manager.js → path-manager.ts} +51 -91
- package/core/infrastructure/session-manager/index.ts +23 -0
- package/core/infrastructure/session-manager/migration.ts +88 -0
- package/core/infrastructure/session-manager/session-manager.ts +307 -0
- package/core/infrastructure/session-manager/types.ts +45 -0
- package/core/infrastructure/session-manager.ts +8 -0
- package/core/infrastructure/{setup.js → setup.ts} +29 -21
- package/core/infrastructure/{update-checker.js → update-checker.ts} +40 -18
- package/core/outcomes/analyzer.ts +333 -0
- package/core/outcomes/index.ts +34 -0
- package/core/outcomes/recorder.ts +194 -0
- package/core/outcomes/types.ts +145 -0
- package/core/plugin/{hooks.js → hooks.ts} +56 -58
- package/core/plugin/{index.js → index.ts} +19 -8
- package/core/plugin/{loader.js → loader.ts} +87 -69
- package/core/plugin/{registry.js → registry.ts} +49 -45
- package/core/plugins/{webhook.js → webhook.ts} +43 -27
- package/core/schemas/agents.ts +27 -0
- package/core/schemas/analysis.ts +41 -0
- package/core/schemas/ideas.ts +83 -0
- package/core/schemas/index.ts +73 -0
- package/core/schemas/outcomes.ts +22 -0
- package/core/schemas/project.ts +26 -0
- package/core/schemas/roadmap.ts +90 -0
- package/core/schemas/shipped.ts +82 -0
- package/core/schemas/state.ts +107 -0
- package/core/session/index.ts +17 -0
- package/core/session/{metrics.js → metrics.ts} +64 -46
- package/core/session/{index.js → session-manager.ts} +51 -117
- package/core/session/types.ts +29 -0
- package/core/session/utils.ts +57 -0
- package/core/state/index.ts +25 -0
- package/core/state/manager.ts +376 -0
- package/core/state/types.ts +185 -0
- package/core/tsconfig.json +22 -0
- package/core/types/index.ts +506 -0
- package/core/utils/{animations.js → animations.ts} +74 -28
- package/core/utils/{branding.js → branding.ts} +29 -4
- package/core/utils/{date-helper.js → date-helper.ts} +31 -74
- package/core/utils/file-helper.ts +262 -0
- package/core/utils/{jsonl-helper.js → jsonl-helper.ts} +71 -107
- package/core/utils/{logger.js → logger.ts} +24 -12
- package/core/utils/{output.js → output.ts} +25 -13
- package/core/utils/{project-capabilities.js → project-capabilities.ts} +31 -18
- package/core/utils/{session-helper.js → session-helper.ts} +79 -66
- package/core/utils/{version.js → version.ts} +23 -31
- package/core/view-generator.ts +536 -0
- package/package.json +23 -17
- package/packages/shared/.turbo/turbo-build.log +14 -0
- package/packages/shared/dist/index.d.ts +8 -613
- package/packages/shared/dist/index.d.ts.map +1 -0
- package/packages/shared/dist/index.js +4110 -118
- package/packages/shared/dist/schemas.d.ts +408 -0
- package/packages/shared/dist/schemas.d.ts.map +1 -0
- package/packages/shared/dist/types.d.ts +144 -0
- package/packages/shared/dist/types.d.ts.map +1 -0
- package/packages/shared/dist/unified.d.ts +139 -0
- package/packages/shared/dist/unified.d.ts.map +1 -0
- package/packages/shared/dist/utils.d.ts +60 -0
- package/packages/shared/dist/utils.d.ts.map +1 -0
- package/packages/shared/package.json +4 -4
- package/packages/shared/src/index.ts +1 -0
- package/packages/shared/src/unified.ts +174 -0
- package/packages/web/app/api/claude/sessions/route.ts +1 -1
- package/packages/web/app/api/claude/status/route.ts +1 -1
- package/packages/web/app/api/migrate/route.ts +46 -0
- package/packages/web/app/api/projects/[id]/route.ts +1 -1
- package/packages/web/app/api/projects/[id]/stats/route.ts +30 -2
- package/packages/web/app/api/projects/[id]/status/route.ts +1 -1
- package/packages/web/app/api/projects/route.ts +1 -1
- package/packages/web/app/api/settings/route.ts +97 -0
- package/packages/web/app/api/v2/projects/[id]/unified/route.ts +57 -0
- package/packages/web/app/globals.css +38 -0
- package/packages/web/app/layout.tsx +10 -2
- package/packages/web/app/page.tsx +9 -224
- package/packages/web/app/project/[id]/page.tsx +191 -63
- package/packages/web/app/project/[id]/stats/loading.tsx +43 -0
- package/packages/web/app/project/[id]/stats/page.tsx +204 -163
- package/packages/web/app/settings/page.tsx +222 -2
- package/packages/web/components/ActivityTimeline/ActivityTimeline.constants.ts +2 -0
- package/packages/web/components/ActivityTimeline/ActivityTimeline.tsx +50 -0
- package/packages/web/components/ActivityTimeline/ActivityTimeline.types.ts +8 -0
- package/packages/web/components/ActivityTimeline/hooks/index.ts +2 -0
- package/packages/web/components/ActivityTimeline/hooks/useExpandable.ts +9 -0
- package/packages/web/components/ActivityTimeline/hooks/useGroupedEvents.ts +23 -0
- package/packages/web/components/ActivityTimeline/index.ts +2 -0
- package/packages/web/components/AgentsCard/AgentsCard.tsx +63 -0
- package/packages/web/components/AgentsCard/AgentsCard.types.ts +13 -0
- package/packages/web/components/AgentsCard/index.ts +2 -0
- package/packages/web/components/AppSidebar/AppSidebar.tsx +134 -0
- package/packages/web/components/AppSidebar/index.ts +1 -0
- package/packages/web/components/BackLink/BackLink.tsx +18 -0
- package/packages/web/components/BackLink/BackLink.types.ts +5 -0
- package/packages/web/components/BackLink/index.ts +2 -0
- package/packages/web/components/BentoCard/BentoCard.constants.ts +16 -0
- package/packages/web/components/BentoCard/BentoCard.tsx +47 -0
- package/packages/web/components/BentoCard/BentoCard.types.ts +15 -0
- package/packages/web/components/BentoCard/index.ts +2 -0
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.constants.ts +9 -0
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.tsx +18 -0
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.types.ts +5 -0
- package/packages/web/components/BentoCardSkeleton/index.ts +2 -0
- package/packages/web/components/{stats → BentoGrid}/BentoGrid.tsx +4 -8
- package/packages/web/components/BentoGrid/BentoGrid.types.ts +4 -0
- package/packages/web/components/BentoGrid/index.ts +2 -0
- package/packages/web/components/CommandButton/index.ts +1 -0
- package/packages/web/components/ConnectionStatus/index.ts +1 -0
- package/packages/web/components/DashboardContent/DashboardContent.tsx +254 -0
- package/packages/web/components/DashboardContent/index.ts +1 -0
- package/packages/web/components/DateGroup/DateGroup.tsx +18 -0
- package/packages/web/components/DateGroup/DateGroup.types.ts +6 -0
- package/packages/web/components/DateGroup/DateGroup.utils.ts +11 -0
- package/packages/web/components/DateGroup/index.ts +2 -0
- package/packages/web/components/{stats → EmptyState}/EmptyState.tsx +1 -10
- package/packages/web/components/EmptyState/EmptyState.types.ts +10 -0
- package/packages/web/components/EmptyState/index.ts +2 -0
- package/packages/web/components/EventRow/EventRow.constants.ts +10 -0
- package/packages/web/components/EventRow/EventRow.tsx +49 -0
- package/packages/web/components/EventRow/EventRow.types.ts +7 -0
- package/packages/web/components/EventRow/EventRow.utils.ts +49 -0
- package/packages/web/components/EventRow/index.ts +2 -0
- package/packages/web/components/ExpandButton/ExpandButton.tsx +18 -0
- package/packages/web/components/ExpandButton/ExpandButton.types.ts +6 -0
- package/packages/web/components/ExpandButton/index.ts +2 -0
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.tsx +14 -0
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.types.ts +5 -0
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.utils.ts +13 -0
- package/packages/web/components/HealthGradientBackground/index.ts +2 -0
- package/packages/web/components/HeroSection/HeroSection.tsx +55 -0
- package/packages/web/components/HeroSection/HeroSection.types.ts +14 -0
- package/packages/web/components/HeroSection/HeroSection.utils.ts +7 -0
- package/packages/web/components/HeroSection/hooks/index.ts +2 -0
- package/packages/web/components/HeroSection/hooks/useCountUp.ts +45 -0
- package/packages/web/components/HeroSection/hooks/useWeeklyActivity.ts +18 -0
- package/packages/web/components/HeroSection/index.ts +2 -0
- package/packages/web/components/{stats → IdeasCard}/IdeasCard.tsx +3 -14
- package/packages/web/components/IdeasCard/IdeasCard.types.ts +9 -0
- package/packages/web/components/IdeasCard/index.ts +2 -0
- package/packages/web/components/InsightMessage/InsightMessage.tsx +9 -0
- package/packages/web/components/InsightMessage/InsightMessage.types.ts +3 -0
- package/packages/web/components/InsightMessage/index.ts +2 -0
- package/packages/web/components/Logo/index.ts +1 -0
- package/packages/web/components/MarkdownContent/index.ts +1 -0
- package/packages/web/components/NowCard/NowCard.tsx +93 -0
- package/packages/web/components/NowCard/NowCard.types.ts +15 -0
- package/packages/web/components/NowCard/index.ts +2 -0
- package/packages/web/components/ProgressRing/ProgressRing.constants.ts +20 -0
- package/packages/web/components/{stats → ProgressRing}/ProgressRing.tsx +4 -27
- package/packages/web/components/ProgressRing/ProgressRing.types.ts +11 -0
- package/packages/web/components/ProgressRing/index.ts +2 -0
- package/packages/web/components/ProjectAvatar/index.ts +1 -0
- package/packages/web/components/Providers/index.ts +1 -0
- package/packages/web/components/QueueCard/QueueCard.tsx +72 -0
- package/packages/web/components/QueueCard/QueueCard.types.ts +11 -0
- package/packages/web/components/QueueCard/QueueCard.utils.ts +12 -0
- package/packages/web/components/QueueCard/index.ts +2 -0
- package/packages/web/components/{stats → RoadmapCard}/RoadmapCard.tsx +3 -23
- package/packages/web/components/RoadmapCard/RoadmapCard.types.ts +15 -0
- package/packages/web/components/RoadmapCard/index.ts +2 -0
- package/packages/web/components/{stats → ShipsCard}/ShipsCard.tsx +4 -22
- package/packages/web/components/ShipsCard/ShipsCard.types.ts +12 -0
- package/packages/web/components/ShipsCard/ShipsCard.utils.ts +4 -0
- package/packages/web/components/ShipsCard/index.ts +2 -0
- package/packages/web/components/{stats → SparklineChart}/SparklineChart.tsx +1 -7
- package/packages/web/components/SparklineChart/SparklineChart.types.ts +6 -0
- package/packages/web/components/SparklineChart/index.ts +2 -0
- package/packages/web/components/StreakCard/StreakCard.constants.ts +2 -0
- package/packages/web/components/{stats → StreakCard}/StreakCard.tsx +5 -11
- package/packages/web/components/StreakCard/StreakCard.types.ts +4 -0
- package/packages/web/components/StreakCard/index.ts +2 -0
- package/packages/web/components/TasksCounter/TasksCounter.tsx +14 -0
- package/packages/web/components/TasksCounter/TasksCounter.types.ts +3 -0
- package/packages/web/components/TasksCounter/index.ts +2 -0
- package/packages/web/components/TechStackBadges/index.ts +1 -0
- package/packages/web/components/{TerminalTab.tsx → TerminalTabs/TerminalTab.tsx} +11 -0
- package/packages/web/components/{TerminalTabs.tsx → TerminalTabs/TerminalTabs.tsx} +29 -28
- package/packages/web/components/TerminalTabs/index.ts +1 -0
- package/packages/web/components/VelocityBadge/VelocityBadge.tsx +27 -0
- package/packages/web/components/VelocityBadge/VelocityBadge.types.ts +3 -0
- package/packages/web/components/VelocityBadge/index.ts +2 -0
- package/packages/web/components/VelocityCard/VelocityCard.tsx +71 -0
- package/packages/web/components/VelocityCard/VelocityCard.types.ts +7 -0
- package/packages/web/components/VelocityCard/index.ts +2 -0
- package/packages/web/components/WeeklySparkline/WeeklySparkline.tsx +13 -0
- package/packages/web/components/WeeklySparkline/WeeklySparkline.types.ts +3 -0
- package/packages/web/components/WeeklySparkline/index.ts +2 -0
- package/packages/web/components/ui/input.tsx +21 -0
- package/packages/web/context/TerminalTabsContext.tsx +46 -1
- package/packages/web/hooks/useClaudeTerminal.ts +71 -21
- package/packages/web/hooks/useProjectStats.ts +55 -0
- package/packages/web/hooks/useProjects.ts +6 -6
- package/packages/web/lib/actions/projects.ts +15 -0
- package/packages/web/lib/json-loader.ts +630 -0
- package/packages/web/lib/services/index.ts +9 -0
- package/packages/web/lib/services/migration.server.ts +598 -0
- package/packages/web/lib/services/projects.server.ts +52 -0
- package/packages/web/lib/services/stats.server.ts +264 -0
- package/packages/web/lib/unified-loader.ts +396 -0
- package/packages/web/package.json +10 -7
- package/packages/web/server.ts +36 -6
- package/templates/commands/done.md +76 -32
- package/templates/commands/feature.md +121 -47
- package/templates/commands/idea.md +81 -8
- package/templates/commands/now.md +41 -17
- package/templates/commands/ship.md +64 -25
- package/templates/commands/sync.md +28 -3
- package/core/agentic/agent-router.js +0 -140
- package/core/agentic/chain-of-thought.js +0 -578
- package/core/agentic/command-executor.js +0 -417
- package/core/agentic/context-filter.js +0 -354
- package/core/agentic/ground-truth.js +0 -591
- package/core/agentic/loop-detector.js +0 -406
- package/core/agentic/memory-system.js +0 -845
- package/core/agentic/parallel-tools.js +0 -366
- package/core/agentic/plan-mode.js +0 -572
- package/core/agentic/prompt-builder.js +0 -352
- package/core/agentic/response-templates.js +0 -290
- package/core/agentic/semantic-compression.js +0 -517
- package/core/agentic/think-blocks.js +0 -657
- package/core/agentic/tool-registry.js +0 -184
- package/core/agentic/validation-rules.js +0 -380
- package/core/command-registry.js +0 -698
- package/core/commands.js +0 -2237
- package/core/domain/task-stack.js +0 -497
- package/core/infrastructure/legacy-installer-detector.js +0 -546
- package/core/infrastructure/migrator.js +0 -796
- package/core/infrastructure/session-manager.js +0 -390
- package/core/utils/file-helper.js +0 -329
- package/packages/web/app/api/projects/[id]/delete/route.ts +0 -21
- package/packages/web/app/api/stats/route.ts +0 -38
- package/packages/web/components/AppSidebar.tsx +0 -113
- package/packages/web/components/stats/ActivityTimeline.tsx +0 -201
- package/packages/web/components/stats/AgentsCard.tsx +0 -56
- package/packages/web/components/stats/BentoCard.tsx +0 -88
- package/packages/web/components/stats/HeroSection.tsx +0 -172
- package/packages/web/components/stats/NowCard.tsx +0 -71
- package/packages/web/components/stats/QueueCard.tsx +0 -58
- package/packages/web/components/stats/VelocityCard.tsx +0 -60
- package/packages/web/components/stats/index.ts +0 -17
- package/packages/web/hooks/useStats.ts +0 -28
- /package/packages/web/components/{CommandButton.tsx → CommandButton/CommandButton.tsx} +0 -0
- /package/packages/web/components/{ConnectionStatus.tsx → ConnectionStatus/ConnectionStatus.tsx} +0 -0
- /package/packages/web/components/{Logo.tsx → Logo/Logo.tsx} +0 -0
- /package/packages/web/components/{MarkdownContent.tsx → MarkdownContent/MarkdownContent.tsx} +0 -0
- /package/packages/web/components/{ProjectAvatar.tsx → ProjectAvatar/ProjectAvatar.tsx} +0 -0
- /package/packages/web/components/{providers.tsx → Providers/Providers.tsx} +0 -0
- /package/packages/web/components/{TechStackBadges.tsx → TechStackBadges/TechStackBadges.tsx} +0 -0
|
@@ -1,615 +1,10 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
|
-
*
|
|
2
|
+
* @prjct/shared - Shared Types and Utilities
|
|
3
|
+
*
|
|
4
|
+
* Types and schemas shared between CLI, server, and web.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
startedAt: string;
|
|
12
|
-
pausedAt: string | null;
|
|
13
|
-
completedAt: string | null;
|
|
14
|
-
duration: number;
|
|
15
|
-
metrics: SessionMetrics;
|
|
16
|
-
timeline: TimelineEvent[];
|
|
17
|
-
}
|
|
18
|
-
interface SessionMetrics {
|
|
19
|
-
filesChanged: number;
|
|
20
|
-
linesAdded: number;
|
|
21
|
-
linesRemoved: number;
|
|
22
|
-
commits: number;
|
|
23
|
-
snapshots: string[];
|
|
24
|
-
}
|
|
25
|
-
interface TimelineEvent {
|
|
26
|
-
type: 'start' | 'pause' | 'resume' | 'complete' | 'snapshot';
|
|
27
|
-
at: string;
|
|
28
|
-
data?: Record<string, unknown>;
|
|
29
|
-
}
|
|
30
|
-
interface Snapshot {
|
|
31
|
-
hash: string;
|
|
32
|
-
shortHash: string;
|
|
33
|
-
message: string;
|
|
34
|
-
timestamp: string;
|
|
35
|
-
files: string[];
|
|
36
|
-
}
|
|
37
|
-
interface Task {
|
|
38
|
-
id: string;
|
|
39
|
-
title: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
status: 'pending' | 'in_progress' | 'completed' | 'blocked';
|
|
42
|
-
priority: 'low' | 'medium' | 'high' | 'critical';
|
|
43
|
-
createdAt: string;
|
|
44
|
-
completedAt?: string;
|
|
45
|
-
duration?: number;
|
|
46
|
-
tags?: string[];
|
|
47
|
-
}
|
|
48
|
-
interface Idea {
|
|
49
|
-
id: string;
|
|
50
|
-
content: string;
|
|
51
|
-
capturedAt: string;
|
|
52
|
-
source?: string;
|
|
53
|
-
promoted?: boolean;
|
|
54
|
-
promotedTo?: string;
|
|
55
|
-
}
|
|
56
|
-
interface Feature {
|
|
57
|
-
id: string;
|
|
58
|
-
title: string;
|
|
59
|
-
description?: string;
|
|
60
|
-
status: 'planned' | 'in_progress' | 'shipped' | 'cancelled';
|
|
61
|
-
priority: number;
|
|
62
|
-
createdAt: string;
|
|
63
|
-
shippedAt?: string;
|
|
64
|
-
tasks?: Task[];
|
|
65
|
-
version?: string;
|
|
66
|
-
}
|
|
67
|
-
interface Project {
|
|
68
|
-
id: string;
|
|
69
|
-
name: string;
|
|
70
|
-
path: string;
|
|
71
|
-
createdAt: string;
|
|
72
|
-
lastActiveAt: string;
|
|
73
|
-
config: ProjectConfig;
|
|
74
|
-
}
|
|
75
|
-
interface ProjectConfig {
|
|
76
|
-
projectId: string;
|
|
77
|
-
name?: string;
|
|
78
|
-
plugins?: string[];
|
|
79
|
-
[key: string]: unknown;
|
|
80
|
-
}
|
|
81
|
-
interface DailyMetrics {
|
|
82
|
-
date: string;
|
|
83
|
-
sessions: number;
|
|
84
|
-
duration: number;
|
|
85
|
-
commits: number;
|
|
86
|
-
filesChanged: number;
|
|
87
|
-
linesAdded: number;
|
|
88
|
-
linesRemoved: number;
|
|
89
|
-
}
|
|
90
|
-
interface WeeklyMetrics {
|
|
91
|
-
weekStart: string;
|
|
92
|
-
weekEnd: string;
|
|
93
|
-
totalSessions: number;
|
|
94
|
-
totalDuration: number;
|
|
95
|
-
averageDuration: number;
|
|
96
|
-
tasksCompleted: number;
|
|
97
|
-
featuresShipped: number;
|
|
98
|
-
productivityScore: number;
|
|
99
|
-
streak: number;
|
|
100
|
-
byDay: Record<string, DailyMetrics>;
|
|
101
|
-
}
|
|
102
|
-
interface WSMessage {
|
|
103
|
-
type: string;
|
|
104
|
-
payload?: unknown;
|
|
105
|
-
timestamp: string;
|
|
106
|
-
}
|
|
107
|
-
interface WSInputMessage extends WSMessage {
|
|
108
|
-
type: 'input';
|
|
109
|
-
payload: {
|
|
110
|
-
data: string;
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
interface WSOutputMessage extends WSMessage {
|
|
114
|
-
type: 'output';
|
|
115
|
-
payload: {
|
|
116
|
-
data: string;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
interface WSResizeMessage extends WSMessage {
|
|
120
|
-
type: 'resize';
|
|
121
|
-
payload: {
|
|
122
|
-
cols: number;
|
|
123
|
-
rows: number;
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
interface WSStatusMessage extends WSMessage {
|
|
127
|
-
type: 'status';
|
|
128
|
-
payload: {
|
|
129
|
-
status: 'connected' | 'disconnected' | 'error';
|
|
130
|
-
message?: string;
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
interface ApiResponse<T = unknown> {
|
|
134
|
-
success: boolean;
|
|
135
|
-
data?: T;
|
|
136
|
-
error?: string;
|
|
137
|
-
timestamp: string;
|
|
138
|
-
}
|
|
139
|
-
type EventType = 'session.started' | 'session.paused' | 'session.resumed' | 'session.completed' | 'task.created' | 'task.completed' | 'feature.added' | 'feature.shipped' | 'idea.captured' | 'snapshot.created' | 'snapshot.restored' | 'git.commit' | 'git.push' | 'project.init' | 'project.sync';
|
|
140
|
-
interface EventPayload {
|
|
141
|
-
type: EventType;
|
|
142
|
-
timestamp: string;
|
|
143
|
-
projectId: string;
|
|
144
|
-
data: Record<string, unknown>;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Zod Schemas for validation
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
declare const SessionMetricsSchema: z.ZodObject<{
|
|
152
|
-
filesChanged: z.ZodDefault<z.ZodNumber>;
|
|
153
|
-
linesAdded: z.ZodDefault<z.ZodNumber>;
|
|
154
|
-
linesRemoved: z.ZodDefault<z.ZodNumber>;
|
|
155
|
-
commits: z.ZodDefault<z.ZodNumber>;
|
|
156
|
-
snapshots: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
157
|
-
}, "strip", z.ZodTypeAny, {
|
|
158
|
-
filesChanged: number;
|
|
159
|
-
linesAdded: number;
|
|
160
|
-
linesRemoved: number;
|
|
161
|
-
commits: number;
|
|
162
|
-
snapshots: string[];
|
|
163
|
-
}, {
|
|
164
|
-
filesChanged?: number | undefined;
|
|
165
|
-
linesAdded?: number | undefined;
|
|
166
|
-
linesRemoved?: number | undefined;
|
|
167
|
-
commits?: number | undefined;
|
|
168
|
-
snapshots?: string[] | undefined;
|
|
169
|
-
}>;
|
|
170
|
-
declare const TimelineEventSchema: z.ZodObject<{
|
|
171
|
-
type: z.ZodEnum<["start", "pause", "resume", "complete", "snapshot"]>;
|
|
172
|
-
at: z.ZodString;
|
|
173
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
174
|
-
}, "strip", z.ZodTypeAny, {
|
|
175
|
-
at: string;
|
|
176
|
-
type: "start" | "pause" | "resume" | "complete" | "snapshot";
|
|
177
|
-
data?: Record<string, unknown> | undefined;
|
|
178
|
-
}, {
|
|
179
|
-
at: string;
|
|
180
|
-
type: "start" | "pause" | "resume" | "complete" | "snapshot";
|
|
181
|
-
data?: Record<string, unknown> | undefined;
|
|
182
|
-
}>;
|
|
183
|
-
declare const SessionSchema: z.ZodObject<{
|
|
184
|
-
id: z.ZodString;
|
|
185
|
-
projectId: z.ZodString;
|
|
186
|
-
task: z.ZodString;
|
|
187
|
-
status: z.ZodEnum<["active", "paused", "completed"]>;
|
|
188
|
-
startedAt: z.ZodString;
|
|
189
|
-
pausedAt: z.ZodNullable<z.ZodString>;
|
|
190
|
-
completedAt: z.ZodNullable<z.ZodString>;
|
|
191
|
-
duration: z.ZodNumber;
|
|
192
|
-
metrics: z.ZodObject<{
|
|
193
|
-
filesChanged: z.ZodDefault<z.ZodNumber>;
|
|
194
|
-
linesAdded: z.ZodDefault<z.ZodNumber>;
|
|
195
|
-
linesRemoved: z.ZodDefault<z.ZodNumber>;
|
|
196
|
-
commits: z.ZodDefault<z.ZodNumber>;
|
|
197
|
-
snapshots: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
198
|
-
}, "strip", z.ZodTypeAny, {
|
|
199
|
-
filesChanged: number;
|
|
200
|
-
linesAdded: number;
|
|
201
|
-
linesRemoved: number;
|
|
202
|
-
commits: number;
|
|
203
|
-
snapshots: string[];
|
|
204
|
-
}, {
|
|
205
|
-
filesChanged?: number | undefined;
|
|
206
|
-
linesAdded?: number | undefined;
|
|
207
|
-
linesRemoved?: number | undefined;
|
|
208
|
-
commits?: number | undefined;
|
|
209
|
-
snapshots?: string[] | undefined;
|
|
210
|
-
}>;
|
|
211
|
-
timeline: z.ZodArray<z.ZodObject<{
|
|
212
|
-
type: z.ZodEnum<["start", "pause", "resume", "complete", "snapshot"]>;
|
|
213
|
-
at: z.ZodString;
|
|
214
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
215
|
-
}, "strip", z.ZodTypeAny, {
|
|
216
|
-
at: string;
|
|
217
|
-
type: "start" | "pause" | "resume" | "complete" | "snapshot";
|
|
218
|
-
data?: Record<string, unknown> | undefined;
|
|
219
|
-
}, {
|
|
220
|
-
at: string;
|
|
221
|
-
type: "start" | "pause" | "resume" | "complete" | "snapshot";
|
|
222
|
-
data?: Record<string, unknown> | undefined;
|
|
223
|
-
}>, "many">;
|
|
224
|
-
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
projectId: string;
|
|
226
|
-
status: "active" | "paused" | "completed";
|
|
227
|
-
id: string;
|
|
228
|
-
task: string;
|
|
229
|
-
startedAt: string;
|
|
230
|
-
pausedAt: string | null;
|
|
231
|
-
completedAt: string | null;
|
|
232
|
-
duration: number;
|
|
233
|
-
metrics: {
|
|
234
|
-
filesChanged: number;
|
|
235
|
-
linesAdded: number;
|
|
236
|
-
linesRemoved: number;
|
|
237
|
-
commits: number;
|
|
238
|
-
snapshots: string[];
|
|
239
|
-
};
|
|
240
|
-
timeline: {
|
|
241
|
-
at: string;
|
|
242
|
-
type: "start" | "pause" | "resume" | "complete" | "snapshot";
|
|
243
|
-
data?: Record<string, unknown> | undefined;
|
|
244
|
-
}[];
|
|
245
|
-
}, {
|
|
246
|
-
projectId: string;
|
|
247
|
-
status: "active" | "paused" | "completed";
|
|
248
|
-
id: string;
|
|
249
|
-
task: string;
|
|
250
|
-
startedAt: string;
|
|
251
|
-
pausedAt: string | null;
|
|
252
|
-
completedAt: string | null;
|
|
253
|
-
duration: number;
|
|
254
|
-
metrics: {
|
|
255
|
-
filesChanged?: number | undefined;
|
|
256
|
-
linesAdded?: number | undefined;
|
|
257
|
-
linesRemoved?: number | undefined;
|
|
258
|
-
commits?: number | undefined;
|
|
259
|
-
snapshots?: string[] | undefined;
|
|
260
|
-
};
|
|
261
|
-
timeline: {
|
|
262
|
-
at: string;
|
|
263
|
-
type: "start" | "pause" | "resume" | "complete" | "snapshot";
|
|
264
|
-
data?: Record<string, unknown> | undefined;
|
|
265
|
-
}[];
|
|
266
|
-
}>;
|
|
267
|
-
declare const TaskSchema: z.ZodObject<{
|
|
268
|
-
id: z.ZodString;
|
|
269
|
-
title: z.ZodString;
|
|
270
|
-
description: z.ZodOptional<z.ZodString>;
|
|
271
|
-
status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
|
|
272
|
-
priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
273
|
-
createdAt: z.ZodString;
|
|
274
|
-
completedAt: z.ZodOptional<z.ZodString>;
|
|
275
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
276
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
277
|
-
}, "strip", z.ZodTypeAny, {
|
|
278
|
-
status: "completed" | "pending" | "in_progress" | "blocked";
|
|
279
|
-
id: string;
|
|
280
|
-
title: string;
|
|
281
|
-
priority: "low" | "medium" | "high" | "critical";
|
|
282
|
-
createdAt: string;
|
|
283
|
-
completedAt?: string | undefined;
|
|
284
|
-
duration?: number | undefined;
|
|
285
|
-
description?: string | undefined;
|
|
286
|
-
tags?: string[] | undefined;
|
|
287
|
-
}, {
|
|
288
|
-
status: "completed" | "pending" | "in_progress" | "blocked";
|
|
289
|
-
id: string;
|
|
290
|
-
title: string;
|
|
291
|
-
priority: "low" | "medium" | "high" | "critical";
|
|
292
|
-
createdAt: string;
|
|
293
|
-
completedAt?: string | undefined;
|
|
294
|
-
duration?: number | undefined;
|
|
295
|
-
description?: string | undefined;
|
|
296
|
-
tags?: string[] | undefined;
|
|
297
|
-
}>;
|
|
298
|
-
declare const IdeaSchema: z.ZodObject<{
|
|
299
|
-
id: z.ZodString;
|
|
300
|
-
content: z.ZodString;
|
|
301
|
-
capturedAt: z.ZodString;
|
|
302
|
-
source: z.ZodOptional<z.ZodString>;
|
|
303
|
-
promoted: z.ZodOptional<z.ZodBoolean>;
|
|
304
|
-
promotedTo: z.ZodOptional<z.ZodString>;
|
|
305
|
-
}, "strip", z.ZodTypeAny, {
|
|
306
|
-
id: string;
|
|
307
|
-
content: string;
|
|
308
|
-
capturedAt: string;
|
|
309
|
-
source?: string | undefined;
|
|
310
|
-
promoted?: boolean | undefined;
|
|
311
|
-
promotedTo?: string | undefined;
|
|
312
|
-
}, {
|
|
313
|
-
id: string;
|
|
314
|
-
content: string;
|
|
315
|
-
capturedAt: string;
|
|
316
|
-
source?: string | undefined;
|
|
317
|
-
promoted?: boolean | undefined;
|
|
318
|
-
promotedTo?: string | undefined;
|
|
319
|
-
}>;
|
|
320
|
-
declare const FeatureSchema: z.ZodObject<{
|
|
321
|
-
id: z.ZodString;
|
|
322
|
-
title: z.ZodString;
|
|
323
|
-
description: z.ZodOptional<z.ZodString>;
|
|
324
|
-
status: z.ZodEnum<["planned", "in_progress", "shipped", "cancelled"]>;
|
|
325
|
-
priority: z.ZodNumber;
|
|
326
|
-
createdAt: z.ZodString;
|
|
327
|
-
shippedAt: z.ZodOptional<z.ZodString>;
|
|
328
|
-
tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
329
|
-
id: z.ZodString;
|
|
330
|
-
title: z.ZodString;
|
|
331
|
-
description: z.ZodOptional<z.ZodString>;
|
|
332
|
-
status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
|
|
333
|
-
priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
334
|
-
createdAt: z.ZodString;
|
|
335
|
-
completedAt: z.ZodOptional<z.ZodString>;
|
|
336
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
337
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
338
|
-
}, "strip", z.ZodTypeAny, {
|
|
339
|
-
status: "completed" | "pending" | "in_progress" | "blocked";
|
|
340
|
-
id: string;
|
|
341
|
-
title: string;
|
|
342
|
-
priority: "low" | "medium" | "high" | "critical";
|
|
343
|
-
createdAt: string;
|
|
344
|
-
completedAt?: string | undefined;
|
|
345
|
-
duration?: number | undefined;
|
|
346
|
-
description?: string | undefined;
|
|
347
|
-
tags?: string[] | undefined;
|
|
348
|
-
}, {
|
|
349
|
-
status: "completed" | "pending" | "in_progress" | "blocked";
|
|
350
|
-
id: string;
|
|
351
|
-
title: string;
|
|
352
|
-
priority: "low" | "medium" | "high" | "critical";
|
|
353
|
-
createdAt: string;
|
|
354
|
-
completedAt?: string | undefined;
|
|
355
|
-
duration?: number | undefined;
|
|
356
|
-
description?: string | undefined;
|
|
357
|
-
tags?: string[] | undefined;
|
|
358
|
-
}>, "many">>;
|
|
359
|
-
version: z.ZodOptional<z.ZodString>;
|
|
360
|
-
}, "strip", z.ZodTypeAny, {
|
|
361
|
-
status: "in_progress" | "planned" | "shipped" | "cancelled";
|
|
362
|
-
id: string;
|
|
363
|
-
title: string;
|
|
364
|
-
priority: number;
|
|
365
|
-
createdAt: string;
|
|
366
|
-
description?: string | undefined;
|
|
367
|
-
shippedAt?: string | undefined;
|
|
368
|
-
tasks?: {
|
|
369
|
-
status: "completed" | "pending" | "in_progress" | "blocked";
|
|
370
|
-
id: string;
|
|
371
|
-
title: string;
|
|
372
|
-
priority: "low" | "medium" | "high" | "critical";
|
|
373
|
-
createdAt: string;
|
|
374
|
-
completedAt?: string | undefined;
|
|
375
|
-
duration?: number | undefined;
|
|
376
|
-
description?: string | undefined;
|
|
377
|
-
tags?: string[] | undefined;
|
|
378
|
-
}[] | undefined;
|
|
379
|
-
version?: string | undefined;
|
|
380
|
-
}, {
|
|
381
|
-
status: "in_progress" | "planned" | "shipped" | "cancelled";
|
|
382
|
-
id: string;
|
|
383
|
-
title: string;
|
|
384
|
-
priority: number;
|
|
385
|
-
createdAt: string;
|
|
386
|
-
description?: string | undefined;
|
|
387
|
-
shippedAt?: string | undefined;
|
|
388
|
-
tasks?: {
|
|
389
|
-
status: "completed" | "pending" | "in_progress" | "blocked";
|
|
390
|
-
id: string;
|
|
391
|
-
title: string;
|
|
392
|
-
priority: "low" | "medium" | "high" | "critical";
|
|
393
|
-
createdAt: string;
|
|
394
|
-
completedAt?: string | undefined;
|
|
395
|
-
duration?: number | undefined;
|
|
396
|
-
description?: string | undefined;
|
|
397
|
-
tags?: string[] | undefined;
|
|
398
|
-
}[] | undefined;
|
|
399
|
-
version?: string | undefined;
|
|
400
|
-
}>;
|
|
401
|
-
declare const ProjectConfigSchema: z.ZodObject<{
|
|
402
|
-
projectId: z.ZodString;
|
|
403
|
-
name: z.ZodOptional<z.ZodString>;
|
|
404
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
405
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
406
|
-
projectId: z.ZodString;
|
|
407
|
-
name: z.ZodOptional<z.ZodString>;
|
|
408
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
409
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
410
|
-
projectId: z.ZodString;
|
|
411
|
-
name: z.ZodOptional<z.ZodString>;
|
|
412
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
413
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
414
|
-
declare const WSInputMessageSchema: z.ZodObject<{
|
|
415
|
-
type: z.ZodLiteral<"input">;
|
|
416
|
-
payload: z.ZodObject<{
|
|
417
|
-
data: z.ZodString;
|
|
418
|
-
}, "strip", z.ZodTypeAny, {
|
|
419
|
-
data: string;
|
|
420
|
-
}, {
|
|
421
|
-
data: string;
|
|
422
|
-
}>;
|
|
423
|
-
timestamp: z.ZodString;
|
|
424
|
-
}, "strip", z.ZodTypeAny, {
|
|
425
|
-
type: "input";
|
|
426
|
-
payload: {
|
|
427
|
-
data: string;
|
|
428
|
-
};
|
|
429
|
-
timestamp: string;
|
|
430
|
-
}, {
|
|
431
|
-
type: "input";
|
|
432
|
-
payload: {
|
|
433
|
-
data: string;
|
|
434
|
-
};
|
|
435
|
-
timestamp: string;
|
|
436
|
-
}>;
|
|
437
|
-
declare const WSResizeMessageSchema: z.ZodObject<{
|
|
438
|
-
type: z.ZodLiteral<"resize">;
|
|
439
|
-
payload: z.ZodObject<{
|
|
440
|
-
cols: z.ZodNumber;
|
|
441
|
-
rows: z.ZodNumber;
|
|
442
|
-
}, "strip", z.ZodTypeAny, {
|
|
443
|
-
cols: number;
|
|
444
|
-
rows: number;
|
|
445
|
-
}, {
|
|
446
|
-
cols: number;
|
|
447
|
-
rows: number;
|
|
448
|
-
}>;
|
|
449
|
-
timestamp: z.ZodString;
|
|
450
|
-
}, "strip", z.ZodTypeAny, {
|
|
451
|
-
type: "resize";
|
|
452
|
-
payload: {
|
|
453
|
-
cols: number;
|
|
454
|
-
rows: number;
|
|
455
|
-
};
|
|
456
|
-
timestamp: string;
|
|
457
|
-
}, {
|
|
458
|
-
type: "resize";
|
|
459
|
-
payload: {
|
|
460
|
-
cols: number;
|
|
461
|
-
rows: number;
|
|
462
|
-
};
|
|
463
|
-
timestamp: string;
|
|
464
|
-
}>;
|
|
465
|
-
declare const WSMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
466
|
-
type: z.ZodLiteral<"input">;
|
|
467
|
-
payload: z.ZodObject<{
|
|
468
|
-
data: z.ZodString;
|
|
469
|
-
}, "strip", z.ZodTypeAny, {
|
|
470
|
-
data: string;
|
|
471
|
-
}, {
|
|
472
|
-
data: string;
|
|
473
|
-
}>;
|
|
474
|
-
timestamp: z.ZodString;
|
|
475
|
-
}, "strip", z.ZodTypeAny, {
|
|
476
|
-
type: "input";
|
|
477
|
-
payload: {
|
|
478
|
-
data: string;
|
|
479
|
-
};
|
|
480
|
-
timestamp: string;
|
|
481
|
-
}, {
|
|
482
|
-
type: "input";
|
|
483
|
-
payload: {
|
|
484
|
-
data: string;
|
|
485
|
-
};
|
|
486
|
-
timestamp: string;
|
|
487
|
-
}>, z.ZodObject<{
|
|
488
|
-
type: z.ZodLiteral<"resize">;
|
|
489
|
-
payload: z.ZodObject<{
|
|
490
|
-
cols: z.ZodNumber;
|
|
491
|
-
rows: z.ZodNumber;
|
|
492
|
-
}, "strip", z.ZodTypeAny, {
|
|
493
|
-
cols: number;
|
|
494
|
-
rows: number;
|
|
495
|
-
}, {
|
|
496
|
-
cols: number;
|
|
497
|
-
rows: number;
|
|
498
|
-
}>;
|
|
499
|
-
timestamp: z.ZodString;
|
|
500
|
-
}, "strip", z.ZodTypeAny, {
|
|
501
|
-
type: "resize";
|
|
502
|
-
payload: {
|
|
503
|
-
cols: number;
|
|
504
|
-
rows: number;
|
|
505
|
-
};
|
|
506
|
-
timestamp: string;
|
|
507
|
-
}, {
|
|
508
|
-
type: "resize";
|
|
509
|
-
payload: {
|
|
510
|
-
cols: number;
|
|
511
|
-
rows: number;
|
|
512
|
-
};
|
|
513
|
-
timestamp: string;
|
|
514
|
-
}>]>;
|
|
515
|
-
declare const CreateSessionRequestSchema: z.ZodObject<{
|
|
516
|
-
task: z.ZodString;
|
|
517
|
-
projectId: z.ZodString;
|
|
518
|
-
}, "strip", z.ZodTypeAny, {
|
|
519
|
-
projectId: string;
|
|
520
|
-
task: string;
|
|
521
|
-
}, {
|
|
522
|
-
projectId: string;
|
|
523
|
-
task: string;
|
|
524
|
-
}>;
|
|
525
|
-
declare const CreateTaskRequestSchema: z.ZodObject<{
|
|
526
|
-
title: z.ZodString;
|
|
527
|
-
description: z.ZodOptional<z.ZodString>;
|
|
528
|
-
priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
529
|
-
}, "strip", z.ZodTypeAny, {
|
|
530
|
-
title: string;
|
|
531
|
-
priority: "low" | "medium" | "high" | "critical";
|
|
532
|
-
description?: string | undefined;
|
|
533
|
-
}, {
|
|
534
|
-
title: string;
|
|
535
|
-
description?: string | undefined;
|
|
536
|
-
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
537
|
-
}>;
|
|
538
|
-
declare const CaptureIdeaRequestSchema: z.ZodObject<{
|
|
539
|
-
content: z.ZodString;
|
|
540
|
-
source: z.ZodOptional<z.ZodString>;
|
|
541
|
-
}, "strip", z.ZodTypeAny, {
|
|
542
|
-
content: string;
|
|
543
|
-
source?: string | undefined;
|
|
544
|
-
}, {
|
|
545
|
-
content: string;
|
|
546
|
-
source?: string | undefined;
|
|
547
|
-
}>;
|
|
548
|
-
type SessionInput = z.infer<typeof SessionSchema>;
|
|
549
|
-
type TaskInput = z.infer<typeof TaskSchema>;
|
|
550
|
-
type IdeaInput = z.infer<typeof IdeaSchema>;
|
|
551
|
-
type FeatureInput = z.infer<typeof FeatureSchema>;
|
|
552
|
-
type ProjectConfigInput = z.infer<typeof ProjectConfigSchema>;
|
|
553
|
-
type WSMessageInput = z.infer<typeof WSMessageSchema>;
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* Shared Utilities
|
|
557
|
-
*/
|
|
558
|
-
/**
|
|
559
|
-
* Generate a unique session ID
|
|
560
|
-
*/
|
|
561
|
-
declare function generateSessionId(): string;
|
|
562
|
-
/**
|
|
563
|
-
* Generate a unique ID with prefix
|
|
564
|
-
*/
|
|
565
|
-
declare function generateId(prefix?: string): string;
|
|
566
|
-
/**
|
|
567
|
-
* Format duration in seconds to human readable
|
|
568
|
-
*/
|
|
569
|
-
declare function formatDuration(seconds: number): string;
|
|
570
|
-
/**
|
|
571
|
-
* Parse duration string to seconds
|
|
572
|
-
*/
|
|
573
|
-
declare function parseDuration(duration: string): number;
|
|
574
|
-
/**
|
|
575
|
-
* Get relative time string
|
|
576
|
-
*/
|
|
577
|
-
declare function getRelativeTime(date: Date | string): string;
|
|
578
|
-
/**
|
|
579
|
-
* Get ISO timestamp
|
|
580
|
-
*/
|
|
581
|
-
declare function getTimestamp(): string;
|
|
582
|
-
/**
|
|
583
|
-
* Get date in YYYY-MM-DD format
|
|
584
|
-
*/
|
|
585
|
-
declare function getDate(): string;
|
|
586
|
-
/**
|
|
587
|
-
* Get year-month in YYYY-MM format
|
|
588
|
-
*/
|
|
589
|
-
declare function getYearMonth(): string;
|
|
590
|
-
/**
|
|
591
|
-
* Safely parse JSON
|
|
592
|
-
*/
|
|
593
|
-
declare function safeJsonParse<T>(json: string, fallback: T): T;
|
|
594
|
-
/**
|
|
595
|
-
* Truncate string with ellipsis
|
|
596
|
-
*/
|
|
597
|
-
declare function truncate(str: string, maxLength: number): string;
|
|
598
|
-
/**
|
|
599
|
-
* Slugify string
|
|
600
|
-
*/
|
|
601
|
-
declare function slugify(str: string): string;
|
|
602
|
-
/**
|
|
603
|
-
* Deep clone object
|
|
604
|
-
*/
|
|
605
|
-
declare function deepClone<T>(obj: T): T;
|
|
606
|
-
/**
|
|
607
|
-
* Check if running in Node.js
|
|
608
|
-
*/
|
|
609
|
-
declare function isNode(): boolean;
|
|
610
|
-
/**
|
|
611
|
-
* Check if running in browser
|
|
612
|
-
*/
|
|
613
|
-
declare function isBrowser(): boolean;
|
|
614
|
-
|
|
615
|
-
export { type ApiResponse, CaptureIdeaRequestSchema, CreateSessionRequestSchema, CreateTaskRequestSchema, type DailyMetrics, type EventPayload, type EventType, type Feature, type FeatureInput, FeatureSchema, type Idea, type IdeaInput, IdeaSchema, type Project, type ProjectConfig, type ProjectConfigInput, ProjectConfigSchema, type Session, type SessionInput, type SessionMetrics, SessionMetricsSchema, SessionSchema, type Snapshot, type Task, type TaskInput, TaskSchema, type TimelineEvent, TimelineEventSchema, type WSInputMessage, WSInputMessageSchema, type WSMessage, type WSMessageInput, WSMessageSchema, type WSOutputMessage, type WSResizeMessage, WSResizeMessageSchema, type WSStatusMessage, type WeeklyMetrics, deepClone, formatDuration, generateId, generateSessionId, getDate, getRelativeTime, getTimestamp, getYearMonth, isBrowser, isNode, parseDuration, safeJsonParse, slugify, truncate };
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './schemas';
|
|
8
|
+
export * from './utils';
|
|
9
|
+
export * from './unified';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
|