joonecli 0.1.0 → 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/README.md +12 -12
- package/dist/__tests__/optimizations.test.js.map +1 -1
- package/dist/__tests__/promptBuilder.test.js +14 -20
- package/dist/__tests__/promptBuilder.test.js.map +1 -1
- package/dist/agents/agentRegistry.d.ts +37 -0
- package/dist/agents/agentRegistry.js +58 -0
- package/dist/agents/agentRegistry.js.map +1 -0
- package/dist/agents/agentSpec.d.ts +54 -0
- package/dist/agents/agentSpec.js +9 -0
- package/dist/agents/agentSpec.js.map +1 -0
- package/dist/agents/builtinAgents.d.ts +20 -0
- package/{src/agents/builtinAgents.ts → dist/agents/builtinAgents.js} +84 -101
- package/dist/agents/builtinAgents.js.map +1 -0
- package/dist/cli/config.d.ts +4 -0
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/index.js +29 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/postinstall.d.ts +2 -0
- package/dist/cli/postinstall.js +25 -0
- package/dist/cli/postinstall.js.map +1 -0
- package/dist/commands/builtinCommands.d.ts +21 -0
- package/dist/commands/builtinCommands.js +241 -0
- package/dist/commands/builtinCommands.js.map +1 -0
- package/dist/commands/commandRegistry.d.ts +92 -0
- package/dist/commands/commandRegistry.js +128 -0
- package/dist/commands/commandRegistry.js.map +1 -0
- package/dist/core/agentLoop.d.ts +7 -2
- package/dist/core/agentLoop.js +35 -13
- package/dist/core/agentLoop.js.map +1 -1
- package/dist/core/autoSave.d.ts +41 -0
- package/dist/core/autoSave.js +69 -0
- package/dist/core/autoSave.js.map +1 -0
- package/dist/core/compactor.d.ts +66 -0
- package/dist/core/compactor.js +170 -0
- package/dist/core/compactor.js.map +1 -0
- package/dist/core/contextGuard.d.ts +38 -0
- package/dist/core/contextGuard.js +122 -0
- package/dist/core/contextGuard.js.map +1 -0
- package/dist/core/events.d.ts +45 -0
- package/dist/core/events.js +8 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/promptBuilder.d.ts +16 -1
- package/dist/core/promptBuilder.js +27 -14
- package/dist/core/promptBuilder.js.map +1 -1
- package/dist/core/sessionResumer.js +3 -3
- package/dist/core/sessionResumer.js.map +1 -1
- package/dist/core/sessionStore.js +3 -2
- package/dist/core/sessionStore.js.map +1 -1
- package/dist/core/subAgent.d.ts +56 -0
- package/dist/core/subAgent.js +240 -0
- package/dist/core/subAgent.js.map +1 -0
- package/dist/core/tokenCounter.d.ts +8 -1
- package/dist/core/tokenCounter.js +28 -0
- package/dist/core/tokenCounter.js.map +1 -1
- package/dist/debug_google.d.ts +1 -0
- package/dist/debug_google.js +23 -0
- package/dist/debug_google.js.map +1 -0
- package/dist/middleware/permission.js +1 -0
- package/dist/middleware/permission.js.map +1 -1
- package/dist/test_google.d.ts +1 -0
- package/dist/test_google.js +32 -89
- package/dist/test_google.js.map +1 -0
- package/dist/tools/browser.js +4 -1
- package/dist/tools/browser.js.map +1 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +11 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/installHostDeps.d.ts +2 -0
- package/dist/tools/installHostDeps.js +37 -0
- package/dist/tools/installHostDeps.js.map +1 -0
- package/dist/tools/router.js +3 -0
- package/dist/tools/router.js.map +1 -1
- package/dist/tools/spawnAgent.d.ts +19 -0
- package/dist/tools/spawnAgent.js +132 -0
- package/dist/tools/spawnAgent.js.map +1 -0
- package/dist/tracing/sessionTracer.d.ts +1 -0
- package/dist/tracing/sessionTracer.js +4 -1
- package/dist/tracing/sessionTracer.js.map +1 -1
- package/dist/ui/App.js +94 -6
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/components/ActionLog.d.ts +7 -0
- package/dist/ui/components/ActionLog.js +63 -0
- package/dist/ui/components/ActionLog.js.map +1 -0
- package/dist/ui/components/FileBrowser.d.ts +2 -0
- package/dist/ui/components/FileBrowser.js +41 -0
- package/dist/ui/components/FileBrowser.js.map +1 -0
- package/package.json +5 -6
- package/AGENTS.md +0 -56
- package/Handover.md +0 -115
- package/PROGRESS.md +0 -160
- package/docs/01_insights_and_patterns.md +0 -27
- package/docs/02_edge_cases_and_mitigations.md +0 -143
- package/docs/03_initial_implementation_plan.md +0 -66
- package/docs/04_tech_stack_proposal.md +0 -20
- package/docs/05_prd.md +0 -87
- package/docs/06_user_stories.md +0 -72
- package/docs/07_system_architecture.md +0 -138
- package/docs/08_roadmap.md +0 -200
- package/e2b/Dockerfile +0 -26
- package/src/__tests__/bootstrap.test.ts +0 -111
- package/src/__tests__/config.test.ts +0 -97
- package/src/__tests__/m55.test.ts +0 -238
- package/src/__tests__/middleware.test.ts +0 -219
- package/src/__tests__/modelFactory.test.ts +0 -63
- package/src/__tests__/optimizations.test.ts +0 -201
- package/src/__tests__/promptBuilder.test.ts +0 -141
- package/src/__tests__/sandbox.test.ts +0 -102
- package/src/__tests__/security.test.ts +0 -122
- package/src/__tests__/streaming.test.ts +0 -82
- package/src/__tests__/toolRouter.test.ts +0 -52
- package/src/__tests__/tools.test.ts +0 -146
- package/src/__tests__/tracing.test.ts +0 -196
- package/src/agents/agentRegistry.ts +0 -69
- package/src/agents/agentSpec.ts +0 -67
- package/src/cli/config.ts +0 -124
- package/src/cli/index.ts +0 -730
- package/src/cli/modelFactory.ts +0 -174
- package/src/cli/providers.ts +0 -107
- package/src/commands/builtinCommands.ts +0 -293
- package/src/commands/commandRegistry.ts +0 -194
- package/src/core/agentLoop.d.ts.map +0 -1
- package/src/core/agentLoop.ts +0 -312
- package/src/core/autoSave.ts +0 -95
- package/src/core/compactor.ts +0 -252
- package/src/core/contextGuard.ts +0 -129
- package/src/core/errors.ts +0 -202
- package/src/core/promptBuilder.d.ts.map +0 -1
- package/src/core/promptBuilder.ts +0 -139
- package/src/core/reasoningRouter.ts +0 -121
- package/src/core/retry.ts +0 -75
- package/src/core/sessionResumer.ts +0 -90
- package/src/core/sessionStore.ts +0 -215
- package/src/core/subAgent.ts +0 -339
- package/src/core/tokenCounter.ts +0 -64
- package/src/evals/dataset.ts +0 -67
- package/src/evals/evaluator.ts +0 -81
- package/src/hitl/bridge.ts +0 -160
- package/src/middleware/commandSanitizer.ts +0 -60
- package/src/middleware/loopDetection.ts +0 -63
- package/src/middleware/permission.ts +0 -72
- package/src/middleware/pipeline.ts +0 -75
- package/src/middleware/preCompletion.ts +0 -94
- package/src/middleware/types.ts +0 -45
- package/src/sandbox/bootstrap.ts +0 -121
- package/src/sandbox/manager.ts +0 -239
- package/src/sandbox/sync.ts +0 -157
- package/src/skills/loader.ts +0 -143
- package/src/skills/tools.ts +0 -99
- package/src/skills/types.ts +0 -13
- package/src/test_cache.ts +0 -72
- package/src/test_google.js +0 -40
- package/src/test_google.ts +0 -40
- package/src/tools/askUser.ts +0 -47
- package/src/tools/browser.ts +0 -137
- package/src/tools/index.d.ts.map +0 -1
- package/src/tools/index.ts +0 -237
- package/src/tools/registry.ts +0 -198
- package/src/tools/router.ts +0 -78
- package/src/tools/security.ts +0 -220
- package/src/tools/spawnAgent.ts +0 -158
- package/src/tools/webSearch.ts +0 -142
- package/src/tracing/analyzer.ts +0 -265
- package/src/tracing/langsmith.ts +0 -63
- package/src/tracing/sessionTracer.ts +0 -202
- package/src/tracing/types.ts +0 -49
- package/src/types/valyu.d.ts +0 -37
- package/src/ui/App.tsx +0 -404
- package/src/ui/components/HITLPrompt.tsx +0 -119
- package/src/ui/components/Header.tsx +0 -51
- package/src/ui/components/MessageBubble.tsx +0 -46
- package/src/ui/components/StatusBar.tsx +0 -138
- package/src/ui/components/StreamingText.tsx +0 -48
- package/src/ui/components/ToolCallPanel.tsx +0 -80
- package/tests/commands/commands.test.ts +0 -356
- package/tests/core/compactor.test.ts +0 -217
- package/tests/core/retryAndErrors.test.ts +0 -164
- package/tests/core/sessionResumer.test.ts +0 -95
- package/tests/core/sessionStore.test.ts +0 -84
- package/tests/core/stability.test.ts +0 -165
- package/tests/core/subAgent.test.ts +0 -238
- package/tests/hitl/hitlBridge.test.ts +0 -115
- package/tsconfig.json +0 -16
- package/vitest.config.ts +0 -10
- package/vitest.out +0 -48
package/README.md
CHANGED
|
@@ -26,36 +26,36 @@
|
|
|
26
26
|
|
|
27
27
|
## 🚀 Getting Started
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
## 🚀 Quickstart
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
The fastest way to experience Joone is to run it on-demand without installing anything globally. This will automatically trigger the onboarding wizard and launch your first session seamlessly:
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
|
|
34
|
+
npx joone@latest start
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### Global Installation (Alternative)
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
If you prefer to install Joone globally:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
joone
|
|
42
|
+
npm install -g joone
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Once installed, simply run `joone` in any directory. If it's your first time, the configuration wizard will open automatically.
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### Configuration
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
If you ever need to change your LLM provider, API keys, or models, run the configuration wizard:
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
joone
|
|
52
|
+
joone config
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
To start an autonomous session in your current project directory:
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
|
|
58
|
+
joone start
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
### Uninstallation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimizations.test.js","sourceRoot":"","sources":["../../src/__tests__/optimizations.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,SAAS,E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AAE,CAAC,EAAE,CAAC,CAAC;QAEzD,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS;QAC3C,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,WAAW;QAE9B,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAE,SAAS;QAC3C,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,qBAAqB;QAExC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS;QAC1C,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS;QAE1C,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,wCAAwC;IAExC,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QAErE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3D,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -15,16 +15,14 @@ describe("CacheOptimizedPromptBuilder", () => {
|
|
|
15
15
|
conversationHistory: [],
|
|
16
16
|
};
|
|
17
17
|
const messages = builder.buildPrompt(state);
|
|
18
|
-
//
|
|
19
|
-
expect(messages).toHaveLength(
|
|
20
|
-
//
|
|
18
|
+
// exactly 1 static message when history is empty
|
|
19
|
+
expect(messages).toHaveLength(1);
|
|
20
|
+
// must be system-type message
|
|
21
21
|
expect(messages[0]._getType()).toBe("system");
|
|
22
|
-
expect(messages[1]._getType()).toBe("system");
|
|
23
|
-
expect(messages[2]._getType()).toBe("system");
|
|
24
22
|
// Order must be: global → project → session
|
|
25
23
|
expect(messages[0].content).toContain("You are a coding assistant.");
|
|
26
|
-
expect(messages[
|
|
27
|
-
expect(messages[
|
|
24
|
+
expect(messages[0].content).toContain("Use TypeScript.");
|
|
25
|
+
expect(messages[0].content).toContain("OS: Windows");
|
|
28
26
|
});
|
|
29
27
|
// ─── Behavior 2: Conversation history appended AFTER the static prefix ───
|
|
30
28
|
// Dynamic messages must never appear before the static prefix.
|
|
@@ -40,17 +38,15 @@ describe("CacheOptimizedPromptBuilder", () => {
|
|
|
40
38
|
],
|
|
41
39
|
};
|
|
42
40
|
const messages = builder.buildPrompt(state);
|
|
43
|
-
//
|
|
44
|
-
expect(messages).toHaveLength(
|
|
45
|
-
// First
|
|
41
|
+
// 1 static + 2 conversation = 3
|
|
42
|
+
expect(messages).toHaveLength(3);
|
|
43
|
+
// First is system messages (static prefix)
|
|
46
44
|
expect(messages[0]._getType()).toBe("system");
|
|
47
|
-
expect(messages[1]._getType()).toBe("system");
|
|
48
|
-
expect(messages[2]._getType()).toBe("system");
|
|
49
45
|
// Last 2 are conversation messages
|
|
50
|
-
expect(messages[
|
|
51
|
-
expect(messages[
|
|
52
|
-
expect(messages[
|
|
53
|
-
expect(messages[
|
|
46
|
+
expect(messages[1]._getType()).toBe("human");
|
|
47
|
+
expect(messages[2]._getType()).toBe("ai");
|
|
48
|
+
expect(messages[1].content).toBe("Hello");
|
|
49
|
+
expect(messages[2].content).toBe("Hi there!");
|
|
54
50
|
});
|
|
55
51
|
// ─── Behavior 3: Static prefix is identical across calls ───
|
|
56
52
|
// If we call buildPrompt twice with the same state (but more history),
|
|
@@ -68,10 +64,8 @@ describe("CacheOptimizedPromptBuilder", () => {
|
|
|
68
64
|
state.conversationHistory.push(new HumanMessage("What is 2+2?"));
|
|
69
65
|
state.conversationHistory.push(new AIMessage("4"));
|
|
70
66
|
const secondCall = builder.buildPrompt(state);
|
|
71
|
-
// Static prefix (first
|
|
67
|
+
// Static prefix (first message) must be identical
|
|
72
68
|
expect(secondCall[0].content).toBe(firstCall[0].content);
|
|
73
|
-
expect(secondCall[1].content).toBe(firstCall[1].content);
|
|
74
|
-
expect(secondCall[2].content).toBe(firstCall[2].content);
|
|
75
69
|
});
|
|
76
70
|
// ─── Behavior 4: System reminder is injected as a HumanMessage ───
|
|
77
71
|
it("injects a system reminder as a HumanMessage with <system-reminder> tags", () => {
|
|
@@ -99,7 +93,7 @@ describe("CacheOptimizedPromptBuilder", () => {
|
|
|
99
93
|
const compacted = builder.compactHistory(longHistory, "Completed steps 1 and 2.");
|
|
100
94
|
// Default keepLastN=6, history has 4 → summary + all 4 preserved
|
|
101
95
|
expect(compacted).toHaveLength(5);
|
|
102
|
-
expect(compacted[0]._getType()).toBe("
|
|
96
|
+
expect(compacted[0]._getType()).toBe("human");
|
|
103
97
|
expect(compacted[0].content).toContain("Completed steps 1 and 2.");
|
|
104
98
|
// Recent messages are preserved after the summary
|
|
105
99
|
expect(compacted[1].content).toBe("Step 1");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptBuilder.test.js","sourceRoot":"","sources":["../../src/__tests__/promptBuilder.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,2BAA2B,GAE5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,YAAY,EACZ,SAAS,GACV,MAAM,0BAA0B,CAAC;AAElC,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,6CAA6C;IAC7C,kEAAkE;IAClE,2DAA2D;IAC3D,mDAAmD;IAEnD,EAAE,CAAC,4EAA4E,EAAE,GAAG,EAAE;QACpF,MAAM,OAAO,GAAG,IAAI,2BAA2B,EAAE,CAAC;QA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AAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for named sub-agents. The registry enables:
|
|
5
|
+
* - Decoupled agent development (add agents without touching the main loop)
|
|
6
|
+
* - Prompt injection (registry summary included in the main agent's system prompt)
|
|
7
|
+
* - Lookup by name for the spawn_agent tool
|
|
8
|
+
*/
|
|
9
|
+
import { AgentSpec } from "./agentSpec.js";
|
|
10
|
+
export declare class AgentRegistry {
|
|
11
|
+
private agents;
|
|
12
|
+
/**
|
|
13
|
+
* Register a new agent spec. Overwrites if name already exists.
|
|
14
|
+
*/
|
|
15
|
+
register(spec: AgentSpec): void;
|
|
16
|
+
/**
|
|
17
|
+
* Look up an agent by name.
|
|
18
|
+
*/
|
|
19
|
+
get(name: string): AgentSpec | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Returns all registered agent specs.
|
|
22
|
+
*/
|
|
23
|
+
getAll(): AgentSpec[];
|
|
24
|
+
/**
|
|
25
|
+
* Returns all registered agent names.
|
|
26
|
+
*/
|
|
27
|
+
getNames(): string[];
|
|
28
|
+
/**
|
|
29
|
+
* Returns true if an agent with the given name exists.
|
|
30
|
+
*/
|
|
31
|
+
has(name: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Generates a summary of all available agents, formatted for injection
|
|
34
|
+
* into the main agent's system prompt.
|
|
35
|
+
*/
|
|
36
|
+
getSummary(): string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for named sub-agents. The registry enables:
|
|
5
|
+
* - Decoupled agent development (add agents without touching the main loop)
|
|
6
|
+
* - Prompt injection (registry summary included in the main agent's system prompt)
|
|
7
|
+
* - Lookup by name for the spawn_agent tool
|
|
8
|
+
*/
|
|
9
|
+
export class AgentRegistry {
|
|
10
|
+
agents = new Map();
|
|
11
|
+
/**
|
|
12
|
+
* Register a new agent spec. Overwrites if name already exists.
|
|
13
|
+
*/
|
|
14
|
+
register(spec) {
|
|
15
|
+
this.agents.set(spec.name, spec);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Look up an agent by name.
|
|
19
|
+
*/
|
|
20
|
+
get(name) {
|
|
21
|
+
return this.agents.get(name);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns all registered agent specs.
|
|
25
|
+
*/
|
|
26
|
+
getAll() {
|
|
27
|
+
return Array.from(this.agents.values());
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns all registered agent names.
|
|
31
|
+
*/
|
|
32
|
+
getNames() {
|
|
33
|
+
return Array.from(this.agents.keys());
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns true if an agent with the given name exists.
|
|
37
|
+
*/
|
|
38
|
+
has(name) {
|
|
39
|
+
return this.agents.has(name);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Generates a summary of all available agents, formatted for injection
|
|
43
|
+
* into the main agent's system prompt.
|
|
44
|
+
*/
|
|
45
|
+
getSummary() {
|
|
46
|
+
if (this.agents.size === 0) {
|
|
47
|
+
return "No sub-agents are currently registered.";
|
|
48
|
+
}
|
|
49
|
+
const lines = ["Available sub-agents (use spawn_agent tool to invoke):\n"];
|
|
50
|
+
for (const spec of this.agents.values()) {
|
|
51
|
+
const tools = spec.tools ? ` [tools: ${spec.tools.join(", ")}]` : " [all tools]";
|
|
52
|
+
const turns = spec.maxTurns ?? 10;
|
|
53
|
+
lines.push(` • ${spec.name}: ${spec.description}${tools} (max ${turns} turns)`);
|
|
54
|
+
}
|
|
55
|
+
return lines.join("\n");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=agentRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,GAAG,KAAK,SAAS,KAAK,SAAS,CAAC,CAAC;QACnF,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Specification
|
|
3
|
+
*
|
|
4
|
+
* Defines the shape of a sub-agent: its identity, capabilities, constraints,
|
|
5
|
+
* and tools. This enables decoupled agent development — new agents can be
|
|
6
|
+
* added to the registry without modifying the main agent or harness.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Describes a named sub-agent with a purpose-tuned configuration.
|
|
10
|
+
*/
|
|
11
|
+
export interface AgentSpec {
|
|
12
|
+
/** Unique name (e.g., "script_runner", "code_reviewer"). */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Human-readable description included in the main agent's prompt. */
|
|
15
|
+
description: string;
|
|
16
|
+
/** Dedicated system prompt for this sub-agent. */
|
|
17
|
+
systemPrompt: string;
|
|
18
|
+
/** Restrict to specific tool names. If omitted, all main-agent tools are available. */
|
|
19
|
+
tools?: string[];
|
|
20
|
+
/** Maximum turns before the sub-agent is forcibly stopped (doom-loop protection). Default: 10. */
|
|
21
|
+
maxTurns?: number;
|
|
22
|
+
/** Override model for this agent (default: FAST_MODEL_DEFAULTS from same provider). */
|
|
23
|
+
model?: string;
|
|
24
|
+
/** Permission behavior for this agent. */
|
|
25
|
+
permissionMode?: "auto" | "ask_all";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Structured result returned by a sub-agent after completing (or failing) a task.
|
|
29
|
+
* Only this result is injected into the main agent's history — the sub-agent's
|
|
30
|
+
* full conversation is discarded to save context.
|
|
31
|
+
*/
|
|
32
|
+
export interface SubAgentResult {
|
|
33
|
+
/** The agent name from AgentSpec. */
|
|
34
|
+
agentName: string;
|
|
35
|
+
/** The original task description. */
|
|
36
|
+
taskDescription: string;
|
|
37
|
+
/** Outcome status. */
|
|
38
|
+
outcome: "success" | "failure" | "partial";
|
|
39
|
+
/** The final text output from the sub-agent. */
|
|
40
|
+
result: string;
|
|
41
|
+
/** Files created, modified, or deleted during the sub-task. */
|
|
42
|
+
filesModified: string[];
|
|
43
|
+
/** Total tool calls executed. */
|
|
44
|
+
toolCallCount: number;
|
|
45
|
+
/** Approximate token usage. */
|
|
46
|
+
tokenUsage: {
|
|
47
|
+
prompt: number;
|
|
48
|
+
completion: number;
|
|
49
|
+
};
|
|
50
|
+
/** Wall-clock duration in milliseconds. */
|
|
51
|
+
duration: number;
|
|
52
|
+
/** Number of turns the sub-agent ran. */
|
|
53
|
+
turnsUsed: number;
|
|
54
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Specification
|
|
3
|
+
*
|
|
4
|
+
* Defines the shape of a sub-agent: its identity, capabilities, constraints,
|
|
5
|
+
* and tools. This enables decoupled agent development — new agents can be
|
|
6
|
+
* added to the registry without modifying the main agent or harness.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=agentSpec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentSpec.js","sourceRoot":"","sources":["../../src/agents/agentSpec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in Agent Specs
|
|
3
|
+
*
|
|
4
|
+
* Pre-configured sub-agents for common coding tasks. Each agent has a
|
|
5
|
+
* purpose-tuned system prompt and restricted tool access. This enables
|
|
6
|
+
* decoupled agent development — new agents are added here without
|
|
7
|
+
* touching the main agent or harness.
|
|
8
|
+
*/
|
|
9
|
+
import { AgentSpec } from "./agentSpec.js";
|
|
10
|
+
import { AgentRegistry } from "./agentRegistry.js";
|
|
11
|
+
export declare const ScriptRunnerAgent: AgentSpec;
|
|
12
|
+
export declare const CodeReviewerAgent: AgentSpec;
|
|
13
|
+
export declare const TestRunnerAgent: AgentSpec;
|
|
14
|
+
export declare const FileAnalystAgent: AgentSpec;
|
|
15
|
+
export declare const SecurityAuditorAgent: AgentSpec;
|
|
16
|
+
export declare const BrowserAgent: AgentSpec;
|
|
17
|
+
/**
|
|
18
|
+
* Creates an AgentRegistry pre-loaded with all built-in agents.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createDefaultAgentRegistry(): AgentRegistry;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Built-in Agent Specs
|
|
3
|
-
*
|
|
4
|
-
* Pre-configured sub-agents for common coding tasks. Each agent has a
|
|
5
|
-
* purpose-tuned system prompt and restricted tool access. This enables
|
|
6
|
-
* decoupled agent development — new agents are added here without
|
|
7
|
-
* touching the main agent or harness.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const ScriptRunnerAgent: AgentSpec = {
|
|
16
|
-
name: "script_runner",
|
|
17
|
-
description: "Execute and test scripts, return stdout/stderr and exit codes",
|
|
18
|
-
systemPrompt: `You are a script execution agent. Your task is to run scripts and commands, capturing their output.
|
|
1
|
+
/**
|
|
2
|
+
* Built-in Agent Specs
|
|
3
|
+
*
|
|
4
|
+
* Pre-configured sub-agents for common coding tasks. Each agent has a
|
|
5
|
+
* purpose-tuned system prompt and restricted tool access. This enables
|
|
6
|
+
* decoupled agent development — new agents are added here without
|
|
7
|
+
* touching the main agent or harness.
|
|
8
|
+
*/
|
|
9
|
+
import { AgentRegistry } from "./agentRegistry.js";
|
|
10
|
+
// ─── Script Runner ──────────────────────────────────────────────────────────────
|
|
11
|
+
export const ScriptRunnerAgent = {
|
|
12
|
+
name: "script_runner",
|
|
13
|
+
description: "Execute and test scripts, return stdout/stderr and exit codes",
|
|
14
|
+
systemPrompt: `You are a script execution agent. Your task is to run scripts and commands, capturing their output.
|
|
19
15
|
|
|
20
16
|
Rules:
|
|
21
17
|
- Run the commands/scripts as specified in the task
|
|
@@ -23,18 +19,16 @@ Rules:
|
|
|
23
19
|
- Report the exit code
|
|
24
20
|
- If the script fails, analyze the error and report the likely cause
|
|
25
21
|
- Do NOT modify any files unless explicitly asked
|
|
26
|
-
- Summarize the results clearly at the end`,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
description: "Review code changes and suggest improvements",
|
|
37
|
-
systemPrompt: `You are a code review agent. Your task is to analyze code files and provide quality feedback.
|
|
22
|
+
- Summarize the results clearly at the end`,
|
|
23
|
+
tools: ["bash", "read_file"],
|
|
24
|
+
maxTurns: 8,
|
|
25
|
+
permissionMode: "auto",
|
|
26
|
+
};
|
|
27
|
+
// ─── Code Reviewer ──────────────────────────────────────────────────────────────
|
|
28
|
+
export const CodeReviewerAgent = {
|
|
29
|
+
name: "code_reviewer",
|
|
30
|
+
description: "Review code changes and suggest improvements",
|
|
31
|
+
systemPrompt: `You are a code review agent. Your task is to analyze code files and provide quality feedback.
|
|
38
32
|
|
|
39
33
|
Rules:
|
|
40
34
|
- Read the specified files and analyze them
|
|
@@ -42,18 +36,16 @@ Rules:
|
|
|
42
36
|
- Check style consistency and naming conventions
|
|
43
37
|
- Provide specific, actionable suggestions with line numbers
|
|
44
38
|
- Rate overall quality: 1-5 stars
|
|
45
|
-
- Be constructive and specific — avoid vague feedback`,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
description: "Run test suites, diagnose failures, and suggest fixes",
|
|
56
|
-
systemPrompt: `You are a test execution agent. Your task is to run tests and analyze the results.
|
|
39
|
+
- Be constructive and specific — avoid vague feedback`,
|
|
40
|
+
tools: ["read_file", "bash"],
|
|
41
|
+
maxTurns: 6,
|
|
42
|
+
permissionMode: "auto",
|
|
43
|
+
};
|
|
44
|
+
// ─── Test Runner ────────────────────────────────────────────────────────────────
|
|
45
|
+
export const TestRunnerAgent = {
|
|
46
|
+
name: "test_runner",
|
|
47
|
+
description: "Run test suites, diagnose failures, and suggest fixes",
|
|
48
|
+
systemPrompt: `You are a test execution agent. Your task is to run tests and analyze the results.
|
|
57
49
|
|
|
58
50
|
Rules:
|
|
59
51
|
- Execute the specified test command(s)
|
|
@@ -61,36 +53,32 @@ Rules:
|
|
|
61
53
|
- For failures: read the relevant source files to diagnose the cause
|
|
62
54
|
- Suggest specific fixes for failing tests
|
|
63
55
|
- Report: total passes, failures, skips, and coverage if available
|
|
64
|
-
- If asked to fix tests, you may write corrected test files`,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
description: "Analyze project structure, find patterns, count metrics",
|
|
75
|
-
systemPrompt: `You are a file analysis agent. Your task is to analyze the project structure and report findings.
|
|
56
|
+
- If asked to fix tests, you may write corrected test files`,
|
|
57
|
+
tools: ["bash", "read_file", "write_file"],
|
|
58
|
+
maxTurns: 10,
|
|
59
|
+
permissionMode: "auto",
|
|
60
|
+
};
|
|
61
|
+
// ─── File Analyst ───────────────────────────────────────────────────────────────
|
|
62
|
+
export const FileAnalystAgent = {
|
|
63
|
+
name: "file_analyst",
|
|
64
|
+
description: "Analyze project structure, find patterns, count metrics",
|
|
65
|
+
systemPrompt: `You are a file analysis agent. Your task is to analyze the project structure and report findings.
|
|
76
66
|
|
|
77
67
|
Rules:
|
|
78
68
|
- Use bash commands (find, grep, wc, etc.) to analyze the project
|
|
79
69
|
- Report: file counts by type, line counts, directory structure
|
|
80
70
|
- Identify patterns: naming conventions, common imports, dependency usage
|
|
81
71
|
- Highlight anything unusual or noteworthy
|
|
82
|
-
- Present results in a clear, structured format`,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
description: "Run security scans and report vulnerabilities",
|
|
93
|
-
systemPrompt: `You are a security audit agent. Your task is to check for security issues in the codebase.
|
|
72
|
+
- Present results in a clear, structured format`,
|
|
73
|
+
tools: ["bash", "read_file"],
|
|
74
|
+
maxTurns: 6,
|
|
75
|
+
permissionMode: "auto",
|
|
76
|
+
};
|
|
77
|
+
// ─── Security Auditor ───────────────────────────────────────────────────────────
|
|
78
|
+
export const SecurityAuditorAgent = {
|
|
79
|
+
name: "security_auditor",
|
|
80
|
+
description: "Run security scans and report vulnerabilities",
|
|
81
|
+
systemPrompt: `You are a security audit agent. Your task is to check for security issues in the codebase.
|
|
94
82
|
|
|
95
83
|
Rules:
|
|
96
84
|
- Check for: hardcoded secrets, SQL injection, XSS, insecure dependencies
|
|
@@ -98,18 +86,16 @@ Rules:
|
|
|
98
86
|
- Read configuration files for security misconfigurations
|
|
99
87
|
- Rate severity: Critical, High, Medium, Low, Info
|
|
100
88
|
- Provide remediation steps for each finding
|
|
101
|
-
- Do NOT expose actual secret values in your report`,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
description: "Browse URLs, extract content, analyze web pages",
|
|
112
|
-
systemPrompt: `You are a web browsing agent. Your task is to access URLs and extract information.
|
|
89
|
+
- Do NOT expose actual secret values in your report`,
|
|
90
|
+
tools: ["bash", "read_file"],
|
|
91
|
+
maxTurns: 8,
|
|
92
|
+
permissionMode: "auto",
|
|
93
|
+
};
|
|
94
|
+
// ─── Browser Agent ──────────────────────────────────────────────────────────────
|
|
95
|
+
export const BrowserAgent = {
|
|
96
|
+
name: "browser_agent",
|
|
97
|
+
description: "Browse URLs, extract content, analyze web pages",
|
|
98
|
+
systemPrompt: `You are a web browsing agent. Your task is to access URLs and extract information.
|
|
113
99
|
|
|
114
100
|
Rules:
|
|
115
101
|
- Navigate to the specified URL(s)
|
|
@@ -117,26 +103,23 @@ Rules:
|
|
|
117
103
|
- Summarize the page content clearly
|
|
118
104
|
- Report any errors (404, timeouts, etc.)
|
|
119
105
|
- Do NOT submit forms or make purchases unless explicitly instructed
|
|
120
|
-
- If the page requires authentication, report that you cannot access it`,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
return registry;
|
|
142
|
-
}
|
|
106
|
+
- If the page requires authentication, report that you cannot access it`,
|
|
107
|
+
tools: ["bash"],
|
|
108
|
+
maxTurns: 6,
|
|
109
|
+
permissionMode: "auto",
|
|
110
|
+
};
|
|
111
|
+
// ─── Registry Factory ───────────────────────────────────────────────────────────
|
|
112
|
+
/**
|
|
113
|
+
* Creates an AgentRegistry pre-loaded with all built-in agents.
|
|
114
|
+
*/
|
|
115
|
+
export function createDefaultAgentRegistry() {
|
|
116
|
+
const registry = new AgentRegistry();
|
|
117
|
+
registry.register(ScriptRunnerAgent);
|
|
118
|
+
registry.register(CodeReviewerAgent);
|
|
119
|
+
registry.register(TestRunnerAgent);
|
|
120
|
+
registry.register(FileAnalystAgent);
|
|
121
|
+
registry.register(SecurityAuditorAgent);
|
|
122
|
+
registry.register(BrowserAgent);
|
|
123
|
+
return registry;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=builtinAgents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtinAgents.js","sourceRoot":"","sources":["../../src/agents/builtinAgents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;;;;;;;;oDAQoC;IAClD,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;IAC5B,QAAQ,EAAE,CAAC;IACX,cAAc,EAAE,MAAM;CACvB,CAAC;AAEF,mFAAmF;AAEnF,MAAM,CAAC,MAAM,YAAY,GAAc;IACrC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,iDAAiD;IAC9D,YAAY,EAAE;;;;;;;;wEAQwD;IACtE,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC;IACX,cAAc,EAAE,MAAM;CACvB,CAAC;AAEF,mFAAmF;AAEnF;;GAEG;AACH,MAAM,UAAU,0BAA0B;IACxC,MAAM,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAC;IAErC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IACxC,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEhC,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -26,6 +26,10 @@ export interface JooneConfig {
|
|
|
26
26
|
langsmithProject?: string;
|
|
27
27
|
/** Tool permission mode: 'auto' (no prompts), 'ask_dangerous' (prompt for destructive tools), 'ask_all' (prompt for everything). */
|
|
28
28
|
permissionMode?: "auto" | "ask_dangerous" | "ask_all";
|
|
29
|
+
/** Override model for context compaction (default: auto-selected fast model from same provider). */
|
|
30
|
+
compactModel?: string;
|
|
31
|
+
/** Override model for sub-agents (default: auto-selected fast model from same provider). */
|
|
32
|
+
subAgentModel?: string;
|
|
29
33
|
}
|
|
30
34
|
/**
|
|
31
35
|
* Sensible defaults — Anthropic Claude as the default provider.
|
package/dist/cli/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/cli/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/cli/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAoClC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,CAAC;IACd,SAAS,EAAE,IAAI;IACf,cAAc,EAAE,MAAM;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,iBAAiB,GAA2B;IAChD,SAAS,EAAE,mBAAmB;IAC9B,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE,kBAAkB;IAC5B,yCAAyC;CAC1C,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,UAAkB;IAC3C,IAAI,MAAmB,CAAC;IAExB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,MAAM,GAAG,EAAE,GAAG,cAAc,EAAE,CAAC;IACjC,CAAC;SAAM,CAAC;QACN,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YACjD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAA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