@codemieai/cdk 0.1.665 → 0.1.667
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 +157 -1
- package/dist/cli/index.js +1332 -376
- package/dist/index.d.ts +32 -3
- package/dist/index.js +1311 -387
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -188,9 +188,13 @@ type DatasourceResource = CodeDatasourceResource | ConfluenceDatasourceResource
|
|
|
188
188
|
interface SkillResource {
|
|
189
189
|
name: string;
|
|
190
190
|
description: string;
|
|
191
|
-
file
|
|
191
|
+
file?: string;
|
|
192
192
|
categories?: string[];
|
|
193
193
|
visibility?: string;
|
|
194
|
+
source_dir?: string;
|
|
195
|
+
ignore_file?: string;
|
|
196
|
+
group?: string;
|
|
197
|
+
content?: string;
|
|
194
198
|
}
|
|
195
199
|
/**
|
|
196
200
|
* Base Workflow configuration (IaC-specific fields only)
|
|
@@ -249,6 +253,9 @@ interface SkillState {
|
|
|
249
253
|
lastDeployed: string;
|
|
250
254
|
contentChecksum: string;
|
|
251
255
|
configChecksum: string;
|
|
256
|
+
group?: string;
|
|
257
|
+
companionFilesChecksum?: string;
|
|
258
|
+
companionFileHashes?: Record<string, string>;
|
|
252
259
|
}
|
|
253
260
|
interface WorkflowYaml {
|
|
254
261
|
assistants?: WorkflowAssistantReference[];
|
|
@@ -293,6 +300,12 @@ declare class CodemieConfigLoader {
|
|
|
293
300
|
* Load skill content file (.skill.md)
|
|
294
301
|
*/
|
|
295
302
|
loadSkillContent(contentPath: string): string;
|
|
303
|
+
/**
|
|
304
|
+
* Resolve a skill's content: prefers an already-loaded `content` (e.g. from an expanded
|
|
305
|
+
* `source_dir` entry) and otherwise falls back to reading `file`. This is the single
|
|
306
|
+
* content accessor for skills — every consumer routes through it.
|
|
307
|
+
*/
|
|
308
|
+
resolveSkillContent(skill: SkillResource): string;
|
|
296
309
|
/**
|
|
297
310
|
* Load assistant configuration file
|
|
298
311
|
*/
|
|
@@ -368,6 +381,14 @@ declare class CodemieConfigLoader {
|
|
|
368
381
|
private substituteEnvVars;
|
|
369
382
|
}
|
|
370
383
|
|
|
384
|
+
interface CompanionFile {
|
|
385
|
+
path: string;
|
|
386
|
+
content: string;
|
|
387
|
+
mime_type: string;
|
|
388
|
+
encoding: 'text' | 'base64';
|
|
389
|
+
size_bytes: number;
|
|
390
|
+
}
|
|
391
|
+
|
|
371
392
|
declare class StateManager {
|
|
372
393
|
private readonly statePath;
|
|
373
394
|
constructor(appConfig: AppConfig);
|
|
@@ -448,7 +469,7 @@ declare class StateManager {
|
|
|
448
469
|
/**
|
|
449
470
|
* Update skill state (keyed by NAME)
|
|
450
471
|
*/
|
|
451
|
-
updateSkillState(name: string, id: string, content: string, skillResource: SkillResource): void;
|
|
472
|
+
updateSkillState(name: string, id: string, content: string, skillResource: SkillResource, companionFiles?: CompanionFile[]): void;
|
|
452
473
|
/**
|
|
453
474
|
* Get skill state by NAME
|
|
454
475
|
*/
|
|
@@ -565,7 +586,7 @@ declare function deployAssistants(config: ReturnType<CodemieConfigLoader['loadCo
|
|
|
565
586
|
* Deploy all skills from configuration
|
|
566
587
|
* Skills must be deployed before assistants so skill_ids can be resolved
|
|
567
588
|
*/
|
|
568
|
-
declare function deploySkills(config: ReturnType<CodemieConfigLoader['loadConfig']>, client: Awaited<ReturnType<typeof createClient>>, loader: CodemieConfigLoader, stateManager: StateManager): Promise<DeploymentStats>;
|
|
589
|
+
declare function deploySkills(config: ReturnType<CodemieConfigLoader['loadConfig']>, client: Awaited<ReturnType<typeof createClient>>, loader: CodemieConfigLoader, stateManager: StateManager, rootDir?: string): Promise<DeploymentStats>;
|
|
569
590
|
/**
|
|
570
591
|
* Deploy all datasources from configuration
|
|
571
592
|
* Extracted from main() for better maintainability
|
|
@@ -580,6 +601,8 @@ declare function deployResources(options: {
|
|
|
580
601
|
appConfig: AppConfig;
|
|
581
602
|
prune?: boolean;
|
|
582
603
|
skipDatasources?: boolean;
|
|
604
|
+
replaceSkillGroup?: string;
|
|
605
|
+
yesReplaceSkills?: boolean;
|
|
583
606
|
}): Promise<void>;
|
|
584
607
|
|
|
585
608
|
declare function validateConfig(options: {
|
|
@@ -592,6 +615,7 @@ declare function validateConfig(options: {
|
|
|
592
615
|
|
|
593
616
|
declare function previewChanges(appConfig: AppConfig, existingClient?: CodeMieClient, options?: {
|
|
594
617
|
skipDatasources?: boolean;
|
|
618
|
+
replaceSkillGroup?: string;
|
|
595
619
|
}): Promise<{
|
|
596
620
|
changes: Change[];
|
|
597
621
|
summary: {
|
|
@@ -617,6 +641,11 @@ interface ImportOptions {
|
|
|
617
641
|
resourceType: ImportResourceType;
|
|
618
642
|
slug: string;
|
|
619
643
|
update?: boolean;
|
|
644
|
+
/**
|
|
645
|
+
* Assistants only: also import every referenced project-owned skill that the configuration
|
|
646
|
+
* does not manage yet, so a freshly imported assistant deploys without a manual skill import.
|
|
647
|
+
*/
|
|
648
|
+
withSkills?: boolean;
|
|
620
649
|
}
|
|
621
650
|
/**
|
|
622
651
|
* Import a single resource from the CodeMie platform into the local IaC configuration.
|