@mc1global/opencode-jarvis 0.13.0 → 0.14.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 +391 -0
- package/README.md +55 -29
- package/dist/application/agent-registry/dtos.d.ts.map +1 -1
- package/dist/application/agent-registry/use-cases.d.ts +0 -14
- package/dist/application/agent-registry/use-cases.d.ts.map +1 -1
- package/dist/application/agent-registry/use-cases.js +1 -0
- package/dist/application/agent-registry/use-cases.js.map +1 -1
- package/dist/application/azure-sync/comment-intent-service.d.ts +73 -0
- package/dist/application/azure-sync/comment-intent-service.d.ts.map +1 -0
- package/dist/application/azure-sync/comment-intent-service.js +105 -0
- package/dist/application/azure-sync/comment-intent-service.js.map +1 -0
- package/dist/application/azure-sync/dtos.d.ts.map +1 -1
- package/dist/application/azure-sync/field-builders.d.ts +2 -2
- package/dist/application/azure-sync/field-builders.d.ts.map +1 -1
- package/dist/application/azure-sync/field-builders.js +1 -1
- package/dist/application/azure-sync/field-builders.js.map +1 -1
- package/dist/application/azure-sync/intent-executor.d.ts +54 -0
- package/dist/application/azure-sync/intent-executor.d.ts.map +1 -0
- package/dist/application/azure-sync/intent-executor.js +130 -0
- package/dist/application/azure-sync/intent-executor.js.map +1 -0
- package/dist/application/azure-sync/intent-reply-builder.d.ts +41 -0
- package/dist/application/azure-sync/intent-reply-builder.d.ts.map +1 -0
- package/dist/application/azure-sync/intent-reply-builder.js +57 -0
- package/dist/application/azure-sync/intent-reply-builder.js.map +1 -0
- package/dist/application/azure-sync/kanban-card-sync-adapter.d.ts +39 -0
- package/dist/application/azure-sync/kanban-card-sync-adapter.d.ts.map +1 -0
- package/dist/application/azure-sync/kanban-card-sync-adapter.js +74 -0
- package/dist/application/azure-sync/kanban-card-sync-adapter.js.map +1 -0
- package/dist/application/azure-sync/kanban-sync-ports.d.ts +60 -0
- package/dist/application/azure-sync/kanban-sync-ports.d.ts.map +1 -0
- package/dist/application/azure-sync/kanban-sync-ports.js +17 -0
- package/dist/application/azure-sync/kanban-sync-ports.js.map +1 -0
- package/dist/application/azure-sync/poll-service.d.ts +2 -0
- package/dist/application/azure-sync/poll-service.d.ts.map +1 -1
- package/dist/application/azure-sync/poll-service.js +64 -18
- package/dist/application/azure-sync/poll-service.js.map +1 -1
- package/dist/application/azure-sync/pr-use-cases.d.ts +1 -4
- package/dist/application/azure-sync/pr-use-cases.d.ts.map +1 -1
- package/dist/application/azure-sync/pr-use-cases.js +2 -7
- package/dist/application/azure-sync/pr-use-cases.js.map +1 -1
- package/dist/application/azure-sync/pull-use-cases.d.ts.map +1 -1
- package/dist/application/azure-sync/pull-use-cases.js +47 -14
- package/dist/application/azure-sync/pull-use-cases.js.map +1 -1
- package/dist/application/azure-sync/push-entity-use-cases.d.ts +40 -0
- package/dist/application/azure-sync/push-entity-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/push-entity-use-cases.js +266 -0
- package/dist/application/azure-sync/push-entity-use-cases.js.map +1 -0
- package/dist/application/azure-sync/push-use-cases.d.ts +9 -21
- package/dist/application/azure-sync/push-use-cases.d.ts.map +1 -1
- package/dist/application/azure-sync/push-use-cases.js +14 -229
- package/dist/application/azure-sync/push-use-cases.js.map +1 -1
- package/dist/application/azure-sync/reverse-field-builder.d.ts.map +1 -1
- package/dist/application/azure-sync/reverse-field-builder.js +1 -1
- package/dist/application/azure-sync/reverse-field-builder.js.map +1 -1
- package/dist/application/azure-sync/task-push-use-cases.d.ts +13 -13
- package/dist/application/azure-sync/task-push-use-cases.d.ts.map +1 -1
- package/dist/application/azure-sync/task-push-use-cases.js +5 -22
- package/dist/application/azure-sync/task-push-use-cases.js.map +1 -1
- package/dist/application/bootstrap/healthcheck-use-cases.d.ts +13 -0
- package/dist/application/bootstrap/healthcheck-use-cases.d.ts.map +1 -1
- package/dist/application/bootstrap/healthcheck-use-cases.js +4 -5
- package/dist/application/bootstrap/healthcheck-use-cases.js.map +1 -1
- package/dist/application/bootstrap/index.d.ts.map +1 -1
- package/dist/application/bootstrap/index.js.map +1 -1
- package/dist/application/bootstrap/ports.d.ts +29 -0
- package/dist/application/bootstrap/ports.d.ts.map +1 -0
- package/dist/application/bootstrap/ports.js +12 -0
- package/dist/application/bootstrap/ports.js.map +1 -0
- package/dist/application/bootstrap/terminal-commands-use-cases.d.ts.map +1 -1
- package/dist/application/bootstrap/terminal-commands-use-cases.js +1 -1
- package/dist/application/bootstrap/terminal-commands-use-cases.js.map +1 -1
- package/dist/application/bootstrap/use-cases.d.ts +29 -30
- package/dist/application/bootstrap/use-cases.d.ts.map +1 -1
- package/dist/application/bootstrap/use-cases.js +84 -81
- package/dist/application/bootstrap/use-cases.js.map +1 -1
- package/dist/application/config/config-service.d.ts +7 -21
- package/dist/application/config/config-service.d.ts.map +1 -1
- package/dist/application/config/config-service.js +8 -5
- package/dist/application/config/config-service.js.map +1 -1
- package/dist/application/config/config-write-service.d.ts +4 -23
- package/dist/application/config/config-write-service.d.ts.map +1 -1
- package/dist/application/config/config-write-service.js +2 -1
- package/dist/application/config/config-write-service.js.map +1 -1
- package/dist/application/context-memory/execution-journal-use-cases.d.ts.map +1 -1
- package/dist/application/context-memory/execution-journal-use-cases.js +10 -0
- package/dist/application/context-memory/execution-journal-use-cases.js.map +1 -1
- package/dist/application/context-memory/note-use-cases.d.ts.map +1 -1
- package/dist/application/context-memory/note-use-cases.js +10 -0
- package/dist/application/context-memory/note-use-cases.js.map +1 -1
- package/dist/application/context-memory/session-use-cases.d.ts.map +1 -1
- package/dist/application/context-memory/session-use-cases.js +10 -0
- package/dist/application/context-memory/session-use-cases.js.map +1 -1
- package/dist/application/context-memory/todo-use-cases.d.ts.map +1 -1
- package/dist/application/context-memory/todo-use-cases.js +10 -0
- package/dist/application/context-memory/todo-use-cases.js.map +1 -1
- package/dist/application/domain-map/dtos.d.ts.map +1 -1
- package/dist/application/domain-map/use-cases.d.ts +3 -23
- package/dist/application/domain-map/use-cases.d.ts.map +1 -1
- package/dist/application/domain-map/use-cases.js +5 -5
- package/dist/application/domain-map/use-cases.js.map +1 -1
- package/dist/application/environment/use-cases.d.ts +73 -4
- package/dist/application/environment/use-cases.d.ts.map +1 -1
- package/dist/application/environment/use-cases.js +5 -1
- package/dist/application/environment/use-cases.js.map +1 -1
- package/dist/application/governance/dtos.d.ts +29 -0
- package/dist/application/governance/dtos.d.ts.map +1 -0
- package/dist/application/governance/dtos.js +11 -0
- package/dist/application/governance/dtos.js.map +1 -0
- package/dist/application/governance/validation-use-cases.d.ts +1 -19
- package/dist/application/governance/validation-use-cases.d.ts.map +1 -1
- package/dist/application/governance/validation-use-cases.js +11 -0
- package/dist/application/governance/validation-use-cases.js.map +1 -1
- package/dist/application/kanban/board-use-cases.d.ts +12 -18
- package/dist/application/kanban/board-use-cases.d.ts.map +1 -1
- package/dist/application/kanban/board-use-cases.js +11 -38
- package/dist/application/kanban/board-use-cases.js.map +1 -1
- package/dist/application/kanban/card-gate-use-cases.d.ts +24 -0
- package/dist/application/kanban/card-gate-use-cases.d.ts.map +1 -0
- package/dist/application/kanban/card-gate-use-cases.js +71 -0
- package/dist/application/kanban/card-gate-use-cases.js.map +1 -0
- package/dist/application/kanban/card-use-cases.d.ts +7 -9
- package/dist/application/kanban/card-use-cases.d.ts.map +1 -1
- package/dist/application/kanban/card-use-cases.js +60 -92
- package/dist/application/kanban/card-use-cases.js.map +1 -1
- package/dist/application/kanban/dtos.d.ts +14 -0
- package/dist/application/kanban/dtos.d.ts.map +1 -1
- package/dist/application/kanban/dtos.js +38 -1
- package/dist/application/kanban/dtos.js.map +1 -1
- package/dist/application/kanban/sprint-use-cases.d.ts +2 -2
- package/dist/application/kanban/sprint-use-cases.d.ts.map +1 -1
- package/dist/application/kanban/sprint-use-cases.js +10 -0
- package/dist/application/kanban/sprint-use-cases.js.map +1 -1
- package/dist/application/pipeline/dtos.d.ts +157 -73
- package/dist/application/pipeline/dtos.d.ts.map +1 -1
- package/dist/application/pipeline/dtos.js +5 -5
- package/dist/application/pipeline/use-cases.d.ts +10 -13
- package/dist/application/pipeline/use-cases.d.ts.map +1 -1
- package/dist/application/pipeline/use-cases.js +1 -0
- package/dist/application/pipeline/use-cases.js.map +1 -1
- package/dist/application/rag/dtos.d.ts.map +1 -1
- package/dist/application/rag/oracle-use-cases.d.ts.map +1 -1
- package/dist/application/rag/oracle-use-cases.js +11 -1
- package/dist/application/rag/oracle-use-cases.js.map +1 -1
- package/dist/application/rag/rag-mutation-use-cases.d.ts +61 -0
- package/dist/application/rag/rag-mutation-use-cases.d.ts.map +1 -0
- package/dist/application/rag/rag-mutation-use-cases.js +155 -0
- package/dist/application/rag/rag-mutation-use-cases.js.map +1 -0
- package/dist/application/rag/use-cases.d.ts +10 -5
- package/dist/application/rag/use-cases.d.ts.map +1 -1
- package/dist/application/rag/use-cases.js +97 -191
- package/dist/application/rag/use-cases.js.map +1 -1
- package/dist/application/token-metrics/dtos.d.ts.map +1 -1
- package/dist/application/token-metrics/tracking-use-cases.d.ts.map +1 -1
- package/dist/application/token-metrics/tracking-use-cases.js +13 -3
- package/dist/application/token-metrics/tracking-use-cases.js.map +1 -1
- package/dist/application/vault/dtos.d.ts.map +1 -1
- package/dist/application/vault/use-cases.d.ts +1 -1
- package/dist/application/vault/use-cases.d.ts.map +1 -1
- package/dist/application/vault/use-cases.js +11 -0
- package/dist/application/vault/use-cases.js.map +1 -1
- package/dist/application/vault/vault-manager.d.ts +1 -1
- package/dist/application/vault/vault-manager.d.ts.map +1 -1
- package/dist/application/vault/vault-manager.js +26 -6
- package/dist/application/vault/vault-manager.js.map +1 -1
- package/dist/application/workspace-registry/dtos.d.ts.map +1 -1
- package/dist/application/workspace-registry/use-cases.d.ts +65 -15
- package/dist/application/workspace-registry/use-cases.d.ts.map +1 -1
- package/dist/application/workspace-registry/use-cases.js +5 -4
- package/dist/application/workspace-registry/use-cases.js.map +1 -1
- package/dist/composition/hooks.d.ts +15 -0
- package/dist/composition/hooks.d.ts.map +1 -0
- package/dist/composition/hooks.js +113 -0
- package/dist/composition/hooks.js.map +1 -0
- package/dist/composition/infrastructure.d.ts +84 -0
- package/dist/composition/infrastructure.d.ts.map +1 -0
- package/dist/composition/infrastructure.js +140 -0
- package/dist/composition/infrastructure.js.map +1 -0
- package/dist/composition/services.d.ts +78 -0
- package/dist/composition/services.d.ts.map +1 -0
- package/dist/composition/services.js +335 -0
- package/dist/composition/services.js.map +1 -0
- package/dist/composition/tools.d.ts +15 -0
- package/dist/composition/tools.d.ts.map +1 -0
- package/dist/composition/tools.js +136 -0
- package/dist/composition/tools.js.map +1 -0
- package/dist/domain/agent-registry/entities.d.ts.map +1 -1
- package/dist/domain/agent-registry/entities.js +1 -1
- package/dist/domain/agent-registry/entities.js.map +1 -1
- package/dist/domain/agent-registry/enum-values.d.ts +15 -0
- package/dist/domain/agent-registry/enum-values.d.ts.map +1 -0
- package/dist/domain/agent-registry/enum-values.js +15 -0
- package/dist/domain/agent-registry/enum-values.js.map +1 -0
- package/dist/domain/agent-registry/repositories.d.ts.map +1 -1
- package/dist/domain/agent-registry/services.d.ts.map +1 -1
- package/dist/domain/agent-registry/services.js +1 -1
- package/dist/domain/agent-registry/services.js.map +1 -1
- package/dist/domain/agent-registry/value-objects.d.ts.map +1 -1
- package/dist/domain/agent-registry/value-objects.js +1 -1
- package/dist/domain/agent-registry/value-objects.js.map +1 -1
- package/dist/domain/azure-sync/entities.d.ts +30 -112
- package/dist/domain/azure-sync/entities.d.ts.map +1 -1
- package/dist/domain/azure-sync/entities.js +31 -120
- package/dist/domain/azure-sync/entities.js.map +1 -1
- package/dist/domain/azure-sync/enum-values.d.ts +25 -0
- package/dist/domain/azure-sync/enum-values.d.ts.map +1 -0
- package/dist/domain/azure-sync/enum-values.js +33 -0
- package/dist/domain/azure-sync/enum-values.js.map +1 -0
- package/dist/domain/azure-sync/llm-port.d.ts +85 -0
- package/dist/domain/azure-sync/llm-port.d.ts.map +1 -0
- package/dist/domain/azure-sync/llm-port.js +12 -0
- package/dist/domain/azure-sync/llm-port.js.map +1 -0
- package/dist/domain/azure-sync/ports.d.ts +12 -3
- package/dist/domain/azure-sync/ports.d.ts.map +1 -1
- package/dist/domain/azure-sync/repositories.d.ts.map +1 -1
- package/dist/domain/azure-sync/services.d.ts.map +1 -1
- package/dist/domain/azure-sync/services.js.map +1 -1
- package/dist/domain/azure-sync/sync-log-entities.d.ts +124 -0
- package/dist/domain/azure-sync/sync-log-entities.d.ts.map +1 -0
- package/dist/domain/azure-sync/sync-log-entities.js +129 -0
- package/dist/domain/azure-sync/sync-log-entities.js.map +1 -0
- package/dist/domain/azure-sync/sync-state-maps.d.ts +44 -0
- package/dist/domain/azure-sync/sync-state-maps.d.ts.map +1 -0
- package/dist/domain/azure-sync/sync-state-maps.js +134 -0
- package/dist/domain/azure-sync/sync-state-maps.js.map +1 -0
- package/dist/domain/azure-sync/value-objects.d.ts +6 -35
- package/dist/domain/azure-sync/value-objects.d.ts.map +1 -1
- package/dist/domain/azure-sync/value-objects.js +4 -120
- package/dist/domain/azure-sync/value-objects.js.map +1 -1
- package/dist/domain/config/value-objects.d.ts +1 -28
- package/dist/domain/config/value-objects.d.ts.map +1 -1
- package/dist/domain/config/value-objects.js +37 -19
- package/dist/domain/config/value-objects.js.map +1 -1
- package/dist/domain/context-memory/entities.d.ts +4 -170
- package/dist/domain/context-memory/entities.d.ts.map +1 -1
- package/dist/domain/context-memory/entities.js +5 -318
- package/dist/domain/context-memory/entities.js.map +1 -1
- package/dist/domain/context-memory/enum-values.d.ts +22 -0
- package/dist/domain/context-memory/enum-values.d.ts.map +1 -0
- package/dist/domain/context-memory/enum-values.js +23 -0
- package/dist/domain/context-memory/enum-values.js.map +1 -0
- package/dist/domain/context-memory/execution-entry.d.ts +41 -0
- package/dist/domain/context-memory/execution-entry.d.ts.map +1 -0
- package/dist/domain/context-memory/execution-entry.js +82 -0
- package/dist/domain/context-memory/execution-entry.js.map +1 -0
- package/dist/domain/context-memory/note.d.ts +31 -0
- package/dist/domain/context-memory/note.d.ts.map +1 -0
- package/dist/domain/context-memory/note.js +42 -0
- package/dist/domain/context-memory/note.js.map +1 -0
- package/dist/domain/context-memory/repositories.d.ts.map +1 -1
- package/dist/domain/context-memory/repositories.js +7 -0
- package/dist/domain/context-memory/repositories.js.map +1 -1
- package/dist/domain/context-memory/services.d.ts.map +1 -1
- package/dist/domain/context-memory/services.js +15 -1
- package/dist/domain/context-memory/services.js.map +1 -1
- package/dist/domain/context-memory/session.d.ts +39 -0
- package/dist/domain/context-memory/session.d.ts.map +1 -0
- package/dist/domain/context-memory/session.js +81 -0
- package/dist/domain/context-memory/session.js.map +1 -0
- package/dist/domain/context-memory/todo.d.ts +46 -0
- package/dist/domain/context-memory/todo.d.ts.map +1 -0
- package/dist/domain/context-memory/todo.js +96 -0
- package/dist/domain/context-memory/todo.js.map +1 -0
- package/dist/domain/context-memory/value-objects.d.ts.map +1 -1
- package/dist/domain/context-memory/value-objects.js +1 -1
- package/dist/domain/context-memory/value-objects.js.map +1 -1
- package/dist/domain/data/ports.d.ts +18 -0
- package/dist/domain/data/ports.d.ts.map +1 -0
- package/dist/domain/data/ports.js +11 -0
- package/dist/domain/data/ports.js.map +1 -0
- package/dist/domain/domain-map/ports.d.ts +106 -0
- package/dist/domain/domain-map/ports.d.ts.map +1 -0
- package/dist/domain/domain-map/ports.js +12 -0
- package/dist/domain/domain-map/ports.js.map +1 -0
- package/dist/domain/domain-map/services.d.ts.map +1 -1
- package/dist/domain/domain-map/services.js +17 -2
- package/dist/domain/domain-map/services.js.map +1 -1
- package/dist/domain/domain-map/value-objects.d.ts.map +1 -1
- package/dist/domain/domain-map/value-objects.js +1 -1
- package/dist/domain/domain-map/value-objects.js.map +1 -1
- package/dist/domain/environment/entities.d.ts +1 -1
- package/dist/domain/environment/entities.d.ts.map +1 -1
- package/dist/domain/environment/entities.js +1 -1
- package/dist/domain/environment/entities.js.map +1 -1
- package/dist/domain/environment/enum-values.d.ts +23 -0
- package/dist/domain/environment/enum-values.d.ts.map +1 -0
- package/dist/domain/environment/enum-values.js +31 -0
- package/dist/domain/environment/enum-values.js.map +1 -0
- package/dist/domain/environment/ports.d.ts +41 -0
- package/dist/domain/environment/ports.d.ts.map +1 -0
- package/dist/domain/environment/ports.js +12 -0
- package/dist/domain/environment/ports.js.map +1 -0
- package/dist/domain/environment/renderers.d.ts.map +1 -1
- package/dist/domain/environment/renderers.js.map +1 -1
- package/dist/domain/environment/repositories.d.ts.map +1 -1
- package/dist/domain/environment/services.d.ts.map +1 -1
- package/dist/domain/environment/services.js.map +1 -1
- package/dist/domain/environment/value-objects.d.ts.map +1 -1
- package/dist/domain/environment/value-objects.js +1 -1
- package/dist/domain/environment/value-objects.js.map +1 -1
- package/dist/domain/governance/policies.d.ts.map +1 -1
- package/dist/domain/governance/policies.js +3 -42
- package/dist/domain/governance/policies.js.map +1 -1
- package/dist/domain/governance/services.d.ts.map +1 -1
- package/dist/domain/governance/services.js +11 -0
- package/dist/domain/governance/services.js.map +1 -1
- package/dist/domain/kanban/card-props.d.ts +39 -0
- package/dist/domain/kanban/card-props.d.ts.map +1 -0
- package/dist/domain/kanban/card-props.js +9 -0
- package/dist/domain/kanban/card-props.js.map +1 -0
- package/dist/domain/kanban/entities.d.ts +19 -42
- package/dist/domain/kanban/entities.d.ts.map +1 -1
- package/dist/domain/kanban/entities.js +32 -11
- package/dist/domain/kanban/entities.js.map +1 -1
- package/dist/domain/kanban/enum-values.d.ts +53 -0
- package/dist/domain/kanban/enum-values.d.ts.map +1 -0
- package/dist/domain/kanban/enum-values.js +62 -0
- package/dist/domain/kanban/enum-values.js.map +1 -0
- package/dist/domain/kanban/grooming.d.ts.map +1 -1
- package/dist/domain/kanban/grooming.js +27 -2
- package/dist/domain/kanban/grooming.js.map +1 -1
- package/dist/domain/kanban/repositories.d.ts.map +1 -1
- package/dist/domain/kanban/repositories.js +7 -0
- package/dist/domain/kanban/repositories.js.map +1 -1
- package/dist/domain/kanban/services.d.ts.map +1 -1
- package/dist/domain/kanban/services.js +11 -0
- package/dist/domain/kanban/services.js.map +1 -1
- package/dist/domain/kanban/sprint.d.ts +7 -7
- package/dist/domain/kanban/sprint.d.ts.map +1 -1
- package/dist/domain/kanban/sprint.js.map +1 -1
- package/dist/domain/kanban/value-objects.d.ts +13 -2
- package/dist/domain/kanban/value-objects.d.ts.map +1 -1
- package/dist/domain/kanban/value-objects.js.map +1 -1
- package/dist/domain/pipeline/enum-values.d.ts +30 -0
- package/dist/domain/pipeline/enum-values.d.ts.map +1 -0
- package/dist/domain/pipeline/enum-values.js +41 -0
- package/dist/domain/pipeline/enum-values.js.map +1 -0
- package/dist/domain/pipeline/gate.d.ts.map +1 -1
- package/dist/domain/pipeline/gate.js +1 -1
- package/dist/domain/pipeline/gate.js.map +1 -1
- package/dist/domain/pipeline/index.d.ts.map +1 -1
- package/dist/domain/pipeline/index.js +0 -3
- package/dist/domain/pipeline/index.js.map +1 -1
- package/dist/domain/pipeline/pipeline.d.ts.map +1 -1
- package/dist/domain/pipeline/pipeline.js +11 -6
- package/dist/domain/pipeline/pipeline.js.map +1 -1
- package/dist/domain/pipeline/ports.d.ts.map +1 -1
- package/dist/domain/pipeline/repositories.d.ts +3 -3
- package/dist/domain/pipeline/repositories.d.ts.map +1 -1
- package/dist/domain/pipeline/services.d.ts.map +1 -1
- package/dist/domain/pipeline/services.js +2 -0
- package/dist/domain/pipeline/services.js.map +1 -1
- package/dist/domain/pipeline/value-objects.d.ts.map +1 -1
- package/dist/domain/pipeline/value-objects.js +1 -2
- package/dist/domain/pipeline/value-objects.js.map +1 -1
- package/dist/domain/rag/enum-values.d.ts +19 -0
- package/dist/domain/rag/enum-values.d.ts.map +1 -0
- package/dist/domain/rag/enum-values.js +24 -0
- package/dist/domain/rag/enum-values.js.map +1 -0
- package/dist/domain/rag/repositories.d.ts.map +1 -1
- package/dist/domain/rag/repositories.js +10 -0
- package/dist/domain/rag/repositories.js.map +1 -1
- package/dist/domain/rag/services.d.ts.map +1 -1
- package/dist/domain/rag/services.js +4 -4
- package/dist/domain/rag/services.js.map +1 -1
- package/dist/domain/rag/value-objects.d.ts.map +1 -1
- package/dist/domain/rag/value-objects.js.map +1 -1
- package/dist/domain/shared/value-objects.d.ts.map +1 -1
- package/dist/domain/shared/value-objects.js.map +1 -1
- package/dist/domain/token-metrics/entities.d.ts.map +1 -1
- package/dist/domain/token-metrics/entities.js +2 -3
- package/dist/domain/token-metrics/entities.js.map +1 -1
- package/dist/domain/token-metrics/ports.d.ts.map +1 -1
- package/dist/domain/token-metrics/ports.js.map +1 -1
- package/dist/domain/token-metrics/repositories.d.ts.map +1 -1
- package/dist/domain/token-metrics/repositories.js +10 -0
- package/dist/domain/token-metrics/repositories.js.map +1 -1
- package/dist/domain/token-metrics/value-objects.d.ts.map +1 -1
- package/dist/domain/token-metrics/value-objects.js.map +1 -1
- package/dist/domain/vault/document.d.ts.map +1 -1
- package/dist/domain/vault/document.js +39 -15
- package/dist/domain/vault/document.js.map +1 -1
- package/dist/domain/vault/repositories.d.ts.map +1 -1
- package/dist/domain/vault/repositories.js +10 -0
- package/dist/domain/vault/repositories.js.map +1 -1
- package/dist/domain/vault/section.d.ts.map +1 -1
- package/dist/domain/vault/section.js +10 -0
- package/dist/domain/vault/section.js.map +1 -1
- package/dist/domain/vault/services.d.ts +11 -0
- package/dist/domain/vault/services.d.ts.map +1 -1
- package/dist/domain/vault/services.js +45 -20
- package/dist/domain/vault/services.js.map +1 -1
- package/dist/domain/vault/table.d.ts +1 -0
- package/dist/domain/vault/table.d.ts.map +1 -1
- package/dist/domain/vault/table.js +12 -10
- package/dist/domain/vault/table.js.map +1 -1
- package/dist/domain/vault/value-objects.d.ts +5 -5
- package/dist/domain/vault/value-objects.d.ts.map +1 -1
- package/dist/domain/vault/value-objects.js +4 -2
- package/dist/domain/vault/value-objects.js.map +1 -1
- package/dist/domain/workspace-registry/entities.d.ts +24 -3
- package/dist/domain/workspace-registry/entities.d.ts.map +1 -1
- package/dist/domain/workspace-registry/entities.js +1 -1
- package/dist/domain/workspace-registry/entities.js.map +1 -1
- package/dist/domain/workspace-registry/enum-values.d.ts +19 -0
- package/dist/domain/workspace-registry/enum-values.d.ts.map +1 -0
- package/dist/domain/workspace-registry/enum-values.js +23 -0
- package/dist/domain/workspace-registry/enum-values.js.map +1 -0
- package/dist/domain/workspace-registry/ports.d.ts +16 -0
- package/dist/domain/workspace-registry/ports.d.ts.map +1 -0
- package/dist/domain/workspace-registry/ports.js +16 -0
- package/dist/domain/workspace-registry/ports.js.map +1 -0
- package/dist/domain/workspace-registry/repositories.d.ts.map +1 -1
- package/dist/domain/workspace-registry/services.d.ts +2 -1
- package/dist/domain/workspace-registry/services.d.ts.map +1 -1
- package/dist/domain/workspace-registry/services.js.map +1 -1
- package/dist/domain/workspace-registry/value-objects.d.ts +2 -33
- package/dist/domain/workspace-registry/value-objects.d.ts.map +1 -1
- package/dist/domain/workspace-registry/value-objects.js +0 -1
- package/dist/domain/workspace-registry/value-objects.js.map +1 -1
- package/dist/hooks/config-command.d.ts.map +1 -1
- package/dist/hooks/config-command.js.map +1 -1
- package/dist/hooks/context-compacting.d.ts.map +1 -1
- package/dist/hooks/context-compacting.js +14 -0
- package/dist/hooks/context-compacting.js.map +1 -1
- package/dist/hooks/event-handlers.d.ts.map +1 -1
- package/dist/hooks/event-handlers.js +19 -3
- package/dist/hooks/event-handlers.js.map +1 -1
- package/dist/hooks/execution-journal.d.ts.map +1 -1
- package/dist/hooks/execution-journal.js +16 -0
- package/dist/hooks/execution-journal.js.map +1 -1
- package/dist/hooks/first-run-guide.d.ts.map +1 -1
- package/dist/hooks/first-run-guide.js +7 -8
- package/dist/hooks/first-run-guide.js.map +1 -1
- package/dist/hooks/guardrails.d.ts.map +1 -1
- package/dist/hooks/guardrails.js +16 -0
- package/dist/hooks/guardrails.js.map +1 -1
- package/dist/hooks/logger.d.ts.map +1 -1
- package/dist/hooks/logger.js +2 -0
- package/dist/hooks/logger.js.map +1 -1
- package/dist/hooks/shell-env.d.ts.map +1 -1
- package/dist/hooks/shell-env.js +12 -0
- package/dist/hooks/shell-env.js.map +1 -1
- package/dist/hooks/slash-commands.d.ts +3 -3
- package/dist/hooks/slash-commands.d.ts.map +1 -1
- package/dist/hooks/slash-commands.js +43 -16
- package/dist/hooks/slash-commands.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -600
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts +11 -27
- package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts.map +1 -1
- package/dist/infrastructure/agent-registry/agent-profile-repository.js +1 -0
- package/dist/infrastructure/agent-registry/agent-profile-repository.js.map +1 -1
- package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts +9 -26
- package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts.map +1 -1
- package/dist/infrastructure/agent-registry/agent-session-adapter.js +1 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.js.map +1 -1
- package/dist/infrastructure/agent-registry/built-in-profiles.d.ts +11 -2
- package/dist/infrastructure/agent-registry/built-in-profiles.d.ts.map +1 -1
- package/dist/infrastructure/agent-registry/built-in-profiles.js +1 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.js.map +1 -1
- package/dist/infrastructure/azure-sync/azure-auth.d.ts.map +1 -1
- package/dist/infrastructure/azure-sync/azure-auth.js.map +1 -1
- package/dist/infrastructure/azure-sync/azure-devops-client.d.ts +4 -3
- package/dist/infrastructure/azure-sync/azure-devops-client.d.ts.map +1 -1
- package/dist/infrastructure/azure-sync/azure-devops-client.js +47 -14
- package/dist/infrastructure/azure-sync/azure-devops-client.js.map +1 -1
- package/dist/infrastructure/azure-sync/ollama-llm-adapter.d.ts +30 -0
- package/dist/infrastructure/azure-sync/ollama-llm-adapter.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/ollama-llm-adapter.js +162 -0
- package/dist/infrastructure/azure-sync/ollama-llm-adapter.js.map +1 -0
- package/dist/infrastructure/azure-sync/sqlite-event-repository.d.ts.map +1 -1
- package/dist/infrastructure/azure-sync/sqlite-event-repository.js +24 -9
- package/dist/infrastructure/azure-sync/sqlite-event-repository.js.map +1 -1
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts.map +1 -1
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.js +12 -4
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.js.map +1 -1
- package/dist/infrastructure/bootstrap/bootstrap-fs-adapter.d.ts +19 -0
- package/dist/infrastructure/bootstrap/bootstrap-fs-adapter.d.ts.map +1 -0
- package/dist/infrastructure/bootstrap/bootstrap-fs-adapter.js +41 -0
- package/dist/infrastructure/bootstrap/bootstrap-fs-adapter.js.map +1 -0
- package/dist/infrastructure/config/yaml-config-repository.d.ts +9 -7
- package/dist/infrastructure/config/yaml-config-repository.d.ts.map +1 -1
- package/dist/infrastructure/config/yaml-config-repository.js +1 -0
- package/dist/infrastructure/config/yaml-config-repository.js.map +1 -1
- package/dist/infrastructure/config/yaml-config-writer.d.ts +3 -4
- package/dist/infrastructure/config/yaml-config-writer.d.ts.map +1 -1
- package/dist/infrastructure/config/yaml-config-writer.js +1 -0
- package/dist/infrastructure/config/yaml-config-writer.js.map +1 -1
- package/dist/infrastructure/context-memory/execution-journal-repository.d.ts.map +1 -1
- package/dist/infrastructure/context-memory/execution-journal-repository.js +13 -1
- package/dist/infrastructure/context-memory/execution-journal-repository.js.map +1 -1
- package/dist/infrastructure/context-memory/note-repository.d.ts.map +1 -1
- package/dist/infrastructure/context-memory/note-repository.js +11 -1
- package/dist/infrastructure/context-memory/note-repository.js.map +1 -1
- package/dist/infrastructure/context-memory/search-repository.d.ts.map +1 -1
- package/dist/infrastructure/context-memory/session-repository.d.ts.map +1 -1
- package/dist/infrastructure/context-memory/session-repository.js +11 -1
- package/dist/infrastructure/context-memory/session-repository.js.map +1 -1
- package/dist/infrastructure/context-memory/todo-repository.d.ts.map +1 -1
- package/dist/infrastructure/context-memory/todo-repository.js +10 -1
- package/dist/infrastructure/context-memory/todo-repository.js.map +1 -1
- package/dist/infrastructure/data/data-file-adapter.d.ts +15 -0
- package/dist/infrastructure/data/data-file-adapter.d.ts.map +1 -0
- package/dist/infrastructure/data/data-file-adapter.js +27 -0
- package/dist/infrastructure/data/data-file-adapter.js.map +1 -0
- package/dist/infrastructure/database/sqlite-adapter.d.ts +14 -0
- package/dist/infrastructure/database/sqlite-adapter.d.ts.map +1 -1
- package/dist/infrastructure/database/sqlite-adapter.js.map +1 -1
- package/dist/infrastructure/domain-map/llm-analyzer.d.ts +38 -32
- package/dist/infrastructure/domain-map/llm-analyzer.d.ts.map +1 -1
- package/dist/infrastructure/domain-map/llm-analyzer.js +2 -1
- package/dist/infrastructure/domain-map/llm-analyzer.js.map +1 -1
- package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts +1 -16
- package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts.map +1 -1
- package/dist/infrastructure/domain-map/llm-prompt-factory.js +1 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.js.map +1 -1
- package/dist/infrastructure/domain-map/lsp-adapter.d.ts +53 -35
- package/dist/infrastructure/domain-map/lsp-adapter.d.ts.map +1 -1
- package/dist/infrastructure/domain-map/lsp-adapter.js +2 -1
- package/dist/infrastructure/domain-map/lsp-adapter.js.map +1 -1
- package/dist/infrastructure/domain-map/lsp-configs.d.ts +47 -37
- package/dist/infrastructure/domain-map/lsp-configs.d.ts.map +1 -1
- package/dist/infrastructure/domain-map/lsp-configs.js +1 -0
- package/dist/infrastructure/domain-map/lsp-configs.js.map +1 -1
- package/dist/infrastructure/domain-map/lsp-json-rpc.d.ts +18 -58
- package/dist/infrastructure/domain-map/lsp-json-rpc.d.ts.map +1 -1
- package/dist/infrastructure/domain-map/lsp-json-rpc.js +2 -1
- package/dist/infrastructure/domain-map/lsp-json-rpc.js.map +1 -1
- package/dist/infrastructure/domain-map/project-scanner.d.ts +8 -7
- package/dist/infrastructure/domain-map/project-scanner.d.ts.map +1 -1
- package/dist/infrastructure/domain-map/project-scanner.js +2 -1
- package/dist/infrastructure/domain-map/project-scanner.js.map +1 -1
- package/dist/infrastructure/environment/environment-repository.d.ts +16 -31
- package/dist/infrastructure/environment/environment-repository.d.ts.map +1 -1
- package/dist/infrastructure/environment/environment-repository.js +2 -1
- package/dist/infrastructure/environment/environment-repository.js.map +1 -1
- package/dist/infrastructure/environment/scanner-adapter.d.ts +2 -13
- package/dist/infrastructure/environment/scanner-adapter.d.ts.map +1 -1
- package/dist/infrastructure/environment/scanner-adapter.js +1 -0
- package/dist/infrastructure/environment/scanner-adapter.js.map +1 -1
- package/dist/infrastructure/kanban/card-repository.d.ts +2 -2
- package/dist/infrastructure/kanban/card-repository.d.ts.map +1 -1
- package/dist/infrastructure/kanban/card-repository.js +45 -22
- package/dist/infrastructure/kanban/card-repository.js.map +1 -1
- package/dist/infrastructure/kanban/sprint-repository.d.ts.map +1 -1
- package/dist/infrastructure/kanban/sprint-repository.js +14 -1
- package/dist/infrastructure/kanban/sprint-repository.js.map +1 -1
- package/dist/infrastructure/pipeline/dagger-adapter.d.ts +10 -43
- package/dist/infrastructure/pipeline/dagger-adapter.d.ts.map +1 -1
- package/dist/infrastructure/pipeline/dagger-adapter.js +1 -0
- package/dist/infrastructure/pipeline/dagger-adapter.js.map +1 -1
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts +27 -23
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts.map +1 -1
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.js +1 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.js.map +1 -1
- package/dist/infrastructure/pipeline/index.d.ts +0 -1
- package/dist/infrastructure/pipeline/index.d.ts.map +1 -1
- package/dist/infrastructure/pipeline/index.js.map +1 -1
- package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts +5 -20
- package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts.map +1 -1
- package/dist/infrastructure/pipeline/pipeline-template-registry.js +1 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.js.map +1 -1
- package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts +0 -8
- package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts.map +1 -1
- package/dist/infrastructure/pipeline/scaffold-templates-extra.js +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.js.map +1 -1
- package/dist/infrastructure/pipeline/scaffold-templates.d.ts.map +1 -1
- package/dist/infrastructure/pipeline/scaffold-templates.js +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates.js.map +1 -1
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts +13 -30
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts.map +1 -1
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js +3 -2
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js.map +1 -1
- package/dist/infrastructure/rag/file-discovery.d.ts +11 -0
- package/dist/infrastructure/rag/file-discovery.d.ts.map +1 -1
- package/dist/infrastructure/rag/file-discovery.js +2 -1
- package/dist/infrastructure/rag/file-discovery.js.map +1 -1
- package/dist/infrastructure/rag/file-index-registry.d.ts +13 -0
- package/dist/infrastructure/rag/file-index-registry.d.ts.map +1 -1
- package/dist/infrastructure/rag/file-index-registry.js.map +1 -1
- package/dist/infrastructure/rag/ollama-embeddings.d.ts +10 -0
- package/dist/infrastructure/rag/ollama-embeddings.d.ts.map +1 -1
- package/dist/infrastructure/rag/ollama-embeddings.js.map +1 -1
- package/dist/infrastructure/rag/text-splitter.d.ts +10 -0
- package/dist/infrastructure/rag/text-splitter.d.ts.map +1 -1
- package/dist/infrastructure/rag/text-splitter.js +4 -1
- package/dist/infrastructure/rag/text-splitter.js.map +1 -1
- package/dist/infrastructure/rag/vectra-adapter.d.ts +10 -0
- package/dist/infrastructure/rag/vectra-adapter.d.ts.map +1 -1
- package/dist/infrastructure/rag/vectra-adapter.js.map +1 -1
- package/dist/infrastructure/token-metrics/token-metrics-repository.d.ts.map +1 -1
- package/dist/infrastructure/token-metrics/token-metrics-repository.js +11 -0
- package/dist/infrastructure/token-metrics/token-metrics-repository.js.map +1 -1
- package/dist/infrastructure/vault/markdown-parser.d.ts +10 -0
- package/dist/infrastructure/vault/markdown-parser.d.ts.map +1 -1
- package/dist/infrastructure/vault/markdown-parser.js +9 -9
- package/dist/infrastructure/vault/markdown-parser.js.map +1 -1
- package/dist/infrastructure/vault/vault-fs-adapter.d.ts +11 -0
- package/dist/infrastructure/vault/vault-fs-adapter.d.ts.map +1 -1
- package/dist/infrastructure/vault/vault-fs-adapter.js.map +1 -1
- package/dist/infrastructure/workspace-registry/dependency-repository.d.ts +11 -25
- package/dist/infrastructure/workspace-registry/dependency-repository.d.ts.map +1 -1
- package/dist/infrastructure/workspace-registry/dependency-repository.js +1 -0
- package/dist/infrastructure/workspace-registry/dependency-repository.js.map +1 -1
- package/dist/infrastructure/workspace-registry/workspace-repository.d.ts +11 -26
- package/dist/infrastructure/workspace-registry/workspace-repository.d.ts.map +1 -1
- package/dist/infrastructure/workspace-registry/workspace-repository.js +1 -0
- package/dist/infrastructure/workspace-registry/workspace-repository.js.map +1 -1
- package/dist/tools/agent-registry-tools.d.ts +16 -0
- package/dist/tools/agent-registry-tools.d.ts.map +1 -1
- package/dist/tools/agent-registry-tools.js +2 -1
- package/dist/tools/agent-registry-tools.js.map +1 -1
- package/dist/tools/agent-tools.d.ts +17 -7
- package/dist/tools/agent-tools.d.ts.map +1 -1
- package/dist/tools/agent-tools.js +158 -206
- package/dist/tools/agent-tools.js.map +1 -1
- package/dist/tools/azure-sync-event-tools.d.ts +23 -7
- package/dist/tools/azure-sync-event-tools.d.ts.map +1 -1
- package/dist/tools/azure-sync-event-tools.js +255 -66
- package/dist/tools/azure-sync-event-tools.js.map +1 -1
- package/dist/tools/azure-sync-pr-tools.d.ts +21 -0
- package/dist/tools/azure-sync-pr-tools.d.ts.map +1 -0
- package/dist/tools/azure-sync-pr-tools.js +146 -0
- package/dist/tools/azure-sync-pr-tools.js.map +1 -0
- package/dist/tools/azure-sync-tools.d.ts +22 -8
- package/dist/tools/azure-sync-tools.d.ts.map +1 -1
- package/dist/tools/azure-sync-tools.js +248 -267
- package/dist/tools/azure-sync-tools.js.map +1 -1
- package/dist/tools/bootstrap-tools.d.ts +16 -6
- package/dist/tools/bootstrap-tools.d.ts.map +1 -1
- package/dist/tools/bootstrap-tools.js +123 -143
- package/dist/tools/bootstrap-tools.js.map +1 -1
- package/dist/tools/config-tools.d.ts +16 -1
- package/dist/tools/config-tools.d.ts.map +1 -1
- package/dist/tools/config-tools.js +32 -2
- package/dist/tools/config-tools.js.map +1 -1
- package/dist/tools/context-memory-tools.d.ts +15 -0
- package/dist/tools/context-memory-tools.d.ts.map +1 -1
- package/dist/tools/context-memory-tools.js +4 -3
- package/dist/tools/context-memory-tools.js.map +1 -1
- package/dist/tools/data-tools.d.ts +15 -1
- package/dist/tools/data-tools.d.ts.map +1 -1
- package/dist/tools/data-tools.js +262 -308
- package/dist/tools/data-tools.js.map +1 -1
- package/dist/tools/data-write-tools.d.ts +20 -0
- package/dist/tools/data-write-tools.d.ts.map +1 -0
- package/dist/tools/data-write-tools.js +144 -0
- package/dist/tools/data-write-tools.js.map +1 -0
- package/dist/tools/domain-map-tools.d.ts +19 -36
- package/dist/tools/domain-map-tools.d.ts.map +1 -1
- package/dist/tools/domain-map-tools.js +81 -85
- package/dist/tools/domain-map-tools.js.map +1 -1
- package/dist/tools/environment-tools.d.ts +23 -80
- package/dist/tools/environment-tools.d.ts.map +1 -1
- package/dist/tools/environment-tools.js +109 -97
- package/dist/tools/environment-tools.js.map +1 -1
- package/dist/tools/governance-tools.d.ts +13 -0
- package/dist/tools/governance-tools.d.ts.map +1 -1
- package/dist/tools/governance-tools.js.map +1 -1
- package/dist/tools/kanban-board-tools.d.ts +12 -3
- package/dist/tools/kanban-board-tools.d.ts.map +1 -1
- package/dist/tools/kanban-board-tools.js +92 -302
- package/dist/tools/kanban-board-tools.js.map +1 -1
- package/dist/tools/kanban-card-mutation-tools.d.ts +16 -0
- package/dist/tools/kanban-card-mutation-tools.d.ts.map +1 -0
- package/dist/tools/kanban-card-mutation-tools.js +168 -0
- package/dist/tools/kanban-card-mutation-tools.js.map +1 -0
- package/dist/tools/kanban-card-query-tools.d.ts +25 -0
- package/dist/tools/kanban-card-query-tools.d.ts.map +1 -0
- package/dist/tools/kanban-card-query-tools.js +191 -0
- package/dist/tools/kanban-card-query-tools.js.map +1 -0
- package/dist/tools/kanban-card-tools.d.ts +13 -0
- package/dist/tools/kanban-card-tools.d.ts.map +1 -1
- package/dist/tools/kanban-card-tools.js +24 -182
- package/dist/tools/kanban-card-tools.js.map +1 -1
- package/dist/tools/kanban-gate-tools.d.ts +14 -2
- package/dist/tools/kanban-gate-tools.d.ts.map +1 -1
- package/dist/tools/kanban-gate-tools.js +78 -77
- package/dist/tools/kanban-gate-tools.js.map +1 -1
- package/dist/tools/kanban-grooming-tools.d.ts +12 -0
- package/dist/tools/kanban-grooming-tools.d.ts.map +1 -1
- package/dist/tools/kanban-grooming-tools.js +58 -137
- package/dist/tools/kanban-grooming-tools.js.map +1 -1
- package/dist/tools/kanban-sprint-tools.d.ts +35 -0
- package/dist/tools/kanban-sprint-tools.d.ts.map +1 -0
- package/dist/tools/kanban-sprint-tools.js +295 -0
- package/dist/tools/kanban-sprint-tools.js.map +1 -0
- package/dist/tools/pipeline-tools.d.ts +22 -6
- package/dist/tools/pipeline-tools.d.ts.map +1 -1
- package/dist/tools/pipeline-tools.js +306 -324
- package/dist/tools/pipeline-tools.js.map +1 -1
- package/dist/tools/rag-tools.d.ts +19 -0
- package/dist/tools/rag-tools.d.ts.map +1 -1
- package/dist/tools/rag-tools.js +79 -22
- package/dist/tools/rag-tools.js.map +1 -1
- package/dist/tools/token-metrics-tools.d.ts +23 -93
- package/dist/tools/token-metrics-tools.d.ts.map +1 -1
- package/dist/tools/token-metrics-tools.js +249 -199
- package/dist/tools/token-metrics-tools.js.map +1 -1
- package/dist/tools/vault-manage-tool.d.ts +18 -0
- package/dist/tools/vault-manage-tool.d.ts.map +1 -1
- package/dist/tools/vault-manage-tool.js +83 -156
- package/dist/tools/vault-manage-tool.js.map +1 -1
- package/dist/tools/vault-tools.d.ts +25 -0
- package/dist/tools/vault-tools.d.ts.map +1 -1
- package/dist/tools/vault-tools.js +218 -161
- package/dist/tools/vault-tools.js.map +1 -1
- package/dist/tools/workspace-registry-tools.d.ts +20 -88
- package/dist/tools/workspace-registry-tools.d.ts.map +1 -1
- package/dist/tools/workspace-registry-tools.js +78 -83
- package/dist/tools/workspace-registry-tools.js.map +1 -1
- package/package.json +11 -8
- package/scripts/setup/link-local.js +120 -0
- package/scripts/setup/setup-linux.sh +16 -6
- package/scripts/setup/setup-macos.sh +16 -6
- package/scripts/setup/setup-wsl.sh +23 -9
- package/templates/agents-md.template.md +130 -237
- package/templates/commands/jarvis-agents-md-file.md +7 -0
- package/dist/application/azure-sync/index.d.ts +0 -18
- package/dist/application/azure-sync/index.d.ts.map +0 -1
- package/dist/application/azure-sync/index.js +0 -11
- package/dist/application/azure-sync/index.js.map +0 -1
- package/dist/application/config/index.d.ts +0 -7
- package/dist/application/config/index.d.ts.map +0 -1
- package/dist/application/config/index.js +0 -6
- package/dist/application/config/index.js.map +0 -1
- package/dist/application/environment/dtos.d.ts +0 -74
- package/dist/application/environment/dtos.d.ts.map +0 -1
- package/dist/application/environment/dtos.js +0 -10
- package/dist/application/environment/dtos.js.map +0 -1
- package/dist/application/mcp/index.d.ts +0 -10
- package/dist/application/mcp/index.d.ts.map +0 -1
- package/dist/application/mcp/index.js +0 -8
- package/dist/application/mcp/index.js.map +0 -1
- package/dist/application/mcp/middleware.d.ts +0 -91
- package/dist/application/mcp/middleware.d.ts.map +0 -1
- package/dist/application/mcp/middleware.js +0 -84
- package/dist/application/mcp/middleware.js.map +0 -1
- package/dist/application/mcp/tool-adapter.d.ts +0 -72
- package/dist/application/mcp/tool-adapter.d.ts.map +0 -1
- package/dist/application/mcp/tool-adapter.js +0 -132
- package/dist/application/mcp/tool-adapter.js.map +0 -1
- package/dist/application/pipeline/index.d.ts +0 -8
- package/dist/application/pipeline/index.d.ts.map +0 -1
- package/dist/application/pipeline/index.js +0 -7
- package/dist/application/pipeline/index.js.map +0 -1
- package/dist/application/wiki-feedback/poll-service.d.ts +0 -56
- package/dist/application/wiki-feedback/poll-service.d.ts.map +0 -1
- package/dist/application/wiki-feedback/poll-service.js +0 -87
- package/dist/application/wiki-feedback/poll-service.js.map +0 -1
- package/dist/application/wiki-feedback/use-cases.d.ts +0 -115
- package/dist/application/wiki-feedback/use-cases.d.ts.map +0 -1
- package/dist/application/wiki-feedback/use-cases.js +0 -271
- package/dist/application/wiki-feedback/use-cases.js.map +0 -1
- package/dist/cli/config-wizard.d.ts +0 -14
- package/dist/cli/config-wizard.d.ts.map +0 -1
- package/dist/cli/config-wizard.js +0 -120
- package/dist/cli/config-wizard.js.map +0 -1
- package/dist/cli/section-editors.d.ts +0 -33
- package/dist/cli/section-editors.d.ts.map +0 -1
- package/dist/cli/section-editors.js +0 -286
- package/dist/cli/section-editors.js.map +0 -1
- package/dist/cli/wizard-prompts.d.ts +0 -76
- package/dist/cli/wizard-prompts.d.ts.map +0 -1
- package/dist/cli/wizard-prompts.js +0 -98
- package/dist/cli/wizard-prompts.js.map +0 -1
- package/dist/domain/azure-sync/index.d.ts +0 -16
- package/dist/domain/azure-sync/index.d.ts.map +0 -1
- package/dist/domain/azure-sync/index.js +0 -14
- package/dist/domain/azure-sync/index.js.map +0 -1
- package/dist/domain/config/index.d.ts +0 -9
- package/dist/domain/config/index.d.ts.map +0 -1
- package/dist/domain/config/index.js +0 -7
- package/dist/domain/config/index.js.map +0 -1
- package/dist/domain/domain-map/repositories.d.ts +0 -126
- package/dist/domain/domain-map/repositories.d.ts.map +0 -1
- package/dist/domain/domain-map/repositories.js +0 -2
- package/dist/domain/domain-map/repositories.js.map +0 -1
- package/dist/domain/vault/canvas.d.ts +0 -70
- package/dist/domain/vault/canvas.d.ts.map +0 -1
- package/dist/domain/vault/canvas.js +0 -70
- package/dist/domain/vault/canvas.js.map +0 -1
- package/dist/domain/vault/timeline.d.ts +0 -53
- package/dist/domain/vault/timeline.d.ts.map +0 -1
- package/dist/domain/vault/timeline.js +0 -214
- package/dist/domain/vault/timeline.js.map +0 -1
- package/dist/domain/wiki-feedback/entities.d.ts +0 -101
- package/dist/domain/wiki-feedback/entities.d.ts.map +0 -1
- package/dist/domain/wiki-feedback/entities.js +0 -154
- package/dist/domain/wiki-feedback/entities.js.map +0 -1
- package/dist/domain/wiki-feedback/index.d.ts +0 -13
- package/dist/domain/wiki-feedback/index.d.ts.map +0 -1
- package/dist/domain/wiki-feedback/index.js +0 -11
- package/dist/domain/wiki-feedback/index.js.map +0 -1
- package/dist/domain/wiki-feedback/ports.d.ts +0 -47
- package/dist/domain/wiki-feedback/ports.d.ts.map +0 -1
- package/dist/domain/wiki-feedback/ports.js +0 -13
- package/dist/domain/wiki-feedback/ports.js.map +0 -1
- package/dist/domain/wiki-feedback/repositories.d.ts +0 -33
- package/dist/domain/wiki-feedback/repositories.d.ts.map +0 -1
- package/dist/domain/wiki-feedback/repositories.js +0 -12
- package/dist/domain/wiki-feedback/repositories.js.map +0 -1
- package/dist/domain/wiki-feedback/value-objects.d.ts +0 -74
- package/dist/domain/wiki-feedback/value-objects.d.ts.map +0 -1
- package/dist/domain/wiki-feedback/value-objects.js +0 -144
- package/dist/domain/wiki-feedback/value-objects.js.map +0 -1
- package/dist/infrastructure/azure-sync/index.d.ts +0 -10
- package/dist/infrastructure/azure-sync/index.d.ts.map +0 -1
- package/dist/infrastructure/azure-sync/index.js +0 -13
- package/dist/infrastructure/azure-sync/index.js.map +0 -1
- package/dist/infrastructure/config/index.d.ts +0 -6
- package/dist/infrastructure/config/index.d.ts.map +0 -1
- package/dist/infrastructure/config/index.js +0 -6
- package/dist/infrastructure/config/index.js.map +0 -1
- package/dist/infrastructure/wiki-feedback/azure-wiki-client.d.ts +0 -36
- package/dist/infrastructure/wiki-feedback/azure-wiki-client.d.ts.map +0 -1
- package/dist/infrastructure/wiki-feedback/azure-wiki-client.js +0 -106
- package/dist/infrastructure/wiki-feedback/azure-wiki-client.js.map +0 -1
- package/dist/infrastructure/wiki-feedback/sqlite-feedback-repository.d.ts +0 -31
- package/dist/infrastructure/wiki-feedback/sqlite-feedback-repository.d.ts.map +0 -1
- package/dist/infrastructure/wiki-feedback/sqlite-feedback-repository.js +0 -149
- package/dist/infrastructure/wiki-feedback/sqlite-feedback-repository.js.map +0 -1
- package/dist/mcp-server.d.ts +0 -3
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mcp-server.js +0 -373
- package/dist/mcp-server.js.map +0 -1
- package/dist/tools/wiki-feedback-tools.d.ts +0 -9
- package/dist/tools/wiki-feedback-tools.d.ts.map +0 -1
- package/dist/tools/wiki-feedback-tools.js +0 -189
- package/dist/tools/wiki-feedback-tools.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,635 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* JARVIS OpenCode Plugin — Entry Point
|
|
3
|
+
*
|
|
4
|
+
* Thin orchestrator: delegates to composition factories.
|
|
5
|
+
* All wiring details live in src/composition/*.
|
|
6
|
+
*
|
|
7
|
+
* Architecture: DDD with SOLID principles
|
|
8
|
+
* - Domain layer: pure business logic, zero external deps
|
|
9
|
+
* - Application layer: use cases with DTOs
|
|
10
|
+
* - Infrastructure layer: SQLite repos, Vectra/Ollama adapters
|
|
11
|
+
* - Tools layer: OpenCode tool() definitions (thin adapters)
|
|
12
|
+
* - Hooks layer: guardrails, compacting, events
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync } from "node:fs";
|
|
2
15
|
import { basename, join } from "node:path";
|
|
3
|
-
import { WorkspaceId } from "./domain/shared/value-objects.js";
|
|
4
|
-
import { SqliteAdapter } from "./infrastructure/database/sqlite-adapter.js";
|
|
5
|
-
import { SqliteSessionRepository } from "./infrastructure/context-memory/session-repository.js";
|
|
6
|
-
import { SqliteTodoRepository } from "./infrastructure/context-memory/todo-repository.js";
|
|
7
|
-
import { SqliteNoteRepository } from "./infrastructure/context-memory/note-repository.js";
|
|
8
|
-
import { createSimpleSearchRepo } from "./infrastructure/context-memory/search-repository.js";
|
|
9
|
-
import { SqliteExecutionJournalRepository } from "./infrastructure/context-memory/execution-journal-repository.js";
|
|
10
|
-
import { SqliteCardRepository } from "./infrastructure/kanban/card-repository.js";
|
|
11
|
-
import { SqliteSprintRepository, SqliteEpicRepository } from "./infrastructure/kanban/sprint-repository.js";
|
|
12
|
-
import { SessionDomainService, TodoDomainService, NoteDomainService, ContextSearchService } from "./domain/context-memory/services.js";
|
|
13
|
-
import { CardDomainService } from "./domain/kanban/services.js";
|
|
14
|
-
import { CardStatus, SprintId } from "./domain/kanban/value-objects.js";
|
|
15
|
-
import { DEFAULT_POLICIES } from "./domain/governance/policies.js";
|
|
16
|
-
import { PolicyValidationService } from "./domain/governance/services.js";
|
|
17
|
-
import { SessionUseCases } from "./application/context-memory/session-use-cases.js";
|
|
18
|
-
import { TodoUseCases } from "./application/context-memory/todo-use-cases.js";
|
|
19
|
-
import { NoteUseCases } from "./application/context-memory/note-use-cases.js";
|
|
20
|
-
import { ExecutionJournalUseCases } from "./application/context-memory/execution-journal-use-cases.js";
|
|
21
|
-
import { CardUseCases } from "./application/kanban/card-use-cases.js";
|
|
22
|
-
import { SprintUseCases, EpicUseCases } from "./application/kanban/sprint-use-cases.js";
|
|
23
|
-
import { BoardUseCases } from "./application/kanban/board-use-cases.js";
|
|
24
|
-
import { GovernanceUseCases } from "./application/governance/validation-use-cases.js";
|
|
25
|
-
import { SqliteTokenMetricsRepository } from "./infrastructure/token-metrics/token-metrics-repository.js";
|
|
26
|
-
import { TokenMetricsUseCases } from "./application/token-metrics/tracking-use-cases.js";
|
|
27
|
-
import { VaultFsAdapter } from "./infrastructure/vault/vault-fs-adapter.js";
|
|
28
|
-
import { VaultUseCases } from "./application/vault/use-cases.js";
|
|
29
|
-
import { VaultManager } from "./application/vault/vault-manager.js";
|
|
30
|
-
import { VectraVectorRepository } from "./infrastructure/rag/vectra-adapter.js";
|
|
31
|
-
import { OllamaEmbeddingProvider } from "./infrastructure/rag/ollama-embeddings.js";
|
|
32
|
-
import { LangchainTextSplitter } from "./infrastructure/rag/text-splitter.js";
|
|
33
|
-
import { FileSystemDiscovery } from "./infrastructure/rag/file-discovery.js";
|
|
34
|
-
import { JsonFileIndexRegistry } from "./infrastructure/rag/file-index-registry.js";
|
|
35
|
-
import { RagUseCases } from "./application/rag/use-cases.js";
|
|
36
|
-
import { OracleUseCases } from "./application/rag/oracle-use-cases.js";
|
|
37
|
-
import { LspClientAdapter } from "./infrastructure/domain-map/lsp-adapter.js";
|
|
38
|
-
import { LlmSemanticAnalyzer } from "./infrastructure/domain-map/llm-analyzer.js";
|
|
39
|
-
import { FileProjectScanner } from "./infrastructure/domain-map/project-scanner.js";
|
|
40
|
-
import { createLlmPromptFn } from "./infrastructure/domain-map/llm-prompt-factory.js";
|
|
41
|
-
import { SqliteAgentProfileRepository } from "./infrastructure/agent-registry/agent-profile-repository.js";
|
|
42
|
-
import { OpencodeAgentSessionAdapter } from "./infrastructure/agent-registry/agent-session-adapter.js";
|
|
43
16
|
import { BUILT_IN_PROFILES } from "./infrastructure/agent-registry/built-in-profiles.js";
|
|
44
|
-
import { AgentRegistryService } from "./domain/agent-registry/services.js";
|
|
45
|
-
import { AgentRegistryUseCases } from "./application/agent-registry/use-cases.js";
|
|
46
|
-
import { DomainMapUseCases } from "./application/domain-map/use-cases.js";
|
|
47
|
-
import { SqliteWorkspaceRegistryRepository } from "./infrastructure/workspace-registry/workspace-repository.js";
|
|
48
|
-
import { SqliteWorkspaceDependencyRepository } from "./infrastructure/workspace-registry/dependency-repository.js";
|
|
49
|
-
import { WorkspaceRegistryService } from "./domain/workspace-registry/services.js";
|
|
50
|
-
import { resolveJarvisHome } from "./domain/workspace-registry/value-objects.js";
|
|
51
|
-
import { WorkspaceRegistryUseCases } from "./application/workspace-registry/use-cases.js";
|
|
52
|
-
import { SqliteEnvironmentRepository } from "./infrastructure/environment/environment-repository.js";
|
|
53
|
-
import { EnvironmentScannerAdapter } from "./infrastructure/environment/scanner-adapter.js";
|
|
54
|
-
import { EnvironmentDomainService } from "./domain/environment/services.js";
|
|
55
|
-
import { YamlConfigRepository } from "./infrastructure/config/yaml-config-repository.js";
|
|
56
|
-
import { YamlConfigWriter } from "./infrastructure/config/yaml-config-writer.js";
|
|
57
|
-
import { ConfigService } from "./application/config/config-service.js";
|
|
58
|
-
import { ConfigWriteService } from "./application/config/config-write-service.js";
|
|
59
|
-
import { SqlitePipelineRepository, InMemoryPipelineTemplateRegistry, DaggerCliAdapter, DaggerScaffoldGenerator } from "./infrastructure/pipeline/index.js";
|
|
60
|
-
import { PipelineFactory, GateEnforcer } from "./domain/pipeline/services.js";
|
|
61
|
-
import { PipelineId } from "./domain/pipeline/value-objects.js";
|
|
62
|
-
import { PipelineUseCases } from "./application/pipeline/use-cases.js";
|
|
63
|
-
import { EnvironmentUseCases } from "./application/environment/use-cases.js";
|
|
64
|
-
import { createContextMemoryTools } from "./tools/context-memory-tools.js";
|
|
65
|
-
import { createKanbanCardTools } from "./tools/kanban-card-tools.js";
|
|
66
|
-
import { createKanbanGroomingTools } from "./tools/kanban-grooming-tools.js";
|
|
67
|
-
import { createKanbanGateTools } from "./tools/kanban-gate-tools.js";
|
|
68
|
-
import { createKanbanBoardTools } from "./tools/kanban-board-tools.js";
|
|
69
|
-
import { createGovernanceTools } from "./tools/governance-tools.js";
|
|
70
|
-
import { createRagTools } from "./tools/rag-tools.js";
|
|
71
|
-
import { createDataTools } from "./tools/data-tools.js";
|
|
72
|
-
import { createAgentTools } from "./tools/agent-tools.js";
|
|
73
|
-
import { createVaultTools } from "./tools/vault-tools.js";
|
|
74
|
-
import { createVaultManageTool } from "./tools/vault-manage-tool.js";
|
|
75
|
-
import { createDomainMapTools } from "./tools/domain-map-tools.js";
|
|
76
|
-
import { createWorkspaceRegistryTools } from "./tools/workspace-registry-tools.js";
|
|
77
|
-
import { createEnvironmentTools } from "./tools/environment-tools.js";
|
|
78
|
-
import { createTokenMetricsTools } from "./tools/token-metrics-tools.js";
|
|
79
|
-
import { createAgentRegistryTools } from "./tools/agent-registry-tools.js";
|
|
80
|
-
import { createPipelineTools } from "./tools/pipeline-tools.js";
|
|
81
|
-
import { AzureSyncUseCases } from "./application/azure-sync/push-use-cases.js";
|
|
82
|
-
import { AzureSyncPullUseCases } from "./application/azure-sync/pull-use-cases.js";
|
|
83
|
-
import { AzurePrUseCases } from "./application/azure-sync/pr-use-cases.js";
|
|
84
|
-
import { AzureDevOpsClient } from "./infrastructure/azure-sync/azure-devops-client.js";
|
|
85
|
-
import { SqliteSyncRepository } from "./infrastructure/azure-sync/sqlite-sync-repository.js";
|
|
86
|
-
import { SqliteSyncEventRepository } from "./infrastructure/azure-sync/sqlite-event-repository.js";
|
|
87
|
-
import { AzurePollService, SyncEventUseCases } from "./application/azure-sync/poll-service.js";
|
|
88
|
-
import { createAzureSyncTools } from "./tools/azure-sync-tools.js";
|
|
89
|
-
import { createAzureSyncEventTools } from "./tools/azure-sync-event-tools.js";
|
|
90
|
-
import { createBootstrapTools } from "./tools/bootstrap-tools.js";
|
|
91
|
-
import { createConfigTools } from "./tools/config-tools.js";
|
|
92
|
-
import { createWikiFeedbackTools } from "./tools/wiki-feedback-tools.js";
|
|
93
|
-
import { BootstrapUseCases, HealthcheckUseCases, TerminalCommandsUseCases } from "./application/bootstrap/index.js";
|
|
94
|
-
import { SqliteWikiFeedbackRepository } from "./infrastructure/wiki-feedback/sqlite-feedback-repository.js";
|
|
95
|
-
import { AzureWikiClient } from "./infrastructure/wiki-feedback/azure-wiki-client.js";
|
|
96
|
-
import { WikiFeedbackUseCases } from "./application/wiki-feedback/use-cases.js";
|
|
97
|
-
import { WikiFeedbackPollService } from "./application/wiki-feedback/poll-service.js";
|
|
98
|
-
// Hooks
|
|
99
|
-
import { createCompactingHook } from "./hooks/context-compacting.js";
|
|
100
|
-
import { createShellEnvHook } from "./hooks/shell-env.js";
|
|
101
|
-
import { createGuardrailsHook } from "./hooks/guardrails.js";
|
|
102
|
-
import { createEventHook } from "./hooks/event-handlers.js";
|
|
103
|
-
import { createFirstRunGuideHook } from "./hooks/first-run-guide.js";
|
|
104
|
-
import { createConfigCommandHook } from "./hooks/config-command.js";
|
|
105
|
-
import { createSlashCommandsHook } from "./hooks/slash-commands.js";
|
|
106
|
-
import { createExecutionJournalHooks } from "./hooks/execution-journal.js";
|
|
107
17
|
import { PluginLogger } from "./hooks/logger.js";
|
|
18
|
+
import { buildInfrastructure } from "./composition/infrastructure.js";
|
|
19
|
+
import { buildServices } from "./composition/services.js";
|
|
20
|
+
import { buildAllTools } from "./composition/tools.js";
|
|
21
|
+
import { buildHooks } from "./composition/hooks.js";
|
|
108
22
|
/**
|
|
109
23
|
* Derive workspace name from directory path.
|
|
110
|
-
* Uses the last segment
|
|
24
|
+
* Uses the last path segment, uppercased.
|
|
111
25
|
* e.g., "/Users/dev/projects/my-app" -> "MY-APP"
|
|
112
26
|
*/
|
|
113
27
|
function getWorkspace(directory) {
|
|
114
|
-
|
|
115
|
-
return name.toUpperCase();
|
|
28
|
+
return basename(directory).toUpperCase();
|
|
116
29
|
}
|
|
117
30
|
export const JarvisPlugin = async (input) => {
|
|
118
31
|
const log = new PluginLogger(input.client);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
let db;
|
|
123
|
-
let registryDb;
|
|
124
|
-
let configService;
|
|
125
|
-
let configWriteService;
|
|
32
|
+
const wsName = getWorkspace(input.directory);
|
|
33
|
+
// ── Infrastructure ─────────────────────────────────────────────────
|
|
34
|
+
let infra;
|
|
126
35
|
try {
|
|
127
|
-
|
|
128
|
-
// Ensure obsidian-vault skeleton exists early — before bootstrap — so vault
|
|
129
|
-
// tools work even if the full bootstrap fails for any reason (CD-026).
|
|
130
|
-
const vaultDir = join(input.directory, "obsidian-vault");
|
|
131
|
-
for (const sub of ["", "09-Dashboards", "11-Domain-Reference", "12-Scope-Docs"]) {
|
|
132
|
-
mkdirSync(join(vaultDir, sub), { recursive: true });
|
|
133
|
-
}
|
|
134
|
-
db = new SqliteAdapter({ path: dbPath });
|
|
135
|
-
const jarvisHome = resolveJarvisHome();
|
|
136
|
-
mkdirSync(jarvisHome, { recursive: true });
|
|
137
|
-
registryDb = new SqliteAdapter({ path: join(jarvisHome, "registry.db") });
|
|
138
|
-
const configPath = join(input.directory, "config", "jarvis.yaml");
|
|
139
|
-
const configRepo = new YamlConfigRepository(configPath);
|
|
140
|
-
configService = new ConfigService(configRepo);
|
|
141
|
-
configWriteService = new ConfigWriteService(configRepo, new YamlConfigWriter(configPath));
|
|
36
|
+
infra = buildInfrastructure(input.directory, wsName, input.client);
|
|
142
37
|
}
|
|
143
38
|
catch (err) {
|
|
144
|
-
log.exception("Failed to initialize infrastructure or config", err, {
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
// ── Repository Layer ──────────────────────────────────────────────
|
|
148
|
-
const sessionRepo = new SqliteSessionRepository(db);
|
|
149
|
-
const todoRepo = new SqliteTodoRepository(db);
|
|
150
|
-
const noteRepo = new SqliteNoteRepository(db);
|
|
151
|
-
const executionJournalRepo = new SqliteExecutionJournalRepository(db);
|
|
152
|
-
const searchRepo = createSimpleSearchRepo(todoRepo, noteRepo);
|
|
153
|
-
const cardRepo = new SqliteCardRepository(db);
|
|
154
|
-
const sprintRepo = new SqliteSprintRepository(db);
|
|
155
|
-
const epicRepo = new SqliteEpicRepository(db);
|
|
156
|
-
const tokenMetricsRepo = new SqliteTokenMetricsRepository(db);
|
|
157
|
-
const workspaceRegistryRepo = new SqliteWorkspaceRegistryRepository(registryDb);
|
|
158
|
-
const workspaceDependencyRepo = new SqliteWorkspaceDependencyRepository(registryDb);
|
|
159
|
-
const wsId = WorkspaceId.create(getWorkspace(input.directory));
|
|
160
|
-
const environmentRepo = new SqliteEnvironmentRepository(db, wsId);
|
|
161
|
-
const agentProfileRepo = new SqliteAgentProfileRepository(db);
|
|
162
|
-
const agentSessionAdapter = new OpencodeAgentSessionAdapter(input.client);
|
|
163
|
-
const vaultRepo = new VaultFsAdapter(join(jarvisDir, "..", "obsidian-vault"));
|
|
164
|
-
// ── Domain Service Layer ──────────────────────────────────────────
|
|
165
|
-
// Context Memory
|
|
166
|
-
const sessionService = new SessionDomainService(sessionRepo);
|
|
167
|
-
const todoService = new TodoDomainService(todoRepo);
|
|
168
|
-
const noteService = new NoteDomainService(noteRepo);
|
|
169
|
-
const searchService = new ContextSearchService(searchRepo);
|
|
170
|
-
// Kanban — Gate config port bridges config BC to kanban domain
|
|
171
|
-
const kanbanConfig = configService.getKanbanConfig();
|
|
172
|
-
const gateConfigPort = {
|
|
173
|
-
getGateDefinitions(phase) {
|
|
174
|
-
const defs = kanbanConfig.gateTasks[phase];
|
|
175
|
-
return defs ?? [];
|
|
176
|
-
},
|
|
177
|
-
getMinTransitionIntervalSecs() {
|
|
178
|
-
return kanbanConfig.minTransitionIntervalSecs;
|
|
179
|
-
},
|
|
180
|
-
};
|
|
181
|
-
const cardService = new CardDomainService(cardRepo, gateConfigPort);
|
|
182
|
-
// Governance
|
|
183
|
-
const validationService = new PolicyValidationService(DEFAULT_POLICIES);
|
|
184
|
-
// Workspace Registry
|
|
185
|
-
const workspaceRegistryService = new WorkspaceRegistryService(workspaceRegistryRepo, workspaceDependencyRepo);
|
|
186
|
-
// Environment
|
|
187
|
-
const environmentService = new EnvironmentDomainService(environmentRepo);
|
|
188
|
-
// Agent Registry
|
|
189
|
-
const agentRegistryService = new AgentRegistryService(agentProfileRepo);
|
|
190
|
-
// Pipeline
|
|
191
|
-
const pipelineRepo = new SqlitePipelineRepository(db);
|
|
192
|
-
const templateRepo = new InMemoryPipelineTemplateRegistry();
|
|
193
|
-
const daggerPort = new DaggerCliAdapter();
|
|
194
|
-
const scaffoldPort = new DaggerScaffoldGenerator();
|
|
195
|
-
const pipelineFactory = new PipelineFactory(pipelineRepo, templateRepo);
|
|
196
|
-
const gateEnforcer = new GateEnforcer(pipelineRepo);
|
|
197
|
-
// ── Application Use Case Layer ────────────────────────────────────
|
|
198
|
-
// Context Memory
|
|
199
|
-
const sessionUseCases = new SessionUseCases(sessionService);
|
|
200
|
-
const todoUseCases = new TodoUseCases(todoService, todoRepo);
|
|
201
|
-
const noteUseCases = new NoteUseCases(noteService, searchService);
|
|
202
|
-
const executionJournalUseCases = new ExecutionJournalUseCases(executionJournalRepo);
|
|
203
|
-
// Token Metrics (created before kanban to allow cross-context callback)
|
|
204
|
-
const tmConfig = configService.getTokenMetricsConfig();
|
|
205
|
-
const sprintStats = { async resolve(sid) {
|
|
206
|
-
const cards = await cardRepo.findBySprint(SprintId.from(sid));
|
|
207
|
-
if (cards.length === 0)
|
|
208
|
-
return undefined;
|
|
209
|
-
let pts = 0, est = 0;
|
|
210
|
-
for (const c of cards) {
|
|
211
|
-
if (c.storyPoints !== undefined) {
|
|
212
|
-
pts += c.storyPoints;
|
|
213
|
-
est++;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
return { totalStoryPoints: pts, estimatedCardCount: est };
|
|
217
|
-
} };
|
|
218
|
-
const tokenMetricsUseCases = new TokenMetricsUseCases(tokenMetricsRepo, {
|
|
219
|
-
sprintStatsProvider: sprintStats,
|
|
220
|
-
dashboardConfig: { sprintBudgetUsd: tmConfig.sprintBudgetUsd, budgetAlertThreshold: tmConfig.budgetAlertThreshold },
|
|
221
|
-
});
|
|
222
|
-
// Kanban
|
|
223
|
-
const pipelineStatusProvider = async (id) => (await pipelineRepo.findById(PipelineId.from(id)))?.status;
|
|
224
|
-
const wsName = getWorkspace(input.directory);
|
|
225
|
-
const onCardDone = async (info) => {
|
|
226
|
-
try {
|
|
227
|
-
const report = await tokenMetricsUseCases.getCardReport({
|
|
228
|
-
workspace: wsName,
|
|
229
|
-
cardId: info.cardId,
|
|
230
|
-
});
|
|
231
|
-
if (report.success && report.data.length > 0) {
|
|
232
|
-
const card = report.data[0];
|
|
233
|
-
const agentReport = await tokenMetricsUseCases.getAgentReport({
|
|
234
|
-
workspace: wsName,
|
|
235
|
-
});
|
|
236
|
-
const cardAgents = agentReport.success
|
|
237
|
-
? agentReport.data.filter((a) => a.totalTokens > 0)
|
|
238
|
-
: [];
|
|
239
|
-
log.info(`Card ${info.cardId} cost summary`, {
|
|
240
|
-
totalTokens: card.totalTokens,
|
|
241
|
-
costUsd: `$${card.totalCostUsd.toFixed(4)}`,
|
|
242
|
-
records: card.recordCount,
|
|
243
|
-
agents: card.agentCount,
|
|
244
|
-
...(info.storyPoints !== undefined
|
|
245
|
-
? { costPerPoint: `$${(card.totalCostUsd / info.storyPoints).toFixed(4)}` }
|
|
246
|
-
: {}),
|
|
247
|
-
agentBreakdown: cardAgents.map((a) => `${a.agent}: ${a.totalTokens} tokens / $${a.totalCostUsd.toFixed(4)}`),
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
catch {
|
|
252
|
-
// Fire-and-forget — never block card transition
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
const cardUseCases = new CardUseCases(cardRepo, cardService, pipelineStatusProvider, onCardDone);
|
|
256
|
-
const sprintUseCases = new SprintUseCases(sprintRepo);
|
|
257
|
-
const epicUseCases = new EpicUseCases(epicRepo);
|
|
258
|
-
const boardUseCases = new BoardUseCases(cardRepo, cardService);
|
|
259
|
-
// Governance
|
|
260
|
-
const governanceUseCases = new GovernanceUseCases(validationService);
|
|
261
|
-
// Vault
|
|
262
|
-
const vaultUseCases = new VaultUseCases(vaultRepo);
|
|
263
|
-
const vaultManager = new VaultManager(vaultRepo, vaultUseCases);
|
|
264
|
-
// Workspace Registry
|
|
265
|
-
const workspaceRegistryUseCases = new WorkspaceRegistryUseCases(workspaceRegistryService);
|
|
266
|
-
// Agent Registry
|
|
267
|
-
const agentRegistryUseCases = new AgentRegistryUseCases(agentRegistryService, agentSessionAdapter);
|
|
268
|
-
// Pipeline
|
|
269
|
-
const pipelineUseCases = new PipelineUseCases(pipelineRepo, templateRepo, pipelineFactory, gateEnforcer, daggerPort, scaffoldPort, async (e) => {
|
|
270
|
-
await tokenMetricsUseCases.recordUsage({
|
|
271
|
-
workspace: getWorkspace(input.directory), toolName: "pipeline-run", agent: "pipeline",
|
|
272
|
-
inputTokens: 0, outputTokens: 0, model: "dagger", operation: "pipeline-gate",
|
|
273
|
-
...(e.cardId !== undefined ? { cardId: e.cardId } : {}),
|
|
274
|
-
metadata: { pipelineId: e.pipelineId, gateId: e.gateId, success: e.success, durationMs: e.durationMs },
|
|
39
|
+
log.exception("Failed to initialize infrastructure or config", err, {
|
|
40
|
+
directory: input.directory,
|
|
275
41
|
});
|
|
276
|
-
|
|
277
|
-
// Environment (use cases created after projectScanner, see below)
|
|
278
|
-
// ── Tools ─────────────────────────────────────────────────────────
|
|
279
|
-
const contextMemoryTools = createContextMemoryTools({ sessionUseCases, todoUseCases, noteUseCases, getWorkspace });
|
|
280
|
-
const kanbanCardTools = createKanbanCardTools({ cardUseCases, sprintUseCases, epicUseCases, getWorkspace });
|
|
281
|
-
const kanbanGroomingTools = createKanbanGroomingTools({ cardUseCases });
|
|
282
|
-
const kanbanGateTools = createKanbanGateTools({ cardUseCases });
|
|
283
|
-
const kanbanBoardTools = createKanbanBoardTools({ sprintUseCases, epicUseCases, boardUseCases, getWorkspace });
|
|
284
|
-
const governanceTools = createGovernanceTools({ governanceUseCases });
|
|
285
|
-
// RAG Infrastructure (native TypeScript — Vectra + Ollama + TextSplitters)
|
|
286
|
-
const ragConfig = configService.getRagConfig();
|
|
287
|
-
const ragPersistRoot = join(jarvisDir, "rag");
|
|
288
|
-
mkdirSync(ragPersistRoot, { recursive: true });
|
|
289
|
-
const embeddingProvider = new OllamaEmbeddingProvider(ragConfig.ollama.url, ragConfig.ollama.model, ragConfig.ollama.dimensions);
|
|
290
|
-
const vectorRepository = new VectraVectorRepository(ragPersistRoot, ragConfig.ollama.model);
|
|
291
|
-
const textSplitter = new LangchainTextSplitter();
|
|
292
|
-
const fileDiscovery = new FileSystemDiscovery();
|
|
293
|
-
const fileIndexRegistry = new JsonFileIndexRegistry(ragPersistRoot);
|
|
294
|
-
const ragUseCases = new RagUseCases({
|
|
295
|
-
embeddingProvider,
|
|
296
|
-
vectorRepository,
|
|
297
|
-
textSplitter,
|
|
298
|
-
fileDiscovery,
|
|
299
|
-
ragConfig,
|
|
300
|
-
fileIndexRegistry,
|
|
301
|
-
});
|
|
302
|
-
const oracleUseCases = new OracleUseCases({
|
|
303
|
-
embeddingProvider,
|
|
304
|
-
vectorRepository,
|
|
305
|
-
textSplitter,
|
|
306
|
-
fileDiscovery,
|
|
307
|
-
});
|
|
308
|
-
const ragTools = createRagTools({
|
|
309
|
-
ragUseCases,
|
|
310
|
-
oracleUseCases,
|
|
311
|
-
getWorkspace,
|
|
312
|
-
});
|
|
313
|
-
// Data Tools (pure TypeScript, no bridge needed)
|
|
314
|
-
const dataTools = createDataTools();
|
|
315
|
-
// Vault Tools (filesystem-based Obsidian vault operations)
|
|
316
|
-
const vaultTools = createVaultTools({
|
|
317
|
-
vaultUseCases,
|
|
318
|
-
});
|
|
319
|
-
// Vault Manager Tool (smart facade for context-aware vault operations)
|
|
320
|
-
const vaultManageTool = createVaultManageTool({
|
|
321
|
-
vaultManager,
|
|
322
|
-
});
|
|
323
|
-
// Agent Communication Tools (inter-session via OpenCode SDK client)
|
|
324
|
-
const agentTools = createAgentTools({
|
|
325
|
-
client: input.client,
|
|
326
|
-
cardUseCases,
|
|
327
|
-
sprintUseCases,
|
|
328
|
-
epicUseCases,
|
|
329
|
-
});
|
|
330
|
-
// Domain Map Infrastructure + Application + Tools
|
|
331
|
-
const lspClient = new LspClientAdapter();
|
|
332
|
-
const projectScanner = new FileProjectScanner();
|
|
333
|
-
const llmPromptFn = createLlmPromptFn(input.client);
|
|
334
|
-
const llmAnalyzer = new LlmSemanticAnalyzer(llmPromptFn);
|
|
335
|
-
const domainMapUseCases = new DomainMapUseCases({
|
|
336
|
-
lspClient,
|
|
337
|
-
llmAnalyzer,
|
|
338
|
-
projectScanner,
|
|
339
|
-
});
|
|
340
|
-
const domainMapTools = createDomainMapTools({
|
|
341
|
-
domainMapUseCases,
|
|
342
|
-
workspaceRegistryUseCases,
|
|
343
|
-
getWorkspace,
|
|
344
|
-
});
|
|
345
|
-
// Workspace Registry Tools
|
|
346
|
-
const workspaceRegistryTools = createWorkspaceRegistryTools({
|
|
347
|
-
workspaceRegistryUseCases,
|
|
348
|
-
});
|
|
349
|
-
// Environment Management (uses projectScanner via adapter)
|
|
350
|
-
const environmentScanner = new EnvironmentScannerAdapter(projectScanner);
|
|
351
|
-
const environmentUseCases = new EnvironmentUseCases(environmentService, environmentScanner, getWorkspace(input.directory));
|
|
352
|
-
const environmentTools = createEnvironmentTools({
|
|
353
|
-
environmentUseCases,
|
|
354
|
-
});
|
|
355
|
-
// Token Metrics Tools (usage tracking, reports, cost estimation)
|
|
356
|
-
const tokenMetricsTools = createTokenMetricsTools({
|
|
357
|
-
tokenMetricsUseCases,
|
|
358
|
-
getWorkspace,
|
|
359
|
-
directory: input.directory,
|
|
360
|
-
});
|
|
361
|
-
// Agent Registry Tools (profile management + session spawning)
|
|
362
|
-
const agentRegistryTools = createAgentRegistryTools({
|
|
363
|
-
agentRegistryUseCases,
|
|
364
|
-
});
|
|
365
|
-
// Pipeline Tools (CI/CD pipeline lifecycle + gate operations)
|
|
366
|
-
const pipelineTools = createPipelineTools({
|
|
367
|
-
pipelineUseCases,
|
|
368
|
-
cardUseCases,
|
|
369
|
-
getWorkspace,
|
|
370
|
-
});
|
|
371
|
-
// Azure Sync
|
|
372
|
-
const azureSyncConfig = configService.getAzureSyncConfig();
|
|
373
|
-
const azureClient = new AzureDevOpsClient(azureSyncConfig.authMethod);
|
|
374
|
-
const syncRepo = new SqliteSyncRepository(db);
|
|
375
|
-
const azureSyncUseCases = new AzureSyncUseCases({
|
|
376
|
-
azureClient, syncMappingRepo: syncRepo, syncLogRepo: syncRepo,
|
|
377
|
-
cardUseCases, epicUseCases, sprintUseCases, configService,
|
|
378
|
-
});
|
|
379
|
-
const azureSyncPullUseCases = new AzureSyncPullUseCases({ azureClient, syncMappingRepo: syncRepo, syncLogRepo: syncRepo,
|
|
380
|
-
cardUseCases, epicUseCases, sprintUseCases, configService }, azureSyncUseCases);
|
|
381
|
-
const azurePrUseCases = new AzurePrUseCases({ azureClient, configService });
|
|
382
|
-
const azureSyncTools = createAzureSyncTools({
|
|
383
|
-
azureSyncUseCases, azureSyncPullUseCases, azurePrUseCases, getWorkspace,
|
|
384
|
-
defaultOrg: azureSyncConfig.organization,
|
|
385
|
-
defaultProject: azureSyncConfig.project,
|
|
386
|
-
defaultRepository: azureSyncConfig.repository,
|
|
387
|
-
});
|
|
388
|
-
const syncEventRepo = new SqliteSyncEventRepository(db);
|
|
389
|
-
const syncEventUseCases = new SyncEventUseCases(syncEventRepo);
|
|
390
|
-
let pollService;
|
|
391
|
-
if (azureSyncConfig.pollEnabled && azureSyncConfig.organization && azureSyncConfig.project) {
|
|
392
|
-
pollService = new AzurePollService({
|
|
393
|
-
azureClient, syncMappingRepo: syncRepo, syncEventRepo,
|
|
394
|
-
org: azureSyncConfig.organization, project: azureSyncConfig.project,
|
|
395
|
-
onChangesDetected: (n) => { log.info(`[Poll] ${n.summary}`, { eventCount: n.eventCount }); },
|
|
396
|
-
onError: (e) => { log.error(`[Poll] ${e}`); },
|
|
397
|
-
}, azureSyncConfig.pollIntervalSecs);
|
|
398
|
-
pollService.start();
|
|
399
|
-
}
|
|
400
|
-
const azureSyncEventTools = createAzureSyncEventTools({ syncEventUseCases, pollService });
|
|
401
|
-
// Wiki Feedback
|
|
402
|
-
const wikiFeedbackConfig = configService.getWikiFeedbackConfig();
|
|
403
|
-
const wikiFeedbackRepo = new SqliteWikiFeedbackRepository(db);
|
|
404
|
-
const wikiClient = new AzureWikiClient(azureSyncConfig.organization, azureSyncConfig.project, azureSyncConfig.authMethod);
|
|
405
|
-
const wikiFeedbackUseCases = new WikiFeedbackUseCases({
|
|
406
|
-
feedbackRepo: wikiFeedbackRepo,
|
|
407
|
-
wikiClient,
|
|
408
|
-
createCard: async (params) => {
|
|
409
|
-
const result = await cardUseCases.createCard({
|
|
410
|
-
title: params.title,
|
|
411
|
-
workspace: params.workspace,
|
|
412
|
-
...(params.priority !== undefined ? { priority: params.priority } : {}),
|
|
413
|
-
...(params.description !== undefined ? { description: params.description } : {}),
|
|
414
|
-
...(params.epicId !== undefined ? { epicId: params.epicId } : {}),
|
|
415
|
-
});
|
|
416
|
-
if (!result.success)
|
|
417
|
-
return { success: false, error: result.error };
|
|
418
|
-
return { success: true, data: { id: result.data.id } };
|
|
419
|
-
},
|
|
420
|
-
workspace: wsName,
|
|
421
|
-
wikiIdentifier: wikiFeedbackConfig.wikiIdentifier,
|
|
422
|
-
monitoredPages: wikiFeedbackConfig.monitoredPages,
|
|
423
|
-
autoReply: wikiFeedbackConfig.autoReply,
|
|
424
|
-
autoReplyPrefix: wikiFeedbackConfig.autoReplyPrefix,
|
|
425
|
-
});
|
|
426
|
-
let wikiPollService;
|
|
427
|
-
if (wikiFeedbackConfig.pollEnabled &&
|
|
428
|
-
wikiFeedbackConfig.wikiIdentifier &&
|
|
429
|
-
wikiFeedbackConfig.monitoredPages.length > 0) {
|
|
430
|
-
wikiPollService = new WikiFeedbackPollService({
|
|
431
|
-
useCases: wikiFeedbackUseCases,
|
|
432
|
-
onNewComments: (n) => { log.info(`[WikiPoll] ${n.summary}`, { newComments: n.newCommentsFound }); },
|
|
433
|
-
onError: (e) => { log.error(`[WikiPoll] ${e}`); },
|
|
434
|
-
}, wikiFeedbackConfig.pollIntervalSecs);
|
|
435
|
-
wikiPollService.start();
|
|
42
|
+
throw err;
|
|
436
43
|
}
|
|
437
|
-
|
|
438
|
-
useCases: wikiFeedbackUseCases,
|
|
439
|
-
...(wikiPollService !== undefined ? { pollService: wikiPollService } : {}),
|
|
440
|
-
});
|
|
441
|
-
// Bootstrap Tools (project initialization + healthcheck)
|
|
442
|
-
const bootstrapUseCases = new BootstrapUseCases();
|
|
443
|
-
const healthcheckUseCases = new HealthcheckUseCases({
|
|
444
|
-
ollamaUrl: ragConfig.ollama.url,
|
|
445
|
-
ollamaModel: ragConfig.ollama.model,
|
|
446
|
-
dbPath,
|
|
447
|
-
configPath: join(input.directory, "config", "jarvis.yaml"),
|
|
448
|
-
workspace: getWorkspace(input.directory),
|
|
449
|
-
getRagStatus: async (ws) => {
|
|
450
|
-
try {
|
|
451
|
-
const s = await ragUseCases.status({ workspace: ws });
|
|
452
|
-
if (s.success)
|
|
453
|
-
return { documentCount: s.data.documentCount };
|
|
454
|
-
return null;
|
|
455
|
-
}
|
|
456
|
-
catch {
|
|
457
|
-
return null;
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
});
|
|
461
|
-
const isNpmInstall = input.directory !== join(import.meta.dirname ?? "", "..");
|
|
44
|
+
// ── Services & Use Cases ───────────────────────────────────────────
|
|
462
45
|
const hasVault = existsSync(join(input.directory, "obsidian-vault"));
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
configWriteService,
|
|
478
|
-
});
|
|
479
|
-
// ── Auto-Registration ─────────────────────────────────────────────
|
|
480
|
-
// Register current workspace in the central registry on plugin boot.
|
|
481
|
-
// Fire-and-forget — does not block plugin startup.
|
|
482
|
-
workspaceRegistryUseCases.autoRegister(wsName, input.directory).catch((err) => {
|
|
483
|
-
log.exception("Workspace auto-registration failed", err, { workspace: wsName });
|
|
484
|
-
});
|
|
485
|
-
// Bootstrap built-in agent profiles (fire-and-forget).
|
|
486
|
-
agentRegistryUseCases.bootstrapBuiltInProfiles(BUILT_IN_PROFILES).catch((err) => {
|
|
487
|
-
log.exception("Agent profile bootstrap failed", err);
|
|
488
|
-
});
|
|
489
|
-
// Auto-bootstrap AGENTS.md + project structure if missing (fire-and-forget, non-blocking).
|
|
490
|
-
const firstRunState = { isFirstRun: false, ragEmpty: false };
|
|
46
|
+
const isNpmInstall = input.directory !== join(import.meta.dirname ?? "", "..");
|
|
47
|
+
const svc = buildServices(infra, wsName, input.directory, log, hasVault, isNpmInstall);
|
|
48
|
+
// ── Side-Effects: Auto-Registration + Profiles + Bootstrap ─────────
|
|
49
|
+
svc.workspaceRegistryUseCases
|
|
50
|
+
.autoRegister(wsName, input.directory)
|
|
51
|
+
.catch((err) => { log.exception("Workspace auto-registration failed", err, { workspace: wsName }); });
|
|
52
|
+
svc.agentRegistryUseCases
|
|
53
|
+
.bootstrapBuiltInProfiles(BUILT_IN_PROFILES)
|
|
54
|
+
.catch((err) => { log.exception("Agent profile bootstrap failed", err); });
|
|
55
|
+
// First-run state (mutated by bootstrap check + RAG status)
|
|
56
|
+
const firstRunState = {
|
|
57
|
+
isFirstRun: false,
|
|
58
|
+
ragEmpty: false,
|
|
59
|
+
};
|
|
491
60
|
try {
|
|
492
|
-
const bsRes = bootstrapUseCases.bootstrap(input.directory, bootstrapUseCases.buildConfig(
|
|
61
|
+
const bsRes = svc.bootstrapUseCases.bootstrap(input.directory, svc.bootstrapUseCases.buildConfig(infra.configService.getAzureSyncConfig()), false);
|
|
493
62
|
if (bsRes.agentsMdCreated) {
|
|
494
63
|
log.info("AGENTS.md auto-generated", { path: bsRes.agentsMdPath });
|
|
495
64
|
firstRunState.isFirstRun = true;
|
|
496
65
|
}
|
|
66
|
+
if (bsRes.globalCommandInstalled) {
|
|
67
|
+
log.info("Global command installed", { command: "/jarvis-agents-md-file" });
|
|
68
|
+
}
|
|
497
69
|
}
|
|
498
70
|
catch (err) {
|
|
499
71
|
log.exception("Auto-bootstrap failed", err);
|
|
500
72
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
if (s.success && s.data.documentCount === 0)
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
sessionUseCases,
|
|
510
|
-
todoUseCases,
|
|
511
|
-
noteUseCases,
|
|
512
|
-
getWorkspace,
|
|
513
|
-
directory: input.directory,
|
|
514
|
-
});
|
|
515
|
-
const shellEnvHook = createShellEnvHook({
|
|
516
|
-
sessionUseCases,
|
|
517
|
-
getWorkspace,
|
|
518
|
-
dbPath,
|
|
519
|
-
});
|
|
520
|
-
const guardrailsHook = createGuardrailsHook({
|
|
521
|
-
validationService,
|
|
522
|
-
});
|
|
523
|
-
// ActiveCardProvider — resolves the "doing" card for an agent
|
|
524
|
-
// Cross-context port: token-metrics domain → kanban infrastructure
|
|
525
|
-
const activeCardProvider = {
|
|
526
|
-
async resolve(agent, workspace) {
|
|
527
|
-
const wsId = WorkspaceId.create(workspace);
|
|
528
|
-
const cards = await cardRepo.findByAgent(agent, wsId);
|
|
529
|
-
const doingCards = cards.filter((c) => c.status === CardStatus.Doing);
|
|
530
|
-
if (doingCards.length === 0)
|
|
531
|
-
return undefined;
|
|
532
|
-
// Most recently started card wins when multiple are in "doing"
|
|
533
|
-
const sorted = [...doingCards].sort((a, b) => {
|
|
534
|
-
const aTime = a.startedAt?.value.getTime() ?? 0;
|
|
535
|
-
const bTime = b.startedAt?.value.getTime() ?? 0;
|
|
536
|
-
return bTime - aTime;
|
|
537
|
-
});
|
|
538
|
-
const card = sorted[0];
|
|
539
|
-
return {
|
|
540
|
-
cardId: card.id.value,
|
|
541
|
-
sprintId: card.sprintId?.value,
|
|
542
|
-
};
|
|
543
|
-
},
|
|
544
|
-
};
|
|
545
|
-
const eventHook = createEventHook({
|
|
546
|
-
tokenMetricsUseCases,
|
|
547
|
-
workspace: getWorkspace(input.directory),
|
|
548
|
-
log: log.child("events"),
|
|
549
|
-
activeCardProvider,
|
|
550
|
-
});
|
|
551
|
-
const firstRunGuideHook = createFirstRunGuideHook(firstRunState);
|
|
552
|
-
const configCommandHook = createConfigCommandHook({
|
|
553
|
-
writableContexts: configWriteService.getWritableContexts(),
|
|
554
|
-
});
|
|
555
|
-
const slashCommandsHook = createSlashCommandsHook();
|
|
556
|
-
// Composed command.execute.before: config + slash commands
|
|
557
|
-
const composedCommandHook = async (input_, output_) => {
|
|
558
|
-
await configCommandHook(input_, output_);
|
|
559
|
-
await slashCommandsHook(input_, output_);
|
|
560
|
-
};
|
|
561
|
-
// Execution Journal — crash recovery hooks
|
|
562
|
-
const journalHooks = createExecutionJournalHooks({
|
|
563
|
-
journalUseCases: executionJournalUseCases,
|
|
564
|
-
workspace: getWorkspace(input.directory),
|
|
565
|
-
log: log.child("journal"),
|
|
566
|
-
});
|
|
567
|
-
// Composed tool.execute.before: guardrails first, then journal recording
|
|
568
|
-
const composedBeforeHook = async (input_, output_) => {
|
|
569
|
-
await guardrailsHook(input_, output_);
|
|
570
|
-
await journalHooks.beforeHook(input_, output_);
|
|
571
|
-
};
|
|
572
|
-
// Composed event hook: existing event handling + journal after-recording
|
|
573
|
-
const composedEventHook = async (input_) => {
|
|
574
|
-
await eventHook(input_);
|
|
575
|
-
await journalHooks.afterHook(input_);
|
|
576
|
-
};
|
|
577
|
-
// Crash detection — check for orphaned running entries on startup
|
|
578
|
-
const wsIdForJournal = WorkspaceId.create(getWorkspace(input.directory));
|
|
579
|
-
executionJournalUseCases.detectCrashes(wsIdForJournal).then((report) => {
|
|
580
|
-
if (report.totalCrashed > 0) {
|
|
581
|
-
log.warn("Crash recovery", {
|
|
582
|
-
crashed: report.totalCrashed,
|
|
583
|
-
summary: report.summary,
|
|
584
|
-
});
|
|
585
|
-
// Store crash report for first-run guide to surface
|
|
586
|
-
firstRunState.crashReport = report.summary;
|
|
587
|
-
}
|
|
588
|
-
// Prune old journal entries (fire-and-forget)
|
|
589
|
-
return executionJournalUseCases.prune(wsIdForJournal);
|
|
590
|
-
}).catch((err) => {
|
|
591
|
-
log.warn("Crash detection failed", {
|
|
592
|
-
error: err instanceof Error ? err.message : String(err),
|
|
593
|
-
});
|
|
594
|
-
});
|
|
595
|
-
// ── Compose Hooks Object ──────────────────────────────────────────
|
|
596
|
-
const allTools = {
|
|
597
|
-
...contextMemoryTools,
|
|
598
|
-
...kanbanCardTools,
|
|
599
|
-
...kanbanGroomingTools,
|
|
600
|
-
...kanbanGateTools,
|
|
601
|
-
...kanbanBoardTools,
|
|
602
|
-
...governanceTools,
|
|
603
|
-
...ragTools,
|
|
604
|
-
...dataTools,
|
|
605
|
-
...agentTools,
|
|
606
|
-
...vaultTools,
|
|
607
|
-
...vaultManageTool,
|
|
608
|
-
...domainMapTools,
|
|
609
|
-
...workspaceRegistryTools,
|
|
610
|
-
...environmentTools,
|
|
611
|
-
...tokenMetricsTools,
|
|
612
|
-
...agentRegistryTools,
|
|
613
|
-
...pipelineTools,
|
|
614
|
-
...azureSyncTools,
|
|
615
|
-
...azureSyncEventTools,
|
|
616
|
-
...bootstrapTools,
|
|
617
|
-
...configTools,
|
|
618
|
-
...wikiFeedbackTools,
|
|
619
|
-
};
|
|
73
|
+
svc.ragUseCases
|
|
74
|
+
.status({ workspace: wsName })
|
|
75
|
+
.then((s) => { if (s.success && s.data.documentCount === 0)
|
|
76
|
+
firstRunState.ragEmpty = true; })
|
|
77
|
+
.catch(() => { });
|
|
78
|
+
// ── Tools & Hooks ──────────────────────────────────────────────────
|
|
79
|
+
const allTools = buildAllTools(infra, svc, input.directory, input.client, getWorkspace);
|
|
80
|
+
const hooks = buildHooks(infra, svc, input.directory, wsName, log, firstRunState, getWorkspace);
|
|
620
81
|
log.info("Plugin initialized", {
|
|
621
82
|
workspace: wsName,
|
|
622
|
-
tools: Object.keys(allTools).length,
|
|
83
|
+
tools: Object.keys(allTools ?? {}).length,
|
|
623
84
|
directory: input.directory,
|
|
624
85
|
});
|
|
625
86
|
return {
|
|
626
87
|
tool: allTools,
|
|
627
|
-
|
|
628
|
-
"experimental.chat.system.transform": firstRunGuideHook,
|
|
629
|
-
"command.execute.before": composedCommandHook,
|
|
630
|
-
"shell.env": shellEnvHook,
|
|
631
|
-
"tool.execute.before": composedBeforeHook,
|
|
632
|
-
event: composedEventHook,
|
|
88
|
+
...hooks,
|
|
633
89
|
};
|
|
634
90
|
};
|
|
635
91
|
//# sourceMappingURL=index.js.map
|