kibi-cli 0.11.1 → 0.12.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/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +1 -1
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +2 -3
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +7 -2
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/sync/manifest.d.ts +1 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +7 -4
- package/dist/commands/sync/staging.d.ts.map +1 -1
- package/dist/commands/sync/staging.js +2 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +3 -1
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +3 -1
- package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
- package/dist/extractors/symbol-coordinates.js +1 -1
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +2 -1
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +3 -1
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +14 -1
- package/dist/public/ignore-policy.d.ts.map +1 -1
- package/dist/public/ignore-policy.js +8 -4
- package/dist/public/operational-artifacts.d.ts.map +1 -1
- package/dist/public/operational-artifacts.js +1 -0
- package/dist/public/schemas/entity.d.ts +1 -127
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +79 -2
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skills/kibi-usage/SKILL.md +80 -0
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +78 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +0 -7
- package/dist/public/skills.d.ts.map +1 -1
- package/dist/public/skills.js +12 -4
- package/dist/schemas/entity.schema.json +81 -4
- package/dist/search-ranking.d.ts.map +1 -1
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +1 -1
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +8 -2
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +4 -1
- package/dist/types/entities.d.ts +11 -2
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/config.d.ts +3 -18
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +4 -40
- package/dist/utils/manifest-paths.d.ts.map +1 -1
- package/dist/utils/manifest-paths.js +3 -1
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/strict-modeling.d.ts +1 -1
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +13 -3
- package/package.json +3 -13
- package/schema/config.json +0 -68
- package/src/public/ignore-policy.ts +26 -10
- package/src/public/operational-artifacts.ts +2 -1
- package/src/public/schemas/entity.ts +89 -5
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +80 -0
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +78 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +0 -7
- package/src/public/skills.ts +93 -25
- package/src/schemas/entity.schema.json +81 -4
- package/src/schemas/relationship.schema.json +1 -0
- package/dist/public/brief-config.d.ts +0 -4
- package/dist/public/brief-config.d.ts.map +0 -1
- package/dist/public/brief-config.js +0 -21
- package/src/public/brief-config.ts +0 -25
|
@@ -48,6 +48,24 @@ Relationship direction is fixed and semantic. Getting it wrong breaks traceabili
|
|
|
48
48
|
|
|
49
49
|
See `resources/relationship-directions.md` for detailed payload examples.
|
|
50
50
|
|
|
51
|
+
## Symbol-First Traceability
|
|
52
|
+
|
|
53
|
+
Trace code through `symbol` entities, not inline legacy comments. Do not use legacy `// implements REQ-xxx` comments as the primary marker for new or modified code. If a symbol is new or its requirement ownership changes, create or update the `symbol` entity and add an `implements` relationship from the symbol to the requirement.
|
|
54
|
+
|
|
55
|
+
Use comments only as a temporary backward-compatibility fallback when the symbol manifest cannot be updated in the same task. Prefer durable symbol coordinates in `documentation/symbols.yaml` and `documentation/symbol-coordinates.yaml`, then link those symbols through MCP relationships.
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
# Preferred traceability model
|
|
59
|
+
symbol:
|
|
60
|
+
id: SYM-admin-billing-policy
|
|
61
|
+
title: Admin billing policy check
|
|
62
|
+
status: active
|
|
63
|
+
relationships:
|
|
64
|
+
- type: implements
|
|
65
|
+
from: SYM-admin-billing-policy
|
|
66
|
+
to: REQ-ADMIN-BILLING-POLICY
|
|
67
|
+
```
|
|
68
|
+
|
|
51
69
|
## Strict Fact Lane
|
|
52
70
|
|
|
53
71
|
Normative requirements that must participate in contradiction blocking use the strict fact lane. Create a `fact_kind: subject` fact and link it from the requirement via `constrains`. Create a `fact_kind: property_value` fact and link it via `requires_property`.
|
|
@@ -75,6 +93,67 @@ relationships:
|
|
|
75
93
|
|
|
76
94
|
See `resources/fact-lanes.md` for the full strict vs observation lane comparison.
|
|
77
95
|
|
|
96
|
+
### Granular fact examples for coherence checks
|
|
97
|
+
|
|
98
|
+
Model one semantic claim per strict `property_value` fact. Reusing the same `subject_key` and `property_key` lets `domain-contradictions` compare requirements mechanically.
|
|
99
|
+
|
|
100
|
+
Incoherent role-set example: `REQ-ROLE-SET-2` says the allowed user roles are exactly `[user, admin]`, while `REQ-ROLE-SET-3` says the same property is exactly `[user, admin, superadmin]`. Both constrain `FACT-USER-ROLES` and require different values for `user.roles.allowed_set`, so they cannot both be current.
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
subject:
|
|
104
|
+
id: FACT-USER-ROLES
|
|
105
|
+
fact_kind: subject
|
|
106
|
+
subject_key: user.roles
|
|
107
|
+
|
|
108
|
+
property_values:
|
|
109
|
+
- id: FACT-USER-ROLES-ALLOWED-2
|
|
110
|
+
fact_kind: property_value
|
|
111
|
+
subject_key: user.roles
|
|
112
|
+
property_key: user.roles.allowed_set
|
|
113
|
+
operator: eq
|
|
114
|
+
value_type: list
|
|
115
|
+
value_json: '["user", "admin"]'
|
|
116
|
+
- id: FACT-USER-ROLES-ALLOWED-3
|
|
117
|
+
fact_kind: property_value
|
|
118
|
+
subject_key: user.roles
|
|
119
|
+
property_key: user.roles.allowed_set
|
|
120
|
+
operator: eq
|
|
121
|
+
value_type: list
|
|
122
|
+
value_json: '["user", "admin", "superadmin"]'
|
|
123
|
+
|
|
124
|
+
requirements:
|
|
125
|
+
- id: REQ-ROLE-SET-2
|
|
126
|
+
relationships:
|
|
127
|
+
- { type: constrains, from: REQ-ROLE-SET-2, to: FACT-USER-ROLES }
|
|
128
|
+
- { type: requires_property, from: REQ-ROLE-SET-2, to: FACT-USER-ROLES-ALLOWED-2 }
|
|
129
|
+
- id: REQ-ROLE-SET-3
|
|
130
|
+
relationships:
|
|
131
|
+
- { type: constrains, from: REQ-ROLE-SET-3, to: FACT-USER-ROLES }
|
|
132
|
+
- { type: requires_property, from: REQ-ROLE-SET-3, to: FACT-USER-ROLES-ALLOWED-3 }
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Incoherent permission example: `REQ-ADMIN-CAN-MANAGE-BILLING` says `admin` can manage billing, while `REQ-ONLY-SUPERADMIN-MANAGES-BILLING` says the only allowed actor is `superadmin`. Model both against `billing.manage.allowed_actor` with `operator: eq` so the conflict is explicit.
|
|
136
|
+
|
|
137
|
+
```yaml
|
|
138
|
+
property_values:
|
|
139
|
+
- id: FACT-BILLING-MANAGE-ACTOR-ADMIN
|
|
140
|
+
fact_kind: property_value
|
|
141
|
+
subject_key: billing.manage
|
|
142
|
+
property_key: billing.manage.allowed_actor
|
|
143
|
+
operator: eq
|
|
144
|
+
value_type: string
|
|
145
|
+
value_string: admin
|
|
146
|
+
- id: FACT-BILLING-MANAGE-ACTOR-SUPERADMIN
|
|
147
|
+
fact_kind: property_value
|
|
148
|
+
subject_key: billing.manage
|
|
149
|
+
property_key: billing.manage.allowed_actor
|
|
150
|
+
operator: eq
|
|
151
|
+
value_type: string
|
|
152
|
+
value_string: superadmin
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
If a new requirement intentionally changes a value, create a replacement requirement and link the old requirement to the new one with `supersedes` instead of leaving two current contradictory requirements.
|
|
156
|
+
|
|
78
157
|
## Fact vs Flag
|
|
79
158
|
|
|
80
159
|
Use `flag` for runtime or config gates only. Feature flags, kill-switches, and deferred capabilities are valid `flag` entities.
|
|
@@ -110,6 +189,7 @@ Call `kb_status` when you suspect the branch KB is stale or when switching conte
|
|
|
110
189
|
| Anti-Pattern | Problem | Remediation |
|
|
111
190
|
|-------------|---------|-------------|
|
|
112
191
|
| Reversed relationship direction | Traceability queries break | Verify direction against the relationship table above |
|
|
192
|
+
| Legacy implements comments | Comments are not durable queryable symbols | Create or update a `symbol` entity and link it to the requirement |
|
|
113
193
|
| Bug-as-flag | `flag` misused for defect tracking | Use `fact` with `fact_kind: observation` or `meta` |
|
|
114
194
|
| Parallel upserts | Lock contention and nondeterminism | Execute `kb_upsert` calls sequentially |
|
|
115
195
|
| Embedded scenarios in reqs | Violates canonical traceability chain | Create separate `req`, `scen`, and `test` entities |
|
|
@@ -24,6 +24,84 @@ value_type: int
|
|
|
24
24
|
value_int: 3
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
## Granular Facts for Coherence Checks
|
|
28
|
+
|
|
29
|
+
Granular strict facts work best when each `property_value` represents one semantic claim about one `subject_key` and one `property_key`. This lets `domain-contradictions` compare current requirements that constrain the same subject and require incompatible values.
|
|
30
|
+
|
|
31
|
+
### Role set conflict
|
|
32
|
+
|
|
33
|
+
`REQ-ROLE-SET-2` and `REQ-ROLE-SET-3` are incoherent if both are current: they each define the exact allowed role set, but one allows two roles and the other allows three.
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
subject:
|
|
37
|
+
id: FACT-USER-ROLES
|
|
38
|
+
title: User roles
|
|
39
|
+
status: active
|
|
40
|
+
fact_kind: subject
|
|
41
|
+
subject_key: user.roles
|
|
42
|
+
|
|
43
|
+
property_values:
|
|
44
|
+
- id: FACT-USER-ROLES-ALLOWED-2
|
|
45
|
+
title: User and admin roles only
|
|
46
|
+
status: active
|
|
47
|
+
fact_kind: property_value
|
|
48
|
+
subject_key: user.roles
|
|
49
|
+
property_key: user.roles.allowed_set
|
|
50
|
+
operator: eq
|
|
51
|
+
value_type: list
|
|
52
|
+
value_json: '["user", "admin"]'
|
|
53
|
+
- id: FACT-USER-ROLES-ALLOWED-3
|
|
54
|
+
title: User, admin, and superadmin roles
|
|
55
|
+
status: active
|
|
56
|
+
fact_kind: property_value
|
|
57
|
+
subject_key: user.roles
|
|
58
|
+
property_key: user.roles.allowed_set
|
|
59
|
+
operator: eq
|
|
60
|
+
value_type: list
|
|
61
|
+
value_json: '["user", "admin", "superadmin"]'
|
|
62
|
+
|
|
63
|
+
relationships:
|
|
64
|
+
- { type: constrains, from: REQ-ROLE-SET-2, to: FACT-USER-ROLES }
|
|
65
|
+
- { type: requires_property, from: REQ-ROLE-SET-2, to: FACT-USER-ROLES-ALLOWED-2 }
|
|
66
|
+
- { type: constrains, from: REQ-ROLE-SET-3, to: FACT-USER-ROLES }
|
|
67
|
+
- { type: requires_property, from: REQ-ROLE-SET-3, to: FACT-USER-ROLES-ALLOWED-3 }
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Permission actor conflict
|
|
71
|
+
|
|
72
|
+
`REQ-ADMIN-CAN-MANAGE-BILLING` and `REQ-ONLY-SUPERADMIN-MANAGES-BILLING` conflict when both define the exact allowed actor for the same permission.
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
subject:
|
|
76
|
+
id: FACT-BILLING-MANAGE
|
|
77
|
+
title: Billing management permission
|
|
78
|
+
status: active
|
|
79
|
+
fact_kind: subject
|
|
80
|
+
subject_key: billing.manage
|
|
81
|
+
|
|
82
|
+
property_values:
|
|
83
|
+
- id: FACT-BILLING-MANAGE-ACTOR-ADMIN
|
|
84
|
+
title: Admin can manage billing
|
|
85
|
+
status: active
|
|
86
|
+
fact_kind: property_value
|
|
87
|
+
subject_key: billing.manage
|
|
88
|
+
property_key: billing.manage.allowed_actor
|
|
89
|
+
operator: eq
|
|
90
|
+
value_type: string
|
|
91
|
+
value_string: admin
|
|
92
|
+
- id: FACT-BILLING-MANAGE-ACTOR-SUPERADMIN
|
|
93
|
+
title: Only superadmin can manage billing
|
|
94
|
+
status: active
|
|
95
|
+
fact_kind: property_value
|
|
96
|
+
subject_key: billing.manage
|
|
97
|
+
property_key: billing.manage.allowed_actor
|
|
98
|
+
operator: eq
|
|
99
|
+
value_type: string
|
|
100
|
+
value_string: superadmin
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
When a contradiction is intentional evolution rather than a real conflict, link the replaced requirement to the replacement requirement with `supersedes`.
|
|
104
|
+
|
|
27
105
|
## Context Lane (Non-Blocking)
|
|
28
106
|
|
|
29
107
|
### fact_kind: observation
|
|
@@ -26,10 +26,3 @@ The canonical workflow for any KB operation follows this pattern:
|
|
|
26
26
|
3. kb_upsert to add missing relationship rows (sequential)
|
|
27
27
|
4. kb_check with rules: ["no-dangling-refs", "symbol-traceability"]
|
|
28
28
|
```
|
|
29
|
-
|
|
30
|
-
## Before Risky Work
|
|
31
|
-
```
|
|
32
|
-
1. /brief-kibi or kb_briefing_generate for citation-backed briefing
|
|
33
|
-
2. Inspect briefingState; proceed only if ready
|
|
34
|
-
3. Use constraints, regressionRisks, and cited entities from the briefing
|
|
35
|
-
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/public/skills.ts"],"names":[],"m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AmB,CAAC,QAAQ,EAAE,MAAM,GAAG;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC,CAoBA"}
|
package/dist/public/skills.js
CHANGED
|
@@ -51,6 +51,7 @@ export class SkillOversizeError extends Error {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
export function listBundledSkills() {
|
|
54
|
+
// implements REQ-001
|
|
54
55
|
if (!existsSync(bundledSkillsDir)) {
|
|
55
56
|
return [];
|
|
56
57
|
}
|
|
@@ -62,6 +63,7 @@ export function listBundledSkills() {
|
|
|
62
63
|
.sort((left, right) => left.id.localeCompare(right.id));
|
|
63
64
|
}
|
|
64
65
|
export function loadBundledSkill(id) {
|
|
66
|
+
// implements REQ-001
|
|
65
67
|
const rootDir = findBundledSkillRoot(id);
|
|
66
68
|
if (!rootDir) {
|
|
67
69
|
throw new SkillNotFoundError(id);
|
|
@@ -69,6 +71,7 @@ export function loadBundledSkill(id) {
|
|
|
69
71
|
return parseSkillBundle(rootDir);
|
|
70
72
|
}
|
|
71
73
|
export function readBundledSkillResource(id, resourcePath) {
|
|
74
|
+
// implements REQ-001
|
|
72
75
|
const bundle = loadBundledSkill(id);
|
|
73
76
|
const declaredResource = normalizeResourcePath(resourcePath);
|
|
74
77
|
if (!declaredResource || isPathOutOfBounds(resourcePath)) {
|
|
@@ -94,6 +97,7 @@ export function readBundledSkillResource(id, resourcePath) {
|
|
|
94
97
|
return readFileSync(candidatePath, "utf8");
|
|
95
98
|
}
|
|
96
99
|
export function validateSkillBundle(pathLike) {
|
|
100
|
+
// implements REQ-001
|
|
97
101
|
const skillFilePath = resolveSkillFilePath(pathLike);
|
|
98
102
|
const errors = [];
|
|
99
103
|
if (!existsSync(skillFilePath)) {
|
|
@@ -190,7 +194,8 @@ function validateManifestData(data) {
|
|
|
190
194
|
errors.push(new SkillValidationError(field, `Missing required skill field: ${field}`));
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
|
-
if (typeof data.version === "string" &&
|
|
197
|
+
if (typeof data.version === "string" &&
|
|
198
|
+
!/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(data.version)) {
|
|
194
199
|
errors.push(new SkillValidationError("version", `Invalid skill version: ${data.version}`));
|
|
195
200
|
}
|
|
196
201
|
if (data.tags !== undefined && !isStringArray(data.tags)) {
|
|
@@ -228,7 +233,7 @@ function coerceManifest(data) {
|
|
|
228
233
|
return manifest;
|
|
229
234
|
}
|
|
230
235
|
function isStringArray(value) {
|
|
231
|
-
return Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
236
|
+
return (Array.isArray(value) && value.every((item) => typeof item === "string"));
|
|
232
237
|
}
|
|
233
238
|
function normalizeResourcePath(pathLike) {
|
|
234
239
|
return normalize(pathLike).replaceAll("\\", "/");
|
|
@@ -245,7 +250,8 @@ function isDeclaredResource(manifest, resourcePath) {
|
|
|
245
250
|
}
|
|
246
251
|
function isWithinRoot(rootDir, candidatePath) {
|
|
247
252
|
const relativePath = relative(rootDir, candidatePath);
|
|
248
|
-
return relativePath === "" ||
|
|
253
|
+
return (relativePath === "" ||
|
|
254
|
+
(!relativePath.startsWith("..") && !isAbsolute(relativePath)));
|
|
249
255
|
}
|
|
250
256
|
function assertMaxBytes(pathLike, maxBytes) {
|
|
251
257
|
const size = statSync(pathLike).size;
|
|
@@ -258,5 +264,7 @@ function resolveSkillFilePath(pathLike) {
|
|
|
258
264
|
if (existsSync(resolved) && statSync(resolved).isDirectory()) {
|
|
259
265
|
return join(resolved, SKILL_FILE_NAME);
|
|
260
266
|
}
|
|
261
|
-
return resolved.endsWith(SKILL_FILE_NAME)
|
|
267
|
+
return resolved.endsWith(SKILL_FILE_NAME)
|
|
268
|
+
? resolved
|
|
269
|
+
: join(resolved, SKILL_FILE_NAME);
|
|
262
270
|
}
|
|
@@ -62,7 +62,14 @@
|
|
|
62
62
|
},
|
|
63
63
|
"fact_kind": {
|
|
64
64
|
"type": "string",
|
|
65
|
-
"enum": [
|
|
65
|
+
"enum": [
|
|
66
|
+
"subject",
|
|
67
|
+
"property_value",
|
|
68
|
+
"observation",
|
|
69
|
+
"meta",
|
|
70
|
+
"predicate_schema",
|
|
71
|
+
"predicate"
|
|
72
|
+
]
|
|
66
73
|
},
|
|
67
74
|
"subject_key": { "type": "string" },
|
|
68
75
|
"property_key": { "type": "string" },
|
|
@@ -80,11 +87,26 @@
|
|
|
80
87
|
"value_bool": { "type": "boolean" },
|
|
81
88
|
"unit": { "type": "string" },
|
|
82
89
|
"scope": { "type": "string" },
|
|
83
|
-
"polarity": {
|
|
90
|
+
"polarity": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"enum": ["require", "forbid", "assert", "deny"]
|
|
93
|
+
},
|
|
84
94
|
"closed_world": { "type": "boolean" },
|
|
85
95
|
"valid_from": { "type": "string" },
|
|
86
96
|
"valid_to": { "type": "string" },
|
|
87
|
-
"canonical_key": { "type": "string" }
|
|
97
|
+
"canonical_key": { "type": "string" },
|
|
98
|
+
"predicate_name": { "type": "string" },
|
|
99
|
+
"predicate_namespace": { "type": "string" },
|
|
100
|
+
"predicate_arity": { "type": "integer", "minimum": 1 },
|
|
101
|
+
"argument_names": { "type": "array", "items": { "type": "string" } },
|
|
102
|
+
"argument_types": { "type": "array", "items": { "type": "string" } },
|
|
103
|
+
"argument_descriptions": {
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": { "type": "string" }
|
|
106
|
+
},
|
|
107
|
+
"aliases": { "type": "array", "items": { "type": "string" } },
|
|
108
|
+
"examples": { "type": "array", "items": { "type": "string" } },
|
|
109
|
+
"predicate_args": { "type": "array", "items": { "type": "string" } }
|
|
88
110
|
},
|
|
89
111
|
"required": [
|
|
90
112
|
"id",
|
|
@@ -133,10 +155,65 @@
|
|
|
133
155
|
{ "required": ["closed_world"] },
|
|
134
156
|
{ "required": ["valid_from"] },
|
|
135
157
|
{ "required": ["valid_to"] },
|
|
136
|
-
{ "required": ["canonical_key"] }
|
|
158
|
+
{ "required": ["canonical_key"] },
|
|
159
|
+
{ "required": ["predicate_name"] },
|
|
160
|
+
{ "required": ["predicate_namespace"] },
|
|
161
|
+
{ "required": ["predicate_arity"] },
|
|
162
|
+
{ "required": ["argument_names"] },
|
|
163
|
+
{ "required": ["argument_types"] },
|
|
164
|
+
{ "required": ["argument_descriptions"] },
|
|
165
|
+
{ "required": ["aliases"] },
|
|
166
|
+
{ "required": ["examples"] },
|
|
167
|
+
{ "required": ["predicate_args"] }
|
|
137
168
|
]
|
|
138
169
|
}
|
|
139
170
|
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"if": {
|
|
174
|
+
"properties": {
|
|
175
|
+
"type": { "const": "fact" },
|
|
176
|
+
"fact_kind": { "const": "predicate_schema" }
|
|
177
|
+
},
|
|
178
|
+
"required": ["type", "fact_kind"]
|
|
179
|
+
},
|
|
180
|
+
"then": {
|
|
181
|
+
"required": [
|
|
182
|
+
"predicate_name",
|
|
183
|
+
"predicate_arity",
|
|
184
|
+
"argument_names",
|
|
185
|
+
"argument_types"
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"if": {
|
|
191
|
+
"properties": {
|
|
192
|
+
"type": { "const": "fact" },
|
|
193
|
+
"fact_kind": { "const": "predicate" }
|
|
194
|
+
},
|
|
195
|
+
"required": ["type", "fact_kind"]
|
|
196
|
+
},
|
|
197
|
+
"then": {
|
|
198
|
+
"required": ["predicate_name", "predicate_args", "canonical_key"],
|
|
199
|
+
"properties": {
|
|
200
|
+
"polarity": { "enum": ["assert", "deny"] }
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"if": {
|
|
206
|
+
"properties": {
|
|
207
|
+
"type": { "const": "fact" },
|
|
208
|
+
"fact_kind": { "const": "property_value" }
|
|
209
|
+
},
|
|
210
|
+
"required": ["type", "fact_kind"]
|
|
211
|
+
},
|
|
212
|
+
"then": {
|
|
213
|
+
"properties": {
|
|
214
|
+
"polarity": { "enum": ["require", "forbid"] }
|
|
215
|
+
}
|
|
216
|
+
}
|
|
140
217
|
}
|
|
141
218
|
],
|
|
142
219
|
"additionalProperties": false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-ranking.d.ts","sourceRoot":"","sources":["../src/search-ranking.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAgDD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACnC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,WAAW,EAAE,CAAC,CA8BxB;
|
|
1
|
+
{"version":3,"file":"search-ranking.d.ts","sourceRoot":"","sources":["../src/search-ranking.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAgDD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACnC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,WAAW,EAAE,CAAC,CA8BxB;AAsGD,wBAAsB,gBAAgB,CAEpC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA6BxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evid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AC1B,gBAAgB,GAChB,4BAA4B,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,WAAW,EAAE,OAAO,0BAA0B,CAAC;IAC/C,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,gDAAgD;IAChD,MAAM,EAAE,kBAAkB,CAAC;IAC3B,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,YAAY,CAAC;IACnB,oEAAoE;IACpE,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACrC;AAED,0EAA0E;AAC1E,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,oBAAoB,CAAC;IAC3B,0EAA0E;IAC1E,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GACtB,uBAAuB,GACvB,8BAA8B,GAC9B,qBAAqB,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACxC,2EAA2E;IAC3E,eAAe,EAAE,yBAAyB,CAAC;IAC3C,wDAAwD;IACxD,IAAI,EAAE,cAAc,CAAC;CACtB;AAMD,0DAA0D;AAC1D,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"evidence-model.d.ts","sourceRoot":"","sources":["../../src/traceability/evidence-model.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,0BAA0B,CAAC;AAE9D,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,qFAAqF;AACrF,eA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AAkB,GAC3B,MAAM,EAAE,CAQV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staged-diagnostics.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"staged-diagnostics.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kBAAkB,EAIxB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,sBAAsB,GAC9B,8BAA8B,GAC9B,wBAAwB,GACxB,wCAAwC,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IACnC,uDAAuD;IACvD,EAAE,EAAE,sBAAsB,CAAC;IAC3B,iDAAiD;IACjD,QAAQ,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,gDAAgD;IAChD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;CACpB;AAsDD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,kBAAkB,GAC3B,oBAAoB,EAAE,CAoCxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KIBI_ENTITY_SCHEMA_DOC,
|
|
1
|
+
import { KIBI_ENTITY_SCHEMA_DOC, KIBI_SYMBOLS_MANIFEST_PATH, KIBI_SYMBOL_COORDINATES_PATH, getBehaviorSourcePaths, getMissingBehaviorSourcePaths, hasOverrideRationale, } from "./evidence-model.js";
|
|
2
2
|
function formatFileList(paths) {
|
|
3
3
|
return paths.join(", ");
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staged-symbols-manifest.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-symbols-manifest.ts"],"names":[],"mappings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|
@@ -135,7 +135,9 @@ function normalizeAuthoredManifestSymbolsForSourceFile(records, sourceFile) {
|
|
|
135
135
|
links: normalizeLinks(record.links),
|
|
136
136
|
relationships: normalizeRelationships(record.relationships),
|
|
137
137
|
tags: Array.isArray(record.tags)
|
|
138
|
-
? record.tags
|
|
138
|
+
? record.tags
|
|
139
|
+
.filter((tag) => typeof tag === "string")
|
|
140
|
+
.sort()
|
|
139
141
|
: [],
|
|
140
142
|
owner: typeof record.owner === "string" ? record.owner : null,
|
|
141
143
|
priority: typeof record.priority === "string" ? record.priority : null,
|
|
@@ -218,7 +220,11 @@ export function assessStagedSymbolsManifest(options) {
|
|
|
218
220
|
}
|
|
219
221
|
const sourcePaths = uniqueSorted(requiredRefreshPaths);
|
|
220
222
|
if (sourcePaths.length === 0) {
|
|
221
|
-
return {
|
|
223
|
+
return {
|
|
224
|
+
state: "not_required",
|
|
225
|
+
sourcePaths: [],
|
|
226
|
+
path: paths.coordinatesPath,
|
|
227
|
+
};
|
|
222
228
|
}
|
|
223
229
|
if (sourcePaths.every((sourcePath) => freshPaths.has(sourcePath))) {
|
|
224
230
|
return { state: "fresh", sourcePaths, path: paths.coordinatesPath };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-extract.d.ts","sourceRoot":"","sources":["../../src/traceability/symbol-extract.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7D,KAAK,wBAAwB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAU7D,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7D,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,SAA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G,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAE9D,wBAAgB,+BAA+B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAG5E;AAkOD,wBAAgB,4BAA4B,CAE1C,UAAU,EAAE,UAAU,EACtB,cAAc,CAAC,EAAE,cAAc,GAC9B,eAAe,EAAE,CA+JnB"}
|
|
@@ -92,7 +92,10 @@ function extractRelationshipsFromManifestRecord(record) {
|
|
|
92
92
|
if (relationship &&
|
|
93
93
|
typeof relationship.type === "string" &&
|
|
94
94
|
typeof relationship.target === "string") {
|
|
95
|
-
relationships.push({
|
|
95
|
+
relationships.push({
|
|
96
|
+
type: relationship.type,
|
|
97
|
+
to: relationship.target,
|
|
98
|
+
});
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
}
|
package/dist/types/entities.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface BaseEntity {
|
|
|
13
13
|
text_ref?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface FactFields {
|
|
16
|
-
fact_kind?: "subject" | "property_value" | "observation" | "meta";
|
|
16
|
+
fact_kind?: "subject" | "property_value" | "observation" | "meta" | "predicate_schema" | "predicate";
|
|
17
17
|
subject_key?: string;
|
|
18
18
|
property_key?: string;
|
|
19
19
|
operator?: "eq" | "neq" | "lt" | "lte" | "gt" | "gte";
|
|
@@ -24,11 +24,20 @@ export interface FactFields {
|
|
|
24
24
|
value_bool?: boolean;
|
|
25
25
|
unit?: string;
|
|
26
26
|
scope?: string;
|
|
27
|
-
polarity?: "require" | "forbid";
|
|
27
|
+
polarity?: "require" | "forbid" | "assert" | "deny";
|
|
28
28
|
closed_world?: boolean;
|
|
29
29
|
valid_from?: string;
|
|
30
30
|
valid_to?: string;
|
|
31
31
|
canonical_key?: string;
|
|
32
|
+
predicate_name?: string;
|
|
33
|
+
predicate_namespace?: string;
|
|
34
|
+
predicate_arity?: number;
|
|
35
|
+
argument_names?: string[];
|
|
36
|
+
argument_types?: string[];
|
|
37
|
+
argument_descriptions?: string[];
|
|
38
|
+
aliases?: string[];
|
|
39
|
+
examples?: string[];
|
|
40
|
+
predicate_args?: string[];
|
|
32
41
|
}
|
|
33
42
|
export type Requirement = BaseEntity & {
|
|
34
43
|
type: "req";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,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AAU,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AACvD,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AACvD,MAAM,MAAM,GAAG,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAC/C,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AACjD,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AACnD,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,MAAM,GACd,WAAW,GACX,QAAQ,GACR,UAAU,GACV,GAAG,GACH,IAAI,GACJ,KAAK,GACL,MAAM,GACN,IAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface BaseRelationship {
|
|
2
|
-
type: "depends_on" | "specified_by" | "verified_by" | "implements" | "covered_by" | "constrained_by" | "constrains" | "requires_property" | "guards" | "publishes" | "consumes" | "supersedes" | "relates_to";
|
|
2
|
+
type: "depends_on" | "specified_by" | "verified_by" | "implements" | "covered_by" | "constrained_by" | "constrains" | "requires_property" | "requires_predicate" | "guards" | "publishes" | "consumes" | "supersedes" | "relates_to";
|
|
3
3
|
from: string;
|
|
4
4
|
to: string;
|
|
5
5
|
created_at?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/types/relationships.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EACA,YAAY,GACZ,cAAc,GACd,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,QAAQ,GACR,WAAW,GACX,UAAU,GACV,YAAY,GACZ,YAAY,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAe,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/types/relationships.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EACA,YAAY,GACZ,cAAc,GACd,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,oBAAoB,GACpB,QAAQ,GACR,WAAW,GACX,UAAU,GACV,YAAY,GACZ,YAAY,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAe,gBAAgB,CAAC"}
|
package/dist/utils/config.d.ts
CHANGED
|
@@ -12,23 +12,6 @@ export interface KbConfigPaths {
|
|
|
12
12
|
facts?: string;
|
|
13
13
|
symbols?: string;
|
|
14
14
|
}
|
|
15
|
-
export interface BriefsConfig {
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
retention?: {
|
|
18
|
-
maxPerBranch?: number;
|
|
19
|
-
maxAgeDays?: number;
|
|
20
|
-
keepUnread?: boolean;
|
|
21
|
-
};
|
|
22
|
-
channels: {
|
|
23
|
-
vscode: boolean;
|
|
24
|
-
tui: boolean;
|
|
25
|
-
};
|
|
26
|
-
tui: {
|
|
27
|
-
toast: boolean;
|
|
28
|
-
appendPrompt: boolean;
|
|
29
|
-
idleDelayMs?: number;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
15
|
/**
|
|
33
16
|
* Shared configuration for Kibi.
|
|
34
17
|
* Stored in .kb/config.json
|
|
@@ -36,7 +19,6 @@ export interface BriefsConfig {
|
|
|
36
19
|
export interface KbConfig {
|
|
37
20
|
paths: KbConfigPaths;
|
|
38
21
|
schemaVersion?: number | string;
|
|
39
|
-
briefs?: BriefsConfig;
|
|
40
22
|
/**
|
|
41
23
|
* @deprecated defaultBranch is deprecated. Branch lifecycle now follows git naturally
|
|
42
24
|
* without requiring a configured default. This field is ignored but kept for compatibility.
|
|
@@ -45,6 +27,9 @@ export interface KbConfig {
|
|
|
45
27
|
checks?: ChecksConfig;
|
|
46
28
|
}
|
|
47
29
|
export type { ChecksConfig, SymbolTraceabilityOptions };
|
|
30
|
+
/**
|
|
31
|
+
* Default configuration values for new repositories.
|
|
32
|
+
*/
|
|
48
33
|
export declare const DEFAULT_CONFIG: KbConfig & {
|
|
49
34
|
$schema: string;
|
|
50
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAC;AAG5B;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CA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