@agentuity/opencode 0.1.15
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/AGENTS.md +40 -0
- package/README.md +113 -0
- package/dist/agents/builder.d.ts +4 -0
- package/dist/agents/builder.d.ts.map +1 -0
- package/dist/agents/builder.js +298 -0
- package/dist/agents/builder.js.map +1 -0
- package/dist/agents/expert.d.ts +4 -0
- package/dist/agents/expert.d.ts.map +1 -0
- package/dist/agents/expert.js +773 -0
- package/dist/agents/expert.js.map +1 -0
- package/dist/agents/index.d.ts +10 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +40 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/lead.d.ts +4 -0
- package/dist/agents/lead.d.ts.map +1 -0
- package/dist/agents/lead.js +463 -0
- package/dist/agents/lead.js.map +1 -0
- package/dist/agents/memory.d.ts +4 -0
- package/dist/agents/memory.d.ts.map +1 -0
- package/dist/agents/memory.js +317 -0
- package/dist/agents/memory.js.map +1 -0
- package/dist/agents/reviewer.d.ts +4 -0
- package/dist/agents/reviewer.d.ts.map +1 -0
- package/dist/agents/reviewer.js +321 -0
- package/dist/agents/reviewer.js.map +1 -0
- package/dist/agents/scout.d.ts +4 -0
- package/dist/agents/scout.d.ts.map +1 -0
- package/dist/agents/scout.js +280 -0
- package/dist/agents/scout.js.map +1 -0
- package/dist/agents/types.d.ts +29 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +2 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +14 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +98 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/mcps/context7.d.ts +3 -0
- package/dist/mcps/context7.d.ts.map +1 -0
- package/dist/mcps/context7.js +7 -0
- package/dist/mcps/context7.js.map +1 -0
- package/dist/mcps/grep-app.d.ts +3 -0
- package/dist/mcps/grep-app.d.ts.map +1 -0
- package/dist/mcps/grep-app.js +7 -0
- package/dist/mcps/grep-app.js.map +1 -0
- package/dist/mcps/index.d.ts +8 -0
- package/dist/mcps/index.d.ts.map +1 -0
- package/dist/mcps/index.js +25 -0
- package/dist/mcps/index.js.map +1 -0
- package/dist/plugin/hooks/keyword.d.ts +6 -0
- package/dist/plugin/hooks/keyword.d.ts.map +1 -0
- package/dist/plugin/hooks/keyword.js +110 -0
- package/dist/plugin/hooks/keyword.js.map +1 -0
- package/dist/plugin/hooks/params.d.ts +20 -0
- package/dist/plugin/hooks/params.d.ts.map +1 -0
- package/dist/plugin/hooks/params.js +157 -0
- package/dist/plugin/hooks/params.js.map +1 -0
- package/dist/plugin/hooks/session.d.ts +6 -0
- package/dist/plugin/hooks/session.d.ts.map +1 -0
- package/dist/plugin/hooks/session.js +20 -0
- package/dist/plugin/hooks/session.js.map +1 -0
- package/dist/plugin/hooks/tools.d.ts +7 -0
- package/dist/plugin/hooks/tools.d.ts.map +1 -0
- package/dist/plugin/hooks/tools.js +111 -0
- package/dist/plugin/hooks/tools.js.map +1 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +2 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/plugin.d.ts +3 -0
- package/dist/plugin/plugin.d.ts.map +1 -0
- package/dist/plugin/plugin.js +249 -0
- package/dist/plugin/plugin.js.map +1 -0
- package/dist/services/auth.d.ts +14 -0
- package/dist/services/auth.d.ts.map +1 -0
- package/dist/services/auth.js +54 -0
- package/dist/services/auth.js.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/tools/delegate.d.ts +35 -0
- package/dist/tools/delegate.d.ts.map +1 -0
- package/dist/tools/delegate.js +51 -0
- package/dist/tools/delegate.js.map +1 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types.d.ts +143 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/package.json +56 -0
- package/src/agents/builder.ts +300 -0
- package/src/agents/expert.ts +775 -0
- package/src/agents/index.ts +49 -0
- package/src/agents/lead.ts +466 -0
- package/src/agents/memory.ts +320 -0
- package/src/agents/reviewer.ts +323 -0
- package/src/agents/scout.ts +283 -0
- package/src/agents/types.ts +30 -0
- package/src/config/index.ts +1 -0
- package/src/config/loader.ts +127 -0
- package/src/index.ts +24 -0
- package/src/mcps/context7.ts +8 -0
- package/src/mcps/grep-app.ts +8 -0
- package/src/mcps/index.ts +34 -0
- package/src/plugin/hooks/keyword.ts +126 -0
- package/src/plugin/hooks/params.ts +188 -0
- package/src/plugin/hooks/session.ts +27 -0
- package/src/plugin/hooks/tools.ts +127 -0
- package/src/plugin/index.ts +1 -0
- package/src/plugin/plugin.ts +280 -0
- package/src/services/auth.ts +88 -0
- package/src/services/index.ts +1 -0
- package/src/tools/delegate.ts +62 -0
- package/src/tools/index.ts +1 -0
- package/src/types.ts +131 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
const CODER_PATTERN = /\b(ag|agentuity coder)\b/i;
|
|
2
|
+
const CODER_ACTIVATION_MESSAGE = `<coder-mode>
|
|
3
|
+
You are now using the Agentuity Coder agent team from Agentuity.
|
|
4
|
+
|
|
5
|
+
## Your Team (use @mentions to invoke)
|
|
6
|
+
- **@Agentuity Coder Lead**: Orchestrator - breaks down tasks, delegates, never implements directly
|
|
7
|
+
- **@Agentuity Coder Scout**: Explorer - finds patterns, researches docs, analyzes codebase (read-only)
|
|
8
|
+
- **@Agentuity Coder Builder**: Implementer - writes code, runs tests, makes changes
|
|
9
|
+
- **@Agentuity Coder Reviewer**: Quality checker - reviews changes, applies fixes
|
|
10
|
+
- **@Agentuity Coder Memory**: Context keeper - remembers decisions, stores checkpoints
|
|
11
|
+
- **@Agentuity Coder Expert**: Agentuity specialist - knows CLI commands and cloud services
|
|
12
|
+
|
|
13
|
+
## Agentuity Cloud Services Available
|
|
14
|
+
When genuinely helpful, use these via the CLI:
|
|
15
|
+
- \`agentuity cloud kv\` — Key-value storage for memory/checkpoints
|
|
16
|
+
- \`agentuity cloud storage\` — S3-compatible storage for large files
|
|
17
|
+
- \`agentuity cloud sandbox\` — Isolated execution environments
|
|
18
|
+
- \`agentuity cloud vector\` — Semantic search for large codebases
|
|
19
|
+
- \`agentuity cloud db\` — PostgreSQL for structured data
|
|
20
|
+
|
|
21
|
+
Run \`agentuity ai schema show\` to see all available CLI commands.
|
|
22
|
+
|
|
23
|
+
## Guidelines
|
|
24
|
+
1. Break complex tasks into subtasks
|
|
25
|
+
2. Use @Agentuity Coder Scout before implementing to understand context
|
|
26
|
+
3. Have @Agentuity Coder Reviewer check @Agentuity Coder Builder's work
|
|
27
|
+
4. Use cloud services only when they genuinely help
|
|
28
|
+
</coder-mode>
|
|
29
|
+
`;
|
|
30
|
+
export function createKeywordHooks(ctx, _config) {
|
|
31
|
+
const activatedSessions = new Set();
|
|
32
|
+
const log = (msg) => {
|
|
33
|
+
ctx.client.app.log({
|
|
34
|
+
body: {
|
|
35
|
+
service: 'coder-keyword',
|
|
36
|
+
level: 'debug',
|
|
37
|
+
message: msg,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
async onMessage(input, output) {
|
|
43
|
+
log(`onMessage called - input keys: ${input ? Object.keys(input).join(', ') : 'null'}`);
|
|
44
|
+
log(`onMessage called - output keys: ${output ? Object.keys(output).join(', ') : 'null'}`);
|
|
45
|
+
const sessionId = extractSessionId(input);
|
|
46
|
+
if (!sessionId) {
|
|
47
|
+
log('No sessionId found');
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
log(`sessionId: ${sessionId}`);
|
|
51
|
+
const messageText = extractMessageText(output);
|
|
52
|
+
if (!messageText) {
|
|
53
|
+
log('No messageText found in output');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
log(`messageText (first 100 chars): ${messageText.substring(0, 100)}`);
|
|
57
|
+
if (CODER_PATTERN.test(messageText)) {
|
|
58
|
+
log('CODER_PATTERN matched!');
|
|
59
|
+
if (!activatedSessions.has(sessionId)) {
|
|
60
|
+
activatedSessions.add(sessionId);
|
|
61
|
+
injectContext(output, CODER_ACTIVATION_MESSAGE);
|
|
62
|
+
log('Context injected');
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
log('Session already activated');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function extractSessionId(input) {
|
|
72
|
+
if (typeof input !== 'object' || input === null)
|
|
73
|
+
return undefined;
|
|
74
|
+
// Try both sessionID and sessionId (Open Code uses sessionID)
|
|
75
|
+
const inp = input;
|
|
76
|
+
if (typeof inp.sessionID === 'string')
|
|
77
|
+
return inp.sessionID;
|
|
78
|
+
if (typeof inp.sessionId === 'string')
|
|
79
|
+
return inp.sessionId;
|
|
80
|
+
if (typeof inp.session_id === 'string')
|
|
81
|
+
return inp.session_id;
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
function extractMessageText(output) {
|
|
85
|
+
if (typeof output !== 'object' || output === null)
|
|
86
|
+
return undefined;
|
|
87
|
+
const out = output;
|
|
88
|
+
if (!out.parts || !Array.isArray(out.parts))
|
|
89
|
+
return undefined;
|
|
90
|
+
for (const part of out.parts) {
|
|
91
|
+
if (part.type === 'text' && part.text) {
|
|
92
|
+
return part.text;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
function injectContext(output, context) {
|
|
98
|
+
if (typeof output !== 'object' || output === null)
|
|
99
|
+
return;
|
|
100
|
+
const out = output;
|
|
101
|
+
if (!out.parts || !Array.isArray(out.parts))
|
|
102
|
+
return;
|
|
103
|
+
for (const part of out.parts) {
|
|
104
|
+
if (part.type === 'text' && part.text) {
|
|
105
|
+
part.text = `${context}\n\n---\n\n${part.text}`;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=keyword.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyword.js","sourceRoot":"","sources":["../../../src/plugin/hooks/keyword.ts"],"names":[],"mappings":"AAMA,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAElD,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BhC,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,GAAkB,EAAE,OAAoB;IAC1E,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE5C,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,EAAE;QAC3B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;YAClB,IAAI,EAAE;gBACL,OAAO,EAAE,eAAe;gBACxB,KAAK,EAAE,OAAO;gBACd,OAAO,EAAE,GAAG;aACZ;SACD,CAAC,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO;QACN,KAAK,CAAC,SAAS,CAAC,KAAc,EAAE,MAAe;YAC9C,GAAG,CACF,kCAAkC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAC5F,CAAC;YACF,GAAG,CACF,mCAAmC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAg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AAC;AACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PluginContext, CoderConfig } from '../../types';
|
|
2
|
+
export interface ParamsHooks {
|
|
3
|
+
onParams: (input: unknown, output: unknown) => Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare function createParamsHooks(ctx: PluginContext, _config: CoderConfig): ParamsHooks;
|
|
6
|
+
/**
|
|
7
|
+
* Advertised magic words for users:
|
|
8
|
+
*
|
|
9
|
+
* - "brainstorm" - Activates creative mode (temperature → 0.8)
|
|
10
|
+
* - "think hard" - Activates deep thinking mode (max reasoning budget)
|
|
11
|
+
* - "dig deep" / "go deep" - Activates thorough mode (maxSteps → 50)
|
|
12
|
+
*
|
|
13
|
+
* These can also be triggered by specific phrases like:
|
|
14
|
+
* - "be creative", "give me ideas", "explore options", "explore alternatives"
|
|
15
|
+
* - "think deeply", "analyze carefully", "reason through this"
|
|
16
|
+
* - "deep dive", "take your time", "be thorough", "be meticulous"
|
|
17
|
+
*
|
|
18
|
+
* Note: Triggers use multi-word phrases to avoid false positives from common words.
|
|
19
|
+
*/
|
|
20
|
+
//# sourceMappingURL=params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D;AA4FD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,WAAW,CA4EvF;AAED;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic mode triggers based on user message content.
|
|
3
|
+
*
|
|
4
|
+
* Trigger phrases are intentionally specific to avoid false positives.
|
|
5
|
+
* Single common words are avoided; multi-word phrases are preferred.
|
|
6
|
+
*/
|
|
7
|
+
const DYNAMIC_MODES = {
|
|
8
|
+
/**
|
|
9
|
+
* Creative mode: Higher temperature for brainstorming and idea generation
|
|
10
|
+
* Advertised keyword: "brainstorm"
|
|
11
|
+
*/
|
|
12
|
+
creative: {
|
|
13
|
+
triggers: [
|
|
14
|
+
'brainstorm',
|
|
15
|
+
'be creative',
|
|
16
|
+
'get creative',
|
|
17
|
+
'give me ideas',
|
|
18
|
+
'explore options',
|
|
19
|
+
'explore alternatives',
|
|
20
|
+
'think outside the box',
|
|
21
|
+
],
|
|
22
|
+
settings: {
|
|
23
|
+
temperature: 0.8,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* Deep thinking mode: Maximum reasoning for complex analysis
|
|
28
|
+
* Advertised keyword: "think hard"
|
|
29
|
+
*/
|
|
30
|
+
deepThink: {
|
|
31
|
+
triggers: [
|
|
32
|
+
'think hard',
|
|
33
|
+
'think deeply',
|
|
34
|
+
'reason through this',
|
|
35
|
+
'analyze carefully',
|
|
36
|
+
'think this through',
|
|
37
|
+
'give this extra thought',
|
|
38
|
+
],
|
|
39
|
+
settings: {
|
|
40
|
+
// For Anthropic models, this enables max thinking budget
|
|
41
|
+
// These get passed through as provider options
|
|
42
|
+
thinking: {
|
|
43
|
+
type: 'enabled',
|
|
44
|
+
budgetTokens: 32000,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* Thorough mode: More iterations for comprehensive work
|
|
50
|
+
* Advertised keyword: "dig deep" or "go deep"
|
|
51
|
+
*/
|
|
52
|
+
thorough: {
|
|
53
|
+
triggers: [
|
|
54
|
+
'dig deep',
|
|
55
|
+
'go deep',
|
|
56
|
+
'deep dive',
|
|
57
|
+
'take your time',
|
|
58
|
+
'be thorough',
|
|
59
|
+
'be meticulous',
|
|
60
|
+
],
|
|
61
|
+
settings: {
|
|
62
|
+
maxSteps: 50,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Check if message content triggers any dynamic mode
|
|
68
|
+
*/
|
|
69
|
+
function detectMode(messageContent) {
|
|
70
|
+
const lower = messageContent.toLowerCase();
|
|
71
|
+
for (const [modeName, config] of Object.entries(DYNAMIC_MODES)) {
|
|
72
|
+
for (const trigger of config.triggers) {
|
|
73
|
+
if (lower.includes(trigger)) {
|
|
74
|
+
return {
|
|
75
|
+
mode: modeName,
|
|
76
|
+
settings: config.settings,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
export function createParamsHooks(ctx, _config) {
|
|
84
|
+
return {
|
|
85
|
+
async onParams(input, output) {
|
|
86
|
+
// Input contains: sessionID, agent, model, provider, message
|
|
87
|
+
const inputObj = input;
|
|
88
|
+
// Output contains: temperature, topP, topK, options
|
|
89
|
+
const outputObj = output;
|
|
90
|
+
// Get message content for mode detection
|
|
91
|
+
const messageContent = inputObj.message?.content || '';
|
|
92
|
+
if (!messageContent)
|
|
93
|
+
return;
|
|
94
|
+
// Check for dynamic mode triggers
|
|
95
|
+
const detected = detectMode(messageContent);
|
|
96
|
+
if (!detected)
|
|
97
|
+
return;
|
|
98
|
+
// Apply detected mode settings
|
|
99
|
+
ctx.client.app.log({
|
|
100
|
+
body: {
|
|
101
|
+
service: 'agentuity-coder',
|
|
102
|
+
level: 'info',
|
|
103
|
+
message: `Dynamic mode activated: ${detected.mode}`,
|
|
104
|
+
extra: { mode: detected.mode, settings: detected.settings },
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
// Show toast to user
|
|
108
|
+
const modeMessages = {
|
|
109
|
+
creative: '🎨 Creative Mode activated - higher creativity enabled',
|
|
110
|
+
deepThink: '🧠 Deep Think Mode activated - extended reasoning enabled',
|
|
111
|
+
thorough: '🔍 Thorough Mode activated - more iterations enabled',
|
|
112
|
+
};
|
|
113
|
+
try {
|
|
114
|
+
ctx.client.tui?.showToast?.({
|
|
115
|
+
body: { message: modeMessages[detected.mode] || `${detected.mode} mode activated` },
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
// Toast may not be available in all contexts (e.g., headless)
|
|
120
|
+
}
|
|
121
|
+
// Apply temperature if specified
|
|
122
|
+
if ('temperature' in detected.settings &&
|
|
123
|
+
typeof detected.settings.temperature === 'number') {
|
|
124
|
+
outputObj.temperature = detected.settings.temperature;
|
|
125
|
+
}
|
|
126
|
+
// Apply maxSteps if specified
|
|
127
|
+
if ('maxSteps' in detected.settings && typeof detected.settings.maxSteps === 'number') {
|
|
128
|
+
outputObj.options = {
|
|
129
|
+
...outputObj.options,
|
|
130
|
+
maxSteps: detected.settings.maxSteps,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
// Apply provider-specific options (like thinking budget)
|
|
134
|
+
if ('thinking' in detected.settings) {
|
|
135
|
+
outputObj.options = {
|
|
136
|
+
...outputObj.options,
|
|
137
|
+
thinking: detected.settings.thinking,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Advertised magic words for users:
|
|
145
|
+
*
|
|
146
|
+
* - "brainstorm" - Activates creative mode (temperature → 0.8)
|
|
147
|
+
* - "think hard" - Activates deep thinking mode (max reasoning budget)
|
|
148
|
+
* - "dig deep" / "go deep" - Activates thorough mode (maxSteps → 50)
|
|
149
|
+
*
|
|
150
|
+
* These can also be triggered by specific phrases like:
|
|
151
|
+
* - "be creative", "give me ideas", "explore options", "explore alternatives"
|
|
152
|
+
* - "think deeply", "analyze carefully", "reason through this"
|
|
153
|
+
* - "deep dive", "take your time", "be thorough", "be meticulous"
|
|
154
|
+
*
|
|
155
|
+
* Note: Triggers use multi-word phrases to avoid false positives from common words.
|
|
156
|
+
*/
|
|
157
|
+
//# sourceMappingURL=params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../src/plugin/hooks/params.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,aAAa,GAAG;IACrB;;;OAGG;IACH,QAAQ,EAAE;QACT,QAAQ,EAAE;YACT,YAAY;YACZ,aAAa;YACb,cAAc;YACd,eAAe;YACf,iBAAiB;YACjB,sBAAsB;YACtB,uBAAuB;SACvB;QACD,QAAQ,EAAE;YACT,WAAW,EAAE,GAAG;SAChB;KACD;IAED;;;OAGG;IACH,SAAS,EAAE;QACV,QAAQ,EAAE;YACT,YAAY;YACZ,cAAc;YACd,qBAAqB;YACrB,mBAAmB;YACnB,oBAAoB;YACpB,yBAAyB;SACzB;QACD,QAAQ,EAAE;YACT,yDAAyD;YACzD,+CAA+C;YAC/C,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,YAAY,EAAE,KAAK;aACnB;SACD;KACD;IAED;;;OAGG;IACH,QAAQ,EAAE;QACT,QAAQ,EAAE;YACT,UAAU;YACV,SAAS;YACT,WAAW;YACX,gBAAgB;YAChB,aAAa;YACb,eAAe;SACf;QACD,QAAQ,EAAE;YACT,QAAQ,EAAE,EAAE;SACZ;KACD;CACQ,CAAC;AAEX;;GAEG;AACH,SAAS,UAAU,CAClB,cAAsB;IAEtB,MAAM,KAAK,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;IAE3C,KAAK,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QAChE,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACvC,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC7B,OAAO;oBACN,IAAI,EAAE,Q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B,EAAE;iBACnF,CAAC,CAAC;YACJ,CAAC;YAAC,MAAM,CAAC;gBACR,8DAA8D;YAC/D,CAAC;YAED,iCAAiC;YACjC,IACC,aAAa,IAAI,QAAQ,CAAC,QAAQ;gBAClC,OAAO,QAAQ,CAAC,QAAQ,CAAC,WAAW,KAAK,QAAQ,EAChD,CAAC;gBACF,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC;YACvD,CAAC;YAED,8BAA8B;YAC9B,IAAI,UAAU,IAAI,QAAQ,CAAC,QAAQ,IAAI,OAAO,QAAQ,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBACvF,SAAS,CAAC,OAAO,GAAG;oBACnB,GAAG,SAAS,CAAC,OAAO;oBACpB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ;iBACpC,CAAC;YACH,CAAC;YAED,yDAAyD;YACzD,IAAI,UAAU,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACrC,SAAS,CAAC,OAAO,GAAG;oBACnB,GAAG,SAAS,CAAC,OAAO;oBACpB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ;iBACpC,CAAC;YACH,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PluginContext, CoderConfig } from '../../types';
|
|
2
|
+
export interface SessionHooks {
|
|
3
|
+
onMessage: (input: unknown, output: unknown) => Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export declare function createSessionHooks(_ctx: PluginContext, _config: CoderConfig): SessionHooks;
|
|
6
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,YAAY,CAa1F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function createSessionHooks(_ctx, _config) {
|
|
2
|
+
const initializedSessions = new Set();
|
|
3
|
+
return {
|
|
4
|
+
async onMessage(input, _output) {
|
|
5
|
+
const sessionId = extractSessionId(input);
|
|
6
|
+
if (!sessionId)
|
|
7
|
+
return;
|
|
8
|
+
if (!initializedSessions.has(sessionId)) {
|
|
9
|
+
initializedSessions.add(sessionId);
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function extractSessionId(input) {
|
|
15
|
+
if (typeof input === 'object' && input !== null && 'sessionID' in input) {
|
|
16
|
+
return input.sessionID;
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/plugin/hooks/session.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,kBAAkB,CAAC,IAAmB,EAAE,OAAoB;IAC3E,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE9C,OAAO;QACN,KAAK,CAAC,SAAS,CAAC,KAAc,EAAE,OAAgB;YAC/C,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;YAC1C,IAAI,CAAC,SAAS;gBAAE,OAAO;YAEvB,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBACzC,mBAAmB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACpC,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACvC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,WAAW,IAAI,KAAK,EAAE,CAAC;QACzE,OAAQ,KAA+B,CAAC,SAAS,CAAC;IACnD,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PluginContext, CoderConfig } from '../../types';
|
|
2
|
+
export interface ToolHooks {
|
|
3
|
+
before: (input: unknown, output: unknown) => Promise<void>;
|
|
4
|
+
after: (input: unknown, output: unknown) => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export declare function createToolHooks(ctx: PluginContext, config: CoderConfig): ToolHooks;
|
|
7
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG9D,MAAM,WAAW,SAAS;IACzB,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D;AAoBD,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,CAwDlF"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { checkAuth } from '../../services/auth';
|
|
2
|
+
const CLOUD_TOOL_PREFIXES = [
|
|
3
|
+
'agentuity.kv',
|
|
4
|
+
'agentuity.storage',
|
|
5
|
+
'agentuity.vector',
|
|
6
|
+
'agentuity.sandbox',
|
|
7
|
+
];
|
|
8
|
+
/** Cloud service detection for bash commands */
|
|
9
|
+
const CLOUD_SERVICES = {
|
|
10
|
+
'agentuity cloud kv': { name: 'KV Storage', emoji: '🗄️' },
|
|
11
|
+
'agentuity cloud storage': { name: 'Object Storage', emoji: '📦' },
|
|
12
|
+
'agentuity cloud vector': { name: 'Vector Search', emoji: '🔍' },
|
|
13
|
+
'agentuity cloud sandbox': { name: 'Sandbox', emoji: '🏖️' },
|
|
14
|
+
'agentuity cloud db': { name: 'Postgres', emoji: '🐘' },
|
|
15
|
+
'agentuity cloud ssh': { name: 'SSH', emoji: '🔐' },
|
|
16
|
+
'agentuity cloud scp': { name: 'File Transfer', emoji: '📤' },
|
|
17
|
+
};
|
|
18
|
+
export function createToolHooks(ctx, config) {
|
|
19
|
+
const blockedCommands = config.blockedCommands ?? [];
|
|
20
|
+
return {
|
|
21
|
+
async before(input, output) {
|
|
22
|
+
const toolName = extractToolName(input);
|
|
23
|
+
if (!toolName)
|
|
24
|
+
return;
|
|
25
|
+
// Check MCP cloud tools
|
|
26
|
+
if (isCloudTool(toolName)) {
|
|
27
|
+
const authResult = await checkAuth();
|
|
28
|
+
if (!authResult.ok) {
|
|
29
|
+
const out = output;
|
|
30
|
+
out.error = authResult.error;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// Detect bash commands using agentuity CLI
|
|
34
|
+
if (toolName === 'bash') {
|
|
35
|
+
const command = extractBashCommand(input);
|
|
36
|
+
if (command?.includes('agentuity')) {
|
|
37
|
+
// Security: Block sensitive commands
|
|
38
|
+
const blockedPattern = isBlockedCommand(command, blockedCommands);
|
|
39
|
+
if (blockedPattern) {
|
|
40
|
+
const out = output;
|
|
41
|
+
out.blocked = true;
|
|
42
|
+
out.error = `🚫 Blocked: "${blockedPattern}" commands are not allowed for security reasons.`;
|
|
43
|
+
ctx.client.app.log({
|
|
44
|
+
body: {
|
|
45
|
+
service: 'agentuity-coder',
|
|
46
|
+
level: 'warn',
|
|
47
|
+
message: `Blocked command pattern: ${blockedPattern}`,
|
|
48
|
+
extra: { command },
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// Show toast for cloud service usage
|
|
54
|
+
const service = detectCloudService(command);
|
|
55
|
+
if (service) {
|
|
56
|
+
try {
|
|
57
|
+
ctx.client.tui?.showToast?.({
|
|
58
|
+
body: { message: `${service.emoji} Agentuity ${service.name}` },
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// Toast may not be available
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
async after(_input, _output) { },
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function extractToolName(input) {
|
|
72
|
+
if (typeof input === 'object' && input !== null && 'tool' in input) {
|
|
73
|
+
return input.tool;
|
|
74
|
+
}
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
function extractBashCommand(input) {
|
|
78
|
+
if (typeof input !== 'object' || input === null)
|
|
79
|
+
return undefined;
|
|
80
|
+
const inp = input;
|
|
81
|
+
// Try different possible arg structures
|
|
82
|
+
if (typeof inp.command === 'string')
|
|
83
|
+
return inp.command;
|
|
84
|
+
if (typeof inp.args === 'object' && inp.args !== null) {
|
|
85
|
+
const args = inp.args;
|
|
86
|
+
if (typeof args.command === 'string')
|
|
87
|
+
return args.command;
|
|
88
|
+
}
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
function detectCloudService(command) {
|
|
92
|
+
for (const [pattern, service] of Object.entries(CLOUD_SERVICES)) {
|
|
93
|
+
if (command.includes(pattern)) {
|
|
94
|
+
return service;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
function isCloudTool(toolName) {
|
|
100
|
+
return CLOUD_TOOL_PREFIXES.some((prefix) => toolName.startsWith(prefix));
|
|
101
|
+
}
|
|
102
|
+
/** Check if a command matches any blocked pattern, returns the matched pattern or null */
|
|
103
|
+
function isBlockedCommand(command, blockedPatterns) {
|
|
104
|
+
for (const pattern of blockedPatterns) {
|
|
105
|
+
if (command.includes(pattern)) {
|
|
106
|
+
return pattern;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/plugin/hooks/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAOhD,MAAM,mBAAmB,GAAG;IAC3B,cAAc;IACd,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;CACnB,CAAC;AAEF,gDAAgD;AAChD,MAAM,cAAc,GAAoD;IACvE,oBAAoB,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE;IAC1D,yBAAyB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,EAAE;IAClE,wBAAwB,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE;IAChE,yBAAyB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;IAC5D,oBAAoB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;IACvD,qBAAqB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;IACnD,qBAAqB,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE;CAC7D,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,GAAkB,EAAE,MAAmB;IACtE,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,IAAI,EAAE,C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MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QACjE,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/B,OAAO,OAAO,CAAC;QAChB,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,SAAS,WAAW,CAAC,QAAgB;IACpC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED,0FAA0F;AAC1F,SAAS,gBAAgB,CAAC,OAAe,EAAE,eAAyB;IACnE,KAAK,MAAM,OAAO,IAAI,eAAe,EAAE,CAAC;QACvC,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/B,OAAO,OAAO,CAAC;QAChB,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAkC,MAAM,UAAU,CAAC;AAoB3F,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CA4ChF"}
|