@aperant/framework 0.10.0 → 0.12.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/CHANGELOG.md +236 -1
- package/agents/apt-planner.md +15 -0
- package/agents/apt-verifier.md +15 -10
- package/bin/apt-proof-video.mjs +256 -76
- package/dist/cli/commands/apply-recipe.d.mts +6 -0
- package/dist/cli/commands/apply-recipe.d.mts.map +1 -0
- package/dist/cli/commands/apply-recipe.mjs +98 -0
- package/dist/cli/commands/apply-recipe.mjs.map +1 -0
- package/dist/cli/commands/catch-up.d.mts +9 -0
- package/dist/cli/commands/catch-up.d.mts.map +1 -0
- package/dist/cli/commands/catch-up.mjs +64 -0
- package/dist/cli/commands/catch-up.mjs.map +1 -0
- package/dist/cli/commands/mobile-prepare.d.mts +53 -0
- package/dist/cli/commands/mobile-prepare.d.mts.map +1 -0
- package/dist/cli/commands/mobile-prepare.mjs +139 -0
- package/dist/cli/commands/mobile-prepare.mjs.map +1 -0
- package/dist/cli/commands/pr-review.d.mts +16 -4
- package/dist/cli/commands/pr-review.d.mts.map +1 -1
- package/dist/cli/commands/pr-review.mjs +30 -11
- package/dist/cli/commands/pr-review.mjs.map +1 -1
- package/dist/cli/commands/recipe-diff.d.mts +6 -0
- package/dist/cli/commands/recipe-diff.d.mts.map +1 -0
- package/dist/cli/commands/recipe-diff.mjs +75 -0
- package/dist/cli/commands/recipe-diff.mjs.map +1 -0
- package/dist/cli/commands/roadmap.d.mts.map +1 -1
- package/dist/cli/commands/roadmap.mjs +53 -0
- package/dist/cli/commands/roadmap.mjs.map +1 -1
- package/dist/cli/commands/route.d.mts.map +1 -1
- package/dist/cli/commands/route.mjs +92 -2
- package/dist/cli/commands/route.mjs.map +1 -1
- package/dist/cli/commands/verify-sandbox.d.mts +6 -0
- package/dist/cli/commands/verify-sandbox.d.mts.map +1 -0
- package/dist/cli/commands/verify-sandbox.mjs +200 -0
- package/dist/cli/commands/verify-sandbox.mjs.map +1 -0
- package/dist/cli/config/share-policy.d.mts.map +1 -1
- package/dist/cli/config/share-policy.mjs +1 -0
- package/dist/cli/config/share-policy.mjs.map +1 -1
- package/dist/cli/config/upgrade-gitignore.d.mts.map +1 -1
- package/dist/cli/config/upgrade-gitignore.mjs +1 -0
- package/dist/cli/config/upgrade-gitignore.mjs.map +1 -1
- package/dist/cli/consistency/parse-qa.d.mts.map +1 -1
- package/dist/cli/consistency/parse-qa.mjs +18 -4
- package/dist/cli/consistency/parse-qa.mjs.map +1 -1
- package/dist/cli/consistency/rules/r5-verdict-consistency.d.mts.map +1 -1
- package/dist/cli/consistency/rules/r5-verdict-consistency.mjs +11 -10
- package/dist/cli/consistency/rules/r5-verdict-consistency.mjs.map +1 -1
- package/dist/cli/coordination/catch-up.d.mts +26 -0
- package/dist/cli/coordination/catch-up.d.mts.map +1 -0
- package/dist/cli/coordination/catch-up.mjs +239 -0
- package/dist/cli/coordination/catch-up.mjs.map +1 -0
- package/dist/cli/coordination/last-seen.d.mts +45 -0
- package/dist/cli/coordination/last-seen.d.mts.map +1 -0
- package/dist/cli/coordination/last-seen.mjs +128 -0
- package/dist/cli/coordination/last-seen.mjs.map +1 -0
- package/dist/cli/coordination/store.d.mts +15 -0
- package/dist/cli/coordination/store.d.mts.map +1 -1
- package/dist/cli/coordination/store.mjs +16 -0
- package/dist/cli/coordination/store.mjs.map +1 -1
- package/dist/cli/coverage-check/user-outcomes.d.mts +7 -2
- package/dist/cli/coverage-check/user-outcomes.d.mts.map +1 -1
- package/dist/cli/coverage-check/user-outcomes.mjs +50 -17
- package/dist/cli/coverage-check/user-outcomes.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +30 -0
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/gate/gates/verify-approved.d.mts +0 -48
- package/dist/cli/gate/gates/verify-approved.d.mts.map +1 -1
- package/dist/cli/gate/gates/verify-approved.mjs +23 -80
- package/dist/cli/gate/gates/verify-approved.mjs.map +1 -1
- package/dist/cli/git/default-branch.d.mts +51 -0
- package/dist/cli/git/default-branch.d.mts.map +1 -0
- package/dist/cli/git/default-branch.mjs +234 -0
- package/dist/cli/git/default-branch.mjs.map +1 -0
- package/dist/cli/git/identity.d.mts +3 -5
- package/dist/cli/git/identity.d.mts.map +1 -1
- package/dist/cli/git/identity.mjs +10 -4
- package/dist/cli/git/identity.mjs.map +1 -1
- package/dist/cli/install/legacy-paths.d.mts.map +1 -1
- package/dist/cli/install/legacy-paths.mjs +2 -0
- package/dist/cli/install/legacy-paths.mjs.map +1 -1
- package/dist/cli/install/mcp-server-specs.d.mts +6 -5
- package/dist/cli/install/mcp-server-specs.d.mts.map +1 -1
- package/dist/cli/install/mcp-server-specs.mjs +22 -4
- package/dist/cli/install/mcp-server-specs.mjs.map +1 -1
- package/dist/cli/roadmap/backend-adapter.d.mts +43 -0
- package/dist/cli/roadmap/backend-adapter.d.mts.map +1 -0
- package/dist/cli/roadmap/backend-adapter.mjs +222 -0
- package/dist/cli/roadmap/backend-adapter.mjs.map +1 -0
- package/dist/cli/util/runtime-capabilities.d.mts +7 -0
- package/dist/cli/util/runtime-capabilities.d.mts.map +1 -1
- package/dist/cli/util/runtime-capabilities.mjs +65 -0
- package/dist/cli/util/runtime-capabilities.mjs.map +1 -1
- package/dist/cli/verify-proof/manifest-validator.mjs +13 -0
- package/dist/cli/verify-proof/manifest-validator.mjs.map +1 -1
- package/dist/cli/verify-proof/resolver.d.mts +10 -7
- package/dist/cli/verify-proof/resolver.d.mts.map +1 -1
- package/dist/cli/verify-proof/resolver.mjs +28 -7
- package/dist/cli/verify-proof/resolver.mjs.map +1 -1
- package/dist/cli/verify-proof/sandbox/apply.d.mts +64 -0
- package/dist/cli/verify-proof/sandbox/apply.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/apply.mjs +379 -0
- package/dist/cli/verify-proof/sandbox/apply.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/gate-predicate.d.mts +63 -0
- package/dist/cli/verify-proof/sandbox/gate-predicate.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/gate-predicate.mjs +115 -0
- package/dist/cli/verify-proof/sandbox/gate-predicate.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/pattern-matcher.d.mts +57 -0
- package/dist/cli/verify-proof/sandbox/pattern-matcher.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/pattern-matcher.mjs +124 -0
- package/dist/cli/verify-proof/sandbox/pattern-matcher.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/recipe-diff.d.mts +28 -0
- package/dist/cli/verify-proof/sandbox/recipe-diff.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/recipe-diff.mjs +190 -0
- package/dist/cli/verify-proof/sandbox/recipe-diff.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/sandbox-config.d.mts +25 -0
- package/dist/cli/verify-proof/sandbox/sandbox-config.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/sandbox-config.mjs +85 -0
- package/dist/cli/verify-proof/sandbox/sandbox-config.mjs.map +1 -0
- package/dist/cli/verify-proof/sandbox/self-test.d.mts +39 -0
- package/dist/cli/verify-proof/sandbox/self-test.d.mts.map +1 -0
- package/dist/cli/verify-proof/sandbox/self-test.mjs +248 -0
- package/dist/cli/verify-proof/sandbox/self-test.mjs.map +1 -0
- package/dist/plugin/.claude-plugin/plugin.json +2 -1
- package/dist/plugin/agents/apt-planner.md +15 -0
- package/dist/plugin/agents/apt-verifier.md +15 -10
- package/dist/plugin/skills/apt/SKILL.md +29 -0
- package/dist/plugin/skills/apt-catch-up/SKILL.md +79 -0
- package/dist/plugin/skills/apt-plan/SKILL.md +23 -0
- package/dist/plugin/skills/apt-pr-review/SKILL.md +5 -4
- package/dist/plugin/skills/apt-run/SKILL.md +1 -1
- package/dist/plugin/skills/apt-setup/SKILL.md +132 -0
- package/dist/plugin/skills/apt-verify/SKILL.md +20 -15
- package/dist/plugin/skills/apt-verify-proof/SKILL.md +146 -11
- package/dist/proof-report.d.ts.map +1 -1
- package/dist/proof-report.js +4 -1
- package/dist/proof-report.js.map +1 -1
- package/dist/types/config.d.ts +42 -4
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/qa-scoring.d.ts +45 -9
- package/dist/types/qa-scoring.d.ts.map +1 -1
- package/dist/types/qa-scoring.js +34 -13
- package/dist/types/qa-scoring.js.map +1 -1
- package/dist/types/state.d.ts +7 -2
- package/dist/types/state.d.ts.map +1 -1
- package/dist/types/task-record.d.ts +10 -2
- package/dist/types/task-record.d.ts.map +1 -1
- package/drivers/mobile/README.md +40 -0
- package/drivers/mobile/driver.mjs +106 -0
- package/drivers/mobile/manifest.json +49 -0
- package/package.json +1 -1
- package/prompts/inbox-clarification.md +11 -0
- package/prompts/inbox-triage.md +20 -0
- package/prompts/qa_orchestrator_agentic.md +18 -17
- package/prompts/qa_reviewer.md +17 -15
- package/skills/apt/SKILL.md +29 -0
- package/skills/apt-catch-up/SKILL.md +79 -0
- package/skills/apt-plan/SKILL.md +23 -0
- package/skills/apt-pr-review/SKILL.md +5 -4
- package/skills/apt-run/SKILL.md +1 -1
- package/skills/apt-setup/SKILL.md +132 -0
- package/skills/apt-verifier.md +7 -4
- package/skills/apt-verify/SKILL.md +20 -15
- package/skills/apt-verify-proof/SKILL.md +146 -11
- package/src/cli/commands/apply-recipe.mjs +105 -0
- package/src/cli/commands/catch-up.mjs +67 -0
- package/src/cli/commands/mobile-prepare.mjs +151 -0
- package/src/cli/commands/pr-review.mjs +32 -11
- package/src/cli/commands/recipe-diff.mjs +81 -0
- package/src/cli/commands/roadmap.mjs +54 -0
- package/src/cli/commands/route.mjs +92 -1
- package/src/cli/commands/verify-sandbox.mjs +231 -0
- package/src/cli/config/share-policy.mjs +1 -0
- package/src/cli/config/upgrade-gitignore.mjs +1 -0
- package/src/cli/consistency/parse-qa.mjs +20 -4
- package/src/cli/consistency/rules/r5-verdict-consistency.mjs +11 -13
- package/src/cli/coordination/catch-up.mjs +231 -0
- package/src/cli/coordination/last-seen.mjs +131 -0
- package/src/cli/coordination/store.mjs +18 -0
- package/src/cli/coverage-check/user-outcomes.mjs +52 -17
- package/src/cli/dispatch.mjs +29 -0
- package/src/cli/gate/gates/verify-approved.mjs +22 -81
- package/src/cli/git/default-branch.mjs +250 -0
- package/src/cli/git/identity.mjs +9 -3
- package/src/cli/install/legacy-paths.mjs +2 -0
- package/src/cli/install/mcp-server-specs.mjs +24 -4
- package/src/cli/roadmap/backend-adapter.mjs +231 -0
- package/src/cli/util/runtime-capabilities.mjs +67 -0
- package/src/cli/verify-proof/manifest-validator.mjs +15 -0
- package/src/cli/verify-proof/resolver.mjs +27 -7
- package/src/cli/verify-proof/sandbox/apply.mjs +401 -0
- package/src/cli/verify-proof/sandbox/gate-predicate.mjs +126 -0
- package/src/cli/verify-proof/sandbox/pattern-matcher.mjs +127 -0
- package/src/cli/verify-proof/sandbox/recipe-diff.mjs +208 -0
- package/src/cli/verify-proof/sandbox/sandbox-config.mjs +82 -0
- package/src/cli/verify-proof/sandbox/sandbox-schema.json +33 -0
- package/src/cli/verify-proof/sandbox/self-test.mjs +265 -0
- package/templates/config.json +21 -1
- package/templates/proof-verification.md +27 -8
- package/workflows/verify-proof.md +376 -302
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git/default-branch.mjs — local default-branch resolution + merged-PR parsing
|
|
3
|
+
* for the Team-Change Digest (LD-03/04/05).
|
|
4
|
+
*
|
|
5
|
+
* Pure git helpers (no .aperant IO). Every git call uses the no-throw
|
|
6
|
+
* execFileSync pattern from git/remote.mjs (stdio ['ignore','pipe','ignore'])
|
|
7
|
+
* so a non-git dir / unresolvable ref returns null instead of throwing.
|
|
8
|
+
*
|
|
9
|
+
* The resolver reads the LOCAL default-branch ref only — it NEVER calls
|
|
10
|
+
* `git fetch`. The digest surfaces work the user has actually pulled, not
|
|
11
|
+
* unfetched server state (ADR Consequences ¶1).
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
import { execFileSync } from 'node:child_process';
|
|
16
|
+
/**
|
|
17
|
+
* Run a git command, returning trimmed stdout or null on any error.
|
|
18
|
+
* @param {string} targetDir
|
|
19
|
+
* @param {string[]} args
|
|
20
|
+
* @returns {string|null}
|
|
21
|
+
*/
|
|
22
|
+
function git(targetDir, args) {
|
|
23
|
+
try {
|
|
24
|
+
return execFileSync('git', args, {
|
|
25
|
+
cwd: targetDir,
|
|
26
|
+
encoding: 'utf-8',
|
|
27
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
28
|
+
}).trim();
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the local default-branch ref, with its current sha. Resolution order:
|
|
36
|
+
* 1. `git symbolic-ref refs/remotes/origin/HEAD` (strip the
|
|
37
|
+
* 'refs/remotes/origin/' prefix);
|
|
38
|
+
* 2. `git config init.defaultBranch`;
|
|
39
|
+
* 3. existence check of `main` then `master` via `git rev-parse --verify`.
|
|
40
|
+
*
|
|
41
|
+
* NEVER fetches. Returns null outside a git repo or when nothing resolves.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} targetDir
|
|
44
|
+
* @returns {{ branch: string, sha: string }|null}
|
|
45
|
+
*/
|
|
46
|
+
export function resolveLocalDefaultBranch(targetDir) {
|
|
47
|
+
// Fast bail when not a git repo.
|
|
48
|
+
if (git(targetDir, ['rev-parse', '--git-dir']) === null)
|
|
49
|
+
return null;
|
|
50
|
+
let branch = null;
|
|
51
|
+
// (1) origin/HEAD symbolic-ref — the authoritative "what main points at".
|
|
52
|
+
const originHead = git(targetDir, ['symbolic-ref', 'refs/remotes/origin/HEAD']);
|
|
53
|
+
if (originHead?.startsWith('refs/remotes/origin/')) {
|
|
54
|
+
branch = originHead.slice('refs/remotes/origin/'.length);
|
|
55
|
+
}
|
|
56
|
+
// (2) init.defaultBranch config.
|
|
57
|
+
if (!branch) {
|
|
58
|
+
const configured = git(targetDir, ['config', 'init.defaultBranch']);
|
|
59
|
+
if (configured)
|
|
60
|
+
branch = configured;
|
|
61
|
+
}
|
|
62
|
+
// (3) existence check main → master.
|
|
63
|
+
if (!branch) {
|
|
64
|
+
for (const candidate of ['main', 'master']) {
|
|
65
|
+
if (git(targetDir, ['rev-parse', '--verify', '--quiet', candidate]) !== null) {
|
|
66
|
+
branch = candidate;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (!branch)
|
|
72
|
+
return null;
|
|
73
|
+
const sha = git(targetDir, ['rev-parse', branch]);
|
|
74
|
+
if (!sha)
|
|
75
|
+
return null;
|
|
76
|
+
return { branch, sha };
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Parse a PR number + title from a merge-commit subject/body.
|
|
80
|
+
*
|
|
81
|
+
* GitHub merge-commit format:
|
|
82
|
+
* subject: "Merge pull request #N from owner/branch"
|
|
83
|
+
* body: "<PR title>" (first non-empty body line)
|
|
84
|
+
* Squash-merge format:
|
|
85
|
+
* subject: "<PR title> (#N)"
|
|
86
|
+
*
|
|
87
|
+
* @param {string} subject
|
|
88
|
+
* @param {string} body
|
|
89
|
+
* @returns {{ number: number, title: string }|null}
|
|
90
|
+
*/
|
|
91
|
+
function parsePullRequest(subject, body) {
|
|
92
|
+
const mergeMatch = subject.match(/^Merge pull request #(\d+) from /);
|
|
93
|
+
if (mergeMatch) {
|
|
94
|
+
const number = Number(mergeMatch[1]);
|
|
95
|
+
const firstBodyLine = (body || '')
|
|
96
|
+
.split('\n')
|
|
97
|
+
.map((l) => l.trim())
|
|
98
|
+
.find((l) => l.length > 0);
|
|
99
|
+
return { number, title: firstBodyLine || subject };
|
|
100
|
+
}
|
|
101
|
+
// GitHub squash-merge convention: greedy `(.*)` captures the longest prefix
|
|
102
|
+
// so titles with parentheses (e.g. "feat(core): ...") are handled correctly.
|
|
103
|
+
const squashMatch = subject.match(/^(.*)\s\(#(\d+)\)\s*$/);
|
|
104
|
+
if (squashMatch) {
|
|
105
|
+
return { number: Number(squashMatch[2]), title: squashMatch[1].trim() };
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Resolve both the introduced-commit author emails (LD-05) and a display name
|
|
111
|
+
* from a single `git log` call per merge. Replaces the former separate
|
|
112
|
+
* `introducedAuthorEmails` + `pickAuthorName` pair (PRF-002).
|
|
113
|
+
*
|
|
114
|
+
* @param {string} targetDir
|
|
115
|
+
* @param {string[]} parents parent shas of the merge commit
|
|
116
|
+
* @param {string} authorEmail the merge commit's own author email
|
|
117
|
+
* @param {string} currentUserEmail the user's git email (for name picking)
|
|
118
|
+
* @param {string} fallbackName merge/commit author name when no better pick
|
|
119
|
+
* @returns {{ emails: string[], authorName: string }}
|
|
120
|
+
*/
|
|
121
|
+
function resolveIntroducedAuthors(targetDir, parents, authorEmail, currentUserEmail, fallbackName) {
|
|
122
|
+
if (parents.length >= 2) {
|
|
123
|
+
const raw = git(targetDir, ['log', `${parents[0]}..${parents[1]}`, '--format=%ae%x1f%an']);
|
|
124
|
+
if (raw) {
|
|
125
|
+
const emails = new Set();
|
|
126
|
+
let pickedName = null;
|
|
127
|
+
for (const line of raw.split('\n')) {
|
|
128
|
+
const [email, name] = line.split('\x1f');
|
|
129
|
+
if (!email)
|
|
130
|
+
continue;
|
|
131
|
+
const normEmail = email.trim().toLowerCase();
|
|
132
|
+
if (normEmail.length > 0)
|
|
133
|
+
emails.add(normEmail);
|
|
134
|
+
if (!pickedName && normEmail !== currentUserEmail) {
|
|
135
|
+
pickedName = (name || fallbackName).trim();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (emails.size > 0) {
|
|
139
|
+
return { emails: [...emails], authorName: pickedName || fallbackName.trim() };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const own = authorEmail.trim().toLowerCase();
|
|
144
|
+
return {
|
|
145
|
+
emails: own.length > 0 ? [own] : [],
|
|
146
|
+
authorName: fallbackName.trim(),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* List merged PRs on the local default branch since `sinceSha`, attributed to
|
|
151
|
+
* whoever actually wrote the work (LD-04/05).
|
|
152
|
+
*
|
|
153
|
+
* Walks `git log --first-parent <sinceSha>..<defaultBranch>`. Each commit that
|
|
154
|
+
* parses as a PR (merge-commit or squash form) becomes one entry, attributed
|
|
155
|
+
* via its introduced-commit author emails. An entry is excluded only when ALL
|
|
156
|
+
* its introduced emails equal `currentUserEmail` (the user's own work) — so a
|
|
157
|
+
* PR the user merged but a teammate authored still appears.
|
|
158
|
+
*
|
|
159
|
+
* The scan is bounded (R3): at most `maxEntries * SCAN_MULTIPLIER` commits are
|
|
160
|
+
* inspected, so a stale marker can't enumerate an unbounded history.
|
|
161
|
+
*
|
|
162
|
+
* @param {string} targetDir
|
|
163
|
+
* @param {object} opts
|
|
164
|
+
* @param {string} opts.sinceSha baseline sha (exclusive lower bound)
|
|
165
|
+
* @param {string} [opts.defaultBranch] branch to walk to (default: resolved)
|
|
166
|
+
* @param {string} opts.currentUserEmail the user's git email (own-work filter)
|
|
167
|
+
* @param {number} [opts.maxEntries=7] cap on returned entries
|
|
168
|
+
* @returns {{ entries: Array<{ number: number, title: string, author: string }>, more_count: number }}
|
|
169
|
+
*/
|
|
170
|
+
export function listMergedPullRequests(targetDir, opts = {}) {
|
|
171
|
+
const empty = { entries: [], more_count: 0, more_capped: false };
|
|
172
|
+
const sinceSha = opts.sinceSha;
|
|
173
|
+
const maxEntries = Number.isInteger(opts.maxEntries) && opts.maxEntries > 0 ? opts.maxEntries : 7;
|
|
174
|
+
const currentUserEmail = (opts.currentUserEmail || '').trim().toLowerCase();
|
|
175
|
+
let defaultBranch = opts.defaultBranch;
|
|
176
|
+
if (!defaultBranch) {
|
|
177
|
+
const resolved = resolveLocalDefaultBranch(targetDir);
|
|
178
|
+
if (!resolved)
|
|
179
|
+
return empty;
|
|
180
|
+
defaultBranch = resolved.branch;
|
|
181
|
+
}
|
|
182
|
+
if (!sinceSha)
|
|
183
|
+
return empty;
|
|
184
|
+
if (!/^[0-9a-f]{7,40}$/i.test(sinceSha))
|
|
185
|
+
return empty;
|
|
186
|
+
const SCAN_MULTIPLIER = 4;
|
|
187
|
+
const scanCap = maxEntries * SCAN_MULTIPLIER;
|
|
188
|
+
// One commit per record, fields separated by \x1f, records by \x1e.
|
|
189
|
+
// %H sha · %P parents · %an author name · %ae author email · %s subject · %b body
|
|
190
|
+
const FIELD = '\x1f';
|
|
191
|
+
const RECORD = '\x1e';
|
|
192
|
+
const format = `%H${FIELD}%P${FIELD}%an${FIELD}%ae${FIELD}%s${FIELD}%b${RECORD}`;
|
|
193
|
+
const raw = git(targetDir, [
|
|
194
|
+
'log',
|
|
195
|
+
'--first-parent',
|
|
196
|
+
`--max-count=${scanCap}`,
|
|
197
|
+
`--format=${format}`,
|
|
198
|
+
`${sinceSha}..${defaultBranch}`,
|
|
199
|
+
]);
|
|
200
|
+
if (!raw)
|
|
201
|
+
return empty;
|
|
202
|
+
const records = raw
|
|
203
|
+
.split(RECORD)
|
|
204
|
+
.map((r) => r.replace(/^\n+/, ''))
|
|
205
|
+
.filter((r) => r.trim().length > 0);
|
|
206
|
+
const matched = [];
|
|
207
|
+
for (const rec of records) {
|
|
208
|
+
const [sha, parentsRaw, authorName, authorEmail, subject, body] = rec.split(FIELD);
|
|
209
|
+
if (!sha)
|
|
210
|
+
continue;
|
|
211
|
+
const pr = parsePullRequest(subject || '', body || '');
|
|
212
|
+
if (!pr)
|
|
213
|
+
continue;
|
|
214
|
+
const parents = (parentsRaw || '').trim().split(/\s+/).filter(Boolean);
|
|
215
|
+
const { emails, authorName: resolvedAuthor } = resolveIntroducedAuthors(targetDir, parents, authorEmail || '', currentUserEmail, authorName || 'unknown');
|
|
216
|
+
// Exclude only when EVERY introduced commit is the current user's own.
|
|
217
|
+
const allOwn = currentUserEmail.length > 0 &&
|
|
218
|
+
emails.length > 0 &&
|
|
219
|
+
emails.every((e) => e === currentUserEmail);
|
|
220
|
+
if (allOwn)
|
|
221
|
+
continue;
|
|
222
|
+
matched.push({ number: pr.number, title: pr.title, author: resolvedAuthor });
|
|
223
|
+
}
|
|
224
|
+
const more_capped = records.length >= scanCap;
|
|
225
|
+
if (matched.length <= maxEntries) {
|
|
226
|
+
return { entries: matched, more_count: 0, more_capped };
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
entries: matched.slice(0, maxEntries),
|
|
230
|
+
more_count: matched.length - maxEntries,
|
|
231
|
+
more_capped,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=default-branch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-branch.mjs","sourceRoot":"","sources":["../../../src/cli/git/default-branch.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD;;;;;GAKG;AACH,SAAS,GAAG,CAAC,SAAS,EAAE,IAAI;IAC3B,IAAI,CAAC;QACJ,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE;YAChC,GAAG,EAAE,SAAS;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACnC,CAAC,CAAC,IAAI,EAAE,CAAA;IACV,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAA;IACZ,CAAC;AACF,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,yBAAyB,CAAC,SAAS;IAClD,iCAAiC;IACjC,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAEpE,I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AAE,cAAc,EAAE,CAAC,CAAA;IAC7E,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAA;IAC7C,IAAI,OAAO,CAAC,MAAM,IAAI,UAAU,EAAE,CAAC;QAClC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,CAAA;IACxD,CAAC;IACD,OAAO;QACN,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;QACrC,UAAU,EAAE,OAAO,CAAC,MAAM,GAAG,UAAU;QACvC,WAAW;KACX,CAAA;AACF,CAAC"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-detect the current user's git identity. Returns null if git config is unset.
|
|
3
|
+
* Memoized per targetDir for the process lifetime (git identity is stable within a CLI invocation).
|
|
3
4
|
*/
|
|
4
|
-
export function getGitIdentity(targetDir: any):
|
|
5
|
-
name: string;
|
|
6
|
-
email: string;
|
|
7
|
-
} | null;
|
|
5
|
+
export function getGitIdentity(targetDir: any): any;
|
|
8
6
|
/**
|
|
9
7
|
* Default owner string for roadmap phases when `--owner` is not passed.
|
|
10
8
|
* Uses the current user's git identity name so solo developers are attributed
|
|
11
9
|
* automatically. Team-mode skills can override by passing `--owner` explicitly
|
|
12
10
|
* (typically after prompting against team.json members).
|
|
13
11
|
*/
|
|
14
|
-
export function getDefaultOwner(targetDir: any):
|
|
12
|
+
export function getDefaultOwner(targetDir: any): any;
|
|
15
13
|
/**
|
|
16
14
|
* Auto-detect the current git branch. Returns null if not in a git repo or detached HEAD.
|
|
17
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.mts","sourceRoot":"","sources":["../../../src/cli/git/identity.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identity.d.mts","sourceRoot":"","sources":["../../../src/cli/git/identity.mjs"],"names":[],"mappings":"AAQA;;;GAGG;AACH,oDAkBC;AAED;;;;;GAKG;AACH,qDAGC;AAED;;GAEG;AACH,gEAWC"}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
* identity.mjs — git user/branch auto-detection helpers (C29).
|
|
3
3
|
*/
|
|
4
4
|
import { execSync } from 'node:child_process';
|
|
5
|
+
const _identityCache = new Map();
|
|
5
6
|
/**
|
|
6
7
|
* Auto-detect the current user's git identity. Returns null if git config is unset.
|
|
8
|
+
* Memoized per targetDir for the process lifetime (git identity is stable within a CLI invocation).
|
|
7
9
|
*/
|
|
8
10
|
export function getGitIdentity(targetDir) {
|
|
11
|
+
if (_identityCache.has(targetDir))
|
|
12
|
+
return _identityCache.get(targetDir);
|
|
13
|
+
let result = null;
|
|
9
14
|
try {
|
|
10
15
|
const name = execSync('git config user.name 2>/dev/null', {
|
|
11
16
|
cwd: targetDir,
|
|
@@ -15,13 +20,14 @@ export function getGitIdentity(targetDir) {
|
|
|
15
20
|
cwd: targetDir,
|
|
16
21
|
encoding: 'utf-8',
|
|
17
22
|
}).trim();
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
return { name, email };
|
|
23
|
+
if (name && email)
|
|
24
|
+
result = { name, email };
|
|
21
25
|
}
|
|
22
26
|
catch {
|
|
23
|
-
|
|
27
|
+
/* no git config — result stays null */
|
|
24
28
|
}
|
|
29
|
+
_identityCache.set(targetDir, result);
|
|
30
|
+
return result;
|
|
25
31
|
}
|
|
26
32
|
/**
|
|
27
33
|
* Default owner string for roadmap phases when `--owner` is not passed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.mjs","sourceRoot":"","sources":["../../../src/cli/git/identity.mjs"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C
|
|
1
|
+
{"version":3,"file":"identity.mjs","sourceRoot":"","sources":["../../../src/cli/git/identity.mjs"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OA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AAO,IAAI,CAAA;QAC7C,OAAO,MAAM,CAAA;IACd,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAA;IACZ,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-paths.d.mts","sourceRoot":"","sources":["../../../src/cli/install/legacy-paths.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;;;;;GAMG;AAEH,gDAAgD;AAChD,mCADW,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"legacy-paths.d.mts","sourceRoot":"","sources":["../../../src/cli/install/legacy-paths.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;;;;;GAMG;AAEH,gDAAgD;AAChD,mCADW,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAiJ1C;;kBAvJY,MAAM;kBACN,MAAM;;;;;qBAEN,aAAa,CAAC,MAAM,CAAC"}
|
|
@@ -86,6 +86,7 @@ export const LEGACY_INSTALL_PATHS = Object.freeze({
|
|
|
86
86
|
'agents/apt.md',
|
|
87
87
|
'agents/apt-author-skill.md',
|
|
88
88
|
'agents/apt-bootstrap.md',
|
|
89
|
+
'agents/apt-catch-up.md',
|
|
89
90
|
'agents/apt-caveman.md',
|
|
90
91
|
'agents/apt-classify.md',
|
|
91
92
|
'agents/apt-close-task.md',
|
|
@@ -129,6 +130,7 @@ export const LEGACY_INSTALL_PATHS = Object.freeze({
|
|
|
129
130
|
'commands/apt.md',
|
|
130
131
|
'commands/apt-author-skill.md',
|
|
131
132
|
'commands/apt-bootstrap.md',
|
|
133
|
+
'commands/apt-catch-up.md',
|
|
132
134
|
'commands/apt-caveman.md',
|
|
133
135
|
'commands/apt-classify.md',
|
|
134
136
|
'commands/apt-close-task.md',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-paths.mjs","sourceRoot":"","sources":["../../../src/cli/install/legacy-paths.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;;;;;GAMG;AAEH,gDAAgD;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,4EAA4E;QAC5E,+EAA+E;QAC/E,sEAAsE;QACtE,YAAY,EAAE,QAAQ;QACtB,sEAAsE;QACtE,sDAAsD;QACtD,oEAAoE;QACpE,mEAAmE;QACnE,6BAA6B;QAC7B,YAAY,EAAE,qBAAqB;QACnC,kEAAkE;QAClE,gEAAgE;QAChE,iEAAiE;QACjE,6DAA6D;QAC7D,gEAAgE;QAChE,6BAA6B;QAC7B,cAAc,EAAE,KAAK;QACrB,qEAAqE;QACrE,oCAAoC;QACpC,2EAA2E;QAC3E,wEAAwE;QACxE,mEAAmE;QACnE,8DAA8D;QAC9D,8BAA8B;QAC9B,wEAAwE;QACxE,sEAAsE;QACtE,gDAAgD;QAChD,kEAAkE;QAClE,8BAA8B;QAC9B,mEAAmE;QACnE,oEAAoE;QACpE,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC;YAC9B,wBAAwB;YACxB,sDAAsD;YACtD,eAAe;YACf,4BAA4B;YAC5B,yBAAyB;YACzB,uBAAuB;YACvB,wBAAwB;YACxB,0BAA0B;YAC1B,2BAA2B;YAC3B,qBAAqB;YACrB,sBAAsB;YACtB,uBAAuB;YACvB,uBAAuB;YACvB,oBAAoB;YACpB,uBAAuB;YACvB,uBAAuB;YACvB,uBAAuB;YACvB,uBAAuB;YACvB,sBAAsB;YACtB,qBAAqB;YACrB,wBAAwB;YACxB,oBAAoB;YACpB,yBAAyB;YACzB,yBAAyB;YACzB,qBAAqB;YACrB,6BAA6B;YAC7B,wBAAwB;YACxB,sBAAsB;Y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multi-surface monorepo (e.g. electron + nextjs) returns
|
|
4
4
|
* multiple ids.
|
|
5
5
|
*
|
|
6
|
-
* is_electron
|
|
7
|
-
* is_tauri
|
|
8
|
-
* is_web_frontend|is_nextjs|is_nuxt
|
|
6
|
+
* is_electron → ['electron']
|
|
7
|
+
* is_tauri → ['tauri']
|
|
8
|
+
* is_web_frontend|is_nextjs|is_nuxt → ['agent-browser']
|
|
9
|
+
* is_ios_native|is_android_native|is_expo|is_react_native → ['mobile-mcp']
|
|
9
10
|
*
|
|
10
11
|
* Accepts a partial capability record — only the flags it reads need be
|
|
11
12
|
* present (the rest default to absent/false).
|
|
12
13
|
*
|
|
13
|
-
* @param {Partial<import('../util/runtime-capabilities.mjs').RuntimeCapabilities>} runtimeCaps
|
|
14
|
+
* @param {Partial<import('../util/runtime-capabilities.mjs').RuntimeCapabilities> | null | undefined} runtimeCaps
|
|
14
15
|
* @returns {string[]}
|
|
15
16
|
*/
|
|
16
|
-
export function capabilityToProvisionIds(runtimeCaps: Partial<import("../util/runtime-capabilities.mjs").RuntimeCapabilities>): string[];
|
|
17
|
+
export function capabilityToProvisionIds(runtimeCaps: Partial<import("../util/runtime-capabilities.mjs").RuntimeCapabilities> | null | undefined): string[];
|
|
17
18
|
/**
|
|
18
19
|
* install/mcp-server-specs.mjs — single-sourced install-time provision specs.
|
|
19
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server-specs.d.mts","sourceRoot":"","sources":["../../../src/cli/install/mcp-server-specs.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp-server-specs.d.mts","sourceRoot":"","sources":["../../../src/cli/install/mcp-server-specs.mjs"],"names":[],"mappings":"AAuFA;;;;;;;;;;;;;;;GAeG;AACH,sDAHW,OAAO,CAAC,OAAO,kCAAkC,EAAE,mBAAmB,CAAC,GAAG,IAAI,GAAG,SAAS,GACxF,MAAM,EAAE,CAmBpB;AAxHD;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,8BAFU,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CA0CtC;;UA/Da,YAAY;aACZ,MAAM;UACN,MAAM,EAAE;;;;;;;;UAKR,OAAO;aACP,MAAM;;;;0BACN,MAAM;;4BAEP,aAAa,GAAG,SAAS"}
|
|
@@ -59,6 +59,17 @@ export const PROVISION_SPECS = {
|
|
|
59
59
|
args: ['./scripts/tauri-mcp.sh'],
|
|
60
60
|
requiresLauncherScript: true,
|
|
61
61
|
},
|
|
62
|
+
'mobile-mcp': {
|
|
63
|
+
kind: 'mcp-server',
|
|
64
|
+
// Unified iOS + Android UI-driving server (Apache-2.0). Pure npm —
|
|
65
|
+
// the iOS/Android SYSTEM prereqs (idb-companion / adb / Xcode /
|
|
66
|
+
// Android SDK) are validated by the mobile driver's preflight, NOT
|
|
67
|
+
// installed here (decision D-09). Matches the driver manifest's
|
|
68
|
+
// transport.mcp_server_id = "mobile-mcp".
|
|
69
|
+
command: 'npx',
|
|
70
|
+
args: ['-y', '@mobilenext/mobile-mcp@latest'],
|
|
71
|
+
env: {},
|
|
72
|
+
},
|
|
62
73
|
// kind 'skill'
|
|
63
74
|
'agent-browser': {
|
|
64
75
|
kind: 'skill',
|
|
@@ -76,14 +87,15 @@ export const PROVISION_SPECS = {
|
|
|
76
87
|
* triggers. A multi-surface monorepo (e.g. electron + nextjs) returns
|
|
77
88
|
* multiple ids.
|
|
78
89
|
*
|
|
79
|
-
* is_electron
|
|
80
|
-
* is_tauri
|
|
81
|
-
* is_web_frontend|is_nextjs|is_nuxt
|
|
90
|
+
* is_electron → ['electron']
|
|
91
|
+
* is_tauri → ['tauri']
|
|
92
|
+
* is_web_frontend|is_nextjs|is_nuxt → ['agent-browser']
|
|
93
|
+
* is_ios_native|is_android_native|is_expo|is_react_native → ['mobile-mcp']
|
|
82
94
|
*
|
|
83
95
|
* Accepts a partial capability record — only the flags it reads need be
|
|
84
96
|
* present (the rest default to absent/false).
|
|
85
97
|
*
|
|
86
|
-
* @param {Partial<import('../util/runtime-capabilities.mjs').RuntimeCapabilities>} runtimeCaps
|
|
98
|
+
* @param {Partial<import('../util/runtime-capabilities.mjs').RuntimeCapabilities> | null | undefined} runtimeCaps
|
|
87
99
|
* @returns {string[]}
|
|
88
100
|
*/
|
|
89
101
|
export function capabilityToProvisionIds(runtimeCaps) {
|
|
@@ -97,6 +109,12 @@ export function capabilityToProvisionIds(runtimeCaps) {
|
|
|
97
109
|
if (runtimeCaps.is_web_frontend || runtimeCaps.is_nextjs || runtimeCaps.is_nuxt) {
|
|
98
110
|
ids.push('agent-browser');
|
|
99
111
|
}
|
|
112
|
+
if (runtimeCaps.is_ios_native ||
|
|
113
|
+
runtimeCaps.is_android_native ||
|
|
114
|
+
runtimeCaps.is_expo ||
|
|
115
|
+
runtimeCaps.is_react_native) {
|
|
116
|
+
ids.push('mobile-mcp');
|
|
117
|
+
}
|
|
100
118
|
return ids;
|
|
101
119
|
}
|
|
102
120
|
//# sourceMappingURL=mcp-server-specs.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server-specs.mjs","sourceRoot":"","sources":["../../../src/cli/install/mcp-server-specs.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,oBAAoB;IACpB,QAAQ,EAAE;QACT,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC;QACnC,qEAAqE;QACrE,GAAG,EAAE,EAAE;KACP;IACD,KAAK,EAAE;QACN,IAAI,EAAE,YAAY;QAClB,qEAAqE;QACrE,mEAAmE;QACnE,6DAA6D;QAC7D,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,CAAC,wBAAwB,CAAC;QAChC,sBAAsB,EAAE,IAAI;KAC5B;IACD,eAAe;IACf,eAAe,EAAE;QAChB,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,eAAe;QACxB,uEAAuE;QACvE,qEAAqE;QACrE,4DAA4D;QAC5D,wEAAwE;QACxE,mEAAmE;QACnE,oBAAoB,EAAE,8CAA8C;KACpE;CACD,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"mcp-server-specs.mjs","sourceRoot":"","sources":["../../../src/cli/install/mcp-server-specs.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,oBAAoB;IACpB,QAAQ,EAAE;QACT,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,qBAAqB,CAAC;QACnC,qEAAqE;QACrE,GAAG,EAAE,EAAE;KACP;IACD,KAAK,EAAE;QACN,IAAI,EAAE,YAAY;QAClB,qEAAqE;QACrE,mEAAmE;QACnE,6DAA6D;QAC7D,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,CAAC,wBAAwB,CAAC;QAChC,sBAAsB,EAAE,IAAI;KAC5B;IACD,YAAY,EAAE;QACb,IAAI,EAAE,YAAY;QAClB,mEAAmE;QACnE,gEAAgE;QAChE,mEAAmE;QACnE,gEAAgE;QAChE,0CAA0C;QAC1C,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,+BAA+B,CAAC;QAC7C,GAAG,EAAE,EAAE;KACP;IACD,eAAe;IACf,eAAe,EAAE;QAChB,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,eAAe;QACxB,uEAAuE;QACvE,qEAAqE;QACrE,4DAA4D;QAC5D,wEAAwE;QACxE,mEAAmE;QACnE,oBAAoB,EAAE,8CAA8C;KACpE;CACD,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,wBAAwB,CAAC,WAAW;IACnD,MAAM,GAAG,GAAG,EAAE,CAAA;IACd,IAAI,CAAC,WAAW,IAAI,OAAO,WAAW,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAA;IAC/D,IAAI,WAAW,CAAC,WAAW;QAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACjD,IAAI,WAAW,CAAC,QAAQ;QAAE,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3C,IAAI,WAAW,CAAC,eAAe,IAAI,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACjF,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IAC1B,CAAC;IACD,IACC,WAAW,CAAC,aAAa;QACzB,WAAW,CAAC,iBAAiB;QAC7B,WAAW,CAAC,OAAO;QACnB,WAAW,CAAC,eAAe,EAC1B,CAAC;QACF,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IACvB,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatch a roadmap write subcommand through the configured backend.
|
|
3
|
+
*
|
|
4
|
+
* Return shapes:
|
|
5
|
+
* - markdown (default) → `{ backend: 'markdown', delegated: false }`
|
|
6
|
+
* The caller proceeds with the existing markdown file-write path.
|
|
7
|
+
* - cloud-mcp success → `{ backend: 'cloud-mcp', delegated: true,
|
|
8
|
+
* result: <MCP response JSON> }`
|
|
9
|
+
* - cloud-mcp error → `{ backend: 'cloud-mcp', delegated: true,
|
|
10
|
+
* error: '<msg>', code?: <http>, status: 'error' }`
|
|
11
|
+
*
|
|
12
|
+
* The `error` branch is still `delegated: true` because the caller MUST
|
|
13
|
+
* NOT silently fall through to the markdown path when the user has
|
|
14
|
+
* opted into cloud-mcp — that would lose writes the user expected to
|
|
15
|
+
* land in Convex.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} projectDir
|
|
18
|
+
* @param {string} subcommand
|
|
19
|
+
* @param {Record<string, unknown>} args
|
|
20
|
+
* @param {{ fetchImpl?: typeof fetch }} [opts]
|
|
21
|
+
* @returns {Promise<
|
|
22
|
+
* | { backend: 'markdown', delegated: false }
|
|
23
|
+
* | { backend: 'cloud-mcp', delegated: true, result: unknown }
|
|
24
|
+
* | { backend: 'cloud-mcp', delegated: true, status: 'error', error: string, code?: number }
|
|
25
|
+
* >}
|
|
26
|
+
*/
|
|
27
|
+
export function dispatchRoadmapWrite(projectDir: string, subcommand: string, args: Record<string, unknown>, opts?: {
|
|
28
|
+
fetchImpl?: typeof fetch;
|
|
29
|
+
}): Promise<{
|
|
30
|
+
backend: "markdown";
|
|
31
|
+
delegated: false;
|
|
32
|
+
} | {
|
|
33
|
+
backend: "cloud-mcp";
|
|
34
|
+
delegated: true;
|
|
35
|
+
result: unknown;
|
|
36
|
+
} | {
|
|
37
|
+
backend: "cloud-mcp";
|
|
38
|
+
delegated: true;
|
|
39
|
+
status: "error";
|
|
40
|
+
error: string;
|
|
41
|
+
code?: number;
|
|
42
|
+
}>;
|
|
43
|
+
//# sourceMappingURL=backend-adapter.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend-adapter.d.mts","sourceRoot":"","sources":["../../../src/cli/roadmap/backend-adapter.mjs"],"names":[],"mappings":"AA8FA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iDAVW,MAAM,cACN,MAAM,QACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,SACvB;IAAE,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;CAAE,GAC1B,OAAO,CACb;IAAE,OAAO,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,KAAK,CAAA;CAAE,GACzC;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAC1D;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAC3F,CAgHH"}
|