@schnick371/devsteps-shared 0.8.5 → 1.0.0-next.2
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/README.md +8 -3
- package/dist/constants/index.d.ts +26 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +26 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/core/add.d.ts +7 -0
- package/dist/core/add.d.ts.map +1 -1
- package/dist/core/add.js +9 -2
- package/dist/core/add.js.map +1 -1
- package/dist/core/archive.d.ts +7 -0
- package/dist/core/archive.d.ts.map +1 -1
- package/dist/core/archive.js +30 -20
- package/dist/core/archive.js.map +1 -1
- package/dist/core/auto-migrate-detect.d.ts +61 -0
- package/dist/core/auto-migrate-detect.d.ts.map +1 -0
- package/dist/core/auto-migrate-detect.js +68 -0
- package/dist/core/auto-migrate-detect.js.map +1 -0
- package/dist/core/auto-migrate-impl.d.ts +32 -0
- package/dist/core/auto-migrate-impl.d.ts.map +1 -0
- package/dist/core/auto-migrate-impl.js +120 -0
- package/dist/core/auto-migrate-impl.js.map +1 -0
- package/dist/core/auto-migrate.d.ts +16 -131
- package/dist/core/auto-migrate.d.ts.map +1 -1
- package/dist/core/auto-migrate.js +25 -318
- package/dist/core/auto-migrate.js.map +1 -1
- package/dist/core/auto-migrate.test.js +11 -7
- package/dist/core/auto-migrate.test.js.map +1 -1
- package/dist/core/bulk-update.d.ts +7 -0
- package/dist/core/bulk-update.d.ts.map +1 -1
- package/dist/core/bulk-update.js +8 -1
- package/dist/core/bulk-update.js.map +1 -1
- package/dist/core/config.d.ts +7 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +7 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/context.d.ts +9 -0
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +9 -0
- package/dist/core/context.js.map +1 -1
- package/dist/core/get.d.ts +7 -0
- package/dist/core/get.d.ts.map +1 -1
- package/dist/core/get.js +8 -1
- package/dist/core/get.js.map +1 -1
- package/dist/core/index-rebuild.d.ts +3 -0
- package/dist/core/index-rebuild.d.ts.map +1 -1
- package/dist/core/index-rebuild.js +11 -8
- package/dist/core/index-rebuild.js.map +1 -1
- package/dist/core/index-rebuild.test.js +6 -15
- package/dist/core/index-rebuild.test.js.map +1 -1
- package/dist/core/index-refs-core.d.ts +114 -0
- package/dist/core/index-refs-core.d.ts.map +1 -0
- package/dist/core/index-refs-core.js +306 -0
- package/dist/core/index-refs-core.js.map +1 -0
- package/dist/core/index-refs.d.ts +9 -124
- package/dist/core/index-refs.d.ts.map +1 -1
- package/dist/core/index-refs.js +19 -345
- package/dist/core/index-refs.js.map +1 -1
- package/dist/core/index-refs.test.js +3 -3
- package/dist/core/index-refs.test.js.map +1 -1
- package/dist/core/index.d.ts +19 -10
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +19 -10
- package/dist/core/index.js.map +1 -1
- package/dist/core/link.d.ts +33 -0
- package/dist/core/link.d.ts.map +1 -0
- package/dist/core/link.js +102 -0
- package/dist/core/link.js.map +1 -0
- package/dist/core/list.d.ts +8 -0
- package/dist/core/list.d.ts.map +1 -1
- package/dist/core/list.js +82 -5
- package/dist/core/list.js.map +1 -1
- package/dist/core/unlink.d.ts +26 -0
- package/dist/core/unlink.d.ts.map +1 -0
- package/dist/core/unlink.js +78 -0
- package/dist/core/unlink.js.map +1 -0
- package/dist/core/update.d.ts +7 -0
- package/dist/core/update.d.ts.map +1 -1
- package/dist/core/update.js +16 -8
- package/dist/core/update.js.map +1 -1
- package/dist/core/validation.d.ts +26 -1
- package/dist/core/validation.d.ts.map +1 -1
- package/dist/core/validation.js +65 -4
- package/dist/core/validation.js.map +1 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/schemas/analysis.d.ts +206 -0
- package/dist/schemas/analysis.d.ts.map +1 -0
- package/dist/schemas/analysis.js +138 -0
- package/dist/schemas/analysis.js.map +1 -0
- package/dist/schemas/cbp-loops.d.ts +154 -0
- package/dist/schemas/cbp-loops.d.ts.map +1 -0
- package/dist/schemas/cbp-loops.js +160 -0
- package/dist/schemas/cbp-loops.js.map +1 -0
- package/dist/schemas/cbp-loops.test.d.ts +10 -0
- package/dist/schemas/cbp-loops.test.d.ts.map +1 -0
- package/dist/schemas/cbp-loops.test.js +268 -0
- package/dist/schemas/cbp-loops.test.js.map +1 -0
- package/dist/schemas/cbp-mandate.d.ts +107 -0
- package/dist/schemas/cbp-mandate.d.ts.map +1 -0
- package/dist/schemas/cbp-mandate.js +107 -0
- package/dist/schemas/cbp-mandate.js.map +1 -0
- package/dist/schemas/cbp-mandate.test.d.ts +10 -0
- package/dist/schemas/cbp-mandate.test.d.ts.map +1 -0
- package/dist/schemas/cbp-mandate.test.js +188 -0
- package/dist/schemas/cbp-mandate.test.js.map +1 -0
- package/dist/schemas/index-refs.schema.d.ts +4 -1
- package/dist/schemas/index-refs.schema.d.ts.map +1 -1
- package/dist/schemas/index-refs.schema.js +24 -3
- package/dist/schemas/index-refs.schema.js.map +1 -1
- package/dist/schemas/index.d.ts +17 -7
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +14 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/project.d.ts +7 -0
- package/dist/schemas/project.d.ts.map +1 -1
- package/dist/schemas/project.js +7 -0
- package/dist/schemas/project.js.map +1 -1
- package/dist/schemas/relationships.d.ts +3 -0
- package/dist/schemas/relationships.d.ts.map +1 -1
- package/dist/schemas/relationships.js +3 -0
- package/dist/schemas/relationships.js.map +1 -1
- package/dist/types/commands.d.ts +7 -0
- package/dist/types/commands.d.ts.map +1 -1
- package/dist/types/commands.js +7 -0
- package/dist/types/commands.js.map +1 -1
- package/dist/types/index-refs.types.d.ts +3 -0
- package/dist/types/index-refs.types.d.ts.map +1 -1
- package/dist/types/index-refs.types.js +3 -0
- package/dist/types/index-refs.types.js.map +1 -1
- package/dist/types/index.d.ts +9 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/cache.d.ts +7 -0
- package/dist/utils/cache.d.ts.map +1 -1
- package/dist/utils/cache.js +7 -0
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/index.d.ts +9 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +26 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/init-helpers.d.ts +30 -0
- package/dist/utils/init-helpers.d.ts.map +1 -0
- package/dist/utils/init-helpers.js +134 -0
- package/dist/utils/init-helpers.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2025 Thomas Hertel (the@devsteps.dev)
|
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
|
4
|
+
*
|
|
5
|
+
* Context Budget Protocol (CBP) — Tier-2 Mandate Schemas
|
|
6
|
+
* Zod schemas for T2 mandate dispatch and result envelopes.
|
|
7
|
+
*
|
|
8
|
+
* @see EPIC-028 CBP Tier-2 Mandate Tools
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/**
|
|
12
|
+
* Context Budget Protocol (CBP) — Tier-2 Mandate Schemas
|
|
13
|
+
*
|
|
14
|
+
* Defines structured JSON envelopes for Tier-1 ↔ Tier-2 agent handoffs.
|
|
15
|
+
* Tier-1 dispatches Mandates to Tier-2 Deep Analysts.
|
|
16
|
+
* Tier-2 writes MandateResult to disk and returns ~800-token synthesis to Tier-1.
|
|
17
|
+
*
|
|
18
|
+
* Storage path: .devsteps/cbp/[sprint_id]/[mandate_id].result.json
|
|
19
|
+
*
|
|
20
|
+
* @see EPIC-028 N-Tier Agent Hierarchy
|
|
21
|
+
* @see STORY-108 MandateResult CBP Extension
|
|
22
|
+
*/
|
|
23
|
+
export declare const MandateType: z.ZodEnum<{
|
|
24
|
+
risk: "risk";
|
|
25
|
+
archaeology: "archaeology";
|
|
26
|
+
"archaeology-delta": "archaeology-delta";
|
|
27
|
+
"risk-batch": "risk-batch";
|
|
28
|
+
research: "research";
|
|
29
|
+
"quality-review": "quality-review";
|
|
30
|
+
planning: "planning";
|
|
31
|
+
"planning-rerank": "planning-rerank";
|
|
32
|
+
}>;
|
|
33
|
+
export type MandateType = z.infer<typeof MandateType>;
|
|
34
|
+
export declare const TriageTier: z.ZodEnum<{
|
|
35
|
+
QUICK: "QUICK";
|
|
36
|
+
STANDARD: "STANDARD";
|
|
37
|
+
FULL: "FULL";
|
|
38
|
+
COMPETITIVE: "COMPETITIVE";
|
|
39
|
+
}>;
|
|
40
|
+
export type TriageTier = z.infer<typeof TriageTier>;
|
|
41
|
+
export declare const MandateResultStatus: z.ZodEnum<{
|
|
42
|
+
escalated: "escalated";
|
|
43
|
+
complete: "complete";
|
|
44
|
+
partial: "partial";
|
|
45
|
+
}>;
|
|
46
|
+
export type MandateResultStatus = z.infer<typeof MandateResultStatus>;
|
|
47
|
+
/**
|
|
48
|
+
* Tier-1 → Tier-2: A Mandate is dispatched by Tier-1 to a Tier-2 Deep Analyst.
|
|
49
|
+
* Contains the context for the analyst to decompose into Tier-3 sub-questions.
|
|
50
|
+
*
|
|
51
|
+
* NOT written to disk directly — passed as argument to the runSubagent call.
|
|
52
|
+
* Tier-2 agents receive this as structured input.
|
|
53
|
+
*/
|
|
54
|
+
export declare const MandateSchema: z.ZodObject<{
|
|
55
|
+
mandate_id: z.ZodString;
|
|
56
|
+
type: z.ZodEnum<{
|
|
57
|
+
risk: "risk";
|
|
58
|
+
archaeology: "archaeology";
|
|
59
|
+
"archaeology-delta": "archaeology-delta";
|
|
60
|
+
"risk-batch": "risk-batch";
|
|
61
|
+
research: "research";
|
|
62
|
+
"quality-review": "quality-review";
|
|
63
|
+
planning: "planning";
|
|
64
|
+
"planning-rerank": "planning-rerank";
|
|
65
|
+
}>;
|
|
66
|
+
sprint_id: z.ZodString;
|
|
67
|
+
item_ids: z.ZodArray<z.ZodString>;
|
|
68
|
+
triage_tier: z.ZodEnum<{
|
|
69
|
+
QUICK: "QUICK";
|
|
70
|
+
STANDARD: "STANDARD";
|
|
71
|
+
FULL: "FULL";
|
|
72
|
+
COMPETITIVE: "COMPETITIVE";
|
|
73
|
+
}>;
|
|
74
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
75
|
+
dispatched_at: z.ZodString;
|
|
76
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export type Mandate = z.infer<typeof MandateSchema>;
|
|
79
|
+
/**
|
|
80
|
+
* Tier-2 → Tier-1: A MandateResult is written to disk by a Tier-2 Deep Analyst
|
|
81
|
+
* after synthesizing all Tier-3 sub-question answers.
|
|
82
|
+
*
|
|
83
|
+
* Storage: .devsteps/cbp/[sprint_id]/[mandate_id].result.json
|
|
84
|
+
* Tier-1 reads via read_mandate_results() — never reads T3 envelopes directly.
|
|
85
|
+
*
|
|
86
|
+
* Max ~800 tokens in findings field — enforced by schema.
|
|
87
|
+
*/
|
|
88
|
+
export declare const MandateResultSchema: z.ZodObject<{
|
|
89
|
+
mandate_id: z.ZodString;
|
|
90
|
+
item_ids: z.ZodArray<z.ZodString>;
|
|
91
|
+
sprint_id: z.ZodString;
|
|
92
|
+
analyst: z.ZodString;
|
|
93
|
+
status: z.ZodEnum<{
|
|
94
|
+
escalated: "escalated";
|
|
95
|
+
complete: "complete";
|
|
96
|
+
partial: "partial";
|
|
97
|
+
}>;
|
|
98
|
+
findings: z.ZodString;
|
|
99
|
+
recommendations: z.ZodArray<z.ZodString>;
|
|
100
|
+
confidence: z.ZodNumber;
|
|
101
|
+
token_cost: z.ZodNumber;
|
|
102
|
+
completed_at: z.ZodString;
|
|
103
|
+
escalation_reason: z.ZodOptional<z.ZodString>;
|
|
104
|
+
schema_version: z.ZodDefault<z.ZodLiteral<"1.0">>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export type MandateResult = z.infer<typeof MandateResultSchema>;
|
|
107
|
+
//# sourceMappingURL=cbp-mandate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbp-mandate.d.ts","sourceRoot":"","sources":["../../src/schemas/cbp-mandate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AAIH,eAAO,MAAM,WAAW;;;;;;;;;EAStB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAItD,eAAO,MAAM,UAAU;;;;;EAAuD,CAAC;AAC/E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAIpD,eAAO,MAAM,mBAAmB;;;;EAI9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAItE;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;iBAiBxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAIpD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;iBA4B9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2025 Thomas Hertel (the@devsteps.dev)
|
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
|
4
|
+
*
|
|
5
|
+
* Context Budget Protocol (CBP) — Tier-2 Mandate Schemas
|
|
6
|
+
* Zod schemas for T2 mandate dispatch and result envelopes.
|
|
7
|
+
*
|
|
8
|
+
* @see EPIC-028 CBP Tier-2 Mandate Tools
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/**
|
|
12
|
+
* Context Budget Protocol (CBP) — Tier-2 Mandate Schemas
|
|
13
|
+
*
|
|
14
|
+
* Defines structured JSON envelopes for Tier-1 ↔ Tier-2 agent handoffs.
|
|
15
|
+
* Tier-1 dispatches Mandates to Tier-2 Deep Analysts.
|
|
16
|
+
* Tier-2 writes MandateResult to disk and returns ~800-token synthesis to Tier-1.
|
|
17
|
+
*
|
|
18
|
+
* Storage path: .devsteps/cbp/[sprint_id]/[mandate_id].result.json
|
|
19
|
+
*
|
|
20
|
+
* @see EPIC-028 N-Tier Agent Hierarchy
|
|
21
|
+
* @see STORY-108 MandateResult CBP Extension
|
|
22
|
+
*/
|
|
23
|
+
// ─── Mandate Type ─────────────────────────────────────────────────────────────
|
|
24
|
+
export const MandateType = z.enum([
|
|
25
|
+
'archaeology', // deep-analyst-archaeology: full scope analysis
|
|
26
|
+
'archaeology-delta', // deep-analyst-archaeology: incremental re-analysis
|
|
27
|
+
'risk', // deep-analyst-risk: single-item risk scoring
|
|
28
|
+
'risk-batch', // deep-analyst-risk: multi-item sprint risk matrix
|
|
29
|
+
'research', // deep-analyst-research: external technical research
|
|
30
|
+
'quality-review', // deep-analyst-quality: post-implementation gate
|
|
31
|
+
'planning', // deep-analyst-planner: atomic step decomposition
|
|
32
|
+
'planning-rerank', // deep-analyst-planner: adaptive sprint resequencing
|
|
33
|
+
]);
|
|
34
|
+
// ─── Triage Tier ─────────────────────────────────────────────────────────────
|
|
35
|
+
export const TriageTier = z.enum(['QUICK', 'STANDARD', 'FULL', 'COMPETITIVE']);
|
|
36
|
+
// ─── MandateResult Status ─────────────────────────────────────────────────────
|
|
37
|
+
export const MandateResultStatus = z.enum([
|
|
38
|
+
'complete', // All sub-questions answered, confidence >= 0.5
|
|
39
|
+
'partial', // Max resolution rounds exhausted, answers incomplete
|
|
40
|
+
'escalated', // Human or higher-tier decision required
|
|
41
|
+
]);
|
|
42
|
+
// ─── MandateSchema ────────────────────────────────────────────────────────────
|
|
43
|
+
/**
|
|
44
|
+
* Tier-1 → Tier-2: A Mandate is dispatched by Tier-1 to a Tier-2 Deep Analyst.
|
|
45
|
+
* Contains the context for the analyst to decompose into Tier-3 sub-questions.
|
|
46
|
+
*
|
|
47
|
+
* NOT written to disk directly — passed as argument to the runSubagent call.
|
|
48
|
+
* Tier-2 agents receive this as structured input.
|
|
49
|
+
*/
|
|
50
|
+
export const MandateSchema = z.object({
|
|
51
|
+
/** Unique ID for correlation between Mandate and MandateResult */
|
|
52
|
+
mandate_id: z.string().uuid(),
|
|
53
|
+
/** Which Tier-2 analyst receives this mandate */
|
|
54
|
+
type: MandateType,
|
|
55
|
+
/** Sprint or item context identifier (used as storage path segment) */
|
|
56
|
+
sprint_id: z.string(),
|
|
57
|
+
/** DevSteps item IDs this mandate covers (single item or batch) */
|
|
58
|
+
item_ids: z.array(z.string().regex(/^(EPIC|STORY|TASK|REQ|FEAT|BUG|SPIKE|TEST)-\d{3,}$/)),
|
|
59
|
+
/** Determines which sub-questions the analyst must answer */
|
|
60
|
+
triage_tier: TriageTier,
|
|
61
|
+
/** Optional Tier-1 context hints (e.g., shared-file conflicts, prior results paths) */
|
|
62
|
+
constraints: z.record(z.string(), z.unknown()).optional(),
|
|
63
|
+
/** ISO 8601 timestamp when this mandate was dispatched */
|
|
64
|
+
dispatched_at: z.string().datetime(),
|
|
65
|
+
/** Token budget hint for the analyst (enforcement is advisory) */
|
|
66
|
+
max_tokens: z.number().int().positive().optional(),
|
|
67
|
+
});
|
|
68
|
+
// ─── MandateResultSchema ──────────────────────────────────────────────────────
|
|
69
|
+
/**
|
|
70
|
+
* Tier-2 → Tier-1: A MandateResult is written to disk by a Tier-2 Deep Analyst
|
|
71
|
+
* after synthesizing all Tier-3 sub-question answers.
|
|
72
|
+
*
|
|
73
|
+
* Storage: .devsteps/cbp/[sprint_id]/[mandate_id].result.json
|
|
74
|
+
* Tier-1 reads via read_mandate_results() — never reads T3 envelopes directly.
|
|
75
|
+
*
|
|
76
|
+
* Max ~800 tokens in findings field — enforced by schema.
|
|
77
|
+
*/
|
|
78
|
+
export const MandateResultSchema = z.object({
|
|
79
|
+
/** Correlates to the originating Mandate.mandate_id */
|
|
80
|
+
mandate_id: z.string().uuid(),
|
|
81
|
+
/** DevSteps item IDs this result covers */
|
|
82
|
+
item_ids: z.array(z.string()),
|
|
83
|
+
/** Sprint ID for file path construction */
|
|
84
|
+
sprint_id: z.string(),
|
|
85
|
+
/** Name of the Tier-2 agent that produced this result */
|
|
86
|
+
analyst: z.string(),
|
|
87
|
+
/** Result completeness indicator */
|
|
88
|
+
status: MandateResultStatus,
|
|
89
|
+
/**
|
|
90
|
+
* Structured synthesis — max ~800 tokens.
|
|
91
|
+
* Should be a markdown table or structured paragraphs answering the mandate.
|
|
92
|
+
*/
|
|
93
|
+
findings: z.string().max(6000), // ~800 tokens ≈ 6000 chars
|
|
94
|
+
/** Top-5 actionable items for Tier-1, max 120 chars each */
|
|
95
|
+
recommendations: z.array(z.string().max(200)).max(5),
|
|
96
|
+
/** 0.0–1.0 confidence in the synthesis quality */
|
|
97
|
+
confidence: z.number().min(0).max(1),
|
|
98
|
+
/** Actual token cost of this analyst invocation (for Tier-1 budget tracking) */
|
|
99
|
+
token_cost: z.number().int().nonnegative(),
|
|
100
|
+
/** ISO 8601 timestamp when this result was written */
|
|
101
|
+
completed_at: z.string().datetime(),
|
|
102
|
+
/** Required when status === "escalated" */
|
|
103
|
+
escalation_reason: z.string().optional(),
|
|
104
|
+
/** Schema version for forward compatibility */
|
|
105
|
+
schema_version: z.literal('1.0').default('1.0'),
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=cbp-mandate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbp-mandate.js","sourceRoot":"","sources":["../../src/schem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CAAC,QAAQ,EAAE;IACnC,2CAA2C;IAC3C,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,+CAA+C;IAC/C,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;CAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit Tests for CBP Tier-2 Mandate Schemas
|
|
3
|
+
*
|
|
4
|
+
* Tests: MandateSchema, MandateResultSchema
|
|
5
|
+
*
|
|
6
|
+
* @see STORY-108 MandateResult CBP Extension
|
|
7
|
+
* @see TASK-233 MandateSchema + MandateResultSchema
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=cbp-mandate.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbp-mandate.test.d.ts","sourceRoot":"","sources":["../../src/schemas/cbp-mandate.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit Tests for CBP Tier-2 Mandate Schemas
|
|
3
|
+
*
|
|
4
|
+
* Tests: MandateSchema, MandateResultSchema
|
|
5
|
+
*
|
|
6
|
+
* @see STORY-108 MandateResult CBP Extension
|
|
7
|
+
* @see TASK-233 MandateSchema + MandateResultSchema
|
|
8
|
+
*/
|
|
9
|
+
import { describe, expect, it } from 'vitest';
|
|
10
|
+
import { MandateResultSchema, MandateResultStatus, MandateSchema, MandateType, TriageTier, } from './cbp-mandate.js';
|
|
11
|
+
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
12
|
+
function validMandate() {
|
|
13
|
+
return {
|
|
14
|
+
mandate_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
|
|
15
|
+
type: 'archaeology',
|
|
16
|
+
sprint_id: 'sprint-2026-02-22',
|
|
17
|
+
item_ids: ['TASK-233'],
|
|
18
|
+
triage_tier: 'STANDARD',
|
|
19
|
+
dispatched_at: '2026-02-22T10:00:00.000Z',
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function validMandateResult() {
|
|
23
|
+
return {
|
|
24
|
+
mandate_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
|
|
25
|
+
item_ids: ['TASK-233'],
|
|
26
|
+
sprint_id: 'sprint-2026-02-22',
|
|
27
|
+
analyst: 'devsteps-t2-archaeology',
|
|
28
|
+
status: 'complete',
|
|
29
|
+
findings: '## Affected Scope\n- packages/shared/src/schemas/cbp-mandate.ts (new)\n- packages/shared/src/schemas/index.ts (export)',
|
|
30
|
+
recommendations: ['Implement MandateSchema first (TASK-233)', 'Export from schemas/index.ts'],
|
|
31
|
+
confidence: 0.9,
|
|
32
|
+
token_cost: 1500,
|
|
33
|
+
completed_at: '2026-02-22T10:05:00.000Z',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
// ─── MandateType enum ─────────────────────────────────────────────────────────
|
|
37
|
+
describe('MandateType', () => {
|
|
38
|
+
it('accepts all valid mandate types', () => {
|
|
39
|
+
const validTypes = [
|
|
40
|
+
'archaeology',
|
|
41
|
+
'archaeology-delta',
|
|
42
|
+
'risk',
|
|
43
|
+
'risk-batch',
|
|
44
|
+
'research',
|
|
45
|
+
'quality-review',
|
|
46
|
+
'planning',
|
|
47
|
+
'planning-rerank',
|
|
48
|
+
];
|
|
49
|
+
for (const type of validTypes) {
|
|
50
|
+
expect(() => MandateType.parse(type)).not.toThrow();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
it('rejects unknown mandate types', () => {
|
|
54
|
+
expect(() => MandateType.parse('unknown-type')).toThrow();
|
|
55
|
+
expect(() => MandateType.parse('impl')).toThrow();
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
// ─── MandateSchema ────────────────────────────────────────────────────────────
|
|
59
|
+
describe('MandateSchema', () => {
|
|
60
|
+
it('parses a valid Mandate', () => {
|
|
61
|
+
const result = MandateSchema.safeParse(validMandate());
|
|
62
|
+
expect(result.success).toBe(true);
|
|
63
|
+
if (result.success) {
|
|
64
|
+
expect(result.data.mandate_id).toBe('a1b2c3d4-e5f6-7890-abcd-ef1234567890');
|
|
65
|
+
expect(result.data.type).toBe('archaeology');
|
|
66
|
+
expect(result.data.item_ids).toEqual(['TASK-233']);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
it('rejects invalid UUID for mandate_id', () => {
|
|
70
|
+
const badMandate = { ...validMandate(), mandate_id: 'not-a-uuid' };
|
|
71
|
+
const result = MandateSchema.safeParse(badMandate);
|
|
72
|
+
expect(result.success).toBe(false);
|
|
73
|
+
});
|
|
74
|
+
it('rejects invalid item ID format', () => {
|
|
75
|
+
const badMandate = { ...validMandate(), item_ids: ['XYZ-123'] }; // Invalid prefix
|
|
76
|
+
const result = MandateSchema.safeParse(badMandate);
|
|
77
|
+
expect(result.success).toBe(false);
|
|
78
|
+
});
|
|
79
|
+
it('accepts valid item ID formats', () => {
|
|
80
|
+
const itemIds = ['EPIC-001', 'STORY-108', 'TASK-233', 'BUG-042', 'SPIKE-015'];
|
|
81
|
+
const result = MandateSchema.safeParse({ ...validMandate(), item_ids: itemIds });
|
|
82
|
+
expect(result.success).toBe(true);
|
|
83
|
+
});
|
|
84
|
+
it('rejects invalid triage tier', () => {
|
|
85
|
+
const badMandate = { ...validMandate(), triage_tier: 'ULTRA' };
|
|
86
|
+
const result = MandateSchema.safeParse(badMandate);
|
|
87
|
+
expect(result.success).toBe(false);
|
|
88
|
+
});
|
|
89
|
+
it('allows optional constraints field', () => {
|
|
90
|
+
const withConstraints = {
|
|
91
|
+
...validMandate(),
|
|
92
|
+
constraints: { shared_file_conflicts: ['packages/shared/index.ts'] },
|
|
93
|
+
};
|
|
94
|
+
const result = MandateSchema.safeParse(withConstraints);
|
|
95
|
+
expect(result.success).toBe(true);
|
|
96
|
+
});
|
|
97
|
+
it('allows optional max_tokens field', () => {
|
|
98
|
+
const result = MandateSchema.safeParse({ ...validMandate(), max_tokens: 10000 });
|
|
99
|
+
expect(result.success).toBe(true);
|
|
100
|
+
});
|
|
101
|
+
it('rejects missing required fields', () => {
|
|
102
|
+
const { mandate_id: _, ...noId } = validMandate();
|
|
103
|
+
expect(MandateSchema.safeParse(noId).success).toBe(false);
|
|
104
|
+
const { sprint_id: __, ...noSprint } = validMandate();
|
|
105
|
+
expect(MandateSchema.safeParse(noSprint).success).toBe(false);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
// ─── MandateResultSchema ──────────────────────────────────────────────────────
|
|
109
|
+
describe('MandateResultSchema', () => {
|
|
110
|
+
it('parses a valid MandateResult', () => {
|
|
111
|
+
const result = MandateResultSchema.safeParse(validMandateResult());
|
|
112
|
+
expect(result.success).toBe(true);
|
|
113
|
+
if (result.success) {
|
|
114
|
+
expect(result.data.analyst).toBe('devsteps-t2-archaeology');
|
|
115
|
+
expect(result.data.status).toBe('complete');
|
|
116
|
+
expect(result.data.confidence).toBe(0.9);
|
|
117
|
+
expect(result.data.schema_version).toBe('1.0');
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
it('defaults schema_version to 1.0', () => {
|
|
121
|
+
const result = MandateResultSchema.parse(validMandateResult());
|
|
122
|
+
expect(result.schema_version).toBe('1.0');
|
|
123
|
+
});
|
|
124
|
+
it('rejects confidence outside 0.0–1.0', () => {
|
|
125
|
+
expect(MandateResultSchema.safeParse({ ...validMandateResult(), confidence: 1.1 }).success).toBe(false);
|
|
126
|
+
expect(MandateResultSchema.safeParse({ ...validMandateResult(), confidence: -0.1 }).success).toBe(false);
|
|
127
|
+
});
|
|
128
|
+
it('rejects findings exceeding 6000 characters', () => {
|
|
129
|
+
const tooLong = 'x'.repeat(6001);
|
|
130
|
+
const result = MandateResultSchema.safeParse({ ...validMandateResult(), findings: tooLong });
|
|
131
|
+
expect(result.success).toBe(false);
|
|
132
|
+
});
|
|
133
|
+
it('accepts findings at exactly 6000 characters', () => {
|
|
134
|
+
const exact = 'x'.repeat(6000);
|
|
135
|
+
const result = MandateResultSchema.safeParse({ ...validMandateResult(), findings: exact });
|
|
136
|
+
expect(result.success).toBe(true);
|
|
137
|
+
});
|
|
138
|
+
it('rejects recommendations with more than 5 items', () => {
|
|
139
|
+
const tooMany = ['a', 'b', 'c', 'd', 'e', 'f']; // 6 items
|
|
140
|
+
const result = MandateResultSchema.safeParse({
|
|
141
|
+
...validMandateResult(),
|
|
142
|
+
recommendations: tooMany,
|
|
143
|
+
});
|
|
144
|
+
expect(result.success).toBe(false);
|
|
145
|
+
});
|
|
146
|
+
it('rejects a recommendation exceeding 200 characters', () => {
|
|
147
|
+
const tooLong = ['x'.repeat(201)];
|
|
148
|
+
const result = MandateResultSchema.safeParse({
|
|
149
|
+
...validMandateResult(),
|
|
150
|
+
recommendations: tooLong,
|
|
151
|
+
});
|
|
152
|
+
expect(result.success).toBe(false);
|
|
153
|
+
});
|
|
154
|
+
it('accepts all valid status values', () => {
|
|
155
|
+
for (const status of ['complete', 'partial', 'escalated']) {
|
|
156
|
+
const result = MandateResultSchema.safeParse({ ...validMandateResult(), status });
|
|
157
|
+
expect(result.success).toBe(true);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
it('requires escalation_reason when status is escalated (validation note: field is optional in schema)', () => {
|
|
161
|
+
// Schema allows escalated without escalation_reason (handler documents it)
|
|
162
|
+
const escalated = { ...validMandateResult(), status: 'escalated' };
|
|
163
|
+
const result = MandateResultSchema.safeParse(escalated);
|
|
164
|
+
expect(result.success).toBe(true);
|
|
165
|
+
});
|
|
166
|
+
it('rejects negative token_cost', () => {
|
|
167
|
+
const result = MandateResultSchema.safeParse({ ...validMandateResult(), token_cost: -1 });
|
|
168
|
+
expect(result.success).toBe(false);
|
|
169
|
+
});
|
|
170
|
+
it('rejects non-integer token_cost', () => {
|
|
171
|
+
const result = MandateResultSchema.safeParse({ ...validMandateResult(), token_cost: 1.5 });
|
|
172
|
+
expect(result.success).toBe(false);
|
|
173
|
+
});
|
|
174
|
+
it('validates TriageTier enum independently', () => {
|
|
175
|
+
expect(() => TriageTier.parse('QUICK')).not.toThrow();
|
|
176
|
+
expect(() => TriageTier.parse('STANDARD')).not.toThrow();
|
|
177
|
+
expect(() => TriageTier.parse('FULL')).not.toThrow();
|
|
178
|
+
expect(() => TriageTier.parse('COMPETITIVE')).not.toThrow();
|
|
179
|
+
expect(() => TriageTier.parse('INVALID')).toThrow();
|
|
180
|
+
});
|
|
181
|
+
it('validates MandateResultStatus enum independently', () => {
|
|
182
|
+
expect(() => MandateResultStatus.parse('complete')).not.toThrow();
|
|
183
|
+
expect(() => MandateResultStatus.parse('partial')).not.toThrow();
|
|
184
|
+
expect(() => MandateResultStatus.parse('escalated')).not.toThrow();
|
|
185
|
+
expect(() => MandateResultStatus.parse('failed')).toThrow();
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
//# sourceMappingURL=cbp-mandate.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbp-mandate.test.js","sourceRoot":"","sources":["../../src/schemas/cbp-mandate.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,kBAAkB,CAAC;AAE1B,gFAAgF;AAEhF,SAAS,YAAY;IACnB,OAAO;QACL,UAAU,EAAE,sCAAsC;QAClD,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,mBAAmB;QAC9B,QAAQ,EAAE,CAAC,UAAU,CAAC;QACtB,WAAW,EAAE,UAAU;QACvB,aAAa,EAAE,0BAA0B;KAC1C,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB;IACzB,OAAO;QACL,UAAU,EAAE,sCAAsC;QAClD,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AAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QAClE,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACjE,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACnE,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Copyright © 2025 Thomas Hertel (the@devsteps.dev)
|
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
|
4
|
+
*
|
|
2
5
|
* Zod Validation Schemas for Refs-Style Index
|
|
3
6
|
*
|
|
4
7
|
* Runtime validation for the distributed index architecture.
|
|
@@ -45,9 +48,9 @@ export declare const StatusIndexSchema: z.ZodObject<{
|
|
|
45
48
|
"in-progress": "in-progress";
|
|
46
49
|
review: "review";
|
|
47
50
|
done: "done";
|
|
48
|
-
obsolete: "obsolete";
|
|
49
51
|
blocked: "blocked";
|
|
50
52
|
cancelled: "cancelled";
|
|
53
|
+
obsolete: "obsolete";
|
|
51
54
|
}>;
|
|
52
55
|
}, z.core.$strip>;
|
|
53
56
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-refs.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/index-refs.schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index-refs.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/index-refs.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;iBAS9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;iBAE1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;iBAW5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;iBAO9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,cAAc,uCAM1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;iBAO3B,CAAC;AAEH;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAExF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAEhF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAEpF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAExF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAE9E"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Copyright © 2025 Thomas Hertel (the@devsteps.dev)
|
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
|
4
|
+
*
|
|
2
5
|
* Zod Validation Schemas for Refs-Style Index
|
|
3
6
|
*
|
|
4
7
|
* Runtime validation for the distributed index architecture.
|
|
@@ -29,13 +32,27 @@ export const TypeIndexSchema = CategoryIndexSchema.extend({
|
|
|
29
32
|
* Status index schema (by-status/*.json)
|
|
30
33
|
*/
|
|
31
34
|
export const StatusIndexSchema = CategoryIndexSchema.extend({
|
|
32
|
-
category: z.enum([
|
|
35
|
+
category: z.enum([
|
|
36
|
+
'draft',
|
|
37
|
+
'planned',
|
|
38
|
+
'in-progress',
|
|
39
|
+
'review',
|
|
40
|
+
'done',
|
|
41
|
+
'obsolete',
|
|
42
|
+
'blocked',
|
|
43
|
+
'cancelled',
|
|
44
|
+
]),
|
|
33
45
|
});
|
|
34
46
|
/**
|
|
35
47
|
* Priority index schema (by-priority/*.json)
|
|
36
48
|
*/
|
|
37
49
|
export const PriorityIndexSchema = CategoryIndexSchema.extend({
|
|
38
|
-
category: z.enum([
|
|
50
|
+
category: z.enum([
|
|
51
|
+
'urgent-important',
|
|
52
|
+
'not-urgent-important',
|
|
53
|
+
'urgent-not-important',
|
|
54
|
+
'not-urgent-not-important',
|
|
55
|
+
]),
|
|
39
56
|
});
|
|
40
57
|
/**
|
|
41
58
|
* Counters schema (index/counters.json)
|
|
@@ -43,7 +60,11 @@ export const PriorityIndexSchema = CategoryIndexSchema.extend({
|
|
|
43
60
|
* Preserves ID generation counters from legacy index
|
|
44
61
|
*/
|
|
45
62
|
export const CountersSchema = z.record(z.string(), // item type key
|
|
46
|
-
z
|
|
63
|
+
z
|
|
64
|
+
.number()
|
|
65
|
+
.int()
|
|
66
|
+
.nonnegative() // counter value
|
|
67
|
+
);
|
|
47
68
|
/**
|
|
48
69
|
* Index paths validation
|
|
49
70
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-refs.schema.js","sourceRoot":"","sources":["../../src/schemas/index-refs.schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index-refs.schema.js","sourceRoot":"","sources":["../../src/schemas/index-refs.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH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,GAAG,EAAE;KACL,WAAW,EAAE,CAAC,gBAAgB;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAa;IACjD,OAAO,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAa;IAC7C,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAa;IAC/C,OAAO,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAa;IACjD,OAAO,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAa;IAC5C,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2025 Thomas Hertel (the@devsteps.dev)
|
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
|
4
|
+
*
|
|
5
|
+
* Schemas barrel export
|
|
6
|
+
* Re-exports all Zod schemas and derived TypeScript types.
|
|
7
|
+
*/
|
|
1
8
|
import { z } from 'zod';
|
|
9
|
+
export * from './analysis.js';
|
|
10
|
+
export * from './cbp-loops.js';
|
|
11
|
+
export * from './cbp-mandate.js';
|
|
12
|
+
export * from './index-refs.schema.js';
|
|
2
13
|
export * from './project.js';
|
|
3
14
|
export * from './relationships.js';
|
|
4
|
-
export * from './index-refs.schema.js';
|
|
5
15
|
/**
|
|
6
16
|
* Methodology types
|
|
7
17
|
*/
|
|
@@ -37,9 +47,9 @@ export declare const ItemStatus: z.ZodEnum<{
|
|
|
37
47
|
"in-progress": "in-progress";
|
|
38
48
|
review: "review";
|
|
39
49
|
done: "done";
|
|
40
|
-
obsolete: "obsolete";
|
|
41
50
|
blocked: "blocked";
|
|
42
51
|
cancelled: "cancelled";
|
|
52
|
+
obsolete: "obsolete";
|
|
43
53
|
}>;
|
|
44
54
|
export type ItemStatus = z.infer<typeof ItemStatus>;
|
|
45
55
|
/**
|
|
@@ -64,11 +74,11 @@ export declare const RelationType: z.ZodEnum<{
|
|
|
64
74
|
"implemented-by": "implemented-by";
|
|
65
75
|
blocks: "blocks";
|
|
66
76
|
"blocked-by": "blocked-by";
|
|
77
|
+
"tested-by": "tested-by";
|
|
78
|
+
tests: "tests";
|
|
67
79
|
"relates-to": "relates-to";
|
|
68
80
|
"depends-on": "depends-on";
|
|
69
81
|
"required-by": "required-by";
|
|
70
|
-
"tested-by": "tested-by";
|
|
71
|
-
tests: "tests";
|
|
72
82
|
supersedes: "supersedes";
|
|
73
83
|
"superseded-by": "superseded-by";
|
|
74
84
|
}>;
|
|
@@ -124,9 +134,9 @@ export declare const ItemMetadata: z.ZodObject<{
|
|
|
124
134
|
"in-progress": "in-progress";
|
|
125
135
|
review: "review";
|
|
126
136
|
done: "done";
|
|
127
|
-
obsolete: "obsolete";
|
|
128
137
|
blocked: "blocked";
|
|
129
138
|
cancelled: "cancelled";
|
|
139
|
+
obsolete: "obsolete";
|
|
130
140
|
}>>;
|
|
131
141
|
eisenhower: z.ZodDefault<z.ZodEnum<{
|
|
132
142
|
"urgent-important": "urgent-important";
|
|
@@ -221,9 +231,9 @@ export declare const DevStepsIndex: z.ZodObject<{
|
|
|
221
231
|
"in-progress": "in-progress";
|
|
222
232
|
review: "review";
|
|
223
233
|
done: "done";
|
|
224
|
-
obsolete: "obsolete";
|
|
225
234
|
blocked: "blocked";
|
|
226
235
|
cancelled: "cancelled";
|
|
236
|
+
obsolete: "obsolete";
|
|
227
237
|
}>;
|
|
228
238
|
eisenhower: z.ZodEnum<{
|
|
229
239
|
"urgent-important": "urgent-important";
|
|
@@ -255,9 +265,9 @@ export declare const DevStepsIndex: z.ZodObject<{
|
|
|
255
265
|
"in-progress": "in-progress";
|
|
256
266
|
review: "review";
|
|
257
267
|
done: "done";
|
|
258
|
-
obsolete: "obsolete";
|
|
259
268
|
blocked: "blocked";
|
|
260
269
|
cancelled: "cancelled";
|
|
270
|
+
obsolete: "obsolete";
|
|
261
271
|
}>;
|
|
262
272
|
}, z.core.$strip>>>;
|
|
263
273
|
stats: z.ZodOptional<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,cAAc,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,WAAW;;;;EAA2C,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAA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,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2025 Thomas Hertel (the@devsteps.dev)
|
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
|
4
|
+
*
|
|
5
|
+
* Schemas barrel export
|
|
6
|
+
* Re-exports all Zod schemas and derived TypeScript types.
|
|
7
|
+
*/
|
|
1
8
|
import { z } from 'zod';
|
|
9
|
+
// Context Budget Protocol schemas
|
|
10
|
+
export * from './analysis.js';
|
|
11
|
+
// CBP Loop control schemas: RejectionFeedback, IterationSignal, EscalationSignal
|
|
12
|
+
export * from './cbp-loops.js';
|
|
13
|
+
// CBP Tier-2 schemas: Mandate ↔ MandateResult (Tier-1 ↔ Tier-2)
|
|
14
|
+
export * from './cbp-mandate.js';
|
|
15
|
+
export * from './index-refs.schema.js';
|
|
2
16
|
// Re-export project context schemas
|
|
3
17
|
export * from './project.js';
|
|
4
18
|
export * from './relationships.js';
|
|
5
|
-
export * from './index-refs.schema.js';
|
|
6
19
|
/**
|
|
7
20
|
* Methodology types
|
|
8
21
|
*/
|