@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.
Files changed (63) hide show
  1. package/dist/core/index.d.ts +0 -5
  2. package/dist/core/index.d.ts.map +1 -1
  3. package/dist/core/index.js +2 -11
  4. package/dist/core/knowledge-migration.d.ts +30 -0
  5. package/dist/core/knowledge-migration.d.ts.map +1 -0
  6. package/dist/core/knowledge-migration.js +289 -0
  7. package/dist/core/knowledge-service.d.ts +46 -0
  8. package/dist/core/knowledge-service.d.ts.map +1 -0
  9. package/dist/core/knowledge-service.js +185 -0
  10. package/dist/core/knowledge-types.d.ts +14 -0
  11. package/dist/core/knowledge-types.d.ts.map +1 -1
  12. package/dist/core/schema.d.ts +13 -12
  13. package/dist/core/schema.d.ts.map +1 -1
  14. package/dist/core/schema.js +105 -170
  15. package/dist/core/user-prompts-loader.d.ts.map +1 -1
  16. package/dist/core/user-prompts-loader.js +13 -6
  17. package/dist/interfaces/rest-api.d.ts.map +1 -1
  18. package/dist/interfaces/rest-api.js +7 -6
  19. package/dist/mcp/server.js +12 -0
  20. package/dist/tools/manage-knowledge.d.ts +0 -22
  21. package/dist/tools/manage-knowledge.d.ts.map +1 -1
  22. package/dist/tools/manage-knowledge.js +71 -131
  23. package/dist/tools/operate-analysis.d.ts.map +1 -1
  24. package/dist/tools/operate-analysis.js +7 -6
  25. package/dist/tools/operate.d.ts +23 -11
  26. package/dist/tools/operate.d.ts.map +1 -1
  27. package/dist/tools/operate.js +40 -58
  28. package/dist/tools/organizational-data.d.ts +5 -8
  29. package/dist/tools/organizational-data.d.ts.map +1 -1
  30. package/dist/tools/organizational-data.js +19 -74
  31. package/dist/tools/query.d.ts +17 -0
  32. package/dist/tools/query.d.ts.map +1 -1
  33. package/dist/tools/query.js +36 -1
  34. package/dist/tools/version.d.ts +1 -12
  35. package/dist/tools/version.d.ts.map +1 -1
  36. package/dist/tools/version.js +10 -19
  37. package/package.json +2 -2
  38. package/prompts/knowledge-classification.md +24 -0
  39. package/prompts/operate-user.md +7 -8
  40. package/dist/core/organizational-types.d.ts +0 -43
  41. package/dist/core/organizational-types.d.ts.map +0 -1
  42. package/dist/core/organizational-types.js +0 -8
  43. package/dist/core/pattern-operations.d.ts +0 -50
  44. package/dist/core/pattern-operations.d.ts.map +0 -1
  45. package/dist/core/pattern-operations.js +0 -445
  46. package/dist/core/pattern-types.d.ts +0 -8
  47. package/dist/core/pattern-types.d.ts.map +0 -1
  48. package/dist/core/pattern-types.js +0 -8
  49. package/dist/core/pattern-vector-service.d.ts +0 -27
  50. package/dist/core/pattern-vector-service.d.ts.map +0 -1
  51. package/dist/core/pattern-vector-service.js +0 -65
  52. package/dist/core/policy-operations.d.ts +0 -136
  53. package/dist/core/policy-operations.d.ts.map +0 -1
  54. package/dist/core/policy-operations.js +0 -623
  55. package/dist/core/policy-vector-service.d.ts +0 -27
  56. package/dist/core/policy-vector-service.d.ts.map +0 -1
  57. package/dist/core/policy-vector-service.js +0 -64
  58. package/dist/core/unified-creation-session.d.ts +0 -88
  59. package/dist/core/unified-creation-session.d.ts.map +0 -1
  60. package/dist/core/unified-creation-session.js +0 -948
  61. package/dist/core/unified-creation-types.d.ts +0 -68
  62. package/dist/core/unified-creation-types.d.ts.map +0 -1
  63. package/dist/core/unified-creation-types.js +0 -61
@@ -1,64 +0,0 @@
1
- "use strict";
2
- /**
3
- * Policy Vector Service
4
- *
5
- * Handles policy intent-specific Vector DB operations
6
- * Extends BaseVectorService for policy intents
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.PolicyVectorService = void 0;
10
- const base_vector_service_1 = require("./base-vector-service");
11
- class PolicyVectorService extends base_vector_service_1.BaseVectorService {
12
- constructor(embeddingService) {
13
- super('policies', embeddingService);
14
- }
15
- // Implement abstract methods from BaseVectorService
16
- createSearchText(policyIntent) {
17
- const triggerText = policyIntent.triggers.join(' ');
18
- return `${policyIntent.description} ${triggerText} ${policyIntent.rationale}`.toLowerCase();
19
- }
20
- extractId(policyIntent) {
21
- return policyIntent.id;
22
- }
23
- createPayload(policyIntent) {
24
- return {
25
- description: policyIntent.description,
26
- triggers: policyIntent.triggers.map(t => t.toLowerCase()),
27
- rationale: policyIntent.rationale,
28
- createdAt: policyIntent.createdAt,
29
- createdBy: policyIntent.createdBy,
30
- deployedPolicies: policyIntent.deployedPolicies || []
31
- };
32
- }
33
- payloadToData(payload) {
34
- return {
35
- id: '', // Will be set from document ID in base class
36
- description: payload.description,
37
- triggers: payload.triggers,
38
- rationale: payload.rationale,
39
- createdAt: payload.createdAt,
40
- createdBy: payload.createdBy,
41
- deployedPolicies: payload.deployedPolicies || []
42
- };
43
- }
44
- // Public API methods - delegate to base class with appropriate names
45
- async storePolicyIntent(policyIntent) {
46
- await this.storeData(policyIntent);
47
- }
48
- async searchPolicyIntents(query, options = {}) {
49
- return await this.searchData(query, options);
50
- }
51
- async getPolicyIntent(id) {
52
- return await this.getData(id);
53
- }
54
- async getAllPolicyIntents() {
55
- return await this.getAllData();
56
- }
57
- async deletePolicyIntent(id) {
58
- await this.deleteData(id);
59
- }
60
- async getPolicyIntentsCount() {
61
- return await this.getDataCount();
62
- }
63
- }
64
- exports.PolicyVectorService = PolicyVectorService;
@@ -1,88 +0,0 @@
1
- /**
2
- * Unified Creation Session Manager
3
- *
4
- * Handles step-by-step creation workflow for both patterns and policies
5
- * with context-aware questions and AI-powered trigger expansion.
6
- * Loads prompts from markdown files following CLAUDE.md guidelines.
7
- */
8
- import { KubernetesDiscovery } from './discovery';
9
- import { UnifiedCreationSession, UnifiedWorkflowStepResponse, UnifiedWorkflowCompletionResponse, EntityType } from './unified-creation-types';
10
- /**
11
- * Session creation/operation arguments
12
- */
13
- interface SessionArgs {
14
- collection?: string;
15
- interaction_id?: string;
16
- [key: string]: unknown;
17
- }
18
- export declare class UnifiedCreationSessionManager {
19
- private config;
20
- private discovery;
21
- private sessionManager;
22
- /**
23
- * PRD #359: Uses unified plugin registry for kubectl operations
24
- */
25
- constructor(entityType: EntityType, discovery?: KubernetesDiscovery);
26
- /**
27
- * Create a new creation session
28
- */
29
- createSession(args: SessionArgs): UnifiedCreationSession;
30
- /**
31
- * Load existing session
32
- */
33
- loadSession(sessionId: string): UnifiedCreationSession | null;
34
- /**
35
- * Process user response and advance session
36
- */
37
- processResponse(sessionId: string, response: string): UnifiedCreationSession;
38
- /**
39
- * Generate next workflow step
40
- */
41
- getNextWorkflowStep(session: UnifiedCreationSession, args?: SessionArgs): Promise<UnifiedWorkflowStepResponse | UnifiedWorkflowCompletionResponse>;
42
- /**
43
- * Generate trigger expansion step with AI suggestions
44
- */
45
- private generateTriggerExpansionStep;
46
- /**
47
- * Generate trigger expansion using internal AI
48
- */
49
- private generateInternalTriggerExpansion;
50
- /**
51
- * Generate review step showing all collected data
52
- */
53
- private generateReviewStep;
54
- /**
55
- * Complete the workflow and create the entity
56
- */
57
- private completeWorkflow;
58
- /**
59
- * Handle policy deployment choice (apply to cluster or store intent only)
60
- */
61
- private handlePolicyDeploymentChoice;
62
- /**
63
- * Validate YAML syntax
64
- */
65
- private validateYamlSyntax;
66
- /**
67
- * Validate Kyverno policy using multi-layer approach
68
- */
69
- private validateKyvernoPolicy;
70
- /**
71
- * Generate Kyverno policy step - automatically generates policy from intent data with validation loop
72
- */
73
- private generateKyvernoStep;
74
- /**
75
- * Retrieve relevant schemas for Kyverno generation using semantic search
76
- */
77
- private retrieveRelevantSchemas;
78
- /**
79
- * Format namespace scope for inclusion in the Kyverno generation prompt
80
- */
81
- private formatNamespaceScope;
82
- /**
83
- * Format schemas for inclusion in the Kyverno generation prompt
84
- */
85
- private formatSchemasForPrompt;
86
- }
87
- export {};
88
- //# sourceMappingURL=unified-creation-session.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unified-creation-session.d.ts","sourceRoot":"","sources":["../../src/core/unified-creation-session.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,EAAE,mBAAmB,EA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