jiva-core 0.2.2 → 0.3.1

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 (156) hide show
  1. package/.dockerignore +53 -0
  2. package/.gcloudignore +49 -0
  3. package/CONTRIBUTING.md +92 -0
  4. package/Dockerfile +63 -0
  5. package/LICENSE +21 -0
  6. package/README.md +248 -102
  7. package/cloud-run-deploy.yaml +135 -0
  8. package/cloud-run.yaml +135 -0
  9. package/cloud-run.yaml.template +143 -0
  10. package/deploy.sh +107 -0
  11. package/dist/core/agent-spawner.d.ts +89 -0
  12. package/dist/core/agent-spawner.d.ts.map +1 -0
  13. package/dist/core/agent-spawner.js +195 -0
  14. package/dist/core/agent-spawner.js.map +1 -0
  15. package/dist/core/client-agent.d.ts +82 -0
  16. package/dist/core/client-agent.d.ts.map +1 -0
  17. package/dist/core/client-agent.js +406 -0
  18. package/dist/core/client-agent.js.map +1 -0
  19. package/dist/core/config.d.ts +59 -10
  20. package/dist/core/config.d.ts.map +1 -1
  21. package/dist/core/config.js +19 -2
  22. package/dist/core/config.js.map +1 -1
  23. package/dist/core/conversation-manager.d.ts +10 -18
  24. package/dist/core/conversation-manager.d.ts.map +1 -1
  25. package/dist/core/conversation-manager.js +28 -60
  26. package/dist/core/conversation-manager.js.map +1 -1
  27. package/dist/core/dual-agent.d.ts +24 -3
  28. package/dist/core/dual-agent.d.ts.map +1 -1
  29. package/dist/core/dual-agent.js +112 -19
  30. package/dist/core/dual-agent.js.map +1 -1
  31. package/dist/core/manager-agent.d.ts +3 -1
  32. package/dist/core/manager-agent.d.ts.map +1 -1
  33. package/dist/core/manager-agent.js +66 -14
  34. package/dist/core/manager-agent.js.map +1 -1
  35. package/dist/core/worker-agent.d.ts +15 -1
  36. package/dist/core/worker-agent.d.ts.map +1 -1
  37. package/dist/core/worker-agent.js +244 -11
  38. package/dist/core/worker-agent.js.map +1 -1
  39. package/dist/core/workspace.d.ts +5 -0
  40. package/dist/core/workspace.d.ts.map +1 -1
  41. package/dist/core/workspace.js +47 -7
  42. package/dist/core/workspace.js.map +1 -1
  43. package/dist/index.d.ts +3 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +4 -0
  46. package/dist/index.js.map +1 -1
  47. package/dist/interfaces/cli/index.js +376 -44
  48. package/dist/interfaces/cli/index.js.map +1 -1
  49. package/dist/interfaces/cli/repl.d.ts.map +1 -1
  50. package/dist/interfaces/cli/repl.js +6 -0
  51. package/dist/interfaces/cli/repl.js.map +1 -1
  52. package/dist/interfaces/http/index.d.ts +22 -0
  53. package/dist/interfaces/http/index.d.ts.map +1 -0
  54. package/dist/interfaces/http/index.js +135 -0
  55. package/dist/interfaces/http/index.js.map +1 -0
  56. package/dist/interfaces/http/middleware/auth.d.ts +32 -0
  57. package/dist/interfaces/http/middleware/auth.d.ts.map +1 -0
  58. package/dist/interfaces/http/middleware/auth.js +176 -0
  59. package/dist/interfaces/http/middleware/auth.js.map +1 -0
  60. package/dist/interfaces/http/routes/chat.d.ts +7 -0
  61. package/dist/interfaces/http/routes/chat.d.ts.map +1 -0
  62. package/dist/interfaces/http/routes/chat.js +144 -0
  63. package/dist/interfaces/http/routes/chat.js.map +1 -0
  64. package/dist/interfaces/http/routes/health.d.ts +6 -0
  65. package/dist/interfaces/http/routes/health.d.ts.map +1 -0
  66. package/dist/interfaces/http/routes/health.js +25 -0
  67. package/dist/interfaces/http/routes/health.js.map +1 -0
  68. package/dist/interfaces/http/routes/session.d.ts +7 -0
  69. package/dist/interfaces/http/routes/session.d.ts.map +1 -0
  70. package/dist/interfaces/http/routes/session.js +114 -0
  71. package/dist/interfaces/http/routes/session.js.map +1 -0
  72. package/dist/interfaces/http/session-manager.d.ts +76 -0
  73. package/dist/interfaces/http/session-manager.d.ts.map +1 -0
  74. package/dist/interfaces/http/session-manager.js +339 -0
  75. package/dist/interfaces/http/session-manager.js.map +1 -0
  76. package/dist/interfaces/http/websocket-handler.d.ts +18 -0
  77. package/dist/interfaces/http/websocket-handler.d.ts.map +1 -0
  78. package/dist/interfaces/http/websocket-handler.js +146 -0
  79. package/dist/interfaces/http/websocket-handler.js.map +1 -0
  80. package/dist/mcp/client.d.ts +11 -2
  81. package/dist/mcp/client.d.ts.map +1 -1
  82. package/dist/mcp/client.js +44 -19
  83. package/dist/mcp/client.js.map +1 -1
  84. package/dist/mcp/server-manager.d.ts +1 -1
  85. package/dist/mcp/server-manager.d.ts.map +1 -1
  86. package/dist/mcp/server-manager.js +12 -2
  87. package/dist/mcp/server-manager.js.map +1 -1
  88. package/dist/personas/index.d.ts +13 -0
  89. package/dist/personas/index.d.ts.map +1 -0
  90. package/dist/personas/index.js +13 -0
  91. package/dist/personas/index.js.map +1 -0
  92. package/dist/personas/persona-loader.d.ts +30 -0
  93. package/dist/personas/persona-loader.d.ts.map +1 -0
  94. package/dist/personas/persona-loader.js +246 -0
  95. package/dist/personas/persona-loader.js.map +1 -0
  96. package/dist/personas/persona-manager.d.ts +82 -0
  97. package/dist/personas/persona-manager.d.ts.map +1 -0
  98. package/dist/personas/persona-manager.js +211 -0
  99. package/dist/personas/persona-manager.js.map +1 -0
  100. package/dist/personas/skill-loader.d.ts +35 -0
  101. package/dist/personas/skill-loader.d.ts.map +1 -0
  102. package/dist/personas/skill-loader.js +144 -0
  103. package/dist/personas/skill-loader.js.map +1 -0
  104. package/dist/personas/skill-packager.d.ts +25 -0
  105. package/dist/personas/skill-packager.d.ts.map +1 -0
  106. package/dist/personas/skill-packager.js +233 -0
  107. package/dist/personas/skill-packager.js.map +1 -0
  108. package/dist/personas/types.d.ts +134 -0
  109. package/dist/personas/types.d.ts.map +1 -0
  110. package/dist/personas/types.js +7 -0
  111. package/dist/personas/types.js.map +1 -0
  112. package/dist/personas/validator.d.ts +22 -0
  113. package/dist/personas/validator.d.ts.map +1 -0
  114. package/dist/personas/validator.js +144 -0
  115. package/dist/personas/validator.js.map +1 -0
  116. package/dist/storage/factory.d.ts +51 -0
  117. package/dist/storage/factory.d.ts.map +1 -0
  118. package/dist/storage/factory.js +154 -0
  119. package/dist/storage/factory.js.map +1 -0
  120. package/dist/storage/gcp-bucket-provider.d.ts +59 -0
  121. package/dist/storage/gcp-bucket-provider.d.ts.map +1 -0
  122. package/dist/storage/gcp-bucket-provider.js +275 -0
  123. package/dist/storage/gcp-bucket-provider.js.map +1 -0
  124. package/dist/storage/index.d.ts +33 -0
  125. package/dist/storage/index.d.ts.map +1 -0
  126. package/dist/storage/index.js +37 -0
  127. package/dist/storage/index.js.map +1 -0
  128. package/dist/storage/local-provider.d.ts +36 -0
  129. package/dist/storage/local-provider.d.ts.map +1 -0
  130. package/dist/storage/local-provider.js +219 -0
  131. package/dist/storage/local-provider.js.map +1 -0
  132. package/dist/storage/provider.d.ts +137 -0
  133. package/dist/storage/provider.d.ts.map +1 -0
  134. package/dist/storage/provider.js +136 -0
  135. package/dist/storage/provider.js.map +1 -0
  136. package/dist/storage/types.d.ts +78 -0
  137. package/dist/storage/types.d.ts.map +1 -0
  138. package/dist/storage/types.js +14 -0
  139. package/dist/storage/types.js.map +1 -0
  140. package/dist/utils/orchestration-logger.d.ts +36 -0
  141. package/dist/utils/orchestration-logger.d.ts.map +1 -0
  142. package/dist/utils/orchestration-logger.js +224 -0
  143. package/dist/utils/orchestration-logger.js.map +1 -0
  144. package/jiva-new-demo.gif +0 -0
  145. package/package.json +30 -2
  146. package/.fluen/cache/state.json +0 -7
  147. package/actions/action_registry.py +0 -75
  148. package/actions/python_coder.py +0 -470
  149. package/api/main.py +0 -269
  150. package/downloaded_image.avif +0 -0
  151. package/downloads/snipping_tool.avif +0 -0
  152. package/image.avif +0 -0
  153. package/ms_image.avif +0 -0
  154. package/screenshot.png +0 -0
  155. package/snipping_tool.avif +0 -0
  156. package/tmp_image.avif +0 -0
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Client Agent - Adaptive validation and quality control
3
+ *
4
+ * Acts as user advocate, validating that Manager/Worker actually deliver
5
+ * what the user requested. Uses tiered involvement levels to minimize cost:
6
+ *
7
+ * - MINIMAL: Info requests, simple queries → metadata validation only
8
+ * BUT: Detects unjustified failures and escalates to STANDARD
9
+ * - STANDARD: Creation requests → file existence + basic validation
10
+ * - THOROUGH: Complex/testing requests OR failures → full E2E validation with tools
11
+ */
12
+ import { ModelOrchestrator } from '../models/orchestrator.js';
13
+ import { MCPServerManager } from '../mcp/server-manager.js';
14
+ import { WorkerResult } from './worker-agent.js';
15
+ export declare enum InvolvementLevel {
16
+ MINIMAL = "minimal",// Metadata only, no tools
17
+ STANDARD = "standard",// Basic validation with read tools
18
+ THOROUGH = "thorough"
19
+ }
20
+ export interface Requirement {
21
+ type: 'file_creation' | 'file_modification' | 'testing' | 'verification' | 'information' | 'other';
22
+ description: string;
23
+ filePath?: string;
24
+ mustUseTools?: string[];
25
+ }
26
+ export interface ValidationResult {
27
+ approved: boolean;
28
+ requirementsMet: boolean;
29
+ issues: string[];
30
+ nextAction?: string;
31
+ involvementLevel: InvolvementLevel;
32
+ }
33
+ export declare class ClientAgent {
34
+ private orchestrator;
35
+ private mcpManager;
36
+ private mcpClient;
37
+ private failureCount;
38
+ private readonly ALLOWED_TOOLS;
39
+ constructor(orchestrator: ModelOrchestrator, mcpManager: MCPServerManager);
40
+ /**
41
+ * Determine involvement level based on user request complexity
42
+ */
43
+ determineInvolvementLevel(userMessage: string, subtasks: string[]): InvolvementLevel;
44
+ /**
45
+ * Parse requirements from user message
46
+ */
47
+ parseRequirements(userMessage: string, subtasks: string[]): Requirement[];
48
+ /**
49
+ * Validate Worker's work at appropriate involvement level
50
+ */
51
+ validate(userMessage: string, subtasks: string[], workerResult: WorkerResult, involvementLevel?: InvolvementLevel): Promise<ValidationResult>;
52
+ /**
53
+ * Use LLM to analyze worker result for unjustified failure claims
54
+ * This is language-agnostic and captures semantic meaning
55
+ */
56
+ private analyzeForUnjustifiedFailure;
57
+ /**
58
+ * Layer 1: Process Validation (metadata only, no tools)
59
+ */
60
+ private validateProcess;
61
+ /**
62
+ * Layer 2: Outcome Validation (uses read-only tools)
63
+ */
64
+ private validateOutcome;
65
+ /**
66
+ * Check if file exists using read tool
67
+ */
68
+ private fileExists;
69
+ /**
70
+ * Validate file contents for common issues
71
+ */
72
+ private validateFileContents;
73
+ /**
74
+ * Validate HTML file in browser
75
+ */
76
+ private validateInBrowser;
77
+ /**
78
+ * Reset failure tracking (for new conversation/session)
79
+ */
80
+ resetFailureTracking(): void;
81
+ }
82
+ //# sourceMappingURL=client-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-agent.d.ts","sourceRoot":"","sources":["../../src/core/client-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AASjD,oBAAY,gBAAgB;IAC1B,OAAO,YAAY,CAAM,0BAA0B;IACnD,QAAQ,aAAa,CAAI,mCAAmC;IAC5D,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,GAAG,mBAAmB,GAAG,SAAS,GAAG,cAAc,GAAG,aAAa,GAAG,OAAO,CAAC;IACnG,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,YAAY,CAAa;IAGjC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAS5B;gBAEU,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,gBAAgB;IAMzE;;OAEG;IACH,yBAAyB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,gBAAgB;IAuCpF;;OAEG;IACH,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE;IAgEzE;;OAEG;IACG,QAAQ,CACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,YAAY,EAC1B,gBAAgB,CAAC,EAAE,gBAAgB,GAClC,OAAO,CAAC,gBAAgB,CAAC;IA+D5B;;;OAGG;YACW,4BAA4B;IA8D1C;;OAEG;IACH,OAAO,CAAC,eAAe;IAiCvB;;OAEG;YACW,eAAe;IAgD7B;;OAEG;YACW,UAAU;IAYxB;;OAEG;YACW,oBAAoB;IAqClC;;OAEG;YACW,iBAAiB;IA+B/B;;OAEG;IACH,oBAAoB,IAAI,IAAI;CAG7B"}
@@ -0,0 +1,406 @@
1
+ /**
2
+ * Client Agent - Adaptive validation and quality control
3
+ *
4
+ * Acts as user advocate, validating that Manager/Worker actually deliver
5
+ * what the user requested. Uses tiered involvement levels to minimize cost:
6
+ *
7
+ * - MINIMAL: Info requests, simple queries → metadata validation only
8
+ * BUT: Detects unjustified failures and escalates to STANDARD
9
+ * - STANDARD: Creation requests → file existence + basic validation
10
+ * - THOROUGH: Complex/testing requests OR failures → full E2E validation with tools
11
+ */
12
+ import { logger } from '../utils/logger.js';
13
+ export var InvolvementLevel;
14
+ (function (InvolvementLevel) {
15
+ InvolvementLevel["MINIMAL"] = "minimal";
16
+ InvolvementLevel["STANDARD"] = "standard";
17
+ InvolvementLevel["THOROUGH"] = "thorough";
18
+ })(InvolvementLevel || (InvolvementLevel = {}));
19
+ export class ClientAgent {
20
+ orchestrator;
21
+ mcpManager;
22
+ mcpClient;
23
+ failureCount = 0;
24
+ // Read-only tools Client can use for validation
25
+ ALLOWED_TOOLS = [
26
+ 'filesystem__read_text_file',
27
+ 'filesystem__list_directory',
28
+ 'filesystem__directory_tree',
29
+ 'filesystem__search_files',
30
+ 'playwright__browser_navigate',
31
+ 'playwright__browser_console_messages',
32
+ 'playwright__browser_take_screenshot',
33
+ 'playwright__browser_evaluate',
34
+ ];
35
+ constructor(orchestrator, mcpManager) {
36
+ this.orchestrator = orchestrator;
37
+ this.mcpManager = mcpManager;
38
+ this.mcpClient = mcpManager.getClient();
39
+ }
40
+ /**
41
+ * Determine involvement level based on user request complexity
42
+ */
43
+ determineInvolvementLevel(userMessage, subtasks) {
44
+ const messageLower = userMessage.toLowerCase();
45
+ const subtasksLower = subtasks.join(' ').toLowerCase();
46
+ // THOROUGH: User explicitly requests testing/verification
47
+ const testKeywords = ['test', 'verify', 'check', 'make sure', 'ensure', 'validate'];
48
+ if (testKeywords.some(kw => messageLower.includes(kw))) {
49
+ logger.debug('[Client] THOROUGH mode: Testing/verification requested');
50
+ return InvolvementLevel.THOROUGH;
51
+ }
52
+ // THOROUGH: After failures (user frustrated)
53
+ if (this.failureCount > 0) {
54
+ logger.debug(`[Client] THOROUGH mode: ${this.failureCount} previous failures detected`);
55
+ return InvolvementLevel.THOROUGH;
56
+ }
57
+ // THOROUGH: Complex multi-file operations
58
+ if (subtasks.length > 3 || (messageLower.includes('component') && messageLower.includes('index.html'))) {
59
+ logger.debug('[Client] THOROUGH mode: Complex multi-file operation');
60
+ return InvolvementLevel.THOROUGH;
61
+ }
62
+ // MINIMAL: Information-only requests
63
+ const infoKeywords = ['what', 'list', 'show', 'explain', 'describe', 'how', 'tell me'];
64
+ const creationKeywords = ['create', 'build', 'write', 'generate', 'make', 'add'];
65
+ const hasInfoKeyword = infoKeywords.some(kw => messageLower.includes(kw));
66
+ const hasCreationKeyword = creationKeywords.some(kw => messageLower.includes(kw));
67
+ if (hasInfoKeyword && !hasCreationKeyword) {
68
+ logger.debug('[Client] MINIMAL mode: Information request');
69
+ return InvolvementLevel.MINIMAL;
70
+ }
71
+ // STANDARD: Default for creation/modification tasks
72
+ logger.debug('[Client] STANDARD mode: Regular creation task');
73
+ return InvolvementLevel.STANDARD;
74
+ }
75
+ /**
76
+ * Parse requirements from user message
77
+ */
78
+ parseRequirements(userMessage, subtasks) {
79
+ const requirements = [];
80
+ const messageLower = userMessage.toLowerCase();
81
+ const combined = (messageLower + ' ' + subtasks.join(' ').toLowerCase());
82
+ // Detect file creation requirements
83
+ const fileMatches = userMessage.match(/(?:create|build|generate|write|save as)\s+([a-zA-Z0-9._/-]+\.(html|js|css|md|json|txt|py|ts|tsx|jsx))/gi);
84
+ if (fileMatches) {
85
+ fileMatches.forEach(match => {
86
+ const filename = match.split(/\s+/).pop();
87
+ if (filename) {
88
+ requirements.push({
89
+ type: 'file_creation',
90
+ description: `Create file: ${filename}`,
91
+ filePath: filename,
92
+ });
93
+ }
94
+ });
95
+ }
96
+ // Detect testing requirements (explicit verification requests)
97
+ const testKeywords = ['test', 'verify', 'check', 'make sure', 'ensure'];
98
+ if (testKeywords.some(kw => combined.includes(kw))) {
99
+ requirements.push({
100
+ type: 'testing',
101
+ description: 'Verify functionality through testing',
102
+ mustUseTools: ['playwright__'],
103
+ });
104
+ }
105
+ // Detect browser verification requirements - ONLY for file verification, not general browsing
106
+ // This should trigger for "open index.html in browser" but NOT for "open linkedin.com"
107
+ const isLocalFileOpen = (combined.includes('open') && combined.includes('.html')) ||
108
+ (combined.includes('browser') && combined.includes('.html'));
109
+ const isExternalUrl = combined.match(/open\s+(?:https?:\/\/)?(?:www\.)?[a-z0-9-]+\.[a-z]{2,}/i);
110
+ if (isLocalFileOpen && !isExternalUrl) {
111
+ requirements.push({
112
+ type: 'verification',
113
+ description: 'Browser testing required for local HTML file',
114
+ mustUseTools: ['playwright__browser_navigate', 'playwright__browser_console_messages'],
115
+ });
116
+ }
117
+ // For external URLs, don't require specific tools - just opening the page is enough
118
+ if (isExternalUrl) {
119
+ requirements.push({
120
+ type: 'verification',
121
+ description: 'Open external URL',
122
+ // No mustUseTools - Worker just needs to navigate, Client shouldn't demand specific validation tools
123
+ });
124
+ }
125
+ // Default: at least verify Worker did some work
126
+ if (requirements.length === 0) {
127
+ requirements.push({
128
+ type: 'other',
129
+ description: 'General task completion',
130
+ });
131
+ }
132
+ return requirements;
133
+ }
134
+ /**
135
+ * Validate Worker's work at appropriate involvement level
136
+ */
137
+ async validate(userMessage, subtasks, workerResult, involvementLevel) {
138
+ let level = involvementLevel || this.determineInvolvementLevel(userMessage, subtasks);
139
+ const requirements = this.parseRequirements(userMessage, subtasks);
140
+ // CRITICAL: Use LLM to check for unjustified failure claims BEFORE other validation
141
+ // Even in MINIMAL mode, we must catch agents giving up without trying
142
+ const failureAnalysis = await this.analyzeForUnjustifiedFailure(userMessage, workerResult);
143
+ if (failureAnalysis.claimsFailure && !failureAnalysis.hasEvidence) {
144
+ logger.info(`[Client] Detected unjustified failure claim - escalating from ${level} to STANDARD`);
145
+ logger.info(`[Client] LLM reasoning: ${failureAnalysis.reasoning}`);
146
+ logger.info(`[Client] Tools attempted: ${workerResult.toolsUsed.length}`);
147
+ // Escalate to at least STANDARD to properly validate
148
+ if (level === InvolvementLevel.MINIMAL) {
149
+ level = InvolvementLevel.STANDARD;
150
+ }
151
+ }
152
+ logger.info(`[Client] Validating with ${level.toUpperCase()} involvement`);
153
+ const result = {
154
+ approved: false,
155
+ requirementsMet: false,
156
+ issues: [],
157
+ involvementLevel: level,
158
+ };
159
+ // Layer 0: Unjustified Failure Detection (always done first)
160
+ if (failureAnalysis.claimsFailure && !failureAnalysis.hasEvidence) {
161
+ const failureIssue = failureAnalysis.suggestedAction ||
162
+ `REJECTED: Worker claims failure without sufficient evidence. ${failureAnalysis.reasoning}`;
163
+ result.issues.push(failureIssue);
164
+ }
165
+ // Layer 1: Process Validation (always done, no tools needed)
166
+ const processValidation = this.validateProcess(requirements, workerResult);
167
+ if (processValidation.issues.length > 0) {
168
+ result.issues.push(...processValidation.issues);
169
+ }
170
+ // Layer 2: Outcome Validation (only for STANDARD and THOROUGH)
171
+ if (level === InvolvementLevel.STANDARD || level === InvolvementLevel.THOROUGH) {
172
+ const outcomeValidation = await this.validateOutcome(requirements, workerResult, level);
173
+ if (outcomeValidation.issues.length > 0) {
174
+ result.issues.push(...outcomeValidation.issues);
175
+ }
176
+ }
177
+ // Determine approval
178
+ result.requirementsMet = result.issues.length === 0;
179
+ result.approved = result.requirementsMet;
180
+ if (!result.approved && result.issues.length > 0) {
181
+ result.nextAction = result.issues[0]; // Most critical issue becomes next action
182
+ this.failureCount++;
183
+ }
184
+ else {
185
+ this.failureCount = 0; // Reset on success
186
+ }
187
+ return result;
188
+ }
189
+ /**
190
+ * Use LLM to analyze worker result for unjustified failure claims
191
+ * This is language-agnostic and captures semantic meaning
192
+ */
193
+ async analyzeForUnjustifiedFailure(userMessage, workerResult) {
194
+ const toolCount = workerResult.toolsUsed.length;
195
+ const toolList = workerResult.toolsUsed.join(', ') || 'none';
196
+ const analysisPrompt = `You are a quality control agent. Analyze the following Worker response to determine if it's claiming failure and whether that failure is justified.
197
+
198
+ USER REQUEST: ${userMessage}
199
+
200
+ WORKER RESPONSE:
201
+ ${workerResult.result}
202
+
203
+ WORKER REASONING: ${workerResult.reasoning}
204
+
205
+ TOOLS USED: ${toolList} (${toolCount} total)
206
+ WORKER SUCCESS FLAG: ${workerResult.success}
207
+
208
+ Analyze and respond in this EXACT JSON format:
209
+ {
210
+ "claimsFailure": <true if the response indicates the task cannot/could not be done, or refuses to do it>,
211
+ "hasEvidence": <true if there is concrete evidence justifying the failure (actual error messages, specific technical blockers, permission issues, etc.)>,
212
+ "reasoning": "<brief explanation of your analysis>",
213
+ "suggestedAction": "<if claimsFailure is true and hasEvidence is false, provide a specific instruction for the Worker to actually attempt the task>"
214
+ }
215
+
216
+ IMPORTANT CRITERIA:
217
+ - If the Worker used 0 tools and claims failure, hasEvidence should be false (they didn't even try)
218
+ - If the Worker claims something is "impossible" or "cannot be done" without showing actual error messages, hasEvidence should be false
219
+ - Legitimate evidence includes: actual error output, specific file/permission errors, concrete technical limitations
220
+ - Vague reasons like "I don't have the ability" or "this is outside my scope" are NOT evidence
221
+
222
+ Respond ONLY with the JSON, no other text.`;
223
+ try {
224
+ const response = await this.orchestrator.chat({
225
+ messages: [
226
+ { role: 'system', content: 'You are a strict quality control validator. Respond only with valid JSON.' },
227
+ { role: 'user', content: analysisPrompt },
228
+ ],
229
+ temperature: 0.1, // Low temperature for consistent analysis
230
+ });
231
+ // Parse the JSON response
232
+ const jsonMatch = response.content.match(/\{[\s\S]*\}/);
233
+ if (jsonMatch) {
234
+ const analysis = JSON.parse(jsonMatch[0]);
235
+ return analysis;
236
+ }
237
+ }
238
+ catch (error) {
239
+ logger.debug(`[Client] Failed to analyze failure claim: ${error}`);
240
+ }
241
+ // Default: assume no failure claim if analysis fails
242
+ return {
243
+ claimsFailure: false,
244
+ hasEvidence: true,
245
+ reasoning: 'Analysis could not be performed',
246
+ };
247
+ }
248
+ /**
249
+ * Layer 1: Process Validation (metadata only, no tools)
250
+ */
251
+ validateProcess(requirements, workerResult) {
252
+ const issues = [];
253
+ // Check if Worker used appropriate tools for requirements
254
+ for (const req of requirements) {
255
+ if (req.mustUseTools && req.mustUseTools.length > 0) {
256
+ const usedRequiredTool = req.mustUseTools.some(requiredTool => {
257
+ // Match if required tool is contained in actual tool name (e.g., 'playwright__browser' matches 'playwright__browser_navigate')
258
+ // OR if actual tool exactly matches the required tool
259
+ return workerResult.toolsUsed.some(actualTool => actualTool === requiredTool || actualTool.startsWith(requiredTool) || requiredTool.startsWith(actualTool.split('__')[0] + '__'));
260
+ });
261
+ if (!usedRequiredTool) {
262
+ issues.push(`${req.description} requires using ${req.mustUseTools.join(' or ')} but Worker did not use these tools. ` +
263
+ `Create a subtask specifically for ${req.description.toLowerCase()}.`);
264
+ }
265
+ }
266
+ }
267
+ // Check if Worker succeeded
268
+ if (!workerResult.success) {
269
+ issues.push(`Worker did not complete the task successfully. This suggests the task needs to be broken down differently or requires clarification.`);
270
+ }
271
+ return { issues };
272
+ }
273
+ /**
274
+ * Layer 2: Outcome Validation (uses read-only tools)
275
+ */
276
+ async validateOutcome(requirements, workerResult, level) {
277
+ const issues = [];
278
+ // File existence validation
279
+ for (const req of requirements) {
280
+ if (req.type === 'file_creation' && req.filePath) {
281
+ try {
282
+ const exists = await this.fileExists(req.filePath);
283
+ if (!exists) {
284
+ issues.push(`Required file not created: ${req.filePath}`);
285
+ }
286
+ else if (level === InvolvementLevel.THOROUGH) {
287
+ // For THOROUGH, also validate file contents
288
+ const validation = await this.validateFileContents(req.filePath);
289
+ if (!validation.valid) {
290
+ issues.push(`File ${req.filePath} created but has issues: ${validation.issue}`);
291
+ }
292
+ }
293
+ }
294
+ catch (error) {
295
+ logger.debug(`[Client] Error validating file ${req.filePath}: ${error}`);
296
+ }
297
+ }
298
+ }
299
+ // Browser testing validation (only for THOROUGH)
300
+ if (level === InvolvementLevel.THOROUGH) {
301
+ for (const req of requirements) {
302
+ if ((req.type === 'testing' || req.type === 'verification') &&
303
+ workerResult.result.includes('.html')) {
304
+ // Extract HTML filename from result
305
+ const htmlMatch = workerResult.result.match(/([a-zA-Z0-9._-]+\.html)/);
306
+ if (htmlMatch) {
307
+ const htmlFile = htmlMatch[1];
308
+ const browserValidation = await this.validateInBrowser(htmlFile);
309
+ if (!browserValidation.valid) {
310
+ issues.push(browserValidation.issue);
311
+ }
312
+ }
313
+ }
314
+ }
315
+ }
316
+ return { issues };
317
+ }
318
+ /**
319
+ * Check if file exists using read tool
320
+ */
321
+ async fileExists(filePath) {
322
+ try {
323
+ await this.mcpClient.executeTool('filesystem__read_text_file', {
324
+ path: filePath,
325
+ head: 1,
326
+ });
327
+ return true;
328
+ }
329
+ catch (error) {
330
+ return false;
331
+ }
332
+ }
333
+ /**
334
+ * Validate file contents for common issues
335
+ */
336
+ async validateFileContents(filePath) {
337
+ try {
338
+ const content = await this.mcpClient.executeTool('filesystem__read_text_file', {
339
+ path: filePath,
340
+ head: 200,
341
+ });
342
+ const contentStr = typeof content === 'string' ? content : JSON.stringify(content);
343
+ // Check for HTML path mismatches
344
+ if (filePath.endsWith('.html')) {
345
+ const hrefMatches = contentStr.match(/href="([^"]+)"/g) || [];
346
+ const srcMatches = contentStr.match(/src="([^"]+)"/g) || [];
347
+ for (const match of [...hrefMatches, ...srcMatches]) {
348
+ const pathMatch = match.match(/(?:href|src)="([^"]+)"/);
349
+ if (pathMatch) {
350
+ const referencedPath = pathMatch[1];
351
+ if (!referencedPath.startsWith('http') && !referencedPath.startsWith('data:')) {
352
+ const exists = await this.fileExists(referencedPath);
353
+ if (!exists) {
354
+ return {
355
+ valid: false,
356
+ issue: `HTML references non-existent file: ${referencedPath}. Fix file paths or create missing files.`
357
+ };
358
+ }
359
+ }
360
+ }
361
+ }
362
+ }
363
+ return { valid: true };
364
+ }
365
+ catch (error) {
366
+ return { valid: false, issue: `Could not read file: ${error}` };
367
+ }
368
+ }
369
+ /**
370
+ * Validate HTML file in browser
371
+ */
372
+ async validateInBrowser(htmlFile) {
373
+ try {
374
+ // Navigate to file
375
+ const workspaceDir = process.cwd();
376
+ const fileUrl = `file://${workspaceDir}/${htmlFile}`;
377
+ await this.mcpClient.executeTool('playwright__browser_navigate', {
378
+ url: fileUrl,
379
+ });
380
+ // Check for console errors
381
+ const errors = await this.mcpClient.executeTool('playwright__browser_console_messages', {
382
+ level: 'error',
383
+ });
384
+ const errorStr = typeof errors === 'string' ? errors : JSON.stringify(errors);
385
+ if (errorStr && errorStr.length > 0 && !errorStr.includes('[]')) {
386
+ return {
387
+ valid: false,
388
+ issue: `Browser errors detected in ${htmlFile}: ${errorStr}. Fix these errors before delivery.`
389
+ };
390
+ }
391
+ return { valid: true };
392
+ }
393
+ catch (error) {
394
+ logger.debug(`[Client] Browser validation error: ${error}`);
395
+ // Don't fail validation if browser test fails - might not have browser available
396
+ return { valid: true };
397
+ }
398
+ }
399
+ /**
400
+ * Reset failure tracking (for new conversation/session)
401
+ */
402
+ resetFailureTracking() {
403
+ this.failureCount = 0;
404
+ }
405
+ }
406
+ //# sourceMappingURL=client-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-agent.js","sourceRoot":"","sources":["../../src/core/client-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAW5C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAiBD,MAAM,OAAO,WAAW;IACd,YAAY,CAAoB;IAChC,UAAU,CAAmB;IAC7B,SAAS,CAAY;IACrB,YAAY,GAAW,CAAC,CAAC;IAEjC,gDAAgD;IAC/B,aAAa,GAAG;QAC/B,4BAA4B;QAC5B,4BAA4B;QAC5B,4BAA4B;QAC5B,0BAA0B;QAC1B,8BAA8B;QAC9B,sCAAsC;QACtC,qCAAqC;QACrC,8BAA8B;KAC/B,CAAC;IAEF,YAAY,YAA+B,EAAE,UAA4B;QACvE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,yBAAyB,CAAC,WAAmB,EAAE,QAAkB;QAC/D,MAAM,YAAY,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;QAC/C,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAEvD,0DAA0D;QAC1D,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO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AAI,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAChE,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,8BAA8B,QAAQ,KAAK,QAAQ,qCAAqC;iBAChG,CAAC;YACJ,CAAC;YAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,sCAAsC,KAAK,EAAE,CAAC,CAAC;YAC5D,iFAAiF;YACjF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,oBAAoB;QAClB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;IACxB,CAAC;CACF"}
@@ -1,16 +1,36 @@
1
1
  import { z } from 'zod';
2
- declare const MCPServerConfigSchema: z.ZodObject<{
3
- command: z.ZodString;
2
+ declare const MCPServerConfigSchema: z.ZodEffects<z.ZodObject<{
3
+ command: z.ZodOptional<z.ZodString>;
4
4
  args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5
5
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6
+ url: z.ZodOptional<z.ZodString>;
7
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6
8
  enabled: z.ZodDefault<z.ZodBoolean>;
7
9
  }, "strip", z.ZodTypeAny, {
8
- command: string;
9
10
  enabled: boolean;
11
+ url?: string | undefined;
12
+ headers?: Record<string, string> | undefined;
13
+ command?: string | undefined;
10
14
  args?: string[] | undefined;
11
15
  env?: Record<string, string> | undefined;
12
16
  }, {
13
- command: string;
17
+ url?: string | undefined;
18
+ headers?: Record<string, string> | undefined;
19
+ command?: string | undefined;
20
+ args?: string[] | undefined;
21
+ env?: Record<string, string> | undefined;
22
+ enabled?: boolean | undefined;
23
+ }>, {
24
+ enabled: boolean;
25
+ url?: string | undefined;
26
+ headers?: Record<string, string> | undefined;
27
+ command?: string | undefined;
28
+ args?: string[] | undefined;
29
+ env?: Record<string, string> | undefined;
30
+ }, {
31
+ url?: string | undefined;
32
+ headers?: Record<string, string> | undefined;
33
+ command?: string | undefined;
14
34
  args?: string[] | undefined;
15
35
  env?: Record<string, string> | undefined;
16
36
  enabled?: boolean | undefined;
@@ -118,18 +138,38 @@ declare const JivaConfigSchema: z.ZodObject<{
118
138
  useHarmonyFormat?: boolean | undefined;
119
139
  } | undefined;
120
140
  }>;
121
- mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
122
- command: z.ZodString;
141
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
142
+ command: z.ZodOptional<z.ZodString>;
123
143
  args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
124
144
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
145
+ url: z.ZodOptional<z.ZodString>;
146
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
125
147
  enabled: z.ZodDefault<z.ZodBoolean>;
126
148
  }, "strip", z.ZodTypeAny, {
127
- command: string;
128
149
  enabled: boolean;
150
+ url?: string | undefined;
151
+ headers?: Record<string, string> | undefined;
152
+ command?: string | undefined;
153
+ args?: string[] | undefined;
154
+ env?: Record<string, string> | undefined;
155
+ }, {
156
+ url?: string | undefined;
157
+ headers?: Record<string, string> | undefined;
158
+ command?: string | undefined;
159
+ args?: string[] | undefined;
160
+ env?: Record<string, string> | undefined;
161
+ enabled?: boolean | undefined;
162
+ }>, {
163
+ enabled: boolean;
164
+ url?: string | undefined;
165
+ headers?: Record<string, string> | undefined;
166
+ command?: string | undefined;
129
167
  args?: string[] | undefined;
130
168
  env?: Record<string, string> | undefined;
131
169
  }, {
132
- command: string;
170
+ url?: string | undefined;
171
+ headers?: Record<string, string> | undefined;
172
+ command?: string | undefined;
133
173
  args?: string[] | undefined;
134
174
  env?: Record<string, string> | undefined;
135
175
  enabled?: boolean | undefined;
@@ -141,6 +181,7 @@ declare const JivaConfigSchema: z.ZodObject<{
141
181
  }, {
142
182
  defaultDirectivePath?: string | undefined;
143
183
  }>>;
184
+ activePersona: z.ZodOptional<z.ZodString>;
144
185
  debug: z.ZodDefault<z.ZodBoolean>;
145
186
  }, "strip", z.ZodTypeAny, {
146
187
  models: {
@@ -163,14 +204,17 @@ declare const JivaConfigSchema: z.ZodObject<{
163
204
  };
164
205
  debug: boolean;
165
206
  mcpServers?: Record<string, {
166
- command: string;
167
207
  enabled: boolean;
208
+ url?: string | undefined;
209
+ headers?: Record<string, string> | undefined;
210
+ command?: string | undefined;
168
211
  args?: string[] | undefined;
169
212
  env?: Record<string, string> | undefined;
170
213
  }> | undefined;
171
214
  workspace?: {
172
215
  defaultDirectivePath?: string | undefined;
173
216
  } | undefined;
217
+ activePersona?: string | undefined;
174
218
  }, {
175
219
  models: {
176
220
  reasoning?: {
@@ -191,7 +235,9 @@ declare const JivaConfigSchema: z.ZodObject<{
191
235
  } | undefined;
192
236
  };
193
237
  mcpServers?: Record<string, {
194
- command: string;
238
+ url?: string | undefined;
239
+ headers?: Record<string, string> | undefined;
240
+ command?: string | undefined;
195
241
  args?: string[] | undefined;
196
242
  env?: Record<string, string> | undefined;
197
243
  enabled?: boolean | undefined;
@@ -199,6 +245,7 @@ declare const JivaConfigSchema: z.ZodObject<{
199
245
  workspace?: {
200
246
  defaultDirectivePath?: string | undefined;
201
247
  } | undefined;
248
+ activePersona?: string | undefined;
202
249
  debug?: boolean | undefined;
203
250
  }>;
204
251
  export type MCPServerConfig = z.infer<typeof MCPServerConfigSchema>;
@@ -223,6 +270,8 @@ export declare class ConfigManager {
223
270
  isDebug(): boolean;
224
271
  setDefaultDirectivePath(path: string): void;
225
272
  getDefaultDirectivePath(): string | undefined;
273
+ setActivePersona(name: string | null): void;
274
+ getActivePersona(): string | undefined;
226
275
  reset(): void;
227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