-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch-releases.mjs
More file actions
262 lines (205 loc) · 10.4 KB
/
Copy pathpatch-releases.mjs
File metadata and controls
262 lines (205 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
#!/usr/bin/env node
/**
* Patch GitHub release titles and bodies:
* "Harness of AI" / "Harness" / "ToddSpect" → "Todd of AIDLC" / "Todd"
*/
import { execSync } from 'node:child_process';
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
const REPO = 'nbsjunior/todd';
function rebrand(text) {
return text
// Specific long forms first
.replace(/Harness of AI/g, 'Todd of AIDLC')
.replace(/Harness VS Code/g, 'Todd of AIDLC VS Code')
.replace(/ToddSpect v/g, 'Todd of AIDLC v')
.replace(/ToddSpect/g, 'Todd of AIDLC')
// paths / filenames — harness-vscode → toddspect-vscode (keep technical names)
.replace(/harness-vscode/g, 'toddspect-vscode')
.replace(/harness\.vscode/g, 'toddspect.vscode')
.replace(/HarnessRelease/g, 'ToddSpectRelease')
// settings keys
.replace(/harness\.(defaultWorkspace|cursor|agent|promptOptimization)/g, (m, k) => `toddspect.${k}`)
// CLI commands
.replace(/`harness check getGoat`/g, '`todd check getGoat`')
.replace(/`harness web:serve`/g, '`todd web:serve`')
.replace(/`harness setup`/g, '`todd setup`')
.replace(/`harness init`/g, '`todd init`')
.replace(/`harness `/g, '`todd `')
.replace(/run harness /g, 'run todd ')
// .harness/ folder
.replace(/\.harness\//g, '.toddspect/')
.replace(/\.harness\\`/g, '.toddspect\\`')
// old wiki / repo URLs
.replace(/nbsjunior\/harness/g, 'nbsjunior/todd')
// Remaining bare "Harness" word (not in code tokens)
.replace(/\bHarness\b/g, 'Todd');
}
// releases to patch: tag → { title, body }
const releases = [
{
tag: 'v0.1.0',
title: 'Todd of AIDLC VS Code 0.1.0',
body: `## Highlights
- **Spending tab** — per-provider token/request stats and recent turns
- **Prompt optimization** — context truncation and history trim (configurable)
- **Default workspace path** — toddspect.defaultWorkspace setting
- **Chat UX** — Clear all, New chat, Clear Chat & Context
- **Cursor** — API probe, SSE reconnect, improved auto-router readiness
- **Diagnostics** — \`node scripts/test-cursor.mjs\` and live check in \`todd check getGoat\`
Install: download \`toddspect-vscode-0.1.0.vsix\` below, then **Extensions: Install from VSIX...** and reload the window.`,
},
{
tag: 'v0.1.1',
title: 'Todd of AIDLC VS Code 0.1.1',
body: `## Todd of AIDLC 0.1.1
- Illustrated user manual (PT) with screenshots
- Wiki: [User-Manual](https://github.com/nbsjunior/todd/wiki/User-Manual)
Install \`toddspect-vscode-0.1.1.vsix\` → Reload Window.`,
},
{
tag: 'v0.1.2',
title: 'Todd of AIDLC VS Code 0.1.2',
body: `Dedicated User Manual panel, English documentation, README focused on single-interaction benefits and contributions. Install \`toddspect-vscode-0.1.2.vsix\`.`,
},
{
tag: 'v0.1.3',
title: 'Todd of AIDLC v0.1.3',
body: `## Summary
- **Live edits** — Agent / Spec+Agent runs show real-time file changes in chat and open side-by-side diffs in the editor.
- **Revert** — Undo all file changes from the last agent session (Stop + Revert), similar to Cursor, for local workspace tools across providers.
- **Terminal** — git and gh tool commands are mirrored to the integrated **Todd of AIDLC** terminal; focus it from the chat bar.
- **Model picker** — Choose a model per provider below the provider pills (default **LLM Auto**); Copilot and Claude CLI respect the selection.
## Install
Download **\`toddspect-vscode-0.1.3.vsix\`** below, then in VS Code: **Extensions → … → Install from VSIX**.
## Settings (optional)
- \`toddspect.agent.showLiveDiff\` — open diff on write (default: true)
- \`toddspect.agent.openChangedFiles\` — open modified files (default: true)
- \`toddspect.agent.mirrorCommandsToTerminal\` — mirror git/gh to terminal (default: true)`,
},
{
tag: 'v0.1.4',
title: 'Todd of AIDLC v0.1.4',
body: `## Summary
- **Cursor provider** no longer calls GitHub Copilot for Agent mode — uses **Cursor Cloud API** only (fixes HTTP 429 quota errors when Cursor was selected).
- **Local workspace file edits** remain on **Copilot + Agent / Spec+Agent**; the chat explains this when using Cursor Agent.
- **Dropdown selects** for Mode, Provider, and Model (replaces pill buttons).
- **Live Edits** sidebar panel — before/after code preview, auto-opens on agent writes, Revert all + Open in editor.
## Install
Download **\`toddspect-vscode-0.1.4.vsix\`** below → VS Code: **Extensions → … → Install from VSIX** → reload window.
## Quick guide
| Goal | Provider | Mode |
|------|----------|------|
| Edit files in VS Code | Copilot | Agent |
| Cursor cloud tasks | Cursor | Ask / Agent |`,
},
{
tag: 'v0.1.5',
title: 'Todd of AIDLC v0.1.5',
body: `## Summary
- **Toolbar:** Revert and Terminal moved next to **Clear all** (+ New chat).
- **Model dropdown:** Updates when you change **Provider** (Copilot, Cursor, Claude, …); resets to **LLM Auto** per provider.
- **Default SDD specs** on \`todd init\` / \`todd setup\` (skip if file already exists):
- Clean Code, SOLID architecture, OWASP security, Agent engineering prompts, Modern performance workflow, Code review, Refactor-to-SOLID.
- **Prompt engineering pipeline:** normalize whitespace, dedupe user turns, merge guidance, CoT hints for Agent/Spec+Agent modes.
## Install
Download **\`toddspect-vscode-0.1.5.vsix\`** → Extensions → Install from VSIX → reload.
## Spec+Agent
Run **Todd: Initialize Workspace** or \`todd setup\` to get default specs in \`.toddspect/specs/\`. Remove any file you do not need.`,
},
{
tag: 'v0.1.6',
title: 'Todd of AIDLC v0.1.6',
body: `## Fix: Cursor Agent + local files + Live Edits
**Problem:** Cursor Agent used only Cursor Cloud — remote VM cannot see your VS Code workspace, so files were not edited locally and Live Edits stayed empty.
**Fix (default \`toddspect.cursor.agentExecution: auto\`):**
- **Copilot configured** → Cursor + Agent edits files **in your workspace** (Live Edits works).
- **Copilot missing** → falls back to Cursor Cloud with a clear warning.
## Setting
\`toddspect.cursor.agentExecution: auto | local | cloud\`
## Install
**\`toddspect-vscode-0.1.6.vsix\`** — reload VS Code after install.
**Also required for local edits:** \`gh auth login\` with Copilot scope (or Copilot token in Todd settings).`,
},
{
tag: 'v0.1.7',
title: 'Todd of AIDLC v0.1.7',
body: `## Summary
- **Cursor Agent (local)** — Edit files in your open VS Code workspace via \`@cursor/sdk\` when a Cursor API key is set. No GitHub Copilot quota required for this path.
- **Spending tab** — Track requests, estimated tokens (in/out), and duration per provider; data in \`.toddspect/usage-stats.json\`.
- **Prompt optimization** — Pre-route pipeline (history trim, dedupe, context caps, quality contract) documented in README and wiki; on by default for all providers.
## Install
Download \`toddspect-vscode-0.1.7.vsix\` below, then in VS Code: **Extensions → Install from VSIX…**
Or:
\`\`\`bash
code --install-extension toddspect-vscode-0.1.7.vsix
\`\`\`
## Settings
- \`toddspect.cursor.agentExecution\`: \`auto\` | \`local\` | \`cloud\` (default \`auto\`)
- \`toddspect.promptOptimization.enabled\` (default \`true\`)
- Cursor API key: [cursor.com/dashboard/integrations](https://cursor.com/dashboard/integrations)
## Docs
- [Prompt optimization](https://github.com/nbsjunior/todd/blob/main/docs/prompt-optimization.md)
- [Cursor Agent (local vs cloud)](https://github.com/nbsjunior/todd/blob/main/docs/cursor-agent.md)`,
},
{
tag: 'v0.1.8',
title: 'Todd of AIDLC v0.1.8',
body: `## Fix
- **Cursor SDK local agent** — The VSIX now bundles the full \`@cursor/sdk\` dependency tree (including \`@fastify/busboy\` required by \`undici\`). Fixes \`Could not load @cursor/sdk: Cannot find module '@fastify/busboy'\` and fallback to Cursor Cloud.
## Install
Download \`toddspect-vscode-0.1.8.vsix\` and use **Extensions → Install from VSIX…**
After install, reload VS Code. Cursor + Agent with a Cursor API key should show local workspace editing without the SDK load error.`,
},
{
tag: 'v0.1.9',
title: 'Todd of AIDLC v0.1.9',
body: `## Summary
- **SDD view** — GitHub spec-kit workflow (constitution → specify → plan → tasks → implement)
- **Roadmap** — session persistence, budget alerts, spec discovery, multi-agent fan-out, GitHub Actions example, plugin manifest, \`todd web:serve\` MVP
- **Security** — npm overrides fix Dependabot alerts (undici, tar, @tootallnate/once)
## Install
1. Download **\`toddspect-vscode-0.1.9.vsix\`** below.
2. VS Code / Cursor: **Extensions → … → Install from VSIX**.
If you see *"End of central directory record signature not found"*, the file is truncated (common with OneDrive or interrupted download). Re-download from this page or build locally: \`npm run package:vsix:release\` → install from \`%LOCALAPPDATA%\\ToddSpectRelease\\\`.
## Test plan
- [ ] Initialize SDD workflow and create a feature
- [ ] Run a spec-kit step in chat (Spec+Agent)
- [ ] Chat session restores after reload`,
},
{
tag: 'v0.2.0',
title: 'Todd of AIDLC v0.2.0 — Rebrand',
body: `## Todd of AIDLC v0.2.0 — Rebrand
Product name is now **Todd of AIDLC** (formerly Harness / ToddSpect). CLI command \`toddspect\`, workspace \`.toddspect/\`, and VS Code settings \`toddspect.*\` are unchanged.
### Install
Download from [GitHub Releases](https://github.com/nbsjunior/todd/releases/latest).
Prefer \`%LOCALAPPDATA%\\ToddSpectRelease\\\` after \`npm run package:vsix:release\` if OneDrive corrupts downloads.
### What changed
- CLI command: \`toddspect\` (was \`harness\`)
- Workspace folder: \`.toddspect/\` (was \`.harness/\`)
- VS Code settings: \`toddspect.*\`
- Extension publisher: \`toddspect\`
### Migration
1. Uninstall old Todd / ToddSpec VSIX (optional)
2. Install \`toddspect-vscode-0.2.0.vsix\`
3. Rename \`.harness/\` → \`.toddspect/\` in your projects (or run \`todd init\`)`,
},
];
let updated = 0;
for (const r of releases) {
try {
const bodyFile = path.join(os.tmpdir(), `body-${r.tag}.md`);
fs.writeFileSync(bodyFile, r.body, 'utf8');
execSync(
`gh release edit ${r.tag} --repo ${REPO} --title "${r.title}" --notes-file "${bodyFile}"`,
{ stdio: 'pipe' }
);
console.log(` ✓ ${r.tag} — ${r.title}`);
updated++;
} catch (e) {
console.error(` ✗ ${r.tag}:`, e.stderr?.toString() ?? e.message);
}
}
console.log(`\n[patch-releases] ${updated}/${releases.length} releases updated`);