@ai-dev-orchestrator/schemas 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -0
  3. package/dist/artifacts/agreement-artifacts.d.ts +311 -0
  4. package/dist/artifacts/agreement-artifacts.js +48 -0
  5. package/dist/artifacts/artifact-dependency-graph.d.ts +775 -0
  6. package/dist/artifacts/artifact-dependency-graph.js +57 -0
  7. package/dist/artifacts/artifact-system.d.ts +657 -0
  8. package/dist/artifacts/artifact-system.js +124 -0
  9. package/dist/artifacts/index.d.ts +3 -0
  10. package/dist/artifacts/index.js +3 -0
  11. package/dist/config/configuration.d.ts +324 -0
  12. package/dist/config/configuration.js +93 -0
  13. package/dist/config/event-bus-config.d.ts +153 -0
  14. package/dist/config/event-bus-config.js +27 -0
  15. package/dist/config/event-payloads.d.ts +919 -0
  16. package/dist/config/event-payloads.js +304 -0
  17. package/dist/config/event-system.d.ts +3231 -0
  18. package/dist/config/event-system.js +428 -0
  19. package/dist/config/event-types.d.ts +62 -0
  20. package/dist/config/event-types.js +66 -0
  21. package/dist/config/index.d.ts +5 -0
  22. package/dist/config/index.js +5 -0
  23. package/dist/dashboard/dashboard-api.d.ts +149 -0
  24. package/dist/dashboard/dashboard-api.js +80 -0
  25. package/dist/dashboard/dashboard-domain.d.ts +1076 -0
  26. package/dist/dashboard/dashboard-domain.js +305 -0
  27. package/dist/dashboard/index.d.ts +3 -0
  28. package/dist/dashboard/index.js +3 -0
  29. package/dist/dashboard/run-creation-params.d.ts +111 -0
  30. package/dist/dashboard/run-creation-params.js +14 -0
  31. package/dist/governance/governance.d.ts +1119 -0
  32. package/dist/governance/governance.js +111 -0
  33. package/dist/governance/index.d.ts +3 -0
  34. package/dist/governance/index.js +3 -0
  35. package/dist/governance/policy-engine.d.ts +634 -0
  36. package/dist/governance/policy-engine.js +214 -0
  37. package/dist/governance/review-resolution.d.ts +1053 -0
  38. package/dist/governance/review-resolution.js +67 -0
  39. package/dist/index.d.ts +10 -0
  40. package/dist/index.js +10 -0
  41. package/dist/observability/diagnostics.d.ts +185 -0
  42. package/dist/observability/diagnostics.js +63 -0
  43. package/dist/observability/index.d.ts +2 -0
  44. package/dist/observability/index.js +2 -0
  45. package/dist/observability/metrics.d.ts +187 -0
  46. package/dist/observability/metrics.js +67 -0
  47. package/dist/persistence/execution-analytics.d.ts +173 -0
  48. package/dist/persistence/execution-analytics.js +71 -0
  49. package/dist/persistence/index.d.ts +5 -0
  50. package/dist/persistence/index.js +5 -0
  51. package/dist/persistence/project-context.d.ts +164 -0
  52. package/dist/persistence/project-context.js +88 -0
  53. package/dist/persistence/repository-model.d.ts +27 -0
  54. package/dist/persistence/repository-model.js +16 -0
  55. package/dist/persistence/run-manifest.d.ts +422 -0
  56. package/dist/persistence/run-manifest.js +118 -0
  57. package/dist/persistence/state-persistence.d.ts +276 -0
  58. package/dist/persistence/state-persistence.js +83 -0
  59. package/dist/runner/built-in-runner-ids.d.ts +8 -0
  60. package/dist/runner/built-in-runner-ids.js +11 -0
  61. package/dist/runner/collaboration-model.d.ts +100 -0
  62. package/dist/runner/collaboration-model.js +19 -0
  63. package/dist/runner/confidence.d.ts +17 -0
  64. package/dist/runner/confidence.js +11 -0
  65. package/dist/runner/index.d.ts +8 -0
  66. package/dist/runner/index.js +8 -0
  67. package/dist/runner/permission-approval.d.ts +38 -0
  68. package/dist/runner/permission-approval.js +14 -0
  69. package/dist/runner/prompt-engine.d.ts +1467 -0
  70. package/dist/runner/prompt-engine.js +193 -0
  71. package/dist/runner/role-system.d.ts +458 -0
  72. package/dist/runner/role-system.js +94 -0
  73. package/dist/runner/runner-system.d.ts +1721 -0
  74. package/dist/runner/runner-system.js +268 -0
  75. package/dist/runner/task-brief.d.ts +18 -0
  76. package/dist/runner/task-brief.js +12 -0
  77. package/dist/shared/index.d.ts +3 -0
  78. package/dist/shared/index.js +3 -0
  79. package/dist/shared/shared.d.ts +30 -0
  80. package/dist/shared/shared.js +27 -0
  81. package/dist/shared/string-enums.d.ts +59 -0
  82. package/dist/shared/string-enums.js +24 -0
  83. package/dist/shared/utils.d.ts +25 -0
  84. package/dist/shared/utils.js +22 -0
  85. package/dist/specification/canonical-specification.d.ts +475 -0
  86. package/dist/specification/canonical-specification.js +151 -0
  87. package/dist/specification/index.d.ts +3 -0
  88. package/dist/specification/index.js +3 -0
  89. package/dist/specification/intake.d.ts +419 -0
  90. package/dist/specification/intake.js +70 -0
  91. package/dist/specification/iteration-contracts.d.ts +421 -0
  92. package/dist/specification/iteration-contracts.js +61 -0
  93. package/dist/workflow/index.d.ts +4 -0
  94. package/dist/workflow/index.js +4 -0
  95. package/dist/workflow/workflow-dsl.d.ts +81 -0
  96. package/dist/workflow/workflow-dsl.js +38 -0
  97. package/dist/workflow/workflow-engine.d.ts +5788 -0
  98. package/dist/workflow/workflow-engine.js +414 -0
  99. package/dist/workflow/workflow-file.d.ts +331 -0
  100. package/dist/workflow/workflow-file.js +41 -0
  101. package/dist/workflow/workflow-journal.d.ts +520 -0
  102. package/dist/workflow/workflow-journal.js +151 -0
  103. package/package.json +39 -0
@@ -0,0 +1,94 @@
1
+ import { z } from 'zod/v4';
2
+ import { artifactTypeSchema } from '../artifacts/artifact-system';
3
+ export const ROLE_IDS = [
4
+ 'requirements_analyst',
5
+ 'context_analyst',
6
+ 'codebase_analyst',
7
+ 'planner',
8
+ 'plan_reviewer',
9
+ 'implementer',
10
+ 'test_engineer',
11
+ 'static_reviewer',
12
+ 'security_reviewer',
13
+ 'performance_reviewer',
14
+ 'adversarial_reviewer',
15
+ 'design_reviewer',
16
+ 'docs_reviewer',
17
+ 'ux_reviewer',
18
+ 'report_synthesizer',
19
+ 'remediation_triage',
20
+ 'judge',
21
+ 'verifier',
22
+ 'summary_writer',
23
+ 'review_findings_writer',
24
+ 'acceptance_validator',
25
+ 'breakdown_analyst',
26
+ 'decomposer',
27
+ 'decomposition_reviewer',
28
+ 'task_spec_writer',
29
+ ];
30
+ export const roleIdSchema = z.enum(ROLE_IDS);
31
+ export const modelCapabilitySchema = z.enum([
32
+ 'code_generation',
33
+ 'code_review',
34
+ 'reasoning',
35
+ 'long_context',
36
+ 'structured_output',
37
+ 'vision',
38
+ 'external_data_fetch',
39
+ ]);
40
+ export const agentConfigSchema = z.object({
41
+ model: z.string().optional(),
42
+ timeoutMs: z.number().optional(),
43
+ instructions: z.string().optional(),
44
+ command: z.string().optional(),
45
+ args: z.array(z.string()).readonly().optional(),
46
+ handshakeTimeoutMs: z.number().optional(),
47
+ liveRequestTimeoutMs: z.number().optional(),
48
+ endpoint: z.string().optional(),
49
+ authHeader: z.string().optional(),
50
+ pollIntervalMs: z.number().optional(),
51
+ maxTurns: z.number().positive().optional(),
52
+ });
53
+ export const agreementParticipationSchema = z.object({
54
+ agreementType: z.string(),
55
+ action: z.enum(['produced', 'reviewed', 'approved']),
56
+ });
57
+ export const DISPATCH_TYPES = ['agent'];
58
+ export const dispatchTypeSchema = z.enum(DISPATCH_TYPES);
59
+ export const roleContractSchema = z.object({
60
+ id: roleIdSchema,
61
+ name: z.string(),
62
+ description: z.string(),
63
+ ownedArtifacts: z.array(artifactTypeSchema).readonly(),
64
+ readableArtifacts: z.array(artifactTypeSchema).readonly(),
65
+ forbiddenArtifacts: z.array(artifactTypeSchema).readonly(),
66
+ reviewedBy: z.array(roleIdSchema).readonly(),
67
+ reviews: z.array(roleIdSchema).readonly(),
68
+ agreementParticipation: z.array(agreementParticipationSchema).readonly(),
69
+ requiredCapabilities: z.array(modelCapabilitySchema).readonly(),
70
+ dispatchType: dispatchTypeSchema,
71
+ runner: z.string().optional(),
72
+ agentConfig: agentConfigSchema.optional(),
73
+ });
74
+ export const modelAssignmentSchema = z.object({
75
+ roleId: roleIdSchema,
76
+ model: z.string(),
77
+ maxTokens: z.number().optional(),
78
+ systemPrompt: z.string().optional(),
79
+ parameters: z.record(z.string(), z.unknown()).optional(),
80
+ });
81
+ export const roleValidationErrorSchema = z.object({
82
+ roleId: roleIdSchema,
83
+ field: z.string(),
84
+ message: z.string(),
85
+ });
86
+ export const roleValidationWarningSchema = z.object({
87
+ roleId: roleIdSchema,
88
+ message: z.string(),
89
+ });
90
+ export const roleValidationResultSchema = z.object({
91
+ valid: z.boolean(),
92
+ errors: z.array(roleValidationErrorSchema).readonly(),
93
+ warnings: z.array(roleValidationWarningSchema).readonly(),
94
+ });