@vfarcic/dot-ai 1.23.1 → 1.24.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/core/index.d.ts +0 -5
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -11
- package/dist/core/knowledge-migration.d.ts +30 -0
- package/dist/core/knowledge-migration.d.ts.map +1 -0
- package/dist/core/knowledge-migration.js +289 -0
- package/dist/core/knowledge-service.d.ts +46 -0
- package/dist/core/knowledge-service.d.ts.map +1 -0
- package/dist/core/knowledge-service.js +185 -0
- package/dist/core/knowledge-types.d.ts +14 -0
- package/dist/core/knowledge-types.d.ts.map +1 -1
- package/dist/core/schema.d.ts +13 -12
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +105 -170
- package/dist/core/user-prompts-loader.d.ts.map +1 -1
- package/dist/core/user-prompts-loader.js +13 -6
- package/dist/interfaces/rest-api.d.ts.map +1 -1
- package/dist/interfaces/rest-api.js +7 -6
- package/dist/mcp/server.js +12 -0
- package/dist/tools/manage-knowledge.d.ts +0 -22
- package/dist/tools/manage-knowledge.d.ts.map +1 -1
- package/dist/tools/manage-knowledge.js +71 -131
- package/dist/tools/operate-analysis.d.ts.map +1 -1
- package/dist/tools/operate-analysis.js +7 -6
- package/dist/tools/operate.d.ts +23 -11
- package/dist/tools/operate.d.ts.map +1 -1
- package/dist/tools/operate.js +40 -58
- package/dist/tools/organizational-data.d.ts +5 -8
- package/dist/tools/organizational-data.d.ts.map +1 -1
- package/dist/tools/organizational-data.js +19 -74
- package/dist/tools/query.d.ts +17 -0
- package/dist/tools/query.d.ts.map +1 -1
- package/dist/tools/query.js +36 -1
- package/dist/tools/version.d.ts +1 -12
- package/dist/tools/version.d.ts.map +1 -1
- package/dist/tools/version.js +10 -19
- package/package.json +2 -2
- package/prompts/knowledge-classification.md +24 -0
- package/prompts/operate-user.md +7 -8
- package/dist/core/organizational-types.d.ts +0 -43
- package/dist/core/organizational-types.d.ts.map +0 -1
- package/dist/core/organizational-types.js +0 -8
- package/dist/core/pattern-operations.d.ts +0 -50
- package/dist/core/pattern-operations.d.ts.map +0 -1
- package/dist/core/pattern-operations.js +0 -445
- package/dist/core/pattern-types.d.ts +0 -8
- package/dist/core/pattern-types.d.ts.map +0 -1
- package/dist/core/pattern-types.js +0 -8
- package/dist/core/pattern-vector-service.d.ts +0 -27
- package/dist/core/pattern-vector-service.d.ts.map +0 -1
- package/dist/core/pattern-vector-service.js +0 -65
- package/dist/core/policy-operations.d.ts +0 -136
- package/dist/core/policy-operations.d.ts.map +0 -1
- package/dist/core/policy-operations.js +0 -623
- package/dist/core/policy-vector-service.d.ts +0 -27
- package/dist/core/policy-vector-service.d.ts.map +0 -1
- package/dist/core/policy-vector-service.js +0 -64
- package/dist/core/unified-creation-session.d.ts +0 -88
- package/dist/core/unified-creation-session.d.ts.map +0 -1
- package/dist/core/unified-creation-session.js +0 -948
- package/dist/core/unified-creation-types.d.ts +0 -68
- package/dist/core/unified-creation-types.d.ts.map +0 -1
- package/dist/core/unified-creation-types.js +0 -61
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified Creation Workflow Types
|
|
3
|
-
*
|
|
4
|
-
* Generic workflow system that handles both patterns and policies
|
|
5
|
-
* with configurable steps and entity-specific behavior.
|
|
6
|
-
*/
|
|
7
|
-
export type WorkflowStep = 'description' | 'triggers' | 'trigger-expansion' | 'resources' | 'rationale' | 'created-by' | 'namespace-scope' | 'kyverno-generation' | 'review' | 'apply-save-discard' | 'complete';
|
|
8
|
-
export type EntityType = 'pattern' | 'policy';
|
|
9
|
-
export interface WorkflowConfig {
|
|
10
|
-
entityType: EntityType;
|
|
11
|
-
steps: WorkflowStep[];
|
|
12
|
-
displayName: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Session data structure for unified creation workflow
|
|
16
|
-
* Now fits GenericSession<UnifiedCreationSessionData> pattern
|
|
17
|
-
*/
|
|
18
|
-
export interface UnifiedCreationSessionData {
|
|
19
|
-
entityType: EntityType;
|
|
20
|
-
currentStep: WorkflowStep;
|
|
21
|
-
description?: string;
|
|
22
|
-
initialTriggers?: string[];
|
|
23
|
-
expandedTriggers?: string[];
|
|
24
|
-
suggestedResources?: string[];
|
|
25
|
-
rationale?: string;
|
|
26
|
-
createdBy?: string;
|
|
27
|
-
source?: string;
|
|
28
|
-
policyId?: string;
|
|
29
|
-
generatedKyvernoPolicy?: string;
|
|
30
|
-
kyvernoGenerationError?: string;
|
|
31
|
-
kyvernoGenerationSkipped?: boolean;
|
|
32
|
-
kyvernoSkipReason?: string;
|
|
33
|
-
deploymentChoice?: string;
|
|
34
|
-
namespaceScope?: {
|
|
35
|
-
type: 'all' | 'include' | 'exclude';
|
|
36
|
-
namespaces?: string[];
|
|
37
|
-
};
|
|
38
|
-
capabilitiesCollection?: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Legacy type alias for backwards compatibility during refactoring
|
|
42
|
-
* TODO: Remove once all code is updated to use GenericSession<UnifiedCreationSessionData>
|
|
43
|
-
*/
|
|
44
|
-
export interface UnifiedCreationSession {
|
|
45
|
-
sessionId: string;
|
|
46
|
-
createdAt: string;
|
|
47
|
-
updatedAt: string;
|
|
48
|
-
data: UnifiedCreationSessionData;
|
|
49
|
-
}
|
|
50
|
-
export interface UnifiedWorkflowStepResponse {
|
|
51
|
-
sessionId: string;
|
|
52
|
-
entityType: EntityType;
|
|
53
|
-
prompt?: string;
|
|
54
|
-
instruction: string;
|
|
55
|
-
nextStep?: WorkflowStep;
|
|
56
|
-
data?: unknown;
|
|
57
|
-
}
|
|
58
|
-
export interface UnifiedWorkflowCompletionResponse {
|
|
59
|
-
sessionId: string;
|
|
60
|
-
entityType: EntityType;
|
|
61
|
-
instruction: string;
|
|
62
|
-
data?: unknown;
|
|
63
|
-
}
|
|
64
|
-
export declare const WORKFLOW_CONFIGS: Record<EntityType, WorkflowConfig>;
|
|
65
|
-
export declare function requiresResources(config: WorkflowConfig): boolean;
|
|
66
|
-
export declare function getNextStep(currentStep: WorkflowStep, config: WorkflowConfig): WorkflowStep | null;
|
|
67
|
-
export declare function getPreviousStep(currentStep: WorkflowStep, config: WorkflowConfig): WorkflowStep | null;
|
|
68
|
-
//# sourceMappingURL=unified-creation-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unified-creation-types.d.ts","sourceRoot":"","sources":["../../src/core/unified-creation-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,WAAW,GACX,WAAW,GACX,YAAY,GACZ,iBAAiB,GACjB,oBAAoB,GACpB,QAAQ,GACR,oBAAoB,GACpB,UAAU,CAAC;AAEf,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,YAAY,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,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workflow Types
|
|
4
|
-
*
|
|
5
|
-
* Generic workflow system that handles both patterns and policies
|
|
6
|
-
* with configurable steps and entity-specific behavior.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.WORKFLOW_CONFIGS = void 0;
|
|
10
|
-
exports.requiresResources = requiresResources;
|
|
11
|
-
exports.getNextStep = getNextStep;
|
|
12
|
-
exports.getPreviousStep = getPreviousStep;
|
|
13
|
-
// Pattern workflow - unchanged, no Kyverno generation needed
|
|
14
|
-
const PATTERN_WORKFLOW = [
|
|
15
|
-
'description',
|
|
16
|
-
'triggers',
|
|
17
|
-
'trigger-expansion',
|
|
18
|
-
'resources',
|
|
19
|
-
'rationale',
|
|
20
|
-
'created-by',
|
|
21
|
-
'review',
|
|
22
|
-
'complete'
|
|
23
|
-
];
|
|
24
|
-
// Policy workflow - includes Kyverno generation after data collection
|
|
25
|
-
const POLICY_WORKFLOW = [
|
|
26
|
-
'description',
|
|
27
|
-
'triggers',
|
|
28
|
-
'trigger-expansion',
|
|
29
|
-
'rationale',
|
|
30
|
-
'created-by',
|
|
31
|
-
'namespace-scope',
|
|
32
|
-
'kyverno-generation',
|
|
33
|
-
'review',
|
|
34
|
-
'complete'
|
|
35
|
-
];
|
|
36
|
-
// Predefined workflow configurations
|
|
37
|
-
exports.WORKFLOW_CONFIGS = {
|
|
38
|
-
pattern: {
|
|
39
|
-
entityType: 'pattern',
|
|
40
|
-
steps: PATTERN_WORKFLOW,
|
|
41
|
-
displayName: 'Pattern'
|
|
42
|
-
},
|
|
43
|
-
policy: {
|
|
44
|
-
entityType: 'policy',
|
|
45
|
-
steps: POLICY_WORKFLOW,
|
|
46
|
-
displayName: 'Policy Intent'
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
// Helper functions
|
|
50
|
-
function requiresResources(config) {
|
|
51
|
-
return config.steps.includes('resources');
|
|
52
|
-
}
|
|
53
|
-
function getNextStep(currentStep, config) {
|
|
54
|
-
const currentIndex = config.steps.indexOf(currentStep);
|
|
55
|
-
const nextIndex = currentIndex + 1;
|
|
56
|
-
return nextIndex < config.steps.length ? config.steps[nextIndex] : null;
|
|
57
|
-
}
|
|
58
|
-
function getPreviousStep(currentStep, config) {
|
|
59
|
-
const currentIndex = config.steps.indexOf(currentStep);
|
|
60
|
-
return currentIndex > 0 ? config.steps[currentIndex - 1] : null;
|
|
61
|
-
}
|