@dendelion/paper-camp 0.43.0 → 0.45.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.
Files changed (124) hide show
  1. package/dist/chunks/{daemon-state.Evil_jr0.js → daemon-state.BEsOWFz5.js} +79 -75
  2. package/dist/chunks/daemon-state.BEsOWFz5.js.map +1 -0
  3. package/dist/chunks/dev-port.CKE4LWyl.js +55 -0
  4. package/dist/chunks/dev-port.CKE4LWyl.js.map +1 -0
  5. package/dist/chunks/phase-progress.BCqVUFLp.js +4094 -0
  6. package/dist/chunks/phase-progress.BCqVUFLp.js.map +1 -0
  7. package/dist/cli/index.js +8897 -7707
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/core/assets.d.ts +11 -0
  10. package/dist/core/assets.d.ts.map +1 -0
  11. package/dist/core/batch-readiness.d.ts +43 -0
  12. package/dist/core/batch-readiness.d.ts.map +1 -0
  13. package/dist/core/batch-readiness.test.d.ts +2 -0
  14. package/dist/core/batch-readiness.test.d.ts.map +1 -0
  15. package/dist/core/batch-run.d.ts +106 -0
  16. package/dist/core/batch-run.d.ts.map +1 -0
  17. package/dist/core/batch-run.test.d.ts +2 -0
  18. package/dist/core/batch-run.test.d.ts.map +1 -0
  19. package/dist/core/capacity.d.ts +14 -0
  20. package/dist/core/capacity.d.ts.map +1 -0
  21. package/dist/core/capacity.test.d.ts +2 -0
  22. package/dist/core/capacity.test.d.ts.map +1 -0
  23. package/dist/core/ci/ci-release.d.ts +4 -3
  24. package/dist/core/ci/ci-release.d.ts.map +1 -1
  25. package/dist/core/ci/ci-run-word.d.ts +3 -0
  26. package/dist/core/ci/ci-run-word.d.ts.map +1 -0
  27. package/dist/core/corpus.d.ts +83 -0
  28. package/dist/core/corpus.d.ts.map +1 -0
  29. package/dist/core/corpus.test.d.ts +2 -0
  30. package/dist/core/corpus.test.d.ts.map +1 -0
  31. package/dist/{vite → core}/daemon-target.d.ts.map +1 -1
  32. package/dist/core/daemon-target.test.d.ts.map +1 -0
  33. package/dist/core/desk-config.d.ts +3 -0
  34. package/dist/core/desk-config.d.ts.map +1 -0
  35. package/dist/core/desk-discovery/evidence.d.ts +4 -3
  36. package/dist/core/desk-discovery/evidence.d.ts.map +1 -1
  37. package/dist/core/doctor/checks/assets.d.ts +3 -0
  38. package/dist/core/doctor/checks/assets.d.ts.map +1 -0
  39. package/dist/core/doctor/checks/assets.test.d.ts +2 -0
  40. package/dist/core/doctor/checks/assets.test.d.ts.map +1 -0
  41. package/dist/core/doctor/checks/local-state.d.ts +3 -0
  42. package/dist/core/doctor/checks/local-state.d.ts.map +1 -0
  43. package/dist/core/doctor/checks/local-state.test.d.ts +2 -0
  44. package/dist/core/doctor/checks/local-state.test.d.ts.map +1 -0
  45. package/dist/core/doctor/checks/tooling.d.ts.map +1 -1
  46. package/dist/core/doctor/doctor.d.ts +14 -0
  47. package/dist/core/doctor/doctor.d.ts.map +1 -1
  48. package/dist/core/doctor/rules.d.ts +36 -1
  49. package/dist/core/doctor/rules.d.ts.map +1 -1
  50. package/dist/core/entity-view.d.ts.map +1 -1
  51. package/dist/core/git-log.d.ts +13 -2
  52. package/dist/core/git-log.d.ts.map +1 -1
  53. package/dist/core/git-pr/pr-lookup.d.ts.map +1 -1
  54. package/dist/core/index.d.ts +1 -0
  55. package/dist/core/index.d.ts.map +1 -1
  56. package/dist/core/index.js +183 -176
  57. package/dist/core/local-paths.d.ts +17 -0
  58. package/dist/core/local-paths.d.ts.map +1 -0
  59. package/dist/core/machine-registry/machine-registry.d.ts +3 -0
  60. package/dist/core/machine-registry/machine-registry.d.ts.map +1 -1
  61. package/dist/core/needs.d.ts +15 -6
  62. package/dist/core/needs.d.ts.map +1 -1
  63. package/dist/core/night-health.d.ts.map +1 -1
  64. package/dist/core/night-shift.d.ts +2 -2
  65. package/dist/core/night-shift.d.ts.map +1 -1
  66. package/dist/core/parked-questions.d.ts +1 -1
  67. package/dist/core/parked-questions.d.ts.map +1 -1
  68. package/dist/core/parse/schemas.d.ts +4 -0
  69. package/dist/core/parse/schemas.d.ts.map +1 -1
  70. package/dist/core/project-config.d.ts +16 -0
  71. package/dist/core/project-config.d.ts.map +1 -0
  72. package/dist/core/project-config.test.d.ts +2 -0
  73. package/dist/core/project-config.test.d.ts.map +1 -0
  74. package/dist/core/push-store.d.ts +2 -1
  75. package/dist/core/push-store.d.ts.map +1 -1
  76. package/dist/core/rate-limit.d.ts +0 -8
  77. package/dist/core/rate-limit.d.ts.map +1 -1
  78. package/dist/core/readers.d.ts +1 -12
  79. package/dist/core/readers.d.ts.map +1 -1
  80. package/dist/core/release-notes.d.ts +7 -1
  81. package/dist/core/release-notes.d.ts.map +1 -1
  82. package/dist/core/run-filters.d.ts +0 -1
  83. package/dist/core/run-filters.d.ts.map +1 -1
  84. package/dist/core/run-order.d.ts +0 -1
  85. package/dist/core/run-order.d.ts.map +1 -1
  86. package/dist/core/run-rows.d.ts +7 -2
  87. package/dist/core/run-rows.d.ts.map +1 -1
  88. package/dist/core/scaffold/scaffold.d.ts +1 -0
  89. package/dist/core/scaffold/scaffold.d.ts.map +1 -1
  90. package/dist/core/scaffold/templates.d.ts +5 -1
  91. package/dist/core/scaffold/templates.d.ts.map +1 -1
  92. package/dist/core/sections.d.ts +0 -2
  93. package/dist/core/sections.d.ts.map +1 -1
  94. package/dist/core/serialize/entity-file.d.ts +2 -1
  95. package/dist/core/serialize/entity-file.d.ts.map +1 -1
  96. package/dist/core/serialize/entity-file.test.d.ts +2 -0
  97. package/dist/core/serialize/entity-file.test.d.ts.map +1 -0
  98. package/dist/core/service-status.d.ts +9 -0
  99. package/dist/core/service-status.d.ts.map +1 -0
  100. package/dist/core/service-status.test.d.ts +2 -0
  101. package/dist/core/service-status.test.d.ts.map +1 -0
  102. package/dist/core/stats.d.ts +3 -1
  103. package/dist/core/stats.d.ts.map +1 -1
  104. package/dist/core/tailnet.d.ts +2 -1
  105. package/dist/core/tailnet.d.ts.map +1 -1
  106. package/dist/core/trail.d.ts +6 -0
  107. package/dist/core/trail.d.ts.map +1 -1
  108. package/dist/toolbar/toolbar.js +7328 -4620
  109. package/dist/toolbar/toolbar.js.map +1 -1
  110. package/dist/types/index.d.ts +57 -6
  111. package/dist/types/index.d.ts.map +1 -1
  112. package/dist/types/index.js +24 -19
  113. package/dist/types/index.js.map +1 -1
  114. package/dist/vite/index.js +18 -32
  115. package/dist/vite/index.js.map +1 -1
  116. package/package.json +7 -2
  117. package/dist/chunks/daemon-state.Evil_jr0.js.map +0 -1
  118. package/dist/chunks/dev-port.DG-T8zNq.js +0 -42
  119. package/dist/chunks/dev-port.DG-T8zNq.js.map +0 -1
  120. package/dist/chunks/needs.BL7yYaO7.js +0 -3549
  121. package/dist/chunks/needs.BL7yYaO7.js.map +0 -1
  122. package/dist/vite/daemon-target.test.d.ts.map +0 -1
  123. /package/dist/{vite → core}/daemon-target.d.ts +0 -0
  124. /package/dist/{vite → core}/daemon-target.test.d.ts +0 -0
@@ -0,0 +1,11 @@
1
+ import { AssetEntry } from '../types/index';
2
+ export declare function mimeForAssetName(name: string): string;
3
+ export declare function sandboxCspForMime(mime: string): string | undefined;
4
+ /** A name must be exactly one path segment, so `..` and a slash are refused —
5
+ * both would otherwise escape `papercamp/assets/<id>/` (IDEA-322). */
6
+ export declare function isSafeAssetName(name: string): boolean;
7
+ export declare function ideaAssetsDir(assetsDir: string, id: string): string;
8
+ /** Lists one idea's folder under `papercamp/assets/<id>/` — the only source of
9
+ * truth for its files (IDEA-322); a missing folder is just no assets, not an error. */
10
+ export declare function listIdeaAssets(assetsDir: string, id: string): Promise<AssetEntry[]>;
11
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/core/assets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAyBjD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElE;AAED;sEACsE;AACtE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;uFACuF;AACvF,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAsBzF"}
@@ -0,0 +1,43 @@
1
+ import { PhaseItem, ResolvedNeed, ThreadMessage } from '../types/index';
2
+ export type BatchReadinessReason = 'needs' | 'manual-only' | 'open-question' | 'stale-base' | 'no-agent';
3
+ export type BatchReadiness = {
4
+ ready: true;
5
+ } | {
6
+ ready: false;
7
+ reason: BatchReadinessReason;
8
+ message: string;
9
+ };
10
+ /**
11
+ * Whether an idea/plan can be run unattended right now — `ready`, or the first
12
+ * reason it isn't, in the order IDEA-321 lists them. Callers resolve each input
13
+ * (needs, thread, git staleness, agent config) the same way `startRunAllPhases`
14
+ * and the run-order pass already do, so this stays a pure combinator over
15
+ * already-resolved facts rather than redoing any of that I/O.
16
+ */
17
+ export declare function batchReadiness(entity: {
18
+ resolvedNeeds?: ResolvedNeed[];
19
+ phases: PhaseItem[];
20
+ fixes?: PhaseItem[];
21
+ thread?: ThreadMessage[];
22
+ staleBase: string | null;
23
+ hasAgent: boolean;
24
+ }): BatchReadiness;
25
+ export interface BatchBacklogItem {
26
+ id: string;
27
+ title: string;
28
+ hasPhases: boolean;
29
+ }
30
+ /** Ideas that can't join the queue yet because their derived status is still `idea`:
31
+ * either no phases (draft them first) or phases under a stored `idea` status that
32
+ * the derivation couldn't promote (mark them planned). Oldest first, like the run
33
+ * order's own append rule. */
34
+ export declare function selectBatchBacklog(classified: {
35
+ id: string;
36
+ title: string;
37
+ created: string;
38
+ status?: string;
39
+ }[], entries: {
40
+ id: string;
41
+ phases: PhaseItem[];
42
+ }[]): BatchBacklogItem[];
43
+ //# sourceMappingURL=batch-readiness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-readiness.d.ts","sourceRoot":"","sources":["../../src/core/batch-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG7E,MAAM,MAAM,oBAAoB,GAC5B,OAAO,GACP,aAAa,GACb,eAAe,GACf,YAAY,GACZ,UAAU,CAAC;AAEf,MAAM,MAAM,cAAc,GACtB;IAAE,KAAK,EAAE,IAAI,CAAA;CAAE,GACf;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAUpE;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAwBjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;8BAG8B;AAC9B,wBAAgB,kBAAkB,CAChC,UAAU,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EAC7E,OAAO,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,EAAE,CAAA;CAAE,EAAE,GAC7C,gBAAgB,EAAE,CAUpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=batch-readiness.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-readiness.test.d.ts","sourceRoot":"","sources":["../../src/core/batch-readiness.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,106 @@
1
+ import { CheckName, RateLimitSnapshot } from '../types/index';
2
+ export interface BatchRunRules {
3
+ /** Add a run-order idea unblocked mid-batch by the one that just finished. */
4
+ pickupUnblocked: boolean;
5
+ /** Percent utilisation; defaults to the night settings' value when unset. */
6
+ ceiling?: number;
7
+ floor?: number;
8
+ onCeiling: 'wait' | 'stop';
9
+ /** Epoch ms — stop before starting the next idea once past this. */
10
+ stopAtMs?: number;
11
+ maxIdeas?: number;
12
+ maxCostUsd?: number;
13
+ /** Cut `idea/IDEA-N` from freshly fetched main for each idea instead of committing
14
+ * straight to main — for a project that ships through PRs (IDEA-321). */
15
+ branchPerIdea?: boolean;
16
+ }
17
+ export declare const DEFAULT_BATCH_RUN_RULES: BatchRunRules;
18
+ export type BatchRunItemOutcome = 'queued' | 'running' | 'review' | 'needs-you' | 'needs-human' | 'failed-clean' | 'failed-dirty' | 'red-checks' | 'auth' | 'conflict' | 'skipped' | 'stopped';
19
+ export interface BatchRunItem {
20
+ id: string;
21
+ title: string;
22
+ outcome: BatchRunItemOutcome;
23
+ reason?: string;
24
+ /** The per-idea run-all task id, once it has started. */
25
+ taskId?: string;
26
+ }
27
+ export type BatchRunPauseReason = {
28
+ kind: 'capacity-ceiling';
29
+ resetsAt?: number;
30
+ } | {
31
+ kind: 'capacity-floor';
32
+ } | {
33
+ kind: 'failed-dirty';
34
+ id: string;
35
+ } | {
36
+ kind: 'red-checks';
37
+ id: string;
38
+ } | {
39
+ kind: 'auth';
40
+ id: string;
41
+ } | {
42
+ kind: 'conflict';
43
+ id: string;
44
+ conflictPrompt: string;
45
+ };
46
+ export type BatchRunStatus = 'running' | 'paused' | 'done' | 'interrupted';
47
+ export interface BatchRunState {
48
+ taskId: string;
49
+ startedAt: string;
50
+ updatedAt: string;
51
+ rules: BatchRunRules;
52
+ /** Checks already red when the batch started — fixed for every idea in the run,
53
+ * rather than each idea recomputing its own baseline (IDEA-321). */
54
+ toleratedRed: CheckName[];
55
+ /** The ids ticked when the batch was started, in run order. */
56
+ initialIds: string[];
57
+ items: BatchRunItem[];
58
+ ideasRun: number;
59
+ costUsd: number;
60
+ status: BatchRunStatus;
61
+ pause?: BatchRunPauseReason;
62
+ }
63
+ /** Best-effort, like the other `.local` caches: a write failure must not fail the
64
+ * batch run that triggered it — worst case a restart loses the latest snapshot. */
65
+ export declare function writeBatchRunState(root: string, state: BatchRunState): Promise<void>;
66
+ export declare function readBatchRunState(root: string): Promise<BatchRunState | null>;
67
+ export declare function clearBatchRunState(root: string): Promise<void>;
68
+ /** A daemon restart mid-batch leaves nothing in memory to finish the run, so the
69
+ * persisted state is marked `interrupted` — distinct from `paused`, which the batch
70
+ * itself chose — and the app offers *Resume* either way (IDEA-321). */
71
+ export declare function markBatchRunInterrupted(root: string): Promise<boolean>;
72
+ export type CapacityGateResult = {
73
+ open: true;
74
+ } | {
75
+ open: false;
76
+ reason: 'ceiling';
77
+ resetsAt?: number;
78
+ } | {
79
+ open: false;
80
+ reason: 'floor';
81
+ };
82
+ /** The night gate (`evaluateNightGate`), slimmed to the two rate-limit checks the
83
+ * batch cares about — no dashboard-idle or time-window reason, since the user
84
+ * started this themselves (IDEA-321). */
85
+ export declare function evaluateBatchCapacityGate(input: {
86
+ snapshot: RateLimitSnapshot | null;
87
+ ceiling: number;
88
+ floor: number;
89
+ }): CapacityGateResult;
90
+ export type BudgetStopResult = {
91
+ stop: false;
92
+ } | {
93
+ stop: true;
94
+ reason: 'clock' | 'max-ideas' | 'max-cost';
95
+ };
96
+ /** The clock/count/cost limits set in the batch sheet — checked before starting the
97
+ * next idea, so a limit crossed mid-idea still lets that idea finish. */
98
+ export declare function evaluateBatchBudget(input: {
99
+ now: number;
100
+ stopAtMs?: number;
101
+ ideasRun: number;
102
+ maxIdeas?: number;
103
+ costUsd: number;
104
+ maxCostUsd?: number;
105
+ }): BudgetStopResult;
106
+ //# sourceMappingURL=batch-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-run.d.ts","sourceRoot":"","sources":["../../src/core/batch-run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGnE,MAAM,WAAW,aAAa;IAC5B,8EAA8E;IAC9E,eAAe,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;6EACyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,uBAAuB,EAAE,aAGrC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,WAAW,GACX,aAAa,GACb,cAAc,GACd,cAAc,GACd,YAAY,GACZ,MAAM,GACN,UAAU,GACV,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,mBAAmB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,kBAAkB,CAAC;I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ACvE,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAS5E;AAED,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,GACd;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAErC;;yCAEyC;AACzC,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,kBAAkB,CAUrB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GACf;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,CAAA;CAAE,CAAC;AAE/D;yEACyE;AACzE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,gBAAgB,CAWnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=batch-run.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-run.test.d.ts","sourceRoot":"","sources":["../../src/core/batch-run.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { RateLimitSnapshot } from '../types/index';
2
+ export type CapacitySource = 'run' | 'probe';
3
+ export interface CapacityRecord {
4
+ snapshot: RateLimitSnapshot;
5
+ capturedAt: string;
6
+ source: CapacitySource;
7
+ }
8
+ export declare function writeCapacity(snapshot: RateLimitSnapshot, source: CapacitySource): Promise<void>;
9
+ export declare function readCapacity(): Promise<CapacityRecord | null>;
10
+ /** Called by the IDEA-320 migration for each project that still has its own
11
+ * `papercamp/capacity.json` — the account's limits are the same everywhere, so
12
+ * whichever project's copy has the newest `capturedAt` wins the one machine file. */
13
+ export declare function adoptCapacityRecord(value: unknown): Promise<boolean>;
14
+ //# sourceMappingURL=capacity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capacity.d.ts","sourceRoot":"","sources":["../../src/core/capacity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,OAAO,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;CACxB;AAkBD,wBAAsB,aAAa,CACjC,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CASnE;AAED;;qFAEqF;AACrF,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAU1E"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=capacity.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capacity.test.d.ts","sourceRoot":"","sources":["../../src/core/capacity.test.ts"],"names":[],"mappings":""}
@@ -32,7 +32,8 @@ export declare function failedJobNames(jobs: GhJobRow[]): string[];
32
32
  export declare function pickReleasePr(rows: GhPrRow[]): ReleasePr | null;
33
33
  export declare function latestDraftPrRun(rows: GhRunRow[]): CiRun | null;
34
34
  export declare function hasSecret(rows: GhSecretRow[], name: string): boolean;
35
- export declare function clearCiCache(): void;
36
- export declare function fetchCiReleaseState(ci: DeskCi, ttlMs?: number): Promise<CiReleaseState>;
37
- export {};
35
+ export { ciRunWord } from './ci-run-word';
36
+ export declare function clearCiCache(root: string): void;
37
+ export declare function clearCiCacheEntry(root: string, ci: DeskCi): void;
38
+ export declare function fetchCiReleaseState(root: string, ci: DeskCi, ttlMs?: number): Promise<CiReleaseState>;
38
39
  //# sourceMappingURL=ci-release.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ci-release.d.ts","sourceRoot":"","sources":["../../../src/core/ci/ci-release.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EACL,WAAW,EACX,MAAM,EAEN,SAAS,EACV,MAAM,mBAAmB,CAAC;AAO3B,UAAU,QAAQ;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,OAAO;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC5B;AAOD,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAsCD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,WAAW,CAqB5E;AAED,wBAAgB,YAAY,C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';
2
+ export declare function ciRunWord(status: CiRunStatus): string;
3
+ //# sourceMappingURL=ci-run-word.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-run-word.d.ts","sourceRoot":"","sources":["../../../src/core/ci/ci-run-word.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAWrD,wBAAgB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAErD"}
@@ -0,0 +1,83 @@
1
+ import { EntityEntry, EntityKind, EntityStatus, IdeaEntry, ParseWarning, PhaseItem, PlanEntry, PrInfo, ThreadMessage } from '../types/index';
2
+ import { formatEntityFile } from './serialize';
3
+ export interface CorpusSnapshot {
4
+ entries: EntityEntry[];
5
+ work: PlanEntry[];
6
+ notes: IdeaEntry[];
7
+ warnings: ParseWarning[];
8
+ prs: Map<string, PrInfo> | undefined;
9
+ resolved: boolean;
10
+ mainActivityIds: Set<string>;
11
+ fingerprint: string;
12
+ }
13
+ export declare function corpusFingerprint(ideasDir: string): Promise<string>;
14
+ export declare function invalidateCorpus(root: string): void;
15
+ /** One snapshot of the whole corpus — entries, their plan/idea views, resolved PRs,
16
+ * main-branch activity and the fingerprint they were all read at — cached per root
17
+ * until a file under papercamp/ changes or the PR map refreshes. `live: true` lets
18
+ * the PR lookup shell out to `gh` on its usual TTL; `false` (the default) serves
19
+ * whatever's cached/persisted, for file-watcher-driven reads that aren't a human ask. */
20
+ export declare function readCorpus(root: string, opts?: {
21
+ live?: boolean;
22
+ }): Promise<CorpusSnapshot>;
23
+ export declare function readMaybe(path: string): Promise<string>;
24
+ export declare function fileExists(path: string): Promise<boolean>;
25
+ export { GITATTRIBUTES_BLOCK_BODY, GITATTRIBUTES_BLOCK_END, GITATTRIBUTES_BLOCK_START, localFile, PLAN_NAMES, planFile, } from './local-paths';
26
+ export interface LocalStateDrift {
27
+ /** Files tracked by git under `papercamp/` whose top-level name isn't part of
28
+ * `PLAN_NAMES` — the committed-but-should-be-local drift IDEA-320 migrates away. */
29
+ trackedOutsidePlan: string[];
30
+ hasLocalGitignore: boolean;
31
+ hasGitattributesBlock: boolean;
32
+ }
33
+ export declare function localStateDriftCount(drift: LocalStateDrift | null): number;
34
+ /** Also used at daemon mount (for the projects page's drift total) and by `paper-camp
35
+ * doctor`/the git card, so the three checks live in one place next to what they check.
36
+ * `null` outside a git repo (nothing committed yet to drift, nothing to check). */
37
+ export declare function readLocalStateDrift(root: string): Promise<LocalStateDrift | null>;
38
+ export type EntityFileInput = Parameters<typeof formatEntityFile>[0];
39
+ export declare function entityFileInput(entry: EntityEntry, overrides?: Partial<EntityFileInput>): EntityFileInput;
40
+ export declare function writeEntityFile(root: string, path: string, input: EntityFileInput): Promise<void>;
41
+ /** Thrown by the write primitives below; routes map `status` straight onto the
42
+ * HTTP response, MCP tools and hooks just read `.message`. */
43
+ export declare class CorpusError extends Error {
44
+ readonly status: number;
45
+ constructor(message: string, status?: number);
46
+ }
47
+ /** Resolves an id to its file, trying the primary ideas dir then `archive/` —
48
+ * every write primitive below goes through this instead of assuming primary. */
49
+ export declare function resolveEntityFilePath(root: string, id: string): Promise<string | null>;
50
+ /** Reads entity `id` (primary or archived), lets `mutate` compute the field
51
+ * overrides to apply, then writes it back — or, if `mutate` returns `undefined`,
52
+ * leaves the file untouched (e.g. a phase index that no longer exists). A
53
+ * done/archived entity (IDEA-187) refuses an override that adds phases/fixes, edits
54
+ * the body, or reopens its status to anything but `done`/`dropped` — those spawn
55
+ * their own linked fix entity instead; status, thread, agent, subject and order edits
56
+ * still go through. `mutate`'s return is merged on top of every field carried over
57
+ * from the parsed entry (see `entityFileInput`), so a key is only ever changed when
58
+ * the override names it — an explicit `undefined` clears it, same as an omitted key
59
+ * leaves it untouched, except for `status`, where the two differ: present-but-
60
+ * `undefined` clears the stored override (and unarchives), omitted leaves it as-is. */
61
+ export declare function updateEntity(root: string, id: string, mutate: (entry: EntityEntry) => Partial<EntityFileInput> | undefined): Promise<EntityEntry>;
62
+ /** Appends one thread message to entity `id` — the same closed-entity guard as
63
+ * `updateEntity` applies, but a thread append never trips it (phases/fixes/body/status
64
+ * are untouched), so it always goes through on an open or closed entity alike. */
65
+ export declare function appendThread(root: string, id: string, message: ThreadMessage): Promise<EntityEntry>;
66
+ export interface CreateIdeaInput {
67
+ title: string;
68
+ content?: string;
69
+ kind?: EntityKind;
70
+ type?: string;
71
+ status?: EntityStatus;
72
+ subject?: string;
73
+ needs?: string[];
74
+ idea?: string;
75
+ issueSource?: string;
76
+ phases?: PhaseItem[];
77
+ }
78
+ /** Mints a new entity with the next lifetime id — a plain idea by default
79
+ * (`status: idea`), or a linked fix/note/board/ticket when `kind` says so, in which
80
+ * case the caller decides the initial status (usually left unset for a fix, so
81
+ * derived status takes over once it has phases). */
82
+ export declare function createIdea(root: string, input: CreateIdeaInput): Promise<string>;
83
+ //# sourceMappingURL=corpus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../../src/core/corpus.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,SAAS,EACT,SAAS,EACT,MAAM,EACN,aAAa,EACd,MAAM,gBAAgB,CAAC;AASxB,OAAO,EAGL,gBAAgB,EAGjB,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAaD,wBAAsB,iBAAiB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"version":3,"file":"corpus.test.d.ts","sourceRoot":"","sources":["../../src/core/corpus.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"daemon-target.d.ts","sourceRoot":"","sources":["../../src/vite/daemon-target.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAMD;;;;;;0DAM0D;AAC1D,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAYnC"}
1
+ {"version":3,"file":"daemon-target.d.ts","sourceRoot":"","sources":["../../src/core/daemon-target.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAMD;;;;;;0DAM0D;AAC1D,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAYnC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemon-target.test.d.ts","sourceRoot":"","sources":["../../src/core/daemon-target.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { DeskConfig } from '../types/index';
2
+ export declare function loadDeskConfig(root: string): DeskConfig;
3
+ //# sourceMappingURL=desk-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk-config.d.ts","sourceRoot":"","sources":["../../src/core/desk-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAavD"}
@@ -1,14 +1,14 @@
1
1
  export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
2
- export interface ProjectScript {
2
+ interface ProjectScript {
3
3
  name: string;
4
4
  cmd: string;
5
5
  }
6
- export interface NonJsManifest {
6
+ interface NonJsManifest {
7
7
  kind: 'cargo' | 'python' | 'go' | 'make';
8
8
  path: string;
9
9
  targets: string[];
10
10
  }
11
- export interface CiStep {
11
+ interface CiStep {
12
12
  workflow: string;
13
13
  job: string;
14
14
  step: string;
@@ -29,4 +29,5 @@ export interface ProjectEvidence {
29
29
  }
30
30
  export declare function detectPackageManager(root: string): PackageManager | null;
31
31
  export declare function gatherProjectEvidence(root: string): Promise<ProjectEvidence>;
32
+ export {};
32
33
  //# sourceMappingURL=evidence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../../src/core/desk-discovery/evidence.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB;kFAC8E;IAC9E,OAAO,EAAE,MAAM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B,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAKxE;AAyLD,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAmBlF"}
@@ -0,0 +1,3 @@
1
+ import { DoctorCheck } from '../doctor';
2
+ export declare const assetChecks: DoctorCheck[];
3
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../src/core/doctor/checks/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,WAAW,CAAC;AA2E/D,eAAO,MAAM,WAAW,EAAE,WAAW,EAIpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assets.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.test.d.ts","sourceRoot":"","sources":["../../../../src/core/doctor/checks/assets.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { DoctorCheck } from '../doctor';
2
+ export declare const localStateChecks: DoctorCheck[];
3
+ //# sourceMappingURL=local-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-state.d.ts","sourceRoot":"","sources":["../../../../src/core/doctor/checks/local-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAqC7C,eAAO,MAAM,gBAAgB,EAAE,WAAW,EAIzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=local-state.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-state.test.d.ts","sourceRoot":"","sources":["../../../../src/core/doctor/checks/local-state.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"tooling.d.ts","sourceRoot":"","sources":["../../../../src/core/doctor/checks/tooling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAmF7C,eAAO,MAAM,aAAa,EAAE,WAAW,EAItC,CAAC"}
1
+ {"version":3,"file":"tooling.d.ts","sourceRoot":"","sources":["../../../../src/core/doctor/checks/tooling.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AA4G7C,eAAO,MAAM,aAAa,EAAE,WAAW,EAKtC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { PaperCampConfig } from '../../types/index';
2
+ import { LocalStateDrift } from '../corpus';
2
3
  import { DoctorFinding } from './finding';
3
4
  export interface DoctorEntityFile {
4
5
  id: string;
@@ -6,12 +7,25 @@ export interface DoctorEntityFile {
6
7
  content: string;
7
8
  archived: boolean;
8
9
  }
10
+ export interface DoctorAssetFile {
11
+ name: string;
12
+ size: number;
13
+ }
14
+ export interface DoctorAssetFolder {
15
+ id: string;
16
+ files: DoctorAssetFile[];
17
+ }
9
18
  export interface DoctorContext {
10
19
  files: DoctorEntityFile[];
11
20
  config: PaperCampConfig | null;
12
21
  hasPermissionsAllow?: boolean;
22
+ hasMcpJsonEntry?: boolean;
23
+ hasOpencodeJsonEntry?: boolean;
13
24
  draftPrWorkflowContent?: string | null;
14
25
  pullRequestTemplateContent?: string | null;
26
+ localStateDrift?: LocalStateDrift | null;
27
+ assetFolders?: DoctorAssetFolder[];
28
+ assetMaxBytes?: number;
15
29
  }
16
30
  export type DoctorCheck = (context: DoctorContext) => DoctorFinding[];
17
31
  export declare const DOCTOR_CHECKS: DoctorCheck[];
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/core/doctor/doctor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CA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AiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,aAAa,EAAE,CAAC;AAEtE,eAAO,MAAM,aAAa,EAAE,WAAW,EAMtC,CAAC;AAgGF,wBAAsB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA2CvF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,EAAE,CAEvE;AAED,wBAAsB,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAE9E"}
@@ -1,5 +1,5 @@
1
1
  export type DoctorSeverity = 'error' | 'warning';
2
- export type DoctorCategory = 'metadata' | 'structural' | 'tooling';
2
+ export type DoctorCategory = 'metadata' | 'structural' | 'tooling' | 'local-state' | 'assets';
3
3
  export interface DoctorRule {
4
4
  id: string;
5
5
  category: DoctorCategory;
@@ -71,6 +71,11 @@ export declare const DOCTOR_RULES: readonly [{
71
71
  readonly category: "tooling";
72
72
  readonly severity: "warning";
73
73
  readonly summary: "config.json has no defaultAgents, so every run uses the built-in agent and model — choose them in Settings → General so a project never runs on a fallback it did not pick.";
74
+ }, {
75
+ readonly id: "missing-mcp-entry";
76
+ readonly category: "tooling";
77
+ readonly severity: "warning";
78
+ readonly summary: ".mcp.json or opencode.json has no paper-camp entry, so runs and sessions in this project never see the paper-camp MCP server — run `paper-camp init --settings` to add it.";
74
79
  }, {
75
80
  readonly id: "draft-pr-template-outdated";
76
81
  readonly category: "tooling";
@@ -81,6 +86,36 @@ export declare const DOCTOR_RULES: readonly [{
81
86
  readonly category: "tooling";
82
87
  readonly severity: "warning";
83
88
  readonly summary: "desk.ci.draftPr is on but the workflow or PR template file has no paper-camp template header, so it looks hand-written — paper-camp will not overwrite it.";
89
+ }, {
90
+ readonly id: "local-state-tracked-outside-plan";
91
+ readonly category: "local-state";
92
+ readonly severity: "warning";
93
+ readonly summary: "A file under papercamp/ is tracked by git but is not part of the committed plan (ideas/, config.json, suggestions.md, chat.md, about.md, assets/) — run `paper-camp doctor --fix` to move it to papercamp/.local/ or the account config dir and untrack it.";
94
+ }, {
95
+ readonly id: "local-state-missing-local-gitignore";
96
+ readonly category: "local-state";
97
+ readonly severity: "warning";
98
+ readonly summary: "papercamp/.local/.gitignore is missing, so nothing under papercamp/.local/ is protected from being committed — run `paper-camp doctor --fix` to create it.";
99
+ }, {
100
+ readonly id: "local-state-missing-gitattributes-block";
101
+ readonly category: "local-state";
102
+ readonly severity: "warning";
103
+ readonly summary: ".gitattributes has no paper-camp managed block, so two clones appending to papercamp/chat.md will conflict on pull instead of merging — run `paper-camp doctor --fix` to add it.";
104
+ }, {
105
+ readonly id: "asset-orphan-folder";
106
+ readonly category: "assets";
107
+ readonly severity: "warning";
108
+ readonly summary: "A folder under papercamp/assets/ has an id that matches no entity in the corpus — dead files left behind by a dropped or renamed idea.";
109
+ }, {
110
+ readonly id: "asset-oversized";
111
+ readonly category: "assets";
112
+ readonly severity: "warning";
113
+ readonly summary: "A file under papercamp/assets/<ID>/ is over the configured per-file limit (config.json assets.maxFileSizeMb, default 5MB).";
114
+ }, {
115
+ readonly id: "asset-dangling-link";
116
+ readonly category: "assets";
117
+ readonly severity: "warning";
118
+ readonly summary: "An idea links to `assets/<name>` or `../assets/<ID>/<name>` but no such file exists under papercamp/assets/.";
84
119
  }];
85
120
  export type DoctorRuleId = (typeof DOCTOR_RULES)[number]['id'];
86
121
  export declare const DOCTOR_RULES_BY_ID: Record<DoctorRuleId, DoctorRule>;
@@ -1 +1 @@
1
- {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/core/doctor/rules.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsGiB,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAE/D,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAE3B,CAAC"}
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/core/doctor/rules.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,CAAC;AAE9F,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuJiB,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAE/D,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAE3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"entity-view.d.ts","sourceRoot":"","sources":["../../src/core/entity-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAET,SAAS,EAET,MAAM,EACP,MAAM,gBAAgB,CAAC;AASxB;uGACuG;AACvG,wBAAgB,YAAY,CAC1B,CAAC,EAAE,WAAW,EACd,EAAE,CAAC,EAAE,MAAM,EACX,gBAAgB,UAAQ,EACxB,eAAe,UAAQ,GACtB,SAAS,CAgCX;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAYtD"}
1
+ {"version":3,"file":"entity-view.d.ts","sourceRoot":"","sources":["../../src/core/entity-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAET,SAAS,EAET,MAAM,EACP,MAAM,gBAAgB,CAAC;AASxB;uGACuG;AACvG,wBAAgB,YAAY,CAC1B,CAAC,EAAE,WAAW,EACd,EAAE,CAAC,EAAE,MAAM,EACX,gBAAgB,UAAQ,EACxB,eAAe,UAAQ,GACtB,SAAS,CAiCX;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAatD"}
@@ -5,7 +5,15 @@ export declare function resolveDefaultBranch(root: string): Promise<string>;
5
5
  /** Matches a release-please line, a raw commit subject, or (for pre-squash history)
6
6
  * a merge commit's own source-branch name, since those predate the `(IDEA-N)` convention. */
7
7
  export declare function resolveIdFromCommitMessage(message: string): string | null;
8
- export declare function resolveIdsWithMainActivity(root: string): Promise<Set<string>>;
8
+ export interface MainActivity {
9
+ ids: Set<string>;
10
+ sha: string;
11
+ }
12
+ /** Cached per root by the default branch's current sha — a `git log` over the whole
13
+ * history is expensive to redo on every corpus read when main hasn't moved. The sha
14
+ * comes back with the ids so callers that key a cache on main's position (the corpus
15
+ * snapshot) don't need a second `rev-parse` of their own. */
16
+ export declare function resolveIdsWithMainActivity(root: string): Promise<MainActivity>;
9
17
  export interface GitLogCommit {
10
18
  hash: string;
11
19
  subject: string;
@@ -21,10 +29,13 @@ export interface GitLogPage {
21
29
  upstream: string | null;
22
30
  hasMore: boolean;
23
31
  }
32
+ export declare function splitPrefix(subject: string): {
33
+ prefix: string;
34
+ subject: string;
35
+ };
24
36
  /** Exported for direct testing against `git log`'s %x1f/%x1e-separated output
25
37
  * without needing a full repo fixture for every case. */
26
38
  export declare function parseGitLogOutput(output: string, upstream: string | null, unpushed: Set<string>): GitLogCommit[];
27
- export declare function resolveUpstream(root: string): Promise<string | null>;
28
39
  /** One line of `git for-each-ref` in BRANCH_FORMAT. Exported for tests. */
29
40
  export declare function parseBranchLine(line: string): GitBranch | null;
30
41
  /** Local branches, most recently committed first. */
@@ -1 +1 @@
1
- {"version":3,"file":"git-log.d.ts","sourceRoot":"","sources":["../../src/core/git-log.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,eAAO,MAAM,aAAa,QAAsB,CAAC;AAIjD,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAUpE;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MA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