@mc1global/opencode-jarvis 0.1.1 → 0.3.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/dist/application/agent-registry/dtos.d.ts +66 -0
- package/dist/application/agent-registry/dtos.d.ts.map +1 -0
- package/dist/application/agent-registry/dtos.js +11 -0
- package/dist/application/agent-registry/dtos.js.map +1 -0
- package/dist/application/agent-registry/use-cases.d.ts +39 -0
- package/dist/application/agent-registry/use-cases.d.ts.map +1 -0
- package/dist/application/agent-registry/use-cases.js +222 -0
- package/dist/application/agent-registry/use-cases.js.map +1 -0
- package/dist/application/azure-sync/dtos.d.ts +210 -0
- package/dist/application/azure-sync/dtos.d.ts.map +1 -0
- package/dist/application/azure-sync/dtos.js +11 -0
- package/dist/application/azure-sync/dtos.js.map +1 -0
- package/dist/application/azure-sync/field-builders.d.ts +54 -0
- package/dist/application/azure-sync/field-builders.d.ts.map +1 -0
- package/dist/application/azure-sync/field-builders.js +166 -0
- package/dist/application/azure-sync/field-builders.js.map +1 -0
- package/dist/application/azure-sync/index.d.ts +16 -0
- package/dist/application/azure-sync/index.d.ts.map +1 -0
- package/dist/application/azure-sync/index.js +10 -0
- package/dist/application/azure-sync/index.js.map +1 -0
- package/dist/application/azure-sync/pr-use-cases.d.ts +39 -0
- package/dist/application/azure-sync/pr-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/pr-use-cases.js +192 -0
- package/dist/application/azure-sync/pr-use-cases.js.map +1 -0
- package/dist/application/azure-sync/pull-use-cases.d.ts +43 -0
- package/dist/application/azure-sync/pull-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/pull-use-cases.js +322 -0
- package/dist/application/azure-sync/pull-use-cases.js.map +1 -0
- package/dist/application/azure-sync/push-use-cases.d.ts +53 -0
- package/dist/application/azure-sync/push-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/push-use-cases.js +341 -0
- package/dist/application/azure-sync/push-use-cases.js.map +1 -0
- package/dist/application/azure-sync/reverse-field-builder.d.ts +52 -0
- package/dist/application/azure-sync/reverse-field-builder.d.ts.map +1 -0
- package/dist/application/azure-sync/reverse-field-builder.js +130 -0
- package/dist/application/azure-sync/reverse-field-builder.js.map +1 -0
- package/dist/application/azure-sync/task-push-use-cases.d.ts +68 -0
- package/dist/application/azure-sync/task-push-use-cases.d.ts.map +1 -0
- package/dist/application/azure-sync/task-push-use-cases.js +162 -0
- package/dist/application/azure-sync/task-push-use-cases.js.map +1 -0
- package/dist/application/config/config-service.d.ts +64 -0
- package/dist/application/config/config-service.d.ts.map +1 -0
- package/dist/application/config/config-service.js +110 -0
- package/dist/application/config/config-service.js.map +1 -0
- package/dist/application/config/index.d.ts +5 -0
- package/dist/application/config/index.d.ts.map +1 -0
- package/dist/application/config/index.js +5 -0
- package/dist/application/config/index.js.map +1 -0
- package/dist/application/kanban/board-use-cases.d.ts.map +1 -1
- package/dist/application/kanban/board-use-cases.js +14 -0
- package/dist/application/kanban/board-use-cases.js.map +1 -1
- package/dist/application/kanban/card-use-cases.d.ts +21 -2
- package/dist/application/kanban/card-use-cases.d.ts.map +1 -1
- package/dist/application/kanban/card-use-cases.js +180 -1
- package/dist/application/kanban/card-use-cases.js.map +1 -1
- package/dist/application/kanban/dtos.d.ts +59 -0
- package/dist/application/kanban/dtos.d.ts.map +1 -1
- package/dist/application/mcp/index.d.ts +10 -0
- package/dist/application/mcp/index.d.ts.map +1 -0
- package/dist/application/mcp/index.js +8 -0
- package/dist/application/mcp/index.js.map +1 -0
- package/dist/application/mcp/middleware.d.ts +91 -0
- package/dist/application/mcp/middleware.d.ts.map +1 -0
- package/dist/application/mcp/middleware.js +84 -0
- package/dist/application/mcp/middleware.js.map +1 -0
- package/dist/application/mcp/tool-adapter.d.ts +72 -0
- package/dist/application/mcp/tool-adapter.d.ts.map +1 -0
- package/dist/application/mcp/tool-adapter.js +132 -0
- package/dist/application/mcp/tool-adapter.js.map +1 -0
- package/dist/application/pipeline/dtos.d.ts +135 -0
- package/dist/application/pipeline/dtos.d.ts.map +1 -0
- package/dist/application/pipeline/dtos.js +11 -0
- package/dist/application/pipeline/dtos.js.map +1 -0
- package/dist/application/pipeline/index.d.ts +8 -0
- package/dist/application/pipeline/index.d.ts.map +1 -0
- package/dist/application/pipeline/index.js +7 -0
- package/dist/application/pipeline/index.js.map +1 -0
- package/dist/application/pipeline/use-cases.d.ts +67 -0
- package/dist/application/pipeline/use-cases.d.ts.map +1 -0
- package/dist/application/pipeline/use-cases.js +413 -0
- package/dist/application/pipeline/use-cases.js.map +1 -0
- package/dist/application/rag/use-cases.d.ts +3 -0
- package/dist/application/rag/use-cases.d.ts.map +1 -1
- package/dist/application/rag/use-cases.js +112 -34
- package/dist/application/rag/use-cases.js.map +1 -1
- package/dist/domain/agent-registry/entities.d.ts +68 -0
- package/dist/domain/agent-registry/entities.d.ts.map +1 -0
- package/dist/domain/agent-registry/entities.js +177 -0
- package/dist/domain/agent-registry/entities.js.map +1 -0
- package/dist/domain/agent-registry/repositories.d.ts +56 -0
- package/dist/domain/agent-registry/repositories.d.ts.map +1 -0
- package/dist/domain/agent-registry/repositories.js +12 -0
- package/dist/domain/agent-registry/repositories.js.map +1 -0
- package/dist/domain/agent-registry/services.d.ts +87 -0
- package/dist/domain/agent-registry/services.d.ts.map +1 -0
- package/dist/domain/agent-registry/services.js +188 -0
- package/dist/domain/agent-registry/services.js.map +1 -0
- package/dist/domain/agent-registry/value-objects.d.ts +145 -0
- package/dist/domain/agent-registry/value-objects.d.ts.map +1 -0
- package/dist/domain/agent-registry/value-objects.js +339 -0
- package/dist/domain/agent-registry/value-objects.js.map +1 -0
- package/dist/domain/azure-sync/entities.d.ts +165 -0
- package/dist/domain/azure-sync/entities.d.ts.map +1 -0
- package/dist/domain/azure-sync/entities.js +203 -0
- package/dist/domain/azure-sync/entities.js.map +1 -0
- package/dist/domain/azure-sync/index.d.ts +16 -0
- package/dist/domain/azure-sync/index.d.ts.map +1 -0
- package/dist/domain/azure-sync/index.js +14 -0
- package/dist/domain/azure-sync/index.js.map +1 -0
- package/dist/domain/azure-sync/ports.d.ts +117 -0
- package/dist/domain/azure-sync/ports.d.ts.map +1 -0
- package/dist/domain/azure-sync/ports.js +13 -0
- package/dist/domain/azure-sync/ports.js.map +1 -0
- package/dist/domain/azure-sync/repositories.d.ts +53 -0
- package/dist/domain/azure-sync/repositories.d.ts.map +1 -0
- package/dist/domain/azure-sync/repositories.js +11 -0
- package/dist/domain/azure-sync/repositories.js.map +1 -0
- package/dist/domain/azure-sync/services.d.ts +107 -0
- package/dist/domain/azure-sync/services.d.ts.map +1 -0
- package/dist/domain/azure-sync/services.js +316 -0
- package/dist/domain/azure-sync/services.js.map +1 -0
- package/dist/domain/azure-sync/value-objects.d.ts +129 -0
- package/dist/domain/azure-sync/value-objects.d.ts.map +1 -0
- package/dist/domain/azure-sync/value-objects.js +343 -0
- package/dist/domain/azure-sync/value-objects.js.map +1 -0
- package/dist/domain/config/index.d.ts +9 -0
- package/dist/domain/config/index.d.ts.map +1 -0
- package/dist/domain/config/index.js +7 -0
- package/dist/domain/config/index.js.map +1 -0
- package/dist/domain/config/repositories.d.ts +36 -0
- package/dist/domain/config/repositories.d.ts.map +1 -0
- package/dist/domain/config/repositories.js +12 -0
- package/dist/domain/config/repositories.js.map +1 -0
- package/dist/domain/config/value-objects.d.ts +112 -0
- package/dist/domain/config/value-objects.d.ts.map +1 -0
- package/dist/domain/config/value-objects.js +93 -0
- package/dist/domain/config/value-objects.js.map +1 -0
- package/dist/domain/governance/policies.d.ts.map +1 -1
- package/dist/domain/governance/policies.js +70 -0
- package/dist/domain/governance/policies.js.map +1 -1
- package/dist/domain/kanban/entities.d.ts +67 -15
- package/dist/domain/kanban/entities.d.ts.map +1 -1
- package/dist/domain/kanban/entities.js +177 -14
- package/dist/domain/kanban/entities.js.map +1 -1
- package/dist/domain/kanban/grooming.d.ts +27 -7
- package/dist/domain/kanban/grooming.d.ts.map +1 -1
- package/dist/domain/kanban/grooming.js +50 -12
- package/dist/domain/kanban/grooming.js.map +1 -1
- package/dist/domain/kanban/services.d.ts +16 -2
- package/dist/domain/kanban/services.d.ts.map +1 -1
- package/dist/domain/kanban/services.js +29 -2
- package/dist/domain/kanban/services.js.map +1 -1
- package/dist/domain/kanban/value-objects.d.ts +48 -0
- package/dist/domain/kanban/value-objects.d.ts.map +1 -1
- package/dist/domain/kanban/value-objects.js +53 -0
- package/dist/domain/kanban/value-objects.js.map +1 -1
- package/dist/domain/pipeline/gate.d.ts +75 -0
- package/dist/domain/pipeline/gate.d.ts.map +1 -0
- package/dist/domain/pipeline/gate.js +158 -0
- package/dist/domain/pipeline/gate.js.map +1 -0
- package/dist/domain/pipeline/index.d.ts +13 -0
- package/dist/domain/pipeline/index.d.ts.map +1 -0
- package/dist/domain/pipeline/index.js +14 -0
- package/dist/domain/pipeline/index.js.map +1 -0
- package/dist/domain/pipeline/pipeline.d.ts +99 -0
- package/dist/domain/pipeline/pipeline.d.ts.map +1 -0
- package/dist/domain/pipeline/pipeline.js +257 -0
- package/dist/domain/pipeline/pipeline.js.map +1 -0
- package/dist/domain/pipeline/ports.d.ts +120 -0
- package/dist/domain/pipeline/ports.d.ts.map +1 -0
- package/dist/domain/pipeline/ports.js +12 -0
- package/dist/domain/pipeline/ports.js.map +1 -0
- package/dist/domain/pipeline/repositories.d.ts +66 -0
- package/dist/domain/pipeline/repositories.d.ts.map +1 -0
- package/dist/domain/pipeline/repositories.js +11 -0
- package/dist/domain/pipeline/repositories.js.map +1 -0
- package/dist/domain/pipeline/services.d.ts +77 -0
- package/dist/domain/pipeline/services.d.ts.map +1 -0
- package/dist/domain/pipeline/services.js +156 -0
- package/dist/domain/pipeline/services.js.map +1 -0
- package/dist/domain/pipeline/value-objects.d.ts +117 -0
- package/dist/domain/pipeline/value-objects.d.ts.map +1 -0
- package/dist/domain/pipeline/value-objects.js +313 -0
- package/dist/domain/pipeline/value-objects.js.map +1 -0
- package/dist/domain/rag/value-objects.d.ts +9 -2
- package/dist/domain/rag/value-objects.d.ts.map +1 -1
- package/dist/domain/rag/value-objects.js +8 -2
- package/dist/domain/rag/value-objects.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +113 -75
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts +29 -0
- package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts.map +1 -0
- package/dist/infrastructure/agent-registry/agent-profile-repository.js +109 -0
- package/dist/infrastructure/agent-registry/agent-profile-repository.js.map +1 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts +28 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts.map +1 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.js +61 -0
- package/dist/infrastructure/agent-registry/agent-session-adapter.js.map +1 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.d.ts +19 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.d.ts.map +1 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.js +210 -0
- package/dist/infrastructure/agent-registry/built-in-profiles.js.map +1 -0
- package/dist/infrastructure/azure-sync/azure-auth.d.ts +40 -0
- package/dist/infrastructure/azure-sync/azure-auth.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/azure-auth.js +94 -0
- package/dist/infrastructure/azure-sync/azure-auth.js.map +1 -0
- package/dist/infrastructure/azure-sync/azure-devops-client.d.ts +43 -0
- package/dist/infrastructure/azure-sync/azure-devops-client.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/azure-devops-client.js +296 -0
- package/dist/infrastructure/azure-sync/azure-devops-client.js.map +1 -0
- package/dist/infrastructure/azure-sync/index.d.ts +9 -0
- package/dist/infrastructure/azure-sync/index.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/index.js +12 -0
- package/dist/infrastructure/azure-sync/index.js.map +1 -0
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts +39 -0
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts.map +1 -0
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.js +202 -0
- package/dist/infrastructure/azure-sync/sqlite-sync-repository.js.map +1 -0
- package/dist/infrastructure/config/index.d.ts +5 -0
- package/dist/infrastructure/config/index.d.ts.map +1 -0
- package/dist/infrastructure/config/index.js +5 -0
- package/dist/infrastructure/config/index.js.map +1 -0
- package/dist/infrastructure/config/yaml-config-repository.d.ts +22 -0
- package/dist/infrastructure/config/yaml-config-repository.d.ts.map +1 -0
- package/dist/infrastructure/config/yaml-config-repository.js +68 -0
- package/dist/infrastructure/config/yaml-config-repository.js.map +1 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts +21 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts.map +1 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.js +49 -0
- package/dist/infrastructure/domain-map/llm-prompt-factory.js.map +1 -0
- package/dist/infrastructure/kanban/card-repository.d.ts +6 -0
- package/dist/infrastructure/kanban/card-repository.d.ts.map +1 -1
- package/dist/infrastructure/kanban/card-repository.js +79 -7
- package/dist/infrastructure/kanban/card-repository.js.map +1 -1
- package/dist/infrastructure/pipeline/dagger-adapter.d.ts +50 -0
- package/dist/infrastructure/pipeline/dagger-adapter.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/dagger-adapter.js +153 -0
- package/dist/infrastructure/pipeline/dagger-adapter.js.map +1 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts +35 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.js +132 -0
- package/dist/infrastructure/pipeline/dagger-scaffold-generator.js.map +1 -0
- package/dist/infrastructure/pipeline/index.d.ts +20 -0
- package/dist/infrastructure/pipeline/index.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/index.js +19 -0
- package/dist/infrastructure/pipeline/index.js.map +1 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts +23 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.js +63 -0
- package/dist/infrastructure/pipeline/pipeline-template-registry.js.map +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts +17 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.js +467 -0
- package/dist/infrastructure/pipeline/scaffold-templates-extra.js.map +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates.d.ts +23 -0
- package/dist/infrastructure/pipeline/scaffold-templates.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/scaffold-templates.js +476 -0
- package/dist/infrastructure/pipeline/scaffold-templates.js.map +1 -0
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts +32 -0
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts.map +1 -0
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js +197 -0
- package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js.map +1 -0
- package/dist/mcp-server.d.ts +3 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +300 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/tools/agent-registry-tools.d.ts +11 -0
- package/dist/tools/agent-registry-tools.d.ts.map +1 -0
- package/dist/tools/agent-registry-tools.js +208 -0
- package/dist/tools/agent-registry-tools.js.map +1 -0
- package/dist/tools/azure-sync-tools.d.ts +15 -0
- package/dist/tools/azure-sync-tools.d.ts.map +1 -0
- package/dist/tools/azure-sync-tools.js +332 -0
- package/dist/tools/azure-sync-tools.js.map +1 -0
- package/dist/tools/kanban-card-tools.d.ts.map +1 -1
- package/dist/tools/kanban-card-tools.js +41 -16
- package/dist/tools/kanban-card-tools.js.map +1 -1
- package/dist/tools/kanban-gate-tools.d.ts +7 -0
- package/dist/tools/kanban-gate-tools.d.ts.map +1 -0
- package/dist/tools/kanban-gate-tools.js +106 -0
- package/dist/tools/kanban-gate-tools.js.map +1 -0
- package/dist/tools/kanban-grooming-tools.d.ts +7 -0
- package/dist/tools/kanban-grooming-tools.d.ts.map +1 -0
- package/dist/tools/kanban-grooming-tools.js +180 -0
- package/dist/tools/kanban-grooming-tools.js.map +1 -0
- package/dist/tools/pipeline-tools.d.ts +15 -0
- package/dist/tools/pipeline-tools.d.ts.map +1 -0
- package/dist/tools/pipeline-tools.js +424 -0
- package/dist/tools/pipeline-tools.js.map +1 -0
- package/package.json +7 -2
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Azure Sync Domain — Value Objects
|
|
3
|
+
*
|
|
4
|
+
* Identifiers, enums, and constrained types for the azure-sync bounded context.
|
|
5
|
+
* Models Azure DevOps concepts (organizations, work items, process templates)
|
|
6
|
+
* with validation and immutability. Zero external dependencies (pure domain).
|
|
7
|
+
*
|
|
8
|
+
* SOLID: SRP — each type models a single domain concept
|
|
9
|
+
* DDD: Value Objects compared by value, no identity of their own
|
|
10
|
+
*/
|
|
11
|
+
import { EntityId } from "../shared/value-objects.js";
|
|
12
|
+
// ─── Identifiers ──────────────────────────────────────────────────────────────
|
|
13
|
+
/** Sync mapping identifier (format: SM-NNN). */
|
|
14
|
+
export class SyncMappingId extends EntityId {
|
|
15
|
+
constructor(value) {
|
|
16
|
+
super(value);
|
|
17
|
+
}
|
|
18
|
+
static create(sequence) {
|
|
19
|
+
if (!Number.isInteger(sequence) || sequence < 1) {
|
|
20
|
+
throw new Error("SyncMappingId: sequence must be a positive integer");
|
|
21
|
+
}
|
|
22
|
+
return new SyncMappingId(`SM-${String(sequence).padStart(3, "0")}`);
|
|
23
|
+
}
|
|
24
|
+
static from(value) {
|
|
25
|
+
return new SyncMappingId(value);
|
|
26
|
+
}
|
|
27
|
+
get sequence() {
|
|
28
|
+
const parts = this.value.split("-");
|
|
29
|
+
return parseInt(parts[1] ?? "0", 10);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** Sync log entry identifier (format: SL-NNN). */
|
|
33
|
+
export class SyncLogId extends EntityId {
|
|
34
|
+
constructor(value) {
|
|
35
|
+
super(value);
|
|
36
|
+
}
|
|
37
|
+
static create(sequence) {
|
|
38
|
+
if (!Number.isInteger(sequence) || sequence < 1) {
|
|
39
|
+
throw new Error("SyncLogId: sequence must be a positive integer");
|
|
40
|
+
}
|
|
41
|
+
return new SyncLogId(`SL-${String(sequence).padStart(3, "0")}`);
|
|
42
|
+
}
|
|
43
|
+
static from(value) {
|
|
44
|
+
return new SyncLogId(value);
|
|
45
|
+
}
|
|
46
|
+
get sequence() {
|
|
47
|
+
const parts = this.value.split("-");
|
|
48
|
+
return parseInt(parts[1] ?? "0", 10);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// ─── Azure DevOps Organization URL ───────────────────────────────────────────
|
|
52
|
+
/**
|
|
53
|
+
* Validated Azure DevOps organization URL.
|
|
54
|
+
* Accepts formats:
|
|
55
|
+
* - https://dev.azure.com/{org}
|
|
56
|
+
* - https://{org}.visualstudio.com
|
|
57
|
+
*/
|
|
58
|
+
export class AzureOrgUrl {
|
|
59
|
+
value;
|
|
60
|
+
static DEV_AZURE_PATTERN = /^https:\/\/dev\.azure\.com\/[a-zA-Z0-9][a-zA-Z0-9_-]*\/?$/;
|
|
61
|
+
static VSTS_PATTERN = /^https:\/\/[a-zA-Z0-9][a-zA-Z0-9_-]*\.visualstudio\.com\/?$/;
|
|
62
|
+
constructor(value) {
|
|
63
|
+
this.value = value;
|
|
64
|
+
}
|
|
65
|
+
static create(url) {
|
|
66
|
+
const trimmed = url.trim().replace(/\/+$/, "");
|
|
67
|
+
if (trimmed.length === 0) {
|
|
68
|
+
throw new Error("AzureOrgUrl: URL cannot be empty");
|
|
69
|
+
}
|
|
70
|
+
if (!AzureOrgUrl.DEV_AZURE_PATTERN.test(trimmed + "/") &&
|
|
71
|
+
!AzureOrgUrl.VSTS_PATTERN.test(trimmed + "/")) {
|
|
72
|
+
throw new Error(`AzureOrgUrl: invalid format "${trimmed}" — expected https://dev.azure.com/{org} or https://{org}.visualstudio.com`);
|
|
73
|
+
}
|
|
74
|
+
return new AzureOrgUrl(trimmed);
|
|
75
|
+
}
|
|
76
|
+
static from(value) {
|
|
77
|
+
return new AzureOrgUrl(value);
|
|
78
|
+
}
|
|
79
|
+
/** Extract the organization name from the URL. */
|
|
80
|
+
get orgName() {
|
|
81
|
+
if (this.value.includes("dev.azure.com")) {
|
|
82
|
+
const parts = this.value.split("/");
|
|
83
|
+
return parts[3] ?? "";
|
|
84
|
+
}
|
|
85
|
+
// visualstudio.com format
|
|
86
|
+
const match = /^https:\/\/([^.]+)\.visualstudio\.com/.exec(this.value);
|
|
87
|
+
return match?.[1] ?? "";
|
|
88
|
+
}
|
|
89
|
+
equals(other) {
|
|
90
|
+
return this.value === other.value;
|
|
91
|
+
}
|
|
92
|
+
toString() {
|
|
93
|
+
return this.value;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// ─── Work Item ID ─────────────────────────────────────────────────────────────
|
|
97
|
+
/**
|
|
98
|
+
* Azure DevOps work item numeric identifier.
|
|
99
|
+
* Always a positive integer assigned by Azure DevOps.
|
|
100
|
+
*/
|
|
101
|
+
export class WorkItemId {
|
|
102
|
+
value;
|
|
103
|
+
constructor(value) {
|
|
104
|
+
this.value = value;
|
|
105
|
+
}
|
|
106
|
+
static create(id) {
|
|
107
|
+
if (!Number.isInteger(id) || id < 1) {
|
|
108
|
+
throw new Error("WorkItemId: must be a positive integer");
|
|
109
|
+
}
|
|
110
|
+
return new WorkItemId(id);
|
|
111
|
+
}
|
|
112
|
+
static from(value) {
|
|
113
|
+
return new WorkItemId(value);
|
|
114
|
+
}
|
|
115
|
+
equals(other) {
|
|
116
|
+
return this.value === other.value;
|
|
117
|
+
}
|
|
118
|
+
toString() {
|
|
119
|
+
return String(this.value);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// ─── Process Template ─────────────────────────────────────────────────────────
|
|
123
|
+
/** Azure DevOps process templates that determine available fields and states. */
|
|
124
|
+
export const PROCESS_TEMPLATES = ["basic", "agile", "scrum", "cmmi"];
|
|
125
|
+
export function isValidProcessTemplate(value) {
|
|
126
|
+
return PROCESS_TEMPLATES.includes(value.toLowerCase());
|
|
127
|
+
}
|
|
128
|
+
// ─── Work Item Type ───────────────────────────────────────────────────────────
|
|
129
|
+
/** Azure DevOps work item types across all process templates. */
|
|
130
|
+
export const WORK_ITEM_TYPES = [
|
|
131
|
+
"Epic",
|
|
132
|
+
"Issue",
|
|
133
|
+
"Task",
|
|
134
|
+
"User Story",
|
|
135
|
+
"Product Backlog Item",
|
|
136
|
+
"Bug",
|
|
137
|
+
"Feature",
|
|
138
|
+
"Requirement",
|
|
139
|
+
];
|
|
140
|
+
/**
|
|
141
|
+
* Maps local entity types to Azure DevOps work item types per process template.
|
|
142
|
+
* Local "card" maps to the primary work item type for the template.
|
|
143
|
+
*/
|
|
144
|
+
export const LOCAL_TO_AZURE_TYPE = {
|
|
145
|
+
basic: { epic: "Epic", card: "Issue", task: "Task" },
|
|
146
|
+
agile: { epic: "Epic", card: "User Story", task: "Task" },
|
|
147
|
+
scrum: { epic: "Epic", card: "Product Backlog Item", task: "Task" },
|
|
148
|
+
cmmi: { epic: "Epic", card: "Requirement", task: "Task" },
|
|
149
|
+
};
|
|
150
|
+
// ─── Sync Direction ───────────────────────────────────────────────────────────
|
|
151
|
+
export const SYNC_DIRECTIONS = [
|
|
152
|
+
"push",
|
|
153
|
+
"pull",
|
|
154
|
+
"bidirectional",
|
|
155
|
+
];
|
|
156
|
+
export function isValidSyncDirection(value) {
|
|
157
|
+
return SYNC_DIRECTIONS.includes(value);
|
|
158
|
+
}
|
|
159
|
+
// ─── Sync Status ──────────────────────────────────────────────────────────────
|
|
160
|
+
export const SYNC_STATUSES = [
|
|
161
|
+
"pending",
|
|
162
|
+
"synced",
|
|
163
|
+
"conflict",
|
|
164
|
+
"error",
|
|
165
|
+
"stale",
|
|
166
|
+
];
|
|
167
|
+
export function isValidSyncStatus(value) {
|
|
168
|
+
return SYNC_STATUSES.includes(value);
|
|
169
|
+
}
|
|
170
|
+
// ─── Azure DevOps State Mapping ───────────────────────────────────────────────
|
|
171
|
+
/** Azure DevOps work item states per process template. */
|
|
172
|
+
export const AZURE_STATES = {
|
|
173
|
+
basic: ["To Do", "Doing", "Done"],
|
|
174
|
+
agile: ["New", "Active", "Resolved", "Closed"],
|
|
175
|
+
scrum: ["New", "Approved", "Committed", "Done"],
|
|
176
|
+
cmmi: ["Proposed", "Active", "Resolved", "Closed"],
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Local kanban states ordered by workflow progression.
|
|
180
|
+
* Used for mapping to/from Azure DevOps states.
|
|
181
|
+
*/
|
|
182
|
+
export const LOCAL_KANBAN_STATES = [
|
|
183
|
+
"backlog",
|
|
184
|
+
"grooming",
|
|
185
|
+
"ready",
|
|
186
|
+
"doing",
|
|
187
|
+
"review",
|
|
188
|
+
"blocked",
|
|
189
|
+
"tested",
|
|
190
|
+
"done",
|
|
191
|
+
];
|
|
192
|
+
/**
|
|
193
|
+
* Maps local kanban states to Azure DevOps states per process template.
|
|
194
|
+
* Multiple local states may map to a single Azure state.
|
|
195
|
+
*/
|
|
196
|
+
export const LOCAL_TO_AZURE_STATE = {
|
|
197
|
+
basic: {
|
|
198
|
+
backlog: "To Do",
|
|
199
|
+
grooming: "To Do",
|
|
200
|
+
ready: "To Do",
|
|
201
|
+
doing: "Doing",
|
|
202
|
+
review: "Doing",
|
|
203
|
+
blocked: "Doing",
|
|
204
|
+
tested: "Doing",
|
|
205
|
+
done: "Done",
|
|
206
|
+
},
|
|
207
|
+
agile: {
|
|
208
|
+
backlog: "New",
|
|
209
|
+
grooming: "New",
|
|
210
|
+
ready: "New",
|
|
211
|
+
doing: "Active",
|
|
212
|
+
review: "Active",
|
|
213
|
+
blocked: "Active",
|
|
214
|
+
tested: "Resolved",
|
|
215
|
+
done: "Closed",
|
|
216
|
+
},
|
|
217
|
+
scrum: {
|
|
218
|
+
backlog: "New",
|
|
219
|
+
grooming: "New",
|
|
220
|
+
ready: "Approved",
|
|
221
|
+
doing: "Committed",
|
|
222
|
+
review: "Committed",
|
|
223
|
+
blocked: "Committed",
|
|
224
|
+
tested: "Committed",
|
|
225
|
+
done: "Done",
|
|
226
|
+
},
|
|
227
|
+
cmmi: {
|
|
228
|
+
backlog: "Proposed",
|
|
229
|
+
grooming: "Proposed",
|
|
230
|
+
ready: "Proposed",
|
|
231
|
+
doing: "Active",
|
|
232
|
+
review: "Active",
|
|
233
|
+
blocked: "Active",
|
|
234
|
+
tested: "Resolved",
|
|
235
|
+
done: "Closed",
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Maps Azure DevOps states back to the most likely local kanban state.
|
|
240
|
+
* Since the mapping is many-to-one, we pick the "earliest" local state
|
|
241
|
+
* that maps to the Azure state (conservative approach).
|
|
242
|
+
*/
|
|
243
|
+
export const AZURE_TO_LOCAL_STATE = {
|
|
244
|
+
basic: {
|
|
245
|
+
"To Do": "backlog",
|
|
246
|
+
"Doing": "doing",
|
|
247
|
+
"Done": "done",
|
|
248
|
+
},
|
|
249
|
+
agile: {
|
|
250
|
+
"New": "backlog",
|
|
251
|
+
"Active": "doing",
|
|
252
|
+
"Resolved": "tested",
|
|
253
|
+
"Closed": "done",
|
|
254
|
+
},
|
|
255
|
+
scrum: {
|
|
256
|
+
"New": "backlog",
|
|
257
|
+
"Approved": "ready",
|
|
258
|
+
"Committed": "doing",
|
|
259
|
+
"Done": "done",
|
|
260
|
+
},
|
|
261
|
+
cmmi: {
|
|
262
|
+
"Proposed": "backlog",
|
|
263
|
+
"Active": "doing",
|
|
264
|
+
"Resolved": "tested",
|
|
265
|
+
"Closed": "done",
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
// ─── Task State Mapping ───────────────────────────────────────────────────────
|
|
269
|
+
/**
|
|
270
|
+
* Maps acceptance criteria "met" status to Azure DevOps Task states.
|
|
271
|
+
* Tasks have simpler state workflows than parent work items.
|
|
272
|
+
* met=true → completed state, met=false → initial state.
|
|
273
|
+
*/
|
|
274
|
+
export const TASK_STATE_FOR_MET = {
|
|
275
|
+
basic: { done: "Done", todo: "To Do" },
|
|
276
|
+
agile: { done: "Closed", todo: "New" },
|
|
277
|
+
scrum: { done: "Done", todo: "To Do" },
|
|
278
|
+
cmmi: { done: "Closed", todo: "Proposed" },
|
|
279
|
+
};
|
|
280
|
+
// ─── Field Mapping ────────────────────────────────────────────────────────────
|
|
281
|
+
/**
|
|
282
|
+
* Represents a mapping between a local field name and an Azure DevOps field reference.
|
|
283
|
+
* Some fields only exist on certain process templates; the `fallback` strategy
|
|
284
|
+
* specifies how to handle the field on templates that lack native support.
|
|
285
|
+
*/
|
|
286
|
+
export class FieldMapping {
|
|
287
|
+
localField;
|
|
288
|
+
azureField;
|
|
289
|
+
fallback;
|
|
290
|
+
constructor(localField, azureField, fallback) {
|
|
291
|
+
this.localField = localField;
|
|
292
|
+
this.azureField = azureField;
|
|
293
|
+
this.fallback = fallback;
|
|
294
|
+
}
|
|
295
|
+
static create(localField, azureField, fallback = "none") {
|
|
296
|
+
if (!localField.trim()) {
|
|
297
|
+
throw new Error("FieldMapping: localField cannot be empty");
|
|
298
|
+
}
|
|
299
|
+
if (!azureField.trim()) {
|
|
300
|
+
throw new Error("FieldMapping: azureField cannot be empty");
|
|
301
|
+
}
|
|
302
|
+
return new FieldMapping(localField.trim(), azureField.trim(), fallback);
|
|
303
|
+
}
|
|
304
|
+
static from(localField, azureField, fallback) {
|
|
305
|
+
return new FieldMapping(localField, azureField, fallback);
|
|
306
|
+
}
|
|
307
|
+
equals(other) {
|
|
308
|
+
return (this.localField === other.localField &&
|
|
309
|
+
this.azureField === other.azureField &&
|
|
310
|
+
this.fallback === other.fallback);
|
|
311
|
+
}
|
|
312
|
+
toString() {
|
|
313
|
+
return `${this.localField} -> ${this.azureField} (${this.fallback})`;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/** Strategy for handling fields that don't exist on the target process template. */
|
|
317
|
+
export const FIELD_FALLBACKS = [
|
|
318
|
+
"none",
|
|
319
|
+
"tag",
|
|
320
|
+
"description",
|
|
321
|
+
"skip",
|
|
322
|
+
];
|
|
323
|
+
export function isValidFieldFallback(value) {
|
|
324
|
+
return FIELD_FALLBACKS.includes(value);
|
|
325
|
+
}
|
|
326
|
+
// ─── Auth Method ──────────────────────────────────────────────────────────────
|
|
327
|
+
/** Supported authentication methods for Azure DevOps REST API. */
|
|
328
|
+
export const AUTH_METHODS = ["az-cli", "pat"];
|
|
329
|
+
export function isValidAuthMethod(value) {
|
|
330
|
+
return AUTH_METHODS.includes(value);
|
|
331
|
+
}
|
|
332
|
+
// ─── Local Entity Type ────────────────────────────────────────────────────────
|
|
333
|
+
/** Local JARVIS entity types that can be synced to Azure DevOps. */
|
|
334
|
+
export const LOCAL_ENTITY_TYPES = [
|
|
335
|
+
"card",
|
|
336
|
+
"epic",
|
|
337
|
+
"sprint",
|
|
338
|
+
"task",
|
|
339
|
+
];
|
|
340
|
+
export function isValidLocalEntityType(value) {
|
|
341
|
+
return LOCAL_ENTITY_TYPES.includes(value);
|
|
342
|
+
}
|
|
343
|
+
//# sourceMappingURL=value-objects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-objects.js","sourceRoot":"","sources":["../../../src/domain/azure-sync/value-objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,iFAAiF;AAEjF,gDAAgD;AAChD,MAAM,OAAO,aAAc,SAAQ,QAAQ;IACzC,YAAoB,KAAa;QAC/B,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,QAAgB;QAC5B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,QAA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N,QAAQ;IACR,MAAM;CACE,CAAC;AAIX,MAAM,UAAU,sBAAsB,CACpC,KAAa;IAEb,OAAO,kBAAkB,CAAC,QAAQ,CAAC,KAAwB,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Bounded Context — Domain Layer
|
|
3
|
+
*
|
|
4
|
+
* Exports all domain types for centralized configuration.
|
|
5
|
+
*/
|
|
6
|
+
export type { ConfigContextName, ChunkConfigEntry, RagConfig, PipelineConfig, AgentRegistryConfig, AzureSyncConfig, McpServerConfig, AutoVerifyType, GateTaskDefinition, KanbanConfig, ConfigMap, } from "./value-objects.js";
|
|
7
|
+
export { DEFAULT_RAG_CONFIG, DEFAULT_PIPELINE_CONFIG, DEFAULT_AGENT_REGISTRY_CONFIG, DEFAULT_AZURE_SYNC_CONFIG, DEFAULT_MCP_SERVER_CONFIG, DEFAULT_KANBAN_CONFIG, CONFIG_DEFAULTS, } from "./value-objects.js";
|
|
8
|
+
export type { ConfigRepository } from "./repositories.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/config/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,SAAS,GACV,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Bounded Context — Domain Layer
|
|
3
|
+
*
|
|
4
|
+
* Exports all domain types for centralized configuration.
|
|
5
|
+
*/
|
|
6
|
+
export { DEFAULT_RAG_CONFIG, DEFAULT_PIPELINE_CONFIG, DEFAULT_AGENT_REGISTRY_CONFIG, DEFAULT_AZURE_SYNC_CONFIG, DEFAULT_MCP_SERVER_CONFIG, DEFAULT_KANBAN_CONFIG, CONFIG_DEFAULTS, } from "./value-objects.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/config/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiBH,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Domain — Repository Interface
|
|
3
|
+
*
|
|
4
|
+
* Port for loading raw configuration data from external sources.
|
|
5
|
+
* Infrastructure implements this with YAML file reader.
|
|
6
|
+
*
|
|
7
|
+
* SOLID: DIP — domain defines interface, infrastructure implements
|
|
8
|
+
* SOLID: ISP — single-purpose interface for config loading
|
|
9
|
+
* DDD: Repository interface in domain layer
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Port for loading configuration data.
|
|
13
|
+
*
|
|
14
|
+
* Returns raw parsed data (unknown) — the application layer
|
|
15
|
+
* handles type validation and default merging.
|
|
16
|
+
*/
|
|
17
|
+
export interface ConfigRepository {
|
|
18
|
+
/**
|
|
19
|
+
* Load the raw configuration for a given context.
|
|
20
|
+
* Returns undefined if the context section is not found.
|
|
21
|
+
*
|
|
22
|
+
* @param contextName — Bounded context name (top-level YAML key)
|
|
23
|
+
*/
|
|
24
|
+
loadContext(contextName: string): unknown | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Load all configuration data from the source.
|
|
27
|
+
* Returns the full parsed config object.
|
|
28
|
+
*/
|
|
29
|
+
loadAll(): Readonly<Record<string, unknown>>;
|
|
30
|
+
/**
|
|
31
|
+
* Check if the configuration source is available.
|
|
32
|
+
* Returns false if the config file is missing or unreadable.
|
|
33
|
+
*/
|
|
34
|
+
isAvailable(): boolean;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../../../src/domain/config/repositories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAEtD;;;OAGG;IACH,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAE7C;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Domain — Repository Interface
|
|
3
|
+
*
|
|
4
|
+
* Port for loading raw configuration data from external sources.
|
|
5
|
+
* Infrastructure implements this with YAML file reader.
|
|
6
|
+
*
|
|
7
|
+
* SOLID: DIP — domain defines interface, infrastructure implements
|
|
8
|
+
* SOLID: ISP — single-purpose interface for config loading
|
|
9
|
+
* DDD: Repository interface in domain layer
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=repositories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositories.js","sourceRoot":"","sources":["../../../src/domain/config/repositories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Domain — Value Objects
|
|
3
|
+
*
|
|
4
|
+
* Immutable types for the configuration bounded context.
|
|
5
|
+
* Zero external dependencies (pure domain).
|
|
6
|
+
*
|
|
7
|
+
* SOLID: SRP — config type definitions only
|
|
8
|
+
* SOLID: OCP — new context configs added by extending typed interfaces
|
|
9
|
+
* DDD: Value Objects with no identity, compared by value
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Known bounded context names that can request configuration.
|
|
13
|
+
* Each maps to a top-level section in config/jarvis.yaml.
|
|
14
|
+
*/
|
|
15
|
+
export type ConfigContextName = "rag" | "pipeline" | "agent-registry" | "kanban" | "governance" | "token-metrics" | "vault" | "workspace-registry" | "environment" | "domain-map" | "azure-sync" | "mcp-server";
|
|
16
|
+
/** Chunk size/overlap pair for a single language. */
|
|
17
|
+
export interface ChunkConfigEntry {
|
|
18
|
+
readonly chunkSize: number;
|
|
19
|
+
readonly chunkOverlap: number;
|
|
20
|
+
}
|
|
21
|
+
/** RAG bounded context configuration. */
|
|
22
|
+
export interface RagConfig {
|
|
23
|
+
readonly ollama: {
|
|
24
|
+
readonly url: string;
|
|
25
|
+
readonly model: string;
|
|
26
|
+
readonly dimensions: number;
|
|
27
|
+
};
|
|
28
|
+
readonly storage: {
|
|
29
|
+
readonly persistRoot: string;
|
|
30
|
+
};
|
|
31
|
+
readonly chunks: Record<string, ChunkConfigEntry>;
|
|
32
|
+
readonly markdownSplitByHeaders: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** Pipeline bounded context configuration. */
|
|
35
|
+
export interface PipelineConfig {
|
|
36
|
+
readonly defaultTimeoutMs: number;
|
|
37
|
+
readonly checkTimeoutMs: number;
|
|
38
|
+
}
|
|
39
|
+
/** Agent Registry bounded context configuration. */
|
|
40
|
+
export interface AgentRegistryConfig {
|
|
41
|
+
readonly defaultModel: string;
|
|
42
|
+
}
|
|
43
|
+
/** Azure Sync bounded context configuration. */
|
|
44
|
+
export interface AzureSyncConfig {
|
|
45
|
+
readonly organization: string;
|
|
46
|
+
readonly project: string;
|
|
47
|
+
readonly repository: string;
|
|
48
|
+
readonly authMethod: "az-cli" | "pat";
|
|
49
|
+
readonly defaultSyncDirection: "push" | "pull" | "bidirectional";
|
|
50
|
+
readonly autoDetectTemplate: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** MCP Server bounded context configuration. */
|
|
53
|
+
export interface McpServerConfig {
|
|
54
|
+
readonly transport: "stdio";
|
|
55
|
+
readonly enabledTools: readonly string[] | null;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Auto-verification strategy for a gate task.
|
|
59
|
+
* - "ac-met": auto-verifies by checking all acceptance criteria are met
|
|
60
|
+
* - "none": requires manual evidence from the agent
|
|
61
|
+
*/
|
|
62
|
+
export type AutoVerifyType = "ac-met" | "none";
|
|
63
|
+
/**
|
|
64
|
+
* Definition of a single gate task for a kanban phase.
|
|
65
|
+
* Gate tasks are PROCESS criteria (separate from product AC).
|
|
66
|
+
* Configured in jarvis.yaml under kanban.gateTasks.
|
|
67
|
+
*/
|
|
68
|
+
export interface GateTaskDefinition {
|
|
69
|
+
readonly description: string;
|
|
70
|
+
readonly required: boolean;
|
|
71
|
+
readonly autoVerify: AutoVerifyType;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Kanban bounded context configuration.
|
|
75
|
+
* Controls gate tasks per phase and transition timing.
|
|
76
|
+
*/
|
|
77
|
+
export interface KanbanConfig {
|
|
78
|
+
/** Gate task definitions per kanban phase (exit criteria). */
|
|
79
|
+
readonly gateTasks: Readonly<Record<string, readonly GateTaskDefinition[]>>;
|
|
80
|
+
/** Minimum seconds between status transitions (prevents rubber-stamping). */
|
|
81
|
+
readonly minTransitionIntervalSecs: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Maps context names to their typed config interfaces.
|
|
85
|
+
* Used by ConfigService for type-safe config retrieval.
|
|
86
|
+
*/
|
|
87
|
+
export interface ConfigMap {
|
|
88
|
+
rag: RagConfig;
|
|
89
|
+
pipeline: PipelineConfig;
|
|
90
|
+
"agent-registry": AgentRegistryConfig;
|
|
91
|
+
"azure-sync": AzureSyncConfig;
|
|
92
|
+
"mcp-server": McpServerConfig;
|
|
93
|
+
kanban: KanbanConfig;
|
|
94
|
+
}
|
|
95
|
+
/** Default RAG configuration (used when YAML is absent or incomplete). */
|
|
96
|
+
export declare const DEFAULT_RAG_CONFIG: RagConfig;
|
|
97
|
+
/** Default Pipeline configuration. */
|
|
98
|
+
export declare const DEFAULT_PIPELINE_CONFIG: PipelineConfig;
|
|
99
|
+
/** Default Agent Registry configuration. */
|
|
100
|
+
export declare const DEFAULT_AGENT_REGISTRY_CONFIG: AgentRegistryConfig;
|
|
101
|
+
/** Default Azure Sync configuration. */
|
|
102
|
+
export declare const DEFAULT_AZURE_SYNC_CONFIG: AzureSyncConfig;
|
|
103
|
+
/** Default MCP Server configuration. */
|
|
104
|
+
export declare const DEFAULT_MCP_SERVER_CONFIG: McpServerConfig;
|
|
105
|
+
/** Default Kanban configuration with gate tasks per phase. */
|
|
106
|
+
export declare const DEFAULT_KANBAN_CONFIG: KanbanConfig;
|
|
107
|
+
/**
|
|
108
|
+
* All defaults indexed by context name.
|
|
109
|
+
* Used by ConfigService for fallback resolution.
|
|
110
|
+
*/
|
|
111
|
+
export declare const CONFIG_DEFAULTS: Readonly<Record<string, unknown>>;
|
|
112
|
+
//# sourceMappingURL=value-objects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-objects.d.ts","sourceRoot":"","sources":["../../../src/domain/config/value-objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GACzB,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,QAAQ,GACR,YAAY,GACZ,eAAe,GACf,OAAO,GACP,oBAAoB,GACpB,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,YAAY,CAAC;AAIjB,qDAAqD;AACrD,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 -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration Domain — Value Objects
|
|
3
|
+
*
|
|
4
|
+
* Immutable types for the configuration bounded context.
|
|
5
|
+
* Zero external dependencies (pure domain).
|
|
6
|
+
*
|
|
7
|
+
* SOLID: SRP — config type definitions only
|
|
8
|
+
* SOLID: OCP — new context configs added by extending typed interfaces
|
|
9
|
+
* DDD: Value Objects with no identity, compared by value
|
|
10
|
+
*/
|
|
11
|
+
// ─── Defaults ────────────────────────────────────────────────────────────────
|
|
12
|
+
/** Default RAG configuration (used when YAML is absent or incomplete). */
|
|
13
|
+
export const DEFAULT_RAG_CONFIG = {
|
|
14
|
+
ollama: {
|
|
15
|
+
url: "http://localhost:11434",
|
|
16
|
+
model: "embeddinggemma",
|
|
17
|
+
dimensions: 768,
|
|
18
|
+
},
|
|
19
|
+
storage: {
|
|
20
|
+
persistRoot: ".jarvis/rag",
|
|
21
|
+
},
|
|
22
|
+
chunks: {
|
|
23
|
+
python: { chunkSize: 900, chunkOverlap: 120 },
|
|
24
|
+
js: { chunkSize: 900, chunkOverlap: 120 },
|
|
25
|
+
go: { chunkSize: 900, chunkOverlap: 120 },
|
|
26
|
+
java: { chunkSize: 950, chunkOverlap: 130 },
|
|
27
|
+
rust: { chunkSize: 850, chunkOverlap: 110 },
|
|
28
|
+
swift: { chunkSize: 850, chunkOverlap: 110 },
|
|
29
|
+
markdown: { chunkSize: 300, chunkOverlap: 40 },
|
|
30
|
+
cpp: { chunkSize: 900, chunkOverlap: 120 },
|
|
31
|
+
ruby: { chunkSize: 900, chunkOverlap: 120 },
|
|
32
|
+
scala: { chunkSize: 900, chunkOverlap: 120 },
|
|
33
|
+
php: { chunkSize: 900, chunkOverlap: 120 },
|
|
34
|
+
html: { chunkSize: 800, chunkOverlap: 100 },
|
|
35
|
+
default: { chunkSize: 500, chunkOverlap: 50 },
|
|
36
|
+
},
|
|
37
|
+
markdownSplitByHeaders: true,
|
|
38
|
+
};
|
|
39
|
+
/** Default Pipeline configuration. */
|
|
40
|
+
export const DEFAULT_PIPELINE_CONFIG = {
|
|
41
|
+
defaultTimeoutMs: 300_000,
|
|
42
|
+
checkTimeoutMs: 10_000,
|
|
43
|
+
};
|
|
44
|
+
/** Default Agent Registry configuration. */
|
|
45
|
+
export const DEFAULT_AGENT_REGISTRY_CONFIG = {
|
|
46
|
+
defaultModel: "default",
|
|
47
|
+
};
|
|
48
|
+
/** Default Azure Sync configuration. */
|
|
49
|
+
export const DEFAULT_AZURE_SYNC_CONFIG = {
|
|
50
|
+
organization: "",
|
|
51
|
+
project: "",
|
|
52
|
+
repository: "",
|
|
53
|
+
authMethod: "az-cli",
|
|
54
|
+
defaultSyncDirection: "push",
|
|
55
|
+
autoDetectTemplate: true,
|
|
56
|
+
};
|
|
57
|
+
/** Default MCP Server configuration. */
|
|
58
|
+
export const DEFAULT_MCP_SERVER_CONFIG = {
|
|
59
|
+
transport: "stdio",
|
|
60
|
+
enabledTools: null,
|
|
61
|
+
};
|
|
62
|
+
/** Default Kanban configuration with gate tasks per phase. */
|
|
63
|
+
export const DEFAULT_KANBAN_CONFIG = {
|
|
64
|
+
gateTasks: {
|
|
65
|
+
doing: [
|
|
66
|
+
{ description: "Code changes committed to feature branch", required: true, autoVerify: "none" },
|
|
67
|
+
{ description: "tsc --noEmit passes with zero errors", required: true, autoVerify: "none" },
|
|
68
|
+
{ description: "All tests pass", required: true, autoVerify: "none" },
|
|
69
|
+
],
|
|
70
|
+
review: [
|
|
71
|
+
{ description: "All acceptance criteria met", required: true, autoVerify: "ac-met" },
|
|
72
|
+
{ description: "Code reviewed or self-reviewed with evidence", required: true, autoVerify: "none" },
|
|
73
|
+
],
|
|
74
|
+
tested: [
|
|
75
|
+
{ description: "All acceptance criteria met", required: true, autoVerify: "ac-met" },
|
|
76
|
+
{ description: "Merged to main or PR approved", required: true, autoVerify: "none" },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
minTransitionIntervalSecs: 30,
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* All defaults indexed by context name.
|
|
83
|
+
* Used by ConfigService for fallback resolution.
|
|
84
|
+
*/
|
|
85
|
+
export const CONFIG_DEFAULTS = {
|
|
86
|
+
rag: DEFAULT_RAG_CONFIG,
|
|
87
|
+
pipeline: DEFAULT_PIPELINE_CONFIG,
|
|
88
|
+
"agent-registry": DEFAULT_AGENT_REGISTRY_CONFIG,
|
|
89
|
+
"azure-sync": DEFAULT_AZURE_SYNC_CONFIG,
|
|
90
|
+
"mcp-server": DEFAULT_MCP_SERVER_CONFIG,
|
|
91
|
+
kanban: DEFAULT_KANBAN_CONFIG,
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=value-objects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-objects.js","sourceRoot":"","sources":["../../../src/domain/config/value-objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqHH,gFAAgF;AAEhF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAc;IAC3C,MAAM,EAAE;QACN,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE,gBAAgB;QACvB,UAAU,EAAE,GAAG;KAChB;IACD,OAAO,EAAE;QACP,WAAW,EAAE,aAAa;KAC3B;IACD,MAAM,EAAE;QACN,MAAM,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;QAC7C,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;QACzC,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;QACzC,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;QAC3C,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE;QAC3C,KAAK,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YA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