@canonmsg/claude-code-plugin 0.19.6 → 0.20.0
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 +1 -1
- package/dist/approval-diff.d.ts +1 -1
- package/dist/approval-diff.js +1 -1
- package/dist/approval-server.d.ts +1 -1
- package/dist/bridge-bin.d.ts +14 -0
- package/dist/bridge-bin.js +27 -0
- package/dist/cli-entry.d.ts +2 -2
- package/dist/cli-entry.js +1 -1
- package/dist/host.d.ts +1 -1
- package/dist/host.js +456 -917
- package/dist/mcp-args.d.ts +1 -1
- package/dist/register.js +73 -25
- package/dist/server.js +23 -11
- package/dist/session-state.d.ts +2 -2
- package/dist/tool-policy.d.ts +2 -1
- package/package.json +10 -8
- package/dist/inbound-policy.d.ts +0 -22
- package/dist/inbound-policy.js +0 -46
- package/dist/startup-recovery.d.ts +0 -46
- package/dist/startup-recovery.js +0 -59
- package/dist/streaming-buffer.d.ts +0 -16
- package/dist/streaming-buffer.js +0 -52
package/README.md
CHANGED
package/dist/approval-diff.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CanonUnifiedDiff } from '@canonmsg/core';
|
|
1
|
+
import { type CanonUnifiedDiff } from '@canonmsg/core/contract';
|
|
2
2
|
/** Read a file's text, or null when the file does not exist. */
|
|
3
3
|
export type ApprovalDiffReadFile = (filePath: string) => Promise<string | null>;
|
|
4
4
|
export interface SynthesizeApprovalDiffOptions {
|
package/dist/approval-diff.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isAbsolute, join, relative } from 'node:path';
|
|
2
|
-
import { sanitizeUnifiedDiffForSharing, truncateUnifiedDiff, } from '@canonmsg/core';
|
|
2
|
+
import { sanitizeUnifiedDiffForSharing, truncateUnifiedDiff, } from '@canonmsg/core/contract';
|
|
3
3
|
/** Unified-hunk context lines on either side of a change (git default). */
|
|
4
4
|
const HUNK_CONTEXT_LINES = 3;
|
|
5
5
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Packaged canon-bridge daemon resolution (bridge plan Phase 6, §F3).
|
|
3
|
+
*
|
|
4
|
+
* On a fresh npm install nothing has populated ~/.canon/bin yet, so
|
|
5
|
+
* connectBridge()'s fallback chain (explicit binPath → $CANON_BRIDGE_BIN →
|
|
6
|
+
* the shared install) has nothing to spawn. The plugin therefore ships the
|
|
7
|
+
* daemon as its own @canonmsg/bridge dependency and passes the packaged
|
|
8
|
+
* dist entry as binPath.
|
|
9
|
+
*
|
|
10
|
+
* $CANON_BRIDGE_BIN still wins: when the env override is set we return
|
|
11
|
+
* undefined and let connectBridge()'s own env resolution take it (an
|
|
12
|
+
* options.binPath would out-rank the env var otherwise).
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolvePackagedBridgeBin(env?: NodeJS.ProcessEnv): string | undefined;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Packaged canon-bridge daemon resolution (bridge plan Phase 6, §F3).
|
|
3
|
+
*
|
|
4
|
+
* On a fresh npm install nothing has populated ~/.canon/bin yet, so
|
|
5
|
+
* connectBridge()'s fallback chain (explicit binPath → $CANON_BRIDGE_BIN →
|
|
6
|
+
* the shared install) has nothing to spawn. The plugin therefore ships the
|
|
7
|
+
* daemon as its own @canonmsg/bridge dependency and passes the packaged
|
|
8
|
+
* dist entry as binPath.
|
|
9
|
+
*
|
|
10
|
+
* $CANON_BRIDGE_BIN still wins: when the env override is set we return
|
|
11
|
+
* undefined and let connectBridge()'s own env resolution take it (an
|
|
12
|
+
* options.binPath would out-rank the env var otherwise).
|
|
13
|
+
*/
|
|
14
|
+
import { createRequire } from 'node:module';
|
|
15
|
+
import { dirname, join as joinPath } from 'node:path';
|
|
16
|
+
export function resolvePackagedBridgeBin(env = process.env) {
|
|
17
|
+
if (env.CANON_BRIDGE_BIN)
|
|
18
|
+
return undefined;
|
|
19
|
+
try {
|
|
20
|
+
const require = createRequire(import.meta.url);
|
|
21
|
+
const manifestPath = require.resolve('@canonmsg/bridge/package.json');
|
|
22
|
+
return joinPath(dirname(manifestPath), 'dist', 'main.js');
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
}
|
package/dist/cli-entry.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { handleCliMetadataRequest, isDirectExecution, readCliPackageVersion, runCli, } from '@canonmsg/core';
|
|
2
|
-
export type { CliMetadata, RunCliMetadataOptions, } from '@canonmsg/core';
|
|
1
|
+
export { handleCliMetadataRequest, isDirectExecution, readCliPackageVersion, runCli, } from '@canonmsg/core/local';
|
|
2
|
+
export type { CliMetadata, RunCliMetadataOptions, } from '@canonmsg/core/local';
|
package/dist/cli-entry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { handleCliMetadataRequest, isDirectExecution, readCliPackageVersion, runCli, } from '@canonmsg/core';
|
|
1
|
+
export { handleCliMetadataRequest, isDirectExecution, readCliPackageVersion, runCli, } from '@canonmsg/core/local';
|
package/dist/host.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { type SDKControlReloadPluginsResponse } from '@anthropic-ai/claude-agent-sdk';
|
|
3
|
-
import { type CanonRuntimeCommandDescriptor } from '@canonmsg/core';
|
|
3
|
+
import { type CanonRuntimeCommandDescriptor } from '@canonmsg/core/contract';
|
|
4
4
|
/**
|
|
5
5
|
* Claude Code's own slash commands (built-ins, plugins, project .claude/
|
|
6
6
|
* commands) are executable when sent as prompt text, so the runtime's command
|