@algosuite/vo-mcp 0.2.0-beta.37 → 0.2.0-beta.39
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/agent-auth-probe-cli.mjs +12 -4
- package/dist/cli.js +58 -0
- package/dist/cli.js.map +2 -2
- package/dist/index.js +56 -0
- package/dist/index.js.map +2 -2
- package/dist/runner-cli.js +205 -33
- package/dist/runner-cli.js.map +4 -4
- package/dist/runner-supervisor.js +36 -0
- package/dist/runner-supervisor.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2147,6 +2147,8 @@ async function handleVerifyAnswer(deps, rawInput, signal) {
|
|
|
2147
2147
|
engine_version: engineResult.engine_version,
|
|
2148
2148
|
degraded: engineResult.degraded,
|
|
2149
2149
|
...engineResult.quorum_failed === true ? { quorum_failed: true } : {},
|
|
2150
|
+
// The verification receipt (moat decision_id) — the thing an agent pastes as `receipt id: <uuid>`.
|
|
2151
|
+
...engineResult.receipt_id ? { receipt_id: engineResult.receipt_id } : {},
|
|
2150
2152
|
gate_type: gateType,
|
|
2151
2153
|
...kbResult.error !== null ? { kb_unavailable: true } : {},
|
|
2152
2154
|
...kbTruncated > 0 ? { kb_rules_truncated: kbTruncated } : {}
|
|
@@ -2411,6 +2413,10 @@ async function handleConsensusJudgment(deps, rawInput, signal) {
|
|
|
2411
2413
|
engine_version: engineResult.engine_version,
|
|
2412
2414
|
degraded: engineResult.degraded,
|
|
2413
2415
|
...engineResult.quorum_failed === true ? { quorum_failed: true } : {},
|
|
2416
|
+
// The verification receipt (moat decision_id) — the thing an agent pastes as `receipt id: <uuid>`.
|
|
2417
|
+
// NOTE: a content-hash cache hit replays the ORIGINAL call's receipt_id (same claim, same verdict, no new spend) —
|
|
2418
|
+
// a receipt asserts the stage ran for this claim, not one-receipt-per-call.
|
|
2419
|
+
...engineResult.receipt_id ? { receipt_id: engineResult.receipt_id } : {},
|
|
2414
2420
|
gate_type: gateType,
|
|
2415
2421
|
// ─── Consensus-engine feature outputs (additive; 2026-06-13) ─────────────
|
|
2416
2422
|
// Feature 2 (calibrated-confidence) — ON by default; the engine attaches
|
|
@@ -6393,6 +6399,7 @@ async function handleSyncConfig(deps, rawInput, _signal, fetchFn = globalThis.fe
|
|
|
6393
6399
|
var UPSERT_TOOL_NAME = "vo_private_knowledge_upsert";
|
|
6394
6400
|
var CONTEXT_TOOL_NAME = "vo_private_knowledge_context";
|
|
6395
6401
|
var INVALIDATE_TOOL_NAME = "vo_private_knowledge_invalidate";
|
|
6402
|
+
var STALE_TOOL_NAME = "vo_private_knowledge_stale";
|
|
6396
6403
|
var KNOWLEDGE_CLASSES = ["memory", "skill", "doctrine", "hook", "command"];
|
|
6397
6404
|
var PRECISION_CHAR_BUDGET = 12e3;
|
|
6398
6405
|
var upsertInputSchema = {
|
|
@@ -6425,9 +6432,26 @@ var invalidateInputSchema = {
|
|
|
6425
6432
|
required: ["knowledge_class", "source_path"],
|
|
6426
6433
|
additionalProperties: false
|
|
6427
6434
|
};
|
|
6435
|
+
var staleInputSchema = {
|
|
6436
|
+
type: "object",
|
|
6437
|
+
properties: {
|
|
6438
|
+
days: { type: "number", minimum: 1, maximum: 3650, description: "Window in days (default 90): entries at least this old that were never recalled into an agent context, or not within the window." },
|
|
6439
|
+
limit: { type: "number", minimum: 1, maximum: 500 }
|
|
6440
|
+
},
|
|
6441
|
+
additionalProperties: false
|
|
6442
|
+
};
|
|
6443
|
+
var staleDescription = `The FORGETTING REPORT: lists the authenticated operator\u2019s live private-knowledge entries that are at least N days old and have never been recalled into an agent context (or not within N days). Metadata only. SURFACES ONLY \u2014 never auto-invalidates or auto-merges: two memories that disagree may both have been right in different contexts, so you decide. Act on a candidate deliberately with ${INVALIDATE_TOOL_NAME}; recall counts come from ${CONTEXT_TOOL_NAME} reads that actually placed the entry into returned context.`;
|
|
6428
6444
|
var upsertDescription = "Uploads or refreshes the authenticated operator\u2019s private cloud knowledge. Works for Claude, Codex, Cursor, and cowork clients via the same vo-mcp login credential. Returns metadata only, not raw stored content. PRECISION DISCIPLINE: keep each entry tight and focused (~1-3 pages) with a descriptive retrieval-friendly title \u2014 retrieval surfaces whole entries, so small dense entries beat bulk dumps. Split large corpora into focused entries, then run a retrieval self-test via vo_private_knowledge_context before relying on the knowledge.";
|
|
6429
6445
|
var contextDescription = "Retrieves prompt-ready private knowledge context for the authenticated operator. Returns snippets/context only; no raw corpus download. Also the retrieval self-test surface: after upserting critical knowledge, query for it here and confirm the entry surfaces before trusting it in downstream work.";
|
|
6430
6446
|
var invalidateDescription = `Soft-deletes one private-knowledge entry for the authenticated operator: closes the live entry\u2019s validity window (bi-temporal) so it stops surfacing in retrieval. Never destroys data \u2014 invalidated versions remain queryable server-side via include_invalidated. Identify the entry by the same { knowledge_class, source_path } used at upsert; a not_found response means no live entry matches. After invalidating, self-test via ${CONTEXT_TOOL_NAME} to confirm the entry no longer surfaces.`;
|
|
6447
|
+
function isStaleInput(value) {
|
|
6448
|
+
if (value === void 0 || value === null) return true;
|
|
6449
|
+
if (typeof value !== "object") return false;
|
|
6450
|
+
const input = value;
|
|
6451
|
+
if (input["days"] !== void 0 && typeof input["days"] !== "number") return false;
|
|
6452
|
+
if (input["limit"] !== void 0 && typeof input["limit"] !== "number") return false;
|
|
6453
|
+
return true;
|
|
6454
|
+
}
|
|
6431
6455
|
function isKnowledgeClass(value) {
|
|
6432
6456
|
return typeof value === "string" && KNOWLEDGE_CLASSES.includes(value);
|
|
6433
6457
|
}
|
|
@@ -6507,6 +6531,30 @@ async function handlePrivateKnowledgeInvalidate(_deps, rawInput, _signal, fetchF
|
|
|
6507
6531
|
const payload = await callPrivateKnowledge("/api/v1/knowledge/private/invalidate", rawInput, fetchFn);
|
|
6508
6532
|
return jsonContent({ tool: INVALIDATE_TOOL_NAME, schema_version: 1, payload });
|
|
6509
6533
|
}
|
|
6534
|
+
async function handlePrivateKnowledgeStale(_deps, rawInput, _signal, fetchFn = globalThis.fetch) {
|
|
6535
|
+
if (!isStaleInput(rawInput)) {
|
|
6536
|
+
throw invalidParams(STALE_TOOL_NAME, "expected { optional days, optional limit }.");
|
|
6537
|
+
}
|
|
6538
|
+
const auth = await getCloudAuth(fetchFn);
|
|
6539
|
+
if (!auth.ok) return jsonContent({ tool: STALE_TOOL_NAME, schema_version: 1, payload: { ok: false, reason: auth.reason } });
|
|
6540
|
+
const params = new URLSearchParams();
|
|
6541
|
+
if (rawInput?.days !== void 0) params.set("days", String(Math.trunc(rawInput.days)));
|
|
6542
|
+
if (rawInput?.limit !== void 0) params.set("limit", String(Math.trunc(rawInput.limit)));
|
|
6543
|
+
const qs = params.toString();
|
|
6544
|
+
const response = await fetchFn(`${auth.controlPlaneUrl}/api/v1/knowledge/private/stale${qs ? `?${qs}` : ""}`, {
|
|
6545
|
+
method: "GET",
|
|
6546
|
+
headers: { authorization: `Bearer ${auth.token}` }
|
|
6547
|
+
});
|
|
6548
|
+
const text = await response.text();
|
|
6549
|
+
let parsed;
|
|
6550
|
+
try {
|
|
6551
|
+
parsed = text ? JSON.parse(text) : null;
|
|
6552
|
+
} catch {
|
|
6553
|
+
parsed = null;
|
|
6554
|
+
}
|
|
6555
|
+
const payload = response.status < 200 || response.status >= 300 ? { ok: false, status: response.status, response: parsed ?? text } : parsed;
|
|
6556
|
+
return jsonContent({ tool: STALE_TOOL_NAME, schema_version: 1, payload });
|
|
6557
|
+
}
|
|
6510
6558
|
async function handlePrivateKnowledgeContext(_deps, rawInput, _signal, fetchFn = globalThis.fetch) {
|
|
6511
6559
|
if (!isContextInput(rawInput)) {
|
|
6512
6560
|
throw invalidParams(CONTEXT_TOOL_NAME, "expected { query, optional limit, optional knowledge_class }.");
|
|
@@ -7049,6 +7097,14 @@ function buildToolRegistry() {
|
|
|
7049
7097
|
},
|
|
7050
7098
|
handler: handlePrivateKnowledgeInvalidate
|
|
7051
7099
|
},
|
|
7100
|
+
[STALE_TOOL_NAME]: {
|
|
7101
|
+
definition: {
|
|
7102
|
+
name: STALE_TOOL_NAME,
|
|
7103
|
+
description: staleDescription,
|
|
7104
|
+
inputSchema: staleInputSchema
|
|
7105
|
+
},
|
|
7106
|
+
handler: handlePrivateKnowledgeStale
|
|
7107
|
+
},
|
|
7052
7108
|
[POST_TOOL_NAME]: {
|
|
7053
7109
|
definition: {
|
|
7054
7110
|
name: POST_TOOL_NAME,
|