@compilr-dev/sdk 0.3.1 → 0.4.1
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/actions/index.d.ts +29 -0
- package/dist/actions/index.js +30 -0
- package/dist/actions/registry.d.ts +17 -0
- package/dist/actions/registry.js +152 -0
- package/dist/actions/resolver.d.ts +29 -0
- package/dist/actions/resolver.js +107 -0
- package/dist/actions/types.d.ts +65 -0
- package/dist/actions/types.js +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contextual Actions — Skill invocations with context.
|
|
3
|
+
*
|
|
4
|
+
* Actions place skills where the user is (project panel, work items,
|
|
5
|
+
* documents). The ActionResolver builds the final prompt from
|
|
6
|
+
* skill + context for the agent.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import {
|
|
11
|
+
* getActionsForContext,
|
|
12
|
+
* resolveActionPrompt,
|
|
13
|
+
* buildContextSummary,
|
|
14
|
+
* } from '@compilr-dev/sdk';
|
|
15
|
+
*
|
|
16
|
+
* // Get actions for a work item
|
|
17
|
+
* const actions = getActionsForContext('workitem');
|
|
18
|
+
*
|
|
19
|
+
* // Resolve action to a prompt
|
|
20
|
+
* const prompt = resolveActionPrompt('build', {
|
|
21
|
+
* source: 'workitem',
|
|
22
|
+
* project: { id: 1, name: 'hr-manager', displayName: 'Hr Manager' },
|
|
23
|
+
* workItem: { id: 'CHR-002', title: 'Authentication System' },
|
|
24
|
+
* }, allSkills);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export type { ActionContext, ActionDefinition } from './types.js';
|
|
28
|
+
export { ACTION_REGISTRY, getActionsForContext, getActionById } from './registry.js';
|
|
29
|
+
export { resolveActionPrompt, buildContextSummary, getSuggestedRole } from './resolver.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contextual Actions — Skill invocations with context.
|
|
3
|
+
*
|
|
4
|
+
* Actions place skills where the user is (project panel, work items,
|
|
5
|
+
* documents). The ActionResolver builds the final prompt from
|
|
6
|
+
* skill + context for the agent.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import {
|
|
11
|
+
* getActionsForContext,
|
|
12
|
+
* resolveActionPrompt,
|
|
13
|
+
* buildContextSummary,
|
|
14
|
+
* } from '@compilr-dev/sdk';
|
|
15
|
+
*
|
|
16
|
+
* // Get actions for a work item
|
|
17
|
+
* const actions = getActionsForContext('workitem');
|
|
18
|
+
*
|
|
19
|
+
* // Resolve action to a prompt
|
|
20
|
+
* const prompt = resolveActionPrompt('build', {
|
|
21
|
+
* source: 'workitem',
|
|
22
|
+
* project: { id: 1, name: 'hr-manager', displayName: 'Hr Manager' },
|
|
23
|
+
* workItem: { id: 'CHR-002', title: 'Authentication System' },
|
|
24
|
+
* }, allSkills);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
// Registry
|
|
28
|
+
export { ACTION_REGISTRY, getActionsForContext, getActionById } from './registry.js';
|
|
29
|
+
// Resolver
|
|
30
|
+
export { resolveActionPrompt, buildContextSummary, getSuggestedRole } from './resolver.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action Registry — Defines which actions are available and where.
|
|
3
|
+
*
|
|
4
|
+
* Each action maps to a skill (from platformSkills/builtinSkills)
|
|
5
|
+
* but adds UI metadata: icon, label, category, applicable contexts,
|
|
6
|
+
* and suggested agent role.
|
|
7
|
+
*/
|
|
8
|
+
import type { ActionDefinition } from './types.js';
|
|
9
|
+
export declare const ACTION_REGISTRY: ActionDefinition[];
|
|
10
|
+
/**
|
|
11
|
+
* Get actions applicable to a given context type.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getActionsForContext(contextType: 'project' | 'workitem' | 'document'): ActionDefinition[];
|
|
14
|
+
/**
|
|
15
|
+
* Get an action definition by ID.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getActionById(id: string): ActionDefinition | undefined;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action Registry — Defines which actions are available and where.
|
|
3
|
+
*
|
|
4
|
+
* Each action maps to a skill (from platformSkills/builtinSkills)
|
|
5
|
+
* but adds UI metadata: icon, label, category, applicable contexts,
|
|
6
|
+
* and suggested agent role.
|
|
7
|
+
*/
|
|
8
|
+
export const ACTION_REGISTRY = [
|
|
9
|
+
// ─── Project-level actions ─────────────────────────────────────────────
|
|
10
|
+
{
|
|
11
|
+
id: 'design',
|
|
12
|
+
label: 'Design App',
|
|
13
|
+
description: 'Describe an idea, get a full application design',
|
|
14
|
+
icon: 'Wand2',
|
|
15
|
+
applicableTo: ['project'],
|
|
16
|
+
category: 'design',
|
|
17
|
+
suggestedRole: 'architect',
|
|
18
|
+
needsInput: true,
|
|
19
|
+
inputPrompt: 'What would you like to design?',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'sketch',
|
|
23
|
+
label: 'Quick Sketch',
|
|
24
|
+
description: 'Quickly sketch out an idea or concept',
|
|
25
|
+
icon: 'Pencil',
|
|
26
|
+
applicableTo: ['project'],
|
|
27
|
+
category: 'design',
|
|
28
|
+
needsInput: true,
|
|
29
|
+
inputPrompt: 'What would you like to sketch?',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'prd',
|
|
33
|
+
label: 'Write PRD',
|
|
34
|
+
description: 'Create a product requirements document',
|
|
35
|
+
icon: 'FileText',
|
|
36
|
+
applicableTo: ['project'],
|
|
37
|
+
category: 'planning',
|
|
38
|
+
suggestedRole: 'pm',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'architecture',
|
|
42
|
+
label: 'Architecture',
|
|
43
|
+
description: 'Design the system architecture',
|
|
44
|
+
icon: 'Network',
|
|
45
|
+
applicableTo: ['project'],
|
|
46
|
+
category: 'design',
|
|
47
|
+
suggestedRole: 'architect',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 'scaffold',
|
|
51
|
+
label: 'Scaffold',
|
|
52
|
+
description: 'Generate project code from the app model',
|
|
53
|
+
icon: 'Layers',
|
|
54
|
+
applicableTo: ['project'],
|
|
55
|
+
category: 'development',
|
|
56
|
+
suggestedRole: 'developer',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'session-notes',
|
|
60
|
+
label: 'Session Notes',
|
|
61
|
+
description: 'Summarize what was accomplished in this session',
|
|
62
|
+
icon: 'StickyNote',
|
|
63
|
+
applicableTo: ['project'],
|
|
64
|
+
category: 'documentation',
|
|
65
|
+
},
|
|
66
|
+
// ─── Work item actions ─────────────────────────────────────────────────
|
|
67
|
+
{
|
|
68
|
+
id: 'refine',
|
|
69
|
+
label: 'Refine',
|
|
70
|
+
description: 'Break down into smaller tasks',
|
|
71
|
+
icon: 'RefreshCw',
|
|
72
|
+
applicableTo: ['project', 'workitem'],
|
|
73
|
+
category: 'planning',
|
|
74
|
+
suggestedRole: 'pm',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'refine-item',
|
|
78
|
+
label: 'Refine Item',
|
|
79
|
+
description: 'Add detail and acceptance criteria to this item',
|
|
80
|
+
icon: 'RefreshCw',
|
|
81
|
+
applicableTo: ['workitem'],
|
|
82
|
+
category: 'planning',
|
|
83
|
+
suggestedRole: 'pm',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'build',
|
|
87
|
+
label: 'Build',
|
|
88
|
+
description: 'Implement this work item',
|
|
89
|
+
icon: 'Hammer',
|
|
90
|
+
applicableTo: ['workitem'],
|
|
91
|
+
category: 'development',
|
|
92
|
+
suggestedRole: 'developer',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 'code-review',
|
|
96
|
+
label: 'Code Review',
|
|
97
|
+
description: 'Review code for quality and correctness',
|
|
98
|
+
icon: 'Search',
|
|
99
|
+
applicableTo: ['project', 'workitem'],
|
|
100
|
+
category: 'development',
|
|
101
|
+
suggestedRole: 'qa',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 'debug',
|
|
105
|
+
label: 'Debug',
|
|
106
|
+
description: 'Debug an issue or error',
|
|
107
|
+
icon: 'Bug',
|
|
108
|
+
applicableTo: ['project', 'workitem'],
|
|
109
|
+
category: 'development',
|
|
110
|
+
suggestedRole: 'developer',
|
|
111
|
+
},
|
|
112
|
+
// ─── Document actions ──────────────────────────────────────────────────
|
|
113
|
+
{
|
|
114
|
+
id: 'explain',
|
|
115
|
+
label: 'Explain',
|
|
116
|
+
description: 'Explain this code or document',
|
|
117
|
+
icon: 'BookOpen',
|
|
118
|
+
applicableTo: ['document', 'workitem'],
|
|
119
|
+
category: 'documentation',
|
|
120
|
+
},
|
|
121
|
+
// ─── Analysis actions ──────────────────────────────────────────────────
|
|
122
|
+
{
|
|
123
|
+
id: 'security-review',
|
|
124
|
+
label: 'Security Review',
|
|
125
|
+
description: 'Review for security vulnerabilities',
|
|
126
|
+
icon: 'Shield',
|
|
127
|
+
applicableTo: ['project'],
|
|
128
|
+
category: 'analysis',
|
|
129
|
+
suggestedRole: 'security',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'refactor',
|
|
133
|
+
label: 'Refactor',
|
|
134
|
+
description: 'Improve code quality without changing behavior',
|
|
135
|
+
icon: 'Scissors',
|
|
136
|
+
applicableTo: ['project', 'workitem'],
|
|
137
|
+
category: 'development',
|
|
138
|
+
suggestedRole: 'developer',
|
|
139
|
+
},
|
|
140
|
+
];
|
|
141
|
+
/**
|
|
142
|
+
* Get actions applicable to a given context type.
|
|
143
|
+
*/
|
|
144
|
+
export function getActionsForContext(contextType) {
|
|
145
|
+
return ACTION_REGISTRY.filter((a) => a.applicableTo.includes(contextType));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Get an action definition by ID.
|
|
149
|
+
*/
|
|
150
|
+
export function getActionById(id) {
|
|
151
|
+
return ACTION_REGISTRY.find((a) => a.id === id);
|
|
152
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action Resolver — Builds the final prompt from skill + context.
|
|
3
|
+
*
|
|
4
|
+
* Given an action ID and context (project, work item, document),
|
|
5
|
+
* produces the complete prompt to send to the agent. The prompt
|
|
6
|
+
* includes a context section followed by the skill prompt.
|
|
7
|
+
*
|
|
8
|
+
* Used by both CLI and desktop to turn user actions into agent prompts.
|
|
9
|
+
*/
|
|
10
|
+
import type { Skill } from '@compilr-dev/agents';
|
|
11
|
+
import type { ActionContext } from './types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Resolve an action + context into a final prompt for the agent.
|
|
14
|
+
*
|
|
15
|
+
* @param actionId - Action ID (matches skill name)
|
|
16
|
+
* @param context - Context from the UI origin
|
|
17
|
+
* @param skills - Available skills to search for the prompt
|
|
18
|
+
* @returns The full prompt string, or null if skill not found
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveActionPrompt(actionId: string, context: ActionContext, skills: Skill[]): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Build a compact summary of the action context (for UI display).
|
|
23
|
+
* Used by the ActionCard component to show a brief description.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildContextSummary(context: ActionContext): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get the suggested agent role for an action.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getSuggestedRole(actionId: string): string | undefined;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action Resolver — Builds the final prompt from skill + context.
|
|
3
|
+
*
|
|
4
|
+
* Given an action ID and context (project, work item, document),
|
|
5
|
+
* produces the complete prompt to send to the agent. The prompt
|
|
6
|
+
* includes a context section followed by the skill prompt.
|
|
7
|
+
*
|
|
8
|
+
* Used by both CLI and desktop to turn user actions into agent prompts.
|
|
9
|
+
*/
|
|
10
|
+
import { getActionById } from './registry.js';
|
|
11
|
+
/**
|
|
12
|
+
* Resolve an action + context into a final prompt for the agent.
|
|
13
|
+
*
|
|
14
|
+
* @param actionId - Action ID (matches skill name)
|
|
15
|
+
* @param context - Context from the UI origin
|
|
16
|
+
* @param skills - Available skills to search for the prompt
|
|
17
|
+
* @returns The full prompt string, or null if skill not found
|
|
18
|
+
*/
|
|
19
|
+
export function resolveActionPrompt(actionId, context, skills) {
|
|
20
|
+
// Find the skill prompt
|
|
21
|
+
const skill = skills.find((s) => s.name === actionId);
|
|
22
|
+
if (!skill)
|
|
23
|
+
return null;
|
|
24
|
+
// Build context section
|
|
25
|
+
const contextSection = buildContextSection(context);
|
|
26
|
+
// Combine: context + skill prompt + user input
|
|
27
|
+
const parts = [];
|
|
28
|
+
if (contextSection) {
|
|
29
|
+
parts.push(contextSection);
|
|
30
|
+
parts.push('---');
|
|
31
|
+
}
|
|
32
|
+
parts.push(skill.prompt);
|
|
33
|
+
if (context.userInput) {
|
|
34
|
+
parts.push('---');
|
|
35
|
+
parts.push(`## User Request\n\n${context.userInput}`);
|
|
36
|
+
}
|
|
37
|
+
return parts.join('\n\n');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Build a context section from the action context.
|
|
41
|
+
* This gives the agent structured information about what it's working on.
|
|
42
|
+
*/
|
|
43
|
+
function buildContextSection(context) {
|
|
44
|
+
const lines = [];
|
|
45
|
+
if (context.project) {
|
|
46
|
+
lines.push(`## Action Context`);
|
|
47
|
+
lines.push(`- **Project:** ${context.project.displayName} (\`${context.project.name}\`)`);
|
|
48
|
+
if (context.project.path) {
|
|
49
|
+
lines.push(`- **Path:** \`${context.project.path}\``);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (context.workItem) {
|
|
53
|
+
if (lines.length === 0)
|
|
54
|
+
lines.push('## Action Context');
|
|
55
|
+
lines.push(`- **Work Item:** ${context.workItem.id} — ${context.workItem.title}`);
|
|
56
|
+
if (context.workItem.priority) {
|
|
57
|
+
lines.push(`- **Priority:** ${context.workItem.priority}`);
|
|
58
|
+
}
|
|
59
|
+
if (context.workItem.status) {
|
|
60
|
+
lines.push(`- **Status:** ${context.workItem.status}`);
|
|
61
|
+
}
|
|
62
|
+
if (context.workItem.type) {
|
|
63
|
+
lines.push(`- **Type:** ${context.workItem.type}`);
|
|
64
|
+
}
|
|
65
|
+
if (context.workItem.description) {
|
|
66
|
+
lines.push('');
|
|
67
|
+
lines.push('**Description:**');
|
|
68
|
+
lines.push(context.workItem.description);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (context.document) {
|
|
72
|
+
if (lines.length === 0)
|
|
73
|
+
lines.push('## Action Context');
|
|
74
|
+
lines.push(`- **Document:** ${context.document.title}`);
|
|
75
|
+
if (context.document.type) {
|
|
76
|
+
lines.push(`- **Type:** ${context.document.type}`);
|
|
77
|
+
}
|
|
78
|
+
if (context.document.contentPreview) {
|
|
79
|
+
lines.push('');
|
|
80
|
+
lines.push('**Content Preview:**');
|
|
81
|
+
lines.push(context.document.contentPreview);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return lines.length > 0 ? lines.join('\n') : null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Build a compact summary of the action context (for UI display).
|
|
88
|
+
* Used by the ActionCard component to show a brief description.
|
|
89
|
+
*/
|
|
90
|
+
export function buildContextSummary(context) {
|
|
91
|
+
if (context.workItem) {
|
|
92
|
+
return `${context.workItem.id}: ${context.workItem.title}`;
|
|
93
|
+
}
|
|
94
|
+
if (context.document) {
|
|
95
|
+
return context.document.title;
|
|
96
|
+
}
|
|
97
|
+
if (context.project) {
|
|
98
|
+
return context.project.displayName;
|
|
99
|
+
}
|
|
100
|
+
return '';
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get the suggested agent role for an action.
|
|
104
|
+
*/
|
|
105
|
+
export function getSuggestedRole(actionId) {
|
|
106
|
+
return getActionById(actionId)?.suggestedRole;
|
|
107
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action Types — Context and definition types for contextual actions.
|
|
3
|
+
*
|
|
4
|
+
* Actions are skill invocations that carry context from their origin
|
|
5
|
+
* (project panel, work item, document). The ActionResolver uses these
|
|
6
|
+
* to build the final prompt sent to the agent.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Context attached to an action invocation.
|
|
10
|
+
* Carries information from the UI origin so the agent
|
|
11
|
+
* understands what it's working on.
|
|
12
|
+
*/
|
|
13
|
+
export interface ActionContext {
|
|
14
|
+
/** Where the action was triggered from */
|
|
15
|
+
source: 'project' | 'workitem' | 'document' | 'chat';
|
|
16
|
+
/** Active project info */
|
|
17
|
+
project?: {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
displayName: string;
|
|
21
|
+
path?: string;
|
|
22
|
+
};
|
|
23
|
+
/** Work item context (when action triggered from a work item) */
|
|
24
|
+
workItem?: {
|
|
25
|
+
id: string;
|
|
26
|
+
title: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
status?: string;
|
|
29
|
+
priority?: string;
|
|
30
|
+
type?: string;
|
|
31
|
+
};
|
|
32
|
+
/** Document context (when action triggered from a document) */
|
|
33
|
+
document?: {
|
|
34
|
+
id: number;
|
|
35
|
+
title: string;
|
|
36
|
+
type?: string;
|
|
37
|
+
contentPreview?: string;
|
|
38
|
+
};
|
|
39
|
+
/** Free-form user input (e.g., "Make it use JWT with refresh tokens") */
|
|
40
|
+
userInput?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Defines an action that can be triggered from the UI.
|
|
44
|
+
* Maps to a skill but adds UI metadata and context requirements.
|
|
45
|
+
*/
|
|
46
|
+
export interface ActionDefinition {
|
|
47
|
+
/** Unique ID (matches skill name) */
|
|
48
|
+
id: string;
|
|
49
|
+
/** Display label */
|
|
50
|
+
label: string;
|
|
51
|
+
/** Short description */
|
|
52
|
+
description: string;
|
|
53
|
+
/** Lucide icon name */
|
|
54
|
+
icon: string;
|
|
55
|
+
/** Which context types this action applies to */
|
|
56
|
+
applicableTo: Array<'project' | 'workitem' | 'document'>;
|
|
57
|
+
/** Category for grouping in menus */
|
|
58
|
+
category: 'design' | 'development' | 'planning' | 'documentation' | 'analysis';
|
|
59
|
+
/** Suggested agent role (hint for auto-selection) */
|
|
60
|
+
suggestedRole?: string;
|
|
61
|
+
/** Whether to prompt for user input before executing */
|
|
62
|
+
needsInput?: boolean;
|
|
63
|
+
/** Prompt label when needsInput is true */
|
|
64
|
+
inputPrompt?: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action Types — Context and definition types for contextual actions.
|
|
3
|
+
*
|
|
4
|
+
* Actions are skill invocations that carry context from their origin
|
|
5
|
+
* (project panel, work item, document). The ActionResolver uses these
|
|
6
|
+
* to build the final prompt sent to the agent.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export { createPlatformTools, createProjectTools, createWorkItemTools, createDoc
|
|
|
62
62
|
export type { ProjectAnchorStoreConfig } from './platform/index.js';
|
|
63
63
|
export { STEP_ORDER, GUIDED_STEP_CRITERIA, getNextStep, isValidTransition, getStepCriteria, formatStepDisplay, getStepNumber, } from './platform/index.js';
|
|
64
64
|
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, } from './skills/index.js';
|
|
65
|
+
export { ACTION_REGISTRY, getActionsForContext, getActionById, resolveActionPrompt, buildContextSummary, getSuggestedRole, } from './actions/index.js';
|
|
66
|
+
export type { ActionContext, ActionDefinition } from './actions/index.js';
|
|
65
67
|
export { defineTool, createSuccessResult, createErrorResult, mergeHooks, createLoggingHooks, createClaudeProvider, createOpenAIProvider, createGeminiNativeProvider, createOllamaProvider, createTogetherProvider, createGroqProvider, createFireworksProvider, createPerplexityProvider, createOpenRouterProvider, createMockProvider, MockProvider, Agent, ContextManager, DEFAULT_CONTEXT_CONFIG, createTaskTool, createSuggestTool, defaultAgentTypes, TOOL_SETS, BUILTIN_GUARDRAILS, TOOL_NAMES, getDefaultShellManager, builtinSkills, AnchorManager, MCPManager, AgentError, ProviderError, ToolError, ToolTimeoutError, MaxIterationsError, AbortError, } from '@compilr-dev/agents';
|
|
66
68
|
export type { Tool, HooksConfig, AgentEvent, Message, LLMProvider, AnchorInput, ToolExecutionResult, AgentRunResult, PermissionHandler, ToolPermission, AgentTypeConfig, GuardrailTriggeredHandler, BeforeLLMHookResult, BeforeToolHook, BeforeToolHookResult, AfterToolHook, AgentState, AgentConfig, SessionInfo, Anchor, AnchorScope, AnchorClearOptions, AnchorPriority, AnchorQueryOptions, FileAccessType, FileAccess, GuardrailResult, GuardrailContext, MCPClient, MCPToolDefinition, } from '@compilr-dev/agents';
|
|
67
69
|
export { DEFAULT_PERMISSION_RULES, findMatchingRule, permissionModeLabel, permissionLevelLabel, } from './permissions.js';
|
package/dist/index.js
CHANGED
|
@@ -141,6 +141,10 @@ export { STEP_ORDER, GUIDED_STEP_CRITERIA, getNextStep, isValidTransition, getSt
|
|
|
141
141
|
// =============================================================================
|
|
142
142
|
export { platformSkills, designSkill, sketchSkill, prdSkill, refineSkill, refineItemSkill, architectureSkill, sessionNotesSkill, buildSkill, scaffoldSkill, } from './skills/index.js';
|
|
143
143
|
// =============================================================================
|
|
144
|
+
// Contextual Actions (skill invocations with context)
|
|
145
|
+
// =============================================================================
|
|
146
|
+
export { ACTION_REGISTRY, getActionsForContext, getActionById, resolveActionPrompt, buildContextSummary, getSuggestedRole, } from './actions/index.js';
|
|
147
|
+
// =============================================================================
|
|
144
148
|
// Re-exports from @compilr-dev/agents (convenience — no need to install separately)
|
|
145
149
|
// =============================================================================
|
|
146
150
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilr-dev/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Universal agent runtime for building AI-powered applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
70
|
-
"@compilr-dev/agents": "^0.3.
|
|
70
|
+
"@compilr-dev/agents": "^0.3.27",
|
|
71
71
|
"@compilr-dev/agents-coding": "^1.0.2",
|
|
72
72
|
"@eslint/js": "^9.39.1",
|
|
73
73
|
"@opentelemetry/api": "^1.9.0",
|