codebyplan 1.13.64 → 1.13.66
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/README.md +118 -75
- package/dist/__tests__/helpers.d.ts +22 -0
- package/dist/__tests__/helpers.d.ts.map +1 -0
- package/dist/ci-public.d.ts +20 -0
- package/dist/ci-public.d.ts.map +1 -0
- package/dist/ci.js +11 -2
- package/dist/cli/arch-map.d.ts +33 -0
- package/dist/cli/arch-map.d.ts.map +1 -0
- package/dist/cli/branch.d.ts +10 -0
- package/dist/cli/branch.d.ts.map +1 -0
- package/dist/cli/bump.d.ts +12 -0
- package/dist/cli/bump.d.ts.map +1 -0
- package/dist/cli/cd.d.ts +20 -0
- package/dist/cli/cd.d.ts.map +1 -0
- package/dist/cli/check.d.ts +30 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/checkpoint.d.ts +17 -0
- package/dist/cli/checkpoint.d.ts.map +1 -0
- package/dist/cli/ci.d.ts +31 -0
- package/dist/cli/ci.d.ts.map +1 -0
- package/dist/cli/claude/__test-helpers__/expect-manifest.d.ts +7 -0
- package/dist/cli/claude/__test-helpers__/expect-manifest.d.ts.map +1 -0
- package/dist/cli/claude/__test-helpers__/tmp-fixture.d.ts +64 -0
- package/dist/cli/claude/__test-helpers__/tmp-fixture.d.ts.map +1 -0
- package/dist/cli/claude/audit-mode.d.ts +16 -0
- package/dist/cli/claude/audit-mode.d.ts.map +1 -0
- package/dist/cli/claude/generate.d.ts +23 -0
- package/dist/cli/claude/generate.d.ts.map +1 -0
- package/dist/cli/claude/install.d.ts +55 -0
- package/dist/cli/claude/install.d.ts.map +1 -0
- package/dist/cli/claude/migrate-memory.d.ts +117 -0
- package/dist/cli/claude/migrate-memory.d.ts.map +1 -0
- package/dist/cli/claude/readme.d.ts +28 -0
- package/dist/cli/claude/readme.d.ts.map +1 -0
- package/dist/cli/claude/status.d.ts +41 -0
- package/dist/cli/claude/status.d.ts.map +1 -0
- package/dist/cli/claude/uninstall.d.ts +21 -0
- package/dist/cli/claude/uninstall.d.ts.map +1 -0
- package/dist/cli/claude/update.d.ts +25 -0
- package/dist/cli/claude/update.d.ts.map +1 -0
- package/dist/cli/claude/verify-parity.d.ts +25 -0
- package/dist/cli/claude/verify-parity.d.ts.map +1 -0
- package/dist/cli/cleanup-plan-folders.d.ts +21 -0
- package/dist/cli/cleanup-plan-folders.d.ts.map +1 -0
- package/dist/cli/commit.d.ts +25 -0
- package/dist/cli/commit.d.ts.map +1 -0
- package/dist/cli/config.d.ts +50 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/confirm.d.ts +9 -0
- package/dist/cli/confirm.d.ts.map +1 -0
- package/dist/cli/create-org.d.ts +9 -0
- package/dist/cli/create-org.d.ts.map +1 -0
- package/dist/cli/create-project.d.ts +10 -0
- package/dist/cli/create-project.d.ts.map +1 -0
- package/dist/cli/create-repo.d.ts +14 -0
- package/dist/cli/create-repo.d.ts.map +1 -0
- package/dist/cli/docs.d.ts +41 -0
- package/dist/cli/docs.d.ts.map +1 -0
- package/dist/cli/doctor.d.ts +17 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/e2e/verify-round.d.ts +46 -0
- package/dist/cli/e2e/verify-round.d.ts.map +1 -0
- package/dist/cli/e2e.d.ts +11 -0
- package/dist/cli/e2e.d.ts.map +1 -0
- package/dist/cli/eslint.d.ts +20 -0
- package/dist/cli/eslint.d.ts.map +1 -0
- package/dist/cli/export-writer.d.ts +99 -0
- package/dist/cli/export-writer.d.ts.map +1 -0
- package/dist/cli/handoff.d.ts +13 -0
- package/dist/cli/handoff.d.ts.map +1 -0
- package/dist/cli/login.d.ts +10 -0
- package/dist/cli/login.d.ts.map +1 -0
- package/dist/cli/logout.d.ts +2 -0
- package/dist/cli/logout.d.ts.map +1 -0
- package/dist/cli/lsp.d.ts +16 -0
- package/dist/cli/lsp.d.ts.map +1 -0
- package/dist/cli/migration-collisions.d.ts +10 -0
- package/dist/cli/migration-collisions.d.ts.map +1 -0
- package/dist/cli/ports.d.ts +29 -0
- package/dist/cli/ports.d.ts.map +1 -0
- package/dist/cli/process-exit-signal.d.ts +24 -0
- package/dist/cli/process-exit-signal.d.ts.map +1 -0
- package/dist/cli/round.d.ts +79 -0
- package/dist/cli/round.d.ts.map +1 -0
- package/dist/cli/scaffold-publish-workflow.d.ts +16 -0
- package/dist/cli/scaffold-publish-workflow.d.ts.map +1 -0
- package/dist/cli/session/freshness-gate.d.ts +21 -0
- package/dist/cli/session/freshness-gate.d.ts.map +1 -0
- package/dist/cli/session/home-ff.d.ts +16 -0
- package/dist/cli/session/home-ff.d.ts.map +1 -0
- package/dist/cli/session/infra-files.d.ts +21 -0
- package/dist/cli/session/infra-files.d.ts.map +1 -0
- package/dist/cli/session/start.d.ts +70 -0
- package/dist/cli/session/start.d.ts.map +1 -0
- package/dist/cli/session.d.ts +17 -0
- package/dist/cli/session.d.ts.map +1 -0
- package/dist/cli/setup.d.ts +2 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/ship.d.ts +16 -0
- package/dist/cli/ship.d.ts.map +1 -0
- package/dist/cli/slug.d.ts +10 -0
- package/dist/cli/slug.d.ts.map +1 -0
- package/dist/cli/standalone-task.d.ts +31 -0
- package/dist/cli/standalone-task.d.ts.map +1 -0
- package/dist/cli/statusline.d.ts +10 -0
- package/dist/cli/statusline.d.ts.map +1 -0
- package/dist/cli/supabase/new-migration.d.ts +24 -0
- package/dist/cli/supabase/new-migration.d.ts.map +1 -0
- package/dist/cli/supabase/preview-check.d.ts +30 -0
- package/dist/cli/supabase/preview-check.d.ts.map +1 -0
- package/dist/cli/supabase/resolve-preview.d.ts +19 -0
- package/dist/cli/supabase/resolve-preview.d.ts.map +1 -0
- package/dist/cli/supabase/teardown-preview.d.ts +22 -0
- package/dist/cli/supabase/teardown-preview.d.ts.map +1 -0
- package/dist/cli/sync.d.ts +13 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/task.d.ts +17 -0
- package/dist/cli/task.d.ts.map +1 -0
- package/dist/cli/tech-stack.d.ts +11 -0
- package/dist/cli/tech-stack.d.ts.map +1 -0
- package/dist/cli/upgrade-auth.d.ts +2 -0
- package/dist/cli/upgrade-auth.d.ts.map +1 -0
- package/dist/cli/upload-e2e-images.d.ts +18 -0
- package/dist/cli/upload-e2e-images.d.ts.map +1 -0
- package/dist/cli/validate-waves.d.ts +22 -0
- package/dist/cli/validate-waves.d.ts.map +1 -0
- package/dist/cli/version-status.d.ts +42 -0
- package/dist/cli/version-status.d.ts.map +1 -0
- package/dist/cli/watch.d.ts +18 -0
- package/dist/cli/watch.d.ts.map +1 -0
- package/dist/cli/whoami.d.ts +5 -0
- package/dist/cli/whoami.d.ts.map +1 -0
- package/dist/cli/worktree/add.d.ts +81 -0
- package/dist/cli/worktree/add.d.ts.map +1 -0
- package/dist/cli/worktree/create.d.ts +46 -0
- package/dist/cli/worktree/create.d.ts.map +1 -0
- package/dist/cli/worktree/path.d.ts +19 -0
- package/dist/cli/worktree/path.d.ts.map +1 -0
- package/dist/cli/worktree/remove.d.ts +60 -0
- package/dist/cli/worktree/remove.d.ts.map +1 -0
- package/dist/cli/worktree.d.ts +15 -0
- package/dist/cli/worktree.d.ts.map +1 -0
- package/dist/cli.js +6194 -5429
- package/dist/dispatch.d.ts +64 -0
- package/dist/dispatch.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/agents-generator.d.ts +42 -0
- package/dist/lib/agents-generator.d.ts.map +1 -0
- package/dist/lib/api.d.ts +54 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/atomic-write.d.ts +27 -0
- package/dist/lib/atomic-write.d.ts.map +1 -0
- package/dist/lib/branch-checkout.d.ts +47 -0
- package/dist/lib/branch-checkout.d.ts.map +1 -0
- package/dist/lib/branch-port-resolver.d.ts +58 -0
- package/dist/lib/branch-port-resolver.d.ts.map +1 -0
- package/dist/lib/bump.d.ts +97 -0
- package/dist/lib/bump.d.ts.map +1 -0
- package/dist/lib/cd-init.d.ts +86 -0
- package/dist/lib/cd-init.d.ts.map +1 -0
- package/dist/lib/check-baseline.d.ts +91 -0
- package/dist/lib/check-baseline.d.ts.map +1 -0
- package/dist/lib/check.d.ts +178 -0
- package/dist/lib/check.d.ts.map +1 -0
- package/dist/lib/ci-init.d.ts +106 -0
- package/dist/lib/ci-init.d.ts.map +1 -0
- package/dist/lib/ci-resolve.d.ts +60 -0
- package/dist/lib/ci-resolve.d.ts.map +1 -0
- package/dist/lib/claude-mode-audit.d.ts +41 -0
- package/dist/lib/claude-mode-audit.d.ts.map +1 -0
- package/dist/lib/claude-plan.d.ts +34 -0
- package/dist/lib/claude-plan.d.ts.map +1 -0
- package/dist/lib/commit-scope.d.ts +21 -0
- package/dist/lib/commit-scope.d.ts.map +1 -0
- package/dist/lib/e2e.d.ts +157 -0
- package/dist/lib/e2e.d.ts.map +1 -0
- package/dist/lib/eslint-generator.d.ts +86 -0
- package/dist/lib/eslint-generator.d.ts.map +1 -0
- package/dist/lib/file-lock.d.ts +44 -0
- package/dist/lib/file-lock.d.ts.map +1 -0
- package/dist/lib/flags.d.ts +115 -0
- package/dist/lib/flags.d.ts.map +1 -0
- package/dist/lib/gh-required-checks.d.ts +76 -0
- package/dist/lib/gh-required-checks.d.ts.map +1 -0
- package/dist/lib/git-utils.d.ts +46 -0
- package/dist/lib/git-utils.d.ts.map +1 -0
- package/dist/lib/gitignore-block.d.ts +32 -0
- package/dist/lib/gitignore-block.d.ts.map +1 -0
- package/dist/lib/gitignore-detect.d.ts +117 -0
- package/dist/lib/gitignore-detect.d.ts.map +1 -0
- package/dist/lib/handoff-file.d.ts +63 -0
- package/dist/lib/handoff-file.d.ts.map +1 -0
- package/dist/lib/hash.d.ts +9 -0
- package/dist/lib/hash.d.ts.map +1 -0
- package/dist/lib/lsp-detect.d.ts +42 -0
- package/dist/lib/lsp-detect.d.ts.map +1 -0
- package/dist/lib/manifest.d.ts +88 -0
- package/dist/lib/manifest.d.ts.map +1 -0
- package/dist/lib/mcp-client.d.ts +39 -0
- package/dist/lib/mcp-client.d.ts.map +1 -0
- package/dist/lib/migrate-branch-model.d.ts +34 -0
- package/dist/lib/migrate-branch-model.d.ts.map +1 -0
- package/dist/lib/migrate-local-config.d.ts +39 -0
- package/dist/lib/migrate-local-config.d.ts.map +1 -0
- package/dist/lib/migration-collisions.d.ts +61 -0
- package/dist/lib/migration-collisions.d.ts.map +1 -0
- package/dist/lib/port-verify.d.ts +73 -0
- package/dist/lib/port-verify.d.ts.map +1 -0
- package/dist/lib/prompt.d.ts +41 -0
- package/dist/lib/prompt.d.ts.map +1 -0
- package/dist/lib/readme-generator.d.ts +108 -0
- package/dist/lib/readme-generator.d.ts.map +1 -0
- package/dist/lib/repo-reader.d.ts +59 -0
- package/dist/lib/repo-reader.d.ts.map +1 -0
- package/dist/lib/scaffold-cd-workflow.d.ts +48 -0
- package/dist/lib/scaffold-cd-workflow.d.ts.map +1 -0
- package/dist/lib/scaffold-ci-workflow.d.ts +83 -0
- package/dist/lib/scaffold-ci-workflow.d.ts.map +1 -0
- package/dist/lib/scaffold-publish-workflow.d.ts +48 -0
- package/dist/lib/scaffold-publish-workflow.d.ts.map +1 -0
- package/dist/lib/server-detect.d.ts +20 -0
- package/dist/lib/server-detect.d.ts.map +1 -0
- package/dist/lib/session.d.ts +371 -0
- package/dist/lib/session.d.ts.map +1 -0
- package/dist/lib/settings-merge.d.ts +268 -0
- package/dist/lib/settings-merge.d.ts.map +1 -0
- package/dist/lib/ship.d.ts +84 -0
- package/dist/lib/ship.d.ts.map +1 -0
- package/dist/lib/slug.d.ts +26 -0
- package/dist/lib/slug.d.ts.map +1 -0
- package/dist/lib/spawn.d.ts +12 -0
- package/dist/lib/spawn.d.ts.map +1 -0
- package/dist/lib/state-client.d.ts +54 -0
- package/dist/lib/state-client.d.ts.map +1 -0
- package/dist/lib/state-store.d.ts +153 -0
- package/dist/lib/state-store.d.ts.map +1 -0
- package/dist/lib/state-sync.d.ts +101 -0
- package/dist/lib/state-sync.d.ts.map +1 -0
- package/dist/lib/statusline-config.d.ts +55 -0
- package/dist/lib/statusline-config.d.ts.map +1 -0
- package/dist/lib/structure-generator.d.ts +63 -0
- package/dist/lib/structure-generator.d.ts.map +1 -0
- package/dist/lib/supabase.d.ts +87 -0
- package/dist/lib/supabase.d.ts.map +1 -0
- package/dist/lib/sync-approvals.d.ts +108 -0
- package/dist/lib/sync-approvals.d.ts.map +1 -0
- package/dist/lib/tech-detect.d.ts +77 -0
- package/dist/lib/tech-detect.d.ts.map +1 -0
- package/dist/lib/template-walker.d.ts +26 -0
- package/dist/lib/template-walker.d.ts.map +1 -0
- package/dist/lib/templates-dir.d.ts +25 -0
- package/dist/lib/templates-dir.d.ts.map +1 -0
- package/dist/lib/types.d.ts +843 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/validate-waves.d.ts +38 -0
- package/dist/lib/validate-waves.d.ts.map +1 -0
- package/dist/lib/verify-parity.d.ts +154 -0
- package/dist/lib/verify-parity.d.ts.map +1 -0
- package/dist/lib/version.d.ts +3 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/watch-daemon.d.ts +114 -0
- package/dist/lib/watch-daemon.d.ts.map +1 -0
- package/dist/lib/worktree.d.ts +56 -0
- package/dist/lib/worktree.d.ts.map +1 -0
- package/dist/oauth/browser.d.ts +8 -0
- package/dist/oauth/browser.d.ts.map +1 -0
- package/dist/oauth/client-registration.d.ts +16 -0
- package/dist/oauth/client-registration.d.ts.map +1 -0
- package/dist/oauth/device-flow.d.ts +40 -0
- package/dist/oauth/device-flow.d.ts.map +1 -0
- package/dist/oauth/jwt-decode.d.ts +10 -0
- package/dist/oauth/jwt-decode.d.ts.map +1 -0
- package/dist/oauth/keychain.d.ts +17 -0
- package/dist/oauth/keychain.d.ts.map +1 -0
- package/dist/oauth/token-refresh.d.ts +7 -0
- package/dist/oauth/token-refresh.d.ts.map +1 -0
- package/dist/oauth/types.d.ts +28 -0
- package/dist/oauth/types.d.ts.map +1 -0
- package/dist/oauth/urls.d.ts +16 -0
- package/dist/oauth/urls.d.ts.map +1 -0
- package/package.json +5 -6
- package/templates/agents/cbp-security-agent.md +0 -1
- package/templates/agents/cbp-stripe-agent.md +0 -1
- package/templates/agents/cbp-testing-qa-agent.md +0 -1
- package/templates/github-workflows/ci.yml +5 -0
- package/templates/hooks/cbp-session-id-stamp.sh +67 -0
- package/templates/hooks/cbp-skill-context-guard.sh +0 -1
- package/templates/hooks/cbp-test-hooks.sh +105 -0
- package/templates/hooks/validate-structure-lib.sh +36 -9
- package/templates/rules/handoff-file-convention.md +65 -0
- package/templates/settings.project.base.json +17 -1
- package/templates/skills/cbp-checkpoint-check/SKILL.md +0 -1
- package/templates/skills/cbp-checkpoint-complete/SKILL.md +32 -0
- package/templates/skills/cbp-clear-continue/SKILL.md +23 -2
- package/templates/skills/cbp-clear-prep/SKILL.md +22 -2
- package/templates/skills/cbp-finalize/SKILL.md +36 -0
- package/templates/skills/cbp-session-end/SKILL.md +23 -25
- package/templates/skills/cbp-session-start/SKILL.md +24 -2
- package/templates/skills/cbp-setup-cd/SKILL.md +0 -1
- package/templates/skills/cbp-setup-ci/SKILL.md +0 -1
- package/templates/skills/cbp-standalone-task-complete/SKILL.md +32 -0
- package/templates/skills/cbp-stripe/SKILL.md +0 -1
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
export type Json = string | number | boolean | null | {
|
|
2
|
+
[key: string]: Json | undefined;
|
|
3
|
+
} | Json[];
|
|
4
|
+
export interface Repo {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
path: string | null;
|
|
8
|
+
git_branch: string | null;
|
|
9
|
+
auto_push_enabled: boolean;
|
|
10
|
+
user_id: string | null;
|
|
11
|
+
is_session_active: boolean;
|
|
12
|
+
session_status: string;
|
|
13
|
+
needs_refresh: boolean;
|
|
14
|
+
last_session_at: string | null;
|
|
15
|
+
server_port: number | null;
|
|
16
|
+
server_type: string;
|
|
17
|
+
active_servers: Json | null;
|
|
18
|
+
tech_stack: Json | null;
|
|
19
|
+
branch_config?: Json | null;
|
|
20
|
+
created_at: string;
|
|
21
|
+
updated_at: string;
|
|
22
|
+
}
|
|
23
|
+
export interface RepoSyncState {
|
|
24
|
+
id: string;
|
|
25
|
+
repo_id: string;
|
|
26
|
+
last_synced_at: string | null;
|
|
27
|
+
was_skipped: boolean;
|
|
28
|
+
files_synced_count: number;
|
|
29
|
+
files_pushed: number;
|
|
30
|
+
files_pulled: number;
|
|
31
|
+
files_deleted: number;
|
|
32
|
+
files_skipped: number;
|
|
33
|
+
sync_duration_ms: number | null;
|
|
34
|
+
sync_version: string | null;
|
|
35
|
+
user_id: string | null;
|
|
36
|
+
created_at: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
}
|
|
39
|
+
export interface CheckpointIdea {
|
|
40
|
+
description: string;
|
|
41
|
+
requirements: string[];
|
|
42
|
+
images: string[];
|
|
43
|
+
assessment?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface Checkpoint {
|
|
46
|
+
id: string;
|
|
47
|
+
repo_id: string;
|
|
48
|
+
title: string | null;
|
|
49
|
+
number: number;
|
|
50
|
+
goal: string | null;
|
|
51
|
+
idea: string | null;
|
|
52
|
+
idea_requirements: string | null;
|
|
53
|
+
ideas: CheckpointIdea[] | null;
|
|
54
|
+
deadline: string | null;
|
|
55
|
+
start_date: string | null;
|
|
56
|
+
status: string;
|
|
57
|
+
launch_id: string | null;
|
|
58
|
+
worktree_id: string | null;
|
|
59
|
+
assigned_to: string | null;
|
|
60
|
+
branch_name: string | null;
|
|
61
|
+
context: Json | null;
|
|
62
|
+
research: Json | null;
|
|
63
|
+
qa: Json | null;
|
|
64
|
+
plan: Json | null;
|
|
65
|
+
user_context: string | null;
|
|
66
|
+
is_claude_written: boolean;
|
|
67
|
+
context_development: Record<string, unknown> | null;
|
|
68
|
+
resources: Json | null;
|
|
69
|
+
completed_at: string | null;
|
|
70
|
+
created_at: string;
|
|
71
|
+
}
|
|
72
|
+
export interface Task {
|
|
73
|
+
id: string;
|
|
74
|
+
checkpoint_id: string | null;
|
|
75
|
+
repo_id: string | null;
|
|
76
|
+
title: string;
|
|
77
|
+
number: number;
|
|
78
|
+
requirements: string | null;
|
|
79
|
+
status: string;
|
|
80
|
+
files_changed: Json | null;
|
|
81
|
+
context: Json | null;
|
|
82
|
+
qa: Json | null;
|
|
83
|
+
research: Json | null;
|
|
84
|
+
user_context: string | null;
|
|
85
|
+
is_claude_written: boolean;
|
|
86
|
+
context_development: Record<string, unknown> | null;
|
|
87
|
+
resources: Json | null;
|
|
88
|
+
app_file_approval_by_user: boolean;
|
|
89
|
+
deadline: string | null;
|
|
90
|
+
branch_name: string | null;
|
|
91
|
+
template_id: string | null;
|
|
92
|
+
completed_at: string | null;
|
|
93
|
+
created_at: string;
|
|
94
|
+
}
|
|
95
|
+
export interface Round {
|
|
96
|
+
id: string;
|
|
97
|
+
task_id: string;
|
|
98
|
+
number: number;
|
|
99
|
+
requirements: string | null;
|
|
100
|
+
status: string;
|
|
101
|
+
files_changed: Json | null;
|
|
102
|
+
context: Json | null;
|
|
103
|
+
qa: Json | null;
|
|
104
|
+
user_context: string | null;
|
|
105
|
+
is_claude_written: boolean;
|
|
106
|
+
context_development: Record<string, unknown> | null;
|
|
107
|
+
resources: Json | null;
|
|
108
|
+
started_at: string | null;
|
|
109
|
+
completed_at: string | null;
|
|
110
|
+
duration_minutes: number | null;
|
|
111
|
+
triggered_by: string | null;
|
|
112
|
+
}
|
|
113
|
+
export interface WorkPlan {
|
|
114
|
+
id: string;
|
|
115
|
+
repo_id: string;
|
|
116
|
+
week_number: number;
|
|
117
|
+
year: number;
|
|
118
|
+
items: Json | null;
|
|
119
|
+
completed: Json | null;
|
|
120
|
+
created_at: string;
|
|
121
|
+
}
|
|
122
|
+
export interface Launch {
|
|
123
|
+
id: string;
|
|
124
|
+
repo_id: string;
|
|
125
|
+
title: string;
|
|
126
|
+
type: string;
|
|
127
|
+
status: string;
|
|
128
|
+
version: string | null;
|
|
129
|
+
user_requirements: Json | null;
|
|
130
|
+
created_at: string;
|
|
131
|
+
}
|
|
132
|
+
export interface SessionLog {
|
|
133
|
+
id: string;
|
|
134
|
+
repo_id: string;
|
|
135
|
+
session_date: string;
|
|
136
|
+
day_number: number;
|
|
137
|
+
session_number: number;
|
|
138
|
+
content: Json | null;
|
|
139
|
+
created_at: string;
|
|
140
|
+
}
|
|
141
|
+
export interface Worktree {
|
|
142
|
+
id: string;
|
|
143
|
+
repo_id: string;
|
|
144
|
+
name: string;
|
|
145
|
+
path: string | null;
|
|
146
|
+
status: string;
|
|
147
|
+
device_id?: string;
|
|
148
|
+
repo_path?: string;
|
|
149
|
+
branch?: string;
|
|
150
|
+
created_at: string;
|
|
151
|
+
updated_at: string;
|
|
152
|
+
}
|
|
153
|
+
export interface PortAllocation {
|
|
154
|
+
id: string;
|
|
155
|
+
repo_id: string;
|
|
156
|
+
port: number;
|
|
157
|
+
label: string;
|
|
158
|
+
server_type: string;
|
|
159
|
+
auto_start: string;
|
|
160
|
+
command: string | null;
|
|
161
|
+
working_dir: string | null;
|
|
162
|
+
env_vars: Json;
|
|
163
|
+
external_refs: Json;
|
|
164
|
+
worktree_id: string | null;
|
|
165
|
+
user_id: string | null;
|
|
166
|
+
created_at: string | null;
|
|
167
|
+
updated_at: string | null;
|
|
168
|
+
}
|
|
169
|
+
/** Desktop app server config types -- matches ~/.codebyplan/server-configs.json format */
|
|
170
|
+
export interface DesktopServerConfig {
|
|
171
|
+
label: string;
|
|
172
|
+
port: number | null;
|
|
173
|
+
command: string;
|
|
174
|
+
server_type: string;
|
|
175
|
+
auto_start: string;
|
|
176
|
+
}
|
|
177
|
+
export interface DesktopWorktreeConfig {
|
|
178
|
+
name: string;
|
|
179
|
+
path: string;
|
|
180
|
+
cloud_id?: string;
|
|
181
|
+
servers: DesktopServerConfig[];
|
|
182
|
+
}
|
|
183
|
+
export interface DesktopRepoConfig {
|
|
184
|
+
name: string;
|
|
185
|
+
path: string;
|
|
186
|
+
servers: DesktopServerConfig[];
|
|
187
|
+
cloud_id?: string;
|
|
188
|
+
worktrees?: DesktopWorktreeConfig[];
|
|
189
|
+
}
|
|
190
|
+
export interface DesktopServerConfigsFile {
|
|
191
|
+
repos: DesktopRepoConfig[];
|
|
192
|
+
}
|
|
193
|
+
export interface ListResponse<T> {
|
|
194
|
+
data: T[];
|
|
195
|
+
count: number;
|
|
196
|
+
}
|
|
197
|
+
export interface SingleResponse<T> {
|
|
198
|
+
data: T;
|
|
199
|
+
}
|
|
200
|
+
export interface SyncFilesData {
|
|
201
|
+
commands: SyncFile[];
|
|
202
|
+
agents: SyncFile[];
|
|
203
|
+
skills: SyncFile[];
|
|
204
|
+
rules: SyncFile[];
|
|
205
|
+
hooks: SyncFile[];
|
|
206
|
+
claude_md: SyncFile[];
|
|
207
|
+
settings: SyncFile[];
|
|
208
|
+
templates: SyncFile[];
|
|
209
|
+
docs_stack: SyncFile[];
|
|
210
|
+
docs: SyncFile[];
|
|
211
|
+
contexts: SyncFile[];
|
|
212
|
+
global_settings: SyncFile[];
|
|
213
|
+
}
|
|
214
|
+
export interface SyncFile {
|
|
215
|
+
id?: string;
|
|
216
|
+
name: string;
|
|
217
|
+
content: string;
|
|
218
|
+
category?: string | null;
|
|
219
|
+
updated_at?: string;
|
|
220
|
+
scope?: string;
|
|
221
|
+
content_hash?: string | null;
|
|
222
|
+
}
|
|
223
|
+
export interface TechStackEntry {
|
|
224
|
+
name: string;
|
|
225
|
+
category: string;
|
|
226
|
+
/** Detected behavioural capabilities (e.g., "jsx", "node-server", "cli-bin"). Optional for backwards compat. */
|
|
227
|
+
capabilities?: string[];
|
|
228
|
+
}
|
|
229
|
+
export interface AppTechStack {
|
|
230
|
+
name: string;
|
|
231
|
+
path: string;
|
|
232
|
+
stack: TechStackEntry[];
|
|
233
|
+
}
|
|
234
|
+
export interface TechStackResult {
|
|
235
|
+
repo: TechStackEntry[];
|
|
236
|
+
apps: AppTechStack[];
|
|
237
|
+
flat: TechStackEntry[];
|
|
238
|
+
}
|
|
239
|
+
export interface TechStackRow {
|
|
240
|
+
id: string;
|
|
241
|
+
repo_id: string;
|
|
242
|
+
name: string;
|
|
243
|
+
version: string | null;
|
|
244
|
+
category: string | null;
|
|
245
|
+
source_path: string | null;
|
|
246
|
+
is_dev: boolean;
|
|
247
|
+
dep_type: string | null;
|
|
248
|
+
last_seen_at: string;
|
|
249
|
+
created_at: string;
|
|
250
|
+
updated_at: string;
|
|
251
|
+
}
|
|
252
|
+
export interface TechStackSyncPayload {
|
|
253
|
+
dependencies: {
|
|
254
|
+
name: string;
|
|
255
|
+
version?: string;
|
|
256
|
+
category?: string;
|
|
257
|
+
source_path?: string;
|
|
258
|
+
is_dev?: boolean;
|
|
259
|
+
dep_type?: string;
|
|
260
|
+
}[];
|
|
261
|
+
}
|
|
262
|
+
export interface TechStackSyncSession {
|
|
263
|
+
id: string;
|
|
264
|
+
repo_id: string;
|
|
265
|
+
user_id: string | null;
|
|
266
|
+
started_at: string;
|
|
267
|
+
completed_at: string | null;
|
|
268
|
+
upserted_count: number;
|
|
269
|
+
removed_count: number;
|
|
270
|
+
added_names: string[];
|
|
271
|
+
removed_names: string[];
|
|
272
|
+
version_changed_names: string[];
|
|
273
|
+
changed: boolean;
|
|
274
|
+
status: "in_progress" | "completed" | "failed";
|
|
275
|
+
}
|
|
276
|
+
export interface TaskTemplate {
|
|
277
|
+
id: string;
|
|
278
|
+
repo_id: string | null;
|
|
279
|
+
name: string;
|
|
280
|
+
description: string | null;
|
|
281
|
+
requirements: string | null;
|
|
282
|
+
trigger_type: string;
|
|
283
|
+
trigger_config: Json;
|
|
284
|
+
auto_create: boolean;
|
|
285
|
+
user_id: string | null;
|
|
286
|
+
default_branch: string | null;
|
|
287
|
+
instructions: string | null;
|
|
288
|
+
priority: number | null;
|
|
289
|
+
created_at: string;
|
|
290
|
+
updated_at: string;
|
|
291
|
+
}
|
|
292
|
+
export interface SyncLock {
|
|
293
|
+
id: string;
|
|
294
|
+
user_id: string;
|
|
295
|
+
repo_id: string;
|
|
296
|
+
worktree_id: string | null;
|
|
297
|
+
locked_by: string;
|
|
298
|
+
reason: string | null;
|
|
299
|
+
locked_at: string;
|
|
300
|
+
expires_at: string;
|
|
301
|
+
created_at: string;
|
|
302
|
+
}
|
|
303
|
+
export interface SyncConflict {
|
|
304
|
+
id: string;
|
|
305
|
+
user_id: string;
|
|
306
|
+
repo_id: string;
|
|
307
|
+
claude_file_id: string;
|
|
308
|
+
conflict_type: string;
|
|
309
|
+
local_content: string | null;
|
|
310
|
+
remote_content: string | null;
|
|
311
|
+
base_content: string | null;
|
|
312
|
+
resolution_type: string | null;
|
|
313
|
+
resolved_content: string | null;
|
|
314
|
+
status: string;
|
|
315
|
+
sync_lock_id: string | null;
|
|
316
|
+
resolved_by_repo_id: string | null;
|
|
317
|
+
detected_at: string;
|
|
318
|
+
resolved_at: string | null;
|
|
319
|
+
created_at: string;
|
|
320
|
+
updated_at: string;
|
|
321
|
+
}
|
|
322
|
+
export interface FileChange {
|
|
323
|
+
id: string;
|
|
324
|
+
repo_id: string;
|
|
325
|
+
checkpoint_id: string | null;
|
|
326
|
+
task_id: string | null;
|
|
327
|
+
round_id: string | null;
|
|
328
|
+
file_path: string;
|
|
329
|
+
action: string;
|
|
330
|
+
source: string;
|
|
331
|
+
claude_approved: boolean;
|
|
332
|
+
user_approved: boolean;
|
|
333
|
+
approval_locked: boolean;
|
|
334
|
+
created_at: string;
|
|
335
|
+
updated_at: string;
|
|
336
|
+
}
|
|
337
|
+
export interface ClaudeFileRepo {
|
|
338
|
+
id: string;
|
|
339
|
+
claude_file_id: string;
|
|
340
|
+
repo_id: string;
|
|
341
|
+
last_synced_at: string | null;
|
|
342
|
+
last_synced_content_hash: string | null;
|
|
343
|
+
sync_status: string;
|
|
344
|
+
created_at: string;
|
|
345
|
+
updated_at: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Contents of `.codebyplan/repo.json` — repo-level identity (committed).
|
|
349
|
+
* This is the sentinel file used by `findCodebyplanConfig` walk-up.
|
|
350
|
+
*/
|
|
351
|
+
export interface RepoConfig {
|
|
352
|
+
repo_id: string;
|
|
353
|
+
organization_id?: string;
|
|
354
|
+
project_id?: string;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Contents of `.codebyplan/server.json` — server/port config (committed).
|
|
358
|
+
* `codebyplan config` fills these in; setup writes stubs.
|
|
359
|
+
*/
|
|
360
|
+
export interface ServerConfig {
|
|
361
|
+
server_port: number | null;
|
|
362
|
+
server_type: string | null;
|
|
363
|
+
auto_push_enabled: boolean;
|
|
364
|
+
port_allocations: PortAllocation[];
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Contents of `.codebyplan/server.local.json` — gitignored per-worktree
|
|
368
|
+
* port overlay. Written by `codebyplan ports --write-local`; never committed.
|
|
369
|
+
*
|
|
370
|
+
* Holds only the fields relevant to the active worktree's port allocation.
|
|
371
|
+
* Does NOT include `auto_push_enabled` (that lives only in server.json).
|
|
372
|
+
*
|
|
373
|
+
* `port_allocations` is typed `Partial<PortAllocation>[]`: the rows are an
|
|
374
|
+
* allowlist projection of the API response (see branch-port-resolver.ts
|
|
375
|
+
* ALLOWED_FIELDS), so any individual field may be absent. Readers
|
|
376
|
+
* (readServerLocalConfig) must treat each field as optional rather than
|
|
377
|
+
* assume a fully-populated PortAllocation.
|
|
378
|
+
*/
|
|
379
|
+
export interface ServerLocalConfig {
|
|
380
|
+
server_port: number | null;
|
|
381
|
+
server_type: string | null;
|
|
382
|
+
port_allocations: Partial<PortAllocation>[];
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Contents of `.codebyplan/git.json` — branch strategy config (committed).
|
|
386
|
+
* `codebyplan config` fills these in; setup writes stubs.
|
|
387
|
+
*/
|
|
388
|
+
export interface GitConfig {
|
|
389
|
+
git_branch: string | null;
|
|
390
|
+
branch_config: Json | null;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Contents of `.codebyplan/shipment.json` — shipment surfaces config (committed).
|
|
394
|
+
* `codebyplan config` fills this in; setup writes stub.
|
|
395
|
+
*/
|
|
396
|
+
export interface ShipmentConfig {
|
|
397
|
+
shipment: Json | null;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Contents of `.codebyplan/vendor.json` — reserved (committed).
|
|
401
|
+
* Formerly held `vendor_docs_path`; removed in CHK-116 when the vendor/ filesystem
|
|
402
|
+
* mirror was retired in favour of DB-backed DocsByPlan MCP. Written as an empty
|
|
403
|
+
* stub for forward compatibility.
|
|
404
|
+
*/
|
|
405
|
+
export type VendorConfig = Record<string, never>;
|
|
406
|
+
/**
|
|
407
|
+
* Per-framework configuration block within `.codebyplan/e2e.json`.
|
|
408
|
+
* Controls whether a given E2E framework is enabled, which app it targets,
|
|
409
|
+
* and framework-specific options (e.g. Playwright base_url, Maestro platforms).
|
|
410
|
+
*/
|
|
411
|
+
export interface E2eFrameworkConfig {
|
|
412
|
+
enabled: boolean;
|
|
413
|
+
app: string | null;
|
|
414
|
+
config_path: string | null;
|
|
415
|
+
auto_run: boolean;
|
|
416
|
+
test_dir?: string;
|
|
417
|
+
base_url?: string;
|
|
418
|
+
platforms?: Array<"android" | "ios">;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Credential variable names for a specific E2E framework within `.codebyplan/e2e.json`.
|
|
422
|
+
* Stores only the environment variable NAMES — never the secret values themselves.
|
|
423
|
+
*/
|
|
424
|
+
export interface E2eFrameworkCredentials {
|
|
425
|
+
email_var?: string;
|
|
426
|
+
password_var?: string;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Credential sourcing block within `.codebyplan/e2e.json`.
|
|
430
|
+
* Points to the gitignored env file that holds the secrets and records whether
|
|
431
|
+
* a provision script is available. The `frameworks` map holds only var names,
|
|
432
|
+
* never secret values.
|
|
433
|
+
*/
|
|
434
|
+
export interface E2eCredentials {
|
|
435
|
+
source: string;
|
|
436
|
+
gitignored: boolean;
|
|
437
|
+
provision_script: string | null;
|
|
438
|
+
frameworks: Record<string, E2eFrameworkCredentials>;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Contents of `.codebyplan/e2e.json` — E2E test framework configuration (committed,
|
|
442
|
+
* locally managed by /cbp-setup-e2e; NOT pulled from the DB).
|
|
443
|
+
*
|
|
444
|
+
* The at-rest stub written by setup/config is `{}` — both fields are optional so
|
|
445
|
+
* an empty object is a valid E2eConfig until /cbp-setup-e2e populates it.
|
|
446
|
+
*
|
|
447
|
+
* `frameworks` maps framework names (e.g. "playwright", "maestro") to their
|
|
448
|
+
* per-framework config. `credentials` holds only the env var NAMES and the path
|
|
449
|
+
* to the gitignored file that contains the actual secrets — secret values are
|
|
450
|
+
* never stored here.
|
|
451
|
+
*/
|
|
452
|
+
export interface E2eConfig {
|
|
453
|
+
frameworks?: Record<string, E2eFrameworkConfig>;
|
|
454
|
+
credentials?: E2eCredentials;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Per-app ESLint configuration entry within `.codebyplan/eslint.json`.
|
|
458
|
+
* Records which presets are enabled for one app/package (keyed by its
|
|
459
|
+
* `source_path` in the parent map), any user rule-severity overrides, and
|
|
460
|
+
* pointers to the relevant /cbp-setup-eslint reference docs. Holds NO rule
|
|
461
|
+
* bodies — those live in the DB ESLint presets and the generated
|
|
462
|
+
* `eslint.config.mjs`.
|
|
463
|
+
*/
|
|
464
|
+
export interface EslintAppConfig {
|
|
465
|
+
app: string;
|
|
466
|
+
enabled_presets: string[];
|
|
467
|
+
rule_overrides?: Record<string, "error" | "warn" | "off">;
|
|
468
|
+
config_path: string;
|
|
469
|
+
reference_docs?: string[];
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Contents of `.codebyplan/eslint.json` — per-app ESLint setup state (committed,
|
|
473
|
+
* locally managed by /cbp-setup-eslint; NOT pulled from the DB).
|
|
474
|
+
*
|
|
475
|
+
* The at-rest stub written by setup/config/migration is `{}` — `apps` is optional
|
|
476
|
+
* so an empty object is a valid EslintLocalConfig until /cbp-setup-eslint populates
|
|
477
|
+
* it. `apps` maps each app/package `source_path` (e.g. "apps/web", or "." for a
|
|
478
|
+
* single-app repo) to its EslintAppConfig. The rules themselves live in the DB
|
|
479
|
+
* ESLint presets and the generated `eslint.config.mjs`; this file only records
|
|
480
|
+
* which presets are enabled per app so /cbp-setup-eslint can refresh idempotently.
|
|
481
|
+
*/
|
|
482
|
+
export interface EslintLocalConfig {
|
|
483
|
+
apps?: Record<string, EslintAppConfig>;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Per-module entry in `.codebyplan/architecture.json`.
|
|
487
|
+
* Written by `codebyplan arch-map stamp`; read by `status` and `drift` subcommands.
|
|
488
|
+
*/
|
|
489
|
+
export interface ArchitectureModuleEntry {
|
|
490
|
+
path: string;
|
|
491
|
+
map_file: string;
|
|
492
|
+
generated_from_sha: string | null;
|
|
493
|
+
depth: "skeleton" | "deep";
|
|
494
|
+
generated_at: string | null;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Contents of `.codebyplan/architecture.json` — module map manifest (committed).
|
|
498
|
+
* Written as an empty stub by `setup` and `config`; updated by `arch-map stamp`.
|
|
499
|
+
*/
|
|
500
|
+
export interface ArchitectureConfig {
|
|
501
|
+
version: number;
|
|
502
|
+
modules: ArchitectureModuleEntry[];
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Contents of `.codebyplan/device.local.json` — per-device identity (gitignored).
|
|
506
|
+
* Written by setup and `writeLocalConfig`; never committed.
|
|
507
|
+
*/
|
|
508
|
+
export interface DeviceConfig {
|
|
509
|
+
device_id: string;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Per-line toggle configuration for the statusline renderer.
|
|
513
|
+
* All toggles default to `true` (all lines visible).
|
|
514
|
+
*/
|
|
515
|
+
export interface StatuslineLines {
|
|
516
|
+
identity: boolean;
|
|
517
|
+
context: boolean;
|
|
518
|
+
cost: boolean;
|
|
519
|
+
rate_limits: boolean;
|
|
520
|
+
repo_pr: boolean;
|
|
521
|
+
worktree: boolean;
|
|
522
|
+
infra_drift: boolean;
|
|
523
|
+
package_freshness: boolean;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Contents of `.codebyplan/statusline.json` — committed statusline config.
|
|
527
|
+
* Controls which line sections are rendered and whether ANSI colour is
|
|
528
|
+
* suppressed. Created on demand by `codebyplan statusline` and `setup`;
|
|
529
|
+
* never emitted by `codebyplan config` (no DB representation).
|
|
530
|
+
*/
|
|
531
|
+
export interface StatuslineConfig {
|
|
532
|
+
lines: StatuslineLines;
|
|
533
|
+
no_color: boolean;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Contents of `.codebyplan/statusline.local.json` — gitignored per-device
|
|
537
|
+
* renderer selection. Stores only the chosen runtime; absent means default
|
|
538
|
+
* to `"bash"`.
|
|
539
|
+
*/
|
|
540
|
+
export interface StatuslineLocalConfig {
|
|
541
|
+
renderer: "bash" | "node" | "python";
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Aggregate type representing the full `.codebyplan/` directory layout.
|
|
545
|
+
* All committed files are required; device (local) is always present at runtime
|
|
546
|
+
* but gitignored.
|
|
547
|
+
*/
|
|
548
|
+
export interface CodebyplanLayout {
|
|
549
|
+
repo: RepoConfig;
|
|
550
|
+
server: ServerConfig;
|
|
551
|
+
git: GitConfig;
|
|
552
|
+
shipment: ShipmentConfig;
|
|
553
|
+
vendor: VendorConfig;
|
|
554
|
+
e2e: E2eConfig;
|
|
555
|
+
device: DeviceConfig;
|
|
556
|
+
/** Committed statusline toggle config (optional — absent until first `statusline` run or `setup`). */
|
|
557
|
+
statusline?: StatuslineConfig;
|
|
558
|
+
/** Gitignored per-device renderer selection (optional — absent until user picks a renderer). */
|
|
559
|
+
statuslineLocal?: StatuslineLocalConfig;
|
|
560
|
+
}
|
|
561
|
+
/** System-managed ESLint configuration preset (mirrors eslint_presets table). */
|
|
562
|
+
export interface EslintPreset {
|
|
563
|
+
id: string;
|
|
564
|
+
name: string;
|
|
565
|
+
description: string | null;
|
|
566
|
+
tech_match: Json;
|
|
567
|
+
rules: Json;
|
|
568
|
+
dependencies: Json;
|
|
569
|
+
config_fragment: string | null;
|
|
570
|
+
display_order: number;
|
|
571
|
+
is_system: boolean;
|
|
572
|
+
user_id: string | null;
|
|
573
|
+
created_at: string;
|
|
574
|
+
updated_at: string;
|
|
575
|
+
}
|
|
576
|
+
/** Shape of eslint_presets.tech_match JSONB column. */
|
|
577
|
+
export interface EslintPresetTechMatch {
|
|
578
|
+
/**
|
|
579
|
+
* Tech-name requirements (legacy gate). When present and non-empty, every
|
|
580
|
+
* listed tech must be in the query's tech list for the preset to match.
|
|
581
|
+
*
|
|
582
|
+
* Optional because capability-only presets (e.g., `cli`) gate entirely on
|
|
583
|
+
* `requires_capabilities` and omit `requires` from the DB shape. See
|
|
584
|
+
* migration `20260424074737_eslint_cli_preset_capability_only.sql`.
|
|
585
|
+
*/
|
|
586
|
+
requires?: string[];
|
|
587
|
+
excludes?: string[];
|
|
588
|
+
/**
|
|
589
|
+
* Optional strict capability gate. When present with at least one entry, the preset
|
|
590
|
+
* matches only if ALL listed capabilities are present in the detected set.
|
|
591
|
+
*
|
|
592
|
+
* An empty array `[]` behaves identically to omitting the field — the preset is
|
|
593
|
+
* NOT gated (vacuously passes `.every()`). Use a non-empty array to declare
|
|
594
|
+
* strict capability requirements; omit the field to skip the capability gate.
|
|
595
|
+
*
|
|
596
|
+
* See also: `route.ts` strict D5 semantics (absent `capabilities` query param =
|
|
597
|
+
* empty set, presets with non-empty `requires_capabilities` do NOT match).
|
|
598
|
+
*/
|
|
599
|
+
requires_capabilities?: string[];
|
|
600
|
+
}
|
|
601
|
+
/** Per-repo per-app ESLint configuration state (mirrors eslint_repo_configs table). */
|
|
602
|
+
export interface EslintRepoConfig {
|
|
603
|
+
id: string;
|
|
604
|
+
repo_id: string;
|
|
605
|
+
source_path: string;
|
|
606
|
+
active_preset_ids: string[];
|
|
607
|
+
rule_overrides: Json;
|
|
608
|
+
generated_hash: string | null;
|
|
609
|
+
last_synced_at: string | null;
|
|
610
|
+
created_at: string;
|
|
611
|
+
updated_at: string;
|
|
612
|
+
}
|
|
613
|
+
/** GET response shape with resolved presets attached. */
|
|
614
|
+
export interface EslintRepoConfigWithPresets extends EslintRepoConfig {
|
|
615
|
+
presets: EslintPreset[];
|
|
616
|
+
}
|
|
617
|
+
export interface AutoPushResult {
|
|
618
|
+
pushed: boolean;
|
|
619
|
+
message: string;
|
|
620
|
+
error?: string;
|
|
621
|
+
}
|
|
622
|
+
export interface PromotionResult {
|
|
623
|
+
promoted: boolean;
|
|
624
|
+
pr_url: string | null;
|
|
625
|
+
pr_number: number | null;
|
|
626
|
+
checklist_id: string | null;
|
|
627
|
+
message: string;
|
|
628
|
+
error?: string;
|
|
629
|
+
}
|
|
630
|
+
export interface MergeChecklistTemplate {
|
|
631
|
+
id: string;
|
|
632
|
+
repo_id: string;
|
|
633
|
+
scope: "repo" | "branch_level";
|
|
634
|
+
branch_level: string | null;
|
|
635
|
+
title: string;
|
|
636
|
+
description: string | null;
|
|
637
|
+
order: number;
|
|
638
|
+
is_required: boolean;
|
|
639
|
+
created_at: string;
|
|
640
|
+
updated_at: string;
|
|
641
|
+
}
|
|
642
|
+
export interface MergeChecklistItem {
|
|
643
|
+
title: string;
|
|
644
|
+
description: string | null;
|
|
645
|
+
is_required: boolean;
|
|
646
|
+
checked: boolean;
|
|
647
|
+
checked_at: string | null;
|
|
648
|
+
}
|
|
649
|
+
export interface MergeChecklist {
|
|
650
|
+
id: string;
|
|
651
|
+
checkpoint_id: string;
|
|
652
|
+
template_id: string | null;
|
|
653
|
+
branch_level: string;
|
|
654
|
+
title: string;
|
|
655
|
+
status: string;
|
|
656
|
+
completed_at: string | null;
|
|
657
|
+
completed_by: string | null;
|
|
658
|
+
pr_url: string | null;
|
|
659
|
+
pr_number: number | null;
|
|
660
|
+
items: MergeChecklistItem[];
|
|
661
|
+
created_at: string;
|
|
662
|
+
updated_at: string;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* CI check categories — maps to the stages a CI pipeline runs.
|
|
666
|
+
* Includes "audit" for dependency security scanning (e.g. pnpm audit).
|
|
667
|
+
*/
|
|
668
|
+
export type CiCategory = "unit_test" | "typecheck" | "build" | "lint" | "e2e" | "audit";
|
|
669
|
+
/**
|
|
670
|
+
* Scope of a CI check — whether it runs only on changed apps or across the
|
|
671
|
+
* full repo regardless of what changed.
|
|
672
|
+
*/
|
|
673
|
+
export type CiScope = "per_app_changed" | "full_repo";
|
|
674
|
+
/**
|
|
675
|
+
* A single CI check within a platform.
|
|
676
|
+
*
|
|
677
|
+
* When `delegates_to` is set, the check configuration lives in a separate
|
|
678
|
+
* sibling config file (e.g. `.codebyplan/eslint.json` for lint,
|
|
679
|
+
* `.codebyplan/e2e.json` for e2e). In that case `command` is omitted — the
|
|
680
|
+
* owning skill reads the delegate file for command resolution.
|
|
681
|
+
*/
|
|
682
|
+
export interface CiCheck {
|
|
683
|
+
/** Shell command to run. Omitted when delegates_to is set. */
|
|
684
|
+
command?: string;
|
|
685
|
+
/** Whether this check applies to changed apps only or the full repo. */
|
|
686
|
+
scope: CiScope;
|
|
687
|
+
/** Whether a failure in this check blocks the PR/merge. */
|
|
688
|
+
hard_fail: boolean;
|
|
689
|
+
/**
|
|
690
|
+
* Path to the config file that owns this check category.
|
|
691
|
+
* Set for lint (→ .codebyplan/eslint.json) and e2e (→ .codebyplan/e2e.json).
|
|
692
|
+
*/
|
|
693
|
+
delegates_to?: string;
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* The set of CI checks configured for one platform (e.g. next_js, nestjs).
|
|
697
|
+
* All categories are optional — a platform that has no e2e, for example,
|
|
698
|
+
* simply omits that key.
|
|
699
|
+
*/
|
|
700
|
+
export type CiPlatformChecks = Partial<Record<CiCategory, CiCheck>>;
|
|
701
|
+
/**
|
|
702
|
+
* Top-level delegation pointers — config files that own specific check
|
|
703
|
+
* categories across all platforms. Matching the per-check `delegates_to`
|
|
704
|
+
* field but at the config level for quick lookup.
|
|
705
|
+
*/
|
|
706
|
+
export interface CiDelegation {
|
|
707
|
+
/** Path to eslint.json — owns lint config for all platforms. */
|
|
708
|
+
lint?: string;
|
|
709
|
+
/** Path to e2e.json — owns e2e config for all platforms. */
|
|
710
|
+
e2e?: string;
|
|
711
|
+
/** Reference doc that is the authoritative platform-detection source. */
|
|
712
|
+
detection?: string;
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* GitHub Actions CI workflow enforcement state.
|
|
716
|
+
* Mirrors `.codebyplan/shipment.json` `branching_configured.required_check_enforced`
|
|
717
|
+
* pattern for idempotent CLI runs.
|
|
718
|
+
*/
|
|
719
|
+
export interface CiWorkflowConfig {
|
|
720
|
+
/** Whether the required GitHub status check has been enforced via API or UI. */
|
|
721
|
+
required_check_enforced: boolean;
|
|
722
|
+
/** ISO timestamp of when the check was enforced. */
|
|
723
|
+
required_check_enforced_at?: string;
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Contents of `.codebyplan/ci.json` — per-platform CI check configuration
|
|
727
|
+
* (committed, locally managed by `codebyplan ci init`).
|
|
728
|
+
*
|
|
729
|
+
* `platforms` maps each detected platform slug (e.g. "next_js", "nestjs",
|
|
730
|
+
* "tauri", "package") to its CiPlatformChecks. Lint and e2e checks within
|
|
731
|
+
* each platform carry a `delegates_to` pointer to the owning config file
|
|
732
|
+
* rather than an inline `command`.
|
|
733
|
+
*
|
|
734
|
+
* The top-level `delegation` block mirrors the per-check `delegates_to` values
|
|
735
|
+
* for quick config-level lookup by scripts and skills.
|
|
736
|
+
*/
|
|
737
|
+
export interface CiConfig {
|
|
738
|
+
/** Per-platform CI check configuration, keyed by platform slug. */
|
|
739
|
+
platforms: Record<string, CiPlatformChecks>;
|
|
740
|
+
/** Top-level pointers to sibling config files that own specific check categories. */
|
|
741
|
+
delegation: CiDelegation;
|
|
742
|
+
/** Workflow-level enforcement state (required GitHub status check). */
|
|
743
|
+
workflow: CiWorkflowConfig;
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Trigger event that causes a CD pipeline to run for a surface.
|
|
747
|
+
*/
|
|
748
|
+
export type CdTrigger = "push-to-main" | "release-tags" | "workflow_dispatch";
|
|
749
|
+
/**
|
|
750
|
+
* Configuration for a single CD deployment surface (e.g. npm, tauri, vercel).
|
|
751
|
+
*
|
|
752
|
+
* Credentials are represented only by their environment variable NAMES — never
|
|
753
|
+
* by their actual secret values. Secret values are never stored in this config.
|
|
754
|
+
*/
|
|
755
|
+
export interface CdSurface {
|
|
756
|
+
/** The event that triggers this surface's CD pipeline. */
|
|
757
|
+
trigger: CdTrigger;
|
|
758
|
+
/**
|
|
759
|
+
* Optional path filter for the push trigger. When set, the pipeline only
|
|
760
|
+
* fires when the push touches files matching this glob (e.g.
|
|
761
|
+
* "packages/codebyplan-package/**" for the npm surface).
|
|
762
|
+
*/
|
|
763
|
+
path_filter?: string;
|
|
764
|
+
/** Optional deployment environment name (e.g. "production", "staging"). */
|
|
765
|
+
environment?: string;
|
|
766
|
+
/**
|
|
767
|
+
* Whether a human approval gate is required before deployment. Maps to a
|
|
768
|
+
* GitHub Actions `environment` with a protection rule when true.
|
|
769
|
+
*/
|
|
770
|
+
approval_required: boolean;
|
|
771
|
+
/**
|
|
772
|
+
* Whether OIDC-based short-lived credentials are used instead of long-lived
|
|
773
|
+
* API keys or tokens. True for npm Trusted Publishing; false for surfaces that
|
|
774
|
+
* use static secrets.
|
|
775
|
+
*/
|
|
776
|
+
oidc_auth: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Whether the pipeline enforces a version gate before deploying
|
|
779
|
+
* (e.g. skip if the version is already published / the tag already exists).
|
|
780
|
+
*/
|
|
781
|
+
version_gate: boolean;
|
|
782
|
+
/**
|
|
783
|
+
* Whether `codebyplan cd scaffold-workflow` generates a GitHub Actions
|
|
784
|
+
* workflow for this surface. True for npm (publish.yml) and tauri
|
|
785
|
+
* (release-desktop.yml); false for surfaces recorded as deploy policy only
|
|
786
|
+
* (e.g. vercel / railway / supabase) that have no auto-scaffolded workflow yet.
|
|
787
|
+
*/
|
|
788
|
+
auto_scaffolded_workflow?: boolean;
|
|
789
|
+
/**
|
|
790
|
+
* Credential references for this surface — env var NAMES and optional
|
|
791
|
+
* pointer to a gitignored env file. Secret values are NEVER stored here.
|
|
792
|
+
*/
|
|
793
|
+
credentials?: {
|
|
794
|
+
/** Names of the environment variables that carry secrets for this surface. */
|
|
795
|
+
env_var_names: string[];
|
|
796
|
+
/**
|
|
797
|
+
* Optional path to a gitignored env file that holds the secrets (e.g.
|
|
798
|
+
* ".env.local"). Never committed; never contain values here.
|
|
799
|
+
*/
|
|
800
|
+
gitignored_env_file?: string;
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* Canonical CD surface identifiers. Extensible — callers may also use arbitrary
|
|
805
|
+
* string keys for custom/unknown surfaces.
|
|
806
|
+
*/
|
|
807
|
+
export type CdSurfaceId = "vercel" | "eas" | "npm" | "tauri" | "railway" | "supabase" | "vscode";
|
|
808
|
+
/**
|
|
809
|
+
* Workflow-level CD state — tracks whether the GitHub Actions workflow files
|
|
810
|
+
* have been scaffolded into the project.
|
|
811
|
+
*/
|
|
812
|
+
export interface CdWorkflowConfig {
|
|
813
|
+
/** Whether the CD workflow YAML files have been written by `codebyplan cd scaffold-workflow`. */
|
|
814
|
+
workflows_scaffolded: boolean;
|
|
815
|
+
/** ISO timestamp of when the workflows were last scaffolded. */
|
|
816
|
+
scaffolded_at?: string;
|
|
817
|
+
/**
|
|
818
|
+
* Whether the npm OIDC Trusted Publisher rule has been verified on npmjs.com
|
|
819
|
+
* (recorded by `cbp-setup-cd` Step 7). Optional — absent until that step runs.
|
|
820
|
+
*/
|
|
821
|
+
npm_oidc_publisher_verified?: boolean;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* Contents of `.codebyplan/cd.json` — per-surface CD configuration
|
|
825
|
+
* (committed, locally managed by `codebyplan cd init`).
|
|
826
|
+
*
|
|
827
|
+
* `surfaces` maps each CD surface slug (e.g. "npm", "tauri", "vercel") to its
|
|
828
|
+
* CdSurface config. Surface detection is driven by `.codebyplan/shipment.json`
|
|
829
|
+
* surface keys — policy-explicit, NOT filesystem-inferred.
|
|
830
|
+
*
|
|
831
|
+
* Credentials are represented only by env var NAMES — secret values are never
|
|
832
|
+
* stored here or committed to the repo.
|
|
833
|
+
*/
|
|
834
|
+
export interface CdConfig {
|
|
835
|
+
/**
|
|
836
|
+
* Per-surface CD configuration. Keys are CdSurfaceId values or custom
|
|
837
|
+
* surface slugs matching shipment.json surface keys.
|
|
838
|
+
*/
|
|
839
|
+
surfaces: Partial<Record<string, CdSurface>>;
|
|
840
|
+
/** Workflow-level scaffolding state. */
|
|
841
|
+
workflow: CdWorkflowConfig;
|
|
842
|
+
}
|
|
843
|
+
//# sourceMappingURL=types.d.ts.map
|