@compilr-dev/sdk 0.1.27 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -2
- package/dist/index.js +27 -1
- package/dist/meta-tools/registry.js +4 -2
- package/dist/team/activity.d.ts +21 -0
- package/dist/team/activity.js +34 -0
- package/dist/team/agent-selection.d.ts +53 -0
- package/dist/team/agent-selection.js +88 -0
- package/dist/team/artifacts.d.ts +175 -0
- package/dist/team/artifacts.js +279 -0
- package/dist/team/collision-utils.d.ts +16 -0
- package/dist/team/collision-utils.js +28 -0
- package/dist/team/context-resolver.d.ts +97 -0
- package/dist/team/context-resolver.js +322 -0
- package/dist/team/custom-agents.d.ts +68 -0
- package/dist/team/custom-agents.js +150 -0
- package/dist/team/delegation-tracker.d.ts +147 -0
- package/dist/team/delegation-tracker.js +215 -0
- package/dist/team/index.d.ts +34 -0
- package/dist/team/index.js +30 -0
- package/dist/team/interfaces.d.ts +36 -0
- package/dist/team/interfaces.js +7 -0
- package/dist/team/mention-parser.d.ts +64 -0
- package/dist/team/mention-parser.js +138 -0
- package/dist/team/shared-context.d.ts +293 -0
- package/dist/team/shared-context.js +673 -0
- package/dist/team/skill-requirements.d.ts +66 -0
- package/dist/team/skill-requirements.js +178 -0
- package/dist/team/task-assignment.d.ts +69 -0
- package/dist/team/task-assignment.js +123 -0
- package/dist/team/task-suggestion.d.ts +31 -0
- package/dist/team/task-suggestion.js +84 -0
- package/dist/team/team-agent.d.ts +201 -0
- package/dist/team/team-agent.js +492 -0
- package/dist/team/team.d.ts +297 -0
- package/dist/team/team.js +615 -0
- package/dist/team/tool-config.d.ts +110 -0
- package/dist/team/tool-config.js +739 -0
- package/dist/team/types.d.ts +211 -0
- package/dist/team/types.js +638 -0
- package/package.json +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Configuration for Custom Agents
|
|
3
|
+
*
|
|
4
|
+
* Defines tool groups, profiles, and helpers for configuring
|
|
5
|
+
* which tools a custom agent can access.
|
|
6
|
+
*
|
|
7
|
+
* Tool names are defined as string constants below. These cover all tools
|
|
8
|
+
* from @compilr-dev/agents, @compilr-dev/agents-coding, and platform tools.
|
|
9
|
+
*/
|
|
10
|
+
export type ToolProfile = 'full' | 'read-only' | 'developer' | 'security' | 'docs' | 'devops' | 'qa' | 'architect' | 'planner' | 'analyst' | 'custom';
|
|
11
|
+
export interface ToolConfig {
|
|
12
|
+
/** Tool profile (predefined set) */
|
|
13
|
+
profile: ToolProfile;
|
|
14
|
+
/** Custom groups when profile === 'custom' */
|
|
15
|
+
customGroups?: string[];
|
|
16
|
+
/** Override flag: force read-only on any profile */
|
|
17
|
+
readOnly?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type ToolTier = 'direct' | 'meta';
|
|
20
|
+
export interface ToolGroup {
|
|
21
|
+
/** Human-readable label */
|
|
22
|
+
label: string;
|
|
23
|
+
/** Tool names in this group */
|
|
24
|
+
tools: string[];
|
|
25
|
+
/** Whether this group is read-only (no side effects) */
|
|
26
|
+
readOnly: boolean;
|
|
27
|
+
/** Tier: direct tools vs meta-registry tools */
|
|
28
|
+
tier: ToolTier;
|
|
29
|
+
/** Optional note about the group */
|
|
30
|
+
note?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* All tool groups organized by functionality.
|
|
34
|
+
* These cover all ~50 tools in the CLI.
|
|
35
|
+
*
|
|
36
|
+
* Tool names use TOOL_NAMES constants for consistency.
|
|
37
|
+
*/
|
|
38
|
+
export declare const TOOL_GROUPS: Record<string, ToolGroup>;
|
|
39
|
+
/**
|
|
40
|
+
* Predefined tool profiles mapping profile name to included groups.
|
|
41
|
+
*/
|
|
42
|
+
export declare const TOOL_PROFILES: Record<ToolProfile, string[]>;
|
|
43
|
+
export interface ProfileInfo {
|
|
44
|
+
label: string;
|
|
45
|
+
description: string;
|
|
46
|
+
isReadOnly: boolean;
|
|
47
|
+
}
|
|
48
|
+
export declare const PROFILE_INFO: Record<ToolProfile, ProfileInfo>;
|
|
49
|
+
/**
|
|
50
|
+
* Get all tool names for a given profile.
|
|
51
|
+
*
|
|
52
|
+
* @param profile - The tool profile
|
|
53
|
+
* @param customGroups - Custom groups (when profile is 'custom')
|
|
54
|
+
* @returns Array of tool names
|
|
55
|
+
*/
|
|
56
|
+
export declare function getToolsForProfile(profile: ToolProfile, customGroups?: string[]): string[];
|
|
57
|
+
/**
|
|
58
|
+
* Get all group IDs for a profile.
|
|
59
|
+
*/
|
|
60
|
+
export declare function getGroupsForProfile(profile: ToolProfile): string[];
|
|
61
|
+
/**
|
|
62
|
+
* Get the profile that best matches a set of tools.
|
|
63
|
+
* Used for displaying current config in UI.
|
|
64
|
+
*/
|
|
65
|
+
export declare function detectProfileFromTools(tools: string[]): ToolProfile;
|
|
66
|
+
/**
|
|
67
|
+
* Check if a profile only includes read-only groups.
|
|
68
|
+
*/
|
|
69
|
+
export declare function isProfileReadOnly(profile: ToolProfile, customGroups?: string[]): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Get all available group IDs.
|
|
72
|
+
*/
|
|
73
|
+
export declare function getAllGroupIds(): string[];
|
|
74
|
+
/**
|
|
75
|
+
* Get group info by ID.
|
|
76
|
+
*/
|
|
77
|
+
export declare function getGroupInfo(groupId: string): ToolGroup | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Get groups organized by tier.
|
|
80
|
+
*/
|
|
81
|
+
export declare function getGroupsByTier(): {
|
|
82
|
+
direct: string[];
|
|
83
|
+
meta: string[];
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Create a default tool config (full access).
|
|
87
|
+
*/
|
|
88
|
+
export declare function createDefaultToolConfig(): ToolConfig;
|
|
89
|
+
/**
|
|
90
|
+
* Validate a tool config.
|
|
91
|
+
*/
|
|
92
|
+
export declare function validateToolConfig(config: Partial<ToolConfig>): {
|
|
93
|
+
valid: boolean;
|
|
94
|
+
error?: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Generate self-awareness text for system prompt.
|
|
98
|
+
* Tells the agent about its tool limitations.
|
|
99
|
+
*/
|
|
100
|
+
export declare function generateToolAwarenessPrompt(config: ToolConfig): string;
|
|
101
|
+
/**
|
|
102
|
+
* Generate delegation guidance for the coordinator.
|
|
103
|
+
* Explains how to use the delegate tool effectively.
|
|
104
|
+
*/
|
|
105
|
+
export declare function generateCoordinatorGuidance(): string;
|
|
106
|
+
/**
|
|
107
|
+
* Generate delegation suggestion guidance for specialists.
|
|
108
|
+
* Explains how to suggest other specialists when appropriate.
|
|
109
|
+
*/
|
|
110
|
+
export declare function generateSpecialistGuidance(role: string): string;
|