@llm-dev-ops/agentics-cli 1.4.90 → 1.4.94
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/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +1 -159
- package/dist/commands/agents.js.map +1 -1
- package/dist/config/endpoints.js +1 -1
- package/dist/config/endpoints.js.map +1 -1
- package/dist/pipeline/phase2/phase2-coordinator.js +4 -4
- package/dist/pipeline/phase2/phase2-coordinator.js.map +1 -1
- package/dist/pipeline/phase2/phases/sparc-specification.js +4 -4
- package/dist/pipeline/phase2/phases/sparc-specification.js.map +1 -1
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.d.ts.map +1 -1
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js +1 -2
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.js +1 -1
- package/dist/pipeline/ruflo-phase-executor.js.map +1 -1
- package/dist/synthesis/simulation-artifact-generator.d.ts.map +1 -1
- package/dist/synthesis/simulation-artifact-generator.js +7 -0
- package/dist/synthesis/simulation-artifact-generator.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAUxD,UAAU,WAAW;IACnB,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AG,MAAM,CAY/F;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAwBrF;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAK5E;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAsBlF"}
|
package/dist/commands/agents.js
CHANGED
|
@@ -13,11 +13,6 @@ import { loadEndpointConfig } from '../config/endpoints.js';
|
|
|
13
13
|
import { createAdapter } from '../adapters/base-adapter.js';
|
|
14
14
|
import { getAnthropicApiKey } from '../utils/credentials.js';
|
|
15
15
|
import { executeSimulateCommand } from './simulate.js';
|
|
16
|
-
// Intent classifier module — no longer needed since full-fleet dispatch
|
|
17
|
-
// handles ALL queries unconditionally (no detection gate).
|
|
18
|
-
import { isRepoAgentMode, hasRepoAgent, executeRepoAgent, } from '../agents/repo-agent-runner.js';
|
|
19
|
-
import { executeAgentLocallyAsync } from '../agents/local-agent-runner.js';
|
|
20
|
-
import { hasLocalPrompt } from '../agents/system-prompts.js';
|
|
21
16
|
export const AGENT_DOMAINS = {
|
|
22
17
|
'test-bench': {
|
|
23
18
|
serviceName: 'test-bench-agents',
|
|
@@ -224,160 +219,7 @@ export async function executeAgentsInvokeCommand(domain, agent, payload, options
|
|
|
224
219
|
}
|
|
225
220
|
}
|
|
226
221
|
}
|
|
227
|
-
//
|
|
228
|
-
// and run the handler in-process. Uses Claude Code (Claude Max) for AI — no API key.
|
|
229
|
-
if (isRepoAgentMode() && hasRepoAgent(domain)) {
|
|
230
|
-
if (options.verbose) {
|
|
231
|
-
console.error(`[repo-local] Executing ${domain}/${agent} using repo code + Claude Code`);
|
|
232
|
-
}
|
|
233
|
-
const repoResult = await executeRepoAgent(domain, agent, normalizedPayload, correlationId);
|
|
234
|
-
// If repo execution succeeded (or returned a meaningful non-provisioning error), use it.
|
|
235
|
-
// If 502 (source unavailable / provisioning failure), fall through to the Cloud Function
|
|
236
|
-
// adapter path so the agent can still be reached via its deployed endpoint.
|
|
237
|
-
if (repoResult.status !== 502) {
|
|
238
|
-
// Check for known errors embedded in a 200 response body and apply local fallbacks
|
|
239
|
-
const repoBody = repoResult.response;
|
|
240
|
-
const repoData = repoBody?.['data'];
|
|
241
|
-
const repoError = repoData?.['error'];
|
|
242
|
-
const repoErrorCode = typeof repoError === 'object' ? repoError?.['code'] : undefined;
|
|
243
|
-
const repoErrorStr = typeof repoError === 'string' ? repoError : '';
|
|
244
|
-
const repoMessage = repoData?.['message'] ?? '';
|
|
245
|
-
// policy-engine/enforce: EXECUTION_INVARIANT_ERROR (no agent-level spans — no PostgreSQL)
|
|
246
|
-
if (domain === 'policy-engine' && agent === 'enforce' && (repoErrorCode === 'EXECUTION_INVARIANT_ERROR' || repoData?.['success'] === false)) {
|
|
247
|
-
if (options.verbose) {
|
|
248
|
-
console.error(`[fallback] policy-engine/enforce repo-local invariant failed — computing enforcement locally`);
|
|
249
|
-
}
|
|
250
|
-
return {
|
|
251
|
-
domain,
|
|
252
|
-
agent,
|
|
253
|
-
status: 200,
|
|
254
|
-
response: computeLocalEnforce(normalizedPayload, correlationId),
|
|
255
|
-
timing: Date.now() - start,
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
// research-lab/metrics: RESEARCH_LAB_BACKEND_URL not configured
|
|
259
|
-
if (domain === 'research-lab' && agent === 'metrics' && (repoMessage.includes('RESEARCH_LAB_BACKEND_URL') || repoErrorStr === 'Service Unavailable')) {
|
|
260
|
-
if (options.verbose) {
|
|
261
|
-
console.error(`[fallback] research-lab/metrics repo-local backend URL missing — computing metrics locally`);
|
|
262
|
-
}
|
|
263
|
-
return {
|
|
264
|
-
domain,
|
|
265
|
-
agent,
|
|
266
|
-
status: 200,
|
|
267
|
-
response: computeLocalMetrics(normalizedPayload, correlationId),
|
|
268
|
-
timing: Date.now() - start,
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
// governance-dashboard/audit: check for routing failure in body
|
|
272
|
-
if (domain === 'governance-dashboard' && agent === 'audit' && (repoErrorCode === 'AGENT_ERROR' || repoData?.['success'] === false)) {
|
|
273
|
-
if (options.verbose) {
|
|
274
|
-
console.error(`[fallback] governance-dashboard/audit repo-local routing failed — computing audit locally`);
|
|
275
|
-
}
|
|
276
|
-
return {
|
|
277
|
-
domain,
|
|
278
|
-
agent,
|
|
279
|
-
status: 200,
|
|
280
|
-
response: computeLocalAudit(normalizedPayload, correlationId),
|
|
281
|
-
timing: Date.now() - start,
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
// connector-hub: repo cache is a library (no handler), returns health or empty data.
|
|
285
|
-
// Detect health-check-like responses and compute ERP results locally.
|
|
286
|
-
if (domain === 'connector-hub') {
|
|
287
|
-
const repoResp = repoResult.response;
|
|
288
|
-
const statusVal = (repoResp?.['status'] ?? repoResp?.['Status'] ?? '');
|
|
289
|
-
const looksLikeHealth = statusVal.toLowerCase() === 'healthy'
|
|
290
|
-
|| repoErrorCode === 'UNKNOWN_AGENT' || repoErrorCode === 'AGENT_ERROR'
|
|
291
|
-
|| repoData?.['success'] === false || repoResult.status >= 400;
|
|
292
|
-
if (looksLikeHealth) {
|
|
293
|
-
if (options.verbose) {
|
|
294
|
-
console.error(`[fallback] connector-hub/${agent} repo-local returned health/error — computing locally`);
|
|
295
|
-
}
|
|
296
|
-
return {
|
|
297
|
-
domain,
|
|
298
|
-
agent,
|
|
299
|
-
status: 200,
|
|
300
|
-
response: computeLocalConnectorHub(agent, normalizedPayload, correlationId),
|
|
301
|
-
timing: Date.now() - start,
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
// orchestrator: workflow agent requires structured input, may fail on NL queries
|
|
306
|
-
if (domain === 'orchestrator' && (repoErrorCode || repoData?.['success'] === false || repoResult.status >= 400)) {
|
|
307
|
-
if (options.verbose) {
|
|
308
|
-
console.error(`[fallback] orchestrator/${agent} repo-local failed — computing locally`);
|
|
309
|
-
}
|
|
310
|
-
return {
|
|
311
|
-
domain,
|
|
312
|
-
agent,
|
|
313
|
-
status: 200,
|
|
314
|
-
response: computeLocalOrchestrator(agent, normalizedPayload, correlationId),
|
|
315
|
-
timing: Date.now() - start,
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
// costops: repo-local may return health-check or error — use dedicated local compute
|
|
319
|
-
if (domain === 'costops' && (repoErrorCode || repoData?.['success'] === false || repoResult.status >= 400)) {
|
|
320
|
-
if (options.verbose) {
|
|
321
|
-
console.error(`[fallback] costops/${agent} repo-local failed — computing locally`);
|
|
322
|
-
}
|
|
323
|
-
return {
|
|
324
|
-
domain,
|
|
325
|
-
agent,
|
|
326
|
-
status: 200,
|
|
327
|
-
response: computeUniversalFallback(domain, agent, normalizedPayload, correlationId),
|
|
328
|
-
timing: Date.now() - start,
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
// If repo agent returned a non-200 status (e.g. 401 auth, 500 handler error)
|
|
332
|
-
// and no specific fallback matched above, compute a local fallback result
|
|
333
|
-
// instead of propagating the error to the pipeline.
|
|
334
|
-
if (repoResult.status !== 200) {
|
|
335
|
-
if (options.verbose) {
|
|
336
|
-
console.error(`[fallback] ${domain}/${agent} repo-local returned ${repoResult.status} — computing locally`);
|
|
337
|
-
}
|
|
338
|
-
return {
|
|
339
|
-
domain,
|
|
340
|
-
agent,
|
|
341
|
-
status: 200,
|
|
342
|
-
response: computeUniversalFallback(domain, agent, normalizedPayload, correlationId),
|
|
343
|
-
timing: Date.now() - start,
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
return repoResult;
|
|
347
|
-
}
|
|
348
|
-
console.error(`[repo-local] ${domain}/${agent} source unavailable, falling back to cloud endpoint`);
|
|
349
|
-
}
|
|
350
|
-
// Domains with known-broken cloud backends: execute locally via system prompt
|
|
351
|
-
// + claude --print if a local prompt is available. This produces real AI-generated
|
|
352
|
-
// output instead of hitting a 502 endpoint and falling back to synthetic data.
|
|
353
|
-
const BROKEN_CLOUD_BACKENDS = new Set(['research-lab']);
|
|
354
|
-
if (BROKEN_CLOUD_BACKENDS.has(domain) && hasLocalPrompt(domain, agent)) {
|
|
355
|
-
try {
|
|
356
|
-
if (options.verbose) {
|
|
357
|
-
console.error(`[local-agent] ${domain}/${agent} using local execution (cloud backend unavailable)`);
|
|
358
|
-
}
|
|
359
|
-
const queryText = typeof normalizedPayload === 'object' && normalizedPayload !== null
|
|
360
|
-
? normalizedPayload['text']
|
|
361
|
-
?? normalizedPayload['query']
|
|
362
|
-
?? JSON.stringify(normalizedPayload)
|
|
363
|
-
: String(normalizedPayload);
|
|
364
|
-
const localResult = await executeAgentLocallyAsync(domain, agent, queryText, correlationId);
|
|
365
|
-
return {
|
|
366
|
-
domain,
|
|
367
|
-
agent,
|
|
368
|
-
status: localResult.status,
|
|
369
|
-
response: localResult.response,
|
|
370
|
-
timing: Date.now() - start,
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
catch (localErr) {
|
|
374
|
-
if (options.verbose) {
|
|
375
|
-
const errMsg = localErr instanceof Error ? localErr.message : String(localErr);
|
|
376
|
-
console.error(`[local-agent] ${domain}/${agent} local execution failed: ${errMsg.slice(0, 120)}`);
|
|
377
|
-
}
|
|
378
|
-
// Fall through to cloud endpoint as last resort
|
|
379
|
-
}
|
|
380
|
-
}
|
|
222
|
+
// Go directly to Cloud Run services — no repo-local fallback chain
|
|
381
223
|
const config = loadEndpointConfig(domainConfig.serviceName);
|
|
382
224
|
const adapter = createAdapter(domainConfig.serviceName, config, correlationId);
|
|
383
225
|
// Attach Anthropic API key for agents that need LLM inference (e.g. copilot)
|