borgmcp 3.15.2 → 3.16.1
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 +2 -0
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/docs-sections.d.ts.map +1 -1
- package/dist/docs-sections.js +8 -0
- package/dist/docs-sections.js.map +1 -1
- package/dist/document-render.d.ts +6 -0
- package/dist/document-render.d.ts.map +1 -0
- package/dist/document-render.js +34 -0
- package/dist/document-render.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -2
- package/dist/index.js.map +1 -1
- package/dist/log-stream.d.ts +2 -1
- package/dist/log-stream.d.ts.map +1 -1
- package/dist/log-stream.js +16 -3
- package/dist/log-stream.js.map +1 -1
- package/dist/regen-format.d.ts.map +1 -1
- package/dist/regen-format.js +6 -1
- package/dist/regen-format.js.map +1 -1
- package/dist/remote-client.d.ts +6 -1
- package/dist/remote-client.d.ts.map +1 -1
- package/dist/remote-client.js +41 -7
- package/dist/remote-client.js.map +1 -1
- package/dist/server-handshake.d.ts +4 -3
- package/dist/server-handshake.d.ts.map +1 -1
- package/dist/server-handshake.js.map +1 -1
- package/dist/tool-manifest.d.ts.map +1 -1
- package/dist/tool-manifest.js +65 -2
- package/dist/tool-manifest.js.map +1 -1
- package/docs/DOCUMENTS.md +49 -0
- package/docs/RELEASING.md +2 -2
- package/package.json +2 -2
- package/src/docs-sections.ts +8 -0
- package/src/document-render.ts +41 -0
- package/src/index.ts +44 -1
- package/src/log-stream.ts +21 -3
- package/src/regen-format.ts +6 -1
- package/src/remote-client.ts +108 -15
- package/src/server-handshake.ts +4 -3
- package/src/tool-manifest.ts +69 -2
package/src/tool-manifest.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* CONTRACT-BACKED DATA — imports only published scalar contract constants, with
|
|
8
8
|
* no client runtime side effects.
|
|
9
9
|
*/
|
|
10
|
-
import { DECISION_TEXT_MAX_BYTES } from 'borgmcp-shared/protocol';
|
|
10
|
+
import { DECISION_TEXT_MAX_BYTES, DOCUMENT_CONTENT_TYPES } from 'borgmcp-shared/protocol';
|
|
11
11
|
|
|
12
12
|
export interface ToolManifestEntry {
|
|
13
13
|
name: string;
|
|
@@ -307,10 +307,69 @@ export const TOOL_MANIFEST: ToolManifestEntry[] = [
|
|
|
307
307
|
},
|
|
308
308
|
},
|
|
309
309
|
},
|
|
310
|
+
{
|
|
311
|
+
name: 'borg_put-document',
|
|
312
|
+
description:
|
|
313
|
+
'Create an immutable cube document containing Markdown or plain text. Use this for durable material that is too large or detailed for an activity-log message. Pass `supersedes` with the full prior document id to create its next linear revision; content is never edited in place. Requires the selected local client to have a live cube-write or cube-manage grant.',
|
|
314
|
+
inputSchema: {
|
|
315
|
+
type: 'object',
|
|
316
|
+
properties: {
|
|
317
|
+
title: {
|
|
318
|
+
type: 'string',
|
|
319
|
+
maxLength: 120,
|
|
320
|
+
description: 'Document title, trimmed and control-free; max 120 Unicode characters and 480 UTF-8 bytes.',
|
|
321
|
+
},
|
|
322
|
+
content_type: {
|
|
323
|
+
type: 'string',
|
|
324
|
+
enum: [...DOCUMENT_CONTENT_TYPES],
|
|
325
|
+
description: 'Exact document content type: text/markdown or text/plain.',
|
|
326
|
+
},
|
|
327
|
+
content: {
|
|
328
|
+
type: 'string',
|
|
329
|
+
description: 'Immutable document content. The server enforces its configured UTF-8 byte limit.',
|
|
330
|
+
},
|
|
331
|
+
supersedes: {
|
|
332
|
+
type: 'string',
|
|
333
|
+
description: 'Optional full opaque id of the active document this new revision supersedes.',
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
required: ['title', 'content_type', 'content'],
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'borg_get-document',
|
|
341
|
+
description:
|
|
342
|
+
'Fetch one cube document by its full opaque id, including immutable content, revision links, state, author, and removal audit metadata. Exact-id reads retain removed content for audit. Requires a live cube-read, cube-write, or cube-manage grant.',
|
|
343
|
+
inputSchema: {
|
|
344
|
+
type: 'object',
|
|
345
|
+
properties: {
|
|
346
|
+
id: { type: 'string', description: 'Full opaque document id. Do not abbreviate it.' },
|
|
347
|
+
},
|
|
348
|
+
required: ['id'],
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: 'borg_list-documents',
|
|
353
|
+
description:
|
|
354
|
+
'List active and superseded document metadata in the current cube. Removed documents are omitted; use borg_get-document with an exact known id for retained audit content. Document bodies are not included.',
|
|
355
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: 'borg_remove-document',
|
|
359
|
+
description:
|
|
360
|
+
'Mark one cube document removed while retaining its immutable content and audit metadata. The server permits the document author or a client with a live cube-manage grant; workflow role labels grant no permission. Idempotent for an already removed document.',
|
|
361
|
+
inputSchema: {
|
|
362
|
+
type: 'object',
|
|
363
|
+
properties: {
|
|
364
|
+
id: { type: 'string', description: 'Full opaque document id to remove. Do not abbreviate it.' },
|
|
365
|
+
},
|
|
366
|
+
required: ['id'],
|
|
367
|
+
},
|
|
368
|
+
},
|
|
310
369
|
{
|
|
311
370
|
name: 'borg_log',
|
|
312
371
|
description:
|
|
313
|
-
'Append a message to the cube\'s activity log. By default entries broadcast to all drones. When a cube declares a message taxonomy, borg_log applies class-based smart defaults: prefix-matched directed classes route to their default recipients unless you pass `to:`, `class
|
|
372
|
+
'Append a message to the cube\'s activity log. By default entries broadcast to all drones. Cite durable cube documents by passing their full ids in `documents`; citations carry current metadata but do not inline document content. When a cube declares a message taxonomy, borg_log applies class-based smart defaults: prefix-matched directed classes route to their default recipients unless you pass `to:`, `class`, or explicit visibility. Pass `to: [...]` to direct by exact drone label, drone id, the 8-hex short-uuid (the `id:` token shown in roster/read-log — a drone_id prefix that is STABLE across label renumber), role name, or role slug.',
|
|
314
373
|
inputSchema: {
|
|
315
374
|
type: 'object',
|
|
316
375
|
properties: {
|
|
@@ -331,6 +390,14 @@ export const TOOL_MANIFEST: ToolManifestEntry[] = [
|
|
|
331
390
|
enum: ['broadcast', 'direct'],
|
|
332
391
|
description: 'Optional explicit visibility. Overrides class-based routing defaults.',
|
|
333
392
|
},
|
|
393
|
+
documents: {
|
|
394
|
+
type: 'array',
|
|
395
|
+
items: { type: 'string' },
|
|
396
|
+
minItems: 1,
|
|
397
|
+
maxItems: 100,
|
|
398
|
+
uniqueItems: true,
|
|
399
|
+
description: 'Optional full opaque ids of 1-100 same-cube documents to cite atomically. Unknown, duplicate, or foreign ids are refused.',
|
|
400
|
+
},
|
|
334
401
|
},
|
|
335
402
|
required: ['message'],
|
|
336
403
|
},
|