@zhixuan92/multi-model-agent 5.0.1 → 5.0.3
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 +8 -9
- package/dist/cli/index.d.ts +62 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +345 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/info.d.ts +22 -0
- package/dist/cli/info.d.ts.map +1 -0
- package/dist/cli/info.js +100 -0
- package/dist/cli/info.js.map +1 -0
- package/dist/cli/logs.d.ts +15 -0
- package/dist/cli/logs.d.ts.map +1 -0
- package/dist/cli/logs.js +102 -0
- package/dist/cli/logs.js.map +1 -0
- package/dist/cli/print-token.d.ts +18 -0
- package/dist/cli/print-token.d.ts.map +1 -0
- package/dist/cli/print-token.js +60 -0
- package/dist/cli/print-token.js.map +1 -0
- package/dist/cli/serve.d.ts +28 -0
- package/dist/cli/serve.d.ts.map +1 -0
- package/dist/cli/serve.js +405 -0
- package/dist/cli/serve.js.map +1 -0
- package/dist/cli/status.d.ts +49 -0
- package/dist/cli/status.d.ts.map +1 -0
- package/dist/cli/status.js +155 -0
- package/dist/cli/status.js.map +1 -0
- package/dist/cli/sync-skills.d.ts +58 -0
- package/dist/cli/sync-skills.d.ts.map +1 -0
- package/dist/cli/sync-skills.js +266 -0
- package/dist/cli/sync-skills.js.map +1 -0
- package/dist/cli/telemetry.d.ts +10 -0
- package/dist/cli/telemetry.d.ts.map +1 -0
- package/dist/cli/telemetry.js +161 -0
- package/dist/cli/telemetry.js.map +1 -0
- package/dist/cli/toggle.d.ts +26 -0
- package/dist/cli/toggle.d.ts.map +1 -0
- package/dist/cli/toggle.js +185 -0
- package/dist/cli/toggle.js.map +1 -0
- package/dist/http/async-dispatch.d.ts +44 -0
- package/dist/http/async-dispatch.d.ts.map +1 -0
- package/dist/http/async-dispatch.js +175 -0
- package/dist/http/async-dispatch.js.map +1 -0
- package/dist/http/auth.d.ts +20 -0
- package/dist/http/auth.d.ts.map +1 -0
- package/dist/http/auth.js +56 -0
- package/dist/http/auth.js.map +1 -0
- package/dist/http/canonicalize-file-paths.d.ts +8 -0
- package/dist/http/canonicalize-file-paths.d.ts.map +1 -0
- package/dist/http/canonicalize-file-paths.js +43 -0
- package/dist/http/canonicalize-file-paths.js.map +1 -0
- package/dist/http/cwd-validator.d.ts +11 -0
- package/dist/http/cwd-validator.d.ts.map +1 -0
- package/dist/http/cwd-validator.js +130 -0
- package/dist/http/cwd-validator.js.map +1 -0
- package/dist/http/errors.d.ts +4 -0
- package/dist/http/errors.d.ts.map +1 -0
- package/dist/http/errors.js +9 -0
- package/dist/http/errors.js.map +1 -0
- package/dist/http/execution-context.d.ts +18 -0
- package/dist/http/execution-context.d.ts.map +1 -0
- package/dist/http/execution-context.js +61 -0
- package/dist/http/execution-context.js.map +1 -0
- package/dist/http/handler-deps.d.ts +19 -0
- package/dist/http/handler-deps.d.ts.map +1 -0
- package/dist/http/handler-deps.js +2 -0
- package/dist/http/handler-deps.js.map +1 -0
- package/dist/http/handlers/control/batch-slice.d.ts +4 -0
- package/dist/http/handlers/control/batch-slice.d.ts.map +1 -0
- package/dist/http/handlers/control/batch-slice.js +40 -0
- package/dist/http/handlers/control/batch-slice.js.map +1 -0
- package/dist/http/handlers/control/batch.d.ts +23 -0
- package/dist/http/handlers/control/batch.d.ts.map +1 -0
- package/dist/http/handlers/control/batch.js +332 -0
- package/dist/http/handlers/control/batch.js.map +1 -0
- package/dist/http/handlers/control/context-blocks.d.ts +22 -0
- package/dist/http/handlers/control/context-blocks.d.ts.map +1 -0
- package/dist/http/handlers/control/context-blocks.js +111 -0
- package/dist/http/handlers/control/context-blocks.js.map +1 -0
- package/dist/http/handlers/introspection/health.d.ts +20 -0
- package/dist/http/handlers/introspection/health.d.ts.map +1 -0
- package/dist/http/handlers/introspection/health.js +18 -0
- package/dist/http/handlers/introspection/health.js.map +1 -0
- package/dist/http/handlers/introspection/status.d.ts +26 -0
- package/dist/http/handlers/introspection/status.d.ts.map +1 -0
- package/dist/http/handlers/introspection/status.js +136 -0
- package/dist/http/handlers/introspection/status.js.map +1 -0
- package/dist/http/handlers/tools/audit.d.ts +4 -0
- package/dist/http/handlers/tools/audit.d.ts.map +1 -0
- package/dist/http/handlers/tools/audit.js +43 -0
- package/dist/http/handlers/tools/audit.js.map +1 -0
- package/dist/http/handlers/tools/debug.d.ts +4 -0
- package/dist/http/handlers/tools/debug.d.ts.map +1 -0
- package/dist/http/handlers/tools/debug.js +43 -0
- package/dist/http/handlers/tools/debug.js.map +1 -0
- package/dist/http/handlers/tools/delegate.d.ts +4 -0
- package/dist/http/handlers/tools/delegate.d.ts.map +1 -0
- package/dist/http/handlers/tools/delegate.js +43 -0
- package/dist/http/handlers/tools/delegate.js.map +1 -0
- package/dist/http/handlers/tools/execute-plan.d.ts +4 -0
- package/dist/http/handlers/tools/execute-plan.d.ts.map +1 -0
- package/dist/http/handlers/tools/execute-plan.js +45 -0
- package/dist/http/handlers/tools/execute-plan.js.map +1 -0
- package/dist/http/handlers/tools/investigate.d.ts +4 -0
- package/dist/http/handlers/tools/investigate.d.ts.map +1 -0
- package/dist/http/handlers/tools/investigate.js +64 -0
- package/dist/http/handlers/tools/investigate.js.map +1 -0
- package/dist/http/handlers/tools/journal-recall.d.ts +4 -0
- package/dist/http/handlers/tools/journal-recall.d.ts.map +1 -0
- package/dist/http/handlers/tools/journal-recall.js +40 -0
- package/dist/http/handlers/tools/journal-recall.js.map +1 -0
- package/dist/http/handlers/tools/journal-record.d.ts +8 -0
- package/dist/http/handlers/tools/journal-record.d.ts.map +1 -0
- package/dist/http/handlers/tools/journal-record.js +40 -0
- package/dist/http/handlers/tools/journal-record.js.map +1 -0
- package/dist/http/handlers/tools/research.d.ts +4 -0
- package/dist/http/handlers/tools/research.d.ts.map +1 -0
- package/dist/http/handlers/tools/research.js +64 -0
- package/dist/http/handlers/tools/research.js.map +1 -0
- package/dist/http/handlers/tools/retry.d.ts +4 -0
- package/dist/http/handlers/tools/retry.d.ts.map +1 -0
- package/dist/http/handlers/tools/retry.js +73 -0
- package/dist/http/handlers/tools/retry.js.map +1 -0
- package/dist/http/handlers/tools/review.d.ts +4 -0
- package/dist/http/handlers/tools/review.d.ts.map +1 -0
- package/dist/http/handlers/tools/review.js +43 -0
- package/dist/http/handlers/tools/review.js.map +1 -0
- package/dist/http/journal-lock.d.ts +4 -0
- package/dist/http/journal-lock.d.ts.map +1 -0
- package/dist/http/journal-lock.js +34 -0
- package/dist/http/journal-lock.js.map +1 -0
- package/dist/http/middleware/body-reader.d.ts +16 -0
- package/dist/http/middleware/body-reader.d.ts.map +1 -0
- package/dist/http/middleware/body-reader.js +44 -0
- package/dist/http/middleware/body-reader.js.map +1 -0
- package/dist/http/middleware/caller-identity.d.ts +16 -0
- package/dist/http/middleware/caller-identity.d.ts.map +1 -0
- package/dist/http/middleware/caller-identity.js +16 -0
- package/dist/http/middleware/caller-identity.js.map +1 -0
- package/dist/http/middleware/decompress.d.ts +14 -0
- package/dist/http/middleware/decompress.d.ts.map +1 -0
- package/dist/http/middleware/decompress.js +51 -0
- package/dist/http/middleware/decompress.js.map +1 -0
- package/dist/http/project-registry.d.ts +54 -0
- package/dist/http/project-registry.d.ts.map +1 -0
- package/dist/http/project-registry.js +130 -0
- package/dist/http/project-registry.js.map +1 -0
- package/dist/http/request-observability.d.ts +8 -0
- package/dist/http/request-observability.d.ts.map +1 -0
- package/dist/http/request-observability.js +20 -0
- package/dist/http/request-observability.js.map +1 -0
- package/dist/http/request-pipeline.d.ts +16 -0
- package/dist/http/request-pipeline.d.ts.map +1 -0
- package/dist/http/request-pipeline.js +144 -0
- package/dist/http/request-pipeline.js.map +1 -0
- package/dist/http/server.d.ts +17 -0
- package/dist/http/server.d.ts.map +1 -0
- package/dist/http/server.js +300 -0
- package/dist/http/server.js.map +1 -0
- package/dist/http/types.d.ts +20 -0
- package/dist/http/types.d.ts.map +1 -0
- package/dist/http/types.js +2 -0
- package/dist/http/types.js.map +1 -0
- package/dist/skill-install/disabled-state.d.ts +35 -0
- package/dist/skill-install/disabled-state.d.ts.map +1 -0
- package/dist/skill-install/disabled-state.js +96 -0
- package/dist/skill-install/disabled-state.js.map +1 -0
- package/dist/skill-install/discover.d.ts +29 -0
- package/dist/skill-install/discover.d.ts.map +1 -0
- package/dist/skill-install/discover.js +104 -0
- package/dist/skill-install/discover.js.map +1 -0
- package/dist/skill-install/include-utils.d.ts +27 -0
- package/dist/skill-install/include-utils.d.ts.map +1 -0
- package/dist/skill-install/include-utils.js +90 -0
- package/dist/skill-install/include-utils.js.map +1 -0
- package/dist/skill-install/manifest.d.ts +82 -0
- package/dist/skill-install/manifest.d.ts.map +1 -0
- package/dist/skill-install/manifest.js +215 -0
- package/dist/skill-install/manifest.js.map +1 -0
- package/dist/skill-install/skill-installer-common.d.ts +26 -0
- package/dist/skill-install/skill-installer-common.d.ts.map +1 -0
- package/dist/skill-install/skill-installer-common.js +139 -0
- package/dist/skill-install/skill-installer-common.js.map +1 -0
- package/dist/skill-install/skill-installers/claude-code.d.ts +43 -0
- package/dist/skill-install/skill-installers/claude-code.d.ts.map +1 -0
- package/dist/skill-install/skill-installers/claude-code.js +65 -0
- package/dist/skill-install/skill-installers/claude-code.js.map +1 -0
- package/dist/skill-install/skill-installers/codex-cli.d.ts +27 -0
- package/dist/skill-install/skill-installers/codex-cli.d.ts.map +1 -0
- package/dist/skill-install/skill-installers/codex-cli.js +84 -0
- package/dist/skill-install/skill-installers/codex-cli.js.map +1 -0
- package/dist/skill-install/skill-installers/cursor.d.ts +72 -0
- package/dist/skill-install/skill-installers/cursor.d.ts.map +1 -0
- package/dist/skill-install/skill-installers/cursor.js +81 -0
- package/dist/skill-install/skill-installers/cursor.js.map +1 -0
- package/dist/skill-install/skill-installers/gemini-cli.d.ts +50 -0
- package/dist/skill-install/skill-installers/gemini-cli.d.ts.map +1 -0
- package/dist/skill-install/skill-installers/gemini-cli.js +72 -0
- package/dist/skill-install/skill-installers/gemini-cli.js.map +1 -0
- package/dist/skill-install/skill-manifest-sync.d.ts +11 -0
- package/dist/skill-install/skill-manifest-sync.d.ts.map +1 -0
- package/dist/skill-install/skill-manifest-sync.js +65 -0
- package/dist/skill-install/skill-manifest-sync.js.map +1 -0
- package/dist/skills/_shared/auth.md +41 -0
- package/dist/skills/_shared/error-handling.md +31 -0
- package/dist/skills/_shared/polling.md +88 -0
- package/dist/skills/_shared/response-shape.md +55 -0
- package/dist/skills/_shared/review-policy.md +15 -0
- package/dist/skills/mma-audit/SKILL.md +270 -0
- package/dist/skills/mma-context-blocks/SKILL.md +148 -0
- package/dist/skills/mma-debug/SKILL.md +208 -0
- package/dist/skills/mma-delegate/SKILL.md +216 -0
- package/dist/skills/mma-execute-plan/SKILL.md +214 -0
- package/dist/skills/mma-explore/SKILL.md +190 -0
- package/dist/skills/mma-investigate/SKILL.md +258 -0
- package/dist/skills/mma-journal-recall/SKILL.md +242 -0
- package/dist/skills/mma-journal-record/SKILL.md +202 -0
- package/dist/skills/mma-research/SKILL.md +223 -0
- package/dist/skills/mma-retry/SKILL.md +221 -0
- package/dist/skills/mma-review/SKILL.md +209 -0
- package/dist/skills/multi-model-agent/SKILL.md +206 -0
- package/dist/telemetry/consent.d.ts +4 -0
- package/dist/telemetry/consent.d.ts.map +1 -0
- package/dist/telemetry/consent.js +40 -0
- package/dist/telemetry/consent.js.map +1 -0
- package/dist/telemetry/flusher.d.ts +19 -0
- package/dist/telemetry/flusher.d.ts.map +1 -0
- package/dist/telemetry/flusher.js +277 -0
- package/dist/telemetry/flusher.js.map +1 -0
- package/dist/telemetry/generation.d.ts +9 -0
- package/dist/telemetry/generation.d.ts.map +1 -0
- package/dist/telemetry/generation.js +33 -0
- package/dist/telemetry/generation.js.map +1 -0
- package/dist/telemetry/identity.d.ts +9 -0
- package/dist/telemetry/identity.d.ts.map +1 -0
- package/dist/telemetry/identity.js +35 -0
- package/dist/telemetry/identity.js.map +1 -0
- package/dist/telemetry/install-id.d.ts +13 -0
- package/dist/telemetry/install-id.d.ts.map +1 -0
- package/dist/telemetry/install-id.js +49 -0
- package/dist/telemetry/install-id.js.map +1 -0
- package/dist/telemetry/install-meta.d.ts +10 -0
- package/dist/telemetry/install-meta.d.ts.map +1 -0
- package/dist/telemetry/install-meta.js +15 -0
- package/dist/telemetry/install-meta.js.map +1 -0
- package/dist/telemetry/queue.d.ts +35 -0
- package/dist/telemetry/queue.d.ts.map +1 -0
- package/dist/telemetry/queue.js +287 -0
- package/dist/telemetry/queue.js.map +1 -0
- package/dist/telemetry/recorder.d.ts +39 -0
- package/dist/telemetry/recorder.d.ts.map +1 -0
- package/dist/telemetry/recorder.js +173 -0
- package/dist/telemetry/recorder.js.map +1 -0
- package/package.json +43 -24
- package/scripts/postinstall.js +36 -0
- package/bin/mmagent.mjs +0 -47
- package/postinstall.mjs +0 -8
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { sendError, sendJson } from '../../errors.js';
|
|
2
|
+
import { notApplicable, formatElapsed } from '@zhixuan92/multi-model-agent-core';
|
|
3
|
+
// envelopeToPublicResult converts a TaskEnvelope to the public-safe per-task result shape.
|
|
4
|
+
export function envelopeToPublicResult(env) {
|
|
5
|
+
// 4.7.4+ standardization: findings/outcome summary fields live ONLY at
|
|
6
|
+
// the top level of the per-task result. Per-stage rows carry stage
|
|
7
|
+
// mechanics (durationMs, costUSD, verdict, etc.) but NOT findings
|
|
8
|
+
// duplicates — one source of truth for backend + dashboard consumers.
|
|
9
|
+
const stripFindingsFields = (s) => {
|
|
10
|
+
const { findingsOutcome, findingsOutcomeReason, outcomeInferred, outcomeMalformed, findingsBySeverity, ...rest } = s ?? {};
|
|
11
|
+
return rest;
|
|
12
|
+
};
|
|
13
|
+
// Outcome rollup: review > annotating > implementing (first non-null wins).
|
|
14
|
+
const outcomePriority = ['reviewing', 'annotating', 'implementing'];
|
|
15
|
+
const pick = outcomePriority
|
|
16
|
+
.map((n) => env.stages.find((st) => st.name === n && st.findingsOutcome != null))
|
|
17
|
+
.find((s) => s !== undefined);
|
|
18
|
+
const sevCounts = env.findings.reduce((acc, f) => {
|
|
19
|
+
const s = f.severity;
|
|
20
|
+
if (s === 'critical' || s === 'high' || s === 'medium' || s === 'low')
|
|
21
|
+
acc[s] += 1;
|
|
22
|
+
return acc;
|
|
23
|
+
}, { critical: 0, high: 0, medium: 0, low: 0 });
|
|
24
|
+
return {
|
|
25
|
+
taskId: env.taskId, taskIndex: env.taskIndex, route: env.route, agentType: env.agentType,
|
|
26
|
+
status: env.status, terminalAt: env.terminalAt, stopReason: env.stopReason,
|
|
27
|
+
stages: env.stages.map(stripFindingsFields),
|
|
28
|
+
totals: {
|
|
29
|
+
costUSD: env.totalCostUSD, durationMs: env.totalDurationMs, turnsUsed: env.turnsUsed,
|
|
30
|
+
inputTokens: env.totalInputTokens, outputTokens: env.totalOutputTokens,
|
|
31
|
+
},
|
|
32
|
+
findings: env.findings.map((f) => ({
|
|
33
|
+
id: f.id, severity: f.severity, category: f.category, claim: f.claim,
|
|
34
|
+
...(f.evidence !== undefined && f.evidence !== '' && { evidence: f.evidence }),
|
|
35
|
+
...(f.suggestion !== undefined && f.suggestion !== '' && { suggestion: f.suggestion }),
|
|
36
|
+
source: f.source,
|
|
37
|
+
})),
|
|
38
|
+
findingsBySeverity: sevCounts,
|
|
39
|
+
...(pick && {
|
|
40
|
+
findingsOutcome: pick.findingsOutcome ?? null,
|
|
41
|
+
...(pick.findingsOutcomeReason !== undefined && { findingsOutcomeReason: pick.findingsOutcomeReason }),
|
|
42
|
+
...(pick.outcomeInferred !== undefined && { outcomeInferred: pick.outcomeInferred }),
|
|
43
|
+
...(pick.outcomeMalformed !== undefined && { outcomeMalformed: pick.outcomeMalformed }),
|
|
44
|
+
}),
|
|
45
|
+
// filesChangedCount prefers the authoritative git-diff signal
|
|
46
|
+
// (env.realFilesChanged, populated by terminal-handlers via getRealFilesChanged).
|
|
47
|
+
// Falls back to the per-task worker tool-call signal (env.filesWritten)
|
|
48
|
+
// when realFilesChanged is empty but filesWritten is non-empty — covers
|
|
49
|
+
// cwds that are not git repos (e.g. /tmp), where `git diff` returns
|
|
50
|
+
// nothing even though the worker actually wrote files. Pre-fix, codex
|
|
51
|
+
// tasks under /tmp reported filesChangedCount=0 despite the file existing
|
|
52
|
+
// on disk; reviewer then halted on "no files changed."
|
|
53
|
+
filesChangedCount: env.realFilesChanged.length > 0
|
|
54
|
+
? env.realFilesChanged.length
|
|
55
|
+
: env.filesWritten.length,
|
|
56
|
+
error: env.structuredError ? { code: env.structuredError.code, message: env.structuredError.message } : null,
|
|
57
|
+
escalationSummary: { count: env.escalationLog.length, distinctProviders: new Set(env.escalationLog.map((e) => (e.toModel ?? ''))).size },
|
|
58
|
+
// 4.7.5: surface parser-side validation warnings (e.g. dropped Finding blocks)
|
|
59
|
+
// so operators can see WHY a worker's output yielded fewer findings than
|
|
60
|
+
// expected. recordValidationWarning() on the envelope pushes here; without
|
|
61
|
+
// this projection the data was invisible to /batch callers.
|
|
62
|
+
validationWarnings: env.validationWarnings,
|
|
63
|
+
// terminal context block id for read routes (null on write routes / failure)
|
|
64
|
+
contextBlockId: env.contextBlockId,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
// buildPendingHeadline constructs a pending batch headline from running envelope snapshots.
|
|
68
|
+
function buildPendingHeadline(entry) {
|
|
69
|
+
const running = (entry.taskEnvelopes ?? []).filter((e) => e !== null && e.snapshot().status === 'running');
|
|
70
|
+
if (running.length === 0)
|
|
71
|
+
return `[0/${entry.tasksTotal ?? 1}] queued`;
|
|
72
|
+
const rep = running[0];
|
|
73
|
+
const repSnap = rep.snapshot();
|
|
74
|
+
const summed = running.reduce((acc, e) => {
|
|
75
|
+
const s = e.snapshot().headline;
|
|
76
|
+
return { writes: acc.writes + s.toolWrites, total: acc.total + s.toolTotal };
|
|
77
|
+
}, { writes: 0, total: 0 });
|
|
78
|
+
const suffix = running.length > 1 ? ` +${running.length - 1}` : '';
|
|
79
|
+
// Adaptive: tools=N always (the most reliable activity signal across all
|
|
80
|
+
// providers); writes= only when > 0.
|
|
81
|
+
const statsParts = [`tools=${summed.total}`];
|
|
82
|
+
if (summed.writes > 0)
|
|
83
|
+
statsParts.push(`writes=${summed.writes}`);
|
|
84
|
+
const stats = statsParts.join(' ');
|
|
85
|
+
return `[${repSnap.headline.stageIndex}/${repSnap.headline.stageTotal}] ${repSnap.headline.stageLabel}${suffix} — ${stats}`;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* GET /batch/:batchId — poll a batch.
|
|
89
|
+
*
|
|
90
|
+
* Status split (Theme 7):
|
|
91
|
+
* - pending → 202 text/plain — body is the runningHeadline
|
|
92
|
+
* - complete/failed/expired → 200 JSON uniform 7-field envelope
|
|
93
|
+
*
|
|
94
|
+
* Optional ?taskIndex=N slices `results` on a complete envelope.
|
|
95
|
+
*
|
|
96
|
+
* Errors:
|
|
97
|
+
* unknown batchId → 404 not_found
|
|
98
|
+
* non-numeric taskIndex → 400 invalid_task_index
|
|
99
|
+
* taskIndex ≥ results.len → 404 unknown_task_index
|
|
100
|
+
*/
|
|
101
|
+
export function buildBatchHandler(deps) {
|
|
102
|
+
return async (_req, res, params, ctx) => {
|
|
103
|
+
const { batchId } = params;
|
|
104
|
+
const entry = deps.batchRegistry.get(batchId);
|
|
105
|
+
if (!entry) {
|
|
106
|
+
sendError(res, 404, 'not_found', `Batch ${batchId} not found`);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
// Parse optional taskIndex BEFORE checking batch state — syntactic
|
|
110
|
+
// validation is independent of state, and clients shouldn't get a 202
|
|
111
|
+
// when the request URL itself is malformed.
|
|
112
|
+
const rawTaskIndex = ctx.url.searchParams.get('taskIndex');
|
|
113
|
+
let taskIndex = null;
|
|
114
|
+
if (rawTaskIndex !== null) {
|
|
115
|
+
if (!/^\d+$/.test(rawTaskIndex)) {
|
|
116
|
+
sendError(res, 400, 'invalid_task_index', `taskIndex must be a non-negative integer; got: ${JSON.stringify(rawTaskIndex)}`);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
taskIndex = parseInt(rawTaskIndex, 10);
|
|
120
|
+
}
|
|
121
|
+
// Pending → 202 text/plain progress line.
|
|
122
|
+
// ALWAYS one line, regardless of single-task or batch. For batches, the
|
|
123
|
+
// line aggregates per-task state: slowest running task is the headline's
|
|
124
|
+
// representative (largest elapsed = oldest dispatchedAt, ties broken by
|
|
125
|
+
// lowest taskIndex), counts are summed across all started tasks, and a
|
|
126
|
+
// " +K" suffix marks how many other tasks are running concurrently.
|
|
127
|
+
// Final shape (identical for N=1 and N>1):
|
|
128
|
+
// [X/Y] Implementing by Standard worker (1/9)[+K] - 6m 0s, 8 write, 234 tool calls
|
|
129
|
+
if (entry.state === 'pending') {
|
|
130
|
+
let headline;
|
|
131
|
+
// Try envelope-based path first if envelopes are available
|
|
132
|
+
if (entry.taskEnvelopes && entry.taskEnvelopes.length > 0) {
|
|
133
|
+
headline = buildPendingHeadline(entry);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
const perTask = entry.perTaskHeadlineSnapshots;
|
|
137
|
+
// tasksTotal is set by async-dispatch to a placeholder (1) before the
|
|
138
|
+
// executor knows the real fan-out size; perTask.size reflects actual
|
|
139
|
+
// tasks that have started, so prefer the larger of the two.
|
|
140
|
+
const totalTasks = Math.max(entry.tasksTotal ?? 1, perTask?.size ?? 0);
|
|
141
|
+
if (perTask && perTask.size > 0) {
|
|
142
|
+
const sortedIndices = [...perTask.keys()].sort((a, b) => a - b);
|
|
143
|
+
// Slowest = oldest dispatchedAt (i.e., largest elapsed). Stable
|
|
144
|
+
// tie-break on lowest taskIndex (sortedIndices is already ascending).
|
|
145
|
+
let slowestIdx = sortedIndices[0];
|
|
146
|
+
let slowest = perTask.get(slowestIdx);
|
|
147
|
+
for (const idx of sortedIndices) {
|
|
148
|
+
const snap = perTask.get(idx);
|
|
149
|
+
if (snap.dispatchedAt < slowest.dispatchedAt) {
|
|
150
|
+
slowest = snap;
|
|
151
|
+
slowestIdx = idx;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// Sum counts across all started tasks for the aggregate stats clause.
|
|
155
|
+
let sumWrite = 0;
|
|
156
|
+
let sumTotal = 0;
|
|
157
|
+
let haveStructuredCounts = false;
|
|
158
|
+
for (const idx of sortedIndices) {
|
|
159
|
+
const snap = perTask.get(idx);
|
|
160
|
+
if (typeof snap.toolWrites === 'number' ||
|
|
161
|
+
typeof snap.toolTotal === 'number') {
|
|
162
|
+
haveStructuredCounts = true;
|
|
163
|
+
sumWrite += snap.toolWrites ?? 0;
|
|
164
|
+
sumTotal += snap.toolTotal ?? 0;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const startedCount = perTask.size;
|
|
168
|
+
const taskBracket = `[${startedCount}/${totalTasks}]`;
|
|
169
|
+
const runningSuffix = startedCount > 1 ? ` +${startedCount - 1}` : '';
|
|
170
|
+
const elapsedMs = Date.now() - slowest.dispatchedAt;
|
|
171
|
+
if (haveStructuredCounts && slowest.stageLabel) {
|
|
172
|
+
const tierClause = slowest.tier ? ` by ${slowest.tier} worker` : '';
|
|
173
|
+
const stageProgressClause = typeof slowest.stageDone === 'number' && typeof slowest.stageTotal === 'number'
|
|
174
|
+
? ` (${slowest.stageDone}/${slowest.stageTotal})`
|
|
175
|
+
: '';
|
|
176
|
+
const statsClause = `, ${sumWrite} write, ${sumTotal} tool calls`;
|
|
177
|
+
headline = `${taskBracket} ${slowest.stageLabel}${tierClause}${stageProgressClause}${runningSuffix} - ${formatElapsed(elapsedMs)}${statsClause}`;
|
|
178
|
+
}
|
|
179
|
+
else if (slowest.prefix) {
|
|
180
|
+
// Older snapshot path: inject the +K suffix before the prefix's " - "
|
|
181
|
+
// separator if needed.
|
|
182
|
+
const prefixWithSuffix = runningSuffix
|
|
183
|
+
? slowest.prefix.replace(/ - $/, `${runningSuffix} - `)
|
|
184
|
+
: slowest.prefix;
|
|
185
|
+
headline = `${taskBracket} ${prefixWithSuffix}${formatElapsed(elapsedMs)}${slowest.statsClause}`;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
headline = `${taskBracket} ${slowest.fallback}${runningSuffix}`;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
const snap = entry.runningHeadlineSnapshot;
|
|
193
|
+
if (!snap) {
|
|
194
|
+
headline = '[0/0] queued';
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
const elapsedMs = Date.now() - snap.dispatchedAt;
|
|
198
|
+
headline = snap.prefix
|
|
199
|
+
? `${snap.prefix}${formatElapsed(elapsedMs)}${snap.statsClause}`
|
|
200
|
+
: snap.fallback;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
res.writeHead(202, { 'content-type': 'text/plain; charset=utf-8' });
|
|
205
|
+
res.end(headline);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
// Build terminal response from envelopes if available, otherwise use pre-computed result
|
|
209
|
+
let fullResult;
|
|
210
|
+
if (entry.taskEnvelopes && entry.taskEnvelopes.length > 0) {
|
|
211
|
+
// Build response from envelope snapshots
|
|
212
|
+
const snapshots = entry.taskEnvelopes
|
|
213
|
+
.map(e => e?.snapshot())
|
|
214
|
+
.filter((snap) => snap !== undefined && snap !== null);
|
|
215
|
+
if (snapshots.length > 0) {
|
|
216
|
+
// Build results array from envelopes
|
|
217
|
+
const results = snapshots.map((env) => envelopeToPublicResult(env));
|
|
218
|
+
// Derive batchTimings from envelopes
|
|
219
|
+
const allStartedAt = snapshots.map(s => new Date(s.startedAt).getTime());
|
|
220
|
+
const allTerminalAt = snapshots.map(s => (s.terminalAt ? new Date(s.terminalAt).getTime() : 0));
|
|
221
|
+
const batchStart = Math.min(...allStartedAt);
|
|
222
|
+
const batchEnd = Math.max(...allTerminalAt.filter(t => t > 0));
|
|
223
|
+
const sumDurations = snapshots.reduce((sum, s) => sum + s.totalDurationMs, 0);
|
|
224
|
+
const batchTimings = {
|
|
225
|
+
wallClockMs: batchEnd - batchStart,
|
|
226
|
+
sumOfTaskMs: sumDurations,
|
|
227
|
+
estimatedParallelSavingsMs: Math.max(0, sumDurations - (batchEnd - batchStart)),
|
|
228
|
+
};
|
|
229
|
+
// Derive costSummary from envelopes
|
|
230
|
+
const costSummary = {
|
|
231
|
+
totalActualCostUSD: snapshots.reduce((sum, s) => sum + s.totalCostUSD, 0),
|
|
232
|
+
totalCostDeltaVsMainUSD: 0, // Not available from envelopes
|
|
233
|
+
};
|
|
234
|
+
// Derive structuredReport from findings + per-stage outcome roll-up.
|
|
235
|
+
// findingsOutcome aggregation rule: any 'found' → 'found'; else any
|
|
236
|
+
// 'not_applicable' → 'not_applicable'; else 'clean'. null entries skip.
|
|
237
|
+
const allFindings = snapshots.flatMap(s => s.findings);
|
|
238
|
+
const stageOutcomes = snapshots
|
|
239
|
+
.flatMap(s => s.stages)
|
|
240
|
+
.map(st => st.findingsOutcome)
|
|
241
|
+
.filter((o) => o === 'found' || o === 'clean' || o === 'not_applicable');
|
|
242
|
+
const rollupOutcome = stageOutcomes.length === 0
|
|
243
|
+
? null
|
|
244
|
+
: stageOutcomes.includes('found') ? 'found'
|
|
245
|
+
: stageOutcomes.includes('not_applicable') ? 'not_applicable'
|
|
246
|
+
: 'clean';
|
|
247
|
+
// Commit fields come from the per-task envelopes (sealed from the commit
|
|
248
|
+
// gate payload — see terminal-handlers.ts). For a MULTI-task batch the
|
|
249
|
+
// aggregate must represent whether the batch committed, not just task 0:
|
|
250
|
+
// use the first task that actually committed (has a SHA), so a no-op task 0
|
|
251
|
+
// can't mask sibling commits. commitSkipReason is surfaced only when NOTHING
|
|
252
|
+
// committed (then from task 0). filesChanged already unions across tasks.
|
|
253
|
+
const firstSnap = snapshots[0];
|
|
254
|
+
const committedSnap = snapshots.find((s) => s.commitSha) ?? null;
|
|
255
|
+
const structuredReport = {
|
|
256
|
+
summary: allFindings.length > 0 ? `${allFindings.length} finding(s)` : 'No findings',
|
|
257
|
+
workerStatus: snapshots.length > 0 ? snapshots[0].status : 'unknown',
|
|
258
|
+
unresolved: [],
|
|
259
|
+
filesChanged: snapshots.flatMap(s => s.realFilesChanged.length > 0 ? s.realFilesChanged : s.filesWritten),
|
|
260
|
+
reviewVerdict: null,
|
|
261
|
+
reviewConcerns: [],
|
|
262
|
+
reworkApplied: false,
|
|
263
|
+
commitSha: committedSnap?.commitSha ?? null,
|
|
264
|
+
commitMessage: committedSnap?.commitMessage ?? null,
|
|
265
|
+
commitSkipReason: committedSnap ? null : (firstSnap?.commitSkipReason ?? null),
|
|
266
|
+
findings: allFindings.map(f => ({
|
|
267
|
+
severity: f.severity, category: f.category, claim: f.claim,
|
|
268
|
+
...(f.evidence !== undefined && f.evidence !== '' && { evidence: f.evidence }),
|
|
269
|
+
...(f.suggestion !== undefined && f.suggestion !== '' && { suggestion: f.suggestion }),
|
|
270
|
+
})),
|
|
271
|
+
findingsOutcome: rollupOutcome,
|
|
272
|
+
criteriaErrors: [],
|
|
273
|
+
// research-only: the `## Sources used` table, deduped by source group
|
|
274
|
+
// across tasks. Empty on every non-research route.
|
|
275
|
+
sourcesUsed: (() => {
|
|
276
|
+
const seen = new Map();
|
|
277
|
+
for (const s of snapshots) {
|
|
278
|
+
for (const row of (s.sourcesUsed ?? [])) {
|
|
279
|
+
const prev = seen.get(row.source);
|
|
280
|
+
// Prefer a `used:true` row over an attempted-but-failed one.
|
|
281
|
+
if (!prev || (row.used && !prev.used))
|
|
282
|
+
seen.set(row.source, row);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return [...seen.values()];
|
|
286
|
+
})(),
|
|
287
|
+
};
|
|
288
|
+
// Build headline
|
|
289
|
+
const headline = `${entry.tool}: ${snapshots.length} task(s) complete`;
|
|
290
|
+
// Build error from first failed envelope if any
|
|
291
|
+
const firstError = snapshots.find(s => s.structuredError);
|
|
292
|
+
const error = firstError?.structuredError
|
|
293
|
+
? { code: firstError.structuredError.code, message: firstError.structuredError.message }
|
|
294
|
+
: { kind: 'not_applicable', reason: 'batch succeeded' };
|
|
295
|
+
fullResult = { headline, results, batchTimings, costSummary, structuredReport, error };
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
// Fall back to pre-computed result if not built from envelopes
|
|
299
|
+
if (!fullResult) {
|
|
300
|
+
fullResult = entry.result;
|
|
301
|
+
}
|
|
302
|
+
if (entry.state === 'failed' || entry.state === 'expired' || !fullResult) {
|
|
303
|
+
const reason = `batch ${entry.state}`;
|
|
304
|
+
const errPayload = entry.error ?? (fullResult && fullResult['error']) ?? notApplicable('batch succeeded');
|
|
305
|
+
sendJson(res, 200, {
|
|
306
|
+
headline: entry.state === 'expired'
|
|
307
|
+
? 'batch expired'
|
|
308
|
+
: entry.state === 'failed'
|
|
309
|
+
? 'batch failed'
|
|
310
|
+
: fullResult?.['headline'] ?? `batch ${entry.state}`,
|
|
311
|
+
results: fullResult?.['results'] ?? notApplicable(reason),
|
|
312
|
+
batchTimings: fullResult?.['batchTimings'] ?? notApplicable(reason),
|
|
313
|
+
costSummary: fullResult?.['costSummary'] ?? notApplicable(reason),
|
|
314
|
+
structuredReport: fullResult?.['structuredReport'] ?? notApplicable(reason),
|
|
315
|
+
error: errPayload,
|
|
316
|
+
});
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
// entry.state === 'complete' with a stored result. Executor emits all 7 fields.
|
|
320
|
+
if (taskIndex !== null) {
|
|
321
|
+
const results = fullResult['results'];
|
|
322
|
+
if (!Array.isArray(results) || taskIndex >= results.length) {
|
|
323
|
+
sendError(res, 404, 'unknown_task_index', `taskIndex ${taskIndex} is out of range (batch has ${Array.isArray(results) ? results.length : 0} result(s))`);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
sendJson(res, 200, { ...fullResult, results: [results[taskIndex]] });
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
sendJson(res, 200, fullResult);
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
//# sourceMappingURL=batch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
|
3
|
+
export interface ContextBlockHandlerDeps {
|
|
4
|
+
projectRegistry: ProjectRegistry;
|
|
5
|
+
maxContextBlockBytes: number;
|
|
6
|
+
maxContextBlocksPerProject: number;
|
|
7
|
+
}
|
|
8
|
+
export interface DeleteContextBlockHandlerDeps {
|
|
9
|
+
projectRegistry: ProjectRegistry;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* POST /context-blocks — thin shim that validates, reserves the project,
|
|
13
|
+
* and delegates block registration to the LifecycleDispatcher StagePlan.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildCreateContextBlockHandler(deps: ContextBlockHandlerDeps): RawHandler;
|
|
16
|
+
/**
|
|
17
|
+
* DELETE /context-blocks/:blockId — removes a context block belonging to the
|
|
18
|
+
* authenticated cwd. Returns 404 if the block does not exist or belongs to
|
|
19
|
+
* a different project (isolation).
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildDeleteContextBlockHandler(deps: DeleteContextBlockHandlerDeps): RawHandler;
|
|
22
|
+
//# sourceMappingURL=context-blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-blocks.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/control/context-blocks.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,eAAe,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,0BAA0B,EAAE,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,eAAe,CAAC;CAClC;AAOD;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,uBAAuB,GAAG,UAAU,CAkExF;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,6BAA6B,GAAG,UAAU,CA0C9F"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// packages/server/src/http/handlers/control/context-blocks.ts
|
|
2
|
+
//
|
|
3
|
+
// Hosts POST /context-blocks (register) and DELETE /context-blocks/:id
|
|
4
|
+
// (unregister). Lives under handlers/control/ rather than handlers/tools/
|
|
5
|
+
// because register_context_block is an assist-tier sync state op:
|
|
6
|
+
//
|
|
7
|
+
// - synchronous request/response (no batchId, no async dispatch)
|
|
8
|
+
// - no LifecycleDispatcher path (no review chain, no commit stage)
|
|
9
|
+
// - paired skill is mma-context-blocks/ (covers register + lookup)
|
|
10
|
+
//
|
|
11
|
+
// See vertical_design.md §9 "register_context_block / Assist-tier slot
|
|
12
|
+
// conventions" for the canonical rationale.
|
|
13
|
+
//
|
|
14
|
+
// v4.0: POST /context-blocks is now a thin shim that validates, reserves
|
|
15
|
+
// the project, and dispatches to the LifecycleDispatcher (which routes
|
|
16
|
+
// through the register_to_block_store stage handler per the StagePlan).
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
import { sendError, sendJson } from '../../errors.js';
|
|
19
|
+
import { LifecycleDispatcher } from '@zhixuan92/multi-model-agent-core';
|
|
20
|
+
const createBodySchema = z.object({
|
|
21
|
+
content: z.string().min(1),
|
|
22
|
+
ttlMs: z.number().int().positive().optional(),
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* POST /context-blocks — thin shim that validates, reserves the project,
|
|
26
|
+
* and delegates block registration to the LifecycleDispatcher StagePlan.
|
|
27
|
+
*/
|
|
28
|
+
export function buildCreateContextBlockHandler(deps) {
|
|
29
|
+
return async (req, res, _params, ctx) => {
|
|
30
|
+
const cwd = ctx.cwd;
|
|
31
|
+
// ── 1. Validate body ───────────────────────────────────────────────────
|
|
32
|
+
const parsed = createBodySchema.safeParse(ctx.body);
|
|
33
|
+
if (!parsed.success) {
|
|
34
|
+
sendError(res, 400, 'invalid_request', 'Request body validation failed', {
|
|
35
|
+
fieldErrors: parsed.error.flatten(),
|
|
36
|
+
});
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const { content } = parsed.data;
|
|
40
|
+
// ── 2. Content byte-size check ─────────────────────────────────────────
|
|
41
|
+
const byteLen = Buffer.byteLength(content, 'utf8');
|
|
42
|
+
if (byteLen > deps.maxContextBlockBytes) {
|
|
43
|
+
sendError(res, 413, 'payload_too_large', `Context block content exceeds the ${deps.maxContextBlockBytes}-byte limit (got ${byteLen} bytes)`);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
// ── 3. Reserve project ─────────────────────────────────────────────────
|
|
47
|
+
const reserveResult = deps.projectRegistry.reserveProject(cwd);
|
|
48
|
+
if (!reserveResult.ok) {
|
|
49
|
+
sendError(res, 503, reserveResult.error, reserveResult.message);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const pc = reserveResult.projectContext;
|
|
53
|
+
pc.lastActivityAt = Date.now();
|
|
54
|
+
deps.projectRegistry.cancelReservation(cwd);
|
|
55
|
+
// ── 4. Cap check ───────────────────────────────────────────────────────
|
|
56
|
+
if (pc.contextBlocks.size >= deps.maxContextBlocksPerProject) {
|
|
57
|
+
sendError(res, 409, 'cap_exhausted', `Project context block cap of ${deps.maxContextBlocksPerProject} reached; delete unused blocks before creating new ones`);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// ── 5. Dispatch to lifecycle ───────────────────────────────────────────
|
|
61
|
+
const dispatcher = new LifecycleDispatcher();
|
|
62
|
+
const output = await dispatcher.dispatch({
|
|
63
|
+
route: 'register-context-block',
|
|
64
|
+
toolCategory: 'assist',
|
|
65
|
+
rawRequest: parsed.data,
|
|
66
|
+
context: { projectContext: pc },
|
|
67
|
+
});
|
|
68
|
+
// ── 6. Return dispatcher output ────────────────────────────────────────
|
|
69
|
+
const status = output.status === 200 ? 201 : output.status;
|
|
70
|
+
sendJson(res, status, output.body);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* DELETE /context-blocks/:blockId — removes a context block belonging to the
|
|
75
|
+
* authenticated cwd. Returns 404 if the block does not exist or belongs to
|
|
76
|
+
* a different project (isolation).
|
|
77
|
+
*/
|
|
78
|
+
export function buildDeleteContextBlockHandler(deps) {
|
|
79
|
+
return async (_req, res, params, ctx) => {
|
|
80
|
+
const cwd = ctx.cwd;
|
|
81
|
+
const { blockId } = params;
|
|
82
|
+
// ── 1. Get project context ─────────────────────────────────────────────
|
|
83
|
+
// Look up without reserving — we need to check if the project exists at all
|
|
84
|
+
const pc = deps.projectRegistry.get(cwd);
|
|
85
|
+
if (!pc) {
|
|
86
|
+
// Project doesn't exist — no blocks can belong to it
|
|
87
|
+
sendError(res, 404, 'not_found', `Context block ${blockId} not found`);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
// ── 2. Existence + isolation check ─────────────────────────────────────
|
|
91
|
+
// Since contextBlocks is per-project, any block in pc.contextBlocks belongs
|
|
92
|
+
// to this cwd. If the id isn't in this store, it either doesn't exist or
|
|
93
|
+
// belongs to a different project — both map to 404.
|
|
94
|
+
const content = pc.contextBlocks.get(blockId);
|
|
95
|
+
if (content === undefined) {
|
|
96
|
+
sendError(res, 404, 'not_found', `Context block ${blockId} not found`);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
// ── 3. Pin check ───────────────────────────────────────────────────────
|
|
100
|
+
const refcount = pc.contextBlocks.refcount(blockId);
|
|
101
|
+
if (refcount > 0) {
|
|
102
|
+
sendError(res, 409, 'pinned', `Context block ${blockId} is in use by ${refcount} active batch(es)`, { refcount });
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
// ── 4. Delete ──────────────────────────────────────────────────────────
|
|
106
|
+
pc.contextBlocks.delete(blockId);
|
|
107
|
+
pc.lastActivityAt = Date.now();
|
|
108
|
+
sendJson(res, 200, { ok: true });
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=context-blocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-blocks.js","sourceRoot":"","sources":["../../../../src/http/handlers/control/context-blocks.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,uEAAuE;AACvE,0EAA0E;AAC1E,kEAAkE;AAClE,EAAE;AACF,mEAAmE;AACnE,qEAAqE;AACrE,qEAAqE;AACrE,EAAE;AACF,uEAAuE;AACvE,4CAA4C;AAC5C,EAAE;AACF,yEAAyE;AACzE,uEAAuE;AACvE,wEAAwE;AAIxE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAYxE,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAAC,IAA6B;IAC1E,OAAO,KAAK,EACV,GAAoB,EACpB,GAAmB,EACnB,OAA+B,EAC/B,GAAG,EACH,EAAE;QACF,MAAM,GAAG,GAAG,GAAG,CAAC,GAAI,CAAC;QAErB,0EAA0E;QAC1E,MAAM,MAAM,GAAG,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,EAAE,gCAAgC,EAAE;gBACvE,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;aACpC,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QAED,MA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AE,GAAG,EAAE,QAAQ,EAAE,iBAAiB,OAAO,iBAAiB,QAAQ,mBAAmB,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;YAClH,OAAO;QACT,CAAC;QAED,0EAA0E;QAC1E,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACjC,EAAE,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE/B,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IACnC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RawHandler } from '../../types.js';
|
|
2
|
+
import type { DriftEntry, SkillManifestSync } from '../../../skill-install/skill-manifest-sync.js';
|
|
3
|
+
export type { DriftEntry } from '../../../skill-install/skill-manifest-sync.js';
|
|
4
|
+
export type HealthResponse = {
|
|
5
|
+
status: 'ok';
|
|
6
|
+
} | {
|
|
7
|
+
status: 'drift';
|
|
8
|
+
drift: DriftEntry[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* GET /health — unauthenticated liveness + skill manifest drift check.
|
|
12
|
+
*
|
|
13
|
+
* Minimal v4.0 shape (spec C13): status=ok when all installed skills match the
|
|
14
|
+
* manifest; status=drift when one or more skills are missing, outdated, or orphaned.
|
|
15
|
+
* No version/pid/uptimeMs — those live in telemetry and GET /status.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildHealthHandler(deps: {
|
|
18
|
+
manifestSync: SkillManifestSync;
|
|
19
|
+
}): RawHandler;
|
|
20
|
+
//# sourceMappingURL=health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/introspection/health.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAEnG,YAAY,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAEhF,MAAM,MAAM,cAAc,GACtB;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GAChB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAE7C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IAAE,YAAY,EAAE,iBAAiB,CAAA;CAAE,GAAG,UAAU,CAQxF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { sendJson } from '../../errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* GET /health — unauthenticated liveness + skill manifest drift check.
|
|
4
|
+
*
|
|
5
|
+
* Minimal v4.0 shape (spec C13): status=ok when all installed skills match the
|
|
6
|
+
* manifest; status=drift when one or more skills are missing, outdated, or orphaned.
|
|
7
|
+
* No version/pid/uptimeMs — those live in telemetry and GET /status.
|
|
8
|
+
*/
|
|
9
|
+
export function buildHealthHandler(deps) {
|
|
10
|
+
return (_req, res) => {
|
|
11
|
+
const drift = deps.manifestSync.driftReport();
|
|
12
|
+
const body = drift.length === 0
|
|
13
|
+
? { status: 'ok' }
|
|
14
|
+
: { status: 'drift', drift };
|
|
15
|
+
sendJson(res, 200, body);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../../../src/http/handlers/introspection/health.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAU3C;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAyC;IAC1E,OAAO,CAAC,IAAqB,EAAE,GAAmB,EAAE,EAAE;QACpD,MAAM,KAAK,GAAiB,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QAC5D,MAAM,IAAI,GAAmB,KAAK,CAAC,MAAM,KAAK,CAAC;YAC7C,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;YAClB,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC/B,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { RawHandler } from '../../types.js';
|
|
2
|
+
import type { BatchRegistry } from '@zhixuan92/multi-model-agent-core';
|
|
3
|
+
import type { ProjectRegistry } from '../../project-registry.js';
|
|
4
|
+
/**
|
|
5
|
+
* SemVer range this server is compatible with for installed skills.
|
|
6
|
+
* A manifest version that does NOT match means the skill is out of date.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SKILL_VERSION_COMPATIBLE = ">=3.0.0 <4.0.0";
|
|
9
|
+
export interface StatusHandlerDeps {
|
|
10
|
+
batchRegistry: BatchRegistry;
|
|
11
|
+
projectRegistry: ProjectRegistry;
|
|
12
|
+
serverStartedAt: number;
|
|
13
|
+
bind: string;
|
|
14
|
+
version: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* GET /status — operator introspection endpoint.
|
|
18
|
+
*
|
|
19
|
+
* Requires both:
|
|
20
|
+
* - Bearer auth (enforced by server pipeline, step 4)
|
|
21
|
+
* - Loopback origin (enforced by server pipeline, step 3 — LOOPBACK_ONLY_PATHS)
|
|
22
|
+
*
|
|
23
|
+
* Returns the §5.10 status shape.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildStatusHandler(deps: StatusHandlerDeps): RawHandler;
|
|
26
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../../src/http/handlers/introspection/status.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AASjE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAsDzD,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,UAAU,CAkGtE"}
|