@productbrain/cli 0.1.0-beta.8141 → 0.1.0-beta.8143
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/__tests__/handshake-augment.test.js +2 -16
- package/dist/__tests__/handshake-augment.test.js.map +1 -1
- package/dist/__tests__/handshake-preview.test.js +2 -9
- package/dist/__tests__/handshake-preview.test.js.map +1 -1
- package/dist/__tests__/handshake-session-threading.test.js +2 -9
- package/dist/__tests__/handshake-session-threading.test.js.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.js +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -1
- package/dist/commands/handshake.d.ts +0 -2
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +21 -38
- package/dist/commands/handshake.js.map +1 -1
- package/dist/formatters/handshake.d.ts +0 -5
- package/dist/formatters/handshake.d.ts.map +1 -1
- package/dist/formatters/handshake.js +0 -9
- package/dist/formatters/handshake.js.map +1 -1
- package/dist/generators/adapters.d.ts +1 -1
- package/dist/generators/adapters.d.ts.map +1 -1
- package/dist/generators/adapters.js +9 -2
- package/dist/generators/adapters.js.map +1 -1
- package/dist/generators/everyone-rules-md.d.ts +10 -0
- package/dist/generators/everyone-rules-md.d.ts.map +1 -0
- package/dist/generators/everyone-rules-md.js +27 -0
- package/dist/generators/everyone-rules-md.js.map +1 -0
- package/dist/generators/retired-projections.d.ts +14 -0
- package/dist/generators/retired-projections.d.ts.map +1 -0
- package/dist/generators/retired-projections.js +79 -0
- package/dist/generators/retired-projections.js.map +1 -0
- package/dist/generators/retired-projections.test.d.ts +2 -0
- package/dist/generators/retired-projections.test.d.ts.map +1 -0
- package/dist/generators/retired-projections.test.js +62 -0
- package/dist/generators/retired-projections.test.js.map +1 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/generators/archetypes.d.ts +0 -52
- package/dist/generators/archetypes.d.ts.map +0 -1
- package/dist/generators/archetypes.js +0 -190
- package/dist/generators/archetypes.js.map +0 -1
- package/dist/generators/archetypes.test.d.ts +0 -2
- package/dist/generators/archetypes.test.d.ts.map +0 -1
- package/dist/generators/archetypes.test.js +0 -272
- package/dist/generators/archetypes.test.js.map +0 -1
- package/dist/generators/chain-classifier-kernel-client-drift.test.d.ts +0 -2
- package/dist/generators/chain-classifier-kernel-client-drift.test.d.ts.map +0 -1
- package/dist/generators/chain-classifier-kernel-client-drift.test.js +0 -41
- package/dist/generators/chain-classifier-kernel-client-drift.test.js.map +0 -1
- package/dist/generators/chain-classifier.d.ts +0 -102
- package/dist/generators/chain-classifier.d.ts.map +0 -1
- package/dist/generators/chain-classifier.js +0 -52
- package/dist/generators/chain-classifier.js.map +0 -1
- package/dist/generators/chain-rules.d.ts +0 -42
- package/dist/generators/chain-rules.d.ts.map +0 -1
- package/dist/generators/chain-rules.js +0 -256
- package/dist/generators/chain-rules.js.map +0 -1
- package/dist/generators/chain-rules.test.d.ts +0 -2
- package/dist/generators/chain-rules.test.d.ts.map +0 -1
- package/dist/generators/chain-rules.test.js +0 -448
- package/dist/generators/chain-rules.test.js.map +0 -1
- package/dist/generators/handshake-diff.d.ts +0 -67
- package/dist/generators/handshake-diff.d.ts.map +0 -1
- package/dist/generators/handshake-diff.js +0 -183
- package/dist/generators/handshake-diff.js.map +0 -1
- package/dist/generators/handshake-diff.test.d.ts +0 -2
- package/dist/generators/handshake-diff.test.d.ts.map +0 -1
- package/dist/generators/handshake-diff.test.js +0 -264
- package/dist/generators/handshake-diff.test.js.map +0 -1
- package/templates/archetypes/boundary.md +0 -23
- package/templates/archetypes/constraint.md +0 -23
- package/templates/archetypes/convention.md +0 -23
- package/templates/archetypes/policy.md +0 -23
- package/templates/archetypes/quality-gate.md +0 -23
- package/templates/archetypes/workflow.md +0 -23
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* archetypes — unit tests.
|
|
3
|
-
* BET-286 Slice 2: archetype template loader and slot resolver.
|
|
4
|
-
*/
|
|
5
|
-
import { describe, expect, it } from 'vitest';
|
|
6
|
-
import { loadArchetype, resolveArchetype, } from './archetypes.js';
|
|
7
|
-
/** Helper to extract a resolved archetype, failing the test if skipped. */
|
|
8
|
-
function expectResolved(result) {
|
|
9
|
-
expect('resolved' in result).toBe(true);
|
|
10
|
-
return result.resolved;
|
|
11
|
-
}
|
|
12
|
-
/** Helper to extract a skip reason, failing the test if resolved. */
|
|
13
|
-
function expectSkipped(result) {
|
|
14
|
-
expect('skipped' in result).toBe(true);
|
|
15
|
-
return result.skipped;
|
|
16
|
-
}
|
|
17
|
-
// ── Helpers ────────────────────────────────────────────────────────────
|
|
18
|
-
function makeClassified(overrides) {
|
|
19
|
-
return {
|
|
20
|
-
collectionSlug: 'standards',
|
|
21
|
-
confidence: 0.65,
|
|
22
|
-
matchedSignals: ['collection standards → constraint'],
|
|
23
|
-
data: null,
|
|
24
|
-
relations: [],
|
|
25
|
-
...overrides,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
// ── loadArchetype ──────────────────────────────────────────────────────
|
|
29
|
-
describe('loadArchetype', () => {
|
|
30
|
-
it('loads the constraint template and returns an ArchetypeTemplate', () => {
|
|
31
|
-
const template = loadArchetype('constraint');
|
|
32
|
-
expect(template).not.toBeNull();
|
|
33
|
-
expect(template.functionKey).toBe('constraint');
|
|
34
|
-
expect(template.name).toBe('chain-constraints');
|
|
35
|
-
expect(template.autoApply).toBe(true);
|
|
36
|
-
expect(template.level).toBe('core');
|
|
37
|
-
expect(template.body.length).toBeGreaterThan(0);
|
|
38
|
-
});
|
|
39
|
-
it('loads the boundary template', () => {
|
|
40
|
-
const template = loadArchetype('boundary');
|
|
41
|
-
expect(template).not.toBeNull();
|
|
42
|
-
expect(template.name).toBe('chain-boundaries');
|
|
43
|
-
});
|
|
44
|
-
it('loads the convention template', () => {
|
|
45
|
-
const template = loadArchetype('convention');
|
|
46
|
-
expect(template).not.toBeNull();
|
|
47
|
-
expect(template.name).toBe('chain-conventions');
|
|
48
|
-
});
|
|
49
|
-
it('loads the policy template', () => {
|
|
50
|
-
const template = loadArchetype('policy');
|
|
51
|
-
expect(template).not.toBeNull();
|
|
52
|
-
expect(template.name).toBe('chain-policies');
|
|
53
|
-
});
|
|
54
|
-
it('loads the workflow template', () => {
|
|
55
|
-
const template = loadArchetype('workflow');
|
|
56
|
-
expect(template).not.toBeNull();
|
|
57
|
-
expect(template.name).toBe('chain-workflows');
|
|
58
|
-
});
|
|
59
|
-
it('loads the quality-gate template', () => {
|
|
60
|
-
const template = loadArchetype('quality-gate');
|
|
61
|
-
expect(template).not.toBeNull();
|
|
62
|
-
expect(template.name).toBe('chain-quality-gates');
|
|
63
|
-
});
|
|
64
|
-
it('returns null for unclassified', () => {
|
|
65
|
-
const template = loadArchetype('unclassified');
|
|
66
|
-
expect(template).toBeNull();
|
|
67
|
-
});
|
|
68
|
-
// GovernanceFunction is a union — cast to test unknown-like behavior
|
|
69
|
-
it('returns null for a function key with no template file', () => {
|
|
70
|
-
// Cast to bypass type check — simulates a future unknown function key
|
|
71
|
-
const template = loadArchetype('unknown-function');
|
|
72
|
-
expect(template).toBeNull();
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
// ── resolveArchetype ───────────────────────────────────────────────────
|
|
76
|
-
describe('resolveArchetype — returns valid CanonicalRule', () => {
|
|
77
|
-
it('returns a ResolvedArchetype when matching entries exist', () => {
|
|
78
|
-
const classified = [
|
|
79
|
-
makeClassified({ entryId: 'STD-7', name: 'Trunk-based development', governanceFunction: 'constraint' }),
|
|
80
|
-
makeClassified({ entryId: 'STD-22', name: 'Session equals slice', governanceFunction: 'constraint' }),
|
|
81
|
-
];
|
|
82
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
83
|
-
expect(resolved.functionKey).toBe('constraint');
|
|
84
|
-
expect(resolved.resolvedEntryIds).toEqual(['STD-7', 'STD-22']);
|
|
85
|
-
expect(resolved.rule).toBeDefined();
|
|
86
|
-
});
|
|
87
|
-
it('the resolved rule has name, description, body, autoApply, level, sourcePath', () => {
|
|
88
|
-
const classified = [
|
|
89
|
-
makeClassified({ entryId: 'ARCH-26', name: 'Seven system domains', governanceFunction: 'boundary' }),
|
|
90
|
-
];
|
|
91
|
-
const resolved = expectResolved(resolveArchetype('boundary', classified, new Set()));
|
|
92
|
-
const rule = resolved.rule;
|
|
93
|
-
expect(rule.name).toBe('chain-boundaries');
|
|
94
|
-
expect(rule.description).toBeTruthy();
|
|
95
|
-
expect(rule.body).toBeTruthy();
|
|
96
|
-
expect(rule.autoApply).toBe(true);
|
|
97
|
-
expect(rule.level).toBe('core');
|
|
98
|
-
expect(rule.sourcePath).toBe('chain://boundary');
|
|
99
|
-
});
|
|
100
|
-
it('scope is undefined (global rule)', () => {
|
|
101
|
-
const classified = [
|
|
102
|
-
makeClassified({ entryId: 'DEC-1', name: 'Deploy ordering', governanceFunction: 'convention' }),
|
|
103
|
-
];
|
|
104
|
-
const resolved = expectResolved(resolveArchetype('convention', classified, new Set()));
|
|
105
|
-
expect(resolved.rule.scope).toBeUndefined();
|
|
106
|
-
});
|
|
107
|
-
it('targets is undefined (emit to all targets)', () => {
|
|
108
|
-
const classified = [
|
|
109
|
-
makeClassified({ entryId: 'POL-1', name: 'Access control', governanceFunction: 'policy' }),
|
|
110
|
-
];
|
|
111
|
-
const resolved = expectResolved(resolveArchetype('policy', classified, new Set()));
|
|
112
|
-
expect(resolved.rule.targets).toBeUndefined();
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
describe('resolveArchetype — skip cases (suppression)', () => {
|
|
116
|
-
it('returns skipped:zero-entries when zero entries match the function key', () => {
|
|
117
|
-
const classified = [
|
|
118
|
-
makeClassified({ entryId: 'STD-7', name: 'Some standard', governanceFunction: 'constraint' }),
|
|
119
|
-
];
|
|
120
|
-
// No 'boundary' entries
|
|
121
|
-
expect(expectSkipped(resolveArchetype('boundary', classified, new Set()))).toBe('zero-entries');
|
|
122
|
-
});
|
|
123
|
-
it('returns skipped:manual-suppression when manualRuleNames contains the archetype name', () => {
|
|
124
|
-
const classified = [
|
|
125
|
-
makeClassified({ entryId: 'STD-7', name: 'Some standard', governanceFunction: 'constraint' }),
|
|
126
|
-
];
|
|
127
|
-
const manualRuleNames = new Set(['chain-constraints']);
|
|
128
|
-
expect(expectSkipped(resolveArchetype('constraint', classified, manualRuleNames))).toBe('manual-suppression');
|
|
129
|
-
});
|
|
130
|
-
it('returns skipped:no-template for unclassified function key', () => {
|
|
131
|
-
const classified = [
|
|
132
|
-
makeClassified({ entryId: 'GLO-1', name: 'Some glossary entry', governanceFunction: 'unclassified' }),
|
|
133
|
-
];
|
|
134
|
-
expect(expectSkipped(resolveArchetype('unclassified', classified, new Set()))).toBe('no-template');
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
describe('resolveArchetype — slot resolution', () => {
|
|
138
|
-
it('replaces {{entry_ids}} with comma-separated human IDs', () => {
|
|
139
|
-
const classified = [
|
|
140
|
-
makeClassified({ entryId: 'STD-7', name: 'Standard A', governanceFunction: 'constraint' }),
|
|
141
|
-
makeClassified({ entryId: 'BR-64', name: 'Business Rule B', governanceFunction: 'constraint' }),
|
|
142
|
-
];
|
|
143
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
144
|
-
expect(resolved.rule.body).toContain('STD-7, BR-64');
|
|
145
|
-
});
|
|
146
|
-
it('replaces {{entry_names}} with comma-separated names', () => {
|
|
147
|
-
const classified = [
|
|
148
|
-
makeClassified({ entryId: 'STD-7', name: 'Trunk-based dev', governanceFunction: 'constraint' }),
|
|
149
|
-
makeClassified({ entryId: 'STD-22', name: 'Session is a slice', governanceFunction: 'constraint' }),
|
|
150
|
-
];
|
|
151
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
152
|
-
expect(resolved.rule.body).toContain('Trunk-based dev');
|
|
153
|
-
expect(resolved.rule.body).toContain('Session is a slice');
|
|
154
|
-
});
|
|
155
|
-
it('replaces {{entry_count}} with the number of matching entries', () => {
|
|
156
|
-
const classified = [
|
|
157
|
-
makeClassified({ entryId: 'STD-7', name: 'A', governanceFunction: 'constraint' }),
|
|
158
|
-
makeClassified({ entryId: 'STD-8', name: 'B', governanceFunction: 'constraint' }),
|
|
159
|
-
makeClassified({ entryId: 'STD-9', name: 'C', governanceFunction: 'constraint' }),
|
|
160
|
-
];
|
|
161
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
162
|
-
expect(resolved.rule.body).toContain('3');
|
|
163
|
-
expect(resolved.rule.description).toContain('3');
|
|
164
|
-
});
|
|
165
|
-
it('no unresolved {{slot}} placeholders remain in body', () => {
|
|
166
|
-
const classified = [
|
|
167
|
-
makeClassified({ entryId: 'STD-7', name: 'Some constraint', governanceFunction: 'constraint' }),
|
|
168
|
-
];
|
|
169
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
170
|
-
// No raw {{...}} placeholders should remain
|
|
171
|
-
expect(resolved.rule.body).not.toMatch(/\{\{\w+\}\}/);
|
|
172
|
-
});
|
|
173
|
-
it('no unresolved {{slot}} placeholders remain in description', () => {
|
|
174
|
-
const classified = [
|
|
175
|
-
makeClassified({ entryId: 'STD-7', name: 'Some constraint', governanceFunction: 'constraint' }),
|
|
176
|
-
];
|
|
177
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
178
|
-
expect(resolved.rule.description).not.toMatch(/\{\{\w+\}\}/);
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
describe('resolveArchetype — sourcePath convention', () => {
|
|
182
|
-
it('sourcePath follows chain:// convention with function key', () => {
|
|
183
|
-
const classified = [
|
|
184
|
-
makeClassified({ entryId: 'FLOW-1', name: 'Feature flag lifecycle', governanceFunction: 'workflow' }),
|
|
185
|
-
];
|
|
186
|
-
const resolved = expectResolved(resolveArchetype('workflow', classified, new Set()));
|
|
187
|
-
expect(resolved.rule.sourcePath).toBe('chain://workflow');
|
|
188
|
-
});
|
|
189
|
-
it('quality-gate sourcePath uses chain://quality-gate', () => {
|
|
190
|
-
const classified = [
|
|
191
|
-
makeClassified({ entryId: 'STD-2', name: 'Test coverage gate', governanceFunction: 'quality-gate', collectionSlug: 'standards' }),
|
|
192
|
-
];
|
|
193
|
-
const resolved = expectResolved(resolveArchetype('quality-gate', classified, new Set()));
|
|
194
|
-
expect(resolved.rule.sourcePath).toBe('chain://quality-gate');
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
describe('resolveArchetype — CanonicalRule type compatibility', () => {
|
|
198
|
-
it('the resolved rule satisfies the CanonicalRule interface', () => {
|
|
199
|
-
const classified = [
|
|
200
|
-
makeClassified({ entryId: 'DEC-100', name: 'Some decision', governanceFunction: 'convention' }),
|
|
201
|
-
];
|
|
202
|
-
const resolved = expectResolved(resolveArchetype('convention', classified, new Set()));
|
|
203
|
-
// TypeScript structural check: assign to CanonicalRule
|
|
204
|
-
const rule = resolved.rule;
|
|
205
|
-
expect(rule.name).toBeTruthy();
|
|
206
|
-
expect(typeof rule.autoApply).toBe('boolean');
|
|
207
|
-
expect(typeof rule.body).toBe('string');
|
|
208
|
-
expect(typeof rule.sourcePath).toBe('string');
|
|
209
|
-
});
|
|
210
|
-
});
|
|
211
|
-
describe('resolveArchetype — summary truncation', () => {
|
|
212
|
-
it('lists up to 5 entries then "and N more"', () => {
|
|
213
|
-
const classified = Array.from({ length: 8 }, (_, i) => makeClassified({ entryId: `STD-${i + 1}`, name: `Standard ${i + 1}`, governanceFunction: 'constraint' }));
|
|
214
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
215
|
-
expect(resolved.rule.body).toContain('and 3 more');
|
|
216
|
-
});
|
|
217
|
-
it('does not add "and N more" when 5 or fewer entries', () => {
|
|
218
|
-
const classified = Array.from({ length: 5 }, (_, i) => makeClassified({ entryId: `STD-${i + 1}`, name: `Standard ${i + 1}`, governanceFunction: 'constraint' }));
|
|
219
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
220
|
-
expect(resolved.rule.body).not.toMatch(/\.\.\.and \d+ more/);
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
describe('resolveArchetype — entry-ref cap (TEN-2373 Slice 4)', () => {
|
|
224
|
-
it('caps {{entry_ids}} at 25 with a "…and N more (M total)" suffix', () => {
|
|
225
|
-
const classified = Array.from({ length: 40 }, (_, i) => makeClassified({ entryId: `STD-${i + 1}`, name: `Standard ${i + 1}`, governanceFunction: 'constraint' }));
|
|
226
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
227
|
-
// 25 shown + overflow marker
|
|
228
|
-
expect(resolved.rule.body).toContain('…and 15 more (40 total)');
|
|
229
|
-
expect(resolved.rule.body).toContain('STD-1,');
|
|
230
|
-
expect(resolved.rule.body).toContain('STD-25,');
|
|
231
|
-
// the 26th+ entries must NOT appear inline in the body
|
|
232
|
-
expect(resolved.rule.body).not.toContain('STD-26');
|
|
233
|
-
// entry_count reflects the FULL set, not the cap (pinned to the template prose,
|
|
234
|
-
// not the "40 total" suffix, so the assertion is discriminating)
|
|
235
|
-
expect(resolved.rule.body).toContain('These 40 governance entries');
|
|
236
|
-
});
|
|
237
|
-
it('does not add a cap suffix at or below 25 entries', () => {
|
|
238
|
-
const classified = Array.from({ length: 25 }, (_, i) => makeClassified({ entryId: `STD-${i + 1}`, name: `Standard ${i + 1}`, governanceFunction: 'constraint' }));
|
|
239
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
240
|
-
expect(resolved.rule.body).not.toContain('more (');
|
|
241
|
-
expect(resolved.rule.body).toContain('STD-25');
|
|
242
|
-
});
|
|
243
|
-
it('keeps resolvedEntryIds FULL even when the body list is capped (state provenance)', () => {
|
|
244
|
-
const classified = Array.from({ length: 40 }, (_, i) => makeClassified({ entryId: `STD-${i + 1}`, name: `Standard ${i + 1}`, governanceFunction: 'constraint' }));
|
|
245
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
246
|
-
expect(resolved.resolvedEntryIds).toHaveLength(40);
|
|
247
|
-
});
|
|
248
|
-
it('ranks higher-confidence entries into the capped list first', () => {
|
|
249
|
-
// 25 low-confidence fillers + 1 high-confidence straggler last in input order;
|
|
250
|
-
// the straggler must survive the cap by ranking, not be dropped as the 26th.
|
|
251
|
-
const fillers = Array.from({ length: 25 }, (_, i) => makeClassified({ entryId: `STD-${i + 1}`, name: `Std ${i + 1}`, governanceFunction: 'constraint', confidence: 0.45 }));
|
|
252
|
-
const straggler = makeClassified({ entryId: 'STD-HI', name: 'High conf', governanceFunction: 'constraint', confidence: 0.95 });
|
|
253
|
-
const resolved = expectResolved(resolveArchetype('constraint', [...fillers, straggler], new Set()));
|
|
254
|
-
expect(resolved.rule.body).toContain('STD-HI');
|
|
255
|
-
expect(resolved.rule.body).toContain('…and 1 more (26 total)');
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
describe('resolveArchetype — only matching entries contribute', () => {
|
|
259
|
-
it('entries of other function types are excluded from resolution', () => {
|
|
260
|
-
const classified = [
|
|
261
|
-
makeClassified({ entryId: 'STD-7', name: 'Constraint entry', governanceFunction: 'constraint' }),
|
|
262
|
-
makeClassified({ entryId: 'ARCH-1', name: 'Boundary entry', governanceFunction: 'boundary' }),
|
|
263
|
-
makeClassified({ entryId: 'FLOW-1', name: 'Workflow entry', governanceFunction: 'workflow' }),
|
|
264
|
-
];
|
|
265
|
-
const resolved = expectResolved(resolveArchetype('constraint', classified, new Set()));
|
|
266
|
-
expect(resolved.resolvedEntryIds).toEqual(['STD-7']);
|
|
267
|
-
expect(resolved.rule.body).toContain('STD-7');
|
|
268
|
-
expect(resolved.rule.body).not.toContain('ARCH-1');
|
|
269
|
-
expect(resolved.rule.body).not.toContain('FLOW-1');
|
|
270
|
-
});
|
|
271
|
-
});
|
|
272
|
-
//# sourceMappingURL=archetypes.test.js.map
|
|
@@ -1 +0,0 @@
|
|
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AQ,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC;YAC7F,cAAc,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC;SAC9F,CAAC;QAEF,MAAM,QAAQ,GAAG,cAAc,CAAC,gBAAgB,CAAC,YAAY,EAAE,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;QACvF,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC9C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACnD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain-classifier-kernel-client-drift.test.d.ts","sourceRoot":"","sources":["../../src/generators/chain-classifier-kernel-client-drift.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compile-time drift test — PR #393 review (Codex P2), post-Lane-C-S3a fix.
|
|
3
|
-
*
|
|
4
|
-
* `chain-classifier.ts`'s `GovernanceFunction`/`GovernanceRelationEdge` are LOCAL,
|
|
5
|
-
* structural declarations again (not `import type`-re-exported from
|
|
6
|
-
* `@productbrain/kernel-client/governance`) — a re-export would leak the kernel-client
|
|
7
|
-
* import specifier into cli's PUBLISHED `.d.ts` output (`npm pack --dry-run` confirmed
|
|
8
|
-
* `dist/generators/chain-classifier.d.ts` ships in the tarball; a TypeScript consumer
|
|
9
|
-
* following that declaration would hit `TS2307: Cannot find module
|
|
10
|
-
* '@productbrain/kernel-client/governance'`, since that package is `private: true` and
|
|
11
|
-
* never published).
|
|
12
|
-
*
|
|
13
|
-
* This file is what replaces the deleted pre-S3a "zero drift risk" comment's unverified
|
|
14
|
-
* promise with an ENFORCED one: it imports BOTH chain-classifier.ts's local types and
|
|
15
|
-
* kernel-client's canonical originals, and asserts mutual structural assignability at
|
|
16
|
-
* the TYPE level. If either shape drifts without the other being updated to match, this
|
|
17
|
-
* file FAILS TO COMPILE (`tsc --noEmit` / `check:package-types` / this vitest run all
|
|
18
|
-
* fail) — a real, re-runnable check.
|
|
19
|
-
*
|
|
20
|
-
* This file exports NOTHING, so its own compiled declaration carries no kernel-client
|
|
21
|
-
* reference (verified: `npm pack --dry-run` shows no import in the emitted
|
|
22
|
-
* `chain-classifier-kernel-client-drift.test.d.ts` — nothing here is part of the public
|
|
23
|
-
* surface a consumer could ever deep-import).
|
|
24
|
-
*/
|
|
25
|
-
import { describe, expect, it } from 'vitest';
|
|
26
|
-
// If either line below fails to compile, chain-classifier.ts's local mirror has drifted
|
|
27
|
-
// from kernel-client's canonical shape — update the local declaration in
|
|
28
|
-
// chain-classifier.ts to match kernel/governance/classifyGovernance.ts's real shape.
|
|
29
|
-
const _governanceFunctionMatchesKernelClient = true;
|
|
30
|
-
const _governanceRelationEdgeMatchesKernelClient = true;
|
|
31
|
-
void _governanceFunctionMatchesKernelClient;
|
|
32
|
-
void _governanceRelationEdgeMatchesKernelClient;
|
|
33
|
-
describe('chain-classifier.ts governance types stay structurally identical to @productbrain/kernel-client/governance (PR #393 review)', () => {
|
|
34
|
-
it('compiles only when both AssertEqual checks above resolve to `true` — this test passing IS the drift check; the assertion below is a no-op runtime confirmation', () => {
|
|
35
|
-
// The real check already ran at compile time (the `const _...: AssertEqual<...> =
|
|
36
|
-
// true` lines above). If this test file compiled and vitest is running it, the
|
|
37
|
-
// types matched. This assertion just gives the check a visible, reportable pass.
|
|
38
|
-
expect(true).toBe(true);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=chain-classifier-kernel-client-drift.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain-classifier-kernel-client-drift.test.js","sourceRoot":"","sources":["../../src/generators/chain-classifier-kernel-client-drift.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AA0B9C,wFAAwF;AACxF,yEAAyE;AACzE,qFAAqF;AACrF,MAAM,sCAAsC,GAA8D,IAAI,CAAC;AAC/G,MAAM,0CAA0C,GAAsE,IAAI,CAAC;AAC3H,KAAK,sCAAsC,CAAC;AAC5C,KAAK,0CAA0C,CAAC;AAEhD,QAAQ,CAAC,6HAA6H,EAAE,GAAG,EAAE;IAC3I,EAAE,CAAC,gKAAgK,EAAE,GAAG,EAAE;QACxK,kFAAkF;QAClF,+EAA+E;QAC/E,iFAAiF;QACjF,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chain Classifier — types only.
|
|
3
|
-
*
|
|
4
|
-
* WP-488 Slice 4 (FEAT-1378, TEN-2733): the classifier IMPLEMENTATION moved to
|
|
5
|
-
* kernel/governance/classifyGovernance.ts, served over the gateway as
|
|
6
|
-
* `chain.classifyGovernance` — no connector-local scorer (see chain-rules.ts, which
|
|
7
|
-
* calls the served verdict). These type/interface declarations stay here because
|
|
8
|
-
* `handshake-diff.ts` / `archetypes.ts` / `chain-rules.ts` need the SHAPES, and
|
|
9
|
-
* `packages/cli` cannot import `kernel/` directly (`kernel/` is a private, unpublished
|
|
10
|
-
* workspace package; CLI compiles with plain `tsc`, no bundler — a `kernel` import
|
|
11
|
-
* would emit an unresolvable specifier into the published `dist/`, verified in WP-488
|
|
12
|
-
* Slice 3 for the identical class of failure).
|
|
13
|
-
*
|
|
14
|
-
* Lane C S3a (TEN-2733 pattern extension), REVISED post-merge (PR #393 review,
|
|
15
|
-
* Codex P2): `GovernanceFunction`/`GovernanceRelationEdge` were briefly `import
|
|
16
|
-
* type`-only re-exports from `@productbrain/kernel-client/governance`. Confirmed real:
|
|
17
|
-
* `import type` erases from EMITTED JS (no runtime import — verified, unchanged), but
|
|
18
|
-
* `tsc`'s DECLARATION (`.d.ts`) output for a re-export like `export type { X } from
|
|
19
|
-
* 'module'` PRESERVES the import specifier — and `npm pack --dry-run` confirms
|
|
20
|
-
* `dist/generators/chain-classifier.d.ts` ships in the published tarball. A TypeScript
|
|
21
|
-
* consumer following that shipped declaration (cli's package.json has no "exports" map,
|
|
22
|
-
* so nothing blocks a deep import of `dist/generators/chain-classifier.js`) would hit
|
|
23
|
-
* `TS2307: Cannot find module '@productbrain/kernel-client/governance'` — that package
|
|
24
|
-
* is `private: true`, never published. A `type X = import('@productbrain/kernel-client/
|
|
25
|
-
* governance').X` alias form doesn't fix this either — the import specifier still leaks
|
|
26
|
-
* into the declaration the same way.
|
|
27
|
-
*
|
|
28
|
-
* FIX: `GovernanceFunction`/`GovernanceRelationEdge` are LOCAL, structural declarations
|
|
29
|
-
* again (below) — the published `.d.ts` is fully self-contained, no kernel-client
|
|
30
|
-
* reference at all. Binding to kernel-client's canonical shape moved from "the type
|
|
31
|
-
* IS the import" to "a committed, compile-time DRIFT TEST" —
|
|
32
|
-
* `chain-classifier-kernel-client-drift.test.ts` (same directory) imports BOTH this
|
|
33
|
-
* file's local types AND kernel-client's `@productbrain/kernel-client/governance`
|
|
34
|
-
* originals and asserts mutual structural assignability; if either shape drifts without
|
|
35
|
-
* the other being updated to match, that test FAILS TO COMPILE — a real, enforced
|
|
36
|
-
* check, not the deleted pre-S3a "zero drift risk" comment's unverified promise. The
|
|
37
|
-
* drift test itself exports nothing, so ITS declaration carries no kernel-client
|
|
38
|
-
* reference either (verified: `npm pack --dry-run` shows an empty/no-op `.d.ts` for it).
|
|
39
|
-
*
|
|
40
|
-
* `@productbrain/kernel-client/governance` (the subpath added in S3a) still exists and
|
|
41
|
-
* is still useful — it's now the drift test's comparison source, and remains available
|
|
42
|
-
* for any FUTURE consumer that can afford a kernel-client type dependency (mcp-server,
|
|
43
|
-
* which never ships declarations at all — it bundles via tsup, not `tsc -d`).
|
|
44
|
-
*
|
|
45
|
-
* `GovernanceEntryInput`/`GovernanceCollectionInput`/`ClassifiedGovernance` below remain
|
|
46
|
-
* hand-declared (never re-exported from kernel-client — same self-contained-declaration
|
|
47
|
-
* reasoning now applies to them too, not just out of scope).
|
|
48
|
-
*
|
|
49
|
-
* Chain: BET-286 (Chain-Derived Agent Configuration), TEN-2733, TEN-2705
|
|
50
|
-
*/
|
|
51
|
-
/** The governance functions that archetypes exist for. Mirrors kernel/governance/
|
|
52
|
-
* classifyGovernance.ts's GovernanceFunction exactly — verified by
|
|
53
|
-
* chain-classifier-kernel-client-drift.test.ts's compile-time assertion. */
|
|
54
|
-
export type GovernanceFunction = 'constraint' | 'boundary' | 'convention' | 'policy' | 'workflow' | 'quality-gate' | 'unclassified';
|
|
55
|
-
/** Typed relation edge. Mirrors GovernanceRelationEdge from kernel/governance/
|
|
56
|
-
* classifyGovernance.ts exactly — verified by
|
|
57
|
-
* chain-classifier-kernel-client-drift.test.ts's compile-time assertion. */
|
|
58
|
-
export interface GovernanceRelationEdge {
|
|
59
|
-
type: string;
|
|
60
|
-
direction: 'outgoing' | 'incoming';
|
|
61
|
-
otherEntryId: string | null;
|
|
62
|
-
otherName: string;
|
|
63
|
-
otherCollectionSlug: string | null;
|
|
64
|
-
}
|
|
65
|
-
/** Input shape — matches GovernanceEntry from the Convex query. */
|
|
66
|
-
export interface GovernanceEntryInput {
|
|
67
|
-
entryId: string | null;
|
|
68
|
-
name: string;
|
|
69
|
-
collectionSlug: string;
|
|
70
|
-
status: string;
|
|
71
|
-
verificationStatus: 'verified' | 'unverified' | null;
|
|
72
|
-
data: Record<string, unknown> | null;
|
|
73
|
-
relations: GovernanceRelationEdge[];
|
|
74
|
-
}
|
|
75
|
-
/** Workspace collection metadata from chain.listCollections. */
|
|
76
|
-
export interface GovernanceCollectionInput {
|
|
77
|
-
slug: string;
|
|
78
|
-
name?: string;
|
|
79
|
-
description?: string;
|
|
80
|
-
purpose?: string;
|
|
81
|
-
usageGuidance?: string;
|
|
82
|
-
classificationCheck?: string;
|
|
83
|
-
classificationSignals?: string[];
|
|
84
|
-
defaultCanonicalKey?: string;
|
|
85
|
-
governanceRole?: string;
|
|
86
|
-
thinkingLayer?: string;
|
|
87
|
-
governanceFunction?: GovernanceFunction;
|
|
88
|
-
}
|
|
89
|
-
/** Result of classifying a single governance entry (as returned by chain.classifyGovernance). */
|
|
90
|
-
export interface ClassifiedGovernance {
|
|
91
|
-
entryId: string;
|
|
92
|
-
name: string;
|
|
93
|
-
collectionSlug: string;
|
|
94
|
-
governanceFunction: GovernanceFunction;
|
|
95
|
-
confidence: number;
|
|
96
|
-
matchedSignals: string[];
|
|
97
|
-
/** Original entry data passed through for archetype slot resolution */
|
|
98
|
-
data: Record<string, unknown> | null;
|
|
99
|
-
/** Original relations passed through */
|
|
100
|
-
relations: GovernanceRelationEdge[];
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=chain-classifier.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain-classifier.d.ts","sourceRoot":"","sources":["../../src/generators/chain-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH;;4EAE4E;AAC5E,MAAM,MAAM,kBAAkB,GAC1B,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,QAAQ,GAC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AAC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,wCAAwC;IACxC,SAAS,EAAE,sBAAsB,EAAE,CAAC;CACrC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chain Classifier — types only.
|
|
3
|
-
*
|
|
4
|
-
* WP-488 Slice 4 (FEAT-1378, TEN-2733): the classifier IMPLEMENTATION moved to
|
|
5
|
-
* kernel/governance/classifyGovernance.ts, served over the gateway as
|
|
6
|
-
* `chain.classifyGovernance` — no connector-local scorer (see chain-rules.ts, which
|
|
7
|
-
* calls the served verdict). These type/interface declarations stay here because
|
|
8
|
-
* `handshake-diff.ts` / `archetypes.ts` / `chain-rules.ts` need the SHAPES, and
|
|
9
|
-
* `packages/cli` cannot import `kernel/` directly (`kernel/` is a private, unpublished
|
|
10
|
-
* workspace package; CLI compiles with plain `tsc`, no bundler — a `kernel` import
|
|
11
|
-
* would emit an unresolvable specifier into the published `dist/`, verified in WP-488
|
|
12
|
-
* Slice 3 for the identical class of failure).
|
|
13
|
-
*
|
|
14
|
-
* Lane C S3a (TEN-2733 pattern extension), REVISED post-merge (PR #393 review,
|
|
15
|
-
* Codex P2): `GovernanceFunction`/`GovernanceRelationEdge` were briefly `import
|
|
16
|
-
* type`-only re-exports from `@productbrain/kernel-client/governance`. Confirmed real:
|
|
17
|
-
* `import type` erases from EMITTED JS (no runtime import — verified, unchanged), but
|
|
18
|
-
* `tsc`'s DECLARATION (`.d.ts`) output for a re-export like `export type { X } from
|
|
19
|
-
* 'module'` PRESERVES the import specifier — and `npm pack --dry-run` confirms
|
|
20
|
-
* `dist/generators/chain-classifier.d.ts` ships in the published tarball. A TypeScript
|
|
21
|
-
* consumer following that shipped declaration (cli's package.json has no "exports" map,
|
|
22
|
-
* so nothing blocks a deep import of `dist/generators/chain-classifier.js`) would hit
|
|
23
|
-
* `TS2307: Cannot find module '@productbrain/kernel-client/governance'` — that package
|
|
24
|
-
* is `private: true`, never published. A `type X = import('@productbrain/kernel-client/
|
|
25
|
-
* governance').X` alias form doesn't fix this either — the import specifier still leaks
|
|
26
|
-
* into the declaration the same way.
|
|
27
|
-
*
|
|
28
|
-
* FIX: `GovernanceFunction`/`GovernanceRelationEdge` are LOCAL, structural declarations
|
|
29
|
-
* again (below) — the published `.d.ts` is fully self-contained, no kernel-client
|
|
30
|
-
* reference at all. Binding to kernel-client's canonical shape moved from "the type
|
|
31
|
-
* IS the import" to "a committed, compile-time DRIFT TEST" —
|
|
32
|
-
* `chain-classifier-kernel-client-drift.test.ts` (same directory) imports BOTH this
|
|
33
|
-
* file's local types AND kernel-client's `@productbrain/kernel-client/governance`
|
|
34
|
-
* originals and asserts mutual structural assignability; if either shape drifts without
|
|
35
|
-
* the other being updated to match, that test FAILS TO COMPILE — a real, enforced
|
|
36
|
-
* check, not the deleted pre-S3a "zero drift risk" comment's unverified promise. The
|
|
37
|
-
* drift test itself exports nothing, so ITS declaration carries no kernel-client
|
|
38
|
-
* reference either (verified: `npm pack --dry-run` shows an empty/no-op `.d.ts` for it).
|
|
39
|
-
*
|
|
40
|
-
* `@productbrain/kernel-client/governance` (the subpath added in S3a) still exists and
|
|
41
|
-
* is still useful — it's now the drift test's comparison source, and remains available
|
|
42
|
-
* for any FUTURE consumer that can afford a kernel-client type dependency (mcp-server,
|
|
43
|
-
* which never ships declarations at all — it bundles via tsup, not `tsc -d`).
|
|
44
|
-
*
|
|
45
|
-
* `GovernanceEntryInput`/`GovernanceCollectionInput`/`ClassifiedGovernance` below remain
|
|
46
|
-
* hand-declared (never re-exported from kernel-client — same self-contained-declaration
|
|
47
|
-
* reasoning now applies to them too, not just out of scope).
|
|
48
|
-
*
|
|
49
|
-
* Chain: BET-286 (Chain-Derived Agent Configuration), TEN-2733, TEN-2705
|
|
50
|
-
*/
|
|
51
|
-
export {};
|
|
52
|
-
//# sourceMappingURL=chain-classifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain-classifier.js","sourceRoot":"","sources":["../../src/generators/chain-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chain Rules Assembler — BET-286 Slice 3
|
|
3
|
-
*
|
|
4
|
-
* Fetches governance entries via MCP, classifies them, resolves archetype
|
|
5
|
-
* templates, and returns CanonicalRule objects ready to merge into the
|
|
6
|
-
* canonical rules array in runHandshake().
|
|
7
|
-
*
|
|
8
|
-
* Chain: BET-286 (Chain-Derived Agent Configuration)
|
|
9
|
-
*/
|
|
10
|
-
import type { CanonicalRule } from './portable-knowledge.js';
|
|
11
|
-
import type { kernelCall as McpCallFn } from '../lib/client.js';
|
|
12
|
-
/** Statistics from a generateChainRules() call. */
|
|
13
|
-
export interface ChainRulesStats {
|
|
14
|
-
totalEntries: number;
|
|
15
|
-
classifiedEntries: number;
|
|
16
|
-
generatedRules: number;
|
|
17
|
-
suppressedByManual: number;
|
|
18
|
-
suppressedByZeroEntries: number;
|
|
19
|
-
}
|
|
20
|
-
/** Result returned by generateChainRules(). */
|
|
21
|
-
export interface ChainRulesResult {
|
|
22
|
-
/** Generated rules ready to merge into canonical rules array. */
|
|
23
|
-
rules: CanonicalRule[];
|
|
24
|
-
/** Function keys with no matching governance entries. */
|
|
25
|
-
gaps: string[];
|
|
26
|
-
/** Sentinel rule when MCP is unreachable — null on success. */
|
|
27
|
-
sentinel: CanonicalRule | null;
|
|
28
|
-
stats: ChainRulesStats;
|
|
29
|
-
/** Classified governance entries — passed through for diff engine confidence data. */
|
|
30
|
-
classified: import('./chain-classifier.js').ClassifiedGovernance[];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Fetch governance entries, classify them, resolve archetypes, and produce
|
|
34
|
-
* CanonicalRule objects ready to merge into the handshake pipeline.
|
|
35
|
-
*
|
|
36
|
-
* @param kernelCallFn - Injected kernelCall function for testability.
|
|
37
|
-
* @param manualRules - Existing manual rules from .productbrain/rules/.
|
|
38
|
-
* Used to suppress generated rules when a manual rule
|
|
39
|
-
* with the same name already exists.
|
|
40
|
-
*/
|
|
41
|
-
export declare function generateChainRules(kernelCallFn: typeof McpCallFn, manualRules: CanonicalRule[]): Promise<ChainRulesResult>;
|
|
42
|
-
//# sourceMappingURL=chain-rules.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain-rules.d.ts","sourceRoot":"","sources":["../../src/generators/chain-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKhE,mDAAmD;AACnD,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED,+CAA+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,yDAAyD;IACzD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,+DAA+D;IAC/D,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,eAAe,CAAC;IACvB,sFAAsF;IACtF,UAAU,EAAE,OAAO,uBAAuB,EAAE,oBAAoB,EAAE,CAAC;CACpE;AAkCD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,YAAY,EAAE,OAAO,SAAS,EAC9B,WAAW,EAAE,aAAa,EAAE,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CA+M3B"}
|