agentic-comments 0.6.0 → 0.6.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 CHANGED
@@ -215,13 +215,13 @@ npx agentic-comments accept <id>
215
215
  and a flag that does not apply to a command is refused. `AGENTIC_COMMENTS_LOCK_TIMEOUT_MS` sets the wait
216
216
  for a lock, in whole milliseconds.
217
217
  - `npx agentic-comments mcp` (or the `agentic-comments-mcp` binary, which reads the same environment) starts
218
- the MCP server on stdio. The operator fixes the principal and the
218
+ the MCP server on stdio. If `AGENTIC_COMMENTS_AS` is missing, the server prints one error line that names it and exits with code 1. The operator fixes the principal and the
219
219
  scopes when the server starts. No tool takes an author or a scope. A call with any key a tool does not list is refused, so an agent
220
220
  cannot pick its own kind or rights. Tools: `list_threads`, `get_thread`, `add_comment`, `reply_to_thread`, `resolve_thread`,
221
221
  `reopen_thread`, `relocate_thread`, `edit_message`, `delete_message`, `delete_thread`, `export_person`,
222
222
  `erase_person`, `list_suggestions`, `suggest_change`, `accept_suggestion`, `reject_suggestion`.
223
- Another person's message, thread, or data needs `comments:moderate` in `AGENTIC_COMMENTS_SCOPES`. The delete
224
- tools and `erase_person` carry the destructive hint.
223
+ Another person's message, thread, or data needs `comments:moderate` in `AGENTIC_COMMENTS_SCOPES`. The
224
+ `edit_message`, `delete_message`, `delete_thread`, and `erase_person` tools carry the destructive hint.
225
225
  - A text change is `{"replace": "new text"}`. A change for a cell, slide, or canvas anchor is
226
226
  `{"value": <JSON>}`.
227
227
  - From code: `import { FileStore, CommentsService, operatorActor } from "agentic-comments/local"`.
@@ -248,7 +248,10 @@ import { PrincipalParseError, parsePrincipal } from "agentic-identity";
248
248
  function operatorActor(as, scopes) {
249
249
  const value = as?.trim();
250
250
  const cut = value === void 0 ? -1 : value.indexOf(":");
251
- if (value === void 0 || cut < 1 || cut === value.length - 1) {
251
+ if (value === void 0 || value === "") {
252
+ throw new CommentsError("INVALID_AUTHOR", `no principal: set AGENTIC_COMMENTS_AS=kind:name (or pass --as), for example agent_of_human:scribe. Kinds: ${PRINCIPAL_KINDS.join(", ")}`);
253
+ }
254
+ if (cut < 1 || cut === value.length - 1) {
252
255
  throw new CommentsError("INVALID_AUTHOR", `set the principal as kind:name, for example human:ada. Kinds: ${PRINCIPAL_KINDS.join(", ")}`);
253
256
  }
254
257
  const list = scopes === void 0 || scopes.trim() === "" ? [] : scopes.split(",").map((s) => s.trim());
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  import { createRequire } from "module";
3
- var VERSION = true ? "0.6.0" : readPackageVersion();
3
+ var VERSION = true ? "0.6.1" : readPackageVersion();
4
4
 
5
5
  export {
6
6
  VERSION
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-ES3NZ7SX.js";
3
+ } from "./chunk-H6JK62SP.js";
4
4
  import {
5
5
  CommentsService
6
6
  } from "./chunk-T77DPNIV.js";
package/dist/cli.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  FileStore,
4
4
  lockTimeoutFrom,
5
5
  operatorActor
6
- } from "./chunk-2NBFTJ47.js";
6
+ } from "./chunk-6N53KQVU.js";
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-ES3NZ7SX.js";
9
+ } from "./chunk-H6JK62SP.js";
10
10
  import {
11
11
  CommentsService,
12
12
  TEXT_ROOT
@@ -69,6 +69,8 @@ function parseArgs(argv) {
69
69
  if (command === void 0 || command === "--help" || command === "-h") return { command: "help", flags: {}, many: {} };
70
70
  if (command === "--version" || command === "-V") return { command: "version", flags: {}, many: {} };
71
71
  if (!COMMANDS.includes(command)) throw new UsageError(`unknown command "${command}"`);
72
+ if (command === "mcp" && rest.some((a) => a === "--help" || a === "-h")) return { command: "help", flags: {}, many: {} };
73
+ if (command === "mcp" && rest.some((a) => a === "--version" || a === "-V" || a === "-v")) return { command: "version", flags: {}, many: {} };
72
74
  const parsed = { command, flags: {}, many: {} };
73
75
  for (let i = 0; i < rest.length; i++) {
74
76
  const arg = rest[i];
@@ -176,7 +178,7 @@ async function runCli(argv, io) {
176
178
  return 0;
177
179
  }
178
180
  if (p.command === "mcp") {
179
- const { startMcp } = await import("./mcp-JX5L6VQW.js");
181
+ const { startMcp } = await import("./mcp-WBAHKMF4.js");
180
182
  await startMcp(store, operatorActor(p.flags["--as"] ?? io.env.AGENTIC_COMMENTS_AS, io.env.AGENTIC_COMMENTS_SCOPES));
181
183
  return 0;
182
184
  }
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-ES3NZ7SX.js";
3
+ } from "./chunk-H6JK62SP.js";
4
4
  import {
5
5
  ACCEPT_SCOPE,
6
6
  Actor,
package/dist/local.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  MAX_FILE,
4
4
  lockTimeoutFrom,
5
5
  operatorActor
6
- } from "./chunk-2NBFTJ47.js";
6
+ } from "./chunk-6N53KQVU.js";
7
7
  import {
8
8
  CommentsService,
9
9
  TEXT_ROOT,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createMcpServer,
3
3
  startMcp
4
- } from "./chunk-SR2A5OZW.js";
5
- import "./chunk-ES3NZ7SX.js";
4
+ } from "./chunk-UNJL3N2L.js";
5
+ import "./chunk-H6JK62SP.js";
6
6
  import "./chunk-T77DPNIV.js";
7
7
  import "./chunk-VAVKBAHM.js";
8
8
  export {
package/dist/mcp-bin.js CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  FileStore,
4
4
  lockTimeoutFrom,
5
5
  operatorActor
6
- } from "./chunk-2NBFTJ47.js";
6
+ } from "./chunk-6N53KQVU.js";
7
7
  import {
8
8
  startMcp
9
- } from "./chunk-SR2A5OZW.js";
9
+ } from "./chunk-UNJL3N2L.js";
10
10
  import {
11
11
  VERSION
12
- } from "./chunk-ES3NZ7SX.js";
12
+ } from "./chunk-H6JK62SP.js";
13
13
  import "./chunk-T77DPNIV.js";
14
14
  import "./chunk-VAVKBAHM.js";
15
15
 
@@ -27,7 +27,7 @@ Usage: agentic-comments-mcp [--help | --version]`;
27
27
  var args = process.argv.slice(2);
28
28
  if (args.includes("--help") || args.includes("-h")) {
29
29
  console.log(MCP_HELP);
30
- } else if (args.includes("--version") || args.includes("-v")) {
30
+ } else if (args.includes("--version") || args.includes("-V") || args.includes("-v")) {
31
31
  console.log(VERSION);
32
32
  } else {
33
33
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-comments",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Comment threads and suggestions anchored to any content, from people and agents.",
5
5
  "keywords": [
6
6
  "comments",
@@ -76,9 +76,9 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@modelcontextprotocol/sdk": "^1.32.2",
79
- "agentic-identity": "^0.7.0",
79
+ "agentic-identity": "^0.8.0",
80
80
  "hono": "^4.13.14",
81
- "zod": "^3.25.76"
81
+ "zod": "^4.6.7"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "yjs": "^13.6.0"