@contentful/experience-design-system-cli 2.35.1-dev-build-b8da2525.0 → 2.35.1-dev-build-e1cfef52.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.
@@ -3,7 +3,6 @@ export interface MapTokensViewResult {
3
3
  agent: string;
4
4
  sessionId: string;
5
5
  applied: number;
6
- cached: boolean;
7
6
  }
8
7
  interface MapTokensViewProps {
9
8
  result: MapTokensViewResult;
@@ -6,8 +6,6 @@ import type { ComponentTypeSummary } from '@contentful/experience-design-system-
6
6
  import type { SlotCycle, SlotEdge } from '../analyze/cycle-detection.js';
7
7
  import { type MatchHints as SessionMatchHints } from './repositories/sessions/read.js';
8
8
  import { type SessionResolution } from './services/session-resolver.js';
9
- export { hashComponentShape as computeComponentInputHash } from './core/components/hash-component-shape.js';
10
- export { hashTokenContent as computeTokenInputHash } from './core/tokens/hash-token-content.js';
11
9
  export { getDtcgTokensForSession as loadDTCGTokens, getRawTokenNamePaths as loadRawTokenNamePaths, getRawTokenNamePathRows as loadRawTokenNamePathRows, } from './repositories/tokens/read.js';
12
10
  export { storeDtcgTokens as storeDTCGTokens } from './services/tokens/store-dtcg-tokens.js';
13
11
  export { applyTokenToolCalls } from './services/tokens/apply-tool-calls.js';
@@ -111,29 +109,6 @@ export declare function seedDefaultsFromChangedItems(db: DatabaseSync, sessionId
111
109
  proposed: object;
112
110
  }>): number;
113
111
  export declare function backfillUnclassifiedProps(db: DatabaseSync, sessionId: string): number;
114
- export type CacheEntityType = 'component' | 'token_set' | 'token_mapping';
115
- export interface CacheEntry {
116
- inputHash: string;
117
- entityType: CacheEntityType;
118
- entityId: string;
119
- sourceSessionId: string;
120
- humanEdited: boolean;
121
- promptHash: string;
122
- createdAt: string;
123
- updatedAt: string;
124
- }
125
- export declare function computeMapTokensInputHash(db: DatabaseSync, sessionId: string, componentSourceRefs?: readonly ComponentSourceRef[]): string;
126
- export declare function lookupCache(db: DatabaseSync, inputHash: string, entityType: CacheEntityType, entityId: string, promptHash?: string): CacheEntry | null;
127
- export declare function lookupCacheByEntity(db: DatabaseSync, entityType: CacheEntityType, entityId: string): CacheEntry | null;
128
- export declare function storeCache(db: DatabaseSync, inputHash: string, entityType: CacheEntityType, entityId: string, sourceSessionId: string, humanEdited: boolean, promptHash?: string): void;
129
- export declare function storeCaches(db: DatabaseSync, entries: Array<{
130
- inputHash: string;
131
- entityType: CacheEntityType;
132
- entityId: string;
133
- sourceSessionId: string;
134
- humanEdited: boolean;
135
- promptHash?: string;
136
- }>): void;
137
112
  export declare function storeScannedFiles(db: DatabaseSync, sessionId: string, filePaths: string[]): void;
138
113
  export declare function loadScannedFiles(db: DatabaseSync, sessionId: string): string[];
139
114
  export declare function storeSlotCycles(db: DatabaseSync, sessionId: string, cycles: Array<SlotCycle & {
@@ -144,57 +119,12 @@ export interface StoredSlotCycle extends SlotCycle {
144
119
  }
145
120
  export declare function loadSlotCycles(db: DatabaseSync, sessionId: string): StoredSlotCycle[];
146
121
  export declare function clearSlotCycles(db: DatabaseSync, sessionId: string): void;
147
- export declare function markCacheHumanEdited(db: DatabaseSync, entityType: 'component' | 'token_set', entityId: string): void;
148
- export interface UnknownSlotAllowedComponent {
122
+ interface UnknownSlotAllowedComponent {
149
123
  componentId: string;
150
124
  componentName: string;
151
125
  slotName: string;
152
126
  allowedComponent: string;
153
127
  }
154
- export declare function findUnknownSlotAllowedComponents(db: DatabaseSync, sessionId: string, allowedComponentNames: ReadonlySet<string>, componentId?: string): UnknownSlotAllowedComponent[];
155
128
  /** Remove slot references that cannot resolve in the current manifest or target space. */
156
129
  export declare function filterUnknownSlotAllowedComponents(db: DatabaseSync, sessionId: string, allowedComponentNames: ReadonlySet<string>): UnknownSlotAllowedComponent[];
157
- export interface CopyComponentFromCacheOptions {
158
- allowedComponentNames?: ReadonlySet<string>;
159
- }
160
- export declare function copyComponentFromCache(db: DatabaseSync, sourceSessionId: string, targetSessionId: string, componentId: string, manageTransaction?: boolean, options?: CopyComponentFromCacheOptions): void;
161
- export declare function copyComponentsFromCache(db: DatabaseSync, entries: Array<{
162
- sourceSessionId: string;
163
- targetSessionId: string;
164
- componentId: string;
165
- }>, options?: CopyComponentFromCacheOptions): void;
166
- export declare function copyTokensFromCache(db: DatabaseSync, sourceSessionId: string, targetSessionId: string): void;
167
- export declare function copyMapTokensFromCache(db: DatabaseSync, sourceSessionId: string, targetSessionId: string): number;
168
- export declare function getCliCacheVersion(): Promise<string>;
169
- export interface ExtractCacheEntry {
170
- filePath: string;
171
- fileHash: string;
172
- cliVersion: string;
173
- createdAt: string;
174
- updatedAt: string;
175
- components: RawComponentDefinition[];
176
- }
177
- export declare function storeExtractCache(db: DatabaseSync, filePath: string, fileHash: string, cliVersion: string, components: RawComponentDefinition[]): void;
178
- export declare function lookupExtractCache(db: DatabaseSync, fileHash: string, cliVersion: string): ExtractCacheEntry | null;
179
- /**
180
- * Content-addressed cache for the composition resolver's raw agent output
181
- * (authored parser source or emitted-edge JSONL). Keyed by a hash of the
182
- * candidate files + producer identity (`composition-cache-key.ts`), scoped by
183
- * `cli_version` so a prompt/skill change invalidates stale entries. Replaces
184
- * the former on-disk `~/.contentful/.../composition-cache` store so all CLI
185
- * caches live in the one pipeline DB.
186
- */
187
- export declare function storeCompositionCache(db: DatabaseSync, inputHash: string, cliVersion: string, agentOutput: string): void;
188
- export declare function lookupCompositionCache(db: DatabaseSync, inputHash: string, cliVersion: string): string | null;
189
- export type SelectDecision = 'accepted' | 'rejected';
190
- export interface SelectCacheEntry {
191
- componentHash: string;
192
- promptHash: string;
193
- cliVersion: string;
194
- decision: SelectDecision;
195
- reason: string | null;
196
- createdAt: string;
197
- updatedAt: string;
198
- }
199
- export declare function storeSelectCache(db: DatabaseSync, componentHash: string, promptHash: string, cliVersion: string, decision: SelectDecision, reason: string | null): void;
200
- export declare function lookupSelectCache(db: DatabaseSync, componentHash: string, promptHash: string, cliVersion: string): SelectCacheEntry | null;
130
+ export declare function copyTokensBetweenSessions(db: DatabaseSync, sourceSessionId: string, targetSessionId: string): void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.35.1-dev-build-b8da2525.0",
3
+ "version": "2.35.1-dev-build-e1cfef52.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -53,6 +53,9 @@
53
53
  "typescript": "^5.9.3"
54
54
  },
55
55
  "devDependencies": {
56
+ "@contentful/experience-design-system-agents": "workspace:*",
57
+ "@contentful/experience-design-system-extraction": "workspace:*",
58
+ "@contentful/experience-design-system-generation": "workspace:*",
56
59
  "@tsconfig/node24": "^24.0.4",
57
60
  "@types/node": "^24.0.3",
58
61
  "@types/react": "^18.3.24",
@@ -60,6 +63,7 @@
60
63
  "eslint": "^9.39.5",
61
64
  "eslint-config-prettier": "^10.1.8",
62
65
  "eslint-plugin-prettier": "^5.5.6",
66
+ "ink-testing-library": "^4.0.0",
63
67
  "typescript-eslint": "^8.67.0",
64
68
  "vitest": "^4.0.16"
65
69
  },
@@ -0,0 +1,23 @@
1
+ # Debate component selection
2
+
3
+ This skill is used after independent component-selection agents disagree about an interpretive question. The caller supplies one component, its source evidence, the disagreement record, and your role (for or against).
4
+
5
+ The caller dispatches a blind FOR/AGAINST pair; argue only the side named in your prompt and do not assume or describe the other participant's response.
6
+
7
+ ## Scope
8
+
9
+ - Argue only the exact disagreement in the prompt.
10
+ - Use the supplied component data and citations as the evidence base.
11
+ - For slot-realness or allowed-component questions, reason from concrete caller evidence rather than from a ReactNode-shaped prop alone.
12
+ - Keep the argument specific enough for an orchestrator to make an independent determination.
13
+ - Do not write files, call tools, or invent evidence that is not present in the prompt.
14
+
15
+ ## Output protocol
16
+
17
+ Emit exactly one JSON object on one line:
18
+
19
+ ~~~json
20
+ {"role":"for","disagreement_id":"d1","argument":"...","evidence":[{"source":"src/Panel.tsx","line":"42","quote":"<Card><Badge /></Card>"}]}
21
+ ~~~
22
+
23
+ Use the role and disagreement ID supplied by the caller. evidence must be an array of objects with source, line, and quote strings; use an empty array when no citable source evidence is supplied.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.35.1-dev-build-b8da2525.0",
3
+ "version": "2.35.1-dev-build-e1cfef52.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  "svelte": "^5.56.4",
43
43
  "ts-morph": "^27.0.2",
44
44
  "typescript": "^5.9.3",
45
- "@contentful/experience-design-system-types": "2.35.1-dev-build-b8da2525.0"
45
+ "@contentful/experience-design-system-types": "2.35.1-dev-build-e1cfef52.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@tsconfig/node24": "^24.0.4",
@@ -52,8 +52,12 @@
52
52
  "eslint": "^9.39.5",
53
53
  "eslint-config-prettier": "^10.1.8",
54
54
  "eslint-plugin-prettier": "^5.5.6",
55
+ "ink-testing-library": "^4.0.0",
55
56
  "typescript-eslint": "^8.67.0",
56
- "vitest": "^4.0.16"
57
+ "vitest": "^4.0.16",
58
+ "@contentful/experience-design-system-agents": "2.35.1-dev-build-e1cfef52.0",
59
+ "@contentful/experience-design-system-extraction": "2.35.1-dev-build-e1cfef52.0",
60
+ "@contentful/experience-design-system-generation": "2.35.1-dev-build-e1cfef52.0"
57
61
  },
58
62
  "repository": {
59
63
  "type": "git",
@@ -1,22 +0,0 @@
1
- import { type Skill } from '@contentful/experience-design-system-generation';
2
- /** sha256 hex of a string. Stable across runs. */
3
- export declare function hashContent(content: string): string;
4
- /** sha256 hex of a file's UTF-8 content. */
5
- export declare function hashFile(filePath: string): Promise<string>;
6
- /**
7
- * Hash the prompt content for a skill — either the bundled skill file shipped
8
- * with the CLI, or a custom override path. Used to key the select_cache and
9
- * generation_cache so cache entries invalidate when the prompt itself changes
10
- * (including bundled-skill updates across CLI versions).
11
- *
12
- * Also folds in the resolved agent and model: a cache hit must not stand in
13
- * for an agent run that was never made with the currently requested
14
- * agent/model, or `--agent`/`--model` overrides would appear to be ignored
15
- * whenever a prior cache entry already exists for the same input/prompt.
16
- *
17
- * @param skill — which skill (matches resolveSkillPath in prompt-builder)
18
- * @param agent — resolved agent name for this run
19
- * @param model — resolved model for this run (undefined resolves to the agent's default)
20
- * @param skillPathOverride — optional absolute/relative path to a custom prompt
21
- */
22
- export declare function hashPromptForSkill(skill: Skill, agent: string, model: string | undefined, skillPathOverride?: string, extraInputs?: string[], skillContentOverride?: string): Promise<string>;
@@ -1,5 +0,0 @@
1
- import type { RawComponentDefinition } from '../../../types.js';
2
- export type RawComponentForHash = RawComponentDefinition & {
3
- component_id?: string;
4
- };
5
- export declare function hashComponentShape(component: RawComponentForHash): string;
@@ -1 +0,0 @@
1
- export declare function hashTokenContent(rawTokenContent: string): string;