@integrity-labs/agt-cli 0.28.1199 → 0.28.1201

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/mcp/index.js CHANGED
@@ -22443,6 +22443,34 @@ function kanbanAddResultText(data, submittedTitle, status) {
22443
22443
  ${first.duplicate_hint}` : added;
22444
22444
  }
22445
22445
 
22446
+ // src/knowledge-list-format.ts
22447
+ var KNOWLEDGE_LIST_PAGE_SIZE = 500;
22448
+ function knowledgeListRequest(agentId, offset) {
22449
+ return { agent_id: agentId, offset: offset ?? 0, limit: KNOWLEDGE_LIST_PAGE_SIZE };
22450
+ }
22451
+ function formatKnowledgeList(data, offset = 0) {
22452
+ const total = data.total_count;
22453
+ if (!data.items.length) {
22454
+ if (offset > 0) return `No entries at offset ${offset}${total === void 0 ? "" : `: there are ${total} in total`}.`;
22455
+ return "No knowledge entries yet.";
22456
+ }
22457
+ const lines = data.items.map((k) => {
22458
+ const inactive = k.is_active ? "" : " (inactive)";
22459
+ return `- [${k.scope ?? "team"}] ${k.title}${inactive} [${k.source_type}, id: ${k.id}]`;
22460
+ });
22461
+ if (total === void 0) {
22462
+ lines.push("", "This list may be incomplete: the API did not report a total.");
22463
+ } else if (typeof data.next_offset === "number") {
22464
+ lines.push(
22465
+ "",
22466
+ `PARTIAL LIST: entries ${offset + 1}-${offset + data.items.length} of ${total}. Call knowledge_list with offset ${data.next_offset} for the next page. Finish listing before you add or delete entries: a change while paging shifts later pages, so one can be skipped or repeated.`
22467
+ );
22468
+ } else if (offset > 0) {
22469
+ lines.push("", `End of the list: entries ${offset + 1}-${offset + data.items.length} of ${total}.`);
22470
+ }
22471
+ return lines.join("\n");
22472
+ }
22473
+
22446
22474
  // src/assign-project-text.ts
22447
22475
  var TOOL = {
22448
22476
  artefact: { tool: "artefacts_assign_project", idArg: "artefact_id" },
@@ -52218,20 +52246,13 @@ server.tool(
52218
52246
  );
52219
52247
  server.tool(
52220
52248
  "knowledge_list",
52221
- "The INDEX of your knowledge base: every entry visible to this agent, team-scoped and organization-scoped, as scope + title + source type + id. Call it when you need to know WHAT you know \u2014 including when a question sounds like it should be covered but you are not sure an entry exists. Returns titles and metadata only, no bodies. To read the CONTENT of an entry, call context_search (semantic; searches content across knowledge + memories + tasks). knowledge_search matches titles and slugs ONLY and never reads entry contents, so it cannot retrieve a body \u2014 reach for it only when you already know a title or slug. Also use it before knowledge_add to avoid duplicates, and before knowledge_update/delete to find the target id AND its scope (you must pass the same scope back).",
52222
- {},
52223
- async () => {
52224
- const data = await apiPost("/host/my-knowledge", {
52225
- agent_id: AGT_AGENT_ID
52226
- });
52227
- if (!data.items.length) {
52228
- return { content: [{ type: "text", text: "No knowledge entries yet." }] };
52229
- }
52230
- const lines = data.items.map((k) => {
52231
- const inactive = k.is_active ? "" : " (inactive)";
52232
- return `- [${k.scope ?? "team"}] ${k.title}${inactive} [${k.source_type}, id: ${k.id}]`;
52233
- });
52234
- return { content: [{ type: "text", text: lines.join("\n") }] };
52249
+ "The INDEX of your knowledge base: every entry visible to this agent, team-scoped and organization-scoped, as scope + title + source type + id. Call it when you need to know WHAT you know \u2014 including when a question sounds like it should be covered but you are not sure an entry exists. Returns titles and metadata only, no bodies, and a long index comes in pages: a partial reply says so and gives the offset for the next page, so keep going if you need all of it, and finish listing before you add or delete entries, which shift later pages. To read the CONTENT of an entry, call context_search (semantic; searches content across knowledge + memories + tasks). knowledge_search matches titles and slugs ONLY and never reads entry contents, so it cannot retrieve a body \u2014 reach for it only when you already know a title or slug. Also use it before knowledge_add to avoid duplicates, and before knowledge_update/delete to find the target id AND its scope (you must pass the same scope back).",
52250
+ {
52251
+ offset: external_exports.number().int().min(0).optional().describe("Where to start. Only pass the offset a previous partial list told you to use.")
52252
+ },
52253
+ async ({ offset }) => {
52254
+ const data = await apiPost("/host/my-knowledge", knowledgeListRequest(AGT_AGENT_ID, offset));
52255
+ return { content: [{ type: "text", text: formatKnowledgeList(data, offset) }] };
52235
52256
  }
52236
52257
  );
52237
52258
  server.tool(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.1199",
3
+ "version": "0.28.1201",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {