@codeam/shared 2.62.1 → 2.63.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/index.d.mts +64 -1
- package/dist/index.d.ts +64 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1713,6 +1713,67 @@ interface HeadroomUsageResult {
|
|
|
1713
1713
|
/** Relay command type for pulling the token-usage report. */
|
|
1714
1714
|
declare const HEADROOM_USAGE_COMMAND = "headroom_usage";
|
|
1715
1715
|
|
|
1716
|
+
/**
|
|
1717
|
+
* Session agent switch — wire types for the `switch_agent` relay command and
|
|
1718
|
+
* its progress/status SSE events.
|
|
1719
|
+
*
|
|
1720
|
+
* A live session can swap its coding agent (e.g. claude → codex) in-process:
|
|
1721
|
+
* mobile sends `switch_agent { agentId }` over the command relay; the CLI
|
|
1722
|
+
* pulls the vaulted credential (+ install script when the binary is missing),
|
|
1723
|
+
* restarts the ACP client on the new adapter, and reports progress via
|
|
1724
|
+
* `POST /api/agent-switch/events` → the per-user SSE bus
|
|
1725
|
+
* (`switch_agent_progress` / `switch_agent_status`).
|
|
1726
|
+
*
|
|
1727
|
+
* CANONICAL WIRE OWNER: this file (`@codeam/shared`), per the cross-repo
|
|
1728
|
+
* rule. The backend/mobile repo consumes it through the published package.
|
|
1729
|
+
*
|
|
1730
|
+
* Continuity contract: the conversation does NOT resume cross-agent (ACP
|
|
1731
|
+
* `session/load` ids are per-agent). Instead the CLI captures a bounded tail
|
|
1732
|
+
* of the prior conversation and prefixes it to the first post-switch prompt
|
|
1733
|
+
* (the "context handoff"), so the new agent continues with the session's
|
|
1734
|
+
* context in a fresh conversation.
|
|
1735
|
+
*/
|
|
1736
|
+
/** Relay command type mobile sends to switch the session's agent. */
|
|
1737
|
+
declare const SWITCH_AGENT_COMMAND = "switch_agent";
|
|
1738
|
+
/** Payload of the `switch_agent` relay command. */
|
|
1739
|
+
interface SwitchAgentCommand {
|
|
1740
|
+
/** Public agent id to switch to (catalog id, e.g. 'codex'). */
|
|
1741
|
+
agentId: string;
|
|
1742
|
+
}
|
|
1743
|
+
/**
|
|
1744
|
+
* Install-progress milestone emitted on the `switch_agent_progress` SSE event
|
|
1745
|
+
* while a switch is running. Must stay aligned with the backend's validator
|
|
1746
|
+
* (`apps/api-v2/src/agent-switch/agent-switch.controller.ts`) and the mobile
|
|
1747
|
+
* store — the backend 400s on any value outside this set.
|
|
1748
|
+
*
|
|
1749
|
+
* - `credential` — fetching + writing the vaulted credential for the target.
|
|
1750
|
+
* - `install` — target binary missing; running its install script.
|
|
1751
|
+
* - `restart` — old client stopped; new adapter starting (`session/new`).
|
|
1752
|
+
*/
|
|
1753
|
+
type SwitchAgentStep = 'credential' | 'install' | 'restart';
|
|
1754
|
+
/**
|
|
1755
|
+
* Terminal/steady switch state — carried on `switch_agent_status` and used by
|
|
1756
|
+
* mobile to flip the session's agent chip (`ready`) or render an actionable
|
|
1757
|
+
* error (`error`). `switching` is published once up-front so other paired
|
|
1758
|
+
* devices see the transition too.
|
|
1759
|
+
*/
|
|
1760
|
+
interface SwitchAgentStatus {
|
|
1761
|
+
state: 'switching' | 'ready' | 'error';
|
|
1762
|
+
/** Target public agent id of the switch. */
|
|
1763
|
+
agentId: string;
|
|
1764
|
+
/** Public agent id that was running before the switch was attempted. */
|
|
1765
|
+
fromAgentId?: string;
|
|
1766
|
+
/** Human-readable reason when `state === 'error'`. */
|
|
1767
|
+
error?: string;
|
|
1768
|
+
}
|
|
1769
|
+
/** Result payload the CLI acks the `switch_agent` command with. */
|
|
1770
|
+
interface SwitchAgentResult {
|
|
1771
|
+
ok: boolean;
|
|
1772
|
+
agentId: string;
|
|
1773
|
+
/** Set when `ok === false`. */
|
|
1774
|
+
error?: string;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1716
1777
|
/**
|
|
1717
1778
|
* Headroom provisioning manifest — the SINGLE source of truth for what a
|
|
1718
1779
|
* Headroom install consists of, rendered by every provisioning surface:
|
|
@@ -1883,6 +1944,8 @@ declare const USER_EVENTS: {
|
|
|
1883
1944
|
readonly CODERABBIT_PROGRESS: "coderabbit_progress";
|
|
1884
1945
|
readonly CODERABBIT_STATUS: "coderabbit_status";
|
|
1885
1946
|
readonly CODERABBIT_REVIEW: "coderabbit_review";
|
|
1947
|
+
readonly SWITCH_AGENT_PROGRESS: "switch_agent_progress";
|
|
1948
|
+
readonly SWITCH_AGENT_STATUS: "switch_agent_status";
|
|
1886
1949
|
readonly VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete";
|
|
1887
1950
|
/** PR-review launch progress toast — the "Review with an agent" flow shows a
|
|
1888
1951
|
* toast when the review runs server-side (Inngest). Mobile-only surface,
|
|
@@ -1909,4 +1972,4 @@ type UserEventName = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
|
|
|
1909
1972
|
*/
|
|
1910
1973
|
declare const PREVIEW_DETECT_PROMPT: string;
|
|
1911
1974
|
|
|
1912
|
-
export { AGENT_REGISTRY, AGENT_STANDARD_BLOCK, AGENT_STANDARD_MARKER, AGENT_STANDARD_TEXT, type AgentAuth, type AgentAuthKind, type AgentId, type AgentMetadata, type AgentMode, type AgentModel, type AgentReviewFinding, type AgentReviewPlan, type AgentReviewReport, type AnswerResolvedEvent, type AwaitingAnswerEvent, type BeadsActionCommand, type BeadsActionKind, type BeadsActionPayload, type BeadsActionRequest, type BeadsActionType, type BeadsConfigureAction, type BeadsDependencyDto, type BeadsDependencyKind, type BeadsIngestPayload, type BeadsIssueDto, type BeadsIssueStatus, type BeadsMemoryDto, type BeadsProjectDto, type BeadsProvisioningPayload, type BeadsProvisioningStatus, type BeadsSnapshotDto, type BeadsStatus, type BeadsStatusState, type BeadsStatusSummary, type BlameLineWire, type BrokeredIntegrationToken, CODER_PROMPT, type ChromeStep, type ChromeToolType, type CommitEntryWire, DEFAULT_API_BASE_URL, DEFAULT_GUARDRAIL_POLICY, DEP_TO_INTEGRATION, DEV_API_BASE_URL, type DerivedCredentialSource, type EnvVar, type FileBlameEvent, type FileChangeStatus, type FileChangedEvent, type FileHistoryEvent, type FileReviewStatus, GUARDRAIL_CATEGORIES, GUARDRAIL_CATEGORY_META, GUARDRAIL_CONFIGURE_COMMAND, GUARDRAIL_DISPOSITIONS, type GuardrailCategory, type GuardrailCategoryMeta, type GuardrailDisposition, type GuardrailPolicy, HEADROOM_BACKEND_ENV, HEADROOM_EXTRAS_BY_SURFACE, HEADROOM_MODELS, HEADROOM_PIP_COMPANIONS, HEADROOM_PROXY_PORT, HEADROOM_USAGE_COMMAND, HEARTBEAT_INTERVAL_MS_DEFAULT, HOUSE_AGENT_ID, HOUSE_AGENT_NAME, HOUSE_AGENT_PROVIDER, HOUSE_AGENT_SUBTITLE, HOUSE_AGENT_VENDOR, type HeadroomBudgetCommand, type HeadroomBudgetPeriod, type HeadroomBudgetUsage, type HeadroomKind, type HeadroomModelSpec, type HeadroomPythonRenderOpts, type HeadroomStatus, type HeadroomStep, type HeadroomSurface, type HeadroomUsageBucket, type HeadroomUsageGranularity, type HeadroomUsageReport, type HeadroomUsageResult, type HeadroomUsageSlice, type HeadroomUsageTotals, type HunkLineType, INTEGRATION_BRANDING, INTEGRATION_REGISTRY, INTERNAL_TO_PUBLIC, type InputSuggestionChunk, type IntegrationApiKeyField, type IntegrationAuthKind, type IntegrationBranding, type IntegrationCategory, type IntegrationDefinition, type IntegrationDelivery, type IntegrationHealth, type IntegrationId, type IntegrationMcpDelivery, type IntegrationStatus, type IntegrationsManifest, type IntegrationsManifestEntry, LINKED_AGENT_IDS, type LinkedAgentId, MODEL_CONTEXT_WINDOW, MODEL_PRICING, type ModelPricing, type NormalizedMessage, OBSERVER_BRIDGE_PORT, PACK_ACTION_COMMAND, PACK_REGISTRY, PACK_START_COMMAND, PACK_STATUS_COMMAND, PACK_WORKFLOW_ARTICLE, PREVIEW_DETECT_PROMPT, PROTOCOL_VERSION, PUBLIC_TO_INTERNAL, type PackActionKind, type PackActionPayload, type PackDefinition, type PackHandoffRecord, type PackId, type PackRunState, type PackRunStatus, type PackStageDef, type PackStageState, type PackStageStatus, type PackStartPayload, type PendingReviewHunkEvent, type PendingReviewHunkLine, type PrCheck, type PrRef, type PrReviewEntry, type PrReviewVerdict, type PreviewDetection, type PreviewErrorStage, type PreviewState, type PreviewStatus, type PullRequestDetail, type PullRequestSummary, QA_PROMPT, REVIEWER_PROMPT, type RemoteCommand, type RepoStack, type RepoStackDetection, SKILL_REGISTRY, SPECIFIER_PROMPT, SSE_SOCKET_TIMEOUT_MS, STACK_TO_RECOMMENDED, type SelectPrompt, type SkillDefinition, type SkillDelivery, type SkillFileDelivery, type SkillId, type SkillRail, type SkillsManifest, type SkillsManifestEntry, type StreamingChunkEvent, type StreamingChunkKind, TERMINAL_AGENT_PREFIX, UNKNOWN_MODEL_PRICING, UPCOMING_INTEGRATION_IDS, USER_EVENTS, type UserEventName, classifyStack, detectedIntegrationsFromDeps, getAgent, getContextWindow, getEnabledAgents, getEnabledIntegrations, getIntegration, getIntegrationBranding, getIntegrationsByCategory, getPackDefinition, getPricing, getSkillDefinition, headroomKindFor, headroomModelPredownloadScript, headroomPipPackage, headroomSnapshotDownloadLine, internalToPublic, isGuardrailDisposition, isHeadroomWrappable, isKnownAgentId, isKnownIntegrationId, isKnownModel, isLinkedAgentId, isPackId, isSkillId, normalizeAgentId, normalizeGuardrailPolicy, publicToInternal, recommendForDeps, renderToLines, resolveApiBaseUrl, skillHasRail, toRemoteCommand, tryGetContextWindow };
|
|
1975
|
+
export { AGENT_REGISTRY, AGENT_STANDARD_BLOCK, AGENT_STANDARD_MARKER, AGENT_STANDARD_TEXT, type AgentAuth, type AgentAuthKind, type AgentId, type AgentMetadata, type AgentMode, type AgentModel, type AgentReviewFinding, type AgentReviewPlan, type AgentReviewReport, type AnswerResolvedEvent, type AwaitingAnswerEvent, type BeadsActionCommand, type BeadsActionKind, type BeadsActionPayload, type BeadsActionRequest, type BeadsActionType, type BeadsConfigureAction, type BeadsDependencyDto, type BeadsDependencyKind, type BeadsIngestPayload, type BeadsIssueDto, type BeadsIssueStatus, type BeadsMemoryDto, type BeadsProjectDto, type BeadsProvisioningPayload, type BeadsProvisioningStatus, type BeadsSnapshotDto, type BeadsStatus, type BeadsStatusState, type BeadsStatusSummary, type BlameLineWire, type BrokeredIntegrationToken, CODER_PROMPT, type ChromeStep, type ChromeToolType, type CommitEntryWire, DEFAULT_API_BASE_URL, DEFAULT_GUARDRAIL_POLICY, DEP_TO_INTEGRATION, DEV_API_BASE_URL, type DerivedCredentialSource, type EnvVar, type FileBlameEvent, type FileChangeStatus, type FileChangedEvent, type FileHistoryEvent, type FileReviewStatus, GUARDRAIL_CATEGORIES, GUARDRAIL_CATEGORY_META, GUARDRAIL_CONFIGURE_COMMAND, GUARDRAIL_DISPOSITIONS, type GuardrailCategory, type GuardrailCategoryMeta, type GuardrailDisposition, type GuardrailPolicy, HEADROOM_BACKEND_ENV, HEADROOM_EXTRAS_BY_SURFACE, HEADROOM_MODELS, HEADROOM_PIP_COMPANIONS, HEADROOM_PROXY_PORT, HEADROOM_USAGE_COMMAND, HEARTBEAT_INTERVAL_MS_DEFAULT, HOUSE_AGENT_ID, HOUSE_AGENT_NAME, HOUSE_AGENT_PROVIDER, HOUSE_AGENT_SUBTITLE, HOUSE_AGENT_VENDOR, type HeadroomBudgetCommand, type HeadroomBudgetPeriod, type HeadroomBudgetUsage, type HeadroomKind, type HeadroomModelSpec, type HeadroomPythonRenderOpts, type HeadroomStatus, type HeadroomStep, type HeadroomSurface, type HeadroomUsageBucket, type HeadroomUsageGranularity, type HeadroomUsageReport, type HeadroomUsageResult, type HeadroomUsageSlice, type HeadroomUsageTotals, type HunkLineType, INTEGRATION_BRANDING, INTEGRATION_REGISTRY, INTERNAL_TO_PUBLIC, type InputSuggestionChunk, type IntegrationApiKeyField, type IntegrationAuthKind, type IntegrationBranding, type IntegrationCategory, type IntegrationDefinition, type IntegrationDelivery, type IntegrationHealth, type IntegrationId, type IntegrationMcpDelivery, type IntegrationStatus, type IntegrationsManifest, type IntegrationsManifestEntry, LINKED_AGENT_IDS, type LinkedAgentId, MODEL_CONTEXT_WINDOW, MODEL_PRICING, type ModelPricing, type NormalizedMessage, OBSERVER_BRIDGE_PORT, PACK_ACTION_COMMAND, PACK_REGISTRY, PACK_START_COMMAND, PACK_STATUS_COMMAND, PACK_WORKFLOW_ARTICLE, PREVIEW_DETECT_PROMPT, PROTOCOL_VERSION, PUBLIC_TO_INTERNAL, type PackActionKind, type PackActionPayload, type PackDefinition, type PackHandoffRecord, type PackId, type PackRunState, type PackRunStatus, type PackStageDef, type PackStageState, type PackStageStatus, type PackStartPayload, type PendingReviewHunkEvent, type PendingReviewHunkLine, type PrCheck, type PrRef, type PrReviewEntry, type PrReviewVerdict, type PreviewDetection, type PreviewErrorStage, type PreviewState, type PreviewStatus, type PullRequestDetail, type PullRequestSummary, QA_PROMPT, REVIEWER_PROMPT, type RemoteCommand, type RepoStack, type RepoStackDetection, SKILL_REGISTRY, SPECIFIER_PROMPT, SSE_SOCKET_TIMEOUT_MS, STACK_TO_RECOMMENDED, SWITCH_AGENT_COMMAND, type SelectPrompt, type SkillDefinition, type SkillDelivery, type SkillFileDelivery, type SkillId, type SkillRail, type SkillsManifest, type SkillsManifestEntry, type StreamingChunkEvent, type StreamingChunkKind, type SwitchAgentCommand, type SwitchAgentResult, type SwitchAgentStatus, type SwitchAgentStep, TERMINAL_AGENT_PREFIX, UNKNOWN_MODEL_PRICING, UPCOMING_INTEGRATION_IDS, USER_EVENTS, type UserEventName, classifyStack, detectedIntegrationsFromDeps, getAgent, getContextWindow, getEnabledAgents, getEnabledIntegrations, getIntegration, getIntegrationBranding, getIntegrationsByCategory, getPackDefinition, getPricing, getSkillDefinition, headroomKindFor, headroomModelPredownloadScript, headroomPipPackage, headroomSnapshotDownloadLine, internalToPublic, isGuardrailDisposition, isHeadroomWrappable, isKnownAgentId, isKnownIntegrationId, isKnownModel, isLinkedAgentId, isPackId, isSkillId, normalizeAgentId, normalizeGuardrailPolicy, publicToInternal, recommendForDeps, renderToLines, resolveApiBaseUrl, skillHasRail, toRemoteCommand, tryGetContextWindow };
|
package/dist/index.d.ts
CHANGED
|
@@ -1713,6 +1713,67 @@ interface HeadroomUsageResult {
|
|
|
1713
1713
|
/** Relay command type for pulling the token-usage report. */
|
|
1714
1714
|
declare const HEADROOM_USAGE_COMMAND = "headroom_usage";
|
|
1715
1715
|
|
|
1716
|
+
/**
|
|
1717
|
+
* Session agent switch — wire types for the `switch_agent` relay command and
|
|
1718
|
+
* its progress/status SSE events.
|
|
1719
|
+
*
|
|
1720
|
+
* A live session can swap its coding agent (e.g. claude → codex) in-process:
|
|
1721
|
+
* mobile sends `switch_agent { agentId }` over the command relay; the CLI
|
|
1722
|
+
* pulls the vaulted credential (+ install script when the binary is missing),
|
|
1723
|
+
* restarts the ACP client on the new adapter, and reports progress via
|
|
1724
|
+
* `POST /api/agent-switch/events` → the per-user SSE bus
|
|
1725
|
+
* (`switch_agent_progress` / `switch_agent_status`).
|
|
1726
|
+
*
|
|
1727
|
+
* CANONICAL WIRE OWNER: this file (`@codeam/shared`), per the cross-repo
|
|
1728
|
+
* rule. The backend/mobile repo consumes it through the published package.
|
|
1729
|
+
*
|
|
1730
|
+
* Continuity contract: the conversation does NOT resume cross-agent (ACP
|
|
1731
|
+
* `session/load` ids are per-agent). Instead the CLI captures a bounded tail
|
|
1732
|
+
* of the prior conversation and prefixes it to the first post-switch prompt
|
|
1733
|
+
* (the "context handoff"), so the new agent continues with the session's
|
|
1734
|
+
* context in a fresh conversation.
|
|
1735
|
+
*/
|
|
1736
|
+
/** Relay command type mobile sends to switch the session's agent. */
|
|
1737
|
+
declare const SWITCH_AGENT_COMMAND = "switch_agent";
|
|
1738
|
+
/** Payload of the `switch_agent` relay command. */
|
|
1739
|
+
interface SwitchAgentCommand {
|
|
1740
|
+
/** Public agent id to switch to (catalog id, e.g. 'codex'). */
|
|
1741
|
+
agentId: string;
|
|
1742
|
+
}
|
|
1743
|
+
/**
|
|
1744
|
+
* Install-progress milestone emitted on the `switch_agent_progress` SSE event
|
|
1745
|
+
* while a switch is running. Must stay aligned with the backend's validator
|
|
1746
|
+
* (`apps/api-v2/src/agent-switch/agent-switch.controller.ts`) and the mobile
|
|
1747
|
+
* store — the backend 400s on any value outside this set.
|
|
1748
|
+
*
|
|
1749
|
+
* - `credential` — fetching + writing the vaulted credential for the target.
|
|
1750
|
+
* - `install` — target binary missing; running its install script.
|
|
1751
|
+
* - `restart` — old client stopped; new adapter starting (`session/new`).
|
|
1752
|
+
*/
|
|
1753
|
+
type SwitchAgentStep = 'credential' | 'install' | 'restart';
|
|
1754
|
+
/**
|
|
1755
|
+
* Terminal/steady switch state — carried on `switch_agent_status` and used by
|
|
1756
|
+
* mobile to flip the session's agent chip (`ready`) or render an actionable
|
|
1757
|
+
* error (`error`). `switching` is published once up-front so other paired
|
|
1758
|
+
* devices see the transition too.
|
|
1759
|
+
*/
|
|
1760
|
+
interface SwitchAgentStatus {
|
|
1761
|
+
state: 'switching' | 'ready' | 'error';
|
|
1762
|
+
/** Target public agent id of the switch. */
|
|
1763
|
+
agentId: string;
|
|
1764
|
+
/** Public agent id that was running before the switch was attempted. */
|
|
1765
|
+
fromAgentId?: string;
|
|
1766
|
+
/** Human-readable reason when `state === 'error'`. */
|
|
1767
|
+
error?: string;
|
|
1768
|
+
}
|
|
1769
|
+
/** Result payload the CLI acks the `switch_agent` command with. */
|
|
1770
|
+
interface SwitchAgentResult {
|
|
1771
|
+
ok: boolean;
|
|
1772
|
+
agentId: string;
|
|
1773
|
+
/** Set when `ok === false`. */
|
|
1774
|
+
error?: string;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1716
1777
|
/**
|
|
1717
1778
|
* Headroom provisioning manifest — the SINGLE source of truth for what a
|
|
1718
1779
|
* Headroom install consists of, rendered by every provisioning surface:
|
|
@@ -1883,6 +1944,8 @@ declare const USER_EVENTS: {
|
|
|
1883
1944
|
readonly CODERABBIT_PROGRESS: "coderabbit_progress";
|
|
1884
1945
|
readonly CODERABBIT_STATUS: "coderabbit_status";
|
|
1885
1946
|
readonly CODERABBIT_REVIEW: "coderabbit_review";
|
|
1947
|
+
readonly SWITCH_AGENT_PROGRESS: "switch_agent_progress";
|
|
1948
|
+
readonly SWITCH_AGENT_STATUS: "switch_agent_status";
|
|
1886
1949
|
readonly VCS_AGENT_REVIEW_COMPLETE: "vcs_agent_review_complete";
|
|
1887
1950
|
/** PR-review launch progress toast — the "Review with an agent" flow shows a
|
|
1888
1951
|
* toast when the review runs server-side (Inngest). Mobile-only surface,
|
|
@@ -1909,4 +1972,4 @@ type UserEventName = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
|
|
|
1909
1972
|
*/
|
|
1910
1973
|
declare const PREVIEW_DETECT_PROMPT: string;
|
|
1911
1974
|
|
|
1912
|
-
export { AGENT_REGISTRY, AGENT_STANDARD_BLOCK, AGENT_STANDARD_MARKER, AGENT_STANDARD_TEXT, type AgentAuth, type AgentAuthKind, type AgentId, type AgentMetadata, type AgentMode, type AgentModel, type AgentReviewFinding, type AgentReviewPlan, type AgentReviewReport, type AnswerResolvedEvent, type AwaitingAnswerEvent, type BeadsActionCommand, type BeadsActionKind, type BeadsActionPayload, type BeadsActionRequest, type BeadsActionType, type BeadsConfigureAction, type BeadsDependencyDto, type BeadsDependencyKind, type BeadsIngestPayload, type BeadsIssueDto, type BeadsIssueStatus, type BeadsMemoryDto, type BeadsProjectDto, type BeadsProvisioningPayload, type BeadsProvisioningStatus, type BeadsSnapshotDto, type BeadsStatus, type BeadsStatusState, type BeadsStatusSummary, type BlameLineWire, type BrokeredIntegrationToken, CODER_PROMPT, type ChromeStep, type ChromeToolType, type CommitEntryWire, DEFAULT_API_BASE_URL, DEFAULT_GUARDRAIL_POLICY, DEP_TO_INTEGRATION, DEV_API_BASE_URL, type DerivedCredentialSource, type EnvVar, type FileBlameEvent, type FileChangeStatus, type FileChangedEvent, type FileHistoryEvent, type FileReviewStatus, GUARDRAIL_CATEGORIES, GUARDRAIL_CATEGORY_META, GUARDRAIL_CONFIGURE_COMMAND, GUARDRAIL_DISPOSITIONS, type GuardrailCategory, type GuardrailCategoryMeta, type GuardrailDisposition, type GuardrailPolicy, HEADROOM_BACKEND_ENV, HEADROOM_EXTRAS_BY_SURFACE, HEADROOM_MODELS, HEADROOM_PIP_COMPANIONS, HEADROOM_PROXY_PORT, HEADROOM_USAGE_COMMAND, HEARTBEAT_INTERVAL_MS_DEFAULT, HOUSE_AGENT_ID, HOUSE_AGENT_NAME, HOUSE_AGENT_PROVIDER, HOUSE_AGENT_SUBTITLE, HOUSE_AGENT_VENDOR, type HeadroomBudgetCommand, type HeadroomBudgetPeriod, type HeadroomBudgetUsage, type HeadroomKind, type HeadroomModelSpec, type HeadroomPythonRenderOpts, type HeadroomStatus, type HeadroomStep, type HeadroomSurface, type HeadroomUsageBucket, type HeadroomUsageGranularity, type HeadroomUsageReport, type HeadroomUsageResult, type HeadroomUsageSlice, type HeadroomUsageTotals, type HunkLineType, INTEGRATION_BRANDING, INTEGRATION_REGISTRY, INTERNAL_TO_PUBLIC, type InputSuggestionChunk, type IntegrationApiKeyField, type IntegrationAuthKind, type IntegrationBranding, type IntegrationCategory, type IntegrationDefinition, type IntegrationDelivery, type IntegrationHealth, type IntegrationId, type IntegrationMcpDelivery, type IntegrationStatus, type IntegrationsManifest, type IntegrationsManifestEntry, LINKED_AGENT_IDS, type LinkedAgentId, MODEL_CONTEXT_WINDOW, MODEL_PRICING, type ModelPricing, type NormalizedMessage, OBSERVER_BRIDGE_PORT, PACK_ACTION_COMMAND, PACK_REGISTRY, PACK_START_COMMAND, PACK_STATUS_COMMAND, PACK_WORKFLOW_ARTICLE, PREVIEW_DETECT_PROMPT, PROTOCOL_VERSION, PUBLIC_TO_INTERNAL, type PackActionKind, type PackActionPayload, type PackDefinition, type PackHandoffRecord, type PackId, type PackRunState, type PackRunStatus, type PackStageDef, type PackStageState, type PackStageStatus, type PackStartPayload, type PendingReviewHunkEvent, type PendingReviewHunkLine, type PrCheck, type PrRef, type PrReviewEntry, type PrReviewVerdict, type PreviewDetection, type PreviewErrorStage, type PreviewState, type PreviewStatus, type PullRequestDetail, type PullRequestSummary, QA_PROMPT, REVIEWER_PROMPT, type RemoteCommand, type RepoStack, type RepoStackDetection, SKILL_REGISTRY, SPECIFIER_PROMPT, SSE_SOCKET_TIMEOUT_MS, STACK_TO_RECOMMENDED, type SelectPrompt, type SkillDefinition, type SkillDelivery, type SkillFileDelivery, type SkillId, type SkillRail, type SkillsManifest, type SkillsManifestEntry, type StreamingChunkEvent, type StreamingChunkKind, TERMINAL_AGENT_PREFIX, UNKNOWN_MODEL_PRICING, UPCOMING_INTEGRATION_IDS, USER_EVENTS, type UserEventName, classifyStack, detectedIntegrationsFromDeps, getAgent, getContextWindow, getEnabledAgents, getEnabledIntegrations, getIntegration, getIntegrationBranding, getIntegrationsByCategory, getPackDefinition, getPricing, getSkillDefinition, headroomKindFor, headroomModelPredownloadScript, headroomPipPackage, headroomSnapshotDownloadLine, internalToPublic, isGuardrailDisposition, isHeadroomWrappable, isKnownAgentId, isKnownIntegrationId, isKnownModel, isLinkedAgentId, isPackId, isSkillId, normalizeAgentId, normalizeGuardrailPolicy, publicToInternal, recommendForDeps, renderToLines, resolveApiBaseUrl, skillHasRail, toRemoteCommand, tryGetContextWindow };
|
|
1975
|
+
export { AGENT_REGISTRY, AGENT_STANDARD_BLOCK, AGENT_STANDARD_MARKER, AGENT_STANDARD_TEXT, type AgentAuth, type AgentAuthKind, type AgentId, type AgentMetadata, type AgentMode, type AgentModel, type AgentReviewFinding, type AgentReviewPlan, type AgentReviewReport, type AnswerResolvedEvent, type AwaitingAnswerEvent, type BeadsActionCommand, type BeadsActionKind, type BeadsActionPayload, type BeadsActionRequest, type BeadsActionType, type BeadsConfigureAction, type BeadsDependencyDto, type BeadsDependencyKind, type BeadsIngestPayload, type BeadsIssueDto, type BeadsIssueStatus, type BeadsMemoryDto, type BeadsProjectDto, type BeadsProvisioningPayload, type BeadsProvisioningStatus, type BeadsSnapshotDto, type BeadsStatus, type BeadsStatusState, type BeadsStatusSummary, type BlameLineWire, type BrokeredIntegrationToken, CODER_PROMPT, type ChromeStep, type ChromeToolType, type CommitEntryWire, DEFAULT_API_BASE_URL, DEFAULT_GUARDRAIL_POLICY, DEP_TO_INTEGRATION, DEV_API_BASE_URL, type DerivedCredentialSource, type EnvVar, type FileBlameEvent, type FileChangeStatus, type FileChangedEvent, type FileHistoryEvent, type FileReviewStatus, GUARDRAIL_CATEGORIES, GUARDRAIL_CATEGORY_META, GUARDRAIL_CONFIGURE_COMMAND, GUARDRAIL_DISPOSITIONS, type GuardrailCategory, type GuardrailCategoryMeta, type GuardrailDisposition, type GuardrailPolicy, HEADROOM_BACKEND_ENV, HEADROOM_EXTRAS_BY_SURFACE, HEADROOM_MODELS, HEADROOM_PIP_COMPANIONS, HEADROOM_PROXY_PORT, HEADROOM_USAGE_COMMAND, HEARTBEAT_INTERVAL_MS_DEFAULT, HOUSE_AGENT_ID, HOUSE_AGENT_NAME, HOUSE_AGENT_PROVIDER, HOUSE_AGENT_SUBTITLE, HOUSE_AGENT_VENDOR, type HeadroomBudgetCommand, type HeadroomBudgetPeriod, type HeadroomBudgetUsage, type HeadroomKind, type HeadroomModelSpec, type HeadroomPythonRenderOpts, type HeadroomStatus, type HeadroomStep, type HeadroomSurface, type HeadroomUsageBucket, type HeadroomUsageGranularity, type HeadroomUsageReport, type HeadroomUsageResult, type HeadroomUsageSlice, type HeadroomUsageTotals, type HunkLineType, INTEGRATION_BRANDING, INTEGRATION_REGISTRY, INTERNAL_TO_PUBLIC, type InputSuggestionChunk, type IntegrationApiKeyField, type IntegrationAuthKind, type IntegrationBranding, type IntegrationCategory, type IntegrationDefinition, type IntegrationDelivery, type IntegrationHealth, type IntegrationId, type IntegrationMcpDelivery, type IntegrationStatus, type IntegrationsManifest, type IntegrationsManifestEntry, LINKED_AGENT_IDS, type LinkedAgentId, MODEL_CONTEXT_WINDOW, MODEL_PRICING, type ModelPricing, type NormalizedMessage, OBSERVER_BRIDGE_PORT, PACK_ACTION_COMMAND, PACK_REGISTRY, PACK_START_COMMAND, PACK_STATUS_COMMAND, PACK_WORKFLOW_ARTICLE, PREVIEW_DETECT_PROMPT, PROTOCOL_VERSION, PUBLIC_TO_INTERNAL, type PackActionKind, type PackActionPayload, type PackDefinition, type PackHandoffRecord, type PackId, type PackRunState, type PackRunStatus, type PackStageDef, type PackStageState, type PackStageStatus, type PackStartPayload, type PendingReviewHunkEvent, type PendingReviewHunkLine, type PrCheck, type PrRef, type PrReviewEntry, type PrReviewVerdict, type PreviewDetection, type PreviewErrorStage, type PreviewState, type PreviewStatus, type PullRequestDetail, type PullRequestSummary, QA_PROMPT, REVIEWER_PROMPT, type RemoteCommand, type RepoStack, type RepoStackDetection, SKILL_REGISTRY, SPECIFIER_PROMPT, SSE_SOCKET_TIMEOUT_MS, STACK_TO_RECOMMENDED, SWITCH_AGENT_COMMAND, type SelectPrompt, type SkillDefinition, type SkillDelivery, type SkillFileDelivery, type SkillId, type SkillRail, type SkillsManifest, type SkillsManifestEntry, type StreamingChunkEvent, type StreamingChunkKind, type SwitchAgentCommand, type SwitchAgentResult, type SwitchAgentStatus, type SwitchAgentStep, TERMINAL_AGENT_PREFIX, UNKNOWN_MODEL_PRICING, UPCOMING_INTEGRATION_IDS, USER_EVENTS, type UserEventName, classifyStack, detectedIntegrationsFromDeps, getAgent, getContextWindow, getEnabledAgents, getEnabledIntegrations, getIntegration, getIntegrationBranding, getIntegrationsByCategory, getPackDefinition, getPricing, getSkillDefinition, headroomKindFor, headroomModelPredownloadScript, headroomPipPackage, headroomSnapshotDownloadLine, internalToPublic, isGuardrailDisposition, isHeadroomWrappable, isKnownAgentId, isKnownIntegrationId, isKnownModel, isLinkedAgentId, isPackId, isSkillId, normalizeAgentId, normalizeGuardrailPolicy, publicToInternal, recommendForDeps, renderToLines, resolveApiBaseUrl, skillHasRail, toRemoteCommand, tryGetContextWindow };
|
package/dist/index.js
CHANGED
|
@@ -66,6 +66,7 @@ __export(index_exports, {
|
|
|
66
66
|
SPECIFIER_PROMPT: () => SPECIFIER_PROMPT,
|
|
67
67
|
SSE_SOCKET_TIMEOUT_MS: () => SSE_SOCKET_TIMEOUT_MS,
|
|
68
68
|
STACK_TO_RECOMMENDED: () => STACK_TO_RECOMMENDED,
|
|
69
|
+
SWITCH_AGENT_COMMAND: () => SWITCH_AGENT_COMMAND,
|
|
69
70
|
TERMINAL_AGENT_PREFIX: () => TERMINAL_AGENT_PREFIX,
|
|
70
71
|
UNKNOWN_MODEL_PRICING: () => UNKNOWN_MODEL_PRICING,
|
|
71
72
|
UPCOMING_INTEGRATION_IDS: () => UPCOMING_INTEGRATION_IDS,
|
|
@@ -2696,6 +2697,9 @@ function resolveApiBaseUrl() {
|
|
|
2696
2697
|
// src/types/headroom.ts
|
|
2697
2698
|
var HEADROOM_USAGE_COMMAND = "headroom_usage";
|
|
2698
2699
|
|
|
2700
|
+
// src/types/agent-switch.ts
|
|
2701
|
+
var SWITCH_AGENT_COMMAND = "switch_agent";
|
|
2702
|
+
|
|
2699
2703
|
// src/headroom/manifest.ts
|
|
2700
2704
|
var HEADROOM_PROXY_PORT = 8787;
|
|
2701
2705
|
var HEADROOM_BACKEND_ENV = {
|
|
@@ -2826,6 +2830,11 @@ var USER_EVENTS = {
|
|
|
2826
2830
|
CODERABBIT_PROGRESS: "coderabbit_progress",
|
|
2827
2831
|
CODERABBIT_STATUS: "coderabbit_status",
|
|
2828
2832
|
CODERABBIT_REVIEW: "coderabbit_review",
|
|
2833
|
+
// Session agent switch — the CLI posts these to /api/agent-switch/events
|
|
2834
|
+
// while a `switch_agent` relay command swaps the session's agent in-process;
|
|
2835
|
+
// the backend re-publishes them on the per-user SSE bus (mirrored in repo A).
|
|
2836
|
+
SWITCH_AGENT_PROGRESS: "switch_agent_progress",
|
|
2837
|
+
SWITCH_AGENT_STATUS: "switch_agent_status",
|
|
2829
2838
|
// VCS / PR Command Center — the backend publishes this after an agent finishes
|
|
2830
2839
|
// reviewing a PR (verdict + comment count + findings), driving the mobile
|
|
2831
2840
|
// completion screen + push. Mirrored in repo A's app-shared events.ts.
|
|
@@ -2936,6 +2945,7 @@ OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
|
|
|
2936
2945
|
SPECIFIER_PROMPT,
|
|
2937
2946
|
SSE_SOCKET_TIMEOUT_MS,
|
|
2938
2947
|
STACK_TO_RECOMMENDED,
|
|
2948
|
+
SWITCH_AGENT_COMMAND,
|
|
2939
2949
|
TERMINAL_AGENT_PREFIX,
|
|
2940
2950
|
UNKNOWN_MODEL_PRICING,
|
|
2941
2951
|
UPCOMING_INTEGRATION_IDS,
|