jonah-fleet 1.5.0 → 1.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/README.md +25 -2
  3. package/dist/commands/daemon.d.ts.map +1 -1
  4. package/dist/commands/init.d.ts +3 -0
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/labels.d.ts +11 -0
  7. package/dist/commands/labels.d.ts.map +1 -0
  8. package/dist/commands/status.d.ts.map +1 -1
  9. package/dist/index.js +2292 -476
  10. package/dist/lib/daemon-keys.d.ts +103 -0
  11. package/dist/lib/daemon-keys.d.ts.map +1 -0
  12. package/dist/lib/daemon.d.ts +41 -2
  13. package/dist/lib/daemon.d.ts.map +1 -1
  14. package/dist/lib/evals.d.ts +56 -1
  15. package/dist/lib/evals.d.ts.map +1 -1
  16. package/dist/lib/labels.d.ts +48 -0
  17. package/dist/lib/labels.d.ts.map +1 -0
  18. package/dist/lib/manifest.d.ts +6 -0
  19. package/dist/lib/manifest.d.ts.map +1 -1
  20. package/dist/lib/presets.d.ts +47 -1
  21. package/dist/lib/presets.d.ts.map +1 -1
  22. package/dist/lib/runner.d.ts +66 -0
  23. package/dist/lib/runner.d.ts.map +1 -1
  24. package/dist/lib/telemetry.d.ts +13 -0
  25. package/dist/lib/telemetry.d.ts.map +1 -1
  26. package/dist/lib/terminal-card.d.ts +23 -0
  27. package/dist/lib/terminal-card.d.ts.map +1 -1
  28. package/package.json +4 -4
  29. package/schema.json +68 -0
  30. package/templates/evals/ambiguity-benchmark.json +92 -0
  31. package/templates/prompts/ORCHESTRATION.md +57 -36
  32. package/templates/prompts/_prompt-template.md +13 -1
  33. package/templates/prompts/autowork.md +63 -27
  34. package/templates/prompts/issues-housekeeping.md +1 -1
  35. package/templates/prompts/optimizer.md +3 -0
  36. package/templates/prompts/peer-review.md +13 -3
  37. package/templates/workflows/autowork-cron.yml +74 -2
  38. package/templates/workflows/dependency-check-cron.yml +41 -2
  39. package/templates/workflows/issues-housekeeping-cron.yml +41 -2
  40. package/templates/workflows/prompt-optimizer-cron.yml +41 -2
  41. package/templates/workflows/trigger-autowork-manual.yml +43 -2
  42. package/templates/workflows/trigger-autowork-on-bug.yml +47 -7
  43. package/templates/workflows/trigger-autowork-on-merge.yml +48 -7
  44. package/templates/workflows/trigger-review-routine.yml +46 -7
@@ -41,6 +41,8 @@ jobs:
41
41
  uses: actions/checkout@v4
42
42
  with:
43
43
  fetch-depth: 0
44
+ token: ${{ secrets.GH_PAT || github.token }}
45
+
44
46
 
45
47
  - name: Setup Node.js
46
48
  uses: actions/setup-node@v4
@@ -108,6 +110,45 @@ jobs:
108
110
  fi
109
111
  echo "skills_prompt=$SKILLS_PROMPT" >> "$GITHUB_OUTPUT"
110
112
 
113
+ - name: Resolve routine configuration
114
+ id: routine-config
115
+ run: |
116
+ ROUTINE="autowork"
117
+ DEFAULT_MODEL="gemini-3.7-flash-high"
118
+ DEFAULT_TIMEOUT="60"
119
+
120
+ MODEL="$DEFAULT_MODEL"
121
+ TIMEOUT="$DEFAULT_TIMEOUT"
122
+
123
+ if [ -f "agents-manifest.json" ]; then
124
+ CONFIG_JSON=$(node -e '
125
+ try {
126
+ const fs = require("fs");
127
+ const m = JSON.parse(fs.readFileSync("agents-manifest.json", "utf8"));
128
+ const r = process.argv[1];
129
+ const model = m.models?.[r] || m.models?.default;
130
+ const timeout = m.budgets?.timeoutMinutes?.[r] || m.budgets?.timeoutMinutes?.default;
131
+ console.log(JSON.stringify({ model: model || "", timeout: timeout ? String(timeout) : "" }));
132
+ } catch (e) {
133
+ console.log(JSON.stringify({ model: "", timeout: "" }));
134
+ }
135
+ ' "$ROUTINE")
136
+
137
+ RESOLVED_MODEL=$(node -e "try { console.log(JSON.parse(process.argv[1]).model || ''); } catch {}" "$CONFIG_JSON")
138
+ RESOLVED_TIMEOUT=$(node -e "try { console.log(JSON.parse(process.argv[1]).timeout || ''); } catch {}" "$CONFIG_JSON")
139
+
140
+ if [ -n "$RESOLVED_MODEL" ]; then
141
+ MODEL="$RESOLVED_MODEL"
142
+ fi
143
+ if [ -n "$RESOLVED_TIMEOUT" ]; then
144
+ TIMEOUT="$RESOLVED_TIMEOUT"
145
+ fi
146
+ fi
147
+
148
+ echo "model=$MODEL" >> "$GITHUB_OUTPUT"
149
+ echo "print_timeout=${TIMEOUT}m" >> "$GITHUB_OUTPUT"
150
+ echo "Resolved routine configuration: model=$MODEL, timeout=${TIMEOUT}m"
151
+
111
152
  - name: Run Autowork
112
153
  timeout-minutes: 60
113
154
  env:
@@ -134,9 +175,9 @@ jobs:
134
175
  fi
135
176
 
136
177
  agy -p "$PROMPT" \
137
- --model gemini-3.7-flash-high \
178
+ --model "${{ steps.routine-config.outputs.model || 'gemini-3.7-flash-high' }}" \
138
179
  --output-format text \
139
- --print-timeout 60m \
180
+ --print-timeout "${{ steps.routine-config.outputs.print_timeout || '60m' }}" \
140
181
  --dangerously-skip-permissions
141
182
 
142
183
  - name: Emit run summary
@@ -4,15 +4,14 @@ on:
4
4
  issues:
5
5
  types: [labeled, opened]
6
6
 
7
- concurrency:
8
- group: autowork-bug-${{ github.event.issue.number }}
9
- cancel-in-progress: true
10
-
11
7
  jobs:
12
8
  fire-autowork:
13
9
  if: >-
14
10
  (github.event.action == 'opened' && contains(github.event.issue.labels.*.name, 'bug') && (contains(github.event.issue.labels.*.name, 'priority/P1') || contains(github.event.issue.labels.*.name, 'priority/P0'))) ||
15
11
  (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'bug') && (contains(github.event.issue.labels.*.name, 'priority/P1') || contains(github.event.issue.labels.*.name, 'priority/P0')))
12
+ concurrency:
13
+ group: autowork-bug-${{ github.event.issue.number }}
14
+ cancel-in-progress: true
16
15
  runs-on: ubuntu-latest
17
16
  timeout-minutes: 35
18
17
  permissions:
@@ -26,6 +25,8 @@ jobs:
26
25
  uses: actions/checkout@v4
27
26
  with:
28
27
  fetch-depth: 0
28
+ token: ${{ secrets.GH_PAT || github.token }}
29
+
29
30
 
30
31
  - name: Setup Node.js
31
32
  uses: actions/setup-node@v4
@@ -79,8 +80,47 @@ jobs:
79
80
  fi
80
81
  echo "skills_prompt=$SKILLS_PROMPT" >> "$GITHUB_OUTPUT"
81
82
 
83
+ - name: Resolve routine configuration
84
+ id: routine-config
85
+ run: |
86
+ ROUTINE="autowork"
87
+ DEFAULT_MODEL="gemini-3.7-flash-high"
88
+ DEFAULT_TIMEOUT="60"
89
+
90
+ MODEL="$DEFAULT_MODEL"
91
+ TIMEOUT="$DEFAULT_TIMEOUT"
92
+
93
+ if [ -f "agents-manifest.json" ]; then
94
+ CONFIG_JSON=$(node -e '
95
+ try {
96
+ const fs = require("fs");
97
+ const m = JSON.parse(fs.readFileSync("agents-manifest.json", "utf8"));
98
+ const r = process.argv[1];
99
+ const model = m.models?.[r] || m.models?.default;
100
+ const timeout = m.budgets?.timeoutMinutes?.[r] || m.budgets?.timeoutMinutes?.default;
101
+ console.log(JSON.stringify({ model: model || "", timeout: timeout ? String(timeout) : "" }));
102
+ } catch (e) {
103
+ console.log(JSON.stringify({ model: "", timeout: "" }));
104
+ }
105
+ ' "$ROUTINE")
106
+
107
+ RESOLVED_MODEL=$(node -e "try { console.log(JSON.parse(process.argv[1]).model || ''); } catch {}" "$CONFIG_JSON")
108
+ RESOLVED_TIMEOUT=$(node -e "try { console.log(JSON.parse(process.argv[1]).timeout || ''); } catch {}" "$CONFIG_JSON")
109
+
110
+ if [ -n "$RESOLVED_MODEL" ]; then
111
+ MODEL="$RESOLVED_MODEL"
112
+ fi
113
+ if [ -n "$RESOLVED_TIMEOUT" ]; then
114
+ TIMEOUT="$RESOLVED_TIMEOUT"
115
+ fi
116
+ fi
117
+
118
+ echo "model=$MODEL" >> "$GITHUB_OUTPUT"
119
+ echo "print_timeout=${TIMEOUT}m" >> "$GITHUB_OUTPUT"
120
+ echo "Resolved routine configuration: model=$MODEL, timeout=${TIMEOUT}m"
121
+
82
122
  - name: Run Autowork
83
- timeout-minutes: 30
123
+ timeout-minutes: 60
84
124
  env:
85
125
  GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
86
126
  GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
@@ -95,7 +135,7 @@ jobs:
95
135
  PROMPT="You are the Autowork routine for this repository. A high-priority bug was filed. Read and follow .github/prompts/autowork.md. ${SKILLS_PROMPT} Your target is issue #${TARGET_ISSUE}. You are in Targeted mode: work issue #${TARGET_ISSUE} directly."
96
136
 
97
137
  agy -p "$PROMPT" \
98
- --model gemini-3.7-flash-high \
138
+ --model "${{ steps.routine-config.outputs.model || 'gemini-3.7-flash-high' }}" \
99
139
  --output-format text \
100
- --print-timeout 30m \
140
+ --print-timeout "${{ steps.routine-config.outputs.print_timeout || '60m' }}" \
101
141
  --dangerously-skip-permissions
@@ -4,16 +4,15 @@ on:
4
4
  pull_request:
5
5
  types: [closed]
6
6
 
7
- concurrency:
8
- group: autowork-merge-pr-${{ github.event.pull_request.number }}
9
- cancel-in-progress: true
10
-
11
7
  jobs:
12
8
  fire-autowork:
13
9
  if: >-
14
10
  github.event.pull_request.merged == true &&
15
11
  github.event.pull_request.base.ref == 'main' &&
16
12
  github.event.pull_request.head.repo.full_name == github.repository
13
+ concurrency:
14
+ group: autowork-merge-pr-${{ github.event.pull_request.number }}
15
+ cancel-in-progress: true
17
16
  runs-on: ubuntu-latest
18
17
  timeout-minutes: 35
19
18
  permissions:
@@ -49,6 +48,8 @@ jobs:
49
48
  uses: actions/checkout@v4
50
49
  with:
51
50
  fetch-depth: 0
51
+ token: ${{ secrets.GH_PAT || github.token }}
52
+
52
53
 
53
54
  - name: Setup Node.js
54
55
  if: steps.pick.outputs.skip != 'true'
@@ -108,9 +109,49 @@ jobs:
108
109
  fi
109
110
  echo "skills_prompt=$SKILLS_PROMPT" >> "$GITHUB_OUTPUT"
110
111
 
112
+ - name: Resolve routine configuration
113
+ if: steps.pick.outputs.skip != 'true'
114
+ id: routine-config
115
+ run: |
116
+ ROUTINE="autowork"
117
+ DEFAULT_MODEL="gemini-3.7-flash-high"
118
+ DEFAULT_TIMEOUT="60"
119
+
120
+ MODEL="$DEFAULT_MODEL"
121
+ TIMEOUT="$DEFAULT_TIMEOUT"
122
+
123
+ if [ -f "agents-manifest.json" ]; then
124
+ CONFIG_JSON=$(node -e '
125
+ try {
126
+ const fs = require("fs");
127
+ const m = JSON.parse(fs.readFileSync("agents-manifest.json", "utf8"));
128
+ const r = process.argv[1];
129
+ const model = m.models?.[r] || m.models?.default;
130
+ const timeout = m.budgets?.timeoutMinutes?.[r] || m.budgets?.timeoutMinutes?.default;
131
+ console.log(JSON.stringify({ model: model || "", timeout: timeout ? String(timeout) : "" }));
132
+ } catch (e) {
133
+ console.log(JSON.stringify({ model: "", timeout: "" }));
134
+ }
135
+ ' "$ROUTINE")
136
+
137
+ RESOLVED_MODEL=$(node -e "try { console.log(JSON.parse(process.argv[1]).model || ''); } catch {}" "$CONFIG_JSON")
138
+ RESOLVED_TIMEOUT=$(node -e "try { console.log(JSON.parse(process.argv[1]).timeout || ''); } catch {}" "$CONFIG_JSON")
139
+
140
+ if [ -n "$RESOLVED_MODEL" ]; then
141
+ MODEL="$RESOLVED_MODEL"
142
+ fi
143
+ if [ -n "$RESOLVED_TIMEOUT" ]; then
144
+ TIMEOUT="$RESOLVED_TIMEOUT"
145
+ fi
146
+ fi
147
+
148
+ echo "model=$MODEL" >> "$GITHUB_OUTPUT"
149
+ echo "print_timeout=${TIMEOUT}m" >> "$GITHUB_OUTPUT"
150
+ echo "Resolved routine configuration: model=$MODEL, timeout=${TIMEOUT}m"
151
+
111
152
  - name: Run Autowork
112
153
  if: steps.pick.outputs.skip != 'true'
113
- timeout-minutes: 30
154
+ timeout-minutes: 60
114
155
  env:
115
156
  GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
116
157
  GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
@@ -124,7 +165,7 @@ jobs:
124
165
  PROMPT="You are the Autowork routine for this repository. A PR was recently merged. Read and follow .github/prompts/autowork.md. ${SKILLS_PROMPT} You are in Scan mode: converge on open PRs, close merged issues, and pick the next unblocked priority issue."
125
166
 
126
167
  agy -p "$PROMPT" \
127
- --model gemini-3.7-flash-high \
168
+ --model "${{ steps.routine-config.outputs.model || 'gemini-3.7-flash-high' }}" \
128
169
  --output-format text \
129
- --print-timeout 30m \
170
+ --print-timeout "${{ steps.routine-config.outputs.print_timeout || '60m' }}" \
130
171
  --dangerously-skip-permissions
@@ -17,10 +17,6 @@ on:
17
17
  issue_comment:
18
18
  types: [created]
19
19
 
20
- concurrency:
21
- group: review-routine-pr-${{ github.event.pull_request.number || github.event.issue.number || inputs.pr_number || 'scan' }}
22
- cancel-in-progress: true
23
-
24
20
  jobs:
25
21
  trigger-routine:
26
22
  if: >-
@@ -42,6 +38,9 @@ jobs:
42
38
  contains(github.event.comment.body, '/peer-review') ||
43
39
  contains(github.event.comment.body, '/retrigger') ||
44
40
  contains(github.event.comment.body, '/re-review')))
41
+ concurrency:
42
+ group: review-routine-pr-${{ github.event.pull_request.number || github.event.issue.number || inputs.pr_number || 'scan' }}
43
+ cancel-in-progress: true
45
44
  runs-on: ubuntu-latest
46
45
  timeout-minutes: 35
47
46
  permissions:
@@ -171,9 +170,49 @@ jobs:
171
170
  printf '%s' "$ANTIGRAVITY_OAUTH_TOKEN" > "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
172
171
  chmod 600 "$HOME/.gemini/antigravity-cli/antigravity-oauth-token"
173
172
 
173
+ - name: Resolve routine configuration
174
+ if: steps.guard.outputs.skip != 'true'
175
+ id: routine-config
176
+ run: |
177
+ ROUTINE="peer-review"
178
+ DEFAULT_MODEL="gemini-3.7-flash-high"
179
+ DEFAULT_TIMEOUT="55"
180
+
181
+ MODEL="$DEFAULT_MODEL"
182
+ TIMEOUT="$DEFAULT_TIMEOUT"
183
+
184
+ if [ -f "agents-manifest.json" ]; then
185
+ CONFIG_JSON=$(node -e '
186
+ try {
187
+ const fs = require("fs");
188
+ const m = JSON.parse(fs.readFileSync("agents-manifest.json", "utf8"));
189
+ const r = process.argv[1];
190
+ const model = m.models?.[r] || m.models?.default;
191
+ const timeout = m.budgets?.timeoutMinutes?.[r] || m.budgets?.timeoutMinutes?.default;
192
+ console.log(JSON.stringify({ model: model || "", timeout: timeout ? String(timeout) : "" }));
193
+ } catch (e) {
194
+ console.log(JSON.stringify({ model: "", timeout: "" }));
195
+ }
196
+ ' "$ROUTINE")
197
+
198
+ RESOLVED_MODEL=$(node -e "try { console.log(JSON.parse(process.argv[1]).model || ''); } catch {}" "$CONFIG_JSON")
199
+ RESOLVED_TIMEOUT=$(node -e "try { console.log(JSON.parse(process.argv[1]).timeout || ''); } catch {}" "$CONFIG_JSON")
200
+
201
+ if [ -n "$RESOLVED_MODEL" ]; then
202
+ MODEL="$RESOLVED_MODEL"
203
+ fi
204
+ if [ -n "$RESOLVED_TIMEOUT" ]; then
205
+ TIMEOUT="$RESOLVED_TIMEOUT"
206
+ fi
207
+ fi
208
+
209
+ echo "model=$MODEL" >> "$GITHUB_OUTPUT"
210
+ echo "print_timeout=${TIMEOUT}m" >> "$GITHUB_OUTPUT"
211
+ echo "Resolved routine configuration: model=$MODEL, timeout=${TIMEOUT}m"
212
+
174
213
  - name: Run Peer Review
175
214
  if: steps.guard.outputs.skip != 'true'
176
- timeout-minutes: 30
215
+ timeout-minutes: 55
177
216
  env:
178
217
  GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
179
218
  GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
@@ -195,9 +234,9 @@ jobs:
195
234
  fi
196
235
 
197
236
  agy -p "$PROMPT" \
198
- --model gemini-3.7-flash-high \
237
+ --model "${{ steps.routine-config.outputs.model || 'gemini-3.7-flash-high' }}" \
199
238
  --output-format text \
200
- --print-timeout 30m \
239
+ --print-timeout "${{ steps.routine-config.outputs.print_timeout || '55m' }}" \
201
240
  --dangerously-skip-permissions
202
241
 
203
242
  - name: Handle Review Failure & PR Notification