agentic-comments 0.8.0 → 0.8.3
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 -2
- package/dist/{chunk-6UQ6CDLJ.js → chunk-2VUY75PS.js} +1 -1
- package/dist/{chunk-J6JGWDUP.js → chunk-GHKZ6BYR.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/{mcp-IFQQHOA2.js → mcp-E5UKO5ON.js} +2 -2
- package/dist/mcp-bin.js +21 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -244,8 +244,8 @@ npx agentic-comments accept <id>
|
|
|
244
244
|
`AGENTIC_COMMENTS_SCOPES`, a comma list such as `comments:accept`. No flag takes a scope or an author,
|
|
245
245
|
and a flag that does not apply to a command is refused. `AGENTIC_COMMENTS_LOCK_TIMEOUT_MS` sets the wait
|
|
246
246
|
for a lock, in whole milliseconds.
|
|
247
|
-
- `npx agentic-comments mcp` (or the `agentic-comments-mcp` binary, which reads the same environment) starts
|
|
248
|
-
the MCP server on stdio. If `AGENTIC_COMMENTS_AS`
|
|
247
|
+
- `npx agentic-comments mcp` (or the `agentic-comments-mcp` binary, which reads the same environment and takes `--as`) starts
|
|
248
|
+
the MCP server on stdio. If neither `--as` nor `AGENTIC_COMMENTS_AS` sets the principal, the server prints one error line that names them and exits with code 1. `--as` overrides `AGENTIC_COMMENTS_AS`. The operator fixes the principal and the
|
|
249
249
|
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
|
|
250
250
|
cannot pick its own kind or rights. Tools: `list_threads`, `get_thread`, `add_comment`, `reply_to_thread`, `resolve_thread`,
|
|
251
251
|
`reopen_thread`, `relocate_thread`, `edit_message`, `delete_message`, `delete_thread`, `export_person`,
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2VUY75PS.js";
|
|
5
5
|
import {
|
|
6
6
|
FileStore,
|
|
7
7
|
lockTimeoutFrom,
|
|
@@ -178,7 +178,7 @@ async function runCli(argv, io) {
|
|
|
178
178
|
return 0;
|
|
179
179
|
}
|
|
180
180
|
if (p.command === "mcp") {
|
|
181
|
-
const { startMcp } = await import("./mcp-
|
|
181
|
+
const { startMcp } = await import("./mcp-E5UKO5ON.js");
|
|
182
182
|
await startMcp(store, operatorActor(p.flags["--as"] ?? io.env.AGENTIC_COMMENTS_AS, io.env.AGENTIC_COMMENTS_SCOPES));
|
|
183
183
|
return 0;
|
|
184
184
|
}
|
package/dist/index.js
CHANGED
package/dist/mcp-bin.js
CHANGED
|
@@ -1,38 +1,50 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
startMcp
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GHKZ6BYR.js";
|
|
5
5
|
import {
|
|
6
6
|
VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2VUY75PS.js";
|
|
8
8
|
import {
|
|
9
9
|
FileStore,
|
|
10
10
|
lockTimeoutFrom,
|
|
11
11
|
operatorActor
|
|
12
12
|
} from "./chunk-LFYTCHXS.js";
|
|
13
13
|
import "./chunk-TTNT27PG.js";
|
|
14
|
-
import
|
|
14
|
+
import {
|
|
15
|
+
CommentsError
|
|
16
|
+
} from "./chunk-4G5BDTBA.js";
|
|
15
17
|
|
|
16
18
|
// src/mcp-bin.ts
|
|
17
19
|
var MCP_HELP = `agentic-comments-mcp ${VERSION}
|
|
18
20
|
|
|
19
|
-
Start the MCP server on stdio. Set the principal and scopes in the environment:
|
|
21
|
+
Start the MCP server on stdio. Set the principal and scopes in the environment, or pass --as:
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
--as kind:name The principal. Overrides AGENTIC_COMMENTS_AS.
|
|
24
|
+
AGENTIC_COMMENTS_AS=kind:name Required unless --as is set. For example agent_of_human:scribe.
|
|
22
25
|
AGENTIC_COMMENTS_SCOPES=a,b Optional. A comma list, such as comments:accept.
|
|
23
26
|
AGENTIC_COMMENTS_FILE=./comments.ydoc The store file. The default is ./comments.ydoc.
|
|
24
27
|
AGENTIC_COMMENTS_LOCK_TIMEOUT_MS=5000 How long a write waits for another process.
|
|
25
28
|
|
|
26
|
-
Usage: agentic-comments-mcp [--help | --version]`;
|
|
29
|
+
Usage: agentic-comments-mcp [--as kind:name] [--help | --version]`;
|
|
27
30
|
var args = process.argv.slice(2);
|
|
28
|
-
|
|
31
|
+
var flags = args.filter((arg, i) => args[i - 1] !== "--as");
|
|
32
|
+
if (flags.includes("--help") || flags.includes("-h")) {
|
|
29
33
|
console.log(MCP_HELP);
|
|
30
|
-
} else if (
|
|
34
|
+
} else if (flags.includes("--version") || flags.includes("-V") || flags.includes("-v")) {
|
|
31
35
|
console.log(VERSION);
|
|
32
36
|
} else {
|
|
37
|
+
const asFlags = args.filter((arg) => arg === "--as" || arg.startsWith("--as="));
|
|
38
|
+
if (asFlags.length > 1 || asFlags[0] !== void 0 && asFlags[0] !== "--as") {
|
|
39
|
+
console.error(JSON.stringify({ error: { code: "USAGE", message: "give --as once, as --as kind:name" } }));
|
|
40
|
+
process.exit(2);
|
|
41
|
+
}
|
|
33
42
|
try {
|
|
34
43
|
const env = process.env;
|
|
35
|
-
|
|
44
|
+
const asAt = args.indexOf("--as");
|
|
45
|
+
if (asAt !== -1 && !args[asAt + 1]?.trim()) throw new CommentsError("INVALID_AUTHOR", "--as needs a value, as --as kind:name");
|
|
46
|
+
const as = asAt === -1 ? env.AGENTIC_COMMENTS_AS : args[asAt + 1];
|
|
47
|
+
await startMcp(new FileStore(env.AGENTIC_COMMENTS_FILE ?? "./comments.ydoc", { lockTimeoutMs: lockTimeoutFrom(env) }), operatorActor(as, env.AGENTIC_COMMENTS_SCOPES));
|
|
36
48
|
} catch (error) {
|
|
37
49
|
console.error(JSON.stringify({ error: { code: error.code ?? "INTERNAL", message: error instanceof Error ? error.message : String(error) } }));
|
|
38
50
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-comments",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Comment threads and suggestions anchored to any content, from people and agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"comments",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"dependencies": {
|
|
91
91
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
92
92
|
"agentic-design": "^0.5.0",
|
|
93
|
-
"agentic-identity": "^0.
|
|
93
|
+
"agentic-identity": "^0.9.0",
|
|
94
94
|
"hono": "^4.13.14",
|
|
95
95
|
"zod": "^4.6.7"
|
|
96
96
|
},
|