verbolab 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +71 -0
- package/dist/bin/verbo.d.ts +3 -0
- package/dist/bin/verbo.d.ts.map +1 -0
- package/dist/bin/verbo.js +1156 -0
- package/dist/bin/verbo.js.map +1 -0
- package/dist/relay/index.d.ts +2 -0
- package/dist/relay/index.d.ts.map +1 -0
- package/dist/relay/index.js +15 -0
- package/dist/relay/index.js.map +1 -0
- package/dist/src/agent/agent-launcher.d.ts +64 -0
- package/dist/src/agent/agent-launcher.d.ts.map +1 -0
- package/dist/src/agent/agent-launcher.js +326 -0
- package/dist/src/agent/agent-launcher.js.map +1 -0
- package/dist/src/agent/agent-monitor.d.ts +16 -0
- package/dist/src/agent/agent-monitor.d.ts.map +1 -0
- package/dist/src/agent/agent-monitor.js +41 -0
- package/dist/src/agent/agent-monitor.js.map +1 -0
- package/dist/src/agent/fun-names.d.ts +9 -0
- package/dist/src/agent/fun-names.d.ts.map +1 -0
- package/dist/src/agent/fun-names.js +118 -0
- package/dist/src/agent/fun-names.js.map +1 -0
- package/dist/src/agent/mcp-shim.d.ts +45 -0
- package/dist/src/agent/mcp-shim.d.ts.map +1 -0
- package/dist/src/agent/mcp-shim.js +192 -0
- package/dist/src/agent/mcp-shim.js.map +1 -0
- package/dist/src/agent/personas.d.ts +47 -0
- package/dist/src/agent/personas.d.ts.map +1 -0
- package/dist/src/agent/personas.js +86 -0
- package/dist/src/agent/personas.js.map +1 -0
- package/dist/src/agent/provider-detection.d.ts +21 -0
- package/dist/src/agent/provider-detection.d.ts.map +1 -0
- package/dist/src/agent/provider-detection.js +47 -0
- package/dist/src/agent/provider-detection.js.map +1 -0
- package/dist/src/agent/providers/claude-provider.d.ts +3 -0
- package/dist/src/agent/providers/claude-provider.d.ts.map +1 -0
- package/dist/src/agent/providers/claude-provider.js +119 -0
- package/dist/src/agent/providers/claude-provider.js.map +1 -0
- package/dist/src/agent/providers/gemini-provider.d.ts +13 -0
- package/dist/src/agent/providers/gemini-provider.d.ts.map +1 -0
- package/dist/src/agent/providers/gemini-provider.js +143 -0
- package/dist/src/agent/providers/gemini-provider.js.map +1 -0
- package/dist/src/agent/providers/openai-provider.d.ts +3 -0
- package/dist/src/agent/providers/openai-provider.d.ts.map +1 -0
- package/dist/src/agent/providers/openai-provider.js +127 -0
- package/dist/src/agent/providers/openai-provider.js.map +1 -0
- package/dist/src/agent/providers/registry.d.ts +19 -0
- package/dist/src/agent/providers/registry.d.ts.map +1 -0
- package/dist/src/agent/providers/registry.js +30 -0
- package/dist/src/agent/providers/registry.js.map +1 -0
- package/dist/src/agent/providers/types.d.ts +118 -0
- package/dist/src/agent/providers/types.d.ts.map +1 -0
- package/dist/src/agent/providers/types.js +2 -0
- package/dist/src/agent/providers/types.js.map +1 -0
- package/dist/src/approval/approval-server.d.ts +17 -0
- package/dist/src/approval/approval-server.d.ts.map +1 -0
- package/dist/src/approval/approval-server.js +90 -0
- package/dist/src/approval/approval-server.js.map +1 -0
- package/dist/src/approval/approval-store.d.ts +29 -0
- package/dist/src/approval/approval-store.d.ts.map +1 -0
- package/dist/src/approval/approval-store.js +94 -0
- package/dist/src/approval/approval-store.js.map +1 -0
- package/dist/src/auth/auth-store.d.ts +18 -0
- package/dist/src/auth/auth-store.d.ts.map +1 -0
- package/dist/src/auth/auth-store.js +34 -0
- package/dist/src/auth/auth-store.js.map +1 -0
- package/dist/src/auth/device-code-client.d.ts +32 -0
- package/dist/src/auth/device-code-client.d.ts.map +1 -0
- package/dist/src/auth/device-code-client.js +41 -0
- package/dist/src/auth/device-code-client.js.map +1 -0
- package/dist/src/auth/plan-enforcer.d.ts +8 -0
- package/dist/src/auth/plan-enforcer.d.ts.map +1 -0
- package/dist/src/auth/plan-enforcer.js +14 -0
- package/dist/src/auth/plan-enforcer.js.map +1 -0
- package/dist/src/commands/audit.d.ts +7 -0
- package/dist/src/commands/audit.d.ts.map +1 -0
- package/dist/src/commands/audit.js +92 -0
- package/dist/src/commands/audit.js.map +1 -0
- package/dist/src/commands/team.d.ts +48 -0
- package/dist/src/commands/team.d.ts.map +1 -0
- package/dist/src/commands/team.js +175 -0
- package/dist/src/commands/team.js.map +1 -0
- package/dist/src/config/verbo-config.d.ts +43 -0
- package/dist/src/config/verbo-config.d.ts.map +1 -0
- package/dist/src/config/verbo-config.js +111 -0
- package/dist/src/config/verbo-config.js.map +1 -0
- package/dist/src/core/agent-session-store.d.ts +69 -0
- package/dist/src/core/agent-session-store.d.ts.map +1 -0
- package/dist/src/core/agent-session-store.js +168 -0
- package/dist/src/core/agent-session-store.js.map +1 -0
- package/dist/src/core/audit-log-store.d.ts +33 -0
- package/dist/src/core/audit-log-store.d.ts.map +1 -0
- package/dist/src/core/audit-log-store.js +104 -0
- package/dist/src/core/audit-log-store.js.map +1 -0
- package/dist/src/core/compliance.d.ts +50 -0
- package/dist/src/core/compliance.d.ts.map +1 -0
- package/dist/src/core/compliance.js +59 -0
- package/dist/src/core/compliance.js.map +1 -0
- package/dist/src/core/conflict-detector.d.ts +19 -0
- package/dist/src/core/conflict-detector.d.ts.map +1 -0
- package/dist/src/core/conflict-detector.js +87 -0
- package/dist/src/core/conflict-detector.js.map +1 -0
- package/dist/src/core/conflict-enforcer.d.ts +37 -0
- package/dist/src/core/conflict-enforcer.d.ts.map +1 -0
- package/dist/src/core/conflict-enforcer.js +139 -0
- package/dist/src/core/conflict-enforcer.js.map +1 -0
- package/dist/src/core/cost-store.d.ts +55 -0
- package/dist/src/core/cost-store.d.ts.map +1 -0
- package/dist/src/core/cost-store.js +140 -0
- package/dist/src/core/cost-store.js.map +1 -0
- package/dist/src/core/hot-files.d.ts +19 -0
- package/dist/src/core/hot-files.d.ts.map +1 -0
- package/dist/src/core/hot-files.js +64 -0
- package/dist/src/core/hot-files.js.map +1 -0
- package/dist/src/core/human-action-store.d.ts +33 -0
- package/dist/src/core/human-action-store.d.ts.map +1 -0
- package/dist/src/core/human-action-store.js +92 -0
- package/dist/src/core/human-action-store.js.map +1 -0
- package/dist/src/core/learning-store.d.ts +32 -0
- package/dist/src/core/learning-store.d.ts.map +1 -0
- package/dist/src/core/learning-store.js +95 -0
- package/dist/src/core/learning-store.js.map +1 -0
- package/dist/src/core/merge-queue.d.ts +28 -0
- package/dist/src/core/merge-queue.d.ts.map +1 -0
- package/dist/src/core/merge-queue.js +92 -0
- package/dist/src/core/merge-queue.js.map +1 -0
- package/dist/src/core/notification-service.d.ts +13 -0
- package/dist/src/core/notification-service.d.ts.map +1 -0
- package/dist/src/core/notification-service.js +126 -0
- package/dist/src/core/notification-service.js.map +1 -0
- package/dist/src/core/notifications.d.ts +10 -0
- package/dist/src/core/notifications.d.ts.map +1 -0
- package/dist/src/core/notifications.js +33 -0
- package/dist/src/core/notifications.js.map +1 -0
- package/dist/src/core/orchestrator-store.d.ts +44 -0
- package/dist/src/core/orchestrator-store.d.ts.map +1 -0
- package/dist/src/core/orchestrator-store.js +69 -0
- package/dist/src/core/orchestrator-store.js.map +1 -0
- package/dist/src/core/parallelizer.d.ts +47 -0
- package/dist/src/core/parallelizer.d.ts.map +1 -0
- package/dist/src/core/parallelizer.js +224 -0
- package/dist/src/core/parallelizer.js.map +1 -0
- package/dist/src/core/pipeline-rollback.d.ts +29 -0
- package/dist/src/core/pipeline-rollback.d.ts.map +1 -0
- package/dist/src/core/pipeline-rollback.js +84 -0
- package/dist/src/core/pipeline-rollback.js.map +1 -0
- package/dist/src/core/pipeline-runner.d.ts +73 -0
- package/dist/src/core/pipeline-runner.d.ts.map +1 -0
- package/dist/src/core/pipeline-runner.js +165 -0
- package/dist/src/core/pipeline-runner.js.map +1 -0
- package/dist/src/core/pr-creator.d.ts +22 -0
- package/dist/src/core/pr-creator.d.ts.map +1 -0
- package/dist/src/core/pr-creator.js +55 -0
- package/dist/src/core/pr-creator.js.map +1 -0
- package/dist/src/core/rbac.d.ts +27 -0
- package/dist/src/core/rbac.d.ts.map +1 -0
- package/dist/src/core/rbac.js +76 -0
- package/dist/src/core/rbac.js.map +1 -0
- package/dist/src/core/startup-cleanup.d.ts +47 -0
- package/dist/src/core/startup-cleanup.d.ts.map +1 -0
- package/dist/src/core/startup-cleanup.js +150 -0
- package/dist/src/core/startup-cleanup.js.map +1 -0
- package/dist/src/core/task-store.d.ts +96 -0
- package/dist/src/core/task-store.d.ts.map +1 -0
- package/dist/src/core/task-store.js +309 -0
- package/dist/src/core/task-store.js.map +1 -0
- package/dist/src/core/verbo-config-editor.d.ts +44 -0
- package/dist/src/core/verbo-config-editor.d.ts.map +1 -0
- package/dist/src/core/verbo-config-editor.js +204 -0
- package/dist/src/core/verbo-config-editor.js.map +1 -0
- package/dist/src/core/verbo-config.d.ts +35 -0
- package/dist/src/core/verbo-config.d.ts.map +1 -0
- package/dist/src/core/verbo-config.js +55 -0
- package/dist/src/core/verbo-config.js.map +1 -0
- package/dist/src/core/verbo-md.d.ts +96 -0
- package/dist/src/core/verbo-md.d.ts.map +1 -0
- package/dist/src/core/verbo-md.js +410 -0
- package/dist/src/core/verbo-md.js.map +1 -0
- package/dist/src/db/database.d.ts +9 -0
- package/dist/src/db/database.d.ts.map +1 -0
- package/dist/src/db/database.js +37 -0
- package/dist/src/db/database.js.map +1 -0
- package/dist/src/db/migrations/001-personas-subtasks.d.ts +10 -0
- package/dist/src/db/migrations/001-personas-subtasks.d.ts.map +1 -0
- package/dist/src/db/migrations/001-personas-subtasks.js +32 -0
- package/dist/src/db/migrations/001-personas-subtasks.js.map +1 -0
- package/dist/src/db/migrations/002-rbac.d.ts +9 -0
- package/dist/src/db/migrations/002-rbac.d.ts.map +1 -0
- package/dist/src/db/migrations/002-rbac.js +31 -0
- package/dist/src/db/migrations/002-rbac.js.map +1 -0
- package/dist/src/db/migrations/003-provider-column.d.ts +8 -0
- package/dist/src/db/migrations/003-provider-column.d.ts.map +1 -0
- package/dist/src/db/migrations/003-provider-column.js +12 -0
- package/dist/src/db/migrations/003-provider-column.js.map +1 -0
- package/dist/src/db/migrations/004-pipeline-cost.d.ts +8 -0
- package/dist/src/db/migrations/004-pipeline-cost.d.ts.map +1 -0
- package/dist/src/db/migrations/004-pipeline-cost.js +23 -0
- package/dist/src/db/migrations/004-pipeline-cost.js.map +1 -0
- package/dist/src/db/migrations/005-audit-log-timestamp.d.ts +10 -0
- package/dist/src/db/migrations/005-audit-log-timestamp.d.ts.map +1 -0
- package/dist/src/db/migrations/005-audit-log-timestamp.js +39 -0
- package/dist/src/db/migrations/005-audit-log-timestamp.js.map +1 -0
- package/dist/src/db/migrations/006-human-action-type.d.ts +9 -0
- package/dist/src/db/migrations/006-human-action-type.d.ts.map +1 -0
- package/dist/src/db/migrations/006-human-action-type.js +16 -0
- package/dist/src/db/migrations/006-human-action-type.js.map +1 -0
- package/dist/src/db/schema.d.ts +6 -0
- package/dist/src/db/schema.d.ts.map +1 -0
- package/dist/src/db/schema.js +255 -0
- package/dist/src/db/schema.js.map +1 -0
- package/dist/src/deps/dependabot-generator.d.ts +22 -0
- package/dist/src/deps/dependabot-generator.d.ts.map +1 -0
- package/dist/src/deps/dependabot-generator.js +83 -0
- package/dist/src/deps/dependabot-generator.js.map +1 -0
- package/dist/src/deps/dependabot-monitor.d.ts +22 -0
- package/dist/src/deps/dependabot-monitor.d.ts.map +1 -0
- package/dist/src/deps/dependabot-monitor.js +28 -0
- package/dist/src/deps/dependabot-monitor.js.map +1 -0
- package/dist/src/deps/package-auditor.d.ts +24 -0
- package/dist/src/deps/package-auditor.d.ts.map +1 -0
- package/dist/src/deps/package-auditor.js +118 -0
- package/dist/src/deps/package-auditor.js.map +1 -0
- package/dist/src/init/ensure-init.d.ts +6 -0
- package/dist/src/init/ensure-init.d.ts.map +1 -0
- package/dist/src/init/ensure-init.js +27 -0
- package/dist/src/init/ensure-init.js.map +1 -0
- package/dist/src/init/project-detector.d.ts +11 -0
- package/dist/src/init/project-detector.d.ts.map +1 -0
- package/dist/src/init/project-detector.js +117 -0
- package/dist/src/init/project-detector.js.map +1 -0
- package/dist/src/init/questionnaire.d.ts +5 -0
- package/dist/src/init/questionnaire.d.ts.map +1 -0
- package/dist/src/init/questionnaire.js +112 -0
- package/dist/src/init/questionnaire.js.map +1 -0
- package/dist/src/init/template.d.ts +17 -0
- package/dist/src/init/template.d.ts.map +1 -0
- package/dist/src/init/template.js +46 -0
- package/dist/src/init/template.js.map +1 -0
- package/dist/src/intelligence/claude-client.d.ts +3 -0
- package/dist/src/intelligence/claude-client.d.ts.map +1 -0
- package/dist/src/intelligence/claude-client.js +12 -0
- package/dist/src/intelligence/claude-client.js.map +1 -0
- package/dist/src/intelligence/conflict-mediator.d.ts +17 -0
- package/dist/src/intelligence/conflict-mediator.d.ts.map +1 -0
- package/dist/src/intelligence/conflict-mediator.js +83 -0
- package/dist/src/intelligence/conflict-mediator.js.map +1 -0
- package/dist/src/intelligence/github-orchestrator.d.ts +30 -0
- package/dist/src/intelligence/github-orchestrator.d.ts.map +1 -0
- package/dist/src/intelligence/github-orchestrator.js +270 -0
- package/dist/src/intelligence/github-orchestrator.js.map +1 -0
- package/dist/src/intelligence/kill-switch.d.ts +10 -0
- package/dist/src/intelligence/kill-switch.d.ts.map +1 -0
- package/dist/src/intelligence/kill-switch.js +12 -0
- package/dist/src/intelligence/kill-switch.js.map +1 -0
- package/dist/src/intelligence/learnings-extractor.d.ts +13 -0
- package/dist/src/intelligence/learnings-extractor.d.ts.map +1 -0
- package/dist/src/intelligence/learnings-extractor.js +74 -0
- package/dist/src/intelligence/learnings-extractor.js.map +1 -0
- package/dist/src/intelligence/project-scanner.d.ts +2 -0
- package/dist/src/intelligence/project-scanner.d.ts.map +1 -0
- package/dist/src/intelligence/project-scanner.js +28 -0
- package/dist/src/intelligence/project-scanner.js.map +1 -0
- package/dist/src/intelligence/task-decomposer.d.ts +14 -0
- package/dist/src/intelligence/task-decomposer.d.ts.map +1 -0
- package/dist/src/intelligence/task-decomposer.js +97 -0
- package/dist/src/intelligence/task-decomposer.js.map +1 -0
- package/dist/src/intelligence/types.d.ts +14 -0
- package/dist/src/intelligence/types.d.ts.map +1 -0
- package/dist/src/intelligence/types.js +2 -0
- package/dist/src/intelligence/types.js.map +1 -0
- package/dist/src/mcp/server.d.ts +63 -0
- package/dist/src/mcp/server.d.ts.map +1 -0
- package/dist/src/mcp/server.js +537 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/stdio-entry.d.ts +2 -0
- package/dist/src/mcp/stdio-entry.d.ts.map +1 -0
- package/dist/src/mcp/stdio-entry.js +124 -0
- package/dist/src/mcp/stdio-entry.js.map +1 -0
- package/dist/src/mcp/subtask-handlers.d.ts +7 -0
- package/dist/src/mcp/subtask-handlers.d.ts.map +1 -0
- package/dist/src/mcp/subtask-handlers.js +50 -0
- package/dist/src/mcp/subtask-handlers.js.map +1 -0
- package/dist/src/security/network-proxy.d.ts +20 -0
- package/dist/src/security/network-proxy.d.ts.map +1 -0
- package/dist/src/security/network-proxy.js +125 -0
- package/dist/src/security/network-proxy.js.map +1 -0
- package/dist/src/security/network-sandbox.d.ts +19 -0
- package/dist/src/security/network-sandbox.d.ts.map +1 -0
- package/dist/src/security/network-sandbox.js +100 -0
- package/dist/src/security/network-sandbox.js.map +1 -0
- package/dist/src/security/sanitize.d.ts +13 -0
- package/dist/src/security/sanitize.d.ts.map +1 -0
- package/dist/src/security/sanitize.js +19 -0
- package/dist/src/security/sanitize.js.map +1 -0
- package/dist/src/security/secrets-patterns.d.ts +29 -0
- package/dist/src/security/secrets-patterns.d.ts.map +1 -0
- package/dist/src/security/secrets-patterns.js +430 -0
- package/dist/src/security/secrets-patterns.js.map +1 -0
- package/dist/src/security/secrets-scanner.d.ts +26 -0
- package/dist/src/security/secrets-scanner.d.ts.map +1 -0
- package/dist/src/security/secrets-scanner.js +62 -0
- package/dist/src/security/secrets-scanner.js.map +1 -0
- package/dist/src/skills/classifier.d.ts +9 -0
- package/dist/src/skills/classifier.d.ts.map +1 -0
- package/dist/src/skills/classifier.js +41 -0
- package/dist/src/skills/classifier.js.map +1 -0
- package/dist/src/skills/registry.d.ts +16 -0
- package/dist/src/skills/registry.d.ts.map +1 -0
- package/dist/src/skills/registry.js +61 -0
- package/dist/src/skills/registry.js.map +1 -0
- package/dist/src/sync/events.d.ts +9 -0
- package/dist/src/sync/events.d.ts.map +1 -0
- package/dist/src/sync/events.js +2 -0
- package/dist/src/sync/events.js.map +1 -0
- package/dist/src/sync/relay-server.d.ts +18 -0
- package/dist/src/sync/relay-server.d.ts.map +1 -0
- package/dist/src/sync/relay-server.js +131 -0
- package/dist/src/sync/relay-server.js.map +1 -0
- package/dist/src/sync/sync-client.d.ts +31 -0
- package/dist/src/sync/sync-client.d.ts.map +1 -0
- package/dist/src/sync/sync-client.js +314 -0
- package/dist/src/sync/sync-client.js.map +1 -0
- package/dist/src/tui/app.d.ts +35 -0
- package/dist/src/tui/app.d.ts.map +1 -0
- package/dist/src/tui/app.js +676 -0
- package/dist/src/tui/app.js.map +1 -0
- package/dist/src/tui/components/activity-feed.d.ts +12 -0
- package/dist/src/tui/components/activity-feed.d.ts.map +1 -0
- package/dist/src/tui/components/activity-feed.js +82 -0
- package/dist/src/tui/components/activity-feed.js.map +1 -0
- package/dist/src/tui/components/agent-list.d.ts +19 -0
- package/dist/src/tui/components/agent-list.d.ts.map +1 -0
- package/dist/src/tui/components/agent-list.js +33 -0
- package/dist/src/tui/components/agent-list.js.map +1 -0
- package/dist/src/tui/components/agent-row.d.ts +12 -0
- package/dist/src/tui/components/agent-row.d.ts.map +1 -0
- package/dist/src/tui/components/agent-row.js +37 -0
- package/dist/src/tui/components/agent-row.js.map +1 -0
- package/dist/src/tui/components/approval-terminal.d.ts +13 -0
- package/dist/src/tui/components/approval-terminal.d.ts.map +1 -0
- package/dist/src/tui/components/approval-terminal.js +34 -0
- package/dist/src/tui/components/approval-terminal.js.map +1 -0
- package/dist/src/tui/components/audit-viewer.d.ts +16 -0
- package/dist/src/tui/components/audit-viewer.d.ts.map +1 -0
- package/dist/src/tui/components/audit-viewer.js +46 -0
- package/dist/src/tui/components/audit-viewer.js.map +1 -0
- package/dist/src/tui/components/auth-gate.d.ts +9 -0
- package/dist/src/tui/components/auth-gate.d.ts.map +1 -0
- package/dist/src/tui/components/auth-gate.js +112 -0
- package/dist/src/tui/components/auth-gate.js.map +1 -0
- package/dist/src/tui/components/command-palette.d.ts +12 -0
- package/dist/src/tui/components/command-palette.d.ts.map +1 -0
- package/dist/src/tui/components/command-palette.js +51 -0
- package/dist/src/tui/components/command-palette.js.map +1 -0
- package/dist/src/tui/components/compliance-badge.d.ts +11 -0
- package/dist/src/tui/components/compliance-badge.d.ts.map +1 -0
- package/dist/src/tui/components/compliance-badge.js +12 -0
- package/dist/src/tui/components/compliance-badge.js.map +1 -0
- package/dist/src/tui/components/decomposition-review.d.ts +10 -0
- package/dist/src/tui/components/decomposition-review.d.ts.map +1 -0
- package/dist/src/tui/components/decomposition-review.js +19 -0
- package/dist/src/tui/components/decomposition-review.js.map +1 -0
- package/dist/src/tui/components/dependency-graph.d.ts +13 -0
- package/dist/src/tui/components/dependency-graph.d.ts.map +1 -0
- package/dist/src/tui/components/dependency-graph.js +143 -0
- package/dist/src/tui/components/dependency-graph.js.map +1 -0
- package/dist/src/tui/components/diff-viewer.d.ts +11 -0
- package/dist/src/tui/components/diff-viewer.d.ts.map +1 -0
- package/dist/src/tui/components/diff-viewer.js +82 -0
- package/dist/src/tui/components/diff-viewer.js.map +1 -0
- package/dist/src/tui/components/edit-task-input.d.ts +10 -0
- package/dist/src/tui/components/edit-task-input.d.ts.map +1 -0
- package/dist/src/tui/components/edit-task-input.js +20 -0
- package/dist/src/tui/components/edit-task-input.js.map +1 -0
- package/dist/src/tui/components/footer.d.ts +12 -0
- package/dist/src/tui/components/footer.d.ts.map +1 -0
- package/dist/src/tui/components/footer.js +41 -0
- package/dist/src/tui/components/footer.js.map +1 -0
- package/dist/src/tui/components/header.d.ts +8 -0
- package/dist/src/tui/components/header.d.ts.map +1 -0
- package/dist/src/tui/components/header.js +20 -0
- package/dist/src/tui/components/header.js.map +1 -0
- package/dist/src/tui/components/human-actions.d.ts +14 -0
- package/dist/src/tui/components/human-actions.d.ts.map +1 -0
- package/dist/src/tui/components/human-actions.js +43 -0
- package/dist/src/tui/components/human-actions.js.map +1 -0
- package/dist/src/tui/components/log-panel.d.ts +10 -0
- package/dist/src/tui/components/log-panel.d.ts.map +1 -0
- package/dist/src/tui/components/log-panel.js +38 -0
- package/dist/src/tui/components/log-panel.js.map +1 -0
- package/dist/src/tui/components/memory-viewer.d.ts +10 -0
- package/dist/src/tui/components/memory-viewer.d.ts.map +1 -0
- package/dist/src/tui/components/memory-viewer.js +44 -0
- package/dist/src/tui/components/memory-viewer.js.map +1 -0
- package/dist/src/tui/components/new-task-input.d.ts +9 -0
- package/dist/src/tui/components/new-task-input.d.ts.map +1 -0
- package/dist/src/tui/components/new-task-input.js +21 -0
- package/dist/src/tui/components/new-task-input.js.map +1 -0
- package/dist/src/tui/components/orchestrator-status.d.ts +9 -0
- package/dist/src/tui/components/orchestrator-status.d.ts.map +1 -0
- package/dist/src/tui/components/orchestrator-status.js +15 -0
- package/dist/src/tui/components/orchestrator-status.js.map +1 -0
- package/dist/src/tui/components/parallelize-banner.d.ts +8 -0
- package/dist/src/tui/components/parallelize-banner.d.ts.map +1 -0
- package/dist/src/tui/components/parallelize-banner.js +9 -0
- package/dist/src/tui/components/parallelize-banner.js.map +1 -0
- package/dist/src/tui/components/progress-bar.d.ts +9 -0
- package/dist/src/tui/components/progress-bar.d.ts.map +1 -0
- package/dist/src/tui/components/progress-bar.js +15 -0
- package/dist/src/tui/components/progress-bar.js.map +1 -0
- package/dist/src/tui/components/review-queue.d.ts +13 -0
- package/dist/src/tui/components/review-queue.d.ts.map +1 -0
- package/dist/src/tui/components/review-queue.js +78 -0
- package/dist/src/tui/components/review-queue.js.map +1 -0
- package/dist/src/tui/components/rich-header.d.ts +11 -0
- package/dist/src/tui/components/rich-header.d.ts.map +1 -0
- package/dist/src/tui/components/rich-header.js +25 -0
- package/dist/src/tui/components/rich-header.js.map +1 -0
- package/dist/src/tui/components/spinner.d.ts +7 -0
- package/dist/src/tui/components/spinner.d.ts.map +1 -0
- package/dist/src/tui/components/spinner.js +8 -0
- package/dist/src/tui/components/spinner.js.map +1 -0
- package/dist/src/tui/components/status-bar.d.ts +23 -0
- package/dist/src/tui/components/status-bar.d.ts.map +1 -0
- package/dist/src/tui/components/status-bar.js +28 -0
- package/dist/src/tui/components/status-bar.js.map +1 -0
- package/dist/src/tui/components/task-queue.d.ts +11 -0
- package/dist/src/tui/components/task-queue.d.ts.map +1 -0
- package/dist/src/tui/components/task-queue.js +30 -0
- package/dist/src/tui/components/task-queue.js.map +1 -0
- package/dist/src/tui/components/team-view.d.ts +13 -0
- package/dist/src/tui/components/team-view.d.ts.map +1 -0
- package/dist/src/tui/components/team-view.js +12 -0
- package/dist/src/tui/components/team-view.js.map +1 -0
- package/dist/src/tui/graph-renderer.d.ts +11 -0
- package/dist/src/tui/graph-renderer.d.ts.map +1 -0
- package/dist/src/tui/graph-renderer.js +296 -0
- package/dist/src/tui/graph-renderer.js.map +1 -0
- package/dist/src/tui/hooks/use-bell.d.ts +21 -0
- package/dist/src/tui/hooks/use-bell.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-bell.js +38 -0
- package/dist/src/tui/hooks/use-bell.js.map +1 -0
- package/dist/src/tui/hooks/use-ci-status.d.ts +16 -0
- package/dist/src/tui/hooks/use-ci-status.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-ci-status.js +97 -0
- package/dist/src/tui/hooks/use-ci-status.js.map +1 -0
- package/dist/src/tui/hooks/use-command-palette.d.ts +37 -0
- package/dist/src/tui/hooks/use-command-palette.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-command-palette.js +108 -0
- package/dist/src/tui/hooks/use-command-palette.js.map +1 -0
- package/dist/src/tui/hooks/use-diff-view.d.ts +16 -0
- package/dist/src/tui/hooks/use-diff-view.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-diff-view.js +75 -0
- package/dist/src/tui/hooks/use-diff-view.js.map +1 -0
- package/dist/src/tui/hooks/use-keyboard.d.ts +3 -0
- package/dist/src/tui/hooks/use-keyboard.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-keyboard.js +70 -0
- package/dist/src/tui/hooks/use-keyboard.js.map +1 -0
- package/dist/src/tui/hooks/use-log-stream.d.ts +25 -0
- package/dist/src/tui/hooks/use-log-stream.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-log-stream.js +83 -0
- package/dist/src/tui/hooks/use-log-stream.js.map +1 -0
- package/dist/src/tui/hooks/use-spinner.d.ts +3 -0
- package/dist/src/tui/hooks/use-spinner.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-spinner.js +13 -0
- package/dist/src/tui/hooks/use-spinner.js.map +1 -0
- package/dist/src/tui/hooks/use-store.d.ts +33 -0
- package/dist/src/tui/hooks/use-store.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-store.js +21 -0
- package/dist/src/tui/hooks/use-store.js.map +1 -0
- package/dist/src/tui/lib/diff-parser.d.ts +24 -0
- package/dist/src/tui/lib/diff-parser.d.ts.map +1 -0
- package/dist/src/tui/lib/diff-parser.js +115 -0
- package/dist/src/tui/lib/diff-parser.js.map +1 -0
- package/dist/src/tui/lib/palette-commands.d.ts +14 -0
- package/dist/src/tui/lib/palette-commands.d.ts.map +1 -0
- package/dist/src/tui/lib/palette-commands.js +101 -0
- package/dist/src/tui/lib/palette-commands.js.map +1 -0
- package/dist/src/tui/tui.d.ts +8 -0
- package/dist/src/tui/tui.d.ts.map +1 -0
- package/dist/src/tui/tui.js +8 -0
- package/dist/src/tui/tui.js.map +1 -0
- package/package.json +66 -0
- package/skills/api-design.md +84 -0
- package/skills/backend-typescript.md +76 -0
- package/skills/data-modeling.md +73 -0
- package/skills/devops-ci.md +82 -0
- package/skills/frontend-design.md +69 -0
- package/skills/observability.md +73 -0
- package/skills/react-nextjs.md +76 -0
- package/skills/refactoring.md +77 -0
- package/skills/security.md +75 -0
- package/skills/testing.md +69 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PaletteCommand } from '../lib/palette-commands.js';
|
|
3
|
+
import type { KeyAction } from '../hooks/use-keyboard.js';
|
|
4
|
+
interface CommandPaletteProps {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
commands: PaletteCommand[];
|
|
7
|
+
onExecute: (action: KeyAction) => void;
|
|
8
|
+
onDismiss: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function CommandPalette({ visible, commands, onExecute, onDismiss }: CommandPaletteProps): React.JSX.Element | null;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=command-palette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/command-palette.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAI1D,UAAU,mBAAmB;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAkCD,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAuEzH"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { Box, Text, useInput } from 'ink';
|
|
4
|
+
import TextInput from 'ink-text-input';
|
|
5
|
+
import { useCommandPalette } from '../hooks/use-command-palette.js';
|
|
6
|
+
const MAX_VISIBLE = 8;
|
|
7
|
+
function HighlightedLabel({ label, match }) {
|
|
8
|
+
const indexSet = new Set(match.indices);
|
|
9
|
+
return (_jsx(Text, { children: label.split('').map((char, i) => indexSet.has(i) ? (_jsx(Text, { color: "yellow", bold: true, children: char }, i)) : (_jsx(Text, { children: char }, i))) }));
|
|
10
|
+
}
|
|
11
|
+
function ResultRow({ result, isSelected }) {
|
|
12
|
+
return (_jsxs(Box, { paddingX: 1, gap: 1, children: [_jsx(Text, { color: isSelected ? 'blue' : undefined, bold: isSelected, children: isSelected ? '▶' : ' ' }), _jsx(Box, { flexGrow: 1, children: _jsx(HighlightedLabel, { label: result.label, match: result.match }) }), _jsx(Text, { dimColor: true, children: result.description }), result.shortcut !== undefined && (_jsxs(Text, { color: "cyan", bold: true, children: ["[", result.shortcut, "]"] }))] }));
|
|
13
|
+
}
|
|
14
|
+
export function CommandPalette({ visible, commands, onExecute, onDismiss }) {
|
|
15
|
+
const palette = useCommandPalette(commands);
|
|
16
|
+
const { setQuery } = palette;
|
|
17
|
+
// Reset search query each time the palette is opened
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (visible) {
|
|
20
|
+
setQuery('');
|
|
21
|
+
}
|
|
22
|
+
}, [visible, setQuery]);
|
|
23
|
+
useInput((input, key) => {
|
|
24
|
+
if (!visible)
|
|
25
|
+
return;
|
|
26
|
+
if (key.escape) {
|
|
27
|
+
onDismiss();
|
|
28
|
+
}
|
|
29
|
+
else if (key.upArrow) {
|
|
30
|
+
palette.setSelectedIndex((i) => Math.max(0, i - 1));
|
|
31
|
+
}
|
|
32
|
+
else if (key.downArrow) {
|
|
33
|
+
if (palette.results.length === 0)
|
|
34
|
+
return;
|
|
35
|
+
palette.setSelectedIndex((i) => Math.min(palette.results.length - 1, i + 1));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
if (!visible)
|
|
39
|
+
return null;
|
|
40
|
+
const handleSubmit = () => {
|
|
41
|
+
const cmd = palette.results[palette.selectedIndex];
|
|
42
|
+
if (cmd) {
|
|
43
|
+
palette.recordUsed(cmd.id);
|
|
44
|
+
onExecute(cmd.action);
|
|
45
|
+
}
|
|
46
|
+
onDismiss();
|
|
47
|
+
};
|
|
48
|
+
const visibleResults = palette.results.slice(0, MAX_VISIBLE);
|
|
49
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "blue", borderLeft: false, borderRight: false, borderBottom: false, children: [_jsxs(Box, { paddingX: 1, gap: 1, children: [_jsx(Text, { color: "blue", bold: true, children: ":" }), _jsx(TextInput, { value: palette.query, onChange: palette.setQuery, onSubmit: handleSubmit, placeholder: "search commands\u2026", focus: visible })] }), visibleResults.map((result, i) => (_jsx(ResultRow, { result: result, isSelected: i === palette.selectedIndex }, result.id))), palette.results.length === 0 && (_jsx(Box, { paddingX: 3, children: _jsx(Text, { dimColor: true, children: "no commands match" }) }))] }));
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=command-palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-palette.js","sourceRoot":"","sources":["../../../../src/tui/components/command-palette.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKpE,MAAM,WAAW,GAAG,CAAC,CAAC;AAStB,SAAS,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAwC;IAC9E,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxC,OAAO,CACL,KAAC,IAAI,cACF,KAAK,CAAC,KAAK,CAA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,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IAE7D,OAAO,CACL,MAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAC,MAAM,EAClB,UAAU,EAAE,KAAK,EACjB,WAAW,EAAE,KAAK,EAClB,YAAY,EAAE,KAAK,aAEnB,MAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,aACtB,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,wBAAS,EAChC,KAAC,SAAS,IACR,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAC,uBAAkB,EAC9B,KAAK,EAAE,OAAO,GACd,IACE,EACL,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CACjC,KAAC,SAAS,IAER,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,CAAC,KAAK,OAAO,CAAC,aAAa,IAFlC,MAAM,CAAC,EAAE,CAGd,CACH,CAAC,EACD,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,CAC/B,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,QAAQ,wCAAyB,GACnC,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ComplianceBadgeProps {
|
|
3
|
+
isCompliance: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Renders a bold red '■ COMPLIANCE' indicator when compliance mode is active.
|
|
7
|
+
* Returns null when compliance mode is off — no space consumed in the layout.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ComplianceBadge({ isCompliance }: ComplianceBadgeProps): React.JSX.Element | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=compliance-badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-badge.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/compliance-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,oBAAoB;IAC5B,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,YAAY,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAGhG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from 'ink';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a bold red '■ COMPLIANCE' indicator when compliance mode is active.
|
|
5
|
+
* Returns null when compliance mode is off — no space consumed in the layout.
|
|
6
|
+
*/
|
|
7
|
+
export function ComplianceBadge({ isCompliance }) {
|
|
8
|
+
if (!isCompliance)
|
|
9
|
+
return null;
|
|
10
|
+
return _jsx(Text, { color: "red", bold: true, children: "\u25A0 COMPLIANCE" });
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=compliance-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-badge.js","sourceRoot":"","sources":["../../../../src/tui/components/compliance-badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAM3B;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,YAAY,EAAwB;IACpE,IAAI,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,wCAAoB,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DecomposedSubTask } from '../../intelligence/task-decomposer.js';
|
|
3
|
+
interface DecompositionReviewProps {
|
|
4
|
+
subtasks: DecomposedSubTask[];
|
|
5
|
+
onConfirm: () => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function DecompositionReview({ subtasks, onConfirm, onCancel, }: DecompositionReviewProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=decomposition-review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decomposition-review.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/decomposition-review.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,UAAU,wBAAwB;IAChC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAOD,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2E9C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, useInput } from 'ink';
|
|
3
|
+
function truncate(str, max) {
|
|
4
|
+
if (str.length <= max)
|
|
5
|
+
return str;
|
|
6
|
+
return str.slice(0, max - 1) + '\u2026';
|
|
7
|
+
}
|
|
8
|
+
export function DecompositionReview({ subtasks, onConfirm, onCancel, }) {
|
|
9
|
+
useInput((input, key) => {
|
|
10
|
+
if (input === 'c' || input === 'C') {
|
|
11
|
+
onConfirm();
|
|
12
|
+
}
|
|
13
|
+
else if (input === 'x' || input === 'X' || key.escape) {
|
|
14
|
+
onCancel();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, paddingY: 0, children: [_jsx(Box, { paddingBottom: 1, children: _jsxs(Text, { bold: true, color: "cyan", children: ["Decomposition \u2014 ", subtasks.length, " subtask", subtasks.length !== 1 ? 's' : ''] }) }), subtasks.map((subtask, idx) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsxs(Text, { color: "cyan", bold: true, children: [idx + 1, "."] }), _jsx(Text, { bold: true, color: "white", children: subtask.title }), subtask.personaHint && (_jsxs(Text, { color: "magenta", children: ["[", subtask.personaHint, "]"] }))] }), subtask.description && (_jsx(Box, { paddingLeft: 3, children: _jsx(Text, { color: "gray", children: truncate(subtask.description, 100) }) })), subtask.estimatedFiles.length > 0 && (_jsx(Box, { paddingLeft: 3, children: _jsx(Text, { color: "blue", children: subtask.estimatedFiles.join(', ') }) })), subtask.dependsOnIndexes.length > 0 && (_jsx(Box, { paddingLeft: 3, children: _jsxs(Text, { color: "yellow", children: ["depends on: #", subtask.dependsOnIndexes.map((i) => i + 1).join(', ')] }) }))] }, idx))), _jsxs(Box, { flexDirection: "row", gap: 3, borderStyle: "single", borderColor: "gray", borderLeft: false, borderRight: false, borderBottom: false, paddingTop: 0, children: [_jsxs(Text, { children: [_jsx(Text, { color: "cyan", bold: true, children: "C" }), _jsxs(Text, { color: "gray", children: ["=confirm (", subtasks.length, " tasks)"] })] }), _jsxs(Text, { children: [_jsx(Text, { color: "red", bold: true, children: "X" }), _jsx(Text, { color: "gray", children: "=cancel" })] })] })] }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=decomposition-review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decomposition-review.js","sourceRoot":"","sources":["../../../../src/tui/components/decomposition-review.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QA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AAC,IAAI,wBAAS,EAChC,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,2BAAY,QAAQ,CAAC,MAAM,eAAe,IACvD,EACP,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,wBAAS,EAC/B,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,wBAAe,IAC5B,IACH,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Task } from '../../core/task-store.js';
|
|
3
|
+
import type { DependencyGraph as DependencyGraphData } from '../../core/task-store.js';
|
|
4
|
+
export interface DependencyGraphProps {
|
|
5
|
+
tasks: Task[];
|
|
6
|
+
graph: DependencyGraphData;
|
|
7
|
+
focusedId: string | null;
|
|
8
|
+
onFocus: (taskId: string) => void;
|
|
9
|
+
onSelect: (taskId: string) => void;
|
|
10
|
+
onExit: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function DependencyGraph({ tasks, graph, focusedId, onFocus, onSelect, onExit, }: DependencyGraphProps): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=dependency-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-graph.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/dependency-graph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,IAAI,mBAAmB,EAAuB,MAAM,0BAA0B,CAAC;AAE5G,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,mBAAmB,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AA2CD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,KAAK,EACL,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,GACP,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAuE1C"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback } from 'react';
|
|
3
|
+
import { Box, Text, useInput } from 'ink';
|
|
4
|
+
function statusIcon(status) {
|
|
5
|
+
switch (status) {
|
|
6
|
+
case 'done': return '\u2713';
|
|
7
|
+
case 'in_progress': return '\u25B6';
|
|
8
|
+
case 'blocked': return '\u2718';
|
|
9
|
+
case 'todo': return '\u25CB';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function statusColor(status) {
|
|
13
|
+
switch (status) {
|
|
14
|
+
case 'done': return 'green';
|
|
15
|
+
case 'in_progress': return 'cyan';
|
|
16
|
+
case 'blocked': return 'red';
|
|
17
|
+
case 'todo': return 'white';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function priorityColor(priority) {
|
|
21
|
+
switch (priority) {
|
|
22
|
+
case 'p0': return 'red';
|
|
23
|
+
case 'p1': return 'yellow';
|
|
24
|
+
case 'p2': return 'green';
|
|
25
|
+
case 'p3': return 'white';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build a flat ordered list of task IDs for j/k navigation,
|
|
30
|
+
* ordered by layer then position within layer.
|
|
31
|
+
*/
|
|
32
|
+
function buildFlatOrder(layers) {
|
|
33
|
+
const result = [];
|
|
34
|
+
for (const layer of layers) {
|
|
35
|
+
for (const id of layer) {
|
|
36
|
+
result.push(id);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
export function DependencyGraph({ tasks, graph, focusedId, onFocus, onSelect, onExit, }) {
|
|
42
|
+
const [listView, setListView] = useState(false);
|
|
43
|
+
const flatOrder = buildFlatOrder(graph.layers);
|
|
44
|
+
const focusedIndex = focusedId ? flatOrder.indexOf(focusedId) : 0;
|
|
45
|
+
const handleInput = useCallback((input, key) => {
|
|
46
|
+
if (key.escape) {
|
|
47
|
+
onExit();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (key.return && focusedId) {
|
|
51
|
+
onSelect(focusedId);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (input === 'g') {
|
|
55
|
+
setListView((prev) => !prev);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const currentId = focusedId ?? flatOrder[0];
|
|
59
|
+
if (!currentId)
|
|
60
|
+
return;
|
|
61
|
+
const node = graph.nodes.get(currentId);
|
|
62
|
+
if (!node)
|
|
63
|
+
return;
|
|
64
|
+
switch (input) {
|
|
65
|
+
case 'j': {
|
|
66
|
+
// Move down in flat order
|
|
67
|
+
const nextIdx = Math.min(focusedIndex + 1, flatOrder.length - 1);
|
|
68
|
+
onFocus(flatOrder[nextIdx]);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case 'k': {
|
|
72
|
+
// Move up in flat order
|
|
73
|
+
const prevIdx = Math.max(focusedIndex - 1, 0);
|
|
74
|
+
onFocus(flatOrder[prevIdx]);
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
case 'h': {
|
|
78
|
+
// Navigate to first dependency (move left in graph)
|
|
79
|
+
if (node.dependsOn.length > 0) {
|
|
80
|
+
onFocus(node.dependsOn[0]);
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case 'l': {
|
|
85
|
+
// Navigate to first dependent (move right in graph)
|
|
86
|
+
if (node.dependents.length > 0) {
|
|
87
|
+
onFocus(node.dependents[0]);
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, [focusedId, focusedIndex, flatOrder, graph.nodes, onFocus, onSelect, onExit]);
|
|
93
|
+
useInput(handleInput);
|
|
94
|
+
if (flatOrder.length === 0) {
|
|
95
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [_jsx(Text, { bold: true, color: "blue", children: "DEPENDENCY GRAPH" }), _jsx(Text, { color: "gray", children: "No tasks to display" })] }));
|
|
96
|
+
}
|
|
97
|
+
if (listView) {
|
|
98
|
+
return _jsx(ListView, { graph: graph, flatOrder: flatOrder, focusedId: focusedId });
|
|
99
|
+
}
|
|
100
|
+
return _jsx(GraphView, { graph: graph, focusedId: focusedId });
|
|
101
|
+
}
|
|
102
|
+
function ListView({ graph, flatOrder, focusedId }) {
|
|
103
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [_jsxs(Text, { bold: true, color: "blue", children: ["DEPENDENCY GRAPH (list) \u00B7 ", flatOrder.length, " tasks \u00B7 g=graph Esc=close"] }), graph.layers.map((layerIds, layerIdx) => (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "gray", dimColor: true, children: [' '.repeat(layerIdx), "Layer ", layerIdx] }), layerIds.map((id) => {
|
|
104
|
+
const node = graph.nodes.get(id);
|
|
105
|
+
const isFocused = id === focusedId;
|
|
106
|
+
const t = node.task;
|
|
107
|
+
const depsStr = node.dependsOn.length > 0
|
|
108
|
+
? ` \u2190 ${node.dependsOn.length} dep${node.dependsOn.length > 1 ? 's' : ''}`
|
|
109
|
+
: '';
|
|
110
|
+
const depsOfStr = node.dependents.length > 0
|
|
111
|
+
? ` \u2192 ${node.dependents.length} dependent${node.dependents.length > 1 ? 's' : ''}`
|
|
112
|
+
: '';
|
|
113
|
+
return (_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: "cyan", children: isFocused ? '\u25B6' : ' ' }), _jsx(Text, { children: ' '.repeat(layerIdx) }), _jsx(Text, { color: statusColor(t.status), children: statusIcon(t.status) }), _jsxs(Text, { color: priorityColor(t.priority), children: ["[", t.priority, "]"] }), _jsx(Text, { color: isFocused ? 'cyan' : 'white', bold: isFocused, children: t.title.length > 40 ? t.title.slice(0, 39) + '\u2026' : t.title }), _jsxs(Text, { color: "gray", dimColor: true, children: [depsStr, depsOfStr] })] }, id));
|
|
114
|
+
})] }, layerIdx)))] }));
|
|
115
|
+
}
|
|
116
|
+
function GraphView({ graph, focusedId }) {
|
|
117
|
+
// Build a character grid representation mapped to Ink Text elements
|
|
118
|
+
// Each layer is a column, tasks are rows within the column
|
|
119
|
+
// Edges are drawn as arrows between layers
|
|
120
|
+
const layerCount = graph.layers.length;
|
|
121
|
+
if (layerCount === 0) {
|
|
122
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [_jsx(Text, { bold: true, color: "blue", children: "DEPENDENCY GRAPH \u00B7 g=list Esc=close" }), _jsx(Text, { color: "gray", children: "No tasks" })] }));
|
|
123
|
+
}
|
|
124
|
+
// Render layers left-to-right
|
|
125
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [_jsxs(Text, { bold: true, color: "blue", children: ["DEPENDENCY GRAPH \u00B7 ", graph.nodes.size, " tasks \u00B7 g=list j/k=nav h/l=deps Enter=select Esc=close"] }), _jsx(Box, { flexDirection: "row", gap: 1, children: graph.layers.map((layerIds, layerIdx) => (_jsxs(Box, { flexDirection: "column", gap: 0, children: [_jsxs(Text, { color: "gray", dimColor: true, children: ["L", layerIdx] }), layerIds.map((id) => {
|
|
126
|
+
const node = graph.nodes.get(id);
|
|
127
|
+
const t = node.task;
|
|
128
|
+
const isFocused = id === focusedId;
|
|
129
|
+
const label = t.title.length > 20 ? t.title.slice(0, 19) + '\u2026' : t.title;
|
|
130
|
+
return (_jsxs(Box, { flexDirection: "row", gap: 0, children: [layerIdx > 0 && (_jsx(Text, { color: "gray", children: node.dependsOn.length > 0 ? '\u2500\u25B6' : ' ' })), _jsxs(Text, { color: isFocused ? 'cyan' : statusColor(t.status), bold: isFocused, inverse: isFocused, children: [statusIcon(t.status), " ", label] }), node.dependents.length > 0 && layerIdx < layerCount - 1 && (_jsx(Text, { color: "gray", children: "\\u2500\\u25B8" }))] }, id));
|
|
131
|
+
})] }, layerIdx))) }), focusedId && graph.nodes.has(focusedId) && (_jsx(FocusedTaskDetail, { node: graph.nodes.get(focusedId), graph: graph }))] }));
|
|
132
|
+
}
|
|
133
|
+
function FocusedTaskDetail({ node, graph }) {
|
|
134
|
+
const t = node.task;
|
|
135
|
+
const depNames = node.dependsOn
|
|
136
|
+
.map((id) => graph.nodes.get(id)?.task.title ?? id)
|
|
137
|
+
.join(', ');
|
|
138
|
+
const depOfNames = node.dependents
|
|
139
|
+
.map((id) => graph.nodes.get(id)?.task.title ?? id)
|
|
140
|
+
.join(', ');
|
|
141
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", marginTop: 1, paddingX: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: t.title }), _jsxs(Box, { flexDirection: "row", gap: 2, children: [_jsx(Text, { color: statusColor(t.status), children: t.status }), _jsx(Text, { color: priorityColor(t.priority), children: t.priority }), _jsxs(Text, { color: "gray", children: ["progress: ", t.progress, "%"] })] }), node.dependsOn.length > 0 && (_jsxs(Text, { color: "gray", children: ["depends on: ", depNames] })), node.dependents.length > 0 && (_jsxs(Text, { color: "gray", children: ["depended on by: ", depOfNames] })), t.description && (_jsx(Text, { color: "gray", wrap: "truncate", children: t.description.slice(0, 100) }))] }));
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=dependency-graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency-graph.js","sourceRoot":"","sources":["../../../../src/tui/components/dependency-graph.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,IAA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AK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAQ,CACxE,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UseDiffViewResult } from '../hooks/use-diff-view.js';
|
|
3
|
+
export interface DiffViewerProps {
|
|
4
|
+
diffView: UseDiffViewResult;
|
|
5
|
+
/** Terminal column count — wide mode (side-by-side) when >= 120 */
|
|
6
|
+
cols: number;
|
|
7
|
+
/** Max lines to display per hunk view (default: 20) */
|
|
8
|
+
maxLines?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function DiffViewer({ diffView, cols, maxLines }: DiffViewerProps): React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=diff-viewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-viewer.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/diff-viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA6HD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAa,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6FhG"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
function lineColor(type) {
|
|
4
|
+
if (type === 'added')
|
|
5
|
+
return 'green';
|
|
6
|
+
if (type === 'removed')
|
|
7
|
+
return 'red';
|
|
8
|
+
return 'gray';
|
|
9
|
+
}
|
|
10
|
+
function linePrefix(type) {
|
|
11
|
+
if (type === 'added')
|
|
12
|
+
return '+';
|
|
13
|
+
if (type === 'removed')
|
|
14
|
+
return '-';
|
|
15
|
+
return ' ';
|
|
16
|
+
}
|
|
17
|
+
function formatLineNo(n, width = 4) {
|
|
18
|
+
if (n === null)
|
|
19
|
+
return ' '.repeat(width);
|
|
20
|
+
return String(n).padStart(width, ' ');
|
|
21
|
+
}
|
|
22
|
+
function NarrowHunk({ lines, maxLines }) {
|
|
23
|
+
if (lines.length === 0) {
|
|
24
|
+
return (_jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, children: "Empty hunk" }) }));
|
|
25
|
+
}
|
|
26
|
+
const visible = lines.slice(0, maxLines);
|
|
27
|
+
const truncated = lines.length > maxLines;
|
|
28
|
+
return (_jsxs(Box, { flexDirection: "column", overflow: "hidden", children: [visible.map((line, i) => (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Text, { color: "gray", children: [formatLineNo(line.oldLineNo), "\u2502", formatLineNo(line.newLineNo), " "] }), _jsx(Text, { color: lineColor(line.type), children: linePrefix(line.type) }), _jsx(Text, { color: lineColor(line.type), children: line.content })] }, i))), truncated && (_jsxs(Text, { color: "gray", children: [" \u2026 ", lines.length - maxLines, " more lines"] }))] }));
|
|
29
|
+
}
|
|
30
|
+
function SideBySideHunk({ lines, cols, maxLines }) {
|
|
31
|
+
if (lines.length === 0) {
|
|
32
|
+
return (_jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, children: "Empty hunk" }) }));
|
|
33
|
+
}
|
|
34
|
+
// Pair up removed/added lines for side-by-side display
|
|
35
|
+
const paneWidth = Math.floor((cols - 4) / 2);
|
|
36
|
+
// Build paired rows: match adjacent removed/added lines
|
|
37
|
+
const rows = [];
|
|
38
|
+
let li = 0;
|
|
39
|
+
while (li < lines.length) {
|
|
40
|
+
const line = lines[li];
|
|
41
|
+
if (line.type === 'removed') {
|
|
42
|
+
const next = lines[li + 1];
|
|
43
|
+
if (next?.type === 'added') {
|
|
44
|
+
rows.push({ left: line, right: next });
|
|
45
|
+
li += 2;
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
rows.push({ left: line, right: null });
|
|
49
|
+
}
|
|
50
|
+
else if (line.type === 'added') {
|
|
51
|
+
rows.push({ left: null, right: line });
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
rows.push({ left: line, right: line });
|
|
55
|
+
}
|
|
56
|
+
li++;
|
|
57
|
+
}
|
|
58
|
+
const visible = rows.slice(0, maxLines);
|
|
59
|
+
const truncated = rows.length > maxLines;
|
|
60
|
+
return (_jsxs(Box, { flexDirection: "column", overflow: "hidden", children: [visible.map((row, i) => (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: paneWidth, overflow: "hidden", children: row.left ? (_jsxs(Text, { color: lineColor(row.left.type), children: [formatLineNo(row.left.oldLineNo), linePrefix(row.left.type), row.left.content] })) : (_jsx(Text, { color: "gray", children: ' '.repeat(5) })) }), _jsx(Text, { color: "gray", children: "\u2502" }), _jsx(Box, { width: paneWidth, overflow: "hidden", children: row.right ? (_jsxs(Text, { color: lineColor(row.right.type), children: [formatLineNo(row.right.newLineNo), linePrefix(row.right.type), row.right.content] })) : (_jsx(Text, { color: "gray", children: ' '.repeat(5) })) })] }, i))), truncated && (_jsxs(Text, { color: "gray", children: [" \u2026 ", rows.length - maxLines, " more rows"] }))] }));
|
|
61
|
+
}
|
|
62
|
+
export function DiffViewer({ diffView, cols, maxLines = 20 }) {
|
|
63
|
+
const { files, loading, error, fileIndex, hunkIndex } = diffView;
|
|
64
|
+
const wide = cols >= 120;
|
|
65
|
+
if (loading) {
|
|
66
|
+
return (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: "cyan", children: "Loading diff\u2026" }) }));
|
|
67
|
+
}
|
|
68
|
+
if (error) {
|
|
69
|
+
return (_jsx(Box, { paddingX: 1, children: _jsxs(Text, { color: "red", children: ["Diff error: ", error] }) }));
|
|
70
|
+
}
|
|
71
|
+
if (files.length === 0) {
|
|
72
|
+
return (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: "gray", children: "No changes (diff is empty)" }) }));
|
|
73
|
+
}
|
|
74
|
+
const file = files[fileIndex];
|
|
75
|
+
// Defensive guard: fileIndex should always be in-bounds, but protect against races
|
|
76
|
+
if (!file) {
|
|
77
|
+
return (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: "gray", children: "No file selected" }) }));
|
|
78
|
+
}
|
|
79
|
+
const hunk = file.hunks[hunkIndex];
|
|
80
|
+
return (_jsxs(Box, { flexDirection: "column", overflow: "hidden", children: [_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", paddingX: 1, children: [_jsxs(Box, { gap: 1, children: [file.isNew && _jsx(Text, { color: "green", bold: true, children: "NEW" }), file.isDeleted && _jsx(Text, { color: "red", bold: true, children: "DEL" }), file.isBinary && _jsx(Text, { color: "yellow", bold: true, children: "BIN" }), _jsx(Text, { bold: true, color: "white", children: file.newPath !== '/dev/null' ? file.newPath : file.oldPath })] }), _jsxs(Text, { color: "gray", children: ["file ", fileIndex + 1, "/", files.length, file.hunks.length > 0 && ` hunk ${hunkIndex + 1}/${file.hunks.length}`, ' ', "[/]=file n/p=hunk esc=close"] })] }), hunk && (_jsx(Box, { paddingX: 1, children: _jsxs(Text, { color: "cyan", dimColor: true, children: ["@@ -", hunk.oldStart, ",", hunk.oldCount, " +", hunk.newStart, ",", hunk.newCount, " @@"] }) })), file.isBinary && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: "yellow", children: "Binary file changed" }) })), hunk && !file.isBinary && (_jsx(Box, { flexDirection: "column", paddingX: 1, overflow: "hidden", children: wide ? (_jsx(SideBySideHunk, { lines: hunk.lines, cols: cols, maxLines: maxLines })) : (_jsx(NarrowHunk, { lines: hunk.lines, maxLines: maxLines })) })), !hunk && !file.isBinary && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: "gray", children: "No hunks in this file" }) }))] }));
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=diff-viewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-viewer.js","sourceRoot":"","sources":["../../../../src/tui/components/diff-viewer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAYhC,SAAS,SAAS,CAAC,IAAsB;IACvC,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IACrC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACrC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,UAAU,CAAC,IAAsB;IACxC,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,GAAG,CAAC;IACjC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC;IACnC,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,YAAY,CAAC,CAAgB,EAAE,KAAK,GAAG,CAAC;IAC/C,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACxC,CAAC;AAOD,SAAS,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAmB;IACtD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,CACL,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,QAAQ,iCAAkB,GAC5B,CACP,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC;IAC1C,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAA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,QAAQ,EAAE,QAAQ,GAAI,CACtD,GACG,CACP,EAGA,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAC1B,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,sCAA6B,GAC3C,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EditTaskInputProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
currentTitle: string;
|
|
5
|
+
onSubmit: (newTitle: string) => void;
|
|
6
|
+
onDismiss: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function EditTaskInput({ visible, currentTitle, onSubmit, onDismiss }: EditTaskInputProps): React.JSX.Element | null;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=edit-task-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-task-input.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/edit-task-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA2B1H"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Box, Text } from 'ink';
|
|
4
|
+
import TextInput from 'ink-text-input';
|
|
5
|
+
export function EditTaskInput({ visible, currentTitle, onSubmit, onDismiss }) {
|
|
6
|
+
const [value, setValue] = useState(currentTitle);
|
|
7
|
+
if (!visible) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
function handleSubmit(title) {
|
|
11
|
+
if (title.trim()) {
|
|
12
|
+
onSubmit(title.trim());
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
onDismiss();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return (_jsxs(Box, { flexDirection: "row", gap: 1, paddingX: 1, children: [_jsx(Text, { color: "blue", bold: true, children: "Edit task:" }), _jsx(TextInput, { value: value, onChange: setValue, onSubmit: handleSubmit, placeholder: "Enter new title...", focus: visible })] }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=edit-task-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-task-input.js","sourceRoot":"","sources":["../../../../src/tui/components/edit-task-input.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AASvC,MAAM,UAAU,aAAa,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAsB;IAC9F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,YAAY,CAAC,KAAa;QACjC,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;YACjB,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,SAAS,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,aAC1C,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,iCAAkB,EACzC,KAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAC,oBAAoB,EAChC,KAAK,EAAE,OAAO,GACd,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TrustLevel } from '../../agent/agent-launcher.js';
|
|
3
|
+
interface FooterProps {
|
|
4
|
+
trustLevel: TrustLevel;
|
|
5
|
+
factoryMode: boolean;
|
|
6
|
+
yoloMode: boolean;
|
|
7
|
+
showHelp: boolean;
|
|
8
|
+
sandboxEnabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function Footer({ trustLevel, factoryMode, yoloMode, showHelp, sandboxEnabled }: FooterProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,UAAU,WAAW;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAyCD,wBAAgB,MAAM,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAsB,EAAE,EAAE,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA0D9H"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, useStdout } from 'ink';
|
|
3
|
+
const trustColors = {
|
|
4
|
+
low: 'red',
|
|
5
|
+
medium: 'yellow',
|
|
6
|
+
high: 'green',
|
|
7
|
+
};
|
|
8
|
+
// Full help groups shown when cols is wide enough
|
|
9
|
+
const GROUP1 = [
|
|
10
|
+
{ key: 'n', label: 'new task' }, { key: 'l', label: 'launch' }, { key: 'x', label: 'kill/delete' },
|
|
11
|
+
{ key: '↵', label: 'parallelize' }, { key: 'j/k', label: 'navigate' }, { key: 'd', label: 'diff/decompose' },
|
|
12
|
+
];
|
|
13
|
+
const GROUP2 = [
|
|
14
|
+
{ key: '1', label: 'allow' }, { key: '2', label: 'allow session' }, { key: '3', label: 'deny' },
|
|
15
|
+
{ key: '!', label: 'auto' }, { key: '@', label: 'factory' },
|
|
16
|
+
];
|
|
17
|
+
const GROUP3 = [
|
|
18
|
+
{ key: 'a', label: 'agents' }, { key: 't', label: 'tasks' }, { key: 'w', label: 'your turn' }, { key: 'f', label: 'activity' },
|
|
19
|
+
{ key: 'r', label: 'review' }, { key: 'o', label: 'logs' }, { key: 'R', label: 'action PR' }, { key: 'esc', label: 'dismiss' },
|
|
20
|
+
];
|
|
21
|
+
// Condensed groups for narrow terminals (< 80 cols)
|
|
22
|
+
const NARROW_GROUP1 = [
|
|
23
|
+
{ key: 'n', label: 'new' }, { key: 'l', label: 'launch' }, { key: 'x', label: 'kill/del' },
|
|
24
|
+
{ key: 'j/k', label: 'nav' }, { key: 'd', label: 'diff' },
|
|
25
|
+
];
|
|
26
|
+
const NARROW_GROUP2 = [
|
|
27
|
+
{ key: '1', label: 'allow' }, { key: '3', label: 'deny' }, { key: '!', label: 'auto' },
|
|
28
|
+
{ key: 'a/t/w/f', label: 'focus' }, { key: 'r', label: 'review' }, { key: 'esc', label: 'dismiss' },
|
|
29
|
+
];
|
|
30
|
+
function KeyBinding({ k, label }) {
|
|
31
|
+
return (_jsxs(Text, { children: [_jsx(Text, { color: "cyan", bold: true, children: k }), _jsxs(Text, { dimColor: true, children: ["=", label] })] }));
|
|
32
|
+
}
|
|
33
|
+
export function Footer({ trustLevel, factoryMode, yoloMode, showHelp, sandboxEnabled = false }) {
|
|
34
|
+
const { stdout } = useStdout();
|
|
35
|
+
const cols = (stdout?.columns ?? 80) - 2; // subtract 2 for app border
|
|
36
|
+
const narrow = cols < 80;
|
|
37
|
+
const modeText = factoryMode && yoloMode ? 'YOLO' : factoryMode ? 'FACTORY' : yoloMode ? 'AUTO' : null;
|
|
38
|
+
const modeColor = factoryMode && yoloMode ? 'red' : factoryMode ? 'cyan' : 'yellow';
|
|
39
|
+
return (_jsxs(Box, { flexDirection: "column", children: [showHelp && (_jsx(Box, { borderStyle: "single", borderColor: "cyan", borderTop: true, borderLeft: false, borderRight: false, borderBottom: false, flexDirection: "column", paddingX: 1, children: narrow ? (_jsxs(_Fragment, { children: [_jsx(Box, { flexDirection: "row", gap: 2, flexWrap: "wrap", children: NARROW_GROUP1.map(({ key, label }) => _jsx(KeyBinding, { k: key, label: label }, key)) }), _jsx(Box, { flexDirection: "row", gap: 2, flexWrap: "wrap", children: NARROW_GROUP2.map(({ key, label }) => _jsx(KeyBinding, { k: key, label: label }, key)) })] })) : (_jsxs(_Fragment, { children: [_jsx(Box, { flexDirection: "row", gap: 2, flexWrap: "wrap", children: GROUP1.map(({ key, label }) => _jsx(KeyBinding, { k: key, label: label }, key)) }), _jsx(Box, { flexDirection: "row", gap: 2, flexWrap: "wrap", children: GROUP2.map(({ key, label }) => _jsx(KeyBinding, { k: key, label: label }, key)) }), _jsx(Box, { flexDirection: "row", gap: 2, flexWrap: "wrap", children: GROUP3.map(({ key, label }) => _jsx(KeyBinding, { k: key, label: label }, key)) })] })) })), _jsxs(Box, { flexDirection: "row", paddingX: 1, justifyContent: "space-between", width: cols, children: [_jsxs(Box, { flexDirection: "row", gap: 2, children: [_jsxs(Text, { children: [_jsx(Text, { color: "cyan", bold: true, children: "T" }), _jsx(Text, { dimColor: true, children: "=trust:" }), _jsx(Text, { color: trustColors[trustLevel], bold: true, children: trustLevel })] }), modeText && _jsx(Text, { color: modeColor, bold: true, children: modeText }), sandboxEnabled && _jsx(Text, { color: "yellow", bold: true, children: "[SANDBOX ON]" })] }), _jsx(Text, { dimColor: true, children: narrow ? '?' : '? for keys' })] })] }));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../../../src/tui/components/footer.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAW3C,MAAM,WAAW,GAA+B;IAC9C,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,OAAO;CACd,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,GAAG;IACb,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,aAAa,EAAE;IAClG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,gBAAgB,EAAE;CAC7G,CAAC;AACF,MAAM,MAAM,GAAG;IACb,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,EA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
|
6
|
+
export declare function Header({ teamName, syncStatus }: HeaderProps): React.JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,WAAW;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,WAAW,GAAG,cAAc,GAAG,SAAS,CAAC;CACtD;AAkBD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAY/E"}
|