specweave 1.0.586 → 1.0.587
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/bin/specweave.js +30 -0
- package/dist/plugins/specweave/lib/integrations/github/github-access-error.d.ts +48 -0
- package/dist/plugins/specweave/lib/integrations/github/github-access-error.d.ts.map +1 -0
- package/dist/plugins/specweave/lib/integrations/github/github-access-error.js +69 -0
- package/dist/plugins/specweave/lib/integrations/github/github-access-error.js.map +1 -0
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.d.ts +8 -0
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.js +22 -2
- package/dist/plugins/specweave/lib/integrations/github/github-client-v2.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/generators/spec/task-parser.js +38 -16
- package/dist/plugins/specweave/lib/vendor/generators/spec/task-parser.js.map +1 -1
- package/dist/src/cli/commands/handoff.d.ts +54 -0
- package/dist/src/cli/commands/handoff.d.ts.map +1 -0
- package/dist/src/cli/commands/handoff.js +82 -0
- package/dist/src/cli/commands/handoff.js.map +1 -0
- package/dist/src/cli/helpers/init/gitignore-generator.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/gitignore-generator.js +3 -0
- package/dist/src/cli/helpers/init/gitignore-generator.js.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.js +5 -0
- package/dist/src/core/hooks/handlers/hook-router.js.map +1 -1
- package/dist/src/core/hooks/handlers/pre-compact.d.ts +33 -0
- package/dist/src/core/hooks/handlers/pre-compact.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/pre-compact.js +109 -0
- package/dist/src/core/hooks/handlers/pre-compact.js.map +1 -0
- package/dist/src/core/hooks/handlers/types.d.ts +1 -1
- package/dist/src/core/hooks/handlers/types.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/types.js +3 -0
- package/dist/src/core/hooks/handlers/types.js.map +1 -1
- package/dist/src/core/session/handoff-doc-format.d.ts +164 -0
- package/dist/src/core/session/handoff-doc-format.d.ts.map +1 -0
- package/dist/src/core/session/handoff-doc-format.js +292 -0
- package/dist/src/core/session/handoff-doc-format.js.map +1 -0
- package/dist/src/core/session/handoff-git-state.d.ts +49 -0
- package/dist/src/core/session/handoff-git-state.d.ts.map +1 -0
- package/dist/src/core/session/handoff-git-state.js +164 -0
- package/dist/src/core/session/handoff-git-state.js.map +1 -0
- package/dist/src/core/session/handoff-secret-scrub.d.ts +59 -0
- package/dist/src/core/session/handoff-secret-scrub.d.ts.map +1 -0
- package/dist/src/core/session/handoff-secret-scrub.js +72 -0
- package/dist/src/core/session/handoff-secret-scrub.js.map +1 -0
- package/dist/src/core/session/{handoff-context.d.ts → install-handoff-context.d.ts} +7 -3
- package/dist/src/core/session/install-handoff-context.d.ts.map +1 -0
- package/dist/src/core/session/{handoff-context.js → install-handoff-context.js} +7 -3
- package/dist/src/core/session/install-handoff-context.js.map +1 -0
- package/dist/src/core/session/work-handoff.d.ts +88 -0
- package/dist/src/core/session/work-handoff.d.ts.map +1 -0
- package/dist/src/core/session/work-handoff.js +412 -0
- package/dist/src/core/session/work-handoff.js.map +1 -0
- package/dist/src/generators/spec/task-parser.d.ts.map +1 -1
- package/dist/src/generators/spec/task-parser.js +38 -16
- package/dist/src/generators/spec/task-parser.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/commands/handoff.md +54 -0
- package/plugins/specweave/lib/integrations/github/github-access-error.js +43 -0
- package/plugins/specweave/lib/integrations/github/github-access-error.ts +103 -0
- package/plugins/specweave/lib/integrations/github/github-client-v2.js +24 -4
- package/plugins/specweave/lib/integrations/github/github-client-v2.ts +26 -4
- package/plugins/specweave/lib/vendor/generators/spec/task-parser.js +38 -16
- package/plugins/specweave/lib/vendor/generators/spec/task-parser.js.map +1 -1
- package/plugins/specweave/skills/handoff/SKILL.md +59 -0
- package/dist/src/core/session/handoff-context.d.ts.map +0 -1
- package/dist/src/core/session/handoff-context.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-handoff.js","sourceRoot":"","sources":["../../../../src/core/session/work-handoff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAIlB,MAAM,yBAAyB,CAAC;AA2CjC;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IACtD,YAA4B,UAAoB;QAC9C,KAAK,CACH,iEAAiE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACzF,CAAC;QAHwB,eAAU,GAAV,UAAU,CAAU;QAI9C,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;IAC9C,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,QAAgB,EAChB,OAA2B,EAAE;IAE7B,uEAAuE;IACvE,sEAAsE;IACtE,2EAA2E;IAC3E,6EAA6E;IAC7E,wEAAwE;IACxE,MAAM,QAAQ,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,gBAA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AC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,GAAG,cAAc,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAaD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAiKzE;AAoBD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,EAAE,EACpB,UAAU,EAAE,MAAM,EAAE,GACnB,gBAAgB,EAAE,CAyEpB;AAkBD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAAE,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAc1F;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,CAMjF"}
|
|
@@ -37,13 +37,27 @@ export function parseTasksWithUSLinks(tasksPath) {
|
|
|
37
37
|
const lines = content.split('\n');
|
|
38
38
|
// Regex patterns for task parsing (T-029: Support E suffix for external IDs)
|
|
39
39
|
// Updated: Support 3+ digits for T-XXX and US-XXX (Y2K fix)
|
|
40
|
+
//
|
|
41
|
+
// 0867: These field regexes are NOT `^`-anchored. The canonical task format
|
|
42
|
+
// combines several fields on ONE line separated by `|`:
|
|
43
|
+
// **User Story**: US-001 | **Satisfies ACs**: AC-US1-01 | **Status**: [x] completed
|
|
44
|
+
// The line is split on `|` and each segment matched independently (see
|
|
45
|
+
// below). Previously these were `^`-anchored and the userStory match
|
|
46
|
+
// early-`continue`d, silently dropping same-line `Satisfies ACs`/`Status` —
|
|
47
|
+
// making every combined-format task read as `pending` (whole-codebase bug).
|
|
48
|
+
// The multi-line format (each `**Field**:` on its own line) still parses
|
|
49
|
+
// because each line is a single segment.
|
|
40
50
|
const taskHeaderRegex = /^###\s+(T-\d{3,}E?):\s*(.+)$/;
|
|
41
|
-
const userStoryRegex =
|
|
42
|
-
const satisfiesACsRegex =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
const userStoryRegex = /\*\*User Story\*\*:\s*(US-\d{3,}E?)/;
|
|
52
|
+
const satisfiesACsRegex = /\*\*Satisfies ACs\*\*:\s*(AC-US\d+E?-\d{2}(?:,\s*AC-US\d+E?-\d{2})*)/;
|
|
53
|
+
// Trailing status word is OPTIONAL: a checkbox-only `**Status**: [x]` is a
|
|
54
|
+
// valid completed task. The checkbox is the source of truth (see
|
|
55
|
+
// parseTaskStatus), so requiring `(\w+)` here would silently under-report a
|
|
56
|
+
// bare-checkbox task as pending — the same drop-class T-019 fixed.
|
|
57
|
+
const statusRegex = /\*\*Status\*\*:\s*\[([x ])\]\s*(\w+)?/;
|
|
58
|
+
const priorityRegex = /\*\*Priority\*\*:\s*([^|]+)/;
|
|
59
|
+
const estimatedEffortRegex = /\*\*Estimated Effort\*\*:\s*([^|]+)/;
|
|
60
|
+
const dependenciesRegex = /\*\*Dependencies\*\*:\s*([^|]+)/;
|
|
47
61
|
let currentTask = null;
|
|
48
62
|
let currentDescription = [];
|
|
49
63
|
let currentSection = 'none';
|
|
@@ -71,11 +85,16 @@ export function parseTasksWithUSLinks(tasksPath) {
|
|
|
71
85
|
// Skip if no current task
|
|
72
86
|
if (!currentTask)
|
|
73
87
|
continue;
|
|
74
|
-
// Parse task fields
|
|
88
|
+
// Parse task fields. A single line may carry MULTIPLE `**Field**:`
|
|
89
|
+
// segments separated by `|`, so we extract EVERY recognized field from
|
|
90
|
+
// the line instead of early-`continue`ing after the first match. The
|
|
91
|
+
// regexes are unanchored (above), and value-capturing fields stop at `|`
|
|
92
|
+
// so a later segment's value isn't swallowed.
|
|
93
|
+
let matchedAnyField = false;
|
|
75
94
|
const userStoryMatch = line.match(userStoryRegex);
|
|
76
95
|
if (userStoryMatch) {
|
|
77
96
|
currentTask.userStory = userStoryMatch[1];
|
|
78
|
-
|
|
97
|
+
matchedAnyField = true;
|
|
79
98
|
}
|
|
80
99
|
const satisfiesACsMatch = line.match(satisfiesACsRegex);
|
|
81
100
|
if (satisfiesACsMatch) {
|
|
@@ -83,24 +102,25 @@ export function parseTasksWithUSLinks(tasksPath) {
|
|
|
83
102
|
currentTask.satisfiesACs = satisfiesACsMatch[1]
|
|
84
103
|
.split(',')
|
|
85
104
|
.map(ac => ac.trim());
|
|
86
|
-
|
|
105
|
+
matchedAnyField = true;
|
|
87
106
|
}
|
|
88
107
|
const statusMatch = line.match(statusRegex);
|
|
89
108
|
if (statusMatch) {
|
|
90
109
|
const checkbox = statusMatch[1];
|
|
91
|
-
|
|
110
|
+
// statusMatch[2] is optional (bare `[x]` has no trailing word).
|
|
111
|
+
const statusText = (statusMatch[2] ?? '').toLowerCase();
|
|
92
112
|
currentTask.status = parseTaskStatus(checkbox, statusText);
|
|
93
|
-
|
|
113
|
+
matchedAnyField = true;
|
|
94
114
|
}
|
|
95
115
|
const priorityMatch = line.match(priorityRegex);
|
|
96
116
|
if (priorityMatch) {
|
|
97
|
-
currentTask.priority = priorityMatch[1];
|
|
98
|
-
|
|
117
|
+
currentTask.priority = priorityMatch[1].trim();
|
|
118
|
+
matchedAnyField = true;
|
|
99
119
|
}
|
|
100
120
|
const estimatedEffortMatch = line.match(estimatedEffortRegex);
|
|
101
121
|
if (estimatedEffortMatch) {
|
|
102
|
-
currentTask.estimatedEffort = estimatedEffortMatch[1];
|
|
103
|
-
|
|
122
|
+
currentTask.estimatedEffort = estimatedEffortMatch[1].trim();
|
|
123
|
+
matchedAnyField = true;
|
|
104
124
|
}
|
|
105
125
|
const dependenciesMatch = line.match(dependenciesRegex);
|
|
106
126
|
if (dependenciesMatch) {
|
|
@@ -109,8 +129,10 @@ export function parseTasksWithUSLinks(tasksPath) {
|
|
|
109
129
|
.split(',')
|
|
110
130
|
.map(dep => dep.trim())
|
|
111
131
|
.filter(dep => dep.match(/^T-\d{3,}$/));
|
|
112
|
-
|
|
132
|
+
matchedAnyField = true;
|
|
113
133
|
}
|
|
134
|
+
if (matchedAnyField)
|
|
135
|
+
continue;
|
|
114
136
|
// Track sections for description parsing
|
|
115
137
|
if (line.startsWith('**Description**:')) {
|
|
116
138
|
currentSection = 'description';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-parser.js","sourceRoot":"","sources":["../../../../src/generators/spec/task-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAgElC;;GAEG;AACH,SAAS,eAAe,CAAC,QAAgB,EAAE,UAAkB;IAC3D,IAAI,QAAQ,KAAK,GAAG;QAAE,OAAO,WAAW,CAAC;IACzC,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,aAAa,CAAC;IAC1D,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,aAAa,CAAC;IAC1D,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,UAAU,CAAC;IACrD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAAiB;IACrD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjD,MAAM,KAAK,GAAqB,EAAE,CAAC;QAEnC,oDAAoD;QACpD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAElC,6EAA6E;QAC7E,4DAA4D;QAC5D,MAAM,eAAe,GAAG,8BAA8B,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|
|
|
1
1
|
{
|
|
2
2
|
"name": "specweave",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.587",
|
|
4
4
|
"description": "100+ domain-expert AI skills — PM, Architect, Frontend, QA, Security and more. Skills learn your team's patterns permanently. Spec-first planning, autonomous execution, multi-agent teams, synced to GitHub/JIRA. Claude Code, Cursor, Copilot & more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Write a portable, secret-scrubbed work handoff doc so you can continue this work in any AI tool. Use when saying "handoff", "running out of tokens", "switch to Codex/OpenCode/Gemini/Cursor", "continue elsewhere", or "continue on another machine".
|
|
3
|
+
argument-hint: "[incrementId] [--reason ...] [--summary ...] [--next ...] [--gotcha ...] [--decision ...] [--inline]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Work Handoff (Cross-Tool)
|
|
7
|
+
|
|
8
|
+
Assemble the current work state into one portable, self-contained handoff document so the work can be picked up in another AI coding tool — Claude Code, Codex, OpenCode, Gemini, Antigravity, Cursor, Aider — picking up exactly where you left off, uncommitted edits and all.
|
|
9
|
+
|
|
10
|
+
The expensive, deterministic work (workspace detection, task/AC parsing, git capture, full-diff dump, secret scrub, rendering) is done by the `specweave handoff` CLI subcommand. This command is a thin wrapper that runs it and surfaces the output.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
- You are low on subscription tokens and want to continue in another tool.
|
|
15
|
+
- You want a durable artifact that survives a context crash.
|
|
16
|
+
- You are moving to another machine (`--inline` embeds the full doc in the paste-prompt).
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Step 1: Run the CLI
|
|
21
|
+
|
|
22
|
+
Pass through whatever short context the agent can supply cheaply. All flags are optional — the CLI derives everything it can from disk.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
specweave handoff $ARGUMENTS
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`$ARGUMENTS` forwards `[incrementId]` plus any `--reason`, `--summary`, `--next`, `--gotcha`, `--decision`, and `--inline` flags the user (or agent) provided.
|
|
29
|
+
|
|
30
|
+
- No `incrementId` and exactly one active increment → it is used automatically.
|
|
31
|
+
- No active increment → a git + interview handoff is written (still portable).
|
|
32
|
+
- 2+ active increments and no `incrementId` → the CLI errors listing the candidate ids; re-run with the chosen id.
|
|
33
|
+
|
|
34
|
+
### Step 2: Surface the output VERBATIM, in order
|
|
35
|
+
|
|
36
|
+
The CLI prints, in this exact order — present it to the user without reordering:
|
|
37
|
+
|
|
38
|
+
1. **The absolute doc path as plain text** (so it is copyable/clickable in any terminal).
|
|
39
|
+
2. A clickable markdown link to the doc.
|
|
40
|
+
3. The `.diff` path holding the exact uncommitted edits.
|
|
41
|
+
4. A fenced copy-paste **resume prompt** to drop into the next tool.
|
|
42
|
+
5. Per-tool "find your source session" tips (Claude `claude -r <uuid>`, Codex `codex resume <uuid>`, OpenCode `opencode -s <id>`, etc.).
|
|
43
|
+
|
|
44
|
+
Do NOT re-summarize or reformat the resume prompt — the user copies it as-is.
|
|
45
|
+
|
|
46
|
+
### Step 3: Note the safety defaults
|
|
47
|
+
|
|
48
|
+
The doc and diff are **secret-scrubbed and gitignored by default** (`.handoff/` or `.specweave/state/handoff-latest.*`). Scrubbing is heuristic — remind the user to review before sharing. Nothing is committed and no `git add` hint is printed.
|
|
49
|
+
|
|
50
|
+
## Related
|
|
51
|
+
|
|
52
|
+
- `sw:progress` — check increment status without writing a handoff.
|
|
53
|
+
- `sw:next` — close the current increment and suggest next work.
|
|
54
|
+
- The portable doc format and cross-tool resume matrix: see the `handoff` skill and `docs/guides/cross-tool-handoff.md`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function isLikelyAccessError(raw) {
|
|
2
|
+
if (!raw) return false;
|
|
3
|
+
return /\bHTTP 4(0[134])\b|\b4(0[134])\b|not found|forbidden|resource not accessible|must have admin|permission/i.test(
|
|
4
|
+
raw
|
|
5
|
+
);
|
|
6
|
+
}
|
|
7
|
+
function explainGitHubAccessError(rawError, facts) {
|
|
8
|
+
if (!isLikelyAccessError(rawError)) return null;
|
|
9
|
+
const { login, canPush, owner, repo } = facts;
|
|
10
|
+
if (canPush === true) return null;
|
|
11
|
+
const who = login ? `The GitHub token in .env belongs to account '${login}', which has no write access to ${owner}/${repo}.` : `The GitHub token in .env is invalid or expired \u2014 its account could not be resolved.`;
|
|
12
|
+
return [
|
|
13
|
+
who,
|
|
14
|
+
`GitHub returns 404 (not 403) when a token's account cannot see a repo, which is why this looked like "Not Found".`,
|
|
15
|
+
`Fix: point GITHUB_TOKEN / GH_TOKEN in .env at a token whose account can write ${owner}/${repo}, or run \`gh auth login\` with the right account.`,
|
|
16
|
+
`Original error: ${rawError.trim()}`
|
|
17
|
+
].join("\n");
|
|
18
|
+
}
|
|
19
|
+
async function resolveGitHubAccessFacts(exec, env, owner, repo) {
|
|
20
|
+
let login = null;
|
|
21
|
+
try {
|
|
22
|
+
const u = await exec("gh", ["api", "user", "--jq", ".login"], { env });
|
|
23
|
+
if (u.exitCode === 0) login = u.stdout.trim() || null;
|
|
24
|
+
} catch {
|
|
25
|
+
}
|
|
26
|
+
let canPush = null;
|
|
27
|
+
try {
|
|
28
|
+
const r = await exec(
|
|
29
|
+
"gh",
|
|
30
|
+
["api", `repos/${owner}/${repo}`, "--jq", ".permissions.push // false"],
|
|
31
|
+
{ env }
|
|
32
|
+
);
|
|
33
|
+
if (r.exitCode === 0) canPush = r.stdout.trim() === "true";
|
|
34
|
+
else canPush = false;
|
|
35
|
+
} catch {
|
|
36
|
+
}
|
|
37
|
+
return { login, canPush };
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
explainGitHubAccessError,
|
|
41
|
+
isLikelyAccessError,
|
|
42
|
+
resolveGitHubAccessFacts
|
|
43
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnose GitHub "create" failures that are really auth/access problems.
|
|
3
|
+
*
|
|
4
|
+
* GitHub returns **404 Not Found** (not 403) when a token's account cannot even
|
|
5
|
+
* SEE a repo — so a token in `.env` whose account lacks write access to the
|
|
6
|
+
* target repo surfaces as a confusing `gh: Not Found (HTTP 404)` at
|
|
7
|
+
* issue/milestone create. This module turns that into a clear, actionable error
|
|
8
|
+
* naming the token's account and the repo it can't write.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export interface GitHubAccessFacts {
|
|
12
|
+
/** Login of the account the token belongs to, or null if the token is invalid. */
|
|
13
|
+
login: string | null;
|
|
14
|
+
/** Whether that account can push to owner/repo; null when it couldn't be determined. */
|
|
15
|
+
canPush: boolean | null;
|
|
16
|
+
owner: string;
|
|
17
|
+
repo: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Minimal exec-result shape (matches execFileNoThrow / execWithBudget). */
|
|
21
|
+
export interface ExecResult {
|
|
22
|
+
stdout: string;
|
|
23
|
+
stderr: string;
|
|
24
|
+
exitCode: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type ExecFn = (
|
|
28
|
+
command: string,
|
|
29
|
+
args: string[],
|
|
30
|
+
options?: { env?: NodeJS.ProcessEnv },
|
|
31
|
+
) => Promise<ExecResult>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* True if a gh CLI error string looks like an access/permission failure.
|
|
35
|
+
* 404 Not Found is included on purpose: GitHub masks "no access" as 404.
|
|
36
|
+
*/
|
|
37
|
+
export function isLikelyAccessError(raw: string | undefined): boolean {
|
|
38
|
+
if (!raw) return false;
|
|
39
|
+
return /\bHTTP 4(0[134])\b|\b4(0[134])\b|not found|forbidden|resource not accessible|must have admin|permission/i.test(
|
|
40
|
+
raw,
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Build a clear, actionable error message for a failed GitHub create, or null
|
|
46
|
+
* when the failure is not an auth/access problem (callers then fall back to the
|
|
47
|
+
* raw error). Returns null when the token's account demonstrably CAN push, so a
|
|
48
|
+
* genuine missing resource isn't misreported as an auth issue.
|
|
49
|
+
*/
|
|
50
|
+
export function explainGitHubAccessError(
|
|
51
|
+
rawError: string,
|
|
52
|
+
facts: GitHubAccessFacts,
|
|
53
|
+
): string | null {
|
|
54
|
+
if (!isLikelyAccessError(rawError)) return null;
|
|
55
|
+
const { login, canPush, owner, repo } = facts;
|
|
56
|
+
if (canPush === true) return null;
|
|
57
|
+
|
|
58
|
+
const who = login
|
|
59
|
+
? `The GitHub token in .env belongs to account '${login}', which has no write access to ${owner}/${repo}.`
|
|
60
|
+
: `The GitHub token in .env is invalid or expired — its account could not be resolved.`;
|
|
61
|
+
|
|
62
|
+
return [
|
|
63
|
+
who,
|
|
64
|
+
`GitHub returns 404 (not 403) when a token's account cannot see a repo, which is why this looked like "Not Found".`,
|
|
65
|
+
`Fix: point GITHUB_TOKEN / GH_TOKEN in .env at a token whose account can write ${owner}/${repo}, or run \`gh auth login\` with the right account.`,
|
|
66
|
+
`Original error: ${rawError.trim()}`,
|
|
67
|
+
].join('\n');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Resolve the token account's login + whether it can push to owner/repo, using
|
|
72
|
+
* the gh CLI with the same token env the failing call used. Best-effort: any
|
|
73
|
+
* probe that fails leaves its field null/false instead of throwing.
|
|
74
|
+
*/
|
|
75
|
+
export async function resolveGitHubAccessFacts(
|
|
76
|
+
exec: ExecFn,
|
|
77
|
+
env: NodeJS.ProcessEnv | undefined,
|
|
78
|
+
owner: string,
|
|
79
|
+
repo: string,
|
|
80
|
+
): Promise<{ login: string | null; canPush: boolean | null }> {
|
|
81
|
+
let login: string | null = null;
|
|
82
|
+
try {
|
|
83
|
+
const u = await exec('gh', ['api', 'user', '--jq', '.login'], { env });
|
|
84
|
+
if (u.exitCode === 0) login = u.stdout.trim() || null;
|
|
85
|
+
} catch {
|
|
86
|
+
/* leave login null */
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let canPush: boolean | null = null;
|
|
90
|
+
try {
|
|
91
|
+
const r = await exec(
|
|
92
|
+
'gh',
|
|
93
|
+
['api', `repos/${owner}/${repo}`, '--jq', '.permissions.push // false'],
|
|
94
|
+
{ env },
|
|
95
|
+
);
|
|
96
|
+
if (r.exitCode === 0) canPush = r.stdout.trim() === 'true';
|
|
97
|
+
else canPush = false; // 404/403 on the repo itself → no access
|
|
98
|
+
} catch {
|
|
99
|
+
/* leave canPush null */
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return { login, canPush };
|
|
103
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { execFileNoThrow } from "../../vendor/utils/execFileNoThrow.js";
|
|
2
|
+
import { explainGitHubAccessError, resolveGitHubAccessFacts } from "./github-access-error.js";
|
|
2
3
|
import { checkAndDecrement } from "../../../../../src/sync/github-rate-limit-budget.js";
|
|
3
4
|
import { findProjectRoot } from "../../../../../src/utils/find-project-root.js";
|
|
4
5
|
const _GitHubClientV2 = class _GitHubClientV2 {
|
|
@@ -29,6 +30,27 @@ const _GitHubClientV2 = class _GitHubClientV2 {
|
|
|
29
30
|
getGhEnv() {
|
|
30
31
|
return this.token ? { ...process.env, GH_TOKEN: this.token } : process.env;
|
|
31
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Turn a failed `gh` create result into a clear error.
|
|
35
|
+
*
|
|
36
|
+
* When the failure looks like an auth/access problem (notably a 404 masking a
|
|
37
|
+
* wrong-account token in .env), resolve the token's account + write access and
|
|
38
|
+
* explain exactly what to fix; otherwise fall back to the raw gh error.
|
|
39
|
+
*/
|
|
40
|
+
async buildCreateError(action, rawError) {
|
|
41
|
+
try {
|
|
42
|
+
const facts = await resolveGitHubAccessFacts(
|
|
43
|
+
execFileNoThrow,
|
|
44
|
+
this.getGhEnv(),
|
|
45
|
+
this.owner,
|
|
46
|
+
this.repo
|
|
47
|
+
);
|
|
48
|
+
const explained = explainGitHubAccessError(rawError, { ...facts, owner: this.owner, repo: this.repo });
|
|
49
|
+
if (explained) return new Error(`Failed to ${action}: ${explained}`);
|
|
50
|
+
} catch {
|
|
51
|
+
}
|
|
52
|
+
return new Error(`Failed to ${action}: ${rawError}`);
|
|
53
|
+
}
|
|
32
54
|
/**
|
|
33
55
|
* Set the project root for rate-limit budget tracking.
|
|
34
56
|
* When set, all API calls check the shared budget before executing.
|
|
@@ -153,7 +175,7 @@ const _GitHubClientV2 = class _GitHubClientV2 {
|
|
|
153
175
|
}
|
|
154
176
|
const result = await this.execWithBudget("gh", args, { env: this.getGhEnv() });
|
|
155
177
|
if (result.exitCode !== 0) {
|
|
156
|
-
throw
|
|
178
|
+
throw await this.buildCreateError("create milestone", result.stderr || result.stdout);
|
|
157
179
|
}
|
|
158
180
|
return JSON.parse(result.stdout);
|
|
159
181
|
}
|
|
@@ -324,9 +346,7 @@ FIX:
|
|
|
324
346
|
}
|
|
325
347
|
const createResult = await this.execWithBudget("gh", args, { env: this.getGhEnv() });
|
|
326
348
|
if (createResult.exitCode !== 0) {
|
|
327
|
-
throw
|
|
328
|
-
`Failed to create epic issue: ${createResult.stderr || createResult.stdout}`
|
|
329
|
-
);
|
|
349
|
+
throw await this.buildCreateError("create issue", createResult.stderr || createResult.stdout);
|
|
330
350
|
}
|
|
331
351
|
const issueUrl = createResult.stdout.trim();
|
|
332
352
|
const issueNumber = parseInt(issueUrl.split("/").pop() || "0", 10);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { execFileNoThrow } from '../../vendor/utils/execFileNoThrow.js';
|
|
12
|
+
import { explainGitHubAccessError, resolveGitHubAccessFacts } from './github-access-error.js';
|
|
12
13
|
import { GitHubIssue, GitHubMilestone, GitHubExternalChange } from './types';
|
|
13
14
|
import { SyncProfile, GitHubConfig, TimeRangePreset } from '../../../../../src/core/types/sync-profile';
|
|
14
15
|
import { checkAndDecrement } from '../../../../../src/sync/github-rate-limit-budget.js';
|
|
@@ -58,6 +59,29 @@ export class GitHubClientV2 {
|
|
|
58
59
|
: process.env;
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Turn a failed `gh` create result into a clear error.
|
|
64
|
+
*
|
|
65
|
+
* When the failure looks like an auth/access problem (notably a 404 masking a
|
|
66
|
+
* wrong-account token in .env), resolve the token's account + write access and
|
|
67
|
+
* explain exactly what to fix; otherwise fall back to the raw gh error.
|
|
68
|
+
*/
|
|
69
|
+
private async buildCreateError(action: string, rawError: string): Promise<Error> {
|
|
70
|
+
try {
|
|
71
|
+
const facts = await resolveGitHubAccessFacts(
|
|
72
|
+
execFileNoThrow,
|
|
73
|
+
this.getGhEnv(),
|
|
74
|
+
this.owner,
|
|
75
|
+
this.repo,
|
|
76
|
+
);
|
|
77
|
+
const explained = explainGitHubAccessError(rawError, { ...facts, owner: this.owner, repo: this.repo });
|
|
78
|
+
if (explained) return new Error(`Failed to ${action}: ${explained}`);
|
|
79
|
+
} catch {
|
|
80
|
+
/* fall through to the raw error */
|
|
81
|
+
}
|
|
82
|
+
return new Error(`Failed to ${action}: ${rawError}`);
|
|
83
|
+
}
|
|
84
|
+
|
|
61
85
|
/**
|
|
62
86
|
* Set the project root for rate-limit budget tracking.
|
|
63
87
|
* When set, all API calls check the shared budget before executing.
|
|
@@ -221,7 +245,7 @@ export class GitHubClientV2 {
|
|
|
221
245
|
const result = await this.execWithBudget('gh', args, { env: this.getGhEnv() });
|
|
222
246
|
|
|
223
247
|
if (result.exitCode !== 0) {
|
|
224
|
-
throw
|
|
248
|
+
throw await this.buildCreateError('create milestone', result.stderr || result.stdout);
|
|
225
249
|
}
|
|
226
250
|
|
|
227
251
|
return JSON.parse(result.stdout);
|
|
@@ -435,9 +459,7 @@ export class GitHubClientV2 {
|
|
|
435
459
|
const createResult = await this.execWithBudget('gh', args, { env: this.getGhEnv() });
|
|
436
460
|
|
|
437
461
|
if (createResult.exitCode !== 0) {
|
|
438
|
-
throw
|
|
439
|
-
`Failed to create epic issue: ${createResult.stderr || createResult.stdout}`
|
|
440
|
-
);
|
|
462
|
+
throw await this.buildCreateError('create issue', createResult.stderr || createResult.stdout);
|
|
441
463
|
}
|
|
442
464
|
|
|
443
465
|
const issueUrl = createResult.stdout.trim();
|
|
@@ -37,13 +37,27 @@ export function parseTasksWithUSLinks(tasksPath) {
|
|
|
37
37
|
const lines = content.split('\n');
|
|
38
38
|
// Regex patterns for task parsing (T-029: Support E suffix for external IDs)
|
|
39
39
|
// Updated: Support 3+ digits for T-XXX and US-XXX (Y2K fix)
|
|
40
|
+
//
|
|
41
|
+
// 0867: These field regexes are NOT `^`-anchored. The canonical task format
|
|
42
|
+
// combines several fields on ONE line separated by `|`:
|
|
43
|
+
// **User Story**: US-001 | **Satisfies ACs**: AC-US1-01 | **Status**: [x] completed
|
|
44
|
+
// The line is split on `|` and each segment matched independently (see
|
|
45
|
+
// below). Previously these were `^`-anchored and the userStory match
|
|
46
|
+
// early-`continue`d, silently dropping same-line `Satisfies ACs`/`Status` —
|
|
47
|
+
// making every combined-format task read as `pending` (whole-codebase bug).
|
|
48
|
+
// The multi-line format (each `**Field**:` on its own line) still parses
|
|
49
|
+
// because each line is a single segment.
|
|
40
50
|
const taskHeaderRegex = /^###\s+(T-\d{3,}E?):\s*(.+)$/;
|
|
41
|
-
const userStoryRegex =
|
|
42
|
-
const satisfiesACsRegex =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
const userStoryRegex = /\*\*User Story\*\*:\s*(US-\d{3,}E?)/;
|
|
52
|
+
const satisfiesACsRegex = /\*\*Satisfies ACs\*\*:\s*(AC-US\d+E?-\d{2}(?:,\s*AC-US\d+E?-\d{2})*)/;
|
|
53
|
+
// Trailing status word is OPTIONAL: a checkbox-only `**Status**: [x]` is a
|
|
54
|
+
// valid completed task. The checkbox is the source of truth (see
|
|
55
|
+
// parseTaskStatus), so requiring `(\w+)` here would silently under-report a
|
|
56
|
+
// bare-checkbox task as pending — the same drop-class T-019 fixed.
|
|
57
|
+
const statusRegex = /\*\*Status\*\*:\s*\[([x ])\]\s*(\w+)?/;
|
|
58
|
+
const priorityRegex = /\*\*Priority\*\*:\s*([^|]+)/;
|
|
59
|
+
const estimatedEffortRegex = /\*\*Estimated Effort\*\*:\s*([^|]+)/;
|
|
60
|
+
const dependenciesRegex = /\*\*Dependencies\*\*:\s*([^|]+)/;
|
|
47
61
|
let currentTask = null;
|
|
48
62
|
let currentDescription = [];
|
|
49
63
|
let currentSection = 'none';
|
|
@@ -71,11 +85,16 @@ export function parseTasksWithUSLinks(tasksPath) {
|
|
|
71
85
|
// Skip if no current task
|
|
72
86
|
if (!currentTask)
|
|
73
87
|
continue;
|
|
74
|
-
// Parse task fields
|
|
88
|
+
// Parse task fields. A single line may carry MULTIPLE `**Field**:`
|
|
89
|
+
// segments separated by `|`, so we extract EVERY recognized field from
|
|
90
|
+
// the line instead of early-`continue`ing after the first match. The
|
|
91
|
+
// regexes are unanchored (above), and value-capturing fields stop at `|`
|
|
92
|
+
// so a later segment's value isn't swallowed.
|
|
93
|
+
let matchedAnyField = false;
|
|
75
94
|
const userStoryMatch = line.match(userStoryRegex);
|
|
76
95
|
if (userStoryMatch) {
|
|
77
96
|
currentTask.userStory = userStoryMatch[1];
|
|
78
|
-
|
|
97
|
+
matchedAnyField = true;
|
|
79
98
|
}
|
|
80
99
|
const satisfiesACsMatch = line.match(satisfiesACsRegex);
|
|
81
100
|
if (satisfiesACsMatch) {
|
|
@@ -83,24 +102,25 @@ export function parseTasksWithUSLinks(tasksPath) {
|
|
|
83
102
|
currentTask.satisfiesACs = satisfiesACsMatch[1]
|
|
84
103
|
.split(',')
|
|
85
104
|
.map(ac => ac.trim());
|
|
86
|
-
|
|
105
|
+
matchedAnyField = true;
|
|
87
106
|
}
|
|
88
107
|
const statusMatch = line.match(statusRegex);
|
|
89
108
|
if (statusMatch) {
|
|
90
109
|
const checkbox = statusMatch[1];
|
|
91
|
-
|
|
110
|
+
// statusMatch[2] is optional (bare `[x]` has no trailing word).
|
|
111
|
+
const statusText = (statusMatch[2] ?? '').toLowerCase();
|
|
92
112
|
currentTask.status = parseTaskStatus(checkbox, statusText);
|
|
93
|
-
|
|
113
|
+
matchedAnyField = true;
|
|
94
114
|
}
|
|
95
115
|
const priorityMatch = line.match(priorityRegex);
|
|
96
116
|
if (priorityMatch) {
|
|
97
|
-
currentTask.priority = priorityMatch[1];
|
|
98
|
-
|
|
117
|
+
currentTask.priority = priorityMatch[1].trim();
|
|
118
|
+
matchedAnyField = true;
|
|
99
119
|
}
|
|
100
120
|
const estimatedEffortMatch = line.match(estimatedEffortRegex);
|
|
101
121
|
if (estimatedEffortMatch) {
|
|
102
|
-
currentTask.estimatedEffort = estimatedEffortMatch[1];
|
|
103
|
-
|
|
122
|
+
currentTask.estimatedEffort = estimatedEffortMatch[1].trim();
|
|
123
|
+
matchedAnyField = true;
|
|
104
124
|
}
|
|
105
125
|
const dependenciesMatch = line.match(dependenciesRegex);
|
|
106
126
|
if (dependenciesMatch) {
|
|
@@ -109,8 +129,10 @@ export function parseTasksWithUSLinks(tasksPath) {
|
|
|
109
129
|
.split(',')
|
|
110
130
|
.map(dep => dep.trim())
|
|
111
131
|
.filter(dep => dep.match(/^T-\d{3,}$/));
|
|
112
|
-
|
|
132
|
+
matchedAnyField = true;
|
|
113
133
|
}
|
|
134
|
+
if (matchedAnyField)
|
|
135
|
+
continue;
|
|
114
136
|
// Track sections for description parsing
|
|
115
137
|
if (line.startsWith('**Description**:')) {
|
|
116
138
|
currentSection = 'description';
|