loopctl-mcp-server 2.85.0 → 2.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/index.js +137 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -297,7 +297,7 @@ exhausting a paginated walk is not the same as the row being absent.
|
|
|
297
297
|
|
|
298
298
|
| Tool | Description |
|
|
299
299
|
|---|---|
|
|
300
|
-
| `knowledge_index` | Browse/paginate the knowledge wiki catalog grouped by category. **Agent callers see only articles they own or marked `shared`.** Honors `category`, `tags`, `offset`, `limit` with deterministic ordering over the filtered set (`meta.categories` reports per-category totals within visibility). Use `fields` (default `id,title,category`; request `tags`/`status`/`updated_at` explicitly; `id` and `category` are always included) to keep the payload small. Optional: `project_id`, `story_id`, `category`, `tags`, `offset`, `limit`, `fields`. |
|
|
300
|
+
| `knowledge_index` | Browse/paginate the knowledge wiki catalog grouped by category. **Agent callers see only articles they own or marked `shared`.** Honors `category`, `tags`, `offset`, `limit` with deterministic ordering over the filtered set (`meta.categories` reports per-category totals within visibility). Use `fields` (default `id,title,category`; request `tags`/`status`/`updated_at`/`suppressed_at`/`suppressed_by`/`suppression_reason` explicitly; `id` and `category` are always included) to keep the payload small. Pair `suppressed: "only"` with `fields: suppressed_by,suppression_reason` to see who suppressed what and why without a read per row. Optional: `project_id`, `story_id`, `category`, `tags`, `offset`, `limit`, `fields`, `suppressed`. |
|
|
301
301
|
| `embedding_status` | This tenant's embedding-dimension state: active dimension, whether semantic recall is available (and the exact reason when it is not), the instance's supported dimension set, whether the shared system-scoped corpus has been materialized for this tenant, and per-dimension row counts. Call it when semantic search under-returns or reports `fallback_reason: semantic_recall_unavailable`. |
|
|
302
302
|
| `embedding_materialize_system_corpus` | Embed the shared SYSTEM-scoped corpus for THIS tenant at its active dimension with this tenant's own credential (system articles are keyword-only until then). Idempotent, batched. |
|
|
303
303
|
| `embedding_reembed` | Move the tenant's whole corpus (articles, per-tenant system-article materializations and agent memories) onto `target_dimension`. Recall keeps serving at the current dimension throughout; the pin flips and stale rows drop only when everything is present at the target. One-time and cost-bearing; requires `LOOPCTL_ORCH_KEY`. |
|
|
@@ -309,7 +309,7 @@ exhausting a paginated walk is not the same as the row being absent.
|
|
|
309
309
|
| `knowledge_progressive_index` | Progressive disclosure — a **cheap, capped index** of what's relevant to a topic (compact stubs: `id`/`title`/`category`/`summary`, **no bodies**), curated-preferred and hub-enriched, capped at top-K (`meta.truncated` when the pool exceeded it). Survey a topic without flooding context, then open only what you need via `knowledge_progressive_drill`. Required: `query` (historically `topic`, still accepted). Optional: `category`, `limit`. Carries `meta.outcome`; this path discloses no degradation of its own, so an `empty` index really is an empty topic. |
|
|
310
310
|
| `knowledge_heat_index` | Browse the corpus with **no query at all** — capped compact stubs (`id`/`title`/`category`/`heat`/`summary`, **no bodies**) ranked by how many **distinct readers** (agents, not key rows — repeat reads by one reader count once, ties broken by the number of distinct days read, never by raw read count) opened each article inside a window. Every other retrieval tool starts from a query and so shares one failure mode: a paraphrase, or material topically central but lexically dissimilar to the question, comes back empty and reads as "the KB has nothing" rather than "I asked badly". Reach for it when a search came back empty or thin, or to survey what the fleet actually reads before you know what to ask. **Ordering is usage, not relevance**, and drilling a listed article (`knowledge_progressive_drill`) does not add heat to what it opened, at any scope — otherwise being shown would produce the rank that shows it. A `knowledge_get` of the same id does count. `meta` states `heat_window` (the default window is snapped to a UTC day boundary so the payload is stable between refreshes and safe in a cached prefix; an explicit `since` is served verbatim), `counted_access_types`, `char_budget`/`chars` (BYTES of the encoded stub array, framing included), `truncated` and `unresolved`. Both read tools open a stub, canonicals included — pick by what the read MEANS: a drill is uncounted, a `get` is a counted vote. Optional: `category`, `limit`, `since`. Carries `meta.outcome` like every other retrieval surface. |
|
|
311
311
|
| `knowledge_progressive_drill` | Open one stub from `knowledge_progressive_index` or `knowledge_heat_index` — returns the **full article body** for the given id, scope-enforced. Resolves both tenant-owned articles and published system canonicals (the same set those indexes surface). Every article opened this way is recorded under an access type `knowledge_heat_index` does not count, whatever its scope, so that index can never rank on the reads it caused. `knowledge_get` reaches the same ids and DOES count — use it when the read is a deliberate vote rather than a step in following a list. Required: `article_id`. |
|
|
312
|
-
| `knowledge_list` | List articles (`id`, `title`, `category`, `status`, `tags`, `source_type`, `source_id`, timestamps), filtered + paginated. **Body-less summary by default** (safe to page up to `limit=1000`); pass `include_body: true` to also return `body`, in which case the page is bounded by a ~5 MB byte budget — continue via `meta.next_offset` while `meta.has_more`. **Lag-free, all-status** read of the DB of record — unlike `knowledge_search` (ranked, published-only, lags writes) and `knowledge_index` (id/title/category only). The right tool to enumerate/dedup/repair and for idempotency/existence checks: filter by `tags`, `source_type`+`source_id`, or `idempotency_key` and read `meta.total_count` (exact) — `idempotency_key` is a FILTER only and is never returned in a row, so you check a key you already hold. Single full body → `knowledge_get`; relevant bodies → `knowledge_context`; bulk dump → `knowledge_export`. Optional: `project_id`, `category`, `status`, `tags`, `source_type`, `source_id`, `idempotency_key`, `offset`, `limit`, `include_body`. Carries `meta.outcome`; on this lag-free enumeration path `empty` is load-bearing — the filtered set is genuinely empty, not missed by a ranker (a page past the end reads `success`). |
|
|
312
|
+
| `knowledge_list` | List articles (`id`, `title`, `category`, `status`, `tags`, `source_type`, `source_id`, timestamps), filtered + paginated. **Body-less summary by default** (safe to page up to `limit=1000`); pass `include_body: true` to also return `body`, in which case the page is bounded by a ~5 MB byte budget — continue via `meta.next_offset` while `meta.has_more`. **Lag-free, all-status** read of the DB of record (suppressed articles are excluded, matching `knowledge_index` — except on an `idempotency_key` filter, which is an identity check and still sees them) — unlike `knowledge_search` (ranked, published-only, lags writes) and `knowledge_index` (id/title/category only). The right tool to enumerate/dedup/repair and for idempotency/existence checks: filter by `tags`, `source_type`+`source_id`, or `idempotency_key` and read `meta.total_count` (exact) — `idempotency_key` is a FILTER only and is never returned in a row, so you check a key you already hold. Pass `suppressed: "include"` when a repair pass must see the whole table, or `"only"` to list what there is to undo. Single full body → `knowledge_get`; relevant bodies → `knowledge_context`; bulk dump → `knowledge_export`. Optional: `project_id`, `category`, `status`, `tags`, `source_type`, `source_id`, `idempotency_key`, `offset`, `limit`, `include_body`, `suppressed`. Carries `meta.outcome`; on this lag-free enumeration path `empty` is load-bearing — the filtered set is genuinely empty, not missed by a ranker (a page past the end reads `success`). |
|
|
313
313
|
| `knowledge_get` | Get full article content by ID. Use after search to read an article in detail. Resolves tenant-owned articles **and published system canonicals**, and records a COUNTED read (it feeds `knowledge_heat_index`) — reach for `knowledge_progressive_drill` instead when you are merely following an index this system just produced. Each link carries only its FAR side (`article: {id, title}`, plus `similarity` when scored); both arrays are ranked (open conflicts first, then descending similarity, then oldest-first for the unscored) and capped at 25 per direction, with `links_total` / `links_truncated` reporting the truth (`count` returns both, so one cheap call tells you whether the full fetch is capped). Pass `links: "count"` or `"none"` when you only want the text — on a well-linked hub the link block is several times the body. `potential_conflicts` is returned in all three modes, itself capped at 25 with `conflicts_total` / `conflicts_truncated`. Optional: `links`, `project_id`, `story_id` for attribution. |
|
|
314
314
|
| `knowledge_context` | Get relevance-and-recency-ranked full articles for a task query. Best knowledge for your current context. **Agent-memory scoping**: `memory_types` (comma-separated, OR — observation/finding/summary/decision/question/task), `agents` (comma-separated agent_ids, OR), `conversation_id` (exact) filter on article `metadata` (JSONB `@>`). Optional: `project_id`, `story_id` for attribution, `limit`, `recency_weight`. Carries `meta.outcome`, so an empty context pack is distinguishable from one whose underlying search fell back to keyword-only. |
|
|
315
315
|
| `knowledge_graph` | Multi-hop traversal of the published article-link graph from `article_id` (depth 1–3, default 1), **bounded to agent's visible articles**. Agent callers see only their own and `shared` articles. Bidirectional, cycle-safe, bounded to 100 nodes / 500 edges (`truncated` flags a cap). Returns `nodes` (`id`/`title`/`category`/`depth`) + `edges` (`source_article_id`/`target_article_id`/`relationship_type`). Explore typed connections beyond `knowledge_context`'s 1-hop links. Required: `article_id`. Optional: `depth`, `project_id`. |
|
|
@@ -354,6 +354,8 @@ it is enforced server-side and a no-op for a non-superadmin key — see below.)
|
|
|
354
354
|
| `knowledge_unpublish` | **Requires `LOOPCTL_USER_KEY`.** Revert a published article back to draft (hidden from search/context, not deleted). Required: `article_id`. |
|
|
355
355
|
| `knowledge_bulk_unpublish` | **Requires `LOOPCTL_USER_KEY`.** Revert published articles to draft in bulk, partial-success style (mirror of `knowledge_bulk_publish`): per-id `unpublished`/`skipped` (already draft, or archived/superseded)/`not_found`/`errored`. No 100-id cap (auto-chunked, ≤5000); duplicates ignored; safe to retry. Not deleted (re-publish to restore; `knowledge_bulk_delete` to archive). `meta.count`/`meta.counts`/`meta.results` give the breakdown. Required: `article_ids` (array). |
|
|
356
356
|
| `knowledge_archive` | Soft-delete an article (draft or published). Row retained for audit; hidden from all reads. **NOT reversible by you** — `:archived` is a TERMINAL status (no unarchive call, no outbound transition), so restoring one needs a user-role PATCH with an explicit status. Nothing is destroyed, but do not reach for this as an undoable action: for a retraction you can undo, use `knowledge_unpublish` and `knowledge_publish`. Agent role — KB-content curation, visibility-scoped (another agent's private/owner memory 404s). Required: `article_id`. |
|
|
357
|
+
| `knowledge_suppress` | Take an article OUT OF RETRIEVAL without changing its status, **reversibly** — the tombstone. Status stays `published`; body, embedding and links are untouched; the article is STILL readable by id with `knowledge_get`, which renders `suppressed_at`/`suppressed_by`/`suppression_reason`. It disappears from `knowledge_search`, `knowledge_hybrid_search`, `knowledge_context`, `/recall`, `knowledge_progressive_index`, `knowledge_heat_index`, suggested links, `knowledge_graph`, `knowledge_walk`, the novelty priors and the nightly consolidation scans. Pick between the three retraction verbs by what you need afterwards: **suppress** = undoable and says nothing about status, **`knowledge_unpublish`** = undoable but claims the article is a draft, **`knowledge_archive`/`knowledge_delete`** = not undoable by any call you can make. Re-suppressing is an idempotent no-op that keeps the ORIGINAL actor and reason. Agent role, visibility-scoped. Required: `article_id`, `reason` (non-blank, <=500 chars). |
|
|
358
|
+
| `knowledge_unsuppress` | Lift a retrieval suppression — the inverse of `knowledge_suppress`. Restores the article to every read path immediately; nothing is re-embedded or re-linked because suppression never touched them. A no-op on an article that is not suppressed. Does NOT undo `knowledge_archive`. Agent role, visibility-scoped. Required: `article_id`. |
|
|
357
359
|
| `knowledge_delete` | Alias for `knowledge_archive` — DELETE verb on the REST API archives under the hood (soft delete: row retained and audited, but NOT reversible by any call you can make, since `:archived` is terminal — use `knowledge_unpublish` when you need an undoable retraction). Agent role. (Irreversible HARD delete is `knowledge_bulk_delete hard:true`, which stays `LOOPCTL_USER_KEY`.) Required: `article_id`. |
|
|
358
360
|
| `knowledge_bulk_delete` | **Requires `LOOPCTL_USER_KEY`.** Bulk archive (default — non-destructive, but NOT reversible by any call: `:archived` is terminal and restoring needs a user-role PATCH) or IRREVERSIBLE hard-delete by selector. Provide exactly one selector: `article_ids` (list), `source_type`+`source_id` (every active article from a source), or `tag` (every active article with the tag — high blast radius). **There is no `confirm` parameter** — a request carrying one is `400 confirm_removed`, never ignored; see the [Design invariant](#design-invariant-no-model-visible-confirmapproved-argument) below. Default = set-based soft archive (idempotent; `meta.count`=archived, `meta.counts`/`meta.results` give the breakdown; ≤5000); `article_ids` and `source` archive immediately. **Two-step** (the `tag` archive, and every hard delete): `dry_run:true` mutates nothing and returns `meta.would_affect` plus a single-use, TTL-bounded `meta.token` frozen over the previewed id-set; call again with the same selector plus that token to run the op over the FROZEN set — the selector is CHECKED, so a token minted for one tag is `400` on a call naming another. A call with neither is `400` (`dry_run_required` on the tag archive) unless the selector matches nothing, which stays a `200` no-op on either path. The archive and delete flows mint DIFFERENT token types, so an archive proposal is not spendable as a delete or the reverse. Oversized selectors get `meta.oversized`+`meta.confirm_hash` instead of a token — echo the hash back with the same selector and the server refuses on any drift; that hash is keyed on the op, so it does not cross flows either. Hard delete is FK-correct (links first, access events cascade). |
|
|
359
361
|
| `knowledge_drafts` | List draft (unpublished) knowledge articles with pagination. Optional: `limit` (default 20, max 1000 — over-max → 400, no silent clamp), `offset` (default 0), `project_id`. Returns `meta.total_count`. |
|
package/index.js
CHANGED
|
@@ -1337,7 +1337,7 @@ async function setTokenBudget({ scope_type, scope_id, budget_millicents, alert_t
|
|
|
1337
1337
|
|
|
1338
1338
|
// --- Knowledge Wiki Tools (agent key) ---
|
|
1339
1339
|
|
|
1340
|
-
async function knowledgeIndex({ project_id, story_id, category, tags, match, offset, limit, fields }) {
|
|
1340
|
+
async function knowledgeIndex({ project_id, story_id, category, tags, match, offset, limit, fields, suppressed }) {
|
|
1341
1341
|
if (project_id && !UUID_RE.test(project_id)) {
|
|
1342
1342
|
return {
|
|
1343
1343
|
content: [{ type: "text", text: "Error: project_id must be a canonical UUID (8-4-4-4-12 hex)." }],
|
|
@@ -1355,6 +1355,7 @@ async function knowledgeIndex({ project_id, story_id, category, tags, match, off
|
|
|
1355
1355
|
if (offset != null) params.set("offset", String(offset));
|
|
1356
1356
|
if (limit != null) params.set("limit", String(limit));
|
|
1357
1357
|
if (fields) params.set("fields", Array.isArray(fields) ? fields.join(",") : fields);
|
|
1358
|
+
if (suppressed) params.set("suppressed", suppressed);
|
|
1358
1359
|
const qs = params.toString();
|
|
1359
1360
|
const path = qs ? `${basePath}?${qs}` : basePath;
|
|
1360
1361
|
const result = await apiCall("GET", path, null, process.env.LOOPCTL_AGENT_KEY);
|
|
@@ -1644,6 +1645,7 @@ async function knowledgeList({
|
|
|
1644
1645
|
limit,
|
|
1645
1646
|
offset,
|
|
1646
1647
|
include_body,
|
|
1648
|
+
suppressed,
|
|
1647
1649
|
}) {
|
|
1648
1650
|
const params = new URLSearchParams();
|
|
1649
1651
|
if (project_id) params.set("project_id", project_id);
|
|
@@ -1659,6 +1661,11 @@ async function knowledgeList({
|
|
|
1659
1661
|
// Body-less summary by default (safe to enumerate large pages); opt into full
|
|
1660
1662
|
// bodies (byte-budget bounded server-side) with include_body: true.
|
|
1661
1663
|
if (include_body === true) params.set("include_body", "true");
|
|
1664
|
+
// Sent only when the caller asked. The server's default is per-filter — exclude
|
|
1665
|
+
// everywhere except an idempotency_key lookup, which includes suppressed rows so an
|
|
1666
|
+
// identity check cannot mint a duplicate — and sending a computed "exclude" on every
|
|
1667
|
+
// call would overwrite that.
|
|
1668
|
+
if (suppressed) params.set("suppressed", suppressed);
|
|
1662
1669
|
|
|
1663
1670
|
const result = await apiCall(
|
|
1664
1671
|
"GET",
|
|
@@ -2012,6 +2019,29 @@ async function knowledgeArchive({ article_id }) {
|
|
|
2012
2019
|
return toContent(result);
|
|
2013
2020
|
}
|
|
2014
2021
|
|
|
2022
|
+
// The REVERSIBLE retrieval tombstone. Agent-role KB curation like archive, but it is the
|
|
2023
|
+
// one member of that family that undoes: nothing is destroyed and nothing is rebuilt, so
|
|
2024
|
+
// knowledge_unsuppress restores the article to every read path immediately.
|
|
2025
|
+
async function knowledgeSuppress({ article_id, reason }) {
|
|
2026
|
+
const result = await apiCall(
|
|
2027
|
+
"POST",
|
|
2028
|
+
`/api/v1/articles/${article_id}/suppress`,
|
|
2029
|
+
{ reason },
|
|
2030
|
+
process.env.LOOPCTL_AGENT_KEY
|
|
2031
|
+
);
|
|
2032
|
+
return toContent(result);
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
async function knowledgeUnsuppress({ article_id }) {
|
|
2036
|
+
const result = await apiCall(
|
|
2037
|
+
"POST",
|
|
2038
|
+
`/api/v1/articles/${article_id}/unsuppress`,
|
|
2039
|
+
null,
|
|
2040
|
+
process.env.LOOPCTL_AGENT_KEY
|
|
2041
|
+
);
|
|
2042
|
+
return toContent(result);
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2015
2045
|
// #331: soft-delete (archive) is agent-role KB curation, same as knowledge_archive.
|
|
2016
2046
|
async function knowledgeDelete({ article_id }) {
|
|
2017
2047
|
const result = await apiCall(
|
|
@@ -4370,10 +4400,29 @@ const TOOLS = [
|
|
|
4370
4400
|
type: "array",
|
|
4371
4401
|
items: {
|
|
4372
4402
|
type: "string",
|
|
4373
|
-
enum: [
|
|
4403
|
+
enum: [
|
|
4404
|
+
"id",
|
|
4405
|
+
"title",
|
|
4406
|
+
"category",
|
|
4407
|
+
"tags",
|
|
4408
|
+
"status",
|
|
4409
|
+
"updated_at",
|
|
4410
|
+
"suppressed_at",
|
|
4411
|
+
"suppressed_by",
|
|
4412
|
+
"suppression_reason",
|
|
4413
|
+
],
|
|
4374
4414
|
},
|
|
4375
4415
|
description:
|
|
4376
|
-
"Optional: projection of article fields to return. Default: id, title, category. `id` is always included."
|
|
4416
|
+
"Optional: projection of article fields to return. Default: id, title, category. `id` is always included. " +
|
|
4417
|
+
"Pair suppressed='only' with fields=suppressed_by,suppression_reason to see who suppressed what and why without a per-row read.",
|
|
4418
|
+
},
|
|
4419
|
+
suppressed: {
|
|
4420
|
+
type: "string",
|
|
4421
|
+
enum: ["exclude", "include", "only"],
|
|
4422
|
+
description:
|
|
4423
|
+
"Optional: how to treat RETRIEVAL-SUPPRESSED articles — 'exclude' (default), 'include', or " +
|
|
4424
|
+
"'only'. 'only' is the discovery path: it lists exactly what there is to undo with " +
|
|
4425
|
+
"knowledge_unsuppress, across every status. An unrecognised value resolves to 'exclude'.",
|
|
4377
4426
|
},
|
|
4378
4427
|
},
|
|
4379
4428
|
required: [],
|
|
@@ -4396,7 +4445,11 @@ const TOOLS = [
|
|
|
4396
4445
|
"`meta.total_count` (exact) to answer \"does an article for X already exist?\" reliably " +
|
|
4397
4446
|
"right after a write — `idempotency_key` is a FILTER only and is never returned in a " +
|
|
4398
4447
|
"row, so you check a key you already hold rather than reading back the keys other " +
|
|
4399
|
-
"callers chose.
|
|
4448
|
+
"callers chose. Suppressed articles are EXCLUDED here (matching knowledge_index) except " +
|
|
4449
|
+
"on an `idempotency_key` filter, which is an identity check on a key you already hold " +
|
|
4450
|
+
"and still sees them — so the existence check stays true about the row a create would " +
|
|
4451
|
+
"dedup against. Pass `suppressed: 'include'` when a repair pass must see the whole " +
|
|
4452
|
+
"table, or `'only'` to list what there is to undo. Paginate via offset/limit.",
|
|
4400
4453
|
inputSchema: {
|
|
4401
4454
|
type: "object",
|
|
4402
4455
|
properties: {
|
|
@@ -4456,6 +4509,17 @@ const TOOLS = [
|
|
|
4456
4509
|
"rows); continue via meta.next_offset while meta.has_more is true. Leave false to " +
|
|
4457
4510
|
"enumerate metadata cheaply at scale.",
|
|
4458
4511
|
},
|
|
4512
|
+
suppressed: {
|
|
4513
|
+
type: "string",
|
|
4514
|
+
enum: ["exclude", "include", "only"],
|
|
4515
|
+
description:
|
|
4516
|
+
"Optional: how to treat RETRIEVAL-SUPPRESSED articles — 'exclude' (the default on " +
|
|
4517
|
+
"every filter but idempotency_key), 'include', or 'only'. Pass 'include' when a " +
|
|
4518
|
+
"repair or audit pass must see the whole table, and 'only' to list exactly what " +
|
|
4519
|
+
"there is to undo with knowledge_unsuppress. Omit it to keep the per-filter " +
|
|
4520
|
+
"default. The body-less rows do NOT carry the three suppressed_* fields — pair " +
|
|
4521
|
+
"with include_body: true, or read knowledge_get, to see who suppressed what and why.",
|
|
4522
|
+
},
|
|
4459
4523
|
},
|
|
4460
4524
|
required: [],
|
|
4461
4525
|
},
|
|
@@ -5678,6 +5742,69 @@ const TOOLS = [
|
|
|
5678
5742
|
required: ["article_id"],
|
|
5679
5743
|
},
|
|
5680
5744
|
},
|
|
5745
|
+
{
|
|
5746
|
+
name: "knowledge_suppress",
|
|
5747
|
+
description:
|
|
5748
|
+
"Take an article OUT OF RETRIEVAL without changing its status — reversibly. This is " +
|
|
5749
|
+
"the tool to reach for when an article is wrong, superseded, noisy or no longer " +
|
|
5750
|
+
"wanted in results, but you might want it back. The article stays `published`, keeps " +
|
|
5751
|
+
"its body, embedding and links, and is STILL readable by id with knowledge_get " +
|
|
5752
|
+
"(which renders suppressed_at / suppressed_by / suppression_reason) — that is what " +
|
|
5753
|
+
"makes the act inspectable and undoable. It disappears from knowledge_search, " +
|
|
5754
|
+
"knowledge_hybrid_search, knowledge_context, /recall, knowledge_progressive_index, " +
|
|
5755
|
+
"knowledge_heat_index, suggested links, knowledge_graph, knowledge_walk, the novelty " +
|
|
5756
|
+
"priors and the nightly consolidation scans. " +
|
|
5757
|
+
"Undo with knowledge_unsuppress; nothing was destroyed, so nothing is rebuilt. " +
|
|
5758
|
+
"Choose between the three retraction verbs by what you need afterwards: " +
|
|
5759
|
+
"knowledge_suppress (undoable, status untouched, the article is simply not retrieved), " +
|
|
5760
|
+
"knowledge_unpublish (undoable, but it says the article is a DRAFT — an editorial " +
|
|
5761
|
+
"claim), knowledge_archive/knowledge_delete (NOT undoable by any call you can make: " +
|
|
5762
|
+
"`:archived` is terminal). " +
|
|
5763
|
+
"A reason is REQUIRED — a tombstone that does not record why is not inspectable. " +
|
|
5764
|
+
"Re-suppressing an already-suppressed article is an idempotent no-op that KEEPS the " +
|
|
5765
|
+
"original actor and reason; to change a recorded reason, unsuppress and suppress " +
|
|
5766
|
+
"again, which records both acts. " +
|
|
5767
|
+
"Agent role. Visibility-scoped: you can only suppress an article you can see, so " +
|
|
5768
|
+
"another agent's private/owner memory returns 404.",
|
|
5769
|
+
inputSchema: {
|
|
5770
|
+
type: "object",
|
|
5771
|
+
properties: {
|
|
5772
|
+
article_id: {
|
|
5773
|
+
type: "string",
|
|
5774
|
+
description: "The UUID of the article to take out of retrieval.",
|
|
5775
|
+
},
|
|
5776
|
+
reason: {
|
|
5777
|
+
type: "string",
|
|
5778
|
+
description:
|
|
5779
|
+
"Why this article should stop being retrieved. Required and non-blank; " +
|
|
5780
|
+
"bounded at 500 characters. Recorded on the row and in the audit log, and " +
|
|
5781
|
+
"returned by knowledge_get, so write it for whoever decides later whether to " +
|
|
5782
|
+
"undo this.",
|
|
5783
|
+
},
|
|
5784
|
+
},
|
|
5785
|
+
required: ["article_id", "reason"],
|
|
5786
|
+
},
|
|
5787
|
+
},
|
|
5788
|
+
{
|
|
5789
|
+
name: "knowledge_unsuppress",
|
|
5790
|
+
description:
|
|
5791
|
+
"Lift a retrieval suppression: the inverse of knowledge_suppress. Clears the " +
|
|
5792
|
+
"tombstone and restores the article to search, context, /recall, the indexes, the " +
|
|
5793
|
+
"graph and the link surfaces immediately — nothing has to be re-embedded or " +
|
|
5794
|
+
"re-linked, because suppression never touched any of it. Unsuppressing an article " +
|
|
5795
|
+
"that is not suppressed is a harmless no-op. Agent role, visibility-scoped. " +
|
|
5796
|
+
"This does NOT undo knowledge_archive or knowledge_delete, which are terminal.",
|
|
5797
|
+
inputSchema: {
|
|
5798
|
+
type: "object",
|
|
5799
|
+
properties: {
|
|
5800
|
+
article_id: {
|
|
5801
|
+
type: "string",
|
|
5802
|
+
description: "The UUID of the article to restore to retrieval.",
|
|
5803
|
+
},
|
|
5804
|
+
},
|
|
5805
|
+
required: ["article_id"],
|
|
5806
|
+
},
|
|
5807
|
+
},
|
|
5681
5808
|
{
|
|
5682
5809
|
name: "knowledge_delete",
|
|
5683
5810
|
description:
|
|
@@ -7922,6 +8049,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
7922
8049
|
case "knowledge_archive":
|
|
7923
8050
|
return await knowledgeArchive(args);
|
|
7924
8051
|
|
|
8052
|
+
case "knowledge_suppress":
|
|
8053
|
+
return await knowledgeSuppress(args);
|
|
8054
|
+
|
|
8055
|
+
case "knowledge_unsuppress":
|
|
8056
|
+
return await knowledgeUnsuppress(args);
|
|
8057
|
+
|
|
7925
8058
|
case "knowledge_delete":
|
|
7926
8059
|
return await knowledgeDelete(args);
|
|
7927
8060
|
|