codebyplan 1.13.17 → 1.13.19
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/dist/cli.js
CHANGED
|
@@ -14,7 +14,7 @@ var VERSION, PACKAGE_NAME;
|
|
|
14
14
|
var init_version = __esm({
|
|
15
15
|
"src/lib/version.ts"() {
|
|
16
16
|
"use strict";
|
|
17
|
-
VERSION = "1.13.
|
|
17
|
+
VERSION = "1.13.19";
|
|
18
18
|
PACKAGE_NAME = "codebyplan";
|
|
19
19
|
}
|
|
20
20
|
});
|
|
@@ -2373,6 +2373,22 @@ var whoami_exports = {};
|
|
|
2373
2373
|
__export(whoami_exports, {
|
|
2374
2374
|
runWhoami: () => runWhoami
|
|
2375
2375
|
});
|
|
2376
|
+
async function fetchMe(accessToken) {
|
|
2377
|
+
try {
|
|
2378
|
+
const res = await fetch(meEndpoint(), {
|
|
2379
|
+
headers: { Authorization: `Bearer ${accessToken}` },
|
|
2380
|
+
signal: AbortSignal.timeout(1e4)
|
|
2381
|
+
});
|
|
2382
|
+
if (!res.ok) return null;
|
|
2383
|
+
const body = await res.json();
|
|
2384
|
+
return {
|
|
2385
|
+
email: body.email ?? null,
|
|
2386
|
+
username: body.username ?? null
|
|
2387
|
+
};
|
|
2388
|
+
} catch {
|
|
2389
|
+
return null;
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2376
2392
|
async function runWhoami(opts = {}) {
|
|
2377
2393
|
const tokens = await loadTokens();
|
|
2378
2394
|
if (opts.json) {
|
|
@@ -2381,8 +2397,13 @@ async function runWhoami(opts = {}) {
|
|
|
2381
2397
|
process.exitCode = 1;
|
|
2382
2398
|
return;
|
|
2383
2399
|
}
|
|
2400
|
+
const me2 = await fetchMe(tokens.access_token);
|
|
2384
2401
|
console.log(
|
|
2385
|
-
JSON.stringify({
|
|
2402
|
+
JSON.stringify({
|
|
2403
|
+
user_id: tokens.user_id,
|
|
2404
|
+
email: me2?.email ?? tokens.email,
|
|
2405
|
+
username: me2?.username ?? null
|
|
2406
|
+
})
|
|
2386
2407
|
);
|
|
2387
2408
|
return;
|
|
2388
2409
|
}
|
|
@@ -2391,15 +2412,26 @@ async function runWhoami(opts = {}) {
|
|
|
2391
2412
|
process.exitCode = 1;
|
|
2392
2413
|
return;
|
|
2393
2414
|
}
|
|
2415
|
+
const me = await fetchMe(tokens.access_token);
|
|
2416
|
+
const degraded = me === null;
|
|
2417
|
+
const email = me?.email ?? tokens.email;
|
|
2418
|
+
const username = me?.username ?? null;
|
|
2394
2419
|
console.log(`
|
|
2395
|
-
user_id:
|
|
2396
|
-
console.log(` email:
|
|
2420
|
+
user_id: ${tokens.user_id}`);
|
|
2421
|
+
console.log(` email: ${email ?? "(unknown)"}`);
|
|
2422
|
+
console.log(` username: ${username ?? "(not set)"}`);
|
|
2423
|
+
if (degraded) {
|
|
2424
|
+
console.log(` (profile fetch failed \u2014 showing stored credentials)
|
|
2397
2425
|
`);
|
|
2426
|
+
} else {
|
|
2427
|
+
console.log();
|
|
2428
|
+
}
|
|
2398
2429
|
}
|
|
2399
2430
|
var init_whoami = __esm({
|
|
2400
2431
|
"src/cli/whoami.ts"() {
|
|
2401
2432
|
"use strict";
|
|
2402
2433
|
init_keychain();
|
|
2434
|
+
init_urls();
|
|
2403
2435
|
}
|
|
2404
2436
|
});
|
|
2405
2437
|
|
package/package.json
CHANGED
|
@@ -64,10 +64,10 @@ while IFS= read -r FILE; do
|
|
|
64
64
|
continue
|
|
65
65
|
fi
|
|
66
66
|
|
|
67
|
-
# Skip files under a __tests__/ directory — fixtures, helpers,
|
|
68
|
-
# other test infrastructure are imported by the test
|
|
69
|
-
# them; requiring a dedicated .test.ts
|
|
70
|
-
if echo "$FILE" | grep -qE '/__tests__/'; then
|
|
67
|
+
# Skip files under a __tests__/ or __mocks__/ directory — fixtures, helpers,
|
|
68
|
+
# setup, manual mocks, and other test infrastructure are imported by the test
|
|
69
|
+
# files that exercise them; requiring a dedicated .test.ts is nonsensical.
|
|
70
|
+
if echo "$FILE" | grep -qE '/__tests__/|/__mocks__/'; then
|
|
71
71
|
SKIPPED=$((SKIPPED + 1))
|
|
72
72
|
continue
|
|
73
73
|
fi
|
|
@@ -53,6 +53,16 @@
|
|
|
53
53
|
"Skill(cbp-checkpoint-end)",
|
|
54
54
|
"Skill(cbp-ship)",
|
|
55
55
|
"Skill(cbp-ship-main)",
|
|
56
|
+
"Skill(cbp-checkpoint-start)",
|
|
57
|
+
"Skill(cbp-checkpoint-create)",
|
|
58
|
+
"Skill(cbp-checkpoint-check)",
|
|
59
|
+
"Skill(cbp-checkpoint-complete)",
|
|
60
|
+
"Skill(cbp-round-update)",
|
|
61
|
+
"Skill(cbp-session-end)",
|
|
62
|
+
"Skill(cbp-task-complete)",
|
|
63
|
+
"Skill(cbp-standalone-task-create)",
|
|
64
|
+
"Skill(cbp-standalone-task-start)",
|
|
65
|
+
"Skill(cbp-standalone-task-complete)",
|
|
56
66
|
"mcp__codebyplan__accept_invite",
|
|
57
67
|
"mcp__codebyplan__change_role",
|
|
58
68
|
"mcp__codebyplan__create_launch",
|
|
@@ -100,11 +110,7 @@
|
|
|
100
110
|
"Skill(cbp-build-cc-rule)",
|
|
101
111
|
"Skill(cbp-build-cc-settings)",
|
|
102
112
|
"Skill(cbp-build-cc-skill)",
|
|
103
|
-
"Skill(cbp-checkpoint-check)",
|
|
104
|
-
"Skill(cbp-checkpoint-complete)",
|
|
105
|
-
"Skill(cbp-checkpoint-create)",
|
|
106
113
|
"Skill(cbp-checkpoint-plan)",
|
|
107
|
-
"Skill(cbp-checkpoint-start)",
|
|
108
114
|
"Skill(cbp-checkpoint-update)",
|
|
109
115
|
"Skill(cbp-frontend-a11y)",
|
|
110
116
|
"Skill(cbp-frontend-design)",
|
|
@@ -121,28 +127,17 @@
|
|
|
121
127
|
"Skill(cbp-round-execute)",
|
|
122
128
|
"Skill(cbp-round-input)",
|
|
123
129
|
"Skill(cbp-round-start)",
|
|
124
|
-
"Skill(cbp-round-update)",
|
|
125
|
-
"Skill(cbp-session-end)",
|
|
126
130
|
"Skill(cbp-session-start)",
|
|
127
131
|
"Skill(cbp-setup-cmux)",
|
|
128
132
|
"Skill(cbp-setup-e2e)",
|
|
129
133
|
"Skill(cbp-setup-eslint)",
|
|
130
134
|
"Skill(cbp-ship-configure)",
|
|
131
135
|
"Skill(cbp-standalone-task-check)",
|
|
132
|
-
"Skill(cbp-standalone-task-complete)",
|
|
133
|
-
"Skill(cbp-standalone-task-create)",
|
|
134
|
-
"Skill(cbp-standalone-task-start)",
|
|
135
136
|
"Skill(cbp-standalone-task-testing)",
|
|
136
137
|
"Skill(cbp-supabase-branch-check)",
|
|
137
138
|
"Skill(cbp-supabase-migrate)",
|
|
138
139
|
"Skill(cbp-supabase-setup)",
|
|
139
|
-
"Skill(cbp-standalone-task-check)",
|
|
140
|
-
"Skill(cbp-standalone-task-complete)",
|
|
141
|
-
"Skill(cbp-standalone-task-create)",
|
|
142
|
-
"Skill(cbp-standalone-task-start)",
|
|
143
|
-
"Skill(cbp-standalone-task-testing)",
|
|
144
140
|
"Skill(cbp-task-check)",
|
|
145
|
-
"Skill(cbp-task-complete)",
|
|
146
141
|
"Skill(cbp-task-create)",
|
|
147
142
|
"Skill(cbp-task-start)",
|
|
148
143
|
"Skill(cbp-task-testing)",
|
|
@@ -22,7 +22,7 @@ Precedence is `deny > ask > allow`; arrays union across scopes (managed/user/pro
|
|
|
22
22
|
|
|
23
23
|
### `allow` — the autonomous workflow surface
|
|
24
24
|
|
|
25
|
-
- **
|
|
25
|
+
- **Non-lifecycle, non-shipment `/cbp-*` skills** — authoring (`cbp-build-cc-*`), frontend (`cbp-frontend-*`), git (`cbp-git-*`, `cbp-merge-main`, `cbp-refresh-infra`), round work (`cbp-round-check`/`-end`/`-execute`/`-input`/`-start`), setup/configure (`cbp-setup-*`, `cbp-ship-configure`, `cbp-supabase-*`), task prep (`cbp-task-check`/`-create`/`-start`/`-testing`, `cbp-standalone-task-check`/`-testing`), planning (`cbp-checkpoint-plan`/`-update`), plus `cbp-session-start` and `cbp-todo`. Invoking a skill is the intended mode of operation; the gated side effects happen inside via the Bash/MCP tools the skill calls, which carry their own tiering. The lifecycle/state-transition skills are the exception — they live in `ask` (next section).
|
|
26
26
|
- **All `mcp__codebyplan__*` reads** (`get_*`, `list_*`, `search_*`, `health_check`, `lookup_symbol`, `resolve_library_id`, `get_chunk`).
|
|
27
27
|
- **Routine workflow-write MCP tools** the pipeline calls many times per task: create/update/complete checkpoint, task, and round; session log + session-state writes; `create_worktree`, `add_library`, `flag_stale_chunk`, `update_server_config`, `update_eslint_repo_config`, `update_task_template`. Gating these with `ask` would make the autonomous workflow unusable.
|
|
28
28
|
- **Read/safe CLI commands** (both `codebyplan X` and `npx codebyplan X`): `whoami`, `resolve-worktree`, `statusline`, `ports`, `tech-stack`, `eslint`, `round`, `help`, `--version`.
|
|
@@ -30,6 +30,7 @@ Precedence is `deny > ask > allow`; arrays union across scopes (managed/user/pro
|
|
|
30
30
|
### `ask` — the deliberate confirm-gate
|
|
31
31
|
|
|
32
32
|
- **Production-shipment skills**: `cbp-ship`, `cbp-ship-main`, `cbp-checkpoint-end` — these promote/deploy to production, so they prompt even in an otherwise auto-allowed setup.
|
|
33
|
+
- **Lifecycle / state-transition skills**: `cbp-checkpoint-start`, `cbp-checkpoint-create`, `cbp-checkpoint-check`, `cbp-checkpoint-complete`, `cbp-round-update`, `cbp-session-end`, `cbp-task-complete`, `cbp-standalone-task-create`, `cbp-standalone-task-start`, `cbp-standalone-task-complete` — these open or close checkpoints, tasks, rounds, and sessions (advancing workflow state in the database), so they stop for explicit confirmation rather than running autonomously.
|
|
33
34
|
- **Destructive / admin / external MCP tools**: `delete_session_log`, `delete_worktree`, `delete_launch`, `create_repo`, `create_launch`, `update_launch`, `release_assignment`, and the membership tools `invite_member`, `remove_member`, `change_role`, `accept_invite`, `revoke_invite`.
|
|
34
35
|
- **Mutating / external / clobber-risk CLI commands** (both prefixes): `setup`, `login`, `logout`, `upgrade-auth`, `config` (can overwrite committed `.codebyplan/` files), `branch` (rewrites branch config), `ship`, `claude` (`install`/`update`/`uninstall` overwrite `.claude/`).
|
|
35
36
|
|