wave-agent-sdk 1.0.9 → 1.1.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.
Files changed (94) hide show
  1. package/dist/agent.d.ts +9 -6
  2. package/dist/agent.js +35 -33
  3. package/dist/builtin/index.d.ts +1 -0
  4. package/dist/builtin/index.js +20 -0
  5. package/dist/builtin/plugins.d.ts +1 -0
  6. package/dist/builtin/plugins.js +225 -0
  7. package/dist/builtin/skills/artifact.d.ts +1 -0
  8. package/dist/builtin/skills/artifact.js +18 -0
  9. package/dist/builtin/skills/code-review.d.ts +1 -0
  10. package/{builtin/skills/code-review/SKILL.md → dist/builtin/skills/code-review.js} +23 -19
  11. package/dist/builtin/skills/deep-research.d.ts +1 -0
  12. package/{builtin/skills/deep-research/SKILL.md → dist/builtin/skills/deep-research.js} +18 -14
  13. package/dist/builtin/skills/init.d.ts +1 -0
  14. package/{builtin/skills/init/SKILL.md → dist/builtin/skills/init.js} +6 -3
  15. package/dist/builtin/skills/loop.d.ts +1 -0
  16. package/dist/builtin/skills/loop.js +83 -0
  17. package/dist/builtin/skills/settings.d.ts +1 -0
  18. package/dist/builtin/skills/settings.js +1249 -0
  19. package/dist/builtin/skills/simplify.d.ts +1 -0
  20. package/{builtin/skills/simplify/SKILL.md → dist/builtin/skills/simplify.js} +7 -3
  21. package/dist/builtin/subagents.d.ts +1 -0
  22. package/dist/builtin/subagents.js +164 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +2 -0
  25. package/dist/managers/aiManager.d.ts +10 -0
  26. package/dist/managers/aiManager.js +49 -5
  27. package/dist/managers/mcpManager.js +1 -1
  28. package/dist/managers/messageManager.d.ts +6 -0
  29. package/dist/managers/messageManager.js +33 -0
  30. package/dist/managers/subagentManager.d.ts +9 -0
  31. package/dist/managers/subagentManager.js +62 -3
  32. package/dist/services/hook.js +41 -7
  33. package/dist/services/initializationService.js +0 -21
  34. package/dist/services/jsonlHandler.d.ts +37 -2
  35. package/dist/services/jsonlHandler.js +55 -6
  36. package/dist/services/session.d.ts +35 -4
  37. package/dist/services/session.js +233 -36
  38. package/dist/services/worktreeHooks.d.ts +45 -0
  39. package/dist/services/worktreeHooks.js +133 -0
  40. package/dist/tools/agentTool.js +36 -1
  41. package/dist/tools/bashTool.js +120 -57
  42. package/dist/tools/editTool.js +1 -0
  43. package/dist/tools/enterWorktreeTool.d.ts +1 -1
  44. package/dist/tools/enterWorktreeTool.js +44 -31
  45. package/dist/tools/exitWorktreeTool.js +21 -26
  46. package/dist/tools/readTool.js +6 -3
  47. package/dist/tools/types.d.ts +1 -0
  48. package/dist/tools/writeTool.js +1 -0
  49. package/dist/types/agent.d.ts +5 -0
  50. package/dist/types/hooks.d.ts +3 -2
  51. package/dist/types/messaging.d.ts +1 -0
  52. package/dist/types/skills.d.ts +0 -1
  53. package/dist/types/skills.js +0 -1
  54. package/dist/utils/asyncWorkRegistry.d.ts +32 -0
  55. package/dist/utils/asyncWorkRegistry.js +81 -0
  56. package/dist/utils/builtinEmbed.d.ts +21 -0
  57. package/dist/utils/builtinEmbed.js +53 -0
  58. package/dist/utils/configPaths.d.ts +0 -1
  59. package/dist/utils/configPaths.js +5 -26
  60. package/dist/utils/containerSetup.js +5 -0
  61. package/dist/utils/convertMessagesForAPI.js +21 -2
  62. package/dist/utils/messageOperations.d.ts +1 -0
  63. package/dist/utils/skillParser.js +3 -6
  64. package/dist/utils/toolImagePersistence.d.ts +25 -0
  65. package/dist/utils/toolImagePersistence.js +56 -0
  66. package/dist/utils/windowsPaths.d.ts +28 -0
  67. package/dist/utils/windowsPaths.js +47 -0
  68. package/dist/utils/worktreeSession.d.ts +6 -0
  69. package/dist/utils/worktreeUtils.d.ts +7 -0
  70. package/dist/utils/worktreeUtils.js +88 -40
  71. package/package.json +5 -5
  72. package/builtin/plugins/sdd/.wave-plugin/plugin.json +0 -8
  73. package/builtin/plugins/sdd/hooks/hooks.json +0 -14
  74. package/builtin/plugins/sdd/scripts/session-start.js +0 -24
  75. package/builtin/plugins/sdd/scripts/spec-count.js +0 -77
  76. package/builtin/plugins/sdd/skills/specify/SKILL.md +0 -47
  77. package/builtin/plugins/sdd/skills/specify/templates/spec-template.md +0 -47
  78. package/builtin/skills/artifact/SKILL.md +0 -14
  79. package/builtin/skills/loop/SKILL.md +0 -79
  80. package/builtin/skills/settings/ENV.md +0 -78
  81. package/builtin/skills/settings/HOOKS.md +0 -227
  82. package/builtin/skills/settings/MCP.md +0 -137
  83. package/builtin/skills/settings/MEMORY.md +0 -76
  84. package/builtin/skills/settings/MODELS.md +0 -119
  85. package/builtin/skills/settings/PERMISSIONS.md +0 -88
  86. package/builtin/skills/settings/PLUGINS.md +0 -171
  87. package/builtin/skills/settings/SKILL.md +0 -132
  88. package/builtin/skills/settings/SKILLS.md +0 -107
  89. package/builtin/skills/settings/SUBAGENTS.md +0 -77
  90. package/builtin/subagents/bash.md +0 -19
  91. package/builtin/subagents/explore.md +0 -43
  92. package/builtin/subagents/general-purpose.md +0 -20
  93. package/builtin/subagents/plan.md +0 -56
  94. package/builtin/subagents/vision.md +0 -18
@@ -0,0 +1 @@
1
+ export declare const initSkill: Record<string, string>;
@@ -1,4 +1,5 @@
1
- ---
1
+ export const initSkill = {
2
+ "skills/init/SKILL.md": `---
2
3
  name: init
3
4
  description: Analyze the codebase and create an AGENTS.md file to guide future agents.
4
5
  disable-model-invocation: true
@@ -21,8 +22,10 @@ Usage notes:
21
22
  - Do not make up information such as "Common Development Tasks", "Tips for Development", "Support and Documentation" unless this is expressly included in other files that you read.
22
23
  - Be sure to prefix the file with the following text:
23
24
 
24
- ```
25
+ \`\`\`
25
26
  # AGENTS.md
26
27
 
27
28
  This file provides guidance to Agent when working with code in this repository.
28
- ```
29
+ \`\`\`
30
+ `,
31
+ };
@@ -0,0 +1 @@
1
+ export declare const loopSkill: Record<string, string>;
@@ -0,0 +1,83 @@
1
+ import { CRON_CREATE_TOOL_NAME, CRON_DELETE_TOOL_NAME, SKILL_TOOL_NAME, } from "../../constants/tools.js";
2
+ export const loopSkill = {
3
+ "skills/loop/SKILL.md": `---
4
+ name: loop
5
+ description: Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m)
6
+ allowed-tools: ${CRON_CREATE_TOOL_NAME}, ${SKILL_TOOL_NAME}
7
+ user-invocable: true
8
+ ---
9
+
10
+ # /loop — schedule a recurring prompt
11
+
12
+ Parse the input below into \`[interval] <prompt…>\` and schedule it with ${CRON_CREATE_TOOL_NAME}.
13
+
14
+ ## Usage
15
+
16
+ \`\`\`
17
+ /loop [interval] <prompt>
18
+
19
+ Run a prompt or slash command on a recurring interval.
20
+
21
+ Intervals: Ns, Nm, Nh, Nd (e.g. 5m, 30m, 2h, 1d). Minimum granularity is 1 minute.
22
+ If no interval is specified, defaults to 10m.
23
+
24
+ Examples:
25
+ /loop 5m /babysit-prs
26
+ /loop 30m check the deploy
27
+ /loop 1h /standup 1
28
+ /loop check the deploy (defaults to 10m)
29
+ /loop check the deploy every 20m
30
+ \`\`\`
31
+
32
+ ## Parsing (in priority order)
33
+
34
+ 1. **Leading token**: if the first whitespace-delimited token matches \`^\\d+[smhd]$\` (e.g. \`5m\`, \`2h\`), that's the interval; the rest is the prompt.
35
+ 2. **Trailing "every" clause**: otherwise, if the input ends with \`every <N><unit>\` or \`every <N> <unit-word>\` (e.g. \`every 20m\`, \`every 5 minutes\`, \`every 2 hours\`), extract that as the interval and strip it from the prompt. Only match when what follows "every" is a time expression — \`check every PR\` has no interval.
36
+ 3. **Default**: otherwise, interval is \`10m\` and the entire input is the prompt.
37
+
38
+ If the resulting prompt is empty, show usage \`/loop [interval] <prompt>\` and stop — do not call ${CRON_CREATE_TOOL_NAME}.
39
+
40
+ Examples:
41
+ - \`5m /babysit-prs\` → interval \`5m\`, prompt \`/babysit-prs\` (rule 1)
42
+ - \`check the deploy every 20m\` → interval \`20m\`, prompt \`check the deploy\` (rule 2)
43
+ - \`run tests every 5 minutes\` → interval \`5m\`, prompt \`run tests\` (rule 2)
44
+ - \`check the deploy\` → interval \`10m\`, prompt \`check the deploy\` (rule 3)
45
+ - \`check every PR\` → interval \`10m\`, prompt \`check every PR\` (rule 3 — "every" not followed by time)
46
+ - \`5m\` → empty prompt → show usage
47
+
48
+ ## Interval → cron
49
+
50
+ Supported suffixes: \`s\` (seconds, rounded up to nearest minute, min 1), \`m\` (minutes), \`h\` (hours), \`d\` (days). Convert:
51
+
52
+ | Interval pattern | Cron expression | Notes |
53
+ |-----------------------|---------------------|------------------------------------------|
54
+ | \`Nm\` where N ≤ 59 | \`*/N * * * *\` | every N minutes |
55
+ | \`Nm\` where N ≥ 60 | \`0 */H * * *\` | round to hours (H = N/60, must divide 24)|
56
+ | \`Nh\` where N ≤ 23 | \`0 */N * * *\` | every N hours |
57
+ | \`Nd\` | \`0 0 */N * *\` | every N days at midnight local |
58
+ | \`Ns\` | treat as \`ceil(N/60)m\` | cron minimum granularity is 1 minute |
59
+
60
+ **If the interval doesn't cleanly divide its unit** (e.g. \`7m\` → \`*/7 * * * *\` gives uneven gaps at :56→:00; \`90m\` → 1.5h which cron can't express), pick the nearest clean interval and tell the user what you rounded to before scheduling.
61
+
62
+ ## Avoid the :00 and :30 minute marks
63
+
64
+ When the user's request is approximate, pick a minute that is NOT 0 or 30:
65
+ - "every morning around 9" → \`57 8 * * *\` or \`3 9 * * *\` (not \`0 9 * * *\`)
66
+ - "hourly" → \`7 * * * *\` (not \`0 * * * *\`)
67
+
68
+ Only use minute 0 or 30 when the user names that exact time and clearly means it ("at 9:00 sharp", "at half past").
69
+
70
+ ## Action
71
+
72
+ 1. Call ${CRON_CREATE_TOOL_NAME} with:
73
+ - \`cron\`: the expression from the table above
74
+ - \`prompt\`: the parsed prompt from above, verbatim (slash commands are passed through unchanged)
75
+ - \`recurring\`: \`true\`
76
+ 2. Briefly confirm: what's scheduled, the cron expression, the human-readable cadence, that recurring tasks auto-expire after 7 days, and that they can cancel sooner with ${CRON_DELETE_TOOL_NAME} (include the job ID).
77
+ 3. **Then immediately execute the parsed prompt now** — don't wait for the first cron fire. If it's a slash command, run it directly; otherwise act on it directly.
78
+
79
+ ## Input
80
+
81
+ $ARGUMENTS
82
+ `,
83
+ };
@@ -0,0 +1 @@
1
+ export declare const settingsSkills: Record<string, string>;