claudius-core 0.6.1 → 0.8.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/.claude/agents/worker.md +44 -2
- package/.claude/hooks/hooks.json +7 -7
- package/.claude/scripts/workpad-upsert.sh +48 -0
- package/.claude/skills/backlog/SKILL.md +45 -1
- package/.claude-plugin/marketplace.json +2 -2
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/daemon/install.d.ts +10 -2
- package/dist/daemon/install.d.ts.map +1 -1
- package/dist/daemon/install.js +57 -30
- package/dist/daemon/install.js.map +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +2 -1
- package/dist/init.js.map +1 -1
- package/dist/studio/assets/{_basePickBy-YF2UUO7H.js → _basePickBy-ppkLJ_A0.js} +1 -1
- package/dist/studio/assets/{_baseUniq-BJIET4Fx.js → _baseUniq-BNpZcOvx.js} +1 -1
- package/dist/studio/assets/{arc-DXS_h-l0.js → arc-BrT6MHzZ.js} +1 -1
- package/dist/studio/assets/{architectureDiagram-VXUJARFQ-2P3Tgb8f.js → architectureDiagram-VXUJARFQ-DeQBpKRn.js} +1 -1
- package/dist/studio/assets/{blockDiagram-VD42YOAC-CrqQnDfm.js → blockDiagram-VD42YOAC-rNOYA25b.js} +1 -1
- package/dist/studio/assets/{c4Diagram-YG6GDRKO-6-pT_dVL.js → c4Diagram-YG6GDRKO-Dwdo20F9.js} +1 -1
- package/dist/studio/assets/channel-BRL5Xd9D.js +1 -0
- package/dist/studio/assets/{chunk-4BX2VUAB-sK8hbVOx.js → chunk-4BX2VUAB-CRV4CCk0.js} +1 -1
- package/dist/studio/assets/{chunk-55IACEB6-aEOk-zZM.js → chunk-55IACEB6-CfKnCPf3.js} +1 -1
- package/dist/studio/assets/{chunk-B4BG7PRW-Bb2FBdvh.js → chunk-B4BG7PRW-DQ3c5Kxh.js} +1 -1
- package/dist/studio/assets/{chunk-DI55MBZ5-8U9Q7nBy.js → chunk-DI55MBZ5-DQLodXlq.js} +1 -1
- package/dist/studio/assets/{chunk-FMBD7UC4-dolRnKzY.js → chunk-FMBD7UC4-_f1jv0C2.js} +1 -1
- package/dist/studio/assets/{chunk-QN33PNHL-2zxHoCgR.js → chunk-QN33PNHL-Bme2ObLI.js} +1 -1
- package/dist/studio/assets/{chunk-QZHKN3VN-BZmYW9sN.js → chunk-QZHKN3VN-CFKx2cCS.js} +1 -1
- package/dist/studio/assets/{chunk-TZMSLE5B-C02crWWp.js → chunk-TZMSLE5B-CaBI0xPE.js} +1 -1
- package/dist/studio/assets/classDiagram-2ON5EDUG-pSS1Rh7l.js +1 -0
- package/dist/studio/assets/classDiagram-v2-WZHVMYZB-pSS1Rh7l.js +1 -0
- package/dist/studio/assets/clone-CmhY5Yaj.js +1 -0
- package/dist/studio/assets/{cose-bilkent-S5V4N54A-CVlV3Ly1.js → cose-bilkent-S5V4N54A--skfkbsS.js} +1 -1
- package/dist/studio/assets/{dagre-6UL2VRFP-B_V6Z2Uu.js → dagre-6UL2VRFP-BRm0A4ZV.js} +1 -1
- package/dist/studio/assets/{diagram-PSM6KHXK-Bs5Ic3JN.js → diagram-PSM6KHXK-RwkOLofj.js} +1 -1
- package/dist/studio/assets/{diagram-QEK2KX5R-u-6Aj9-p.js → diagram-QEK2KX5R-BqshW-J9.js} +1 -1
- package/dist/studio/assets/{diagram-S2PKOQOG-DfcUR1pB.js → diagram-S2PKOQOG-BY11qYne.js} +1 -1
- package/dist/studio/assets/{erDiagram-Q2GNP2WA-CPBC24OV.js → erDiagram-Q2GNP2WA-Dv4JbEZL.js} +1 -1
- package/dist/studio/assets/{flowDiagram-NV44I4VS-D19HmMxy.js → flowDiagram-NV44I4VS-Db4x5BdM.js} +1 -1
- package/dist/studio/assets/{ganttDiagram-JELNMOA3-B1wTs2iG.js → ganttDiagram-JELNMOA3-CKrdwoFK.js} +1 -1
- package/dist/studio/assets/{gitGraphDiagram-V2S2FVAM-_DLd08lx.js → gitGraphDiagram-V2S2FVAM-lFBqZUNS.js} +1 -1
- package/dist/studio/assets/{graph-DQGp7uuD.js → graph-DFT1v2AW.js} +1 -1
- package/dist/studio/assets/{index-CFnNR3-H.js → index-DqppvsFx.js} +2 -2
- package/dist/studio/assets/{infoDiagram-HS3SLOUP-B6YTrJkI.js → infoDiagram-HS3SLOUP-CTelq6Gf.js} +1 -1
- package/dist/studio/assets/{journeyDiagram-XKPGCS4Q--yKtiUyK.js → journeyDiagram-XKPGCS4Q-D60Qdu-x.js} +1 -1
- package/dist/studio/assets/{kanban-definition-3W4ZIXB7-Ber8dpUc.js → kanban-definition-3W4ZIXB7-oG969VRs.js} +1 -1
- package/dist/studio/assets/{layout-qspLNE1o.js → layout-BGcdz9Ct.js} +1 -1
- package/dist/studio/assets/{linear-BAMm1E3m.js → linear-DompHFIT.js} +1 -1
- package/dist/studio/assets/{mermaid.core-BeDWqMC7.js → mermaid.core-gnmJw_KE.js} +4 -4
- package/dist/studio/assets/{mindmap-definition-VGOIOE7T-NqfyDzWy.js → mindmap-definition-VGOIOE7T-bwPOwyTv.js} +1 -1
- package/dist/studio/assets/{pieDiagram-ADFJNKIX-DRwudBV_.js → pieDiagram-ADFJNKIX-BwIJ6nc_.js} +1 -1
- package/dist/studio/assets/{quadrantDiagram-AYHSOK5B-DkVCorI0.js → quadrantDiagram-AYHSOK5B-BbawCM18.js} +1 -1
- package/dist/studio/assets/{requirementDiagram-UZGBJVZJ-Cb3E5Mb0.js → requirementDiagram-UZGBJVZJ-BoPBvsx-.js} +1 -1
- package/dist/studio/assets/{sankeyDiagram-TZEHDZUN-bHhAGGcs.js → sankeyDiagram-TZEHDZUN-CGFwCDhb.js} +1 -1
- package/dist/studio/assets/{sequenceDiagram-WL72ISMW-BuGDszkG.js → sequenceDiagram-WL72ISMW-C2QyGYTw.js} +1 -1
- package/dist/studio/assets/{stateDiagram-FKZM4ZOC-BcfqUWUX.js → stateDiagram-FKZM4ZOC-Dhm9PrqY.js} +1 -1
- package/dist/studio/assets/stateDiagram-v2-4FDKWEC3-DIUM30g9.js +1 -0
- package/dist/studio/assets/{timeline-definition-IT6M3QCI-BSJLsUtT.js → timeline-definition-IT6M3QCI-CXUuwGHs.js} +1 -1
- package/dist/studio/assets/{treemap-GDKQZRPO-C4WYd-qT.js → treemap-GDKQZRPO-BaupP3xn.js} +1 -1
- package/dist/studio/assets/{xychartDiagram-PRI3JC2R-51WrZUBj.js → xychartDiagram-PRI3JC2R-DyBJxjV-.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/templates/templates/config.yaml +8 -0
- package/global/agents/sleepless.md +56 -1
- package/global/scripts/budget-rollup.mjs +39 -0
- package/global/scripts/cadence-check.mjs +26 -0
- package/global/scripts/cadence-update.mjs +26 -0
- package/package.json +1 -1
- package/dist/studio/assets/channel-B5ArLoHC.js +0 -1
- package/dist/studio/assets/classDiagram-2ON5EDUG-CXZj__Qd.js +0 -1
- package/dist/studio/assets/classDiagram-v2-WZHVMYZB-CXZj__Qd.js +0 -1
- package/dist/studio/assets/clone-CKvNDNCc.js +0 -1
- package/dist/studio/assets/stateDiagram-v2-4FDKWEC3-CfX_F1iw.js +0 -1
package/.claude/agents/worker.md
CHANGED
|
@@ -93,20 +93,47 @@ gh issue edit <N> --add-label "in-progress,claude" --remove-label "ready"
|
|
|
93
93
|
gh issue view <N> # read full body + acceptance criteria
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
+
**Post workpad comment** — after claiming each issue, create (or update) a persistent workpad
|
|
97
|
+
comment using the `<!-- claudius:workpad -->` marker. This gives reviewers a live trace of
|
|
98
|
+
what's happening without reading logs:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
bash .claude/scripts/workpad-upsert.sh <N> "🔄 Claimed — reading issue"
|
|
102
|
+
```
|
|
103
|
+
|
|
96
104
|
## Step 3: Develop in Parallel
|
|
97
105
|
|
|
98
106
|
Each developer runs in its own isolated worktree. Do NOT derive or provide branch names.
|
|
99
107
|
|
|
108
|
+
**Read agent config** from `.claudius/config.yaml` (default: `claude`):
|
|
109
|
+
```bash
|
|
110
|
+
AGENT_COMMAND=$(bun -e "
|
|
111
|
+
import { parse } from 'yaml';
|
|
112
|
+
import { readFileSync } from 'fs';
|
|
113
|
+
const c = parse(readFileSync('.claudius/config.yaml', 'utf8'));
|
|
114
|
+
process.stdout.write(c.agent?.command ?? 'claude');
|
|
115
|
+
" 2>/dev/null || echo 'claude')
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**If `AGENT_COMMAND = "claude"` (default):**
|
|
100
119
|
Spawn one developer agent per issue using the `Agent` tool **concurrently**
|
|
101
|
-
(all in one tool call message)
|
|
120
|
+
(all in one tool call message), using `subagent_type: "developer"`.
|
|
121
|
+
|
|
122
|
+
**If `AGENT_COMMAND = "codex"`:**
|
|
123
|
+
Spawn via Bash: `codex -p --model <agent.model> <agent.flags> "<prompt>" &` per issue.
|
|
102
124
|
|
|
103
|
-
For each issue,
|
|
125
|
+
For each issue, each developer prompt must include:
|
|
104
126
|
- Full issue body and all acceptance criteria
|
|
105
127
|
- Issue number for commit message format (`type(scope): description (#N)`)
|
|
106
128
|
- Constraint: implement only what the issue asks, no scope creep
|
|
107
129
|
- Instruction: use your current branch (the worktree branch), do NOT create a new branch.
|
|
108
130
|
Implement, commit, push with `git push -u origin HEAD`, then report the branch name you
|
|
109
131
|
pushed. Do not create the PR (worker creates PRs).
|
|
132
|
+
- Workpad: update the `<!-- claudius:workpad -->` comment on the issue at meaningful steps —
|
|
133
|
+
after forming a plan, after each AC is checked off, after validation runs. Use
|
|
134
|
+
`bash .claude/scripts/workpad-upsert.sh <N> "<status>"` to update it. In your final output,
|
|
135
|
+
include a structured **handoff summary** (what was built, how to test, AC coverage) so the
|
|
136
|
+
worker can post it to the PR.
|
|
110
137
|
|
|
111
138
|
Wait for all developer agents to complete before proceeding.
|
|
112
139
|
|
|
@@ -147,6 +174,21 @@ EOF
|
|
|
147
174
|
)"
|
|
148
175
|
```
|
|
149
176
|
|
|
177
|
+
**Post handoff comment** — after each `gh pr create`, add a structured handoff to the PR
|
|
178
|
+
using the `<!-- claudius:handoff -->` marker (pull content from developer's handoff summary):
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
gh pr comment <PR> --body "$(cat <<'EOF'
|
|
182
|
+
<!-- claudius:handoff -->
|
|
183
|
+
**Handoff** · PR ready for review
|
|
184
|
+
**What changed:** <from developer handoff summary>
|
|
185
|
+
**How to test:** <from developer handoff summary>
|
|
186
|
+
**AC coverage:** ✅ all / ⚠️ partial / ❌ gap noted
|
|
187
|
+
**Notes:** <any gaps, follow-ups created>
|
|
188
|
+
EOF
|
|
189
|
+
)"
|
|
190
|
+
```
|
|
191
|
+
|
|
150
192
|
After each `gh pr create`, send a Slack notification (best-effort — never block on failure):
|
|
151
193
|
```bash
|
|
152
194
|
SLACK_CHANNEL=$(bun -e "
|
package/.claude/hooks/hooks.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "npx tsx
|
|
9
|
+
"command": "npx tsx .claude/hooks/guardian.ts"
|
|
10
10
|
}
|
|
11
11
|
]
|
|
12
12
|
},
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"hooks": [
|
|
16
16
|
{
|
|
17
17
|
"type": "command",
|
|
18
|
-
"command": "npx tsx
|
|
18
|
+
"command": "npx tsx .claude/hooks/guardian.ts"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"type": "command",
|
|
22
|
-
"command": "npx tsx
|
|
22
|
+
"command": "npx tsx .claude/hooks/worktree-path-guard.ts"
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
25
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"hooks": [
|
|
30
30
|
{
|
|
31
31
|
"type": "command",
|
|
32
|
-
"command": "npx tsx
|
|
32
|
+
"command": "npx tsx .claude/hooks/context-inject.ts"
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
}
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"hooks": [
|
|
40
40
|
{
|
|
41
41
|
"type": "command",
|
|
42
|
-
"command": "npx tsx
|
|
42
|
+
"command": "npx tsx .claude/hooks/continue-or-stop.ts"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"type": "command",
|
|
46
|
-
"command": "npx tsx
|
|
46
|
+
"command": "npx tsx .claude/hooks/learner.ts",
|
|
47
47
|
"async": true
|
|
48
48
|
}
|
|
49
49
|
]
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"hooks": [
|
|
56
56
|
{
|
|
57
57
|
"type": "command",
|
|
58
|
-
"command": "npx tsx
|
|
58
|
+
"command": "npx tsx .claude/hooks/cost-watch.ts",
|
|
59
59
|
"async": true
|
|
60
60
|
}
|
|
61
61
|
]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# workpad-upsert.sh — posts or updates the <!-- claudius:workpad --> sticky comment
|
|
3
|
+
# on a GitHub issue. Idempotent: finds existing workpad comment and patches it in-place.
|
|
4
|
+
#
|
|
5
|
+
# Usage:
|
|
6
|
+
# bash .claude/scripts/workpad-upsert.sh <issue-number> <status> [plan] [acs] [validation]
|
|
7
|
+
#
|
|
8
|
+
# Arguments:
|
|
9
|
+
# issue-number GitHub issue number (required)
|
|
10
|
+
# status Status line, e.g. "🔄 Claimed — reading issue" (required)
|
|
11
|
+
# plan Plan text (optional, default: "TBD")
|
|
12
|
+
# acs ACs markdown (optional, default: "- [ ] (loading from issue)")
|
|
13
|
+
# validation Validation status (optional, default: "pending")
|
|
14
|
+
#
|
|
15
|
+
# Example:
|
|
16
|
+
# bash .claude/scripts/workpad-upsert.sh 42 "🔄 Claimed — reading issue"
|
|
17
|
+
# bash .claude/scripts/workpad-upsert.sh 42 "✅ Implementation complete" "Added auth middleware" "- [x] Token validated" "bun test: 45/45 pass"
|
|
18
|
+
#
|
|
19
|
+
# Run from the repo root (where gh is authenticated).
|
|
20
|
+
set -euo pipefail
|
|
21
|
+
|
|
22
|
+
ISSUE_NUMBER="${1:?'issue-number required'}"
|
|
23
|
+
STATUS="${2:?'status required'}"
|
|
24
|
+
PLAN="${3:-TBD}"
|
|
25
|
+
ACS="${4:-- [ ] (loading from issue)}"
|
|
26
|
+
VALIDATION="${5:-pending}"
|
|
27
|
+
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
28
|
+
|
|
29
|
+
BODY="<!-- claudius:workpad -->
|
|
30
|
+
**Workpad** · Updated: ${TIMESTAMP}
|
|
31
|
+
**Status:** ${STATUS}
|
|
32
|
+
**Plan:** ${PLAN}
|
|
33
|
+
**ACs:**
|
|
34
|
+
${ACS}
|
|
35
|
+
**Validation:** ${VALIDATION}"
|
|
36
|
+
|
|
37
|
+
# Find existing workpad comment ID
|
|
38
|
+
EXISTING=$(gh issue view "$ISSUE_NUMBER" --json comments \
|
|
39
|
+
--jq '[.comments[] | select(.body | contains("claudius:workpad"))] | last | .databaseId // empty' \
|
|
40
|
+
2>/dev/null || echo "")
|
|
41
|
+
|
|
42
|
+
if [ -n "$EXISTING" ]; then
|
|
43
|
+
gh api "repos/{owner}/{repo}/issues/comments/${EXISTING}" -X PATCH -f body="$BODY" >/dev/null
|
|
44
|
+
echo "Workpad updated on issue #${ISSUE_NUMBER} (comment ${EXISTING})"
|
|
45
|
+
else
|
|
46
|
+
gh issue comment "$ISSUE_NUMBER" --body "$BODY" >/dev/null
|
|
47
|
+
echo "Workpad created on issue #${ISSUE_NUMBER}"
|
|
48
|
+
fi
|
|
@@ -26,9 +26,10 @@ This is **Stage 4** of the development lifecycle (/product → /solution → /de
|
|
|
26
26
|
/backlog --groom-backlog → full backlog audit with stale detection
|
|
27
27
|
/backlog --type:debt "refactor" → capture with type hint
|
|
28
28
|
/backlog --critical "fix auth" → capture as critical
|
|
29
|
+
/backlog --global → cross-repo queue from Project #6 (global dir only)
|
|
29
30
|
```
|
|
30
31
|
|
|
31
|
-
##
|
|
32
|
+
## Four Responsibilities
|
|
32
33
|
|
|
33
34
|
### 1. Plan — Decompose Specs into Work Items
|
|
34
35
|
|
|
@@ -213,6 +214,49 @@ bash .claude/scripts/github-relationships.sh list-blocked-by <task>
|
|
|
213
214
|
|
|
214
215
|
These use GitHub's GraphQL API (requires `gh` CLI authenticated). Errors are non-fatal — log and continue.
|
|
215
216
|
|
|
217
|
+
### 4. Global Cross-Repo Queue — `--global`
|
|
218
|
+
|
|
219
|
+
Available from the global orchestration directory only (where `.claudius/config.yaml` has a `repos[]` array). Uses Project #6 as the canonical cross-repo backlog.
|
|
220
|
+
|
|
221
|
+
**When:** `/backlog --global`
|
|
222
|
+
|
|
223
|
+
**Flow:**
|
|
224
|
+
|
|
225
|
+
1. **Read global config** — load repos[] from `.claudius/config.yaml` at the global dir:
|
|
226
|
+
```bash
|
|
227
|
+
cat .claudius/config.yaml # get repos[] array with github + path per repo
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
2. **Query Project #6** — fetch all Todo items not tagged `codex`:
|
|
231
|
+
```bash
|
|
232
|
+
gh project item-list 6 --owner SharadKumar --format json --limit 100 \
|
|
233
|
+
| jq '[.items[] | select(.status == "Todo") | {title: .title, repo: .content.repository, url: .content.url, number: .content.number}]'
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
3. **Group by repo** — partition results by Repository field value.
|
|
237
|
+
|
|
238
|
+
4. **Display prioritized queue** — show cross-repo summary:
|
|
239
|
+
```
|
|
240
|
+
Cross-repo backlog (Project #6 — Status: Todo, no codex label)
|
|
241
|
+
|
|
242
|
+
auctionomy-app 3 items ready
|
|
243
|
+
adalati 1 item ready
|
|
244
|
+
claudius 2 items ready
|
|
245
|
+
|
|
246
|
+
Total: 6 items across 3 repos
|
|
247
|
+
```
|
|
248
|
+
List each item with its issue number, title, and repo.
|
|
249
|
+
|
|
250
|
+
5. **Enter PlanMode for grooming** — ask via `AskUserQuestion` if the user wants to reorder or add items. In PlanMode, use `gh project item-edit` to update Status or Execution fields, or use `gh issue create` to add new items.
|
|
251
|
+
|
|
252
|
+
**Rules for `--global`:**
|
|
253
|
+
- Only run from the global orchestration dir — skip if no `repos[]` in config
|
|
254
|
+
- Never create or label issues `ready` here — that's per-repo backlog's job
|
|
255
|
+
- Read-only view by default; PlanMode is opt-in for grooming
|
|
256
|
+
- Project #6 field IDs are in the repo's `.claudius/config.yaml` comments
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
216
260
|
## Rules
|
|
217
261
|
|
|
218
262
|
- **PlanMode is required for spec decomposition** — work items without implementation approach aren't build-ready
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"name": "claudius",
|
|
22
22
|
"source": "./",
|
|
23
23
|
"description": "Autonomous orchestration layer for Claude Code — agents, skills, hooks, and heartbeat daemon for round-the-clock development",
|
|
24
|
-
"version": "0.
|
|
24
|
+
"version": "0.8.0",
|
|
25
25
|
"strict": true,
|
|
26
26
|
"category": "development"
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
|
-
"version": "0.
|
|
29
|
+
"version": "0.8.0"
|
|
30
30
|
}
|
package/dist/config.d.ts
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
* Configuration loader for .claudius/config.yaml
|
|
3
3
|
*/
|
|
4
4
|
export declare const CURRENT_CONFIG_VERSION = 2;
|
|
5
|
+
export interface AgentConfig {
|
|
6
|
+
/** CLI to invoke for workers: "claude" (default) or "codex" */
|
|
7
|
+
command: string;
|
|
8
|
+
/** Model flag passed to the CLI (e.g. "claude-sonnet-4-5" or "gpt-5.4") */
|
|
9
|
+
model: string;
|
|
10
|
+
/** Extra flags forwarded to the CLI */
|
|
11
|
+
flags: string[];
|
|
12
|
+
}
|
|
5
13
|
export interface ClaudiusConfig {
|
|
6
14
|
configVersion?: number;
|
|
7
15
|
engage: "terminal" | "chat-sdk";
|
|
@@ -59,6 +67,8 @@ export interface ClaudiusConfig {
|
|
|
59
67
|
slackUserId: string;
|
|
60
68
|
};
|
|
61
69
|
goals: string[];
|
|
70
|
+
/** Agent CLI config — which tool + model to use for worker spawning */
|
|
71
|
+
agent?: AgentConfig;
|
|
62
72
|
}
|
|
63
73
|
export declare function loadConfig(path: string): ClaudiusConfig;
|
|
64
74
|
export declare function getDefaultConfig(): ClaudiusConfig;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,MAAM,WAAW,cAAc;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAClC,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,EAAE;QACT,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE;QACT,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,OAAO,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,KAAK,EAAE;QACN,OAAO,EAAE,OAAO,CAAC;QACjB,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;QACnD,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;Q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KACpB,CAAC;IACF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,uEAAuE;IACvE,KAAK,CAAC,EAAE,WAAW,CAAC;CACpB;AA2DD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAevD;AAED,wBAAgB,gBAAgB,IAAI,cAAc,CAEjD"}
|
package/dist/config.js
CHANGED
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAqExC,MAAM,cAAc,GAAmB;IACtC,aAAa,EAAE,sBAAsB;IACrC,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE;QACT,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,eAAe;KACtB;IACD,QAAQ,EAAE;QACT,aAAa,EAAE,MAAM;QACrB,WAAW,EAAE,IAAI;KACjB;IACD,QAAQ,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,CAAC;KACd;IACD,KAAK,EAAE;QACN,OAAO,EAAE,KAAK;QACd,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE,qBAAqB;QAC/B,WAAW,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,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I,CAAC,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,cAAc,CAAC;IACvB,CAAC;AACF,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,8EAA8E;AAC9E,SAAS,SAAS,CAAC,MAAW,EAAE,MAAW;IAC1C,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IAC7B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC9B,IACC,SAAS;YACT,OAAO,SAAS,KAAK,QAAQ;YAC7B,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;YACzB,SAAS;YACT,OAAO,SAAS,KAAK,QAAQ;YAC7B,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EACxB,CAAC;YACF,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YACpC,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;QACzB,CAAC;IACF,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC"}
|
package/dist/daemon/install.d.ts
CHANGED
|
@@ -9,8 +9,16 @@
|
|
|
9
9
|
* unique), appends the first 6 hex chars of a SHA-1 of the full path.
|
|
10
10
|
*/
|
|
11
11
|
export declare function projectSlug(dir: string): string;
|
|
12
|
-
export
|
|
13
|
-
|
|
12
|
+
export type DaemonType = "jobs" | "sleepless";
|
|
13
|
+
/**
|
|
14
|
+
* Derives the launchd label for a given daemon type and project directory.
|
|
15
|
+
*
|
|
16
|
+
* - sleepless (global orchestrator): `com.claudius.sleepless` — fixed, no path suffix
|
|
17
|
+
* - jobs (per-repo scheduled jobs): `com.claudius.jobs.<repo-name>` — last path segment only
|
|
18
|
+
*/
|
|
19
|
+
export declare function daemonLabel(type: DaemonType, projectDir: string): string;
|
|
20
|
+
export declare function installDaemon(type?: DaemonType): void;
|
|
21
|
+
export declare function uninstallDaemon(type?: DaemonType): void;
|
|
14
22
|
/**
|
|
15
23
|
* Returns the command arguments needed to run `claudius`.
|
|
16
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/daemon/install.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAc/C;AAED,wBAAgB,aAAa,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/daemon/install.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAc/C;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAQxE;AAED,wBAAgB,aAAa,CAAC,IAAI,GAAE,UAAmB,GAAG,IAAI,CAgB7D;AAED,wBAAgB,eAAe,CAAC,IAAI,GAAE,UAAmB,GAAG,IAAI,CAa/D;AAkJD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CA4C3D"}
|
package/dist/daemon/install.js
CHANGED
|
@@ -28,41 +28,57 @@ export function projectSlug(dir) {
|
|
|
28
28
|
// the suffix when the base is suspiciously short.
|
|
29
29
|
return base;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Derives the launchd label for a given daemon type and project directory.
|
|
33
|
+
*
|
|
34
|
+
* - sleepless (global orchestrator): `com.claudius.sleepless` — fixed, no path suffix
|
|
35
|
+
* - jobs (per-repo scheduled jobs): `com.claudius.jobs.<repo-name>` — last path segment only
|
|
36
|
+
*/
|
|
37
|
+
export function daemonLabel(type, projectDir) {
|
|
38
|
+
if (type === "sleepless")
|
|
39
|
+
return "com.claudius.sleepless";
|
|
40
|
+
const repoName = projectDir.replace(/\/+$/, "").split("/").pop() ?? "project";
|
|
41
|
+
const safe = repoName
|
|
42
|
+
.toLowerCase()
|
|
43
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
44
|
+
.replace(/^-|-$/g, "");
|
|
45
|
+
return `com.claudius.jobs.${safe}`;
|
|
46
|
+
}
|
|
47
|
+
export function installDaemon(type = "jobs") {
|
|
32
48
|
const currentPlatform = os.platform();
|
|
33
49
|
const projectDir = process.cwd();
|
|
34
50
|
switch (currentPlatform) {
|
|
35
51
|
case "darwin":
|
|
36
|
-
installLaunchd(projectDir);
|
|
52
|
+
installLaunchd(projectDir, type);
|
|
37
53
|
break;
|
|
38
54
|
case "linux":
|
|
39
|
-
installSystemd(projectDir);
|
|
55
|
+
installSystemd(projectDir, type);
|
|
40
56
|
break;
|
|
41
57
|
default:
|
|
42
58
|
console.error(`Unsupported platform: ${currentPlatform}. Use \`claudius daemon start\` for manual execution.`);
|
|
43
59
|
}
|
|
44
60
|
}
|
|
45
|
-
export function uninstallDaemon() {
|
|
61
|
+
export function uninstallDaemon(type = "jobs") {
|
|
46
62
|
const currentPlatform = os.platform();
|
|
47
63
|
const projectDir = process.cwd();
|
|
48
64
|
switch (currentPlatform) {
|
|
49
65
|
case "darwin":
|
|
50
|
-
uninstallLaunchd(projectDir);
|
|
66
|
+
uninstallLaunchd(projectDir, type);
|
|
51
67
|
break;
|
|
52
68
|
case "linux":
|
|
53
|
-
uninstallSystemd(projectDir);
|
|
69
|
+
uninstallSystemd(projectDir, type);
|
|
54
70
|
break;
|
|
55
71
|
default:
|
|
56
72
|
console.error(`Unsupported platform: ${currentPlatform}`);
|
|
57
73
|
}
|
|
58
74
|
}
|
|
59
|
-
function installLaunchd(projectDir) {
|
|
60
|
-
const
|
|
61
|
-
const label = `com.claudius.pulse.${slug}`;
|
|
75
|
+
function installLaunchd(projectDir, type) {
|
|
76
|
+
const label = daemonLabel(type, projectDir);
|
|
62
77
|
const plistDir = resolve(os.homedir(), "Library/LaunchAgents");
|
|
63
78
|
const plistPath = resolve(plistDir, `${label}.plist`);
|
|
79
|
+
const startCmd = type === "sleepless" ? "sleepless" : "daemon";
|
|
64
80
|
const binaryArgs = findBinaryArgs(projectDir);
|
|
65
|
-
const programArgs = [...binaryArgs,
|
|
81
|
+
const programArgs = [...binaryArgs, startCmd, "start"]
|
|
66
82
|
.map((a) => `\t\t<string>${a}</string>`)
|
|
67
83
|
.join("\n");
|
|
68
84
|
// Use the full login PATH so claude, node, bun, npx are all reachable
|
|
@@ -114,9 +130,8 @@ ${programArgs}
|
|
|
114
130
|
console.log(` launchctl load ${plistPath}`);
|
|
115
131
|
}
|
|
116
132
|
}
|
|
117
|
-
function uninstallLaunchd(projectDir) {
|
|
118
|
-
const
|
|
119
|
-
const label = `com.claudius.pulse.${slug}`;
|
|
133
|
+
function uninstallLaunchd(projectDir, type) {
|
|
134
|
+
const label = daemonLabel(type, projectDir);
|
|
120
135
|
const plistPath = resolve(os.homedir(), "Library/LaunchAgents", `${label}.plist`);
|
|
121
136
|
if (!fs.existsSync(plistPath)) {
|
|
122
137
|
console.log("No launchd service found.");
|
|
@@ -131,13 +146,14 @@ function uninstallLaunchd(projectDir) {
|
|
|
131
146
|
cp.execSync(`rm ${plistPath}`, { stdio: "pipe" });
|
|
132
147
|
console.log("Uninstalled launchd service.");
|
|
133
148
|
}
|
|
134
|
-
function installSystemd(projectDir) {
|
|
135
|
-
const
|
|
136
|
-
const serviceName =
|
|
149
|
+
function installSystemd(projectDir, type) {
|
|
150
|
+
const label = daemonLabel(type, projectDir);
|
|
151
|
+
const serviceName = `${label.replace(/\./g, "-")}.service`;
|
|
137
152
|
const unitDir = resolve(os.homedir(), ".config/systemd/user");
|
|
138
153
|
const unitPath = resolve(unitDir, serviceName);
|
|
154
|
+
const startCmd = type === "sleepless" ? "sleepless" : "daemon";
|
|
139
155
|
const binaryArgs = findBinaryArgs(projectDir);
|
|
140
|
-
const execStart = [...binaryArgs,
|
|
156
|
+
const execStart = [...binaryArgs, startCmd, "start"].join(" ");
|
|
141
157
|
const envPath = process.env.PATH || "/usr/local/bin:/usr/bin:/bin";
|
|
142
158
|
const unit = `[Unit]
|
|
143
159
|
Description=${DESCRIPTION}
|
|
@@ -160,15 +176,11 @@ WantedBy=default.target
|
|
|
160
176
|
fs.writeFileSync(unitPath, unit);
|
|
161
177
|
try {
|
|
162
178
|
cp.execSync("systemctl --user daemon-reload", { stdio: "pipe" });
|
|
163
|
-
cp.execSync(`systemctl --user enable ${serviceName}`, {
|
|
164
|
-
|
|
165
|
-
});
|
|
166
|
-
cp.execSync(`systemctl --user start ${serviceName}`, {
|
|
167
|
-
stdio: "pipe",
|
|
168
|
-
});
|
|
179
|
+
cp.execSync(`systemctl --user enable ${serviceName}`, { stdio: "pipe" });
|
|
180
|
+
cp.execSync(`systemctl --user start ${serviceName}`, { stdio: "pipe" });
|
|
169
181
|
console.log(`Installed: ${unitPath}`);
|
|
170
|
-
console.log("
|
|
171
|
-
console.log(`Check status: systemctl --user status
|
|
182
|
+
console.log("Will start on login and restart on crash.");
|
|
183
|
+
console.log(`Check status: systemctl --user status ${serviceName}`);
|
|
172
184
|
}
|
|
173
185
|
catch {
|
|
174
186
|
console.error("Failed to enable systemd service. Enable manually:");
|
|
@@ -176,9 +188,9 @@ WantedBy=default.target
|
|
|
176
188
|
console.log(` systemctl --user enable --now ${serviceName}`);
|
|
177
189
|
}
|
|
178
190
|
}
|
|
179
|
-
function uninstallSystemd(projectDir) {
|
|
180
|
-
const
|
|
181
|
-
const serviceName =
|
|
191
|
+
function uninstallSystemd(projectDir, type) {
|
|
192
|
+
const label = daemonLabel(type, projectDir);
|
|
193
|
+
const serviceName = `${label.replace(/\./g, "-")}.service`;
|
|
182
194
|
try {
|
|
183
195
|
cp.execSync(`systemctl --user stop ${serviceName} 2>/dev/null; systemctl --user disable ${serviceName} 2>/dev/null`, { stdio: "pipe" });
|
|
184
196
|
}
|
|
@@ -222,7 +234,22 @@ export function findBinaryArgs(projectDir) {
|
|
|
222
234
|
const localBin = resolve(projectDir, "node_modules/.bin/claudius");
|
|
223
235
|
if (fs.existsSync(localBin))
|
|
224
236
|
return [localBin];
|
|
225
|
-
// 3.
|
|
237
|
+
// 3. Sibling claudius repo — common in global orchestration dirs where claudius
|
|
238
|
+
// is cloned alongside managed repos (e.g. ~/Projects/claudius/dist/index.js)
|
|
239
|
+
const siblingDist = resolve(projectDir, "claudius/dist/index.js");
|
|
240
|
+
if (fs.existsSync(siblingDist)) {
|
|
241
|
+
try {
|
|
242
|
+
const node = cp
|
|
243
|
+
.execSync("which node", { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] })
|
|
244
|
+
.trim();
|
|
245
|
+
if (node)
|
|
246
|
+
return [node, siblingDist];
|
|
247
|
+
}
|
|
248
|
+
catch {
|
|
249
|
+
// fall through
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// 4. Global install
|
|
226
253
|
try {
|
|
227
254
|
const bin = cp
|
|
228
255
|
.execSync("which claudius", { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] })
|
|
@@ -233,7 +260,7 @@ export function findBinaryArgs(projectDir) {
|
|
|
233
260
|
catch {
|
|
234
261
|
// fall through
|
|
235
262
|
}
|
|
236
|
-
//
|
|
263
|
+
// 5. Fallback
|
|
237
264
|
return ["npx", "claudius-core"];
|
|
238
265
|
}
|
|
239
266
|
//# sourceMappingURL=install.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/daemon/install.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACtC,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACjE,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,GAAG;SACd,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACxB,MAAM,IAAI,GACT,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3F,2EAA2E;IAC3E,wEAAwE;IACxE,2EAA2E;IAC3E,kDAAkD;IAClD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,MAAM,UAAU,aAAa;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/daemon/install.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH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AAM,CAAC;QACR,eAAe;IAChB,CAAC;IAED,cAAc;IACd,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;AACjC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { fileURLToPath } from "node:url";
|
|
|
10
10
|
import { cmdScope } from "./cli/scope.js";
|
|
11
11
|
import { cmdBrowse, cmdStudioDown, cmdStudioUp } from "./cli/studio.js";
|
|
12
12
|
import { loadConfig } from "./config.js";
|
|
13
|
-
import { installDaemon } from "./daemon/install.js";
|
|
13
|
+
import { installDaemon, uninstallDaemon } from "./daemon/install.js";
|
|
14
14
|
import { stopRunningDaemon } from "./daemon/lock.js";
|
|
15
15
|
import { PulseEngine } from "./daemon/pulse.js";
|
|
16
16
|
import { executeJob, loadJobs, loadLastRuns, logRun, nextRunTime } from "./daemon/scheduler.js";
|
|
@@ -28,6 +28,7 @@ Usage:
|
|
|
28
28
|
claudius sync Update Claudius in all registered repos
|
|
29
29
|
claudius repo add <path> Register a repo + initialize with Claudius
|
|
30
30
|
claudius status Show config, health, and budget
|
|
31
|
+
claudius sleepless install Install global orchestrator as login service (com.claudius.sleepless)
|
|
31
32
|
claudius sleepless start Start global orchestrator (scans repos, spawns workers)
|
|
32
33
|
claudius sleepless stop Stop running global orchestrator
|
|
33
34
|
claudius sleepless status Show global orchestrator status
|
|
@@ -36,7 +37,7 @@ Usage:
|
|
|
36
37
|
claudius pulse start Start Pulse daemon (foreground)
|
|
37
38
|
claudius pulse start --watch Start with auto-reload on code changes
|
|
38
39
|
claudius pulse stop Stop running Pulse daemon
|
|
39
|
-
claudius daemon install Install
|
|
40
|
+
claudius daemon install Install per-repo jobs daemon as login service (com.claudius.jobs.<repo>)
|
|
40
41
|
claudius daemon start Start per-repo scheduled jobs daemon (health, nightly, ideate)
|
|
41
42
|
claudius jobs List all jobs with schedule and status
|
|
42
43
|
claudius jobs run <name> Run a job immediately
|
|
@@ -361,10 +362,13 @@ async function cmdDaemon(subcommand) {
|
|
|
361
362
|
const config = loadConfig(configPath);
|
|
362
363
|
switch (subcommand) {
|
|
363
364
|
case "install":
|
|
364
|
-
installDaemon();
|
|
365
|
+
installDaemon("jobs");
|
|
366
|
+
break;
|
|
367
|
+
case "uninstall":
|
|
368
|
+
uninstallDaemon("jobs");
|
|
365
369
|
break;
|
|
366
370
|
case "start": {
|
|
367
|
-
console.log("Note: `claudius daemon start`
|
|
371
|
+
console.log("Note: `claudius daemon start` runs the per-repo scheduled jobs daemon.");
|
|
368
372
|
const pulse = new PulseEngine(config, projectDir);
|
|
369
373
|
const shutdown = () => {
|
|
370
374
|
console.log("\nShutting down...");
|
|
@@ -389,7 +393,7 @@ async function cmdDaemon(subcommand) {
|
|
|
389
393
|
}
|
|
390
394
|
break;
|
|
391
395
|
default:
|
|
392
|
-
console.log("Usage: claudius daemon <install|start|status>");
|
|
396
|
+
console.log("Usage: claudius daemon <install|uninstall|start|status>");
|
|
393
397
|
}
|
|
394
398
|
}
|
|
395
399
|
async function cmdSleepless(subcommand) {
|
|
@@ -401,6 +405,12 @@ async function cmdSleepless(subcommand) {
|
|
|
401
405
|
}
|
|
402
406
|
const config = loadConfig(configPath);
|
|
403
407
|
switch (subcommand) {
|
|
408
|
+
case "install":
|
|
409
|
+
installDaemon("sleepless");
|
|
410
|
+
break;
|
|
411
|
+
case "uninstall":
|
|
412
|
+
uninstallDaemon("sleepless");
|
|
413
|
+
break;
|
|
404
414
|
case "start": {
|
|
405
415
|
console.log("Starting Claudius Sleepless daemon (global orchestrator)...");
|
|
406
416
|
console.log("Scans repos every 2 min and spawns per-repo workers.");
|
|
@@ -455,7 +465,7 @@ async function cmdSleepless(subcommand) {
|
|
|
455
465
|
break;
|
|
456
466
|
}
|
|
457
467
|
default:
|
|
458
|
-
console.log("Usage: claudius sleepless <start|stop|status>");
|
|
468
|
+
console.log("Usage: claudius sleepless <install|uninstall|start|stop|status>");
|
|
459
469
|
}
|
|
460
470
|
}
|
|
461
471
|
function detectPackageManager(dir) {
|