@canonmsg/agent-sdk 12.0.0 → 12.2.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.
Files changed (99) hide show
  1. package/README.md +97 -7
  2. package/dist/chunks/chunk-HITMISWV.js +4897 -0
  3. package/dist/chunks/{chunk-FPQFTTND.js → chunk-J63YVAKA.js} +1627 -1099
  4. package/dist/chunks/{chunk-OLJ7H4E2.js → chunk-O5C3ZGI4.js} +6363 -7011
  5. package/dist/chunks/{mls-crypto-NZDNSPAO.js → mls-crypto-ITVGUEP7.js} +3 -3
  6. package/dist/cli.js +403 -30
  7. package/dist/drivers/claude.d.ts +8 -2
  8. package/dist/drivers/codex.d.ts +11 -2
  9. package/dist/drivers/connector.d.ts +34 -0
  10. package/dist/index.d.ts +10 -2
  11. package/dist/index.js +26 -4
  12. package/dist/internal/backend-contracts/artifactActions.d.ts +0 -151
  13. package/dist/internal/backend-contracts/clientFloor.d.ts +52 -0
  14. package/dist/internal/backend-contracts/communication.d.ts +15 -0
  15. package/dist/internal/backend-contracts/connectorRelay.d.ts +179 -0
  16. package/dist/internal/backend-contracts/endpoint.d.ts +17 -0
  17. package/dist/internal/backend-contracts/endpointContentPolicy.d.ts +15 -4
  18. package/dist/internal/backend-contracts/index.d.ts +7 -1
  19. package/dist/internal/backend-contracts/media-url.d.ts +14 -0
  20. package/dist/internal/backend-contracts/message.d.ts +1 -1
  21. package/dist/internal/backend-contracts/mlsDevApplication.d.ts +90 -2
  22. package/dist/internal/backend-contracts/mlsDevCredential.d.ts +5 -2
  23. package/dist/internal/backend-contracts/mlsDevDeviceCustody.d.ts +2 -1
  24. package/dist/internal/backend-contracts/mlsDevEnrollment.d.ts +6 -2
  25. package/dist/internal/backend-contracts/mlsDevFeedReceipt.d.ts +43 -0
  26. package/dist/internal/backend-contracts/mlsDevGroup.d.ts +129 -5
  27. package/dist/internal/backend-contracts/mlsDevGroupFeed.d.ts +6 -2
  28. package/dist/internal/backend-contracts/mlsDevInteraction.d.ts +159 -0
  29. package/dist/internal/backend-contracts/mlsEnvironment.d.ts +35 -0
  30. package/dist/internal/backend-contracts/mlsPrincipalAlias.d.ts +26 -0
  31. package/dist/internal/backend-contracts/runtimeCardFields.d.ts +0 -4
  32. package/dist/internal/backend-contracts/upload-mime-types.d.ts +17 -0
  33. package/dist/internal/backend-contracts/verbContract.d.ts +23 -19
  34. package/dist/internal/backend-contracts/verbSchemas.d.ts +38 -29
  35. package/dist/internal/core/agent-profiles.d.ts +0 -4
  36. package/dist/internal/core/approval-format.d.ts +1 -5
  37. package/dist/internal/core/approval-types.d.ts +1 -2
  38. package/dist/internal/core/client.d.ts +3 -152
  39. package/dist/internal/core/constants.d.ts +0 -3
  40. package/dist/internal/core/endpoint-client.d.ts +14 -1
  41. package/dist/internal/core/execution-environment-mode.d.ts +0 -2
  42. package/dist/internal/core/gifs.d.ts +0 -6
  43. package/dist/internal/core/host-runtime.d.ts +2 -206
  44. package/dist/internal/core/index.d.ts +22 -63
  45. package/dist/internal/core/registration.d.ts +1 -17
  46. package/dist/internal/core/retry.d.ts +0 -9
  47. package/dist/internal/core/rtdb-rest.d.ts +0 -4
  48. package/dist/internal/core/runtime-cards.d.ts +0 -45
  49. package/dist/internal/core/runtime-descriptor.d.ts +1 -60
  50. package/dist/internal/core/runtime-presentation.d.ts +1 -27
  51. package/dist/internal/core/runtime-request-manager.d.ts +0 -1
  52. package/dist/internal/core/self-context.d.ts +0 -39
  53. package/dist/internal/core/silent-turn.d.ts +1 -38
  54. package/dist/internal/core/turn-protocol.d.ts +0 -5
  55. package/dist/internal/core/turn-verbosity.d.ts +5 -23
  56. package/dist/internal/core/types.d.ts +0 -292
  57. package/dist/internal/endpoint/engine.d.ts +31 -1
  58. package/dist/internal/endpoint/index.d.ts +1 -1
  59. package/dist/internal/endpoint/media.d.ts +5 -0
  60. package/dist/internal/endpoint/mls-crypto.d.ts +12 -5
  61. package/dist/internal/endpoint/mls-dev-client.d.ts +9 -1
  62. package/dist/internal/endpoint/mls-dev-device.d.ts +2 -0
  63. package/dist/internal/endpoint/mls-dev-groups.d.ts +65 -5
  64. package/dist/internal/endpoint/mls-dev-interactions.d.ts +99 -0
  65. package/dist/internal/endpoint/mls-dev-key-package-service.d.ts +13 -0
  66. package/dist/internal/endpoint/mls-dev-key-packages.d.ts +23 -3
  67. package/dist/internal/endpoint/mls-dev-text.d.ts +67 -0
  68. package/dist/internal/endpoint/mls-dev-transport.d.ts +2 -1
  69. package/dist/internal/endpoint/node-mls-custody-protocol.d.ts +5 -0
  70. package/dist/internal/endpoint/transport.d.ts +6 -1
  71. package/dist/media.js +2 -2
  72. package/dist/runner/errands.d.ts +118 -0
  73. package/dist/runner/mls.d.ts +97 -0
  74. package/dist/runner/relay.d.ts +87 -0
  75. package/dist/runner/runner.d.ts +61 -0
  76. package/dist/runner/types.d.ts +51 -4
  77. package/package.json +1 -1
  78. package/dist/chunks/chunk-6VK4UZHJ.js +0 -2806
  79. package/dist/internal/backend-contracts/workSessions.d.ts +0 -205
  80. package/dist/internal/core/agent-resolver.d.ts +0 -49
  81. package/dist/internal/core/agent-session.d.ts +0 -12
  82. package/dist/internal/core/artifacts.d.ts +0 -262
  83. package/dist/internal/core/attached-native-session.d.ts +0 -174
  84. package/dist/internal/core/attached-session-file-store.d.ts +0 -3
  85. package/dist/internal/core/control-poller.d.ts +0 -221
  86. package/dist/internal/core/exclusive-json-file-store.d.ts +0 -7
  87. package/dist/internal/core/execution-environment.d.ts +0 -55
  88. package/dist/internal/core/group-context.d.ts +0 -25
  89. package/dist/internal/core/inbound-frame.d.ts +0 -64
  90. package/dist/internal/core/local-runtime-catalog.d.ts +0 -131
  91. package/dist/internal/core/message-format.d.ts +0 -13
  92. package/dist/internal/core/native-session-interaction.d.ts +0 -44
  93. package/dist/internal/core/provenance.d.ts +0 -31
  94. package/dist/internal/core/registration-cli.d.ts +0 -40
  95. package/dist/internal/core/stream.d.ts +0 -77
  96. package/dist/internal/core/turn-output-controller.d.ts +0 -69
  97. package/dist/internal/core/typing-status-publisher.d.ts +0 -14
  98. package/dist/internal/core/work-session-provider.d.ts +0 -29
  99. package/dist/internal/core/workspace-discovery.d.ts +0 -17
@@ -1,84 +1,57 @@
1
1
  export { createNodeMlsDevCustody, NodeMlsDevCustodyError, type NodeMlsDevCustody, type NodeMlsDevCustodyOptions } from '../endpoint/node.js';
2
2
  export { createPortableNodeMlsDevCustody, type PortableNodeMlsDevCustody, type PortableNodeMlsDevCustodyOptions } from '../endpoint/node.js';
3
3
  export { parseMlsDevClientConfiguration, type MlsDevClientConfiguration } from '../endpoint/mls-crypto.js';
4
- export { createAttachedNativeSession } from './attached-native-session.js';
5
4
  export type { CanonClientEndpointOptions, CanonEndpoint, CanonMlsDevOptions, CanonMlsDevCustody } from './endpoint-client.js';
6
5
  export type { EndpointInboundHandoff, EndpointInboundHandoffPhase, EndpointInboundStartResult, EndpointContentMode, MlsDevVerifiedMessageBinding, MlsDevCurrentAudience } from '../endpoint/index.js';
7
6
  export { createNodeEndpointMediaBytes } from './node-media.js';
8
7
  export { resolveConversationPolicyScope } from '../backend-contracts/index.js';
9
- export { createFileAttachedSessionStore } from './attached-session-file-store.js';
10
- export type { AttachedNativeSession, AttachedNativeSessionAdapter, AttachedNativeSessionOptions, AttachedSessionBinding, AttachedSessionInput, AttachedSessionJournal, AttachedSessionMessagePart, AttachedSessionOrigin, AttachedSessionPublisher, AttachedSessionState, AttachedSessionStore, AttachedSessionSubmitResult, NativeSessionEvent, NativeSessionItem, NativeSessionSnapshot, NativeSubmissionResult, } from './attached-native-session.js';
11
- export { AGENT_CAPABILITIES, CLAUDE_PERMISSION_MODE_OPTIONS, } from './types.js';
12
- export type { AgentOrigin, AgentOriginDeclaration, AddMemberResult, AgentCapabilities, AgentClientType, CanonControlAvailability, CanonControlDescriptor, CanonControlLiveBehavior, CanonControlSelectionPolicy, CanonControlValue, CanonRuntimeCardCapabilities, CanonRuntimeRichCardCapability, CanonRuntimeVoiceCapabilities, CanonRuntimeVoiceMode, CanonContact, CanonGroupContext, CanonGroupContextMode, CanonKnownRecentParticipant, CanonMembershipChange, CanonResolveAdmissionResult, ConversationUpdatedPayload, ContactAddedPayload, ContactCardPayload, ContactRemovedPayload, ContactSource, ResolvedAdmissionState, ResolvedAdmissionTargetSummary, ResolvedTargetAdmissionPayload, ResolveAdmissionTargetInput, CanonMessage, CanonRuntimeProvenance, CanonTurnDispatch, CanonConversation, CanonConversationsPage, CanonConversationsPageOptions, CanonMessagesPage, CanonVoiceSession, CanonVoiceSessionMode, CanonVoiceSessionParticipant, CanonVoiceSessionStatus, CanonVoiceSessionToken, AgentContext, CanonStreamEvent, AgentSessionSnapshot, ResolvedAdmission, MediaAttachment, MediaAttachmentKind, VideoProcessingStatus, VideoProcessingErrorCode, MessageCreatedPayload, MessageUpdatedPayload, TypingPayload, PresencePayload, RuntimeUpdatedPayload, RuntimeControlEventKind, RuntimeControlEventPayload, TurnUpdatedPayload, ParticipationSuppressedPayload, VoiceSessionEventPayload, SendMessageOptions, CreateGroupOptions, CreateGroupResult, CreateVoiceSessionOptions, JoinVoiceSessionOptions, RegistrationInput, RegistrationResult, RegistrationStatus, UpdateAgentProfileOptions, SetRuntimeTurnOptions, StreamingStatus, SetStreamingOptions, SessionState, AgentRuntime, CanonRuntimeDescriptor, CanonRuntimeActionAvailability, CanonRuntimeActionCategory, CanonRuntimeActionDescriptor, CanonRuntimeActionDispatch, CanonRuntimeActionPlacement, CanonRuntimeCommandArgumentChoice, CanonRuntimeCommandArgumentDescriptor, CanonRuntimeCommandArgumentKind, CanonRuntimeCommandDescriptor, CanonRuntimeDetailTier, CanonRuntimeExecutionMetadata, CanonRuntimePresentationField, CanonRuntimePresentationHint, CanonRuntimePresentationPolicy, CanonRuntimePresentationPreset, CanonRuntimeVisibility, CanonRuntimeActivityItem, CanonRuntimeActivityKind, CanonRuntimeActivityStatus, CanonRuntimeFact, CanonRuntimeFactGroup, CanonRuntimeInventory, CanonRuntimeInventoryEntry, CanonRuntimePrimitiveId, CanonRuntimeStreamingMode, CanonRuntimeStatusItem, CanonRuntimeSurfaceMode, CanonRuntimeTurnModeActivation, CanonRuntimeTurnModeDescriptor, CanonRuntimeTurnModeScope, CanonUnifiedDiff, CanonUnifiedDiffFile, CanonUnifiedDiffFileStatus, CanonWorkspaceRootMetadata, ModelOption, PermissionModeOption, RuntimeInfoPayload, RuntimeControlError, RuntimeControlState, RuntimeControlValueSource, TurnOutputBlock, TurnOutputBlockKind, TurnOutputBlockStatus, WorkspaceOption, WorkspaceOptionSource, } from './types.js';
13
- export type { CanonGifMetadata, CanonGifResult, CanonGifSearchOptions, CanonGifSearchResponse, GifProvider, } from './gifs.js';
8
+ export { CLAUDE_PERMISSION_MODE_OPTIONS, } from './types.js';
9
+ export type { AgentOrigin, AgentOriginDeclaration, AgentClientType, CanonControlAvailability, CanonControlDescriptor, CanonControlLiveBehavior, CanonControlSelectionPolicy, CanonControlValue, CanonRuntimeCardCapabilities, CanonRuntimeRichCardCapability, CanonRuntimeVoiceCapabilities, CanonRuntimeVoiceMode, CanonResolveAdmissionResult, ContactCardPayload, ContactSource, ResolvedAdmissionState, ResolvedAdmissionTargetSummary, ResolvedTargetAdmissionPayload, CanonMessage, CanonRuntimeProvenance, CanonTurnDispatch, CanonConversation, CanonMessagesPage, CanonVoiceSession, CanonVoiceSessionMode, CanonVoiceSessionParticipant, CanonVoiceSessionStatus, CanonVoiceSessionToken, AgentContext, AgentSessionSnapshot, MediaAttachment, MediaAttachmentKind, VideoProcessingStatus, VideoProcessingErrorCode, MessageCreatedPayload, RuntimeUpdatedPayload, SendMessageOptions, RegistrationInput, RegistrationStatus, SetRuntimeTurnOptions, StreamingStatus, SetStreamingOptions, SessionState, AgentRuntime, CanonRuntimeDescriptor, CanonRuntimeActionAvailability, CanonRuntimeActionCategory, CanonRuntimeActionDescriptor, CanonRuntimeActionDispatch, CanonRuntimeActionPlacement, CanonRuntimeCommandArgumentChoice, CanonRuntimeCommandArgumentDescriptor, CanonRuntimeCommandArgumentKind, CanonRuntimeCommandDescriptor, CanonRuntimeDetailTier, CanonRuntimeExecutionMetadata, CanonRuntimePresentationField, CanonRuntimePresentationHint, CanonRuntimePresentationPolicy, CanonRuntimePresentationPreset, CanonRuntimeVisibility, CanonRuntimeActivityItem, CanonRuntimeActivityKind, CanonRuntimeActivityStatus, CanonRuntimeFact, CanonRuntimeFactGroup, CanonRuntimeInventory, CanonRuntimeInventoryEntry, CanonRuntimePrimitiveId, CanonRuntimeStreamingMode, CanonRuntimeStatusItem, CanonRuntimeSurfaceMode, CanonRuntimeTurnModeActivation, CanonRuntimeTurnModeDescriptor, CanonRuntimeTurnModeScope, CanonUnifiedDiff, CanonUnifiedDiffFile, CanonUnifiedDiffFileStatus, CanonWorkspaceRootMetadata, ModelOption, PermissionModeOption, RuntimeInfoPayload, RuntimeControlError, RuntimeControlState, RuntimeControlValueSource, TurnOutputBlock, TurnOutputBlockKind, TurnOutputBlockStatus, WorkspaceOption, WorkspaceOptionSource, } from './types.js';
10
+ export type { CanonGifMetadata, CanonGifResult, CanonGifSearchResponse, GifProvider, } from './gifs.js';
14
11
  export { buildGifAttachment, buildGifMetadata, } from './gifs.js';
15
- export { DEFAULT_FIRST_PARTY_RUNTIME_PRESENTATION, RUNTIME_PRESENTATION_FIELDS, buildRuntimePresentationPolicy, isRuntimePresentationField, isRuntimePresentationFieldHidden, redactAgentRuntimeForConversation, redactAgentSessionSnapshotForConversation, redactRuntimeActivityItemForConversation, redactRuntimeInfoForConversation, redactSessionStateForConversation, } from './runtime-presentation.js';
16
- export { buildRuntimeProvenance, resolveRuntimeProvenance, } from './provenance.js';
17
- export type { CanonSelfContext, CanonSelfContextType, SelfContextPromptRenderOptions, } from './self-context.js';
18
- export { buildSelfContextPromptLines, normalizeSelfContexts, resolveMessageActiveSelfContextId, selectActiveSelfContexts, selectInboundSelfContexts, } from './self-context.js';
19
- export { buildConfiguredWorkspaceOptionsWithRoots, buildPublicWorkspaceRoots, buildWorkspaceRootId, } from './workspace-discovery.js';
20
- export type { ConfiguredWorkspaceRoot, } from './workspace-discovery.js';
12
+ export { isRuntimePresentationFieldHidden, redactAgentSessionSnapshotForConversation, redactRuntimeActivityItemForConversation, redactRuntimeInfoForConversation, } from './runtime-presentation.js';
13
+ export type { CanonSelfContext, CanonSelfContextType, } from './self-context.js';
21
14
  export { CanonClient, CanonApiError } from './client.js';
22
15
  export type { EndpointOperation as CanonMessageOperation } from '../endpoint/index.js';
23
- export type { ResumableMediaUploadResult, ResumableMediaUploadSession, } from './client.js';
24
- export { buildAgentSessionSnapshot } from './agent-session.js';
25
- export { EFFORT_OPTIONS, EXECUTION_MODE_CONTROL_OPTIONS, RUNTIME_NEW_SESSION_ACTION, RUNTIME_STOP_ACTION, RUNTIME_STOP_AND_DROP_ACTION, buildFirstPartyCodingRuntimeDescriptor, buildRuntimeWorkspaceControlOptions, normalizeRuntimeCommandAlias, normalizeRuntimeCommandAliases, normalizeRuntimeCommandDescriptors, } from './runtime-descriptor.js';
26
- export { CanonStream, CanonStreamError } from './stream.js';
27
- export type { CanonStreamErrorPayload, ReplayExpiredPayload, StreamHandler } from './stream.js';
16
+ export type { ResumableMediaUploadResult, } from './client.js';
17
+ export { EXECUTION_MODE_CONTROL_OPTIONS, RUNTIME_NEW_SESSION_ACTION, RUNTIME_STOP_ACTION, RUNTIME_STOP_AND_DROP_ACTION, normalizeRuntimeCommandAlias, normalizeRuntimeCommandAliases, normalizeRuntimeCommandDescriptors, } from './runtime-descriptor.js';
28
18
  export { createRuntimeHeartbeat } from './runtime-heartbeat.js';
29
19
  export type { RuntimeHeartbeat, RuntimeHeartbeatOperation, RuntimeHeartbeatOptions, } from './runtime-heartbeat.js';
30
20
  export type { ParticipationStyle, AgentBehaviorSettings, ParticipationPolicy, ResolvedAgentBehaviorPolicy, ParticipationHistoryMessage, ParticipationHistorySnapshot, ParticipationDecisionInput, ParticipationDecision, } from './policy.js';
31
21
  export { buildParticipationHistorySnapshot, DEFAULT_DIRECT_MAX_CONSECUTIVE_AGENT_TURNS, DEFAULT_GROUP_MAX_CONSECUTIVE_AGENT_TURNS, DEFAULT_PARTICIPATION_HISTORY_FETCH_LIMIT, evaluateParticipationPolicy, getDefaultParticipationPolicy, resolveAgentBehaviorPolicy, } from './policy.js';
32
- export { DEFAULT_RUNTIME_CAPABILITIES, ACTIVE_TURN_STALE_THRESHOLD_MS, HOST_ADMISSION_ACTION_CAPABILITIES, HOST_ADMISSION_ACTIONS_DISABLED, FINAL_MESSAGE_HANDOFF_MS, WAITING_INPUT_STALE_THRESHOLD_MS, getTurnStateStaleThresholdMs, isTurnOpen, isTurnStateStale, normalizeTurnMetadata, normalizeTurnState, resolveTurnMessageSemantics, shouldPromoteConversationMessage, shouldTriggerAgentTurn, } from './turn-protocol.js';
22
+ export { ACTIVE_TURN_STALE_THRESHOLD_MS, WAITING_INPUT_STALE_THRESHOLD_MS, getTurnStateStaleThresholdMs, isTurnOpen, isTurnStateStale, normalizeTurnMetadata, resolveTurnMessageSemantics, shouldPromoteConversationMessage, shouldTriggerAgentTurn, } from './turn-protocol.js';
33
23
  export type { DeliveryIntent, TurnMessageSemantics, InboundDisposition, TurnLifecycleState, RuntimeCapabilities, HostAdmissionActionCapabilities, TurnState, TurnMetadata, TriggerDecision, } from './turn-protocol.js';
34
24
  export { resumeRegistration } from './registration-session.js';
35
25
  export type { RegistrationSession, RegistrationCredentials, RegistrationStore, RegistrationProgress, ResumeRegistrationOptions } from './registration-session.js';
36
26
  export { ensureAgentProfile } from './registration-profile.js';
37
27
  export type { EnsureAgentProfileOptions } from './registration-profile.js';
38
- export { registerRegistrationCli, runRegistrationCli } from './registration-cli.js';
39
- export type { RegistrationCliOptions } from './registration-cli.js';
40
- export { ackRegistrationApproval, registerAndWaitForApproval, submitRegistrationRequest, waitForRegistrationApproval, } from './registration.js';
28
+ export { submitRegistrationRequest, } from './registration.js';
41
29
  export { RuntimeRequestManager, RuntimeRequestCancelledError, runtimeInputDescriptor, runtimeCardDescriptor, runtimePlanDescriptor, } from './runtime-request-manager.js';
42
- export type { RuntimeRequestKind, RuntimeRequestContext, RuntimeRequestOptions, RuntimeResolveReason, RuntimeConsumeOutcome, RuntimeOutcomeMessage, RuntimeRequestCallInput, RuntimeRequestPreflightInput, RuntimeRequestPushInput, RuntimeRequestPushMatch, KindDescriptor, RuntimeInputRequestPayload, RuntimeInputRequestResult, RuntimeCardRequestPayload, RuntimeCardRequestResult, RuntimePlanRequestPayload, RuntimePlanRequestResult, } from './runtime-request-manager.js';
30
+ export type { RuntimeRequestKind, RuntimeRequestContext, RuntimeRequestOptions, RuntimeConsumeOutcome, RuntimeOutcomeMessage, RuntimeRequestCallInput, RuntimeRequestPreflightInput, RuntimeRequestPushInput, RuntimeRequestPushMatch, KindDescriptor, RuntimeInputRequestPayload, RuntimeInputRequestResult, RuntimeCardRequestPayload, RuntimeCardRequestResult, RuntimePlanRequestPayload, RuntimePlanRequestResult, } from './runtime-request-manager.js';
43
31
  export { ApprovalManager } from './approval-manager.js';
44
- export { generateApprovalId, buildApprovalRequest, buildApprovalReply, buildApprovalOutcome, redactSecrets, } from './approval-format.js';
45
- export { DEFAULT_APPROVAL_CONFIG, parseApprovalRequestMetadata, parseApprovalReplyMetadata, parseSessionRule, } from './approval-types.js';
32
+ export { generateApprovalId, buildApprovalRequest, buildApprovalOutcome, redactSecrets, } from './approval-format.js';
33
+ export { DEFAULT_APPROVAL_CONFIG, parseApprovalReplyMetadata, parseSessionRule, } from './approval-types.js';
46
34
  export type { ApprovalRequestCategory, ApprovalRequestDetail, ApprovalRequestMetadata, ApprovalNativeRequestMetadata, ApprovalRisk, ApprovalReplyMetadata, ApprovalOutcomeMetadata, SessionRule, ApprovalResult, ApprovalConfig, } from './approval-types.js';
47
35
  export { UNIFIED_DIFF_MAX_FILE_BYTES, UNIFIED_DIFF_MAX_FILES, UNIFIED_DIFF_MAX_TOTAL_BYTES, isSensitiveDiffPath, normalizeCanonUnifiedDiff, sanitizeUnifiedDiffForSharing, truncateUnifiedDiff, } from './unified-diff.js';
48
36
  export type { TruncateUnifiedDiffOptions } from './unified-diff.js';
49
37
  export { decodeStoredRuntimeCard } from '../backend-contracts/index.js';
50
- export { RUNTIME_CARD_SCHEMA_V1, RUNTIME_CARD_LIMITS, RUNTIME_CARD_FIELD_TYPES, RUNTIME_CARD_LINE_ITEM_COLUMN_TYPES, buildRuntimeCardOutcome, buildRuntimeCardPreview, buildRuntimeCardReply, buildRuntimeCardRequest, buildRuntimeInputOutcome, buildRuntimeInputReply, buildRuntimeInputRequest, parseRuntimeCardOutcomeMetadata, parseRuntimeCardReplyMetadata, parseRuntimeCardRequestMetadata, parseRuntimeCardV1, parseRuntimeInputOutcomeMetadata, parseRuntimeInputReplyMetadata, parseRuntimeInputRequestMetadata, resolveQuestionAllowOther, validateRuntimeCardFieldValues, } from './runtime-cards.js';
38
+ export { RUNTIME_CARD_SCHEMA_V1, RUNTIME_CARD_LIMITS, RUNTIME_CARD_FIELD_TYPES, RUNTIME_CARD_LINE_ITEM_COLUMN_TYPES, buildRuntimeCardOutcome, buildRuntimeCardPreview, buildRuntimeInputOutcome, parseRuntimeCardV1, validateRuntimeCardFieldValues, } from './runtime-cards.js';
51
39
  export type { PlanApprovalDecision, PlanApprovalMetadata, PlanApprovalReplyMetadata, RuntimeCardAction, RuntimeCardActionsBlock, RuntimeCardBlock, RuntimeCardBlockKind, RuntimeCardCalloutBlock, RuntimeCardChartBlock, RuntimeCardChartPoint, RuntimeCardChartSeries, RuntimeCardDetailsBlock, RuntimeCardDetailsRow, RuntimeCardField, RuntimeCardFieldChoice, RuntimeCardFieldType, RuntimeCardKnownBlockKind, RuntimeCardLineItemColumn, RuntimeCardLineItemColumnType, RuntimeCardListBlock, RuntimeCardListItem, RuntimeCardMediaKind, RuntimeCardMediaPreviewBlock, RuntimeCardMediaPreviewMedia, RuntimeCardMetric, RuntimeCardMetricGridBlock, RuntimeCardNativeMetadata, RuntimeCardOutcomeMetadata, RuntimeCardPreview, RuntimeCardReplyMetadata, RuntimeCardReplyStatus, RuntimeCardRequestMetadata, RuntimeCardResolutionStatus, RuntimeCardSchemaV1, RuntimeCardSummaryBlock, RuntimeCardTableBlock, RuntimeCardTone, RuntimeCardUnknownBlock, RuntimeCardV1, RuntimeInputAnswers, RuntimeInputChoice, RuntimeInputKind, RuntimeInputNativeMetadata, RuntimeInputOutcomeMetadata, RuntimeInputQuestion, RuntimeInputReplyMetadata, RuntimeInputReplyStatus, RuntimeInputRequestMetadata, RuntimeInputResolutionStatus, } from './runtime-cards.js';
52
- export { DEFAULT_TURN_TRAIL_MAX_BLOCKS, DEFAULT_TURN_TRAIL_METADATA_BUDGET_BYTES, buildBoundedTurnTrail, createTurnOutputController, } from './turn-output-controller.js';
53
- export type { BuildBoundedTurnTrailOptions, TurnOutputController, TurnOutputBlockInput, TurnOutputControllerOptions, TurnOutputMode, TurnOutputSnapshot, } from './turn-output-controller.js';
54
- export { DEFAULT_SILENT_TURN_PRECEDENCE, NO_REPLY_ACK_NOTE, NO_REPLY_REASON_SENTINEL, isSilentTurnSuppressed, reportNoReplyOutcome, resolveSilentTurnDelivery, } from './silent-turn.js';
55
- export type { NoReplyReportClient, SilentTurnPrecedence } from './silent-turn.js';
56
- export { DEFAULT_TURN_VERBOSITY_BY_CONVERSATION_TYPE, QUIET_SUPPRESSES_TURN_TRAIL, normalizeTurnVerbosityConversationType, parseTurnVerbosityConfig, resolveTurnVerbosity, shouldPublishTurnTrail, } from './turn-verbosity.js';
40
+ export { NO_REPLY_ACK_NOTE, NO_REPLY_REASON_SENTINEL, reportNoReplyOutcome, } from './silent-turn.js';
41
+ export type { NoReplyReportClient } from './silent-turn.js';
42
+ export { DEFAULT_TURN_VERBOSITY_BY_CONVERSATION_TYPE, normalizeTurnVerbosityConversationType, parseTurnVerbosityConfig, resolveTurnVerbosity, } from './turn-verbosity.js';
57
43
  export type { TurnVerbosity, TurnVerbosityConfig, TurnVerbosityConversationType, } from './turn-verbosity.js';
58
- export { clearPendingRegistration, getOrCreatePendingRegistration, loadPendingRegistrations, loadProfiles, savePendingRegistrations, saveProfiles, updatePendingRegistration, upsertAgentProfile, isProfileLocked, acquireLock, releaseLock, isProcessAlive, CANON_DIR, AGENTS_PATH, LOCKS_DIR, } from './agent-profiles.js';
44
+ export { clearPendingRegistration, loadPendingRegistrations, loadProfiles, savePendingRegistrations, saveProfiles, upsertAgentProfile, isProfileLocked, acquireLock, releaseLock, isProcessAlive, CANON_DIR, AGENTS_PATH, LOCKS_DIR, } from './agent-profiles.js';
59
45
  export type { AgentProfile, AgentProfileInput, PendingRegistration, ProfileLockHandle, } from './agent-profiles.js';
60
- export { resolveCanonAgent, resolveCanonProfile, verifyResolvedAgentEnvironment, getActiveProfile, getActiveProfileLock, } from './agent-resolver.js';
61
- export type { ResolvedAgent } from './agent-resolver.js';
62
- export { RUNTIMES_DIR, buildLocalRuntimeId, clearRuntimeSessionState, describeProfileLock, heartbeatLocalRuntimeEntry, listLocalRuntimeEntries, loadRuntimeSessionState, markLocalRuntimeStopped, readLocalRuntimeEntry, resetCodexRuntimeSessionState, resetRuntimeSessionState, resolveLocalRuntimeSessionState, saveRuntimeSessionState, upsertLocalRuntimeEntry, } from './local-runtime-catalog.js';
63
- export type { LocalRuntimeCatalogEntry, LocalRuntimeKind, LocalRuntimeResumeField, LocalRuntimeReviveCapability, LocalRuntimeSessionResolution, LocalRuntimeSessionState, LocalRuntimeStatus, } from './local-runtime-catalog.js';
64
- export { buildConfiguredWorkspaceOptions, buildConversationEnvironmentKey, buildConversationWorktreeSpec, buildPublicWorkspaceOptions, buildWorkspaceOptionId, EXECUTION_ENVIRONMENT_MODES, isEnabledFlag, isExecutionEnvironmentMode, normalizeOptionalString, resolveConfiguredWorkspaceCwd, ExecutionEnvironmentError, prepareConversationEnvironment, releaseConversationEnvironment, } from './execution-environment.js';
65
- export type { ConfiguredWorkspaceOption, ExecutionEnvironmentMode, PreparedExecutionEnvironment, } from './execution-environment.js';
66
46
  export { initRTDBAuth, } from './rtdb-rest.js';
67
47
  export type { AgentSessionSnapshotPatch, RTDBClientHandle, RuntimeActivityPayloadData, RuntimeInfoPayloadData, SessionStatePayload, TurnStatePayload, } from './rtdb-rest.js';
68
- export { CANON_TURN_CONTEXT_SCHEMA_V2, buildCanonReplyContextLines, buildCanonTurnContextV2, buildHydratedInboundContext, hydrateCanonReplyContext, createConversationMetadataLoader, decideAutoReply, publishHostAgentRuntime, publishHostSessionSnapshots, renderCanonHostInboundContent, renderCanonTurnBriefPrompt, resolveCanonReplyContext, } from './host-runtime.js';
69
- export type { CanonTurnContextAttachmentV2, CanonTurnContextBehaviorV2, CanonTurnContextContactCardV2, CanonTurnContextParticipationV2, CanonTurnContextProvenanceV2, CanonTurnContextReplyContextV2, CanonTurnContextV2, } from './host-runtime.js';
70
- export type { CanonReplyContext, AutoReplyDecision, HostInboundParticipantContext, } from './host-runtime.js';
71
- export { CANON_INBOUND_FRAME_SCHEMA_V1, buildCanonInboundFrameV1, renderCodingHostInboundPrompt, renderOpenClawSystemPrompt, } from './inbound-frame.js';
72
- export type { CanonInboundFrameShapeV1, CanonInboundFrameV1, CanonInboundPromptOptions, } from './inbound-frame.js';
73
- export { buildCanonGroupContext, buildCanonKnownRecentParticipants, buildCompactGroupContextLines, diffCanonMemberIds, } from './group-context.js';
48
+ export { renderCanonHostInboundContent, } from './host-runtime.js';
49
+ export type { CanonReplyContext, } from './host-runtime.js';
74
50
  export { createRuntimeStatePublisher, } from './runtime-state-publisher.js';
75
51
  export type { RuntimeStatePublisher, RuntimeStatePublisherOptions, RuntimeStreamingPayload, ClearRuntimeActivityOptions, } from './runtime-state-publisher.js';
76
- export { createTypingStatusPublisher, } from './typing-status-publisher.js';
77
- export type { TypingPresenceStatus, TypingStatusPublisher, TypingStatusPublisherOptions, } from './typing-status-publisher.js';
78
- export { buildChunkedMessagePartMetadata, CANON_MESSAGE_TEXT_MAX_BYTES, ChunkedSendMessageError, DEFAULT_CHUNKED_MESSAGE_TEXT_MAX_BYTES, sendMessageWithRetryChunked, isCanonMessageIdConflict, isPendingCanonOperation, isChunkedSendMessageError, isRetryableCanonDeliveryError, sendMessageWithRetry, splitTextByUtf8Bytes, utf8ByteLength, } from './retry.js';
52
+ export { buildChunkedMessagePartMetadata, CANON_MESSAGE_TEXT_MAX_BYTES, ChunkedSendMessageError, DEFAULT_CHUNKED_MESSAGE_TEXT_MAX_BYTES, sendMessageWithRetryChunked, isPendingCanonOperation, isChunkedSendMessageError, isRetryableCanonDeliveryError, sendMessageWithRetry, splitTextByUtf8Bytes, utf8ByteLength, } from './retry.js';
79
53
  export type { ChunkedMessagePartMetadataInput, ChunkedSendMessageResult, SendMessageChunkingOptions, SendMessageRetryOptions, } from './retry.js';
80
- export { formatCanonMessageAsText } from './message-format.js';
81
- export { DEFAULT_BASE_URL, DEFAULT_STREAM_URL, DEFAULT_RTDB_URL, FIREBASE_WEB_API_KEY } from './constants.js';
54
+ export { DEFAULT_BASE_URL } from './constants.js';
82
55
  export { CANON_RUNTIME_ENDPOINT_DEFAULTS, DEFAULT_CANON_ENVIRONMENT_ID, DEFAULT_CANON_RUNTIME_ENDPOINTS, getCanonRuntimeEndpointDefaults, requireCanonRuntimeEndpointDefaults, resolveCanonRuntimeConnection, verifyCanonRuntimeConnection, } from './runtime-endpoints.js';
83
56
  export type { CanonRuntimeConnection, CanonRuntimeConnectionOptions, CanonRuntimeEndpointDefaults, } from './runtime-endpoints.js';
84
57
  export { CANON_ENVIRONMENT_CONTRACTS, getCanonEnvironmentContract, } from '../backend-contracts/index.js';
@@ -86,22 +59,8 @@ export type { CanonEnvironmentContract, CanonEnvironmentId, CanonEnvironmentName
86
59
  export { resolveCanonBaseUrl } from './base-url.js';
87
60
  export { handleCliMetadataRequest, isDirectExecution, readCliPackageVersion, runCli, } from './cli-metadata.js';
88
61
  export type { CliMetadata, RunCliMetadataOptions, } from './cli-metadata.js';
89
- export { ControlChannelPoller, type ControlChannelKey, type ControlChannelPollerOptions, type ControlChannelRTDB, type ControlHandlerResult, type ControlPollerCadence, type ControlPollerError, type ControlPrimitiveEvent, type ControlPrimitiveHandlerConfig, type ControlSignalEvent, type ControlSignalHandlerConfig, type ControlSignalType } from './control-poller.js';
90
- export { CANON_VERB_NAMES, CANON_VERB_NAMESPACE, CANON_VERBS_SCHEMA_ID, CANON_VERBS_SCHEMA_VERSION, CANON_VERB_WIRE_SCHEMA_ID, CANON_VERB_WIRE_SCHEMA_VERSION, CANON_CARD_SCHEMA_ID, VERB_LIMITS, VERB_RATE_LIMITS, VERB_WIRE_ENVELOPE_FIELDS, canonVerbToolName, findVerbByteLimitViolations, findVerbWireEnvelopeViolations, getVerbInputSchema, getVerbResultSchema, mergeVerbWireToIntent, normalizeVerbNativeMetadata, projectVerbIntentToWire, type CanonVerbName, type CanonVerbWireEnvelope, type CanonVerbWireRequest, type CanonVerbWireResponse, type CanonVerbJsonSchema, type GetVerbSchemaOptions, type SendToInput, type SendToResult, type VerbMessageOptions, type VerbNativeMetadata, type VerbWireAccepted, type VerbWireBody, } from '../backend-contracts/index.js';
62
+ export { CANON_VERB_NAMES, CANON_VERB_NAMESPACE, CANON_VERBS_SCHEMA_ID, CANON_VERBS_SCHEMA_VERSION, CANON_VERB_WIRE_SCHEMA_ID, CANON_VERB_WIRE_SCHEMA_VERSION, CANON_CARD_SCHEMA_ID, VERB_LIMITS, VERB_RATE_LIMITS, VERB_WIRE_ENVELOPE_FIELDS, canonVerbToolName, findVerbByteLimitViolations, findVerbWireEnvelopeViolations, getVerbResultSchema, mergeVerbWireToIntent, normalizeVerbNativeMetadata, projectVerbIntentToWire, type CanonVerbName, type CanonVerbWireEnvelope, type CanonVerbWireRequest, type CanonVerbWireResponse, type CanonVerbJsonSchema, type SendToInput, type SendToResult, type VerbMessageOptions, type VerbNativeMetadata, type VerbWireAccepted, type VerbWireBody, } from '../backend-contracts/index.js';
91
63
  export { DEFAULT_DISCOVER_AGENTS_LIMIT, MAX_DISCOVER_AGENTS_LIMIT, MAX_DISCOVER_AGENTS_QUERY_LENGTH, type CanonAgentDirectoryEntry, type DiscoverAgentsInput, type DiscoverAgentsResult, } from '../backend-contracts/index.js';
92
64
  export { parseDirectConversationSelection, readCommunicationRule, type CommunicateInput, type CommunicateResult, type CommunicationRule, type DirectConversationSelection, type StartDirectInput, type StartDirectResult, } from '../backend-contracts/index.js';
93
65
  export { canonMediaDownloadUrl, sanitizeDownloadFileName, buildMediaContentDisposition, getStoredFileExtension } from '../backend-contracts/index.js';
94
- export type { NativeSessionInteractionBridge, NativeSessionInteractionRequest, NativeSessionInteractionResult } from './native-session-interaction.js';
95
- export { NativeWorkSessionCreateError } from './work-session-provider.js';
96
- export type { NativeWorkSessionProvider, NativeWorkSessionCreated, NativeWorkSessionCreateContext } from './work-session-provider.js';
97
- export * from './exclusive-json-file-store.js';
98
66
  export * from './completed-output-journal.js';
99
- export type { WorkSessionChoice, WorkSessionModelChoice, WorkSessionSettings, WorkSessionSelection, WorkSessionLoadedSession, WorkSessionCatalog, WorkSessionRuntimeIdentity, WorkSessionRuntimeLease, WorkSessionRuntimeRegistration, WorkSessionBinding, WorkSessionRuntimeState, WorkSessionCatalogResult, RequestWorkSessionInput, WorkSessionRequestStatus, WorkSessionRequest, WorkSessionCompletion, WorkSessionRuntimeAuth, WorkSessionClaimInput, WorkSessionClaimResult, CompleteWorkSessionInput, WorkSessionHeartbeatInput, ReleaseWorkSessionBindingInput, GetWorkSessionRequestInput, WorkSessionReportInput, WorkSessionDetailFields, WorkSessionDetailField, } from '../backend-contracts/index.js';
100
- export { ARTIFACT_IMAGE_MIME_TYPES, ArtifactMemory, CanonArtifactError, artifactCommandId, artifactRequestUuid, createConversationArtifacts, sniffArtifactImageType, summarizeArtifactReferences, } from './artifacts.js';
101
- export type { ArtifactAddImageInput, ArtifactAddImageResult, ArtifactConflictView, ArtifactCreateInput, ArtifactGenerateImageInput, ArtifactGenerateImageResult, ArtifactIdDerivation, ArtifactInputValue, ArtifactList, ArtifactListItem, ArtifactRoomHost, ArtifactUpdateAction, ArtifactUpdateResult, ArtifactWriteView, CanonArtifactErrorCode, CanonConversationArtifacts, } from './artifacts.js';
102
- export { ARTIFACT_CONTEXT_PROTOCOL, ARTIFACT_FORM_FIELD_TYPES, ARTIFACT_ID_PATTERN, ARTIFACT_KEY_PATTERN, ARTIFACT_KINDS, ARTIFACT_LIMITS, ARTIFACT_PROTOCOL_VERSION, artifactActivityText, isCanonArtifactEnvironmentEnabled, parseArtifactContext, readArtifactContext, } from '../backend-contracts/index.js';
103
- export { ARTIFACT_ACTION_SEMANTICS, ARTIFACT_TOOL_NAMES, ARTIFACT_UPDATE_ACTION_TYPES, ArtifactValidationError, artifactActionSchemas, artifactToolInputSchemas, parseArtifactAddImageAction, parseArtifactCreateAction, parseArtifactCreateToolInput, parseArtifactGenerateImageAction, parseArtifactImageRegion, parseArtifactImageSource, parseArtifactUpdateAction, } from '../backend-contracts/index.js';
104
- export type { ArtifactActionSchemas, ArtifactActionValue, ArtifactAddImageAction, ArtifactCellAction, ArtifactCreateAction, ArtifactCreateToolInput, ArtifactGenerateImageAction, ArtifactImageSource, ArtifactJsonSchema, ArtifactRowAction, ArtifactToolName, } from '../backend-contracts/index.js';
105
- export type { ArtifactAsset, ArtifactChessPlayers, ArtifactCommand, ArtifactContext, ArtifactDefinition, ArtifactDomainOutcome, ArtifactFormColumn, ArtifactFormField, ArtifactFormFieldRemoval, ArtifactFormFieldType, ArtifactFormRow, ArtifactFormTable, ArtifactFormValue, ArtifactImageVariant, ArtifactJson, ArtifactKind, ArtifactReadResult, ArtifactReference, ArtifactReferenceOrigin, ArtifactSelection, ArtifactSnapshot, } from '../backend-contracts/index.js';
106
- export { ArtifactRejectedError, describeArtifact, summarizeArtifact, isTerminalImageGenerationError } from '../endpoint/index.js';
107
- export type { ArtifactChessMoveView, ArtifactChessView, ArtifactConflict, ArtifactFormChangeView, ArtifactFormFieldView, ArtifactFormView, ArtifactImageRegion, ArtifactImageVariantView, ArtifactImageView, ArtifactLibrary, ArtifactPrincipalView, ArtifactView, } from '../endpoint/index.js';
@@ -1,21 +1,5 @@
1
- import type { RegistrationInput, RegistrationResult, RegistrationStatus } from './types.js';
2
- /**
3
- * Registers a new Canon agent and polls for owner approval.
4
- *
5
- * Flow:
6
- * 1. POST /agents/register -> returns requestId
7
- * 2. Poll GET /agents/status/:requestId until approved/rejected/timeout
8
- * 3. On approval, returns the API key
9
- */
10
- export declare function registerAndWaitForApproval(input: RegistrationInput, callbacks?: {
11
- onSubmitted?: (requestId: string, pollToken?: string) => void | Promise<void>;
12
- onPollUpdate?: (status: RegistrationStatus) => void | Promise<void>;
13
- }): Promise<RegistrationResult>;
1
+ import type { RegistrationInput } from './types.js';
14
2
  export declare function submitRegistrationRequest(input: RegistrationInput): Promise<{
15
3
  requestId: string;
16
4
  pollToken?: string;
17
5
  }>;
18
- export declare function waitForRegistrationApproval(baseUrl: string | undefined, requestId: string, pollToken?: string, callbacks?: {
19
- onPollUpdate?: (status: RegistrationStatus) => void | Promise<void>;
20
- }): Promise<RegistrationResult>;
21
- export declare function ackRegistrationApproval(baseUrl: string | undefined, requestId: string, pollToken?: string): Promise<void>;
@@ -37,15 +37,6 @@ export interface SendMessageChunkingOptions {
37
37
  export interface ChunkedSendMessageResult {
38
38
  messageIds: string[];
39
39
  }
40
- /**
41
- * The server's message-id idempotency guard rejecting a send.
42
- *
43
- * A byte-identical replay of a message succeeds (`created: false`), so a 409
44
- * `MESSAGE_ID_EXISTS` means a message already exists under this id whose stored
45
- * content diverges from what is being sent now. Either way the id is TAKEN:
46
- * that message is durable in Canon and re-sending it is impossible.
47
- */
48
- export declare function isCanonMessageIdConflict(error: unknown): boolean;
49
40
  /** Pending delivery is visible, but cannot truthfully produce a failure notice. */
50
41
  export declare function isPendingCanonOperation(error: unknown): boolean;
51
42
  /**
@@ -116,10 +116,6 @@ interface RTDBAuthOptions {
116
116
  firebaseApiKey?: string;
117
117
  }
118
118
  export interface RTDBClientHandle {
119
- observeControls?(changed: (conversationId?: string) => void, connected: (value: boolean) => void): () => void;
120
- /** Consume only the exact value returned by this handle before dispatch. */
121
- consume(path: string, observed: unknown): Promise<void>;
122
- observedRevision(path: string, observed: unknown): string | undefined;
123
119
  read(path: string): Promise<unknown>;
124
120
  write(path: string, data: unknown): Promise<void>;
125
121
  patch(path: string, data: unknown): Promise<void>;
@@ -96,7 +96,6 @@ export interface RuntimeInputOutcomeMetadata {
96
96
  reason?: 'submitted' | 'cancelled' | 'timeout' | 'expired' | 'interrupted';
97
97
  }
98
98
  export declare const RUNTIME_CARD_SCHEMA_V1: "canon.card.v1";
99
- export declare const RUNTIME_CARD_PUBLIC_REQUEST_TEXT: "Action requested";
100
99
  export type RuntimeCardSchemaV1 = typeof RUNTIME_CARD_SCHEMA_V1;
101
100
  export type RuntimeCardBlockKind = 'summary' | 'metricGrid' | 'chart' | 'table' | 'list' | 'callout' | 'actions' | 'mediaPreview' | 'details';
102
101
  export type RuntimeCardTone = 'neutral' | 'primary' | 'positive' | 'warning' | 'negative' | 'danger' | 'critical' | 'welcome';
@@ -268,29 +267,10 @@ export interface RuntimeCardOutcomeMetadata {
268
267
  turnSemantics: 'control';
269
268
  replyBehavior: 'suppress_auto_reply';
270
269
  }
271
- /**
272
- * Mac-app parity: a choice-bearing question always offers a free-text "Other"
273
- * escape hatch unless the producing agent explicitly opts out. Shared by every
274
- * runtime's question mapper so the fallback is consistent across agents.
275
- */
276
- export declare function resolveQuestionAllowOther(hasChoices: boolean, explicit?: unknown): boolean;
277
270
  /** Block kinds this version of core knows how to fully normalize/render. */
278
271
  export type RuntimeCardKnownBlockKind = 'summary' | 'metricGrid' | 'chart' | 'table' | 'list' | 'callout' | 'actions' | 'mediaPreview' | 'details';
279
272
  export declare function parseRuntimeCardV1(value: unknown): RuntimeCardV1 | null;
280
273
  export declare function buildRuntimeCardPreview(card: RuntimeCardV1): RuntimeCardPreview;
281
- export declare function buildRuntimeInputRequest(inputId: string, input: Omit<RuntimeInputRequestMetadata, 'type' | 'inputId'>): {
282
- text: string;
283
- metadata: RuntimeInputRequestMetadata;
284
- };
285
- export declare function buildRuntimeInputReply(inputId: string, status: RuntimeInputReplyStatus, details?: {
286
- kind?: RuntimeInputKind;
287
- answerSummary?: string;
288
- answersSummary?: string;
289
- sensitive?: boolean;
290
- }): {
291
- text: string;
292
- metadata: RuntimeInputReplyMetadata;
293
- };
294
274
  export declare function buildRuntimeInputOutcome(inputId: string, status: RuntimeInputResolutionStatus, details?: {
295
275
  kind?: RuntimeInputKind;
296
276
  reason?: RuntimeInputOutcomeMetadata['reason'];
@@ -298,34 +278,9 @@ export declare function buildRuntimeInputOutcome(inputId: string, status: Runtim
298
278
  text: string;
299
279
  metadata: RuntimeInputOutcomeMetadata;
300
280
  };
301
- export declare function buildRuntimeCardRequest(card: RuntimeCardV1, input: {
302
- cardId?: string;
303
- responseUserId?: string;
304
- expiresAt: string | number | Date;
305
- runtimeId?: string;
306
- turnId?: string;
307
- native?: RuntimeCardNativeMetadata;
308
- }): {
309
- text: string;
310
- metadata: RuntimeCardRequestMetadata;
311
- };
312
- export declare function buildRuntimeCardReply(cardId: string, status: RuntimeCardReplyStatus, details?: {
313
- actionId?: string;
314
- answerSummary?: string;
315
- sensitive?: boolean;
316
- }): {
317
- text: string;
318
- metadata: RuntimeCardReplyMetadata;
319
- };
320
281
  export declare function buildRuntimeCardOutcome(cardId: string, status: RuntimeCardResolutionStatus, details?: {
321
282
  reason?: RuntimeCardOutcomeMetadata['reason'];
322
283
  }): {
323
284
  text: string;
324
285
  metadata: RuntimeCardOutcomeMetadata;
325
286
  };
326
- export declare function parseRuntimeInputRequestMetadata(value: unknown): RuntimeInputRequestMetadata | null;
327
- export declare function parseRuntimeCardRequestMetadata(value: unknown): RuntimeCardRequestMetadata | null;
328
- export declare function parseRuntimeCardReplyMetadata(value: unknown): RuntimeCardReplyMetadata | null;
329
- export declare function parseRuntimeCardOutcomeMetadata(value: unknown): RuntimeCardOutcomeMetadata | null;
330
- export declare function parseRuntimeInputReplyMetadata(value: unknown): RuntimeInputReplyMetadata | null;
331
- export declare function parseRuntimeInputOutcomeMetadata(value: unknown): RuntimeInputOutcomeMetadata | null;
@@ -1,75 +1,16 @@
1
1
  export { normalizeRuntimeCommandAlias, normalizeRuntimeCommandAliases } from '../backend-contracts/index.js';
2
2
  import type { ExecutionEnvironmentMode } from './execution-environment-mode.js';
3
- import { type AgentCapabilities, type AgentClientType, type CanonControlDescriptor, type CanonControlLiveBehavior, type CanonRuntimeCommandDescriptor, type CanonRuntimeDescriptor, type CanonRuntimeStreamingMode, type CanonRuntimeTurnModeDescriptor, type CanonWorkspaceRootMetadata, type ModelOption, type PermissionModeOption, type WorkspaceOption } from './types.js';
4
- import type { CanonRuntimePresentationPolicy } from './types.js';
5
- import type { HostAdmissionActionCapabilities } from './turn-protocol.js';
3
+ import type { CanonRuntimeCommandDescriptor } from './types.js';
6
4
  export interface NormalizeRuntimeCommandDescriptorsOptions {
7
5
  reservedAliases?: Iterable<string>;
8
6
  maxCommands?: number;
9
7
  }
10
8
  export declare function normalizeRuntimeCommandDescriptors(commands: ReadonlyArray<CanonRuntimeCommandDescriptor>, options?: NormalizeRuntimeCommandDescriptorsOptions): CanonRuntimeCommandDescriptor[];
11
- /**
12
- * Default reasoning/thinking-level options. This is plain data, not Claude
13
- * logic — any coding agent can reuse it or supply its own option set. Each
14
- * agent passes its native effort levels into the shared descriptor builder.
15
- */
16
- export declare const EFFORT_OPTIONS: readonly [{
17
- readonly value: "low";
18
- readonly label: "Low";
19
- }, {
20
- readonly value: "medium";
21
- readonly label: "Medium";
22
- }, {
23
- readonly value: "high";
24
- readonly label: "High";
25
- }, {
26
- readonly value: "xhigh";
27
- readonly label: "Extra high";
28
- }, {
29
- readonly value: "max";
30
- readonly label: "Max";
31
- }];
32
9
  export declare const EXECUTION_MODE_CONTROL_OPTIONS: ReadonlyArray<{
33
10
  value: ExecutionEnvironmentMode;
34
11
  label: string;
35
12
  description: string;
36
13
  }>;
37
- export declare function buildRuntimeWorkspaceControlOptions(workspaces: ReadonlyArray<WorkspaceOption>): ModelOption[];
38
14
  export declare const RUNTIME_STOP_ACTION: CanonRuntimeCommandDescriptor;
39
15
  export declare const RUNTIME_STOP_AND_DROP_ACTION: CanonRuntimeCommandDescriptor;
40
16
  export declare const RUNTIME_NEW_SESSION_ACTION: CanonRuntimeCommandDescriptor;
41
- export declare function buildFirstPartyCodingRuntimeDescriptor(input: {
42
- /**
43
- * Any agent client type may use this builder. Per-agent differences are
44
- * driven by the {@link AGENT_CAPABILITIES} table and the option/behavior
45
- * fields below — not by hard-coded clientType branches — so adding a coding
46
- * agent is a capability-table entry plus its own option lists.
47
- */
48
- clientType: AgentClientType;
49
- models: ReadonlyArray<ModelOption>;
50
- workspaces: ReadonlyArray<WorkspaceOption>;
51
- workspaceRoots?: ReadonlyArray<CanonWorkspaceRootMetadata>;
52
- executionModes: ReadonlyArray<ExecutionEnvironmentMode>;
53
- /** Deployer-owned local default used when a conversation has no override. */
54
- defaultExecutionMode?: ExecutionEnvironmentMode;
55
- permissionModes?: ReadonlyArray<PermissionModeOption>;
56
- defaultPermissionMode?: string | null;
57
- /** Permission-mode control label override (e.g. Codex uses "Execution policy"). */
58
- permissionModeLabel?: string;
59
- /** Effort/thinking-level options. When provided, an effort control is emitted. */
60
- effortOptions?: ReadonlyArray<ModelOption>;
61
- defaultEffort?: string | null;
62
- effortLiveBehavior?: CanonControlLiveBehavior;
63
- /** Model control live behavior. Defaults to immediate; Codex applies next turn. */
64
- modelLiveBehavior?: 'immediate' | 'next_turn';
65
- /** Capability overrides; defaults to the AGENT_CAPABILITIES entry for clientType. */
66
- capabilities?: AgentCapabilities;
67
- commands?: ReadonlyArray<CanonRuntimeCommandDescriptor>;
68
- turnModes?: ReadonlyArray<CanonRuntimeTurnModeDescriptor>;
69
- /** Extra runtime controls appended after the built-in effort control. */
70
- extraRuntimeControls?: ReadonlyArray<CanonControlDescriptor>;
71
- streamingTextMode: CanonRuntimeStreamingMode;
72
- admissionActions?: HostAdmissionActionCapabilities;
73
- presentation?: CanonRuntimePresentationPolicy;
74
- runtimeCards?: CanonRuntimeDescriptor['runtimeCards'];
75
- }): CanonRuntimeDescriptor;
@@ -1,35 +1,9 @@
1
- import type { AgentRuntime, AgentSessionSnapshot, CanonRuntimeActivityItem, CanonRuntimeDescriptor, CanonRuntimePresentationField, CanonRuntimePresentationPolicy, RuntimeInfoPayload } from './types.js';
2
- export declare const RUNTIME_PRESENTATION_FIELDS: readonly ["model", "permissionMode", "effort", "workspace", "executionMode", "contextUsage", "cwd", "branch", "worktreePath", "workspaceRoot", "workspaceRelativePath", "fallbackReason"];
3
- export declare const DEFAULT_FIRST_PARTY_RUNTIME_PRESENTATION: CanonRuntimePresentationPolicy;
4
- export declare function isRuntimePresentationField(value: string): value is CanonRuntimePresentationField;
5
- export declare function buildRuntimePresentationPolicy(input?: {
6
- preset?: CanonRuntimePresentationPolicy['preset'];
7
- show?: ReadonlyArray<string>;
8
- hide?: ReadonlyArray<string>;
9
- base?: CanonRuntimePresentationPolicy;
10
- }): CanonRuntimePresentationPolicy;
1
+ import type { AgentSessionSnapshot, CanonRuntimeActivityItem, CanonRuntimeDescriptor, CanonRuntimePresentationField, RuntimeInfoPayload } from './types.js';
11
2
  export declare function isRuntimePresentationFieldHidden(descriptor: CanonRuntimeDescriptor | null | undefined, field: CanonRuntimePresentationField): boolean;
12
3
  export declare function redactRuntimeActivityItemForConversation(item: CanonRuntimeActivityItem): CanonRuntimeActivityItem | null;
13
4
  export declare function redactRuntimeInfoForConversation<T extends Partial<Omit<RuntimeInfoPayload, 'updatedAt'>> | RuntimeInfoPayload>(payload: T, options?: {
14
5
  descriptor?: CanonRuntimeDescriptor | null;
15
6
  }): T;
16
- export declare function redactAgentRuntimeForConversation(runtime: AgentRuntime): AgentRuntime;
17
- type SessionStatePresentationLike = {
18
- model?: unknown;
19
- permissionMode?: unknown;
20
- effort?: unknown;
21
- cwd?: unknown;
22
- executionMode?: unknown;
23
- executionBranch?: unknown;
24
- worktreePath?: unknown;
25
- executionFallbackReason?: unknown;
26
- contextUsage?: unknown;
27
- availableModels?: unknown;
28
- runtimeControlValues?: Record<string, unknown>;
29
- controlState?: Record<string, unknown>;
30
- };
31
- export declare function redactSessionStateForConversation<T extends SessionStatePresentationLike>(descriptor: CanonRuntimeDescriptor | null | undefined, state: T): T;
32
7
  export declare function redactAgentSessionSnapshotForConversation(descriptor: CanonRuntimeDescriptor | null | undefined, snapshot: Partial<AgentSessionSnapshot> & Record<string, unknown>, options?: {
33
8
  patch?: boolean;
34
9
  }): Partial<AgentSessionSnapshot> & Record<string, unknown>;
35
- export {};
@@ -10,7 +10,6 @@ export interface RuntimeRequestContext {
10
10
  agentId: string;
11
11
  ownerId: string;
12
12
  }
13
- export type RuntimeResolveReason = 'replied' | 'timeout' | 'aborted';
14
13
  /** Normalized outcome of a single consume poll. */
15
14
  export type RuntimeConsumeOutcome<Result> = {
16
15
  state: 'pending';
@@ -20,42 +20,3 @@ export interface CanonSelfContext {
20
20
  createdAt?: string | null;
21
21
  updatedAt?: string | null;
22
22
  }
23
- export interface SelfContextPromptRenderOptions {
24
- maxSelfContexts?: number;
25
- }
26
- export declare function normalizeSelfContexts(selfContexts?: CanonSelfContext[] | null, options?: SelfContextPromptRenderOptions): CanonSelfContext[];
27
- export declare function resolveMessageActiveSelfContextId(input: {
28
- messageId?: string | null;
29
- activeSelfContextId?: string | null;
30
- activeSelfContextIdByMessageId?: Record<string, string> | null;
31
- }): string | null;
32
- export declare function selectActiveSelfContexts(selfContexts?: CanonSelfContext[] | null, activeSelfContextId?: string | null): CanonSelfContext[];
33
- /**
34
- * Select private explanations for one inbound turn. A reply can activate only
35
- * the explanation attached to its exact target. Other recent explanations are
36
- * background, not a claim that the incoming message answers any one of them.
37
- */
38
- export declare function selectInboundSelfContexts(input: {
39
- selfContexts?: CanonSelfContext[] | null;
40
- replyTo?: string | null;
41
- /** Backend-validated association for this inbound message, when available. */
42
- linkedSelfContextId?: string | null;
43
- messages?: ReadonlyArray<{
44
- id?: string | null;
45
- text?: string | null;
46
- createdAt?: string | null;
47
- deleted?: boolean | null;
48
- }> | null;
49
- replyContext?: {
50
- messageId: string;
51
- text?: string | null;
52
- found: boolean;
53
- } | null;
54
- maxSelfContexts?: number;
55
- }): {
56
- activeSelfContextId: string | null;
57
- selfContexts: CanonSelfContext[];
58
- };
59
- export declare function buildSelfContextPromptLines(selfContexts?: CanonSelfContext[] | null, options?: SelfContextPromptRenderOptions & {
60
- activeSelfContextId?: string | null;
61
- }): string[];
@@ -2,8 +2,7 @@
2
2
  * Deliberate silence — the shared half of the `no_reply` verb.
3
3
  *
4
4
  * A turn that calls `no_reply` must end without posting anything: the trigger
5
- * gate is message-driven, so no message means no other agent is woken. Every
6
- * host wires its own teardown, but they all ask the same question here.
5
+ * gate is message-driven, so no message means no other agent is woken.
7
6
  */
8
7
  /**
9
8
  * The model-facing closure sentence, re-exported so a runtime that answers
@@ -48,39 +47,3 @@ export declare function reportNoReplyOutcome(client: NoReplyReportClient, params
48
47
  reason?: string;
49
48
  now?: number;
50
49
  }): void;
51
- /**
52
- * Owner ruling 2026-07-31 (docs/history/group-behavior-2026-08-01.md), as
53
- * implemented. `strict` (default): a no_reply call suppresses the final
54
- * unconditionally. `advisory`: non-empty final text overrides the sentinel.
55
- * ONE switch, so the ruling can be flipped without touching five hosts.
56
- */
57
- export type SilentTurnPrecedence = 'strict' | 'advisory';
58
- export declare const DEFAULT_SILENT_TURN_PRECEDENCE: SilentTurnPrecedence;
59
- export declare function resolveSilentTurnDelivery(input: {
60
- silenced: boolean;
61
- finalText: string | null | undefined;
62
- precedence?: SilentTurnPrecedence;
63
- }): 'deliver' | 'suppress';
64
- /**
65
- * Whether SILENCE is what withholds this turn's own output — the single
66
- * question every consumer of the ruling asks, so they cannot disagree.
67
- *
68
- * `resolveSilentTurnDelivery` answers "is there anything to deliver", which
69
- * also returns `suppress` for an ordinary turn that simply produced no text.
70
- * A caller deciding what ELSE a silenced turn withholds — its workspace
71
- * artifacts, its plan card — needs the narrower question, and deriving it by
72
- * hand (`silenced && ...`) is how a second, independent reading of
73
- * `DEFAULT_SILENT_TURN_PRECEDENCE` creeps in. Flipping that constant to
74
- * `advisory` must move a turn's text and its artifacts together: a turn that
75
- * talks about the chart it made and then ships no chart is worse than either
76
- * consistent behaviour.
77
- *
78
- * `finalText` is the MODEL's own text for the turn — never Canon's failure
79
- * notice, which is a host diagnostic rather than something the model said, and
80
- * which is delivered whether the turn went silent or not.
81
- */
82
- export declare function isSilentTurnSuppressed(input: {
83
- silenced: boolean;
84
- finalText: string | null | undefined;
85
- precedence?: SilentTurnPrecedence;
86
- }): boolean;
@@ -9,7 +9,6 @@ export interface RuntimeCapabilities {
9
9
  supportsRequiresAction: boolean;
10
10
  supportsNonFinalPermanentMessages: boolean;
11
11
  }
12
- export declare const FINAL_MESSAGE_HANDOFF_MS = 750;
13
12
  export interface TurnState {
14
13
  turnId?: string | null;
15
14
  state: TurnLifecycleState;
@@ -23,11 +22,7 @@ export interface TurnState {
23
22
  updatedAt?: number;
24
23
  completedAt?: number | null;
25
24
  }
26
- export declare const DEFAULT_RUNTIME_CAPABILITIES: RuntimeCapabilities;
27
25
  /** The one optional proactive communication capability a runtime may expose. */
28
26
  export interface HostAdmissionActionCapabilities {
29
27
  communicate: boolean;
30
28
  }
31
- export declare const HOST_ADMISSION_ACTION_CAPABILITIES: HostAdmissionActionCapabilities;
32
- export declare const HOST_ADMISSION_ACTIONS_DISABLED: HostAdmissionActionCapabilities;
33
- export declare function normalizeTurnState(value: unknown): TurnState | null;
@@ -22,10 +22,6 @@
22
22
  * Notes for the runtimes that consume this (the guards are per-integration):
23
23
  * - Suppress by CALL SITE, never by `turnSemantics === 'progress'` (D5): the
24
24
  * leading parts of a chunked final carry that semantic and are answer body.
25
- * - `TurnOutputController`'s `mode: 'status'` silences the `/streaming` writes
26
- * but does NOT suppress the trail — blocks still accumulate in memory and
27
- * `getFinalTrail()` still returns them. Gate the trail separately, with
28
- * `shouldPublishTurnTrail`, at every site that attaches it to a final.
29
25
  * - A quiet turn still clears `/streaming` at turn open (a surviving node from
30
26
  * an earlier turn would otherwise strand a stale bubble), still writes
31
27
  * `/turn-state`, and still writes `/typing`. Quiet removes the narration,
@@ -37,32 +33,20 @@ export type TurnVerbosity = 'verbose' | 'quiet';
37
33
  /** What a developer may write in config. `'auto'` === unset. */
38
34
  export type TurnVerbosityConfig = TurnVerbosity | 'auto';
39
35
  /**
40
- * Hermes spells a direct chat `'dm'` (adapter.py `_chat_type_from_conversation`);
41
- * the TS stack spells it `'direct'` and can also be `'unknown'` when the
42
- * conversation fetch failed (host-runtime.ts HostInboundParticipantContext).
43
- */
44
- export type TurnVerbosityConversationType = 'direct' | 'dm' | 'group' | 'unknown';
45
- /**
46
- * The per-conversation-type defaults. `canon-hermes-plugin` will hand-port this
47
- * map into Python — that package has no dependency on this one — and pin the
48
- * two sides with a cross-language parity test, the way it already does for the
49
- * turn-trail budgets and the group guidance wording.
36
+ * A direct chat is `'direct'`; the type is `'unknown'` when the conversation
37
+ * fetch failed (host-runtime.ts HostInboundParticipantContext).
50
38
  */
39
+ export type TurnVerbosityConversationType = 'direct' | 'group' | 'unknown';
40
+ /** The per-conversation-type defaults. */
51
41
  export declare const DEFAULT_TURN_VERBOSITY_BY_CONVERSATION_TYPE: {
52
42
  readonly direct: "verbose";
53
43
  readonly group: "quiet";
54
44
  readonly unknown: "verbose";
55
45
  };
56
- /**
57
- * Does quiet also drop the margin turnTrail rows on the final?
58
- * Owner ruling 5's open sub-question, answered YES. Named so a veto is a
59
- * one-line flip here rather than a five-host revert.
60
- */
61
- export declare const QUIET_SUPPRESSES_TURN_TRAIL: boolean;
62
46
  /**
63
47
  * Folds every spelling a runtime might hand us onto the three keys the
64
48
  * defaults map has. Accepts a raw string because the value arrives from
65
- * provenance, a conversation fetch, or a Python-side payload.
49
+ * provenance or a conversation fetch.
66
50
  */
67
51
  export declare function normalizeTurnVerbosityConversationType(value: string | null | undefined): 'direct' | 'group' | 'unknown';
68
52
  /**
@@ -93,5 +77,3 @@ export declare function resolveTurnVerbosity(input: {
93
77
  * `parse(flag) ?? parse(env)`, keeps working.
94
78
  */
95
79
  export declare function parseTurnVerbosityConfig(raw: string | null | undefined): TurnVerbosityConfig | null;
96
- /** Convenience for the trail attach sites; folds the ruling above in. */
97
- export declare function shouldPublishTurnTrail(verbosity: TurnVerbosity): boolean;