joonecli 0.1.1 → 0.2.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.
Files changed (235) hide show
  1. package/dist/__tests__/config.test.js +1 -0
  2. package/dist/__tests__/config.test.js.map +1 -1
  3. package/dist/__tests__/installHostDeps.test.js +45 -0
  4. package/dist/__tests__/installHostDeps.test.js.map +1 -0
  5. package/dist/__tests__/whitelistedBackend.test.js +18 -0
  6. package/dist/__tests__/whitelistedBackend.test.js.map +1 -0
  7. package/dist/cli/config.d.ts +2 -0
  8. package/dist/cli/config.js +1 -0
  9. package/dist/cli/config.js.map +1 -1
  10. package/dist/cli/index.js +84 -97
  11. package/dist/cli/index.js.map +1 -1
  12. package/dist/commands/builtinCommands.js +6 -6
  13. package/dist/commands/builtinCommands.js.map +1 -1
  14. package/dist/commands/commandRegistry.d.ts +3 -1
  15. package/dist/commands/commandRegistry.js.map +1 -1
  16. package/dist/core/agentLoop.d.ts +11 -28
  17. package/dist/core/agentLoop.js +68 -229
  18. package/dist/core/agentLoop.js.map +1 -1
  19. package/dist/core/compactor.js +2 -2
  20. package/dist/core/compactor.js.map +1 -1
  21. package/dist/core/contextGuard.d.ts +5 -0
  22. package/dist/core/contextGuard.js +30 -3
  23. package/dist/core/contextGuard.js.map +1 -1
  24. package/dist/core/events.d.ts +45 -0
  25. package/dist/core/events.js +8 -0
  26. package/dist/core/events.js.map +1 -0
  27. package/dist/core/promptBuilder.js.map +1 -1
  28. package/dist/core/sessionStore.js +3 -2
  29. package/dist/core/sessionStore.js.map +1 -1
  30. package/dist/core/tokenCounter.d.ts +8 -1
  31. package/dist/core/tokenCounter.js +28 -0
  32. package/dist/core/tokenCounter.js.map +1 -1
  33. package/dist/hitl/bridge.js +1 -27
  34. package/dist/hitl/bridge.js.map +1 -1
  35. package/dist/middleware/loopDetection.d.ts +7 -23
  36. package/dist/middleware/loopDetection.js +38 -42
  37. package/dist/middleware/loopDetection.js.map +1 -1
  38. package/dist/sandbox/whitelistedBackend.d.ts +5 -0
  39. package/dist/sandbox/whitelistedBackend.js +27 -0
  40. package/dist/sandbox/whitelistedBackend.js.map +1 -0
  41. package/dist/tools/askUser.d.ts +12 -3
  42. package/dist/tools/askUser.js +16 -28
  43. package/dist/tools/askUser.js.map +1 -1
  44. package/dist/tools/bashTool.d.ts +11 -0
  45. package/dist/tools/bashTool.js +51 -0
  46. package/dist/tools/bashTool.js.map +1 -0
  47. package/dist/tools/index.d.ts +15 -27
  48. package/dist/tools/index.js +9 -181
  49. package/dist/tools/index.js.map +1 -1
  50. package/dist/tools/installHostDeps.d.ts +8 -0
  51. package/dist/tools/installHostDeps.js +44 -0
  52. package/dist/tools/installHostDeps.js.map +1 -0
  53. package/dist/tracing/sessionTracer.d.ts +1 -0
  54. package/dist/tracing/sessionTracer.js +4 -1
  55. package/dist/tracing/sessionTracer.js.map +1 -1
  56. package/dist/ui/App.js +116 -55
  57. package/dist/ui/App.js.map +1 -1
  58. package/dist/ui/components/ActionLog.d.ts +7 -0
  59. package/dist/ui/components/ActionLog.js +63 -0
  60. package/dist/ui/components/ActionLog.js.map +1 -0
  61. package/dist/ui/components/FileBrowser.d.ts +2 -0
  62. package/dist/ui/components/FileBrowser.js +41 -0
  63. package/dist/ui/components/FileBrowser.js.map +1 -0
  64. package/dist/ui/components/MessageBubble.js +1 -1
  65. package/dist/ui/components/MessageBubble.js.map +1 -1
  66. package/package.json +8 -5
  67. package/AGENTS.md +0 -56
  68. package/Handover.md +0 -115
  69. package/PROGRESS.md +0 -160
  70. package/dist/__tests__/m55.test.js +0 -160
  71. package/dist/__tests__/m55.test.js.map +0 -1
  72. package/dist/__tests__/middleware.test.js +0 -169
  73. package/dist/__tests__/middleware.test.js.map +0 -1
  74. package/dist/__tests__/optimizations.test.d.ts +0 -1
  75. package/dist/__tests__/optimizations.test.js +0 -136
  76. package/dist/__tests__/optimizations.test.js.map +0 -1
  77. package/dist/__tests__/security.test.d.ts +0 -1
  78. package/dist/__tests__/security.test.js +0 -86
  79. package/dist/__tests__/security.test.js.map +0 -1
  80. package/dist/__tests__/streaming.test.d.ts +0 -1
  81. package/dist/__tests__/streaming.test.js +0 -71
  82. package/dist/__tests__/streaming.test.js.map +0 -1
  83. package/dist/__tests__/toolRouter.test.d.ts +0 -1
  84. package/dist/__tests__/toolRouter.test.js +0 -37
  85. package/dist/__tests__/toolRouter.test.js.map +0 -1
  86. package/dist/__tests__/tools.test.d.ts +0 -1
  87. package/dist/__tests__/tools.test.js +0 -112
  88. package/dist/__tests__/tools.test.js.map +0 -1
  89. package/dist/core/subAgent.d.ts +0 -56
  90. package/dist/core/subAgent.js +0 -240
  91. package/dist/core/subAgent.js.map +0 -1
  92. package/dist/debug_google.d.ts +0 -1
  93. package/dist/debug_google.js +0 -23
  94. package/dist/debug_google.js.map +0 -1
  95. package/dist/middleware/commandSanitizer.d.ts +0 -18
  96. package/dist/middleware/commandSanitizer.js +0 -50
  97. package/dist/middleware/commandSanitizer.js.map +0 -1
  98. package/dist/middleware/permission.d.ts +0 -17
  99. package/dist/middleware/permission.js +0 -59
  100. package/dist/middleware/permission.js.map +0 -1
  101. package/dist/middleware/pipeline.d.ts +0 -31
  102. package/dist/middleware/pipeline.js +0 -62
  103. package/dist/middleware/pipeline.js.map +0 -1
  104. package/dist/middleware/preCompletion.d.ts +0 -29
  105. package/dist/middleware/preCompletion.js +0 -82
  106. package/dist/middleware/preCompletion.js.map +0 -1
  107. package/dist/middleware/types.d.ts +0 -40
  108. package/dist/middleware/types.js +0 -8
  109. package/dist/middleware/types.js.map +0 -1
  110. package/dist/skills/loader.d.ts +0 -55
  111. package/dist/skills/loader.js +0 -132
  112. package/dist/skills/loader.js.map +0 -1
  113. package/dist/skills/tools.d.ts +0 -5
  114. package/dist/skills/tools.js +0 -78
  115. package/dist/skills/tools.js.map +0 -1
  116. package/dist/test_cache.d.ts +0 -1
  117. package/dist/test_cache.js +0 -55
  118. package/dist/test_cache.js.map +0 -1
  119. package/dist/test_google.d.ts +0 -1
  120. package/dist/test_google.js +0 -36
  121. package/dist/test_google.js.map +0 -1
  122. package/dist/tools/browser.d.ts +0 -19
  123. package/dist/tools/browser.js +0 -111
  124. package/dist/tools/browser.js.map +0 -1
  125. package/dist/tools/registry.d.ts +0 -31
  126. package/dist/tools/registry.js +0 -168
  127. package/dist/tools/registry.js.map +0 -1
  128. package/dist/tools/router.d.ts +0 -34
  129. package/dist/tools/router.js +0 -75
  130. package/dist/tools/router.js.map +0 -1
  131. package/dist/tools/security.d.ts +0 -28
  132. package/dist/tools/security.js +0 -183
  133. package/dist/tools/security.js.map +0 -1
  134. package/dist/tools/spawnAgent.d.ts +0 -19
  135. package/dist/tools/spawnAgent.js +0 -130
  136. package/dist/tools/spawnAgent.js.map +0 -1
  137. package/dist/tools/webSearch.d.ts +0 -6
  138. package/dist/tools/webSearch.js +0 -120
  139. package/dist/tools/webSearch.js.map +0 -1
  140. package/docs/01_insights_and_patterns.md +0 -27
  141. package/docs/02_edge_cases_and_mitigations.md +0 -143
  142. package/docs/03_initial_implementation_plan.md +0 -66
  143. package/docs/04_tech_stack_proposal.md +0 -20
  144. package/docs/05_prd.md +0 -87
  145. package/docs/06_user_stories.md +0 -72
  146. package/docs/07_system_architecture.md +0 -138
  147. package/docs/08_roadmap.md +0 -200
  148. package/e2b/Dockerfile +0 -26
  149. package/src/__tests__/bootstrap.test.ts +0 -111
  150. package/src/__tests__/config.test.ts +0 -97
  151. package/src/__tests__/m55.test.ts +0 -238
  152. package/src/__tests__/middleware.test.ts +0 -219
  153. package/src/__tests__/modelFactory.test.ts +0 -63
  154. package/src/__tests__/optimizations.test.ts +0 -201
  155. package/src/__tests__/promptBuilder.test.ts +0 -141
  156. package/src/__tests__/sandbox.test.ts +0 -102
  157. package/src/__tests__/security.test.ts +0 -122
  158. package/src/__tests__/streaming.test.ts +0 -82
  159. package/src/__tests__/toolRouter.test.ts +0 -52
  160. package/src/__tests__/tools.test.ts +0 -146
  161. package/src/__tests__/tracing.test.ts +0 -196
  162. package/src/agents/agentRegistry.ts +0 -69
  163. package/src/agents/agentSpec.ts +0 -67
  164. package/src/agents/builtinAgents.ts +0 -142
  165. package/src/cli/config.ts +0 -124
  166. package/src/cli/index.ts +0 -742
  167. package/src/cli/modelFactory.ts +0 -174
  168. package/src/cli/postinstall.ts +0 -28
  169. package/src/cli/providers.ts +0 -107
  170. package/src/commands/builtinCommands.ts +0 -293
  171. package/src/commands/commandRegistry.ts +0 -194
  172. package/src/core/agentLoop.d.ts.map +0 -1
  173. package/src/core/agentLoop.ts +0 -312
  174. package/src/core/autoSave.ts +0 -95
  175. package/src/core/compactor.ts +0 -252
  176. package/src/core/contextGuard.ts +0 -129
  177. package/src/core/errors.ts +0 -202
  178. package/src/core/promptBuilder.d.ts.map +0 -1
  179. package/src/core/promptBuilder.ts +0 -139
  180. package/src/core/reasoningRouter.ts +0 -121
  181. package/src/core/retry.ts +0 -75
  182. package/src/core/sessionResumer.ts +0 -90
  183. package/src/core/sessionStore.ts +0 -216
  184. package/src/core/subAgent.ts +0 -339
  185. package/src/core/tokenCounter.ts +0 -64
  186. package/src/evals/dataset.ts +0 -67
  187. package/src/evals/evaluator.ts +0 -81
  188. package/src/hitl/bridge.ts +0 -160
  189. package/src/middleware/commandSanitizer.ts +0 -60
  190. package/src/middleware/loopDetection.ts +0 -63
  191. package/src/middleware/permission.ts +0 -72
  192. package/src/middleware/pipeline.ts +0 -75
  193. package/src/middleware/preCompletion.ts +0 -94
  194. package/src/middleware/types.ts +0 -45
  195. package/src/sandbox/bootstrap.ts +0 -121
  196. package/src/sandbox/manager.ts +0 -239
  197. package/src/sandbox/sync.ts +0 -157
  198. package/src/skills/loader.ts +0 -143
  199. package/src/skills/tools.ts +0 -99
  200. package/src/skills/types.ts +0 -13
  201. package/src/test_cache.ts +0 -72
  202. package/src/tools/askUser.ts +0 -47
  203. package/src/tools/browser.ts +0 -137
  204. package/src/tools/index.d.ts.map +0 -1
  205. package/src/tools/index.ts +0 -237
  206. package/src/tools/registry.ts +0 -198
  207. package/src/tools/router.ts +0 -78
  208. package/src/tools/security.ts +0 -220
  209. package/src/tools/spawnAgent.ts +0 -158
  210. package/src/tools/webSearch.ts +0 -142
  211. package/src/tracing/analyzer.ts +0 -265
  212. package/src/tracing/langsmith.ts +0 -63
  213. package/src/tracing/sessionTracer.ts +0 -202
  214. package/src/tracing/types.ts +0 -49
  215. package/src/types/valyu.d.ts +0 -37
  216. package/src/ui/App.tsx +0 -404
  217. package/src/ui/components/HITLPrompt.tsx +0 -119
  218. package/src/ui/components/Header.tsx +0 -51
  219. package/src/ui/components/MessageBubble.tsx +0 -46
  220. package/src/ui/components/StatusBar.tsx +0 -138
  221. package/src/ui/components/StreamingText.tsx +0 -48
  222. package/src/ui/components/ToolCallPanel.tsx +0 -80
  223. package/tests/commands/commands.test.ts +0 -356
  224. package/tests/core/compactor.test.ts +0 -217
  225. package/tests/core/retryAndErrors.test.ts +0 -164
  226. package/tests/core/sessionResumer.test.ts +0 -95
  227. package/tests/core/sessionStore.test.ts +0 -84
  228. package/tests/core/stability.test.ts +0 -165
  229. package/tests/core/subAgent.test.ts +0 -238
  230. package/tests/hitl/hitlBridge.test.ts +0 -115
  231. package/tsconfig.json +0 -16
  232. package/vitest.config.ts +0 -10
  233. package/vitest.out +0 -48
  234. /package/dist/__tests__/{m55.test.d.ts → installHostDeps.test.d.ts} +0 -0
  235. /package/dist/__tests__/{middleware.test.d.ts → whitelistedBackend.test.d.ts} +0 -0
@@ -1,50 +0,0 @@
1
- /**
2
- * Intercepts bash tool calls to block dangerous or interactive commands.
3
- *
4
- * Categories of blocked commands:
5
- * 1. Destructive: `rm -rf /`, `mkfs`, `dd if=`, fork bombs
6
- * 2. Interactive/hanging: `vim`, `nano`, `less`, `top`, `htop`, `man`
7
- * 3. Network abuse: `curl | sh`, `wget | bash`
8
- */
9
- export class CommandSanitizerMiddleware {
10
- name = "CommandSanitizer";
11
- /**
12
- * Patterns that will cause a command to be blocked.
13
- * Each entry is [regex, human-readable reason].
14
- */
15
- blockedPatterns = [
16
- // Destructive
17
- [/rm\s+(-\w*r\w*f\w*|-\w*f\w*r\w*)\s+\/(\*)?(?:\s|$)/, "destructive: rm -rf /"],
18
- [/mkfs\b/, "destructive: filesystem format"],
19
- [/\bdd\s+.*of=\/dev\//, "destructive: raw disk write"],
20
- [/chmod\s+(-\w+\s+)*777\s+\//, "dangerous: chmod 777 on root"],
21
- // Interactive / hanging
22
- [/\b(vim|vi|nano|emacs|pico)\b/, "interactive: text editor (hangs the sandbox)"],
23
- [/\b(less|more)\b/, "interactive: pager (hangs the sandbox)"],
24
- [/\b(top|htop|glances)\b/, "interactive: process monitor (hangs the sandbox)"],
25
- [/\bman\s+\w+/, "interactive: man page (hangs the sandbox)"],
26
- // Network abuse: pipe-to-shell
27
- [/curl\s+.*\|\s*(sh|bash|zsh)/, "unsafe: pipe remote script to shell"],
28
- [/wget\s+.*\|\s*(sh|bash|zsh)/, "unsafe: pipe remote script to shell"],
29
- ];
30
- before(ctx) {
31
- // Only applies to bash/shell tool calls
32
- if (ctx.toolName !== "bash") {
33
- return ctx;
34
- }
35
- const command = ctx.args.command;
36
- if (typeof command !== "string") {
37
- return ctx;
38
- }
39
- for (const [pattern, reason] of this.blockedPatterns) {
40
- if (pattern.test(command)) {
41
- return (`⚠ Blocked: Command rejected by sanitizer.\n` +
42
- `Reason: ${reason}\n` +
43
- `Command: ${command}\n` +
44
- `Use a safer alternative or refine your approach.`);
45
- }
46
- }
47
- return ctx;
48
- }
49
- }
50
- //# sourceMappingURL=commandSanitizer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commandSanitizer.js","sourceRoot":"","sources":["../../src/middleware/commandSanitizer.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,OAAO,0BAA0B;IAC5B,IAAI,GAAG,kBAAkB,CAAC;IAEnC;;;OAGG;IACc,eAAe,GAAuB;QACrD,cAAc;QACd,CAAC,oDAAoD,EAAE,uBAAuB,CAAC;QAC/E,CAAC,QAAQ,EAAE,gCAAgC,CAAC;QAC5C,CAAC,qBAAqB,EAAE,6BAA6B,CAAC;QACtD,CAAC,4BAA4B,EAAE,8BAA8B,CAAC;QAE9D,wBAAwB;QACxB,CAAC,8BAA8B,EAAE,8CAA8C,CAAC;QAChF,CAAC,iBAAiB,EAAE,wCAAwC,CAAC;QAC7D,CAAC,wBAAwB,EAAE,kDAAkD,CAAC;QAC9E,CAAC,aAAa,EAAE,2CAA2C,CAAC;QAE5D,+BAA+B;QAC/B,CAAC,6BAA6B,EAAE,qCAAqC,CAAC;QACtE,CAAC,6BAA6B,EAAE,qCAAqC,CAAC;KACvE,CAAC;IAEF,MAAM,CAAC,GAAoB;QACzB,wCAAwC;QACxC,IAAI,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;YAC5B,OAAO,GAAG,CAAC;QACb,CAAC;QAED,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QACjC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,GAAG,CAAC;QACb,CAAC;QAED,KAAK,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACrD,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1B,OAAO,CACL,6CAA6C;oBAC7C,WAAW,MAAM,IAAI;oBACrB,YAAY,OAAO,IAAI;oBACvB,kDAAkD,CACnD,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
@@ -1,17 +0,0 @@
1
- import { ToolCallContext, ToolMiddleware } from "./types.js";
2
- export type PermissionMode = "auto" | "ask_dangerous" | "ask_all";
3
- /**
4
- * PermissionMiddleware — gates dangerous tool calls behind user approval.
5
- *
6
- * Behavior per mode:
7
- * - `auto`: All tools execute without asking. (Default for power users.)
8
- * - `ask_dangerous`: Only tools in DANGEROUS_TOOLS require approval.
9
- * - `ask_all`: Every tool except SAFE_TOOLS requires approval.
10
- */
11
- export declare class PermissionMiddleware implements ToolMiddleware {
12
- name: string;
13
- private mode;
14
- constructor(mode?: PermissionMode);
15
- before(ctx: ToolCallContext): Promise<ToolCallContext | string | void>;
16
- private requiresApproval;
17
- }
@@ -1,59 +0,0 @@
1
- import { HITLBridge } from "../hitl/bridge.js";
2
- /** Tools that are always safe and never need user approval. */
3
- const SAFE_TOOLS = new Set([
4
- "read_file",
5
- "view_file_outline",
6
- "search_skills",
7
- "load_skill",
8
- "search_tools",
9
- "ask_user_question", // Meta: the ask tool itself is always safe
10
- ]);
11
- /** Tools that perform destructive or side-effect-heavy operations. */
12
- const DANGEROUS_TOOLS = new Set([
13
- "bash",
14
- "write_file",
15
- "replace_file_content",
16
- "multi_replace_file_content",
17
- "install_deps",
18
- ]);
19
- /**
20
- * PermissionMiddleware — gates dangerous tool calls behind user approval.
21
- *
22
- * Behavior per mode:
23
- * - `auto`: All tools execute without asking. (Default for power users.)
24
- * - `ask_dangerous`: Only tools in DANGEROUS_TOOLS require approval.
25
- * - `ask_all`: Every tool except SAFE_TOOLS requires approval.
26
- */
27
- export class PermissionMiddleware {
28
- name = "PermissionMiddleware";
29
- mode;
30
- constructor(mode = "auto") {
31
- this.mode = mode;
32
- }
33
- async before(ctx) {
34
- if (this.mode === "auto")
35
- return ctx;
36
- const toolName = ctx.toolName;
37
- const needsApproval = this.requiresApproval(toolName);
38
- if (!needsApproval)
39
- return ctx;
40
- const bridge = HITLBridge.getInstance();
41
- const approved = await bridge.requestPermission(toolName, ctx.args);
42
- if (!approved) {
43
- // Short-circuit: return a string to deny the tool call
44
- return (`Permission denied: The user declined to approve the execution of "${toolName}". ` +
45
- `Try an alternative approach or ask the user for guidance using the ask_user_question tool.`);
46
- }
47
- return ctx;
48
- }
49
- requiresApproval(toolName) {
50
- if (SAFE_TOOLS.has(toolName))
51
- return false;
52
- if (this.mode === "ask_all")
53
- return true;
54
- if (this.mode === "ask_dangerous")
55
- return DANGEROUS_TOOLS.has(toolName);
56
- return false;
57
- }
58
- }
59
- //# sourceMappingURL=permission.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.js","sourceRoot":"","sources":["../../src/middleware/permission.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,+DAA+D;AAC/D,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,WAAW;IACX,mBAAmB;IACnB,eAAe;IACf,YAAY;IACZ,cAAc;IACd,mBAAmB,EAAE,2CAA2C;CACnE,CAAC,CAAC;AAEH,sEAAsE;AACtE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC5B,MAAM;IACN,YAAY;IACZ,sBAAsB;IACtB,4BAA4B;IAC5B,cAAc;CACjB,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,OAAO,oBAAoB;IAC7B,IAAI,GAAG,sBAAsB,CAAC;IACtB,IAAI,CAAiB;IAE7B,YAAY,OAAuB,MAAM;QACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAoB;QAC7B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;YAAE,OAAO,GAAG,CAAC;QAErC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC9B,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAEtD,IAAI,CAAC,aAAa;YAAE,OAAO,GAAG,CAAC;QAE/B,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;QACxC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAEpE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,uDAAuD;YACvD,OAAO,CACH,qEAAqE,QAAQ,KAAK;gBAClF,4FAA4F,CAC/F,CAAC;QACN,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAEO,gBAAgB,CAAC,QAAgB;QACrC,IAAI,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,OAAO,KAAK,CAAC;QAE3C,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACzC,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe;YAAE,OAAO,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAExE,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
@@ -1,31 +0,0 @@
1
- import { ToolCallContext, ToolMiddleware } from "./types.js";
2
- import { ToolResult } from "../tools/index.js";
3
- /**
4
- * Executes tool calls through a chain of middleware hooks.
5
- *
6
- * Execution flow:
7
- * 1. Run all `before()` hooks in registration order.
8
- * - If any returns a string → short-circuit (tool is NOT executed).
9
- * 2. Execute the actual tool function.
10
- * 3. Run all `after()` hooks in reverse registration order.
11
- * - Each can transform the result before it enters conversation history.
12
- */
13
- export declare class MiddlewarePipeline {
14
- private middlewares;
15
- /**
16
- * Register a middleware. Middlewares run in the order they are added.
17
- */
18
- use(middleware: ToolMiddleware): void;
19
- /**
20
- * Returns the number of registered middlewares.
21
- */
22
- get length(): number;
23
- /**
24
- * Execute a tool call through the middleware pipeline.
25
- *
26
- * @param ctx - The tool call context (name, args, callId).
27
- * @param executeFn - The actual tool execution function.
28
- * @returns The final result string (possibly transformed by after-hooks).
29
- */
30
- run(ctx: ToolCallContext, executeFn: (ctx: ToolCallContext) => Promise<ToolResult> | ToolResult): Promise<string>;
31
- }
@@ -1,62 +0,0 @@
1
- /**
2
- * Executes tool calls through a chain of middleware hooks.
3
- *
4
- * Execution flow:
5
- * 1. Run all `before()` hooks in registration order.
6
- * - If any returns a string → short-circuit (tool is NOT executed).
7
- * 2. Execute the actual tool function.
8
- * 3. Run all `after()` hooks in reverse registration order.
9
- * - Each can transform the result before it enters conversation history.
10
- */
11
- export class MiddlewarePipeline {
12
- middlewares = [];
13
- /**
14
- * Register a middleware. Middlewares run in the order they are added.
15
- */
16
- use(middleware) {
17
- this.middlewares.push(middleware);
18
- }
19
- /**
20
- * Returns the number of registered middlewares.
21
- */
22
- get length() {
23
- return this.middlewares.length;
24
- }
25
- /**
26
- * Execute a tool call through the middleware pipeline.
27
- *
28
- * @param ctx - The tool call context (name, args, callId).
29
- * @param executeFn - The actual tool execution function.
30
- * @returns The final result string (possibly transformed by after-hooks).
31
- */
32
- async run(ctx, executeFn) {
33
- // ── Before phase: run hooks in order ──
34
- let currentCtx = ctx;
35
- for (const mw of this.middlewares) {
36
- if (mw.before) {
37
- const result = await mw.before(currentCtx);
38
- if (typeof result === "string") {
39
- // Short-circuit: middleware rejected the call
40
- return result;
41
- }
42
- if (result !== undefined) {
43
- currentCtx = result;
44
- }
45
- }
46
- }
47
- // ── Execute the tool ──
48
- let output = await executeFn(currentCtx);
49
- // ── After phase: run hooks in reverse order ──
50
- for (let i = this.middlewares.length - 1; i >= 0; i--) {
51
- const mw = this.middlewares[i];
52
- if (mw.after) {
53
- const transformed = await mw.after(currentCtx, output);
54
- if (transformed !== undefined) {
55
- output = transformed;
56
- }
57
- }
58
- }
59
- return output.content;
60
- }
61
- }
62
- //# sourceMappingURL=pipeline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../src/middleware/pipeline.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,OAAO,kBAAkB;IACrB,WAAW,GAAqB,EAAE,CAAC;IAE3C;;OAEG;IACH,GAAG,CAAC,UAA0B;QAC5B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;IACjC,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,GAAG,CACP,GAAoB,EACpB,SAAqE;QAErE,yCAAyC;QACzC,IAAI,UAAU,GAAG,GAAG,CAAC;QAErB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YAClC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;gBACd,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAE3C,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;oBAC/B,8CAA8C;oBAC9C,OAAO,MAAM,CAAC;gBAChB,CAAC;gBAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;oBACzB,UAAU,GAAG,MAAM,CAAC;gBACtB,CAAC;YACH,CAAC;QACH,CAAC;QAED,yBAAyB;QACzB,IAAI,MAAM,GAAe,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC;QAErD,gDAAgD;QAChD,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACtD,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC;gBACb,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;gBACvD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;oBAC9B,MAAM,GAAG,WAAW,CAAC;gBACvB,CAAC;YACH,CAAC;QAAI,CAAC;QAER,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;CACF"}
@@ -1,29 +0,0 @@
1
- import { ToolCallContext, ToolMiddleware } from "./types.js";
2
- import { ToolResult } from "../tools/index.js";
3
- /**
4
- * Prevents the agent from marking a task as "done" without running tests.
5
- *
6
- * Tracks whether any test command has been executed during the session.
7
- * If the agent attempts to signal completion without running tests first,
8
- * the middleware intercepts and forces verification.
9
- *
10
- * Reference: docs/02_edge_cases_and_mitigations.md — "The Fake Success Verification"
11
- */
12
- export declare class PreCompletionMiddleware implements ToolMiddleware {
13
- readonly name = "PreCompletion";
14
- private testsPassed;
15
- /** Patterns in bash commands that count as "running tests". */
16
- private readonly testPatterns;
17
- /** Tool names that signal the agent is trying to complete the task. */
18
- private readonly completionSignals;
19
- before(ctx: ToolCallContext): ToolCallContext | string;
20
- after(ctx: ToolCallContext, result: ToolResult): void;
21
- /**
22
- * Returns whether tests have been run and passed in this session.
23
- */
24
- hasPassedTests(): boolean;
25
- /**
26
- * Resets state. Useful for testing or session boundaries.
27
- */
28
- reset(): void;
29
- }
@@ -1,82 +0,0 @@
1
- /**
2
- * Prevents the agent from marking a task as "done" without running tests.
3
- *
4
- * Tracks whether any test command has been executed during the session.
5
- * If the agent attempts to signal completion without running tests first,
6
- * the middleware intercepts and forces verification.
7
- *
8
- * Reference: docs/02_edge_cases_and_mitigations.md — "The Fake Success Verification"
9
- */
10
- export class PreCompletionMiddleware {
11
- name = "PreCompletion";
12
- testsPassed = false;
13
- /** Patterns in bash commands that count as "running tests". */
14
- testPatterns = [
15
- /\bvitest\b/,
16
- /\bjest\b/,
17
- /\bpytest\b/,
18
- /\bmocha\b/,
19
- /\bnpm\s+test\b/,
20
- /\bnpm\s+run\s+test\b/,
21
- /\byarn\s+test\b/,
22
- /\bpnpm\s+test\b/,
23
- /\bgo\s+test\b/,
24
- /\bcargo\s+test\b/,
25
- ];
26
- /** Tool names that signal the agent is trying to complete the task. */
27
- completionSignals = new Set([
28
- "task_complete",
29
- "attempt_completion",
30
- "finish_task",
31
- "submit_result",
32
- ]);
33
- before(ctx) {
34
- // When a test command is initiated, assume it hasn't passed yet
35
- if (ctx.toolName === "bash" && typeof ctx.args.command === "string") {
36
- for (const pattern of this.testPatterns) {
37
- if (pattern.test(ctx.args.command)) {
38
- this.testsPassed = false;
39
- break;
40
- }
41
- }
42
- }
43
- // Intercept completion attempts
44
- if (this.completionSignals.has(ctx.toolName)) {
45
- if (!this.testsPassed) {
46
- return ("⚠ You must run tests before completing the task, AND they must pass.\n" +
47
- "Use the bash tool to execute your test suite (e.g., `npm test`, `vitest`, `pytest`).\n" +
48
- "If tests fail, fix the issues. Once tests pass cleanly, you may attempt completion again.");
49
- }
50
- }
51
- return ctx;
52
- }
53
- after(ctx, result) {
54
- if (ctx.toolName === "bash" && typeof ctx.args.command === "string") {
55
- for (const pattern of this.testPatterns) {
56
- if (pattern.test(ctx.args.command)) {
57
- // Robustly check the exact exit code from the tool metadata
58
- if (result.metadata?.exitCode === 0) {
59
- this.testsPassed = true;
60
- }
61
- else {
62
- this.testsPassed = false;
63
- }
64
- break;
65
- }
66
- }
67
- }
68
- }
69
- /**
70
- * Returns whether tests have been run and passed in this session.
71
- */
72
- hasPassedTests() {
73
- return this.testsPassed;
74
- }
75
- /**
76
- * Resets state. Useful for testing or session boundaries.
77
- */
78
- reset() {
79
- this.testsPassed = false;
80
- }
81
- }
82
- //# sourceMappingURL=preCompletion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preCompletion.js","sourceRoot":"","sources":["../../src/middleware/preCompletion.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,OAAO,uBAAuB;IACzB,IAAI,GAAG,eAAe,CAAC;IAExB,WAAW,GAAG,KAAK,CAAC;IAE5B,+DAA+D;IAC9C,YAAY,GAAG;QAC9B,YAAY;QACZ,UAAU;QACV,YAAY;QACZ,WAAW;QACX,gBAAgB;QAChB,sBAAsB;QACtB,iBAAiB;QACjB,iBAAiB;QACjB,eAAe;QACf,kBAAkB;KACnB,CAAC;IAEF,uEAAuE;IACtD,iBAAiB,GAAG,IAAI,GAAG,CAAC;QAC3C,eAAe;QACf,oBAAoB;QACpB,aAAa;QACb,eAAe;KAChB,CAAC,CAAC;IAEH,MAAM,CAAC,GAAoB;QACzB,gEAAgE;QAChE,IAAI,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,OAA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QACH,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;CACF"}
@@ -1,40 +0,0 @@
1
- /**
2
- * Middleware types for the tool execution pipeline.
3
- *
4
- * Each middleware can hook into both the "before" and "after" phases
5
- * of a tool call. The pipeline chains them in order.
6
- */
7
- import { ToolResult } from "../tools/index.js";
8
- /**
9
- * Context object passed through the middleware chain for each tool call.
10
- */
11
- export interface ToolCallContext {
12
- /** Name of the tool being called (e.g., "bash", "read_file"). */
13
- toolName: string;
14
- /** Arguments passed to the tool. */
15
- args: Record<string, any>;
16
- /** Unique ID of this tool call (from the LLM response). */
17
- callId: string;
18
- }
19
- /**
20
- * A middleware that can intercept tool calls before and after execution.
21
- *
22
- * - `before()`: Runs before the tool executes. Return the (possibly modified)
23
- * context to continue, or a `string` to short-circuit with an error/warning.
24
- * - `after()`: Runs after the tool executes. Can transform the result before
25
- * it enters the conversation history.
26
- */
27
- export interface ToolMiddleware {
28
- /** Human-readable name for logging and debugging. */
29
- name: string;
30
- /**
31
- * Pre-execution hook.
32
- * @returns ToolCallContext to mutate, a string to short-circuit, or void to pass through unmodified.
33
- */
34
- before?(ctx: ToolCallContext): Promise<ToolCallContext | string | void> | ToolCallContext | string | void;
35
- /**
36
- * Post-execution hook.
37
- * @returns The transformed tool result object, or void to pass through unmodified.
38
- */
39
- after?(ctx: ToolCallContext, result: ToolResult): Promise<ToolResult | void> | ToolResult | void;
40
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Middleware types for the tool execution pipeline.
3
- *
4
- * Each middleware can hook into both the "before" and "after" phases
5
- * of a tool call. The pipeline chains them in order.
6
- */
7
- export {};
8
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/middleware/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,55 +0,0 @@
1
- import { SkillMeta } from "./types.js";
2
- /**
3
- * SkillLoader — discovers and loads skills from multiple directories.
4
- *
5
- * Discovery paths (priority order — project overrides user):
6
- * 1. Project root: ./skills/, ./.agents/skills/, ./.agent/skills/
7
- * 2. User home: ~/.joone/skills/, ~/.agents/skills/
8
- *
9
- * On Windows, ~ resolves to %USERPROFILE%.
10
- *
11
- * Skills are folders containing a SKILL.md with YAML frontmatter:
12
- * ---
13
- * name: my-skill
14
- * description: What this skill does
15
- * ---
16
- * ## Instructions
17
- * ...
18
- */
19
- export declare class SkillLoader {
20
- private projectRoot;
21
- private userHome;
22
- private cachedSkills;
23
- constructor(projectRoot?: string, userHome?: string);
24
- /**
25
- * Returns all skill discovery directories in priority order.
26
- * Project-level directories come first (higher priority).
27
- */
28
- getDiscoveryPaths(): {
29
- path: string;
30
- source: "project" | "user";
31
- }[];
32
- /**
33
- * Parses YAML frontmatter from a SKILL.md content string.
34
- * Simple parser — handles `name:` and `description:` fields.
35
- */
36
- parseFrontmatter(content: string): {
37
- name?: string;
38
- description?: string;
39
- };
40
- /**
41
- * Discovers all available skills from all discovery paths.
42
- * Deduplicates by name — project-level skills override user-level.
43
- * Results are cached per session.
44
- */
45
- discoverSkills(): SkillMeta[];
46
- /**
47
- * Loads the full content of a specific skill's SKILL.md.
48
- * Returns undefined if the skill is not found.
49
- */
50
- loadSkill(name: string): string | undefined;
51
- /**
52
- * Clears the cached skills. Call when skills directory contents may have changed.
53
- */
54
- clearCache(): void;
55
- }
@@ -1,132 +0,0 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
- import * as os from "node:os";
4
- /**
5
- * SkillLoader — discovers and loads skills from multiple directories.
6
- *
7
- * Discovery paths (priority order — project overrides user):
8
- * 1. Project root: ./skills/, ./.agents/skills/, ./.agent/skills/
9
- * 2. User home: ~/.joone/skills/, ~/.agents/skills/
10
- *
11
- * On Windows, ~ resolves to %USERPROFILE%.
12
- *
13
- * Skills are folders containing a SKILL.md with YAML frontmatter:
14
- * ---
15
- * name: my-skill
16
- * description: What this skill does
17
- * ---
18
- * ## Instructions
19
- * ...
20
- */
21
- export class SkillLoader {
22
- projectRoot;
23
- userHome;
24
- cachedSkills = null;
25
- constructor(projectRoot, userHome) {
26
- this.projectRoot = projectRoot ?? process.cwd();
27
- this.userHome = userHome ?? os.homedir();
28
- }
29
- /**
30
- * Returns all skill discovery directories in priority order.
31
- * Project-level directories come first (higher priority).
32
- */
33
- getDiscoveryPaths() {
34
- const home = this.userHome;
35
- return [
36
- // Project-level (highest priority)
37
- { path: path.join(this.projectRoot, "skills"), source: "project" },
38
- { path: path.join(this.projectRoot, ".agents", "skills"), source: "project" },
39
- { path: path.join(this.projectRoot, ".agent", "skills"), source: "project" },
40
- // User-level
41
- { path: path.join(home, ".joone", "skills"), source: "user" },
42
- { path: path.join(home, ".agents", "skills"), source: "user" },
43
- ];
44
- }
45
- /**
46
- * Parses YAML frontmatter from a SKILL.md content string.
47
- * Simple parser — handles `name:` and `description:` fields.
48
- */
49
- parseFrontmatter(content) {
50
- const match = content.match(/^---\s*\n([\s\S]*?)\n---/);
51
- if (!match)
52
- return {};
53
- const yaml = match[1];
54
- const nameMatch = yaml.match(/^name:\s*(.+)$/m);
55
- const descMatch = yaml.match(/^description:\s*(.+)$/m);
56
- return {
57
- name: nameMatch?.[1]?.trim(),
58
- description: descMatch?.[1]?.trim(),
59
- };
60
- }
61
- /**
62
- * Discovers all available skills from all discovery paths.
63
- * Deduplicates by name — project-level skills override user-level.
64
- * Results are cached per session.
65
- */
66
- discoverSkills() {
67
- if (this.cachedSkills)
68
- return this.cachedSkills;
69
- const skills = new Map();
70
- const paths = this.getDiscoveryPaths();
71
- for (const { path: dir, source } of paths) {
72
- if (!fs.existsSync(dir))
73
- continue;
74
- let entries;
75
- try {
76
- entries = fs.readdirSync(dir, { withFileTypes: true });
77
- }
78
- catch {
79
- continue;
80
- }
81
- for (const entry of entries) {
82
- if (!entry.isDirectory())
83
- continue;
84
- const skillMdPath = path.join(dir, entry.name, "SKILL.md");
85
- if (!fs.existsSync(skillMdPath))
86
- continue;
87
- try {
88
- const content = fs.readFileSync(skillMdPath, "utf-8");
89
- const frontmatter = this.parseFrontmatter(content);
90
- const name = frontmatter.name || entry.name;
91
- // Only add if not already found (project overrides user)
92
- if (!skills.has(name)) {
93
- skills.set(name, {
94
- name,
95
- description: frontmatter.description || `Skill: ${name}`,
96
- path: skillMdPath,
97
- source,
98
- });
99
- }
100
- }
101
- catch {
102
- // Skip unreadable skills
103
- }
104
- }
105
- }
106
- this.cachedSkills = Array.from(skills.values());
107
- return this.cachedSkills;
108
- }
109
- /**
110
- * Loads the full content of a specific skill's SKILL.md.
111
- * Returns undefined if the skill is not found.
112
- */
113
- loadSkill(name) {
114
- const skills = this.discoverSkills();
115
- const skill = skills.find((s) => s.name === name);
116
- if (!skill)
117
- return undefined;
118
- try {
119
- return fs.readFileSync(skill.path, "utf-8");
120
- }
121
- catch {
122
- return undefined;
123
- }
124
- }
125
- /**
126
- * Clears the cached skills. Call when skills directory contents may have changed.
127
- */
128
- clearCache() {
129
- this.cachedSkills = null;
130
- }
131
- }
132
- //# sourceMappingURL=loader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/skills/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAG9B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,WAAW;IACd,WAAW,CAAS;IACpB,QAAQ,CAAS;IACjB,YAAY,GAAuB,IAAI,CAAC;IAEhD,YAAY,WAAoB,EAAE,QAAiB;QACjD,IAAI,CAAC,WAAW,GAAG,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChD,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACH,iBAAiB;QACf,MAAM,IAAI,GAAG,IAAI,C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IAAI,EAAE;4BACxD,IAAI,EAAE,WAAW;4BACjB,MAAM;yBACP,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;gBAAC,MAAM,CAAC;oBACP,yBAAyB;gBAC3B,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,IAAY;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACrC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAC;QAE7B,IAAI,CAAC;YACH,OAAO,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3B,CAAC;CACF"}
@@ -1,5 +0,0 @@
1
- import { DynamicToolInterface } from "../tools/index.js";
2
- import { SkillLoader } from "./loader.js";
3
- export declare function bindSkillLoader(loader: SkillLoader): void;
4
- export declare const SearchSkillsTool: DynamicToolInterface;
5
- export declare const LoadSkillTool: DynamicToolInterface;