@codeam/shared 2.64.0 → 2.65.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 CHANGED
@@ -1809,6 +1809,71 @@ interface HandoffProposal {
1809
1809
  toAgentId: string;
1810
1810
  reason: string;
1811
1811
  prompt: string;
1812
+ /**
1813
+ * Autonomous mode (P2-2): the CLI accepted this proposal ITSELF instead of
1814
+ * emitting the tap-to-accept card. Mobile renders a passive timeline notice
1815
+ * for `auto: true`, never the accept card. Absent = the v1 card flow.
1816
+ */
1817
+ auto?: boolean;
1818
+ /**
1819
+ * Hops left in the chain AFTER this one (`auto` only) — the hop is already
1820
+ * spent when this is emitted, so `0` means "this is the last auto hop; any
1821
+ * further proposal falls back to the card". Mobile renders it verbatim as
1822
+ * "<n> hops left".
1823
+ */
1824
+ hopsRemaining?: number;
1825
+ }
1826
+ /** `handoff_resolved` event payload. `auto` mirrors {@link HandoffProposal}. */
1827
+ interface HandoffResolution {
1828
+ proposalId: string;
1829
+ accepted: boolean;
1830
+ auto?: boolean;
1831
+ }
1832
+ /** Relay command: read/write the session's autonomous-handoff mode. */
1833
+ declare const SQUAD_CONFIGURE_COMMAND = "squad_configure";
1834
+ /** Relay command: per-member activity for the "Squad activity" screen. */
1835
+ declare const SQUAD_STATS_COMMAND = "squad_stats";
1836
+ declare const SQUAD_HOP_BUDGET_DEFAULT = 3;
1837
+ declare const SQUAD_HOP_BUDGET_MIN = 1;
1838
+ declare const SQUAD_HOP_BUDGET_MAX = 10;
1839
+ /**
1840
+ * Clamp a caller-supplied hop budget into the supported range, falling back to
1841
+ * the default for a missing / non-finite value. The ONE place the bound lives —
1842
+ * the CLI's config mutator and its `squad_configure` handler both call it.
1843
+ */
1844
+ declare function clampHopBudget(value: unknown): number;
1845
+ /** Persisted per-session autonomous-handoff mode. Default OFF. */
1846
+ interface SquadAutoConfig {
1847
+ enabled: boolean;
1848
+ hopBudget: number;
1849
+ }
1850
+ type SquadConfigurePayload = {
1851
+ action: 'set';
1852
+ autoHandoffs: boolean;
1853
+ hopBudget?: number;
1854
+ } | {
1855
+ action: 'status';
1856
+ };
1857
+ /** Ack of {@link SQUAD_CONFIGURE_COMMAND} — the state AFTER the command. */
1858
+ interface SquadConfigureResult extends SquadAutoConfig {
1859
+ /** Hops left in the current chain (resets on every user prompt). */
1860
+ hopsRemaining: number;
1861
+ }
1862
+ interface SquadMemberActivity {
1863
+ agentId: string;
1864
+ turns: number;
1865
+ /** DISTINCT paths this member touched across its journaled turns. */
1866
+ filesTouched: number;
1867
+ }
1868
+ /** Ack of {@link SQUAD_STATS_COMMAND}. No cost attribution in v1. */
1869
+ interface SquadStatsResult {
1870
+ members: SquadMemberActivity[];
1871
+ handoffs: {
1872
+ proposed: number;
1873
+ accepted: number;
1874
+ auto: number;
1875
+ };
1876
+ sinceTurn: number;
1812
1877
  }
1813
1878
  /** Per-agent specialty blurbs for the team preamble. Copy, not routing. */
1814
1879
  declare const SQUAD_SPECIALTIES: Readonly<Partial<Record<AgentId, string>>>;
@@ -2013,4 +2078,4 @@ type UserEventName = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
2013
2078
  */
2014
2079
  declare const PREVIEW_DETECT_PROMPT: string;
2015
2080
 
2016
- 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, HANDOFF_FENCE_TAG, 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 HandoffProposal, 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, SQUAD_SPECIALTIES, 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 SquadRosterAgent, type SquadRosterData, type StartTaskPayload, 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 };
2081
+ 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, HANDOFF_FENCE_TAG, 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 HandoffProposal, type HandoffResolution, 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, SQUAD_CONFIGURE_COMMAND, SQUAD_HOP_BUDGET_DEFAULT, SQUAD_HOP_BUDGET_MAX, SQUAD_HOP_BUDGET_MIN, SQUAD_SPECIALTIES, SQUAD_STATS_COMMAND, 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 SquadAutoConfig, type SquadConfigurePayload, type SquadConfigureResult, type SquadMemberActivity, type SquadRosterAgent, type SquadRosterData, type SquadStatsResult, type StartTaskPayload, 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, clampHopBudget, 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
@@ -1809,6 +1809,71 @@ interface HandoffProposal {
1809
1809
  toAgentId: string;
1810
1810
  reason: string;
1811
1811
  prompt: string;
1812
+ /**
1813
+ * Autonomous mode (P2-2): the CLI accepted this proposal ITSELF instead of
1814
+ * emitting the tap-to-accept card. Mobile renders a passive timeline notice
1815
+ * for `auto: true`, never the accept card. Absent = the v1 card flow.
1816
+ */
1817
+ auto?: boolean;
1818
+ /**
1819
+ * Hops left in the chain AFTER this one (`auto` only) — the hop is already
1820
+ * spent when this is emitted, so `0` means "this is the last auto hop; any
1821
+ * further proposal falls back to the card". Mobile renders it verbatim as
1822
+ * "<n> hops left".
1823
+ */
1824
+ hopsRemaining?: number;
1825
+ }
1826
+ /** `handoff_resolved` event payload. `auto` mirrors {@link HandoffProposal}. */
1827
+ interface HandoffResolution {
1828
+ proposalId: string;
1829
+ accepted: boolean;
1830
+ auto?: boolean;
1831
+ }
1832
+ /** Relay command: read/write the session's autonomous-handoff mode. */
1833
+ declare const SQUAD_CONFIGURE_COMMAND = "squad_configure";
1834
+ /** Relay command: per-member activity for the "Squad activity" screen. */
1835
+ declare const SQUAD_STATS_COMMAND = "squad_stats";
1836
+ declare const SQUAD_HOP_BUDGET_DEFAULT = 3;
1837
+ declare const SQUAD_HOP_BUDGET_MIN = 1;
1838
+ declare const SQUAD_HOP_BUDGET_MAX = 10;
1839
+ /**
1840
+ * Clamp a caller-supplied hop budget into the supported range, falling back to
1841
+ * the default for a missing / non-finite value. The ONE place the bound lives —
1842
+ * the CLI's config mutator and its `squad_configure` handler both call it.
1843
+ */
1844
+ declare function clampHopBudget(value: unknown): number;
1845
+ /** Persisted per-session autonomous-handoff mode. Default OFF. */
1846
+ interface SquadAutoConfig {
1847
+ enabled: boolean;
1848
+ hopBudget: number;
1849
+ }
1850
+ type SquadConfigurePayload = {
1851
+ action: 'set';
1852
+ autoHandoffs: boolean;
1853
+ hopBudget?: number;
1854
+ } | {
1855
+ action: 'status';
1856
+ };
1857
+ /** Ack of {@link SQUAD_CONFIGURE_COMMAND} — the state AFTER the command. */
1858
+ interface SquadConfigureResult extends SquadAutoConfig {
1859
+ /** Hops left in the current chain (resets on every user prompt). */
1860
+ hopsRemaining: number;
1861
+ }
1862
+ interface SquadMemberActivity {
1863
+ agentId: string;
1864
+ turns: number;
1865
+ /** DISTINCT paths this member touched across its journaled turns. */
1866
+ filesTouched: number;
1867
+ }
1868
+ /** Ack of {@link SQUAD_STATS_COMMAND}. No cost attribution in v1. */
1869
+ interface SquadStatsResult {
1870
+ members: SquadMemberActivity[];
1871
+ handoffs: {
1872
+ proposed: number;
1873
+ accepted: number;
1874
+ auto: number;
1875
+ };
1876
+ sinceTurn: number;
1812
1877
  }
1813
1878
  /** Per-agent specialty blurbs for the team preamble. Copy, not routing. */
1814
1879
  declare const SQUAD_SPECIALTIES: Readonly<Partial<Record<AgentId, string>>>;
@@ -2013,4 +2078,4 @@ type UserEventName = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
2013
2078
  */
2014
2079
  declare const PREVIEW_DETECT_PROMPT: string;
2015
2080
 
2016
- 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, HANDOFF_FENCE_TAG, 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 HandoffProposal, 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, SQUAD_SPECIALTIES, 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 SquadRosterAgent, type SquadRosterData, type StartTaskPayload, 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 };
2081
+ 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, HANDOFF_FENCE_TAG, 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 HandoffProposal, type HandoffResolution, 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, SQUAD_CONFIGURE_COMMAND, SQUAD_HOP_BUDGET_DEFAULT, SQUAD_HOP_BUDGET_MAX, SQUAD_HOP_BUDGET_MIN, SQUAD_SPECIALTIES, SQUAD_STATS_COMMAND, 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 SquadAutoConfig, type SquadConfigurePayload, type SquadConfigureResult, type SquadMemberActivity, type SquadRosterAgent, type SquadRosterData, type SquadStatsResult, type StartTaskPayload, 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, clampHopBudget, 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
@@ -65,7 +65,12 @@ __export(index_exports, {
65
65
  REVIEWER_PROMPT: () => REVIEWER_PROMPT,
66
66
  SKILL_REGISTRY: () => SKILL_REGISTRY,
67
67
  SPECIFIER_PROMPT: () => SPECIFIER_PROMPT,
68
+ SQUAD_CONFIGURE_COMMAND: () => SQUAD_CONFIGURE_COMMAND,
69
+ SQUAD_HOP_BUDGET_DEFAULT: () => SQUAD_HOP_BUDGET_DEFAULT,
70
+ SQUAD_HOP_BUDGET_MAX: () => SQUAD_HOP_BUDGET_MAX,
71
+ SQUAD_HOP_BUDGET_MIN: () => SQUAD_HOP_BUDGET_MIN,
68
72
  SQUAD_SPECIALTIES: () => SQUAD_SPECIALTIES,
73
+ SQUAD_STATS_COMMAND: () => SQUAD_STATS_COMMAND,
69
74
  SSE_SOCKET_TIMEOUT_MS: () => SSE_SOCKET_TIMEOUT_MS,
70
75
  STACK_TO_RECOMMENDED: () => STACK_TO_RECOMMENDED,
71
76
  SWITCH_AGENT_COMMAND: () => SWITCH_AGENT_COMMAND,
@@ -73,6 +78,7 @@ __export(index_exports, {
73
78
  UNKNOWN_MODEL_PRICING: () => UNKNOWN_MODEL_PRICING,
74
79
  UPCOMING_INTEGRATION_IDS: () => UPCOMING_INTEGRATION_IDS,
75
80
  USER_EVENTS: () => USER_EVENTS,
81
+ clampHopBudget: () => clampHopBudget,
76
82
  classifyStack: () => classifyStack,
77
83
  detectedIntegrationsFromDeps: () => detectedIntegrationsFromDeps,
78
84
  getAgent: () => getAgent,
@@ -2704,6 +2710,15 @@ var SWITCH_AGENT_COMMAND = "switch_agent";
2704
2710
 
2705
2711
  // src/types/agent-squad.ts
2706
2712
  var HANDOFF_FENCE_TAG = "codeam-handoff";
2713
+ var SQUAD_CONFIGURE_COMMAND = "squad_configure";
2714
+ var SQUAD_STATS_COMMAND = "squad_stats";
2715
+ var SQUAD_HOP_BUDGET_DEFAULT = 3;
2716
+ var SQUAD_HOP_BUDGET_MIN = 1;
2717
+ var SQUAD_HOP_BUDGET_MAX = 10;
2718
+ function clampHopBudget(value) {
2719
+ if (typeof value !== "number" || !Number.isFinite(value)) return SQUAD_HOP_BUDGET_DEFAULT;
2720
+ return Math.min(SQUAD_HOP_BUDGET_MAX, Math.max(SQUAD_HOP_BUDGET_MIN, Math.round(value)));
2721
+ }
2707
2722
  var SQUAD_SPECIALTIES = {
2708
2723
  claude: "deep reasoning, refactors, and multi-step architecture work",
2709
2724
  codex: "fast, focused implementation and test fixing",
@@ -2960,7 +2975,12 @@ OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
2960
2975
  REVIEWER_PROMPT,
2961
2976
  SKILL_REGISTRY,
2962
2977
  SPECIFIER_PROMPT,
2978
+ SQUAD_CONFIGURE_COMMAND,
2979
+ SQUAD_HOP_BUDGET_DEFAULT,
2980
+ SQUAD_HOP_BUDGET_MAX,
2981
+ SQUAD_HOP_BUDGET_MIN,
2963
2982
  SQUAD_SPECIALTIES,
2983
+ SQUAD_STATS_COMMAND,
2964
2984
  SSE_SOCKET_TIMEOUT_MS,
2965
2985
  STACK_TO_RECOMMENDED,
2966
2986
  SWITCH_AGENT_COMMAND,
@@ -2968,6 +2988,7 @@ OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
2968
2988
  UNKNOWN_MODEL_PRICING,
2969
2989
  UPCOMING_INTEGRATION_IDS,
2970
2990
  USER_EVENTS,
2991
+ clampHopBudget,
2971
2992
  classifyStack,
2972
2993
  detectedIntegrationsFromDeps,
2973
2994
  getAgent,