@canonmsg/claude-code-plugin 0.14.17 → 0.15.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/dist/host.js +21 -9
- package/package.json +4 -4
package/dist/host.js
CHANGED
|
@@ -26,8 +26,8 @@ import { execFileSync } from 'node:child_process';
|
|
|
26
26
|
import { existsSync } from 'node:fs';
|
|
27
27
|
import { query, } from '@anthropic-ai/claude-agent-sdk';
|
|
28
28
|
import { isAnthropicImageAttachment, materializeMessageMedia, materializeReplyContextMedia, toAnthropicImageBlock, } from '@canonmsg/agent-sdk';
|
|
29
|
-
import { CLAUDE_EFFORT_OPTIONS, CLAUDE_PERMISSION_MODE_OPTIONS, RUNTIME_NEW_SESSION_ACTION, RUNTIME_STOP_ACTION, RUNTIME_STOP_AND_DROP_ACTION,
|
|
30
|
-
import {
|
|
29
|
+
import { CLAUDE_EFFORT_OPTIONS, CLAUDE_PERMISSION_MODE_OPTIONS, RUNTIME_NEW_SESSION_ACTION, RUNTIME_STOP_ACTION, RUNTIME_STOP_AND_DROP_ACTION, buildCanonTurnContextV2, buildConfiguredWorkspaceOptionsWithRoots, buildConversationEnvironmentKey, buildFirstPartyCodingRuntimeDescriptor, buildHydratedInboundContext, diffCanonMemberIds, buildPlanApprovalRequest, buildQuestionRequest, buildPublicWorkspaceRoots, buildPublicWorkspaceOptions, buildRuntimePresentationPolicy, DEFAULT_FIRST_PARTY_RUNTIME_PRESENTATION, createConversationMetadataLoader, createTurnOutputController, createRuntimeStatePublisher, createTypingStatusPublisher, EXECUTION_ENVIRONMENT_MODES, CanonClient, CanonStream, DEFAULT_PARTICIPATION_HISTORY_FETCH_LIMIT, DEFAULT_RUNTIME_CAPABILITIES, HOST_ADMISSION_ACTIONS_DISABLED, ApprovalManager, ExecutionEnvironmentError, FINAL_MESSAGE_HANDOFF_MS, buildLocalRuntimeId, getActiveProfileLock, heartbeatLocalRuntimeEntry, normalizeTurnMetadata, prepareConversationEnvironment, resolveCanonAgent, initRTDBAuth, rtdbRead, rtdbWrite, sendMessageWithRetry, loadHostSessionConfig, loadRuntimeSessionState, markLocalRuntimeStopped, releaseConversationEnvironment, saveRuntimeSessionState, clearRuntimeSessionState, publishHostAgentRuntime, publishHostSessionSnapshots, renderCanonHostInboundContent, renderCanonTurnBriefPrompt, resolveHostWorkspaceCwd, upsertLocalRuntimeEntry, } from '@canonmsg/core';
|
|
30
|
+
import { decideAutoReply, } from './inbound-policy.js';
|
|
31
31
|
import { runCli } from './cli-entry.js';
|
|
32
32
|
import { decideClaudeToolPermissionForMode, parseAllowedNonOwnerClaudeTools, } from './tool-policy.js';
|
|
33
33
|
import { buildClaudeFinalMessageId, createClaudeInputEnvelope, formatClaudeControlError, mergeClaudeModelOptions, resetClaudeCompletedTurnState, shouldDeliverClaudeFinal, } from './session-state.js';
|
|
@@ -540,13 +540,19 @@ function controlPollDelayMs(hasActiveWork) {
|
|
|
540
540
|
return base + Math.floor(Math.random() * CONTROL_POLL_JITTER_MS);
|
|
541
541
|
}
|
|
542
542
|
function buildCanonPrompt(input) {
|
|
543
|
-
const
|
|
544
|
-
return
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
543
|
+
const sessionContextLines = input.session ? buildClaudeSessionContextLines(input.session) : undefined;
|
|
544
|
+
return renderCanonTurnBriefPrompt(buildCanonTurnContextV2({
|
|
545
|
+
content: input.content,
|
|
546
|
+
conversationId: input.conversationId,
|
|
547
|
+
participantContext: input.participantContext,
|
|
548
|
+
behavior: input.behavior,
|
|
549
|
+
selfContexts: input.selfContexts,
|
|
550
|
+
activeSelfContextId: input.activeSelfContextId,
|
|
551
|
+
provenance: input.provenance,
|
|
552
|
+
replyContext: input.replyContext,
|
|
553
|
+
sessionContextLines,
|
|
554
|
+
message: input.message,
|
|
555
|
+
}));
|
|
550
556
|
}
|
|
551
557
|
function optionLabel(value, options) {
|
|
552
558
|
if (!value)
|
|
@@ -2067,7 +2073,10 @@ export async function main() {
|
|
|
2067
2073
|
participantContext,
|
|
2068
2074
|
behavior,
|
|
2069
2075
|
selfContexts,
|
|
2076
|
+
activeSelfContextId,
|
|
2077
|
+
provenance: hydrated.provenance,
|
|
2070
2078
|
replyContext,
|
|
2079
|
+
message: m,
|
|
2071
2080
|
session,
|
|
2072
2081
|
});
|
|
2073
2082
|
const messageContent = await buildCanonUserContent({
|
|
@@ -2245,7 +2254,10 @@ export async function main() {
|
|
|
2245
2254
|
participantContext,
|
|
2246
2255
|
behavior,
|
|
2247
2256
|
selfContexts,
|
|
2257
|
+
activeSelfContextId,
|
|
2258
|
+
provenance: hydrated.provenance,
|
|
2248
2259
|
replyContext,
|
|
2260
|
+
message: m,
|
|
2249
2261
|
session,
|
|
2250
2262
|
});
|
|
2251
2263
|
const messageContent = await buildCanonUserContent({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonmsg/claude-code-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Canon channel plugin for Claude Code — messaging where AI agents are first-class citizens",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@anthropic-ai/claude-agent-sdk": "^0.2.141",
|
|
34
|
-
"@canonmsg/agent-sdk": "^
|
|
35
|
-
"@canonmsg/core": "^
|
|
34
|
+
"@canonmsg/agent-sdk": "^3.0.0",
|
|
35
|
+
"@canonmsg/core": "^2.0.0",
|
|
36
36
|
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "^22.0.0",
|
|
60
60
|
"typescript": "~5.7.0",
|
|
61
|
-
"vitest": "^
|
|
61
|
+
"vitest": "^4.1.8"
|
|
62
62
|
},
|
|
63
63
|
"license": "MIT"
|
|
64
64
|
}
|