@cotal-ai/connector-claude-code 0.165.4 → 0.166.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 +4 -22
- package/dist/agui-map.d.ts +2 -1
- package/dist/agui-map.d.ts.map +1 -1
- package/dist/agui-source.d.ts +2 -1
- package/dist/agui-source.d.ts.map +1 -1
- package/dist/app-host.d.ts +2 -2
- package/dist/app-host.d.ts.map +1 -1
- package/dist/approval-notice.d.ts +0 -1
- package/dist/approval-notice.d.ts.map +1 -1
- package/dist/desktop-config.d.ts +0 -2
- package/dist/desktop-config.d.ts.map +1 -1
- package/dist/docs-bundle.bin +0 -0
- package/dist/docs-index.bin +0 -0
- package/dist/extension.d.ts.map +1 -1
- package/dist/hook.cjs +2 -2
- package/dist/hooks.d.ts +4 -5
- package/dist/hooks.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/mcp.cjs +42 -43
- package/dist/mcp.d.ts.map +1 -1
- package/dist/once-exit.d.ts +2 -1
- package/dist/once-exit.d.ts.map +1 -1
- package/dist/user-mcp.d.ts +0 -6
- package/dist/user-mcp.d.ts.map +1 -1
- package/dist/wake-feed.d.ts +2 -1
- package/dist/wake-feed.d.ts.map +1 -1
- package/hooks/hooks.json +0 -21
- package/package.json +3 -5
- package/dist/permission-hook.d.ts +0 -21
- package/dist/permission-hook.d.ts.map +0 -1
package/dist/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA8KtD,yFAAyF;AACzF,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,EAAE,QAAQ,CAAC;IACjB;uDACmD;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;gFAC4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb;uDACmD;IACnD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;+BAE+B;AAC/B,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,CAQ3F;AA4JD;;;;;;;;GAQG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAOnD"}
|
package/dist/once-exit.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const HOST_EXE_ENV = "COTAL_CLAUDE_EXE";
|
|
3
3
|
/** The `claude` process a managed once seat's MCP server runs under, as recorded at the server's
|
|
4
4
|
* start: its pid, its start token, and the real path of its executable. */
|
|
5
|
-
|
|
5
|
+
interface ClaudeHost {
|
|
6
6
|
pid: number;
|
|
7
7
|
start: string;
|
|
8
8
|
exe: string;
|
|
@@ -21,4 +21,5 @@ export declare function recordHost(env: NodeJS.ProcessEnv, pid?: number): Claude
|
|
|
21
21
|
* more, when nothing was recorded, the process changed or cannot be read, or it outlived SIGKILL:
|
|
22
22
|
* the seat could not be ended, and its once report goes on. */
|
|
23
23
|
export declare function endHost(host: ClaudeHost | undefined): Promise<boolean>;
|
|
24
|
+
export {};
|
|
24
25
|
//# sourceMappingURL=once-exit.d.ts.map
|
package/dist/once-exit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"once-exit.d.ts","sourceRoot":"","sources":["../src/once-exit.ts"],"names":[],"mappings":"AAGA,+FAA+F;AAC/F,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAM/C;4EAC4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"once-exit.d.ts","sourceRoot":"","sources":["../src/once-exit.ts"],"names":[],"mappings":"AAGA,+FAA+F;AAC/F,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAM/C;4EAC4E;AAC5E,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;iFAEiF;AACjF,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAW9F;AAiBD;;0DAE0D;AAC1D,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,SAAe,GAAG,UAAU,GAAG,SAAS,CAW7F;AAWD;;;;gEAIgE;AAChE,wBAAsB,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAS5E"}
|
package/dist/user-mcp.d.ts
CHANGED
|
@@ -4,12 +4,6 @@ export declare function claudeUserMcpServers(): Record<string, unknown>;
|
|
|
4
4
|
* stays with Claude, including approvals; reading those files here could grant an untrusted repo
|
|
5
5
|
* a secret merely by referencing its name. No server definitions or credential values are copied. */
|
|
6
6
|
export declare function claudeUserMcpEnvKeys(): string[];
|
|
7
|
-
/** The MCP server names Claude Code's own configuration declares for a session in `cwd`: the user
|
|
8
|
-
* config plus the project's `.mcp.json`. Names only; no server definition, env or credential is read
|
|
9
|
-
* into the launch. Claude Code binds a `server:<name>` wake channel only to one of these (measured
|
|
10
|
-
* on 2.1.295: a server named only in `--mcp-config` reads "no MCP server configured with that name"
|
|
11
|
-
* and the session never wakes on a peer message). */
|
|
12
|
-
export declare function claudeDeclaredServerNames(cwd: string): Set<string>;
|
|
13
7
|
/** Refuse a managed launch whose wake channel could not bind: without a declared server named
|
|
14
8
|
* `name`, the seat would join the mesh, report idle and never answer a turn or a direct message. */
|
|
15
9
|
export declare function assertChannelServerDeclared(name: string, cwd: string): void;
|
package/dist/user-mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-mcp.d.ts","sourceRoot":"","sources":["../src/user-mcp.ts"],"names":[],"mappings":"AAMA,8FAA8F;AAC9F,wBAAgB,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAU9D;AAED;;sGAEsG;AACtG,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAI/C;
|
|
1
|
+
{"version":3,"file":"user-mcp.d.ts","sourceRoot":"","sources":["../src/user-mcp.ts"],"names":[],"mappings":"AAMA,8FAA8F;AAC9F,wBAAgB,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAU9D;AAED;;sGAEsG;AACtG,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAI/C;AAqBD;qGACqG;AACrG,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAO3E"}
|
package/dist/wake-feed.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function wakeSocketPath(claudePid: number, serverPid?: number): s
|
|
|
8
8
|
export declare function wakeSockets(claudePid: number): string[];
|
|
9
9
|
/** Lifecycle requests use a separate socket so an event relay is never mistaken for a wake reader. */
|
|
10
10
|
export declare function nativeSocketPath(feed: string): string;
|
|
11
|
-
|
|
11
|
+
interface WakeFeed {
|
|
12
12
|
/** Write one bounded preview + `id` to every monitor reading the feed. False when none is. */
|
|
13
13
|
send(id: string, preview: RenderedInboxPreview, session?: string): boolean;
|
|
14
14
|
/** Tell the monitors of one native session what the person decided about its pending request. */
|
|
@@ -29,4 +29,5 @@ export interface WakeFeed {
|
|
|
29
29
|
}
|
|
30
30
|
/** Serve this process's feed for the Claude Code process `claudePid`. */
|
|
31
31
|
export declare function openWakeFeed(claudePid: number): Promise<WakeFeed>;
|
|
32
|
+
export {};
|
|
32
33
|
//# sourceMappingURL=wake-feed.d.ts.map
|
package/dist/wake-feed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wake-feed.d.ts","sourceRoot":"","sources":["../src/wake-feed.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAKpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGjH,4FAA4F;AAC5F,eAAO,MAAM,OAAO,QAA2B,CAAC;AA6BhD,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAoB,GAAG,MAAM,CAGzF;AAED,uGAAuG;AACvG,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAMvD;AAED,sGAAsG;AACtG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,
|
|
1
|
+
{"version":3,"file":"wake-feed.d.ts","sourceRoot":"","sources":["../src/wake-feed.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAKpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGjH,4FAA4F;AAC5F,eAAO,MAAM,OAAO,QAA2B,CAAC;AA6BhD,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAoB,GAAG,MAAM,CAGzF;AAED,uGAAuG;AACvG,wBAAgB,WAAW,CAAC,SAAS,E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sB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAwHvE"}
|
package/hooks/hooks.json
CHANGED
|
@@ -31,17 +31,6 @@
|
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
33
|
],
|
|
34
|
-
"PermissionRequest": [
|
|
35
|
-
{
|
|
36
|
-
"hooks": [
|
|
37
|
-
{
|
|
38
|
-
"type": "command",
|
|
39
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/hook.cjs\"",
|
|
40
|
-
"timeout": 2147483
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
34
|
"PostToolUse": [
|
|
46
35
|
{
|
|
47
36
|
"matcher": "^mcp__.+__cotal_(connect|disconnect)$",
|
|
@@ -74,16 +63,6 @@
|
|
|
74
63
|
]
|
|
75
64
|
}
|
|
76
65
|
],
|
|
77
|
-
"SubagentStop": [
|
|
78
|
-
{
|
|
79
|
-
"hooks": [
|
|
80
|
-
{
|
|
81
|
-
"type": "command",
|
|
82
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/hook.cjs\""
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
66
|
"Stop": [
|
|
88
67
|
{
|
|
89
68
|
"hooks": [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/connector-claude-code",
|
|
3
3
|
"description": "Cotal connector for Claude Code: an installed plugin that joins a session to the mesh.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.166.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -25,14 +25,12 @@
|
|
|
25
25
|
"@cotal-ai/core": ">=0.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@cotal-ai/
|
|
29
|
-
"@cotal-ai/
|
|
30
|
-
"@cotal-ai/core": "0.165.4",
|
|
28
|
+
"@cotal-ai/connector-core": "0.166.1",
|
|
29
|
+
"@cotal-ai/core": "0.166.1",
|
|
31
30
|
"@cotal-ai/smoke-kit": "0.0.0",
|
|
32
31
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
33
32
|
"@nats-io/transport-node": "3.4.0",
|
|
34
33
|
"esbuild": "^0.28.0",
|
|
35
|
-
"jose": "^6.2.3",
|
|
36
34
|
"tsx": "^4.22.4"
|
|
37
35
|
},
|
|
38
36
|
"files": [
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude Code's permission prompt at the hook boundary: its `PermissionRequest` payload in, the
|
|
3
|
-
* desk's verdict out. Type imports only, because the lifecycle hook process loads this module.
|
|
4
|
-
*/
|
|
5
|
-
import type { HookEvent, PermissionAsk, PermissionVerdict } from "@cotal-ai/connector-core";
|
|
6
|
-
/** The hook event the relay holds open until the prompt is answered. */
|
|
7
|
-
export declare const isPermissionRequest: (event: unknown) => boolean;
|
|
8
|
-
/** The scope a hook fired in: the `agent_id` Claude sends from inside a subagent or teammate, or
|
|
9
|
-
* `undefined` for the main thread. A prompt, the batch that ran its tool and the turn end that closes
|
|
10
|
-
* it all carry the same one. */
|
|
11
|
-
export declare function claudeScope(ev: HookEvent): string | undefined;
|
|
12
|
-
/** The prompt a `PermissionRequest` payload asks, or `undefined` for one without a tool name and input. */
|
|
13
|
-
export declare function claudeAsk(ev: HookEvent): PermissionAsk | undefined;
|
|
14
|
-
/** The hook output that applies a verdict. A release prints no decision, so Claude keeps its own. */
|
|
15
|
-
export declare function claudeVerdict(verdict: PermissionVerdict): Record<string, unknown>;
|
|
16
|
-
/** The tool calls a `PostToolBatch` payload says ran. */
|
|
17
|
-
export declare function claudeToolCalls(ev: HookEvent): {
|
|
18
|
-
tool: string;
|
|
19
|
-
input: unknown;
|
|
20
|
-
}[];
|
|
21
|
-
//# sourceMappingURL=permission-hook.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permission-hook.d.ts","sourceRoot":"","sources":["../src/permission-hook.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG5F,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,GAAI,OAAO,OAAO,KAAG,OACqC,CAAC;AAE3F;;iCAEiC;AACjC,wBAAgB,WAAW,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAE7D;AAED,2GAA2G;AAC3G,wBAAgB,SAAS,CAAC,EAAE,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,CAQlE;AAED,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIjF;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,EAAE,CAIjF"}
|