@canonmsg/claude-code-plugin 0.14.5 → 0.14.6

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.
Files changed (2) hide show
  1. package/dist/host.js +30 -1
  2. package/package.json +3 -3
package/dist/host.js CHANGED
@@ -26,12 +26,20 @@ 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_PERMISSION_MODE_OPTIONS, RUNTIME_NEW_SESSION_ACTION, RUNTIME_STOP_ACTION, RUNTIME_STOP_AND_DROP_ACTION, buildCanonHostPrompt, buildConfiguredWorkspaceOptionsWithRoots, buildConversationEnvironmentKey, buildFirstPartyCodingRuntimeDescriptor, buildHydratedInboundContext, diffCanonMemberIds, buildPlanApprovalRequest, buildQuestionRequest, buildPublicWorkspaceRoots, buildPublicWorkspaceOptions, createConversationMetadataLoader, createRuntimeStatePublisher, 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, loadHostSessionConfig, loadRuntimeSessionState, markLocalRuntimeStopped, releaseConversationEnvironment, saveRuntimeSessionState, clearRuntimeSessionState, publishHostAgentRuntime, publishHostSessionSnapshots, renderCanonHostInboundContent, resolveHostWorkspaceCwd, upsertLocalRuntimeEntry, } from '@canonmsg/core';
29
+ import { CLAUDE_PERMISSION_MODE_OPTIONS, RUNTIME_NEW_SESSION_ACTION, RUNTIME_STOP_ACTION, RUNTIME_STOP_AND_DROP_ACTION, buildCanonHostPrompt, buildConfiguredWorkspaceOptionsWithRoots, buildConversationEnvironmentKey, buildFirstPartyCodingRuntimeDescriptor, buildHydratedInboundContext, diffCanonMemberIds, buildPlanApprovalRequest, buildQuestionRequest, buildPublicWorkspaceRoots, buildPublicWorkspaceOptions, buildRuntimePresentationPolicy, DEFAULT_FIRST_PARTY_RUNTIME_PRESENTATION, createConversationMetadataLoader, createRuntimeStatePublisher, 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, loadHostSessionConfig, loadRuntimeSessionState, markLocalRuntimeStopped, releaseConversationEnvironment, saveRuntimeSessionState, clearRuntimeSessionState, publishHostAgentRuntime, publishHostSessionSnapshots, renderCanonHostInboundContent, resolveHostWorkspaceCwd, upsertLocalRuntimeEntry, } from '@canonmsg/core';
30
30
  import { buildInboundContextLines, decideAutoReply, } from './inbound-policy.js';
31
31
  import { createStreamingBuffer } from './streaming-buffer.js';
32
32
  import { runCli } from './cli-entry.js';
33
33
  import { decideClaudeToolPermissionForMode, parseAllowedNonOwnerClaudeTools, } from './tool-policy.js';
34
34
  import { buildClaudeFinalMessageId, createClaudeInputEnvelope, formatClaudeControlError, mergeClaudeModelOptions, resetClaudeCompletedTurnState, shouldDeliverClaudeFinal, } from './session-state.js';
35
+ function parseRuntimeVisibilityPreset(value) {
36
+ return value === 'normal' || value === 'minimal' || value === 'full' ? value : undefined;
37
+ }
38
+ function stringArgs(value) {
39
+ return Array.isArray(value)
40
+ ? value.filter((item) => typeof item === 'string' && item.trim().length > 0)
41
+ : undefined;
42
+ }
35
43
  const HELP = `canon-claude — run a local Claude Code agent host for Canon
36
44
 
37
45
  USAGE
@@ -41,6 +49,12 @@ COMMON FLAGS
41
49
  --cwd <path> Project directory to run Claude Code from
42
50
  --workspace <path> Additional project to expose in Canon
43
51
  --workspace-root <path> Discover projects under an approved root
52
+ --runtime-visibility <normal|minimal|full>
53
+ Detail visibility preset
54
+ --show-runtime-detail <field>
55
+ Override a hidden detail field
56
+ --hide-runtime-detail <field>
57
+ Hide a runtime detail field
44
58
  --help, -h Show this help
45
59
  --version, -V Show package version
46
60
 
@@ -180,6 +194,7 @@ function buildClaudeRuntimeDescriptor(input) {
180
194
  defaultPermissionMode: 'default',
181
195
  streamingTextMode: 'delta',
182
196
  admissionActions: HOST_ADMISSION_ACTIONS_DISABLED,
197
+ presentation: input.presentation,
183
198
  commands,
184
199
  actions: [
185
200
  {
@@ -1415,6 +1430,7 @@ function createSession(conversationId, environment, agentId, client, runtimeStat
1415
1430
  workspaces: buildPublicWorkspaceOptions(workspaceOptions),
1416
1431
  workspaceRoots: workspaceRootMetadata,
1417
1432
  executionModes: config.availableExecutionModes,
1433
+ presentation: config.runtimePresentation,
1418
1434
  }),
1419
1435
  });
1420
1436
  writeState();
@@ -1443,6 +1459,9 @@ export async function main() {
1443
1459
  cwd: { type: 'string' },
1444
1460
  workspace: { type: 'string', multiple: true },
1445
1461
  'workspace-root': { type: 'string', multiple: true },
1462
+ 'runtime-visibility': { type: 'string' },
1463
+ 'show-runtime-detail': { type: 'string', multiple: true },
1464
+ 'hide-runtime-detail': { type: 'string', multiple: true },
1446
1465
  },
1447
1466
  strict: false,
1448
1467
  });
@@ -1522,6 +1541,12 @@ export async function main() {
1522
1541
  const hostAvailableExecutionModes = [
1523
1542
  ...EXECUTION_ENVIRONMENT_MODES,
1524
1543
  ];
1544
+ const runtimePresentation = buildRuntimePresentationPolicy({
1545
+ base: DEFAULT_FIRST_PARTY_RUNTIME_PRESENTATION,
1546
+ preset: parseRuntimeVisibilityPreset(args['runtime-visibility']),
1547
+ show: stringArgs(args['show-runtime-detail']),
1548
+ hide: stringArgs(args['hide-runtime-detail']),
1549
+ });
1525
1550
  let runtimeDescriptor = {
1526
1551
  defaultWorkspaceId: workspaceOptions[0]?.id,
1527
1552
  defaultPermissionMode: 'default',
@@ -1533,6 +1558,7 @@ export async function main() {
1533
1558
  workspaces: buildPublicWorkspaceOptions(workspaceOptions),
1534
1559
  workspaceRoots: workspaceRootMetadata,
1535
1560
  executionModes: hostAvailableExecutionModes,
1561
+ presentation: runtimePresentation,
1536
1562
  }),
1537
1563
  };
1538
1564
  const conversationCache = new Map();
@@ -1630,6 +1656,7 @@ export async function main() {
1630
1656
  workspaces: buildPublicWorkspaceOptions(workspaceOptions),
1631
1657
  workspaceRoots: workspaceRootMetadata,
1632
1658
  executionModes: hostAvailableExecutionModes,
1659
+ presentation: runtimePresentation,
1633
1660
  }),
1634
1661
  };
1635
1662
  }
@@ -1645,6 +1672,7 @@ export async function main() {
1645
1672
  workspaces: buildPublicWorkspaceOptions(workspaceOptions),
1646
1673
  workspaceRoots: workspaceRootMetadata,
1647
1674
  executionModes: hostAvailableExecutionModes,
1675
+ presentation: runtimePresentation,
1648
1676
  }),
1649
1677
  };
1650
1678
  }
@@ -1927,6 +1955,7 @@ export async function main() {
1927
1955
  effort: config?.effort,
1928
1956
  availableModels: runtimeModels,
1929
1957
  availableExecutionModes: hostAvailableExecutionModes,
1958
+ runtimePresentation,
1930
1959
  approvalManager,
1931
1960
  canRequestApproval: () => canRequestCanonApproval(conversationId),
1932
1961
  runtimeId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/claude-code-plugin",
3
- "version": "0.14.5",
3
+ "version": "0.14.6",
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.101",
34
- "@canonmsg/agent-sdk": "^1.5.0",
35
- "@canonmsg/core": "^0.19.1",
34
+ "@canonmsg/agent-sdk": "^1.5.1",
35
+ "@canonmsg/core": "^0.19.2",
36
36
  "@modelcontextprotocol/sdk": "^1.12.0"
37
37
  },
38
38
  "engines": {