@codeam/shared 2.61.22 → 2.61.24
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 +50 -1
- package/dist/index.d.ts +50 -1
- package/dist/index.js +96 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +92 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -592,6 +592,11 @@ interface AgentReviewPlan {
|
|
|
592
592
|
branch: string;
|
|
593
593
|
/** Toolkit integrations the review box is provisioned with (includes `github`). */
|
|
594
594
|
integrationIds: string[];
|
|
595
|
+
/** Curated skill id(s) attached to this session's purpose (e.g. `code-review`).
|
|
596
|
+
* Claude gets them as `~/.codeam/skills.json`; other agents get the instruction
|
|
597
|
+
* preamble prepended to `prompt` server-side. The client forwards these into the
|
|
598
|
+
* deploy request the same way as `integrationIds`. */
|
|
599
|
+
skillIds: string[];
|
|
595
600
|
}
|
|
596
601
|
/**
|
|
597
602
|
* Phase-2 agent-review RESULT — POSTed by the review session to
|
|
@@ -609,6 +614,50 @@ interface AgentReviewReport {
|
|
|
609
614
|
findings?: AgentReviewFinding[];
|
|
610
615
|
}
|
|
611
616
|
|
|
617
|
+
/** Curated skills shipped with the client. Grows over time. */
|
|
618
|
+
type SkillId = 'code-review' | 'resolve-conflicts';
|
|
619
|
+
/** Delivery rails, twin of IntegrationDelivery's mcp/cliEnv. */
|
|
620
|
+
type SkillRail = 'skillFile' | 'instruction';
|
|
621
|
+
/** `skillFile` payload — a Claude-Code SKILL.md bundle (body + optional files). */
|
|
622
|
+
interface SkillFileDelivery {
|
|
623
|
+
/** The SKILL.md markdown body (WITHOUT frontmatter — frontmatter is generated
|
|
624
|
+
* at materialize time with `name` set to the namespaced skill id `codeam-<id>` and
|
|
625
|
+
* `description` from the skill definition). */
|
|
626
|
+
body: string;
|
|
627
|
+
/** Extra files written alongside SKILL.md: relative path → file contents. */
|
|
628
|
+
files?: Record<string, string>;
|
|
629
|
+
}
|
|
630
|
+
interface SkillDelivery {
|
|
631
|
+
skillFile?: SkillFileDelivery;
|
|
632
|
+
/** Agent-agnostic instruction body, prepended to the composed prompt by the
|
|
633
|
+
* backend for agents that do not get the skillFile rail. */
|
|
634
|
+
instruction?: {
|
|
635
|
+
body: string;
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
interface SkillDefinition {
|
|
639
|
+
id: SkillId;
|
|
640
|
+
name: string;
|
|
641
|
+
/** One-line; becomes the SKILL.md frontmatter `description` (progressive
|
|
642
|
+
* disclosure — this is what sits in the model's context until invoked). */
|
|
643
|
+
description: string;
|
|
644
|
+
/** MVP: all curated. 'user' is added with the library fast-follow. */
|
|
645
|
+
source: 'curated';
|
|
646
|
+
delivery: SkillDelivery;
|
|
647
|
+
}
|
|
648
|
+
/** What a deploy writes to `~/.codeam/skills.json` — ids only, never content. */
|
|
649
|
+
interface SkillsManifestEntry {
|
|
650
|
+
id: SkillId;
|
|
651
|
+
}
|
|
652
|
+
interface SkillsManifest {
|
|
653
|
+
skills: SkillsManifestEntry[];
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
declare const SKILL_REGISTRY: Record<SkillId, SkillDefinition>;
|
|
657
|
+
declare function isSkillId(id: string): id is SkillId;
|
|
658
|
+
declare function getSkillDefinition(id: string): SkillDefinition | null;
|
|
659
|
+
declare function skillHasRail(id: SkillId, rail: SkillRail): boolean;
|
|
660
|
+
|
|
612
661
|
/**
|
|
613
662
|
* Wire-shape types for the CLI / IDE-plugin → backend producer endpoints
|
|
614
663
|
* that feed the mobile Files screen and the Pending Review Queue:
|
|
@@ -1435,4 +1484,4 @@ type UserEventName = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
|
|
|
1435
1484
|
*/
|
|
1436
1485
|
declare const PREVIEW_DETECT_PROMPT: string;
|
|
1437
1486
|
|
|
1438
|
-
export { AGENT_REGISTRY, 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, type ChromeStep, type ChromeToolType, type CommitEntryWire, DEFAULT_API_BASE_URL, DEV_API_BASE_URL, type EnvVar, type FileBlameEvent, type FileChangeStatus, type FileChangedEvent, type FileHistoryEvent, type FileReviewStatus, HEADROOM_BACKEND_ENV, HEADROOM_EXTRAS_BY_SURFACE, HEADROOM_MODELS, HEADROOM_PIP_COMPANIONS, HEADROOM_PROXY_PORT, 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 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, PREVIEW_DETECT_PROMPT, PROTOCOL_VERSION, PUBLIC_TO_INTERNAL, type PendingReviewHunkEvent, type PendingReviewHunkLine, type PrCheck, type PrRef, type PrReviewEntry, type PrReviewVerdict, type PreviewDetection, type PreviewErrorStage, type PreviewState, type PreviewStatus, type PullRequestDetail, type PullRequestSummary, type RemoteCommand, SSE_SOCKET_TIMEOUT_MS, type SelectPrompt, type StreamingChunkEvent, type StreamingChunkKind, TERMINAL_AGENT_PREFIX, UNKNOWN_MODEL_PRICING, UPCOMING_INTEGRATION_IDS, USER_EVENTS, type UserEventName, getAgent, getContextWindow, getEnabledAgents, getEnabledIntegrations, getIntegration, getIntegrationBranding, getIntegrationsByCategory, getPricing, headroomKindFor, headroomModelPredownloadScript, headroomPipPackage, headroomSnapshotDownloadLine, internalToPublic, isHeadroomWrappable, isKnownAgentId, isKnownIntegrationId, isKnownModel, isLinkedAgentId, normalizeAgentId, publicToInternal, renderToLines, resolveApiBaseUrl, toRemoteCommand, tryGetContextWindow };
|
|
1487
|
+
export { AGENT_REGISTRY, 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, type ChromeStep, type ChromeToolType, type CommitEntryWire, DEFAULT_API_BASE_URL, DEV_API_BASE_URL, type EnvVar, type FileBlameEvent, type FileChangeStatus, type FileChangedEvent, type FileHistoryEvent, type FileReviewStatus, HEADROOM_BACKEND_ENV, HEADROOM_EXTRAS_BY_SURFACE, HEADROOM_MODELS, HEADROOM_PIP_COMPANIONS, HEADROOM_PROXY_PORT, 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 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, PREVIEW_DETECT_PROMPT, PROTOCOL_VERSION, PUBLIC_TO_INTERNAL, type PendingReviewHunkEvent, type PendingReviewHunkLine, type PrCheck, type PrRef, type PrReviewEntry, type PrReviewVerdict, type PreviewDetection, type PreviewErrorStage, type PreviewState, type PreviewStatus, type PullRequestDetail, type PullRequestSummary, type RemoteCommand, SKILL_REGISTRY, SSE_SOCKET_TIMEOUT_MS, 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, getAgent, getContextWindow, getEnabledAgents, getEnabledIntegrations, getIntegration, getIntegrationBranding, getIntegrationsByCategory, getPricing, getSkillDefinition, headroomKindFor, headroomModelPredownloadScript, headroomPipPackage, headroomSnapshotDownloadLine, internalToPublic, isHeadroomWrappable, isKnownAgentId, isKnownIntegrationId, isKnownModel, isLinkedAgentId, isSkillId, normalizeAgentId, publicToInternal, renderToLines, resolveApiBaseUrl, skillHasRail, toRemoteCommand, tryGetContextWindow };
|
package/dist/index.d.ts
CHANGED
|
@@ -592,6 +592,11 @@ interface AgentReviewPlan {
|
|
|
592
592
|
branch: string;
|
|
593
593
|
/** Toolkit integrations the review box is provisioned with (includes `github`). */
|
|
594
594
|
integrationIds: string[];
|
|
595
|
+
/** Curated skill id(s) attached to this session's purpose (e.g. `code-review`).
|
|
596
|
+
* Claude gets them as `~/.codeam/skills.json`; other agents get the instruction
|
|
597
|
+
* preamble prepended to `prompt` server-side. The client forwards these into the
|
|
598
|
+
* deploy request the same way as `integrationIds`. */
|
|
599
|
+
skillIds: string[];
|
|
595
600
|
}
|
|
596
601
|
/**
|
|
597
602
|
* Phase-2 agent-review RESULT — POSTed by the review session to
|
|
@@ -609,6 +614,50 @@ interface AgentReviewReport {
|
|
|
609
614
|
findings?: AgentReviewFinding[];
|
|
610
615
|
}
|
|
611
616
|
|
|
617
|
+
/** Curated skills shipped with the client. Grows over time. */
|
|
618
|
+
type SkillId = 'code-review' | 'resolve-conflicts';
|
|
619
|
+
/** Delivery rails, twin of IntegrationDelivery's mcp/cliEnv. */
|
|
620
|
+
type SkillRail = 'skillFile' | 'instruction';
|
|
621
|
+
/** `skillFile` payload — a Claude-Code SKILL.md bundle (body + optional files). */
|
|
622
|
+
interface SkillFileDelivery {
|
|
623
|
+
/** The SKILL.md markdown body (WITHOUT frontmatter — frontmatter is generated
|
|
624
|
+
* at materialize time with `name` set to the namespaced skill id `codeam-<id>` and
|
|
625
|
+
* `description` from the skill definition). */
|
|
626
|
+
body: string;
|
|
627
|
+
/** Extra files written alongside SKILL.md: relative path → file contents. */
|
|
628
|
+
files?: Record<string, string>;
|
|
629
|
+
}
|
|
630
|
+
interface SkillDelivery {
|
|
631
|
+
skillFile?: SkillFileDelivery;
|
|
632
|
+
/** Agent-agnostic instruction body, prepended to the composed prompt by the
|
|
633
|
+
* backend for agents that do not get the skillFile rail. */
|
|
634
|
+
instruction?: {
|
|
635
|
+
body: string;
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
interface SkillDefinition {
|
|
639
|
+
id: SkillId;
|
|
640
|
+
name: string;
|
|
641
|
+
/** One-line; becomes the SKILL.md frontmatter `description` (progressive
|
|
642
|
+
* disclosure — this is what sits in the model's context until invoked). */
|
|
643
|
+
description: string;
|
|
644
|
+
/** MVP: all curated. 'user' is added with the library fast-follow. */
|
|
645
|
+
source: 'curated';
|
|
646
|
+
delivery: SkillDelivery;
|
|
647
|
+
}
|
|
648
|
+
/** What a deploy writes to `~/.codeam/skills.json` — ids only, never content. */
|
|
649
|
+
interface SkillsManifestEntry {
|
|
650
|
+
id: SkillId;
|
|
651
|
+
}
|
|
652
|
+
interface SkillsManifest {
|
|
653
|
+
skills: SkillsManifestEntry[];
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
declare const SKILL_REGISTRY: Record<SkillId, SkillDefinition>;
|
|
657
|
+
declare function isSkillId(id: string): id is SkillId;
|
|
658
|
+
declare function getSkillDefinition(id: string): SkillDefinition | null;
|
|
659
|
+
declare function skillHasRail(id: SkillId, rail: SkillRail): boolean;
|
|
660
|
+
|
|
612
661
|
/**
|
|
613
662
|
* Wire-shape types for the CLI / IDE-plugin → backend producer endpoints
|
|
614
663
|
* that feed the mobile Files screen and the Pending Review Queue:
|
|
@@ -1435,4 +1484,4 @@ type UserEventName = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
|
|
|
1435
1484
|
*/
|
|
1436
1485
|
declare const PREVIEW_DETECT_PROMPT: string;
|
|
1437
1486
|
|
|
1438
|
-
export { AGENT_REGISTRY, 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, type ChromeStep, type ChromeToolType, type CommitEntryWire, DEFAULT_API_BASE_URL, DEV_API_BASE_URL, type EnvVar, type FileBlameEvent, type FileChangeStatus, type FileChangedEvent, type FileHistoryEvent, type FileReviewStatus, HEADROOM_BACKEND_ENV, HEADROOM_EXTRAS_BY_SURFACE, HEADROOM_MODELS, HEADROOM_PIP_COMPANIONS, HEADROOM_PROXY_PORT, 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 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, PREVIEW_DETECT_PROMPT, PROTOCOL_VERSION, PUBLIC_TO_INTERNAL, type PendingReviewHunkEvent, type PendingReviewHunkLine, type PrCheck, type PrRef, type PrReviewEntry, type PrReviewVerdict, type PreviewDetection, type PreviewErrorStage, type PreviewState, type PreviewStatus, type PullRequestDetail, type PullRequestSummary, type RemoteCommand, SSE_SOCKET_TIMEOUT_MS, type SelectPrompt, type StreamingChunkEvent, type StreamingChunkKind, TERMINAL_AGENT_PREFIX, UNKNOWN_MODEL_PRICING, UPCOMING_INTEGRATION_IDS, USER_EVENTS, type UserEventName, getAgent, getContextWindow, getEnabledAgents, getEnabledIntegrations, getIntegration, getIntegrationBranding, getIntegrationsByCategory, getPricing, headroomKindFor, headroomModelPredownloadScript, headroomPipPackage, headroomSnapshotDownloadLine, internalToPublic, isHeadroomWrappable, isKnownAgentId, isKnownIntegrationId, isKnownModel, isLinkedAgentId, normalizeAgentId, publicToInternal, renderToLines, resolveApiBaseUrl, toRemoteCommand, tryGetContextWindow };
|
|
1487
|
+
export { AGENT_REGISTRY, 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, type ChromeStep, type ChromeToolType, type CommitEntryWire, DEFAULT_API_BASE_URL, DEV_API_BASE_URL, type EnvVar, type FileBlameEvent, type FileChangeStatus, type FileChangedEvent, type FileHistoryEvent, type FileReviewStatus, HEADROOM_BACKEND_ENV, HEADROOM_EXTRAS_BY_SURFACE, HEADROOM_MODELS, HEADROOM_PIP_COMPANIONS, HEADROOM_PROXY_PORT, 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 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, PREVIEW_DETECT_PROMPT, PROTOCOL_VERSION, PUBLIC_TO_INTERNAL, type PendingReviewHunkEvent, type PendingReviewHunkLine, type PrCheck, type PrRef, type PrReviewEntry, type PrReviewVerdict, type PreviewDetection, type PreviewErrorStage, type PreviewState, type PreviewStatus, type PullRequestDetail, type PullRequestSummary, type RemoteCommand, SKILL_REGISTRY, SSE_SOCKET_TIMEOUT_MS, 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, getAgent, getContextWindow, getEnabledAgents, getEnabledIntegrations, getIntegration, getIntegrationBranding, getIntegrationsByCategory, getPricing, getSkillDefinition, headroomKindFor, headroomModelPredownloadScript, headroomPipPackage, headroomSnapshotDownloadLine, internalToPublic, isHeadroomWrappable, isKnownAgentId, isKnownIntegrationId, isKnownModel, isLinkedAgentId, isSkillId, normalizeAgentId, publicToInternal, renderToLines, resolveApiBaseUrl, skillHasRail, toRemoteCommand, tryGetContextWindow };
|
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
PREVIEW_DETECT_PROMPT: () => PREVIEW_DETECT_PROMPT,
|
|
45
45
|
PROTOCOL_VERSION: () => PROTOCOL_VERSION,
|
|
46
46
|
PUBLIC_TO_INTERNAL: () => PUBLIC_TO_INTERNAL,
|
|
47
|
+
SKILL_REGISTRY: () => SKILL_REGISTRY,
|
|
47
48
|
SSE_SOCKET_TIMEOUT_MS: () => SSE_SOCKET_TIMEOUT_MS,
|
|
48
49
|
TERMINAL_AGENT_PREFIX: () => TERMINAL_AGENT_PREFIX,
|
|
49
50
|
UNKNOWN_MODEL_PRICING: () => UNKNOWN_MODEL_PRICING,
|
|
@@ -57,6 +58,7 @@ __export(index_exports, {
|
|
|
57
58
|
getIntegrationBranding: () => getIntegrationBranding,
|
|
58
59
|
getIntegrationsByCategory: () => getIntegrationsByCategory,
|
|
59
60
|
getPricing: () => getPricing,
|
|
61
|
+
getSkillDefinition: () => getSkillDefinition,
|
|
60
62
|
headroomKindFor: () => headroomKindFor,
|
|
61
63
|
headroomModelPredownloadScript: () => headroomModelPredownloadScript,
|
|
62
64
|
headroomPipPackage: () => headroomPipPackage,
|
|
@@ -67,10 +69,12 @@ __export(index_exports, {
|
|
|
67
69
|
isKnownIntegrationId: () => isKnownIntegrationId,
|
|
68
70
|
isKnownModel: () => isKnownModel,
|
|
69
71
|
isLinkedAgentId: () => isLinkedAgentId,
|
|
72
|
+
isSkillId: () => isSkillId,
|
|
70
73
|
normalizeAgentId: () => normalizeAgentId,
|
|
71
74
|
publicToInternal: () => publicToInternal,
|
|
72
75
|
renderToLines: () => renderToLines,
|
|
73
76
|
resolveApiBaseUrl: () => resolveApiBaseUrl,
|
|
77
|
+
skillHasRail: () => skillHasRail,
|
|
74
78
|
toRemoteCommand: () => toRemoteCommand,
|
|
75
79
|
tryGetContextWindow: () => tryGetContextWindow
|
|
76
80
|
});
|
|
@@ -1100,6 +1104,94 @@ function getIntegrationBranding(id) {
|
|
|
1100
1104
|
return INTEGRATION_BRANDING[id] ?? null;
|
|
1101
1105
|
}
|
|
1102
1106
|
|
|
1107
|
+
// src/skills/registry.ts
|
|
1108
|
+
var CODE_REVIEW_BODY = `Use this skill when reviewing a pull request. It defines what a high-signal
|
|
1109
|
+
review looks like so your inline comments are worth the author's time.
|
|
1110
|
+
|
|
1111
|
+
## Review priorities (in order)
|
|
1112
|
+
1. **Correctness** \u2014 does the change do what the PR says, and only that? Trace the
|
|
1113
|
+
changed paths for logic errors, off-by-one, null/undefined, wrong branch, and
|
|
1114
|
+
inverted conditions. State a concrete failure scenario (inputs \u2192 wrong output)
|
|
1115
|
+
for anything you flag as a bug.
|
|
1116
|
+
2. **Security** \u2014 untrusted input reaching a sink (SQL, shell, path, HTML), secrets
|
|
1117
|
+
in code/logs, authz gaps, credentials passed via argv instead of env.
|
|
1118
|
+
3. **Tests** \u2014 does the change carry tests that would fail without it? Missing
|
|
1119
|
+
coverage on a bug-prone path is a finding.
|
|
1120
|
+
4. **Clarity / reuse** \u2014 duplicated logic, a simpler existing helper, a name that
|
|
1121
|
+
misleads. Only raise these when they materially affect maintainability.
|
|
1122
|
+
|
|
1123
|
+
## Comment discipline
|
|
1124
|
+
- One finding per comment, anchored to the exact line.
|
|
1125
|
+
- Lead with severity: **blocker**, **should-fix**, or **nit**.
|
|
1126
|
+
- Say WHY (the failure or risk), not just WHAT. Propose the fix when it is short.
|
|
1127
|
+
- Do NOT restate the diff, praise trivially, or nitpick style a formatter owns.
|
|
1128
|
+
- If the PR is correct and well-tested, say so plainly and approve \u2014 a clean review
|
|
1129
|
+
is a valid outcome, not a failure to find something.
|
|
1130
|
+
|
|
1131
|
+
## Scope
|
|
1132
|
+
Review only what the diff changes and its direct blast radius. Do not demand
|
|
1133
|
+
unrelated refactors.`;
|
|
1134
|
+
var CODE_REVIEW_INSTRUCTION = `When reviewing this PR, prioritize correctness first, then security, then test
|
|
1135
|
+
coverage, then clarity/reuse. One finding per inline comment, anchored to the exact
|
|
1136
|
+
line, each led by a severity tag (blocker/should-fix/nit) and a concrete reason
|
|
1137
|
+
(the failure scenario or risk), not a restatement of the diff. If the change is
|
|
1138
|
+
correct and well-tested, approve and say so \u2014 finding nothing is a valid outcome.
|
|
1139
|
+
Review only the diff and its direct blast radius; do not demand unrelated refactors.`;
|
|
1140
|
+
var RESOLVE_CONFLICTS_BODY = `Use this skill when resolving merge conflicts on a pull request. The goal is a
|
|
1141
|
+
merge that preserves BOTH sides' intent, not one that just makes the file compile.
|
|
1142
|
+
|
|
1143
|
+
## Method
|
|
1144
|
+
1. Understand each conflict hunk before editing: what did HEAD change, what did the
|
|
1145
|
+
base branch change, and WHY. Read the surrounding function, not just the markers.
|
|
1146
|
+
2. Prefer a union of intents. Drop a side only when the two changes are genuinely
|
|
1147
|
+
mutually exclusive \u2014 and when you do, keep the side that matches the PR's purpose.
|
|
1148
|
+
3. Never leave a conflict marker (\`<<<<<<<\`, \`=======\`, \`>>>>>>>\`) behind. Grep for
|
|
1149
|
+
them before committing.
|
|
1150
|
+
4. After resolving, the code must build and its tests must pass. Run them. A merge
|
|
1151
|
+
that resolves markers but breaks the build is not done.
|
|
1152
|
+
5. For lockfiles/generated files, regenerate rather than hand-merge.
|
|
1153
|
+
|
|
1154
|
+
## Commit
|
|
1155
|
+
One commit that explains what was reconciled and any intent you had to choose
|
|
1156
|
+
between. Then push the branch.`;
|
|
1157
|
+
var RESOLVE_CONFLICTS_INSTRUCTION = `When resolving these merge conflicts, preserve both sides' intent \u2014 read each hunk's
|
|
1158
|
+
surrounding code to understand what HEAD and the base branch each changed and why,
|
|
1159
|
+
and prefer a union of intents; drop a side only when the two are mutually exclusive,
|
|
1160
|
+
keeping the side that matches the PR's purpose. Leave no conflict markers behind
|
|
1161
|
+
(grep for them). Regenerate lockfiles rather than hand-merging them. The result must
|
|
1162
|
+
build and pass tests \u2014 run them \u2014 before you commit and push.`;
|
|
1163
|
+
var SKILL_REGISTRY = {
|
|
1164
|
+
"code-review": {
|
|
1165
|
+
id: "code-review",
|
|
1166
|
+
name: "Code Review",
|
|
1167
|
+
description: `High-signal PR review: prioritize correctness \u2192 security \u2192 tests \u2192 clarity, one anchored finding per comment.`,
|
|
1168
|
+
source: "curated",
|
|
1169
|
+
delivery: {
|
|
1170
|
+
skillFile: { body: CODE_REVIEW_BODY },
|
|
1171
|
+
instruction: { body: CODE_REVIEW_INSTRUCTION }
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
"resolve-conflicts": {
|
|
1175
|
+
id: "resolve-conflicts",
|
|
1176
|
+
name: "Resolve Conflicts",
|
|
1177
|
+
description: `Merge-conflict resolution that preserves both sides' intent, leaves no markers, and keeps the build green.`,
|
|
1178
|
+
source: "curated",
|
|
1179
|
+
delivery: {
|
|
1180
|
+
skillFile: { body: RESOLVE_CONFLICTS_BODY },
|
|
1181
|
+
instruction: { body: RESOLVE_CONFLICTS_INSTRUCTION }
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
};
|
|
1185
|
+
function isSkillId(id) {
|
|
1186
|
+
return Object.prototype.hasOwnProperty.call(SKILL_REGISTRY, id);
|
|
1187
|
+
}
|
|
1188
|
+
function getSkillDefinition(id) {
|
|
1189
|
+
return isSkillId(id) ? SKILL_REGISTRY[id] : null;
|
|
1190
|
+
}
|
|
1191
|
+
function skillHasRail(id, rail) {
|
|
1192
|
+
return Boolean(SKILL_REGISTRY[id].delivery[rail]);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1103
1195
|
// src/api-url.ts
|
|
1104
1196
|
var DEFAULT_API_BASE_URL = "https://api.codeagent-mobile.com";
|
|
1105
1197
|
var DEV_API_BASE_URL = "https://dev-api.codeagent-mobile.com";
|
|
@@ -1312,6 +1404,7 @@ OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
|
|
|
1312
1404
|
PREVIEW_DETECT_PROMPT,
|
|
1313
1405
|
PROTOCOL_VERSION,
|
|
1314
1406
|
PUBLIC_TO_INTERNAL,
|
|
1407
|
+
SKILL_REGISTRY,
|
|
1315
1408
|
SSE_SOCKET_TIMEOUT_MS,
|
|
1316
1409
|
TERMINAL_AGENT_PREFIX,
|
|
1317
1410
|
UNKNOWN_MODEL_PRICING,
|
|
@@ -1325,6 +1418,7 @@ OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
|
|
|
1325
1418
|
getIntegrationBranding,
|
|
1326
1419
|
getIntegrationsByCategory,
|
|
1327
1420
|
getPricing,
|
|
1421
|
+
getSkillDefinition,
|
|
1328
1422
|
headroomKindFor,
|
|
1329
1423
|
headroomModelPredownloadScript,
|
|
1330
1424
|
headroomPipPackage,
|
|
@@ -1335,10 +1429,12 @@ OUTPUT JSON ONLY. NO MARKDOWN. NO COMMENTARY.
|
|
|
1335
1429
|
isKnownIntegrationId,
|
|
1336
1430
|
isKnownModel,
|
|
1337
1431
|
isLinkedAgentId,
|
|
1432
|
+
isSkillId,
|
|
1338
1433
|
normalizeAgentId,
|
|
1339
1434
|
publicToInternal,
|
|
1340
1435
|
renderToLines,
|
|
1341
1436
|
resolveApiBaseUrl,
|
|
1437
|
+
skillHasRail,
|
|
1342
1438
|
toRemoteCommand,
|
|
1343
1439
|
tryGetContextWindow
|
|
1344
1440
|
});
|