@dendelion/paper-camp 0.19.0 → 0.20.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 (73) hide show
  1. package/dist/app/assets/index-3pzg7Iyw.js +2 -0
  2. package/dist/app/assets/index-3pzg7Iyw.js.map +1 -0
  3. package/dist/app/assets/{index-B6251tL6.js → index-BHmWkgBW.js} +2 -2
  4. package/dist/app/assets/{index-B6251tL6.js.map → index-BHmWkgBW.js.map} +1 -1
  5. package/dist/app/assets/{index-DLkUANCR.js → index-BuzzfADD.js} +2 -2
  6. package/dist/app/assets/{index-DLkUANCR.js.map → index-BuzzfADD.js.map} +1 -1
  7. package/dist/app/assets/{index-D5j1njQR.js → index-CkLeljbk.js} +2 -2
  8. package/dist/app/assets/{index-D5j1njQR.js.map → index-CkLeljbk.js.map} +1 -1
  9. package/dist/app/assets/{index-nuVVSVma.js → index-DMDqfoCe.js} +2 -2
  10. package/dist/app/assets/index-DMDqfoCe.js.map +1 -0
  11. package/dist/app/assets/index-D_Lo8ptS.js +6 -0
  12. package/dist/app/assets/index-D_Lo8ptS.js.map +1 -0
  13. package/dist/app/assets/{index-BNoowtMI.js → index-DfekHwwU.js} +3 -3
  14. package/dist/app/assets/{index-BNoowtMI.js.map → index-DfekHwwU.js.map} +1 -1
  15. package/dist/app/assets/{index-D2iIIpI1.js → index-Gi97Lmex.js} +3 -3
  16. package/dist/app/assets/{index-D2iIIpI1.js.map → index-Gi97Lmex.js.map} +1 -1
  17. package/dist/app/assets/main-Bm0W4ucz.css +1 -0
  18. package/dist/app/assets/main-DP_okYxh.js +215 -0
  19. package/dist/app/assets/main-DP_okYxh.js.map +1 -0
  20. package/dist/app/assets/sidebar-section-B-A20bg9.js +2 -0
  21. package/dist/app/assets/sidebar-section-B-A20bg9.js.map +1 -0
  22. package/dist/app/index.html +2 -2
  23. package/dist/app/toolbar.js +1071 -1049
  24. package/dist/app/toolbar.js.map +1 -1
  25. package/dist/chunks/{phase-progress.CwSKAAZ-.js → phase-progress.DPAZ01Gg.js} +1720 -1594
  26. package/dist/chunks/phase-progress.DPAZ01Gg.js.map +1 -0
  27. package/dist/cli/index.js +6633 -6345
  28. package/dist/cli/index.js.map +1 -1
  29. package/dist/core/corpus-format.d.ts +11 -0
  30. package/dist/core/corpus-format.d.ts.map +1 -0
  31. package/dist/core/corpus-format.test.d.ts +2 -0
  32. package/dist/core/corpus-format.test.d.ts.map +1 -0
  33. package/dist/core/doctor/checks/metadata.d.ts.map +1 -1
  34. package/dist/core/doctor/rules.d.ts +6 -1
  35. package/dist/core/doctor/rules.d.ts.map +1 -1
  36. package/dist/core/git-pr/pr-lookup.d.ts +6 -1
  37. package/dist/core/git-pr/pr-lookup.d.ts.map +1 -1
  38. package/dist/core/git-pr/pr.d.ts +10 -0
  39. package/dist/core/git-pr/pr.d.ts.map +1 -1
  40. package/dist/core/index.js +54 -53
  41. package/dist/core/issues.d.ts +51 -0
  42. package/dist/core/issues.d.ts.map +1 -0
  43. package/dist/core/issues.test.d.ts +2 -0
  44. package/dist/core/issues.test.d.ts.map +1 -0
  45. package/dist/core/parse/parser.d.ts.map +1 -1
  46. package/dist/core/parse/schemas.d.ts +8 -4
  47. package/dist/core/parse/schemas.d.ts.map +1 -1
  48. package/dist/core/readers.d.ts +7 -2
  49. package/dist/core/readers.d.ts.map +1 -1
  50. package/dist/core/run-order.d.ts +1 -1
  51. package/dist/core/run-order.d.ts.map +1 -1
  52. package/dist/core/scaffold/scaffold.d.ts +0 -1
  53. package/dist/core/scaffold/scaffold.d.ts.map +1 -1
  54. package/dist/core/scaffold/templates.d.ts +1 -1
  55. package/dist/core/scaffold/templates.d.ts.map +1 -1
  56. package/dist/core/sections.d.ts.map +1 -1
  57. package/dist/core/serialize/serializer.d.ts +4 -2
  58. package/dist/core/serialize/serializer.d.ts.map +1 -1
  59. package/dist/core/status/status.d.ts +8 -4
  60. package/dist/core/status/status.d.ts.map +1 -1
  61. package/dist/types/index.d.ts +65 -5
  62. package/dist/types/index.d.ts.map +1 -1
  63. package/dist/types/index.js.map +1 -1
  64. package/package.json +2 -2
  65. package/dist/app/assets/index-nuVVSVma.js.map +0 -1
  66. package/dist/app/assets/index-s6CVH54G.js +0 -6
  67. package/dist/app/assets/index-s6CVH54G.js.map +0 -1
  68. package/dist/app/assets/main--EStESJz.js +0 -217
  69. package/dist/app/assets/main--EStESJz.js.map +0 -1
  70. package/dist/app/assets/main-CAJuC1Pz.css +0 -1
  71. package/dist/app/assets/sidebar-section-DTU8Naqm.js +0 -2
  72. package/dist/app/assets/sidebar-section-DTU8Naqm.js.map +0 -1
  73. package/dist/chunks/phase-progress.CwSKAAZ-.js.map +0 -1
@@ -20,7 +20,7 @@ export interface PhaseItem {
20
20
  done: boolean;
21
21
  text: string;
22
22
  description?: string;
23
- source?: 'review' | 'manual';
23
+ source?: 'review' | 'manual' | 'issue';
24
24
  run?: PhaseRun;
25
25
  }
26
26
  export type PhaseMilestone = 'implement' | 'verify' | 'checkbox';
@@ -170,6 +170,9 @@ export interface PlanEntry {
170
170
  title: string;
171
171
  status: PlanStatus;
172
172
  kind?: PlanKind;
173
+ /** 'fix' when this plan is a follow-up fix entity (IDEA-187) — undefined for an
174
+ * ordinary plan-bearing idea. Distinct from `kind`, which carries the commit type. */
175
+ entityKind?: EntityKind;
173
176
  id?: string;
174
177
  idea?: string;
175
178
  agent?: AgentId;
@@ -184,6 +187,8 @@ export interface PlanEntry {
184
187
  subject?: string;
185
188
  /** Absent means unordered — sorts after all ordered entries, by created date. */
186
189
  order?: number;
190
+ /** See EntityEntry.issueSource. */
191
+ issueSource?: string;
187
192
  body: string;
188
193
  phases: PhaseItem[];
189
194
  /** Post-build findings, same checkbox grammar as `phases` — see EntityEntry.fixes. */
@@ -199,6 +204,10 @@ export interface PlanEntry {
199
204
  /** Set by readEntities from which dir the file came from — see EntityEntry.archived. */
200
205
  archived?: boolean;
201
206
  pr?: PrInfo;
207
+ /** True when `status` is a phase-count/stored-override guess because GitHub's PR
208
+ * state couldn't be resolved, rather than derived from a resolved PR — see
209
+ * isStatusFallback. */
210
+ statusFallback?: boolean;
202
211
  }
203
212
  export interface ArchivableIdea {
204
213
  id: string;
@@ -307,15 +316,19 @@ export interface IdeaEntry {
307
316
  export type EntityType = PlanKind;
308
317
  /** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */
309
318
  export type EntityStatus = PlanStatus | 'open';
319
+ /** "note" never grows phases; "fix" is a follow-up entity linked to a done/archived
320
+ * parent via `idea` — see entityFrontmatterSchema. Omitted for a normal idea. */
321
+ export type EntityKind = 'note' | 'fix';
310
322
  export interface EntityEntry {
311
323
  id: string;
312
324
  title: string;
313
325
  /** Absent until the entity is classified (usually when its plan is drafted). */
314
326
  type?: EntityType;
315
- /** "note" marks an entity that never grows phases. */
316
- kind?: 'note';
327
+ kind?: EntityKind;
317
328
  /** Stored override, not the source of truth — see entityFrontmatterSchema. */
318
329
  status?: EntityStatus;
330
+ /** IDEA-N backlink to the parent this fix addresses; required when kind: fix. */
331
+ idea?: string;
319
332
  agent?: AgentId;
320
333
  created: string;
321
334
  updated?: string;
@@ -328,6 +341,10 @@ export interface EntityEntry {
328
341
  subject?: string;
329
342
  /** Absent means unordered — sorts after all ordered entries, by created date. */
330
343
  order?: number;
344
+ /** The Issue.id (`sourceKind:sourceKey`, IDEA-192) this entity was spawned to promote,
345
+ * if any — how a promoted issue is re-matched to its target on every read, since
346
+ * issues carry no store of their own. */
347
+ issueSource?: string;
331
348
  body: string;
332
349
  phases: PhaseItem[];
333
350
  /** Post-build findings, same checkbox grammar as `phases` — appended below Phases
@@ -338,6 +355,9 @@ export interface EntityEntry {
338
355
  thread?: ThreadMessage[];
339
356
  /** Set by readEntities from which of the two scanned dirs the file came from, not the frontmatter. */
340
357
  archived?: boolean;
358
+ /** Frontmatter keys this paper-camp doesn't recognise, carried through verbatim so a
359
+ * write never drops a field a newer version wrote — see entityFrontmatterKnownKeys. */
360
+ unknownFrontmatter?: Record<string, unknown>;
341
361
  }
342
362
  export interface SuggestionEntry {
343
363
  date: string;
@@ -505,7 +525,9 @@ export interface CiReleaseState {
505
525
  releasedVersion: string | null;
506
526
  }
507
527
  export interface PaperCampConfig {
508
- version: string;
528
+ /** Corpus format version (see CORPUS_FORMAT_VERSION) — the shape this file and the
529
+ * entity frontmatter it sits alongside conform to, not the npm package version. */
530
+ version: number;
509
531
  projectName: string;
510
532
  initializedAt: string;
511
533
  /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */
@@ -663,7 +685,7 @@ export type GitSyncResult = {
663
685
  ok: true;
664
686
  } | GitSyncFailure;
665
687
  export type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error' | 'superseded';
666
- export type TaskKind = 'phase' | 'audit' | 'batch-reconcile' | 'batch-draft' | 'run-all' | 'draft' | 'extend' | 'suggest' | 'commit-suggest' | 'overlap-check' | 'prioritise' | 'sync' | 'reconcile' | 'fix-review' | 'resolve-conflict' | 'feedback' | 'pr-review';
688
+ export type TaskKind = 'phase' | 'audit' | 'batch-reconcile' | 'batch-draft' | 'run-all' | 'draft' | 'extend' | 'suggest' | 'commit-suggest' | 'overlap-check' | 'prioritise' | 'sync' | 'reconcile' | 'fix-review' | 'resolve-conflict' | 'feedback' | 'pr-review' | 'issue-fix';
667
689
  export interface TaskLogEntry {
668
690
  id: string;
669
691
  taskKind: TaskKind;
@@ -677,6 +699,9 @@ export interface TaskLogEntry {
677
699
  usage?: RunUsage;
678
700
  phaseRuns?: PhaseRunRecord[];
679
701
  rateLimit?: RateLimitSnapshot;
702
+ /** issue-fix only: the Issue.id (IDEA-192) this run was launched to fix, so a
703
+ * repeat failure's thread can be reconstructed by matching entries to the issue. */
704
+ issueId?: string;
680
705
  }
681
706
  export interface RunUsage {
682
707
  durationMs: number;
@@ -747,6 +772,7 @@ export interface AgentTaskState {
747
772
  prReviewUrl?: string;
748
773
  errorKind?: 'auth' | 'question';
749
774
  rateLimit?: RateLimitSnapshot;
775
+ issueId?: string;
750
776
  }
751
777
  export interface OverlapVerdict {
752
778
  verdict: 'existing' | 'extend' | 'new';
@@ -766,4 +792,38 @@ export interface ReconcileQueueItem {
766
792
  phases: PhaseItem[];
767
793
  };
768
794
  }
795
+ /** The four failures IDEA-192 collects into one place: a failed agent run, a red
796
+ * project check, a PR review that requested changes, and a git rebase/sync failure. */
797
+ export type IssueSourceKind = 'agent-run' | 'check' | 'pr-review' | 'sync';
798
+ /** Derived from the world on every read, never a mark-read button — 'open' while a
799
+ * collector still finds the failure, 'closed' once it doesn't or the promoted fix
800
+ * that carries it ships. */
801
+ export type IssueStatus = 'open' | 'closed';
802
+ /** One collected failure (IDEA-192), read as a short thread. `id` is derived from
803
+ * `sourceKind` + `sourceKey`, so a repeat failure of the same thing resolves to the
804
+ * same issue and continues its thread instead of raising a duplicate. */
805
+ export interface Issue {
806
+ id: string;
807
+ sourceKind: IssueSourceKind;
808
+ /** Stable within `sourceKind` — a task's `planId`, a check's `name`, a PR's
809
+ * `number` + `headSha`, or a sync failure's branch + target ref. */
810
+ sourceKey: string;
811
+ entityId?: string;
812
+ entityTitle?: string;
813
+ title: string;
814
+ reason: string;
815
+ /** Last output lines, when the source captured any (a check's command output, a
816
+ * sync failure's conflicted files). */
817
+ output?: string;
818
+ /** Absent when the source carries no timestamp of its own (a live PR review decision). */
819
+ occurredAt?: string;
820
+ thread: ThreadMessage[];
821
+ status: IssueStatus;
822
+ /** Set once promoted (IDEA-192 phase 6) — the id of whatever now carries the work:
823
+ * a spawned fix entity, a spawned plain idea (no parent), or the open parent an
824
+ * issue was appended to as an inline fix. A promoted issue closes when that
825
+ * entity's status reaches 'done', independent of whether the original source is
826
+ * still detected as failing. */
827
+ promotedFixId?: string;
828
+ }
769
829
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,G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AC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf;2CACuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,MAAM,EAAE,WAAW,CAAC;IACpB;;;;oCAIgC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/types/index.ts"],"sourcesContent":["export type PlanStatus = 'idea' | 'planned' | 'in-progress' | 'review' | 'done' | 'dropped';\n\nexport const PLAN_STATUSES: PlanStatus[] = [\n 'idea',\n 'planned',\n 'in-progress',\n 'review',\n 'done',\n 'dropped',\n];\n\nexport interface LogEntry {\n date: string;\n text: string;\n}\n\nexport type PlanKind = 'feat' | 'fix' | 'chore' | 'docs' | 'refactor';\n\nexport const PLAN_KINDS: PlanKind[] = ['feat', 'fix', 'chore', 'docs', 'refactor'];\n\nexport const AGENT_IDS = ['claude-code', 'opencode'] as const;\n\nexport type AgentId = (typeof AGENT_IDS)[number];\n\nexport const AGENT_LABELS: Record<AgentId, string> = {\n 'claude-code': 'Claude Code',\n opencode: 'OpenCode',\n};\n\nexport interface PhaseRun {\n durationMs: number;\n inputTokens: number;\n outputTokens: number;\n model?: string;\n attempts: number;\n}\n\nexport interface PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review' | 'manual';\n run?: PhaseRun;\n}\n\nexport type PhaseMilestone = 'implement' | 'verify' | 'checkbox';\n\n/** A body section anchor is `body` for now — the whole prose block is the only\n * body section a plan/entity has until later phases break it into sub-sections. */\nexport type MarginNoteAnchor = { kind: 'phase'; index: number } | { kind: 'body' };\n\nexport type MarginNoteState = 'open' | 'resolved';\n\nexport type MarginNoteKind = 'note' | 'decision' | 'question';\n\nexport interface MarginNote {\n anchor: MarginNoteAnchor;\n prose: string;\n state: MarginNoteState;\n kind?: MarginNoteKind;\n}\n\n/** What a thread message originally was, before log/review/notes/clarifications folded\n * into one ordered thread on the entity — 'note'/'decision'/'question' carry `state`,\n * the rest are plain historical records. 'chat' is thread-native (no legacy section):\n * Paper Scout conversation, collapsed by default in thread views. */\nexport type ThreadMessageKind =\n | 'log'\n | 'clarification'\n | 'review'\n | 'note'\n | 'decision'\n | 'question'\n | 'chat';\n\nexport interface ThreadMessage {\n kind: ThreadMessageKind;\n /** Absent for messages ported from the old Notes section, which never carried a date. */\n date?: string;\n text: string;\n /** Only meaningful for note/decision/question kinds. */\n state?: MarginNoteState;\n /** Absent means 'user' — no thread message predates this field being agent-authored. */\n from?: 'user' | 'agent';\n}\n\n/** Ambient context a chat mount (desk, toolbar) feeds alongside a message — each\n * mount populates whatever it has (IDEA-130); Scout folds it into the prompt\n * silently, it never becomes a user-visible field. */\nexport interface MountContext {\n route?: string;\n focusedIdeaId?: string;\n viewport?: { width: number; height: number };\n}\n\nexport interface RawEntry {\n title: string;\n fields: Record<string, string>;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n notes?: MarginNote[];\n review?: LogEntry[];\n}\n\nexport interface ParseWarning {\n title: string;\n message: string;\n}\n\nexport interface ParseResult<T> {\n entries: T[];\n warnings: ParseWarning[];\n}\n\n/** A PR's reviewable/mergeable state, as surfaced by `gh pr list`. */\nexport type PrState = 'draft' | 'open' | 'closed' | 'merged';\n\n/** GitHub's PR review decision, as surfaced by `gh pr list --json reviewDecision`. */\nexport type ReviewDecision = 'approved' | 'changes-requested' | 'review-required';\n\n// Per-comment detail; PrInfo.unresolvedThreadCount only counts these.\nexport interface ReviewThread {\n /** GraphQL node id — what `resolveReviewThread`/`replyToReviewThread` address. */\n id: string;\n /** File path the comment is anchored to; absent for a PR-level (not diff-anchored) comment. */\n path?: string;\n line?: number;\n author?: string;\n body: string;\n}\n\n// Parsed from the JSON object a fix-review agent's prompt requires as its final line.\nexport interface FixReviewResult {\n commit: { title: string; message: string };\n addressed: string[];\n skipped: { threadId: string; why: string }[];\n}\n\nexport interface PrReviewFinding {\n path: string;\n line: number;\n body: string;\n}\n\nexport type PrReviewVerdict = 'approve' | 'comment' | 'request-changes';\n\n// Parsed from the JSON object a pr-review agent's prompt requires as its final\n// line — see buildPrReviewPrompt. findings become per-line PR review comments;\n// the other fields are rendered per destination (IDEA-170, IDEA-175).\nexport interface PrReviewResult {\n verdict: PrReviewVerdict;\n assessment: string;\n concerns: string[];\n findings: PrReviewFinding[];\n}\n\nexport interface FeedbackPhaseEdit {\n op: 'add' | 'reword';\n /** 1-based position in the plan's current phase list; required for \"reword\", ignored for \"add\". */\n index?: number;\n text: string;\n description?: string;\n}\n\nexport interface FeedbackEdit {\n phases?: FeedbackPhaseEdit[];\n /** The complete replacement body, when the message corrects body prose. */\n body?: string;\n}\n\n// Parsed from the JSON object a feedback-reply agent's prompt requires as its\n// final line. The chat never creates ideas — a request is either a reply or an\n// edit on the current plan.\nexport interface FeedbackReplyResult {\n reply: string;\n edit?: FeedbackEdit;\n /** True when the user's message answers an open question the agent asked\n * earlier in this thread — the route persists that message as a clarification. */\n answersQuestion?: boolean;\n}\n\n/** Live-resolved PR info for an entity's branch — see `core/pr.ts`. */\nexport interface PrInfo {\n number: number;\n url: string;\n state: PrState;\n /** Undefined when no review has been requested/decided, or when unresolved (offline, closed/merged PR). */\n reviewDecision?: ReviewDecision;\n /** Count of unresolved review threads. Only fetched for open/draft PRs; undefined when not fetched or unresolved. */\n unresolvedThreadCount?: number;\n /** Whether a comment or review landed after the PR's last commit — a proxy for \"since the last agent pass\" (a pass ends with a push). Only fetched for open/draft PRs. */\n hasNewCommentsSincePush?: boolean;\n /** Full SHA of the PR's current head commit — what a pr-review is scoped to (IDEA-170). */\n headSha?: string;\n headBranch?: string;\n /** A posted review's footer names this entity and `headSha` — set once the poll\n * observes it (IDEA-175). */\n scoutReviewObserved?: boolean;\n}\n\n/** Advisory info for the \"Review PR\" action — nothing here gates the button,\n * it only labels it (IDEA-174 fix 2). */\nexport interface PrReviewStatus {\n ready: boolean;\n headSha: string | null;\n lastReviewedSha: string | null;\n /** null when no CI is configured, or the PR's branch has no runs yet. */\n ciGreen: boolean | null;\n}\n\nexport interface PlanEntry {\n title: string;\n status: PlanStatus;\n kind?: PlanKind;\n id?: string;\n idea?: string;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n /** Version tag (e.g. v0.13.1) that first shipped this idea, stamped from the release train. */\n released?: string;\n tags: string[];\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n body: string;\n phases: PhaseItem[];\n /** Post-build findings, same checkbox grammar as `phases` — see EntityEntry.fixes. */\n fixes?: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n notes?: MarginNote[];\n /** Prose written against the whole finished plan, distinct from the flat `log` — an\n * agent later splits each entry into rework phases or a follow-up idea. */\n review?: LogEntry[];\n /** The entity's single ordered feedback thread — see EntityEntry.thread. */\n thread?: ThreadMessage[];\n /** Set by readEntities from which dir the file came from — see EntityEntry.archived. */\n archived?: boolean;\n pr?: PrInfo;\n}\n\nexport interface ArchivableIdea {\n id: string;\n title: string;\n pr: PrInfo;\n}\n\n/** One open `question` thread message, resolved to the idea it's parked on. `ageDays`\n * is `Infinity` for a question ported from the pre-Thread Notes section, which never\n * carried a date — the oldest kind of unresolved question there is. */\nexport interface ParkedQuestion {\n entityId: string;\n entityTitle: string;\n text: string;\n date?: string;\n ageDays: number;\n}\n\n/** The two event-sourced notification kinds (IDEA-153) — 'completed' when a task\n * reaches done/error, 'reply' when an agent posts a non-blocking feedback thread\n * entry. Unlike ParkedQuestion (derived live from thread state), these are stored\n * as discrete events on read, so a since-resolved source can't erase them. */\nexport type StoredNotificationKind = 'completed' | 'reply';\n\nexport interface StoredNotification {\n id: string;\n kind: StoredNotificationKind;\n entityId: string;\n entityTitle: string;\n text: string;\n date: string;\n read: boolean;\n /** Only set for 'completed' — the task outcome that triggered it. */\n outcome?: 'done' | 'error';\n}\n\n/** One unified feed entry (IDEA-153) — a parked question (open→resolved, always\n * unread while it's shown at all) alongside the two stored, read/unread kinds. */\nexport type Notification = (ParkedQuestion & { kind: 'question' }) | StoredNotification;\n\nexport type ConsistencyIssueKind = 'orphan-subject' | 'title-style';\n\nexport interface ConsistencyIssue {\n kind: ConsistencyIssueKind;\n section: 'plans';\n title: string;\n message: string;\n planId?: string;\n}\n\nexport interface CommentStats {\n commentLines: number;\n sourceLines: number;\n ratio: number;\n}\n\nexport interface TasksPerWeek {\n /** ISO week, e.g. \"2026-W05\". */\n week: string;\n count: number;\n}\n\nexport interface UsagePerWeek {\n /** ISO week, e.g. \"2026-W05\". */\n week: string;\n agentMinutes: number;\n inputTokens: number;\n outputTokens: number;\n}\n\nexport interface IdeaCost {\n planId: string;\n planTitle: string;\n inputTokens: number;\n outputTokens: number;\n durationMs: number;\n}\n\nexport interface CapacityStat {\n snapshot: RateLimitSnapshot;\n capturedAt: string;\n}\n\nexport interface ProjectStats {\n generatedAt: string;\n comments: CommentStats;\n testLines: number;\n /** Null when no coverage report has been emitted yet (run `pnpm test`). */\n testCoveragePct: number | null;\n entitiesByStatus: Partial<Record<EntityStatus, number>>;\n openQuestions: number;\n decisions: number;\n tasksPerWeek: TasksPerWeek[];\n usagePerWeek: UsagePerWeek[];\n medianPhaseDurationMs: number | null;\n mostExpensiveIdeas: IdeaCost[];\n capacity: CapacityStat | null;\n}\n\nexport type IdeaKind = 'idea' | 'note';\n\nexport type IdeaStatus = 'open' | 'done' | 'dropped';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n kind?: IdeaKind;\n status?: IdeaStatus;\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n /** Fallback sort key for unordered entries — see `order`. Absent on view-model-only IdeaEntry literals that never enter the worklist sort. */\n created?: string;\n log?: LogEntry[];\n}\n\n// Unified entity — one file per entity, plan as an optional Phases section.\n// Supersedes PlanEntry/IdeaEntry once the migration cutover lands.\n\n/** Work classification — same Conventional-Commits values as PlanKind; `kind` renamed to `type` in the unified schema. */\nexport type EntityType = PlanKind;\n\n/** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */\nexport type EntityStatus = PlanStatus | 'open';\n\nexport interface EntityEntry {\n id: string;\n title: string;\n /** Absent until the entity is classified (usually when its plan is drafted). */\n type?: EntityType;\n /** \"note\" marks an entity that never grows phases. */\n kind?: 'note';\n /** Stored override, not the source of truth — see entityFrontmatterSchema. */\n status?: EntityStatus;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n /** Version tag (e.g. v0.13.1) that first shipped this idea, stamped from the release train. */\n released?: string;\n tags: string[];\n /** Absent renders as the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n body: string;\n phases: PhaseItem[];\n /** Post-build findings, same checkbox grammar as `phases` — appended below Phases\n * rather than rewriting the plan's already-finished phase history. */\n fixes?: PhaseItem[];\n /** The entity's single ordered feedback thread — folds what used to be separate\n * log/clarifications/notes/review sections. */\n thread?: ThreadMessage[];\n /** Set by readEntities from which of the two scanned dirs the file came from, not the frontmatter. */\n archived?: boolean;\n}\n\n// No `id`/`status`: it only becomes a real idea if a human promotes it.\nexport interface SuggestionEntry {\n date: string;\n title: string;\n description: string;\n}\n\nexport interface RoadmapItem {\n name: string;\n description: string;\n candidates: string[];\n linked: string[];\n}\n\nexport interface RoadmapHorizon {\n title: string;\n items: RoadmapItem[];\n}\n\nexport interface Roadmap {\n goal: string;\n horizons: RoadmapHorizon[];\n standingConcerns: RoadmapItem[];\n}\n\nexport interface RoadmapLink {\n id: string;\n status: PlanStatus;\n taskRuns: number;\n pr?: PrInfo;\n released: boolean;\n}\n\nexport interface RoadmapRollup {\n total: number;\n done: number;\n}\n\nexport interface ResolvedRoadmapItem extends RoadmapItem {\n links: RoadmapLink[];\n rollup: RoadmapRollup;\n}\n\nexport interface ResolvedRoadmapHorizon {\n title: string;\n items: ResolvedRoadmapItem[];\n rollup: RoadmapRollup;\n}\n\nexport interface ResolvedRoadmap {\n goal: string;\n horizons: ResolvedRoadmapHorizon[];\n events: RoadmapEvent[];\n}\n\nexport type RoadmapEventKind = 'created' | 'task-run';\n\nexport interface RoadmapEvent {\n date: string;\n kind: RoadmapEventKind;\n entityId: string;\n horizonTitle: string;\n itemName: string;\n label: string;\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\n /** Set on GET responses when the value is withheld — secrets never reach the client. */\n isSet?: boolean;\n}\n\nexport interface AgentConfig {\n agent: AgentId;\n model?: string;\n effort?: string;\n}\n\n/** Model/effort passed to an adapter's buildArgs — the AgentConfig minus the agent id. */\nexport interface AgentRunOptions {\n model?: string;\n effort?: string;\n /** Prior claude-code session id to continue instead of starting cold; ignored by opencode. */\n resume?: string;\n}\n\n/** Maps option names to a fixed value list (renders a Select) or null (free-text or hidden). */\nexport type AgentOptionsDescriptor = Record<string, string[] | null | undefined>;\n\nexport const AGENT_OPTIONS: Record<AgentId, AgentOptionsDescriptor> = {\n 'claude-code': {\n model: ['opus', 'sonnet', 'fable', 'haiku'],\n effort: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n opencode: {\n model: null,\n },\n};\n\nexport function coerceAgentConfig(v: unknown): AgentConfig {\n const toAgent = (a: unknown): AgentId =>\n AGENT_IDS.includes(a as AgentId) ? (a as AgentId) : 'claude-code';\n if (typeof v === 'string') return { agent: toAgent(v) };\n // A missing key must not throw — that would 500 the /api/config read this protects.\n const obj = (v ?? {}) as Record<string, unknown>;\n return {\n agent: toAgent(obj.agent),\n ...(typeof obj.model === 'string' && { model: obj.model }),\n ...(typeof obj.effort === 'string' && { effort: obj.effort }),\n };\n}\n\nexport interface DefaultAgentsMap {\n phase: AgentConfig;\n planDraft: AgentConfig;\n ideaExtend: AgentConfig;\n commitSuggest: AgentConfig;\n feedback: AgentConfig;\n codeReview: AgentConfig;\n}\n\nexport const DEFAULT_AGENTS: DefaultAgentsMap = {\n phase: { agent: 'opencode' },\n planDraft: { agent: 'claude-code' },\n ideaExtend: { agent: 'claude-code' },\n commitSuggest: { agent: 'claude-code' },\n feedback: { agent: 'claude-code', model: 'sonnet', effort: 'medium' },\n codeReview: { agent: 'claude-code', model: 'opus', effort: 'high' },\n};\n\n/** A reviewer must not use the same model as the task that wrote the code (IDEA-170) — self-review rubber-stamps. */\nexport function agentConfigsEqual(a: AgentConfig, b: AgentConfig): boolean {\n return a.agent === b.agent && (a.model ?? '') === (b.model ?? '');\n}\n\n/** Toolbar segments, left to right (IDEA-128/IDEA-133); trimmed per project via `IntegrationConfig.toolbar.segments`. */\nexport const TOOLBAR_SEGMENT_IDS = ['focus', 'scout', 'desk'] as const;\n\nexport type ToolbarSegmentId = (typeof TOOLBAR_SEGMENT_IDS)[number];\n\nexport interface IntegrationToolbarConfig {\n enabled?: boolean;\n segments?: ToolbarSegmentId[];\n /** Opt-in escape hatch: without it, the vite plugin stays off when `mode` is `production`. */\n allowProduction?: boolean;\n}\n\nexport interface IntegrationConfig {\n toolbar?: IntegrationToolbarConfig;\n route?: string;\n}\n\nexport interface DeskService {\n name: string;\n cmd: string;\n port?: number;\n healthcheck?: string;\n}\n\nexport interface DeskCheck {\n name: string;\n cmd: string;\n}\n\nexport interface DeskCi {\n repo: string;\n branch?: string;\n releasePlease?: boolean;\n}\n\n/** Dev-loop manifest (IDEA-119): declared services, one-click checks, and CI/release sources. */\nexport interface DeskConfig {\n services?: DeskService[];\n checks?: DeskCheck[];\n ci?: DeskCi;\n}\n\nexport type ServiceRunStatus = 'stopped' | 'running' | 'stopping' | 'crashed';\n\nexport type ServiceHealth = 'unknown' | 'up' | 'down';\n\n/** Live runtime view of a declared service (IDEA-119), merging manifest + process state. */\nexport interface ServiceState {\n name: string;\n cmd: string;\n port?: number;\n hasHealthcheck: boolean;\n status: ServiceRunStatus;\n health: ServiceHealth;\n pid: number | null;\n startedAt: string | null;\n exitCode: number | null;\n}\n\n/** Live result of a declared one-click check (IDEA-119), mirroring the Stack panel's CheckResult. */\nexport interface DeskCheckState {\n name: string;\n cmd: string;\n status: CheckStatus;\n lastRun: string | null;\n output: string;\n}\n\nexport type CiRunStatus =\n | 'success'\n | 'failure'\n | 'in_progress'\n | 'queued'\n | 'cancelled'\n | 'unknown';\n\nexport interface CiRun {\n workflow: string;\n status: CiRunStatus;\n url: string | null;\n}\n\nexport interface ReleasePr {\n number: number;\n title: string;\n url: string;\n version: string | null;\n}\n\n/** CI & release mirror for a declared repo (IDEA-119): latest Actions runs on the tracked\n * branch, the open release-please PR, and the released vs. queued version. */\nexport interface CiReleaseState {\n repo: string;\n branch: string;\n available: boolean;\n runs: CiRun[];\n releasePr: ReleasePr | null;\n releasedVersion: string | null;\n}\n\nexport interface PaperCampConfig {\n version: string;\n projectName: string;\n initializedAt: string;\n /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */\n nextId?: Partial<Record<PlanKind, number>> & { idea?: number };\n port?: number;\n defaultAgents?: DefaultAgentsMap;\n /** Derived from `ROADMAP.md` on every read (IDEA-95), never written to disk; an idea's\n * `subject` not present here renders as \"No subject\". */\n subjects?: string[];\n /** Opts out of the first-run redirect to Settings > Setup while capabilities are incomplete. */\n setupDismissed?: boolean;\n /** In-app dev toolbar (IDEA-128) — the `@dendelion/paper-camp/vite` plugin's mount, toggleable for frontend targets. */\n integration?: IntegrationConfig;\n /** Dev-loop desk manifest (IDEA-119) — declared services, checks, and CI/release sources per project. */\n desk?: DeskConfig;\n /** Project-declared commands the desk/embed can run on demand (IDEA-157). */\n commands?: {\n /** Manual build for the Stack's Build action; no universal default. */\n build?: string;\n };\n}\n\nexport type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';\n\nexport interface CheckResult {\n status: CheckStatus;\n /** The shell command this check runs — empty until a build command is configured. */\n cmd: string;\n lastRun: string | null;\n output: string;\n}\n\nexport type CheckName = 'lint' | 'format' | 'test' | 'consistency' | 'build';\n\nexport type CapabilityStatus = 'ok' | 'warn' | 'missing';\n\nexport interface CapabilityResult {\n id: string;\n status: CapabilityStatus;\n detail: string;\n}\n\nexport interface AgentAuthStatus {\n loggedIn: boolean | null;\n authMethod: string | null;\n apiProvider: string | null;\n}\n\nexport type LoginRelayPhase =\n | 'starting'\n | 'awaiting-authorization'\n | 'success'\n | 'error'\n | 'cancelled';\n\nexport interface LoginRelayState {\n phase: LoginRelayPhase;\n authorizeUrl: string | null;\n error?: string;\n}\n\nexport type ServiceId = 'git' | 'gh' | `agent:${AgentId}`;\n\n/** What a Connections row offers once its service isn't `ok` — copy a command, follow a link, or read plain instructions. */\nexport type ConnectAction =\n /** `runnable` marks a command with no placeholders and no interactive prompts — safe for the server to execute directly instead of just displaying it. */\n | { kind: 'command'; command: string; runnable?: boolean }\n | { kind: 'link'; url: string; label: string }\n | { kind: 'text'; message: string };\n\nexport interface ConnectionResult {\n id: ServiceId;\n label: string;\n unlocks: string;\n status: CapabilityStatus;\n detail: string;\n authenticated: boolean | null;\n connect: ConnectAction | null;\n}\n\nexport interface MergePolicy {\n allowSquashMerge: boolean;\n allowMergeCommit: boolean;\n allowRebaseMerge: boolean;\n squashMergeCommitTitle: string;\n squashMergeCommitMessage: string;\n}\n\nexport type MergePolicyResult =\n | { status: 'ok'; repo: string; policy: MergePolicy }\n | { status: 'unavailable'; reason: string };\n\nexport interface GitStatusEntry {\n path: string;\n status: string;\n staged: boolean;\n renameSource?: string;\n}\n\nexport interface GitStashEntry {\n index: number;\n branch: string;\n message: string;\n ageDays: number;\n own: boolean;\n}\n\nexport interface GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n ahead: number;\n behind: number;\n diverged: boolean;\n branchHygiene: BranchHygieneStatus;\n stashPending: boolean;\n stashes: GitStashEntry[];\n}\n\nexport interface FileDiffEntry {\n path: string;\n renameSource?: string;\n status: string;\n staged: boolean;\n binary: boolean;\n additions: number;\n deletions: number;\n // 'diff' is a unified patch (tracked files); 'raw' is untracked file content, not a\n // patch; 'too-large' means `patch` is empty and the file was skipped.\n contentKind: 'diff' | 'raw' | 'too-large';\n patch: string;\n}\n\nexport type BranchHygieneStatus =\n | 'clean-on-main'\n | 'stale-merged'\n | 'stale-no-upstream'\n | 'dirty'\n | 'fine';\n\nexport interface GitLiveState {\n branch: string;\n ahead: number;\n behind: number;\n dirtyCount: number;\n}\n\n// null means the entity file doesn't exist at that ref (never drafted there yet, or archived).\nexport type PhaseState = { done: number; total: number } | null;\n\n// The ref that's ahead of the current branch's phase state, and its own count — see IDEA-171.\nexport interface StaleBaseRef {\n ref: string;\n done: number;\n total: number;\n}\n\nexport interface GitSyncFailure {\n ok: false;\n stage: 'reconcile' | 'stash-pop' | 'conflicted';\n message: string;\n stashPending: boolean;\n // Only set when stage is 'conflicted': the files a rebase left with unresolved\n // markers, for a one-click \"ask the agent to resolve\" rather than a bare error.\n conflictedFiles?: string[];\n // Only set when stage is 'conflicted': the ref the rebase targeted, and each\n // conflicted file's last-seen content (with markers) before the rebase was\n // aborted for safety — the resolve-conflict agent's raw material.\n conflictRef?: string;\n conflictedContent?: { path: string; content: string }[];\n // Prompt for the agent recovery job (see git-sync-recovery.ts) — the deterministic\n // path's failure, the working-tree state, and the goal, packaged for a future\n // launch rather than thrown at the user.\n recoveryPrompt: string;\n // Only set when stage is 'conflicted': a prompt scoped to landing this one rebase\n // (see resolve-conflict-prompt.ts) — launched only on explicit \"ask the agent to\n // resolve\" confirmation from the sync-failed toast, never automatically.\n conflictPrompt?: string;\n}\n\nexport type GitSyncResult = { ok: true } | GitSyncFailure;\n\nexport type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error' | 'superseded';\n\nexport type TaskKind =\n | 'phase'\n | 'audit'\n | 'batch-reconcile'\n | 'batch-draft'\n | 'run-all'\n | 'draft'\n | 'extend'\n | 'suggest'\n | 'commit-suggest'\n | 'overlap-check'\n | 'prioritise'\n | 'sync'\n | 'reconcile'\n | 'fix-review'\n | 'resolve-conflict'\n | 'feedback'\n | 'pr-review';\n\n// Persisted to papercamp/tasks.log (JSON Lines) — survives a dev-server restart,\n// unlike the in-memory task registry.\nexport interface TaskLogEntry {\n id: string;\n taskKind: TaskKind;\n planId?: string;\n planTitle: string;\n agentId: AgentId;\n startedAt: string;\n endedAt: string;\n outcome: 'done' | 'error' | 'superseded';\n reason?: string;\n usage?: RunUsage;\n phaseRuns?: PhaseRunRecord[];\n rateLimit?: RateLimitSnapshot;\n}\n\nexport interface RunUsage {\n durationMs: number;\n numTurns: number;\n model?: string;\n inputTokens: number;\n outputTokens: number;\n cacheCreationTokens: number;\n cacheReadTokens: number;\n costUsd: number;\n}\n\nexport interface RateLimitSnapshot {\n status: string;\n rateLimitType?: string;\n resetsAt?: number;\n overage?: boolean;\n}\n\nexport interface PhaseRunRecord {\n kind: 'phase' | 'fix';\n index: number;\n usage: RunUsage;\n}\n\nexport interface TrailHop<T> {\n reached: boolean;\n data?: T;\n}\n\nexport interface ProvenanceTrail {\n id: string;\n idea: TrailHop<{ title: string; status?: EntityStatus; type?: EntityType }>;\n phases: TrailHop<PhaseItem[]>;\n taskRuns: TrailHop<TaskLogEntry[]>;\n commits: TrailHop<string[]>;\n pr: TrailHop<PrInfo>;\n releaseLine: TrailHop<string>;\n}\n\nexport interface ReleaseNoteIdea {\n id: string;\n title: string;\n}\n\nexport interface ReleaseNoteSection {\n label: string;\n ideas: ReleaseNoteIdea[];\n}\n\nexport interface AgentTaskState {\n id: string;\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n startedAt: string;\n planId?: string;\n phaseIndex?: number;\n fixAttempt?: number;\n fixAttemptCap?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n phaseAnchor?: PhaseMilestone;\n anchorEnteredAt?: number;\n lastStreamAt?: number;\n // fix-review only: prefills the commit form once the agent has reported.\n suggestedCommit?: { title: string; message: string };\n // pr-review only: the PR being reviewed, e.g. https://github.com/o/r/pull/7.\n prReviewUrl?: string;\n errorKind?: 'auth' | 'question';\n rateLimit?: RateLimitSnapshot;\n}\n\nexport interface OverlapVerdict {\n verdict: 'existing' | 'extend' | 'new';\n targetId: string | null;\n reasoning: string;\n}\n\n/** `why` carries one line per entry in `order`, same index — the reason for that id's placement. */\nexport interface PrioritiseVerdict {\n order: string[];\n why: string;\n}\n\nexport interface ReconcileQueueItem {\n planId: string;\n title: string;\n before: { body: string; phases: PhaseItem[] };\n}\n"],"names":["PLAN_STATUSES","PLAN_KINDS","AGENT_IDS","AGENT_LABELS","AGENT_OPTIONS","coerceAgentConfig","v","toAgent","a","obj","DEFAULT_AGENTS","agentConfigsEqual","b","TOOLBAR_SEGMENT_IDS"],"mappings":"AAEO,MAAMA,IAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASaC,IAAyB,CAAC,QAAQ,OAAO,SAAS,QAAQ,UAAU,GAEpEC,IAAY,CAAC,eAAe,UAAU,GAItCC,IAAwC;AAAA,EACnD,eAAe;AAAA,EACf,UAAU;AACZ,GAqdaC,IAAyD;AAAA,EACpE,eAAe;AAAA,IACb,OAAO,CAAC,QAAQ,UAAU,SAAS,OAAO;AAAA,IAC1C,QAAQ,CAAC,OAAO,UAAU,QAAQ,SAAS,KAAK;AAAA,EAAA;AAAA,EAElD,UAAU;AAAA,IACR,OAAO;AAAA,EAAA;AAEX;AAEO,SAASC,EAAkBC,GAAyB;AACzD,QAAMC,IAAU,CAACC,MACfN,EAAU,SAASM,CAAY,IAAKA,IAAgB;AACtD,MAAI,OAAOF,KAAM,SAAU,QAAO,EAAE,OAAOC,EAAQD,CAAC,EAAA;AAEpD,QAAMG,IAAOH,KAAK,CAAA;AAClB,SAAO;AAAA,IACL,OAAOC,EAAQE,EAAI,KAAK;AAAA,IACxB,GAAI,OAAOA,EAAI,SAAU,YAAY,EAAE,OAAOA,EAAI,MAAA;AAAA,IAClD,GAAI,OAAOA,EAAI,UAAW,YAAY,EAAE,QAAQA,EAAI,OAAA;AAAA,EAAO;AAE/D;AAWO,MAAMC,IAAmC;AAAA,EAC9C,OAAO,EAAE,OAAO,WAAA;AAAA,EAChB,WAAW,EAAE,OAAO,cAAA;AAAA,EACpB,YAAY,EAAE,OAAO,cAAA;AAAA,EACrB,eAAe,EAAE,OAAO,cAAA;AAAA,EACxB,UAAU,EAAE,OAAO,eAAe,OAAO,UAAU,QAAQ,SAAA;AAAA,EAC3D,YAAY,EAAE,OAAO,eAAe,OAAO,QAAQ,QAAQ,OAAA;AAC7D;AAGO,SAASC,EAAkBH,GAAgBI,GAAyB;AACzE,SAAOJ,EAAE,UAAUI,EAAE,UAAUJ,EAAE,SAAS,SAASI,EAAE,SAAS;AAChE;AAGO,MAAMC,IAAsB,CAAC,SAAS,SAAS,MAAM;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/types/index.ts"],"sourcesContent":["export type PlanStatus = 'idea' | 'planned' | 'in-progress' | 'review' | 'done' | 'dropped';\n\nexport const PLAN_STATUSES: PlanStatus[] = [\n 'idea',\n 'planned',\n 'in-progress',\n 'review',\n 'done',\n 'dropped',\n];\n\nexport interface LogEntry {\n date: string;\n text: string;\n}\n\nexport type PlanKind = 'feat' | 'fix' | 'chore' | 'docs' | 'refactor';\n\nexport const PLAN_KINDS: PlanKind[] = ['feat', 'fix', 'chore', 'docs', 'refactor'];\n\nexport const AGENT_IDS = ['claude-code', 'opencode'] as const;\n\nexport type AgentId = (typeof AGENT_IDS)[number];\n\nexport const AGENT_LABELS: Record<AgentId, string> = {\n 'claude-code': 'Claude Code',\n opencode: 'OpenCode',\n};\n\nexport interface PhaseRun {\n durationMs: number;\n inputTokens: number;\n outputTokens: number;\n model?: string;\n attempts: number;\n}\n\nexport interface PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review' | 'manual' | 'issue';\n run?: PhaseRun;\n}\n\nexport type PhaseMilestone = 'implement' | 'verify' | 'checkbox';\n\n/** A body section anchor is `body` for now — the whole prose block is the only\n * body section a plan/entity has until later phases break it into sub-sections. */\nexport type MarginNoteAnchor = { kind: 'phase'; index: number } | { kind: 'body' };\n\nexport type MarginNoteState = 'open' | 'resolved';\n\nexport type MarginNoteKind = 'note' | 'decision' | 'question';\n\nexport interface MarginNote {\n anchor: MarginNoteAnchor;\n prose: string;\n state: MarginNoteState;\n kind?: MarginNoteKind;\n}\n\n/** What a thread message originally was, before log/review/notes/clarifications folded\n * into one ordered thread on the entity — 'note'/'decision'/'question' carry `state`,\n * the rest are plain historical records. 'chat' is thread-native (no legacy section):\n * Paper Scout conversation, collapsed by default in thread views. */\nexport type ThreadMessageKind =\n | 'log'\n | 'clarification'\n | 'review'\n | 'note'\n | 'decision'\n | 'question'\n | 'chat';\n\nexport interface ThreadMessage {\n kind: ThreadMessageKind;\n /** Absent for messages ported from the old Notes section, which never carried a date. */\n date?: string;\n text: string;\n /** Only meaningful for note/decision/question kinds. */\n state?: MarginNoteState;\n /** Absent means 'user' — no thread message predates this field being agent-authored. */\n from?: 'user' | 'agent';\n}\n\n/** Ambient context a chat mount (desk, toolbar) feeds alongside a message — each\n * mount populates whatever it has (IDEA-130); Scout folds it into the prompt\n * silently, it never becomes a user-visible field. */\nexport interface MountContext {\n route?: string;\n focusedIdeaId?: string;\n viewport?: { width: number; height: number };\n}\n\nexport interface RawEntry {\n title: string;\n fields: Record<string, string>;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n notes?: MarginNote[];\n review?: LogEntry[];\n}\n\nexport interface ParseWarning {\n title: string;\n message: string;\n}\n\nexport interface ParseResult<T> {\n entries: T[];\n warnings: ParseWarning[];\n}\n\n/** A PR's reviewable/mergeable state, as surfaced by `gh pr list`. */\nexport type PrState = 'draft' | 'open' | 'closed' | 'merged';\n\n/** GitHub's PR review decision, as surfaced by `gh pr list --json reviewDecision`. */\nexport type ReviewDecision = 'approved' | 'changes-requested' | 'review-required';\n\n// Per-comment detail; PrInfo.unresolvedThreadCount only counts these.\nexport interface ReviewThread {\n /** GraphQL node id — what `resolveReviewThread`/`replyToReviewThread` address. */\n id: string;\n /** File path the comment is anchored to; absent for a PR-level (not diff-anchored) comment. */\n path?: string;\n line?: number;\n author?: string;\n body: string;\n}\n\n// Parsed from the JSON object a fix-review agent's prompt requires as its final line.\nexport interface FixReviewResult {\n commit: { title: string; message: string };\n addressed: string[];\n skipped: { threadId: string; why: string }[];\n}\n\nexport interface PrReviewFinding {\n path: string;\n line: number;\n body: string;\n}\n\nexport type PrReviewVerdict = 'approve' | 'comment' | 'request-changes';\n\n// Parsed from the JSON object a pr-review agent's prompt requires as its final\n// line — see buildPrReviewPrompt. findings become per-line PR review comments;\n// the other fields are rendered per destination (IDEA-170, IDEA-175).\nexport interface PrReviewResult {\n verdict: PrReviewVerdict;\n assessment: string;\n concerns: string[];\n findings: PrReviewFinding[];\n}\n\nexport interface FeedbackPhaseEdit {\n op: 'add' | 'reword';\n /** 1-based position in the plan's current phase list; required for \"reword\", ignored for \"add\". */\n index?: number;\n text: string;\n description?: string;\n}\n\nexport interface FeedbackEdit {\n phases?: FeedbackPhaseEdit[];\n /** The complete replacement body, when the message corrects body prose. */\n body?: string;\n}\n\n// Parsed from the JSON object a feedback-reply agent's prompt requires as its\n// final line. The chat never creates ideas — a request is either a reply or an\n// edit on the current plan.\nexport interface FeedbackReplyResult {\n reply: string;\n edit?: FeedbackEdit;\n /** True when the user's message answers an open question the agent asked\n * earlier in this thread — the route persists that message as a clarification. */\n answersQuestion?: boolean;\n}\n\n/** Live-resolved PR info for an entity's branch — see `core/pr.ts`. */\nexport interface PrInfo {\n number: number;\n url: string;\n state: PrState;\n /** Undefined when no review has been requested/decided, or when unresolved (offline, closed/merged PR). */\n reviewDecision?: ReviewDecision;\n /** Count of unresolved review threads. Only fetched for open/draft PRs; undefined when not fetched or unresolved. */\n unresolvedThreadCount?: number;\n /** Whether a comment or review landed after the PR's last commit — a proxy for \"since the last agent pass\" (a pass ends with a push). Only fetched for open/draft PRs. */\n hasNewCommentsSincePush?: boolean;\n /** Full SHA of the PR's current head commit — what a pr-review is scoped to (IDEA-170). */\n headSha?: string;\n headBranch?: string;\n /** A posted review's footer names this entity and `headSha` — set once the poll\n * observes it (IDEA-175). */\n scoutReviewObserved?: boolean;\n}\n\n/** Advisory info for the \"Review PR\" action — nothing here gates the button,\n * it only labels it (IDEA-174 fix 2). */\nexport interface PrReviewStatus {\n ready: boolean;\n headSha: string | null;\n lastReviewedSha: string | null;\n /** null when no CI is configured, or the PR's branch has no runs yet. */\n ciGreen: boolean | null;\n}\n\nexport interface PlanEntry {\n title: string;\n status: PlanStatus;\n kind?: PlanKind;\n /** 'fix' when this plan is a follow-up fix entity (IDEA-187) — undefined for an\n * ordinary plan-bearing idea. Distinct from `kind`, which carries the commit type. */\n entityKind?: EntityKind;\n id?: string;\n idea?: string;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n /** Version tag (e.g. v0.13.1) that first shipped this idea, stamped from the release train. */\n released?: string;\n tags: string[];\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n /** See EntityEntry.issueSource. */\n issueSource?: string;\n body: string;\n phases: PhaseItem[];\n /** Post-build findings, same checkbox grammar as `phases` — see EntityEntry.fixes. */\n fixes?: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n notes?: MarginNote[];\n /** Prose written against the whole finished plan, distinct from the flat `log` — an\n * agent later splits each entry into rework phases or a follow-up idea. */\n review?: LogEntry[];\n /** The entity's single ordered feedback thread — see EntityEntry.thread. */\n thread?: ThreadMessage[];\n /** Set by readEntities from which dir the file came from — see EntityEntry.archived. */\n archived?: boolean;\n pr?: PrInfo;\n /** True when `status` is a phase-count/stored-override guess because GitHub's PR\n * state couldn't be resolved, rather than derived from a resolved PR — see\n * isStatusFallback. */\n statusFallback?: boolean;\n}\n\nexport interface ArchivableIdea {\n id: string;\n title: string;\n pr: PrInfo;\n}\n\n/** One open `question` thread message, resolved to the idea it's parked on. `ageDays`\n * is `Infinity` for a question ported from the pre-Thread Notes section, which never\n * carried a date — the oldest kind of unresolved question there is. */\nexport interface ParkedQuestion {\n entityId: string;\n entityTitle: string;\n text: string;\n date?: string;\n ageDays: number;\n}\n\n/** The two event-sourced notification kinds (IDEA-153) — 'completed' when a task\n * reaches done/error, 'reply' when an agent posts a non-blocking feedback thread\n * entry. Unlike ParkedQuestion (derived live from thread state), these are stored\n * as discrete events on read, so a since-resolved source can't erase them. */\nexport type StoredNotificationKind = 'completed' | 'reply';\n\nexport interface StoredNotification {\n id: string;\n kind: StoredNotificationKind;\n entityId: string;\n entityTitle: string;\n text: string;\n date: string;\n read: boolean;\n /** Only set for 'completed' — the task outcome that triggered it. */\n outcome?: 'done' | 'error';\n}\n\n/** One unified feed entry (IDEA-153) — a parked question (open→resolved, always\n * unread while it's shown at all) alongside the two stored, read/unread kinds. */\nexport type Notification = (ParkedQuestion & { kind: 'question' }) | StoredNotification;\n\nexport type ConsistencyIssueKind = 'orphan-subject' | 'title-style';\n\nexport interface ConsistencyIssue {\n kind: ConsistencyIssueKind;\n section: 'plans';\n title: string;\n message: string;\n planId?: string;\n}\n\nexport interface CommentStats {\n commentLines: number;\n sourceLines: number;\n ratio: number;\n}\n\nexport interface TasksPerWeek {\n /** ISO week, e.g. \"2026-W05\". */\n week: string;\n count: number;\n}\n\nexport interface UsagePerWeek {\n /** ISO week, e.g. \"2026-W05\". */\n week: string;\n agentMinutes: number;\n inputTokens: number;\n outputTokens: number;\n}\n\nexport interface IdeaCost {\n planId: string;\n planTitle: string;\n inputTokens: number;\n outputTokens: number;\n durationMs: number;\n}\n\nexport interface CapacityStat {\n snapshot: RateLimitSnapshot;\n capturedAt: string;\n}\n\nexport interface ProjectStats {\n generatedAt: string;\n comments: CommentStats;\n testLines: number;\n /** Null when no coverage report has been emitted yet (run `pnpm test`). */\n testCoveragePct: number | null;\n entitiesByStatus: Partial<Record<EntityStatus, number>>;\n openQuestions: number;\n decisions: number;\n tasksPerWeek: TasksPerWeek[];\n usagePerWeek: UsagePerWeek[];\n medianPhaseDurationMs: number | null;\n mostExpensiveIdeas: IdeaCost[];\n capacity: CapacityStat | null;\n}\n\nexport type IdeaKind = 'idea' | 'note';\n\nexport type IdeaStatus = 'open' | 'done' | 'dropped';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n kind?: IdeaKind;\n status?: IdeaStatus;\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n /** Fallback sort key for unordered entries — see `order`. Absent on view-model-only IdeaEntry literals that never enter the worklist sort. */\n created?: string;\n log?: LogEntry[];\n}\n\n// Unified entity — one file per entity, plan as an optional Phases section.\n// Supersedes PlanEntry/IdeaEntry once the migration cutover lands.\n\n/** Work classification — same Conventional-Commits values as PlanKind; `kind` renamed to `type` in the unified schema. */\nexport type EntityType = PlanKind;\n\n/** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */\nexport type EntityStatus = PlanStatus | 'open';\n\n/** \"note\" never grows phases; \"fix\" is a follow-up entity linked to a done/archived\n * parent via `idea` — see entityFrontmatterSchema. Omitted for a normal idea. */\nexport type EntityKind = 'note' | 'fix';\n\nexport interface EntityEntry {\n id: string;\n title: string;\n /** Absent until the entity is classified (usually when its plan is drafted). */\n type?: EntityType;\n kind?: EntityKind;\n /** Stored override, not the source of truth — see entityFrontmatterSchema. */\n status?: EntityStatus;\n /** IDEA-N backlink to the parent this fix addresses; required when kind: fix. */\n idea?: string;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n /** Version tag (e.g. v0.13.1) that first shipped this idea, stamped from the release train. */\n released?: string;\n tags: string[];\n /** Absent renders as the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n /** The Issue.id (`sourceKind:sourceKey`, IDEA-192) this entity was spawned to promote,\n * if any — how a promoted issue is re-matched to its target on every read, since\n * issues carry no store of their own. */\n issueSource?: string;\n body: string;\n phases: PhaseItem[];\n /** Post-build findings, same checkbox grammar as `phases` — appended below Phases\n * rather than rewriting the plan's already-finished phase history. */\n fixes?: PhaseItem[];\n /** The entity's single ordered feedback thread — folds what used to be separate\n * log/clarifications/notes/review sections. */\n thread?: ThreadMessage[];\n /** Set by readEntities from which of the two scanned dirs the file came from, not the frontmatter. */\n archived?: boolean;\n /** Frontmatter keys this paper-camp doesn't recognise, carried through verbatim so a\n * write never drops a field a newer version wrote — see entityFrontmatterKnownKeys. */\n unknownFrontmatter?: Record<string, unknown>;\n}\n\n// No `id`/`status`: it only becomes a real idea if a human promotes it.\nexport interface SuggestionEntry {\n date: string;\n title: string;\n description: string;\n}\n\nexport interface RoadmapItem {\n name: string;\n description: string;\n candidates: string[];\n linked: string[];\n}\n\nexport interface RoadmapHorizon {\n title: string;\n items: RoadmapItem[];\n}\n\nexport interface Roadmap {\n goal: string;\n horizons: RoadmapHorizon[];\n standingConcerns: RoadmapItem[];\n}\n\nexport interface RoadmapLink {\n id: string;\n status: PlanStatus;\n taskRuns: number;\n pr?: PrInfo;\n released: boolean;\n}\n\nexport interface RoadmapRollup {\n total: number;\n done: number;\n}\n\nexport interface ResolvedRoadmapItem extends RoadmapItem {\n links: RoadmapLink[];\n rollup: RoadmapRollup;\n}\n\nexport interface ResolvedRoadmapHorizon {\n title: string;\n items: ResolvedRoadmapItem[];\n rollup: RoadmapRollup;\n}\n\nexport interface ResolvedRoadmap {\n goal: string;\n horizons: ResolvedRoadmapHorizon[];\n events: RoadmapEvent[];\n}\n\nexport type RoadmapEventKind = 'created' | 'task-run';\n\nexport interface RoadmapEvent {\n date: string;\n kind: RoadmapEventKind;\n entityId: string;\n horizonTitle: string;\n itemName: string;\n label: string;\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\n /** Set on GET responses when the value is withheld — secrets never reach the client. */\n isSet?: boolean;\n}\n\nexport interface AgentConfig {\n agent: AgentId;\n model?: string;\n effort?: string;\n}\n\n/** Model/effort passed to an adapter's buildArgs — the AgentConfig minus the agent id. */\nexport interface AgentRunOptions {\n model?: string;\n effort?: string;\n /** Prior claude-code session id to continue instead of starting cold; ignored by opencode. */\n resume?: string;\n}\n\n/** Maps option names to a fixed value list (renders a Select) or null (free-text or hidden). */\nexport type AgentOptionsDescriptor = Record<string, string[] | null | undefined>;\n\nexport const AGENT_OPTIONS: Record<AgentId, AgentOptionsDescriptor> = {\n 'claude-code': {\n model: ['opus', 'sonnet', 'fable', 'haiku'],\n effort: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n opencode: {\n model: null,\n },\n};\n\nexport function coerceAgentConfig(v: unknown): AgentConfig {\n const toAgent = (a: unknown): AgentId =>\n AGENT_IDS.includes(a as AgentId) ? (a as AgentId) : 'claude-code';\n if (typeof v === 'string') return { agent: toAgent(v) };\n // A missing key must not throw — that would 500 the /api/config read this protects.\n const obj = (v ?? {}) as Record<string, unknown>;\n return {\n agent: toAgent(obj.agent),\n ...(typeof obj.model === 'string' && { model: obj.model }),\n ...(typeof obj.effort === 'string' && { effort: obj.effort }),\n };\n}\n\nexport interface DefaultAgentsMap {\n phase: AgentConfig;\n planDraft: AgentConfig;\n ideaExtend: AgentConfig;\n commitSuggest: AgentConfig;\n feedback: AgentConfig;\n codeReview: AgentConfig;\n}\n\nexport const DEFAULT_AGENTS: DefaultAgentsMap = {\n phase: { agent: 'opencode' },\n planDraft: { agent: 'claude-code' },\n ideaExtend: { agent: 'claude-code' },\n commitSuggest: { agent: 'claude-code' },\n feedback: { agent: 'claude-code', model: 'sonnet', effort: 'medium' },\n codeReview: { agent: 'claude-code', model: 'opus', effort: 'high' },\n};\n\n/** A reviewer must not use the same model as the task that wrote the code (IDEA-170) — self-review rubber-stamps. */\nexport function agentConfigsEqual(a: AgentConfig, b: AgentConfig): boolean {\n return a.agent === b.agent && (a.model ?? '') === (b.model ?? '');\n}\n\n/** Toolbar segments, left to right (IDEA-128/IDEA-133); trimmed per project via `IntegrationConfig.toolbar.segments`. */\nexport const TOOLBAR_SEGMENT_IDS = ['focus', 'scout', 'desk'] as const;\n\nexport type ToolbarSegmentId = (typeof TOOLBAR_SEGMENT_IDS)[number];\n\nexport interface IntegrationToolbarConfig {\n enabled?: boolean;\n segments?: ToolbarSegmentId[];\n /** Opt-in escape hatch: without it, the vite plugin stays off when `mode` is `production`. */\n allowProduction?: boolean;\n}\n\nexport interface IntegrationConfig {\n toolbar?: IntegrationToolbarConfig;\n route?: string;\n}\n\nexport interface DeskService {\n name: string;\n cmd: string;\n port?: number;\n healthcheck?: string;\n}\n\nexport interface DeskCheck {\n name: string;\n cmd: string;\n}\n\nexport interface DeskCi {\n repo: string;\n branch?: string;\n releasePlease?: boolean;\n}\n\n/** Dev-loop manifest (IDEA-119): declared services, one-click checks, and CI/release sources. */\nexport interface DeskConfig {\n services?: DeskService[];\n checks?: DeskCheck[];\n ci?: DeskCi;\n}\n\nexport type ServiceRunStatus = 'stopped' | 'running' | 'stopping' | 'crashed';\n\nexport type ServiceHealth = 'unknown' | 'up' | 'down';\n\n/** Live runtime view of a declared service (IDEA-119), merging manifest + process state. */\nexport interface ServiceState {\n name: string;\n cmd: string;\n port?: number;\n hasHealthcheck: boolean;\n status: ServiceRunStatus;\n health: ServiceHealth;\n pid: number | null;\n startedAt: string | null;\n exitCode: number | null;\n}\n\n/** Live result of a declared one-click check (IDEA-119), mirroring the Stack panel's CheckResult. */\nexport interface DeskCheckState {\n name: string;\n cmd: string;\n status: CheckStatus;\n lastRun: string | null;\n output: string;\n}\n\nexport type CiRunStatus =\n | 'success'\n | 'failure'\n | 'in_progress'\n | 'queued'\n | 'cancelled'\n | 'unknown';\n\nexport interface CiRun {\n workflow: string;\n status: CiRunStatus;\n url: string | null;\n}\n\nexport interface ReleasePr {\n number: number;\n title: string;\n url: string;\n version: string | null;\n}\n\n/** CI & release mirror for a declared repo (IDEA-119): latest Actions runs on the tracked\n * branch, the open release-please PR, and the released vs. queued version. */\nexport interface CiReleaseState {\n repo: string;\n branch: string;\n available: boolean;\n runs: CiRun[];\n releasePr: ReleasePr | null;\n releasedVersion: string | null;\n}\n\nexport interface PaperCampConfig {\n /** Corpus format version (see CORPUS_FORMAT_VERSION) — the shape this file and the\n * entity frontmatter it sits alongside conform to, not the npm package version. */\n version: number;\n projectName: string;\n initializedAt: string;\n /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */\n nextId?: Partial<Record<PlanKind, number>> & { idea?: number };\n port?: number;\n defaultAgents?: DefaultAgentsMap;\n /** Derived from `ROADMAP.md` on every read (IDEA-95), never written to disk; an idea's\n * `subject` not present here renders as \"No subject\". */\n subjects?: string[];\n /** Opts out of the first-run redirect to Settings > Setup while capabilities are incomplete. */\n setupDismissed?: boolean;\n /** In-app dev toolbar (IDEA-128) — the `@dendelion/paper-camp/vite` plugin's mount, toggleable for frontend targets. */\n integration?: IntegrationConfig;\n /** Dev-loop desk manifest (IDEA-119) — declared services, checks, and CI/release sources per project. */\n desk?: DeskConfig;\n /** Project-declared commands the desk/embed can run on demand (IDEA-157). */\n commands?: {\n /** Manual build for the Stack's Build action; no universal default. */\n build?: string;\n };\n}\n\nexport type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';\n\nexport interface CheckResult {\n status: CheckStatus;\n /** The shell command this check runs — empty until a build command is configured. */\n cmd: string;\n lastRun: string | null;\n output: string;\n}\n\nexport type CheckName = 'lint' | 'format' | 'test' | 'consistency' | 'build';\n\nexport type CapabilityStatus = 'ok' | 'warn' | 'missing';\n\nexport interface CapabilityResult {\n id: string;\n status: CapabilityStatus;\n detail: string;\n}\n\nexport interface AgentAuthStatus {\n loggedIn: boolean | null;\n authMethod: string | null;\n apiProvider: string | null;\n}\n\nexport type LoginRelayPhase =\n | 'starting'\n | 'awaiting-authorization'\n | 'success'\n | 'error'\n | 'cancelled';\n\nexport interface LoginRelayState {\n phase: LoginRelayPhase;\n authorizeUrl: string | null;\n error?: string;\n}\n\nexport type ServiceId = 'git' | 'gh' | `agent:${AgentId}`;\n\n/** What a Connections row offers once its service isn't `ok` — copy a command, follow a link, or read plain instructions. */\nexport type ConnectAction =\n /** `runnable` marks a command with no placeholders and no interactive prompts — safe for the server to execute directly instead of just displaying it. */\n | { kind: 'command'; command: string; runnable?: boolean }\n | { kind: 'link'; url: string; label: string }\n | { kind: 'text'; message: string };\n\nexport interface ConnectionResult {\n id: ServiceId;\n label: string;\n unlocks: string;\n status: CapabilityStatus;\n detail: string;\n authenticated: boolean | null;\n connect: ConnectAction | null;\n}\n\nexport interface MergePolicy {\n allowSquashMerge: boolean;\n allowMergeCommit: boolean;\n allowRebaseMerge: boolean;\n squashMergeCommitTitle: string;\n squashMergeCommitMessage: string;\n}\n\nexport type MergePolicyResult =\n | { status: 'ok'; repo: string; policy: MergePolicy }\n | { status: 'unavailable'; reason: string };\n\nexport interface GitStatusEntry {\n path: string;\n status: string;\n staged: boolean;\n renameSource?: string;\n}\n\nexport interface GitStashEntry {\n index: number;\n branch: string;\n message: string;\n ageDays: number;\n own: boolean;\n}\n\nexport interface GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n ahead: number;\n behind: number;\n diverged: boolean;\n branchHygiene: BranchHygieneStatus;\n stashPending: boolean;\n stashes: GitStashEntry[];\n}\n\nexport interface FileDiffEntry {\n path: string;\n renameSource?: string;\n status: string;\n staged: boolean;\n binary: boolean;\n additions: number;\n deletions: number;\n // 'diff' is a unified patch (tracked files); 'raw' is untracked file content, not a\n // patch; 'too-large' means `patch` is empty and the file was skipped.\n contentKind: 'diff' | 'raw' | 'too-large';\n patch: string;\n}\n\nexport type BranchHygieneStatus =\n | 'clean-on-main'\n | 'stale-merged'\n | 'stale-no-upstream'\n | 'dirty'\n | 'fine';\n\nexport interface GitLiveState {\n branch: string;\n ahead: number;\n behind: number;\n dirtyCount: number;\n}\n\n// null means the entity file doesn't exist at that ref (never drafted there yet, or archived).\nexport type PhaseState = { done: number; total: number } | null;\n\n// The ref that's ahead of the current branch's phase state, and its own count — see IDEA-171.\nexport interface StaleBaseRef {\n ref: string;\n done: number;\n total: number;\n}\n\nexport interface GitSyncFailure {\n ok: false;\n stage: 'reconcile' | 'stash-pop' | 'conflicted';\n message: string;\n stashPending: boolean;\n // Only set when stage is 'conflicted': the files a rebase left with unresolved\n // markers, for a one-click \"ask the agent to resolve\" rather than a bare error.\n conflictedFiles?: string[];\n // Only set when stage is 'conflicted': the ref the rebase targeted, and each\n // conflicted file's last-seen content (with markers) before the rebase was\n // aborted for safety — the resolve-conflict agent's raw material.\n conflictRef?: string;\n conflictedContent?: { path: string; content: string }[];\n // Prompt for the agent recovery job (see git-sync-recovery.ts) — the deterministic\n // path's failure, the working-tree state, and the goal, packaged for a future\n // launch rather than thrown at the user.\n recoveryPrompt: string;\n // Only set when stage is 'conflicted': a prompt scoped to landing this one rebase\n // (see resolve-conflict-prompt.ts) — launched only on explicit \"ask the agent to\n // resolve\" confirmation from the sync-failed toast, never automatically.\n conflictPrompt?: string;\n}\n\nexport type GitSyncResult = { ok: true } | GitSyncFailure;\n\nexport type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error' | 'superseded';\n\nexport type TaskKind =\n | 'phase'\n | 'audit'\n | 'batch-reconcile'\n | 'batch-draft'\n | 'run-all'\n | 'draft'\n | 'extend'\n | 'suggest'\n | 'commit-suggest'\n | 'overlap-check'\n | 'prioritise'\n | 'sync'\n | 'reconcile'\n | 'fix-review'\n | 'resolve-conflict'\n | 'feedback'\n | 'pr-review'\n | 'issue-fix';\n\n// Persisted to papercamp/tasks.log (JSON Lines) — survives a dev-server restart,\n// unlike the in-memory task registry.\nexport interface TaskLogEntry {\n id: string;\n taskKind: TaskKind;\n planId?: string;\n planTitle: string;\n agentId: AgentId;\n startedAt: string;\n endedAt: string;\n outcome: 'done' | 'error' | 'superseded';\n reason?: string;\n usage?: RunUsage;\n phaseRuns?: PhaseRunRecord[];\n rateLimit?: RateLimitSnapshot;\n /** issue-fix only: the Issue.id (IDEA-192) this run was launched to fix, so a\n * repeat failure's thread can be reconstructed by matching entries to the issue. */\n issueId?: string;\n}\n\nexport interface RunUsage {\n durationMs: number;\n numTurns: number;\n model?: string;\n inputTokens: number;\n outputTokens: number;\n cacheCreationTokens: number;\n cacheReadTokens: number;\n costUsd: number;\n}\n\nexport interface RateLimitSnapshot {\n status: string;\n rateLimitType?: string;\n resetsAt?: number;\n overage?: boolean;\n}\n\nexport interface PhaseRunRecord {\n kind: 'phase' | 'fix';\n index: number;\n usage: RunUsage;\n}\n\nexport interface TrailHop<T> {\n reached: boolean;\n data?: T;\n}\n\nexport interface ProvenanceTrail {\n id: string;\n idea: TrailHop<{ title: string; status?: EntityStatus; type?: EntityType }>;\n phases: TrailHop<PhaseItem[]>;\n taskRuns: TrailHop<TaskLogEntry[]>;\n commits: TrailHop<string[]>;\n pr: TrailHop<PrInfo>;\n releaseLine: TrailHop<string>;\n}\n\nexport interface ReleaseNoteIdea {\n id: string;\n title: string;\n}\n\nexport interface ReleaseNoteSection {\n label: string;\n ideas: ReleaseNoteIdea[];\n}\n\nexport interface AgentTaskState {\n id: string;\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n startedAt: string;\n planId?: string;\n phaseIndex?: number;\n fixAttempt?: number;\n fixAttemptCap?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n phaseAnchor?: PhaseMilestone;\n anchorEnteredAt?: number;\n lastStreamAt?: number;\n // fix-review only: prefills the commit form once the agent has reported.\n suggestedCommit?: { title: string; message: string };\n // pr-review only: the PR being reviewed, e.g. https://github.com/o/r/pull/7.\n prReviewUrl?: string;\n errorKind?: 'auth' | 'question';\n rateLimit?: RateLimitSnapshot;\n // issue-fix only: the Issue.id this run was launched to fix.\n issueId?: string;\n}\n\nexport interface OverlapVerdict {\n verdict: 'existing' | 'extend' | 'new';\n targetId: string | null;\n reasoning: string;\n}\n\n/** `why` carries one line per entry in `order`, same index — the reason for that id's placement. */\nexport interface PrioritiseVerdict {\n order: string[];\n why: string;\n}\n\nexport interface ReconcileQueueItem {\n planId: string;\n title: string;\n before: { body: string; phases: PhaseItem[] };\n}\n\n/** The four failures IDEA-192 collects into one place: a failed agent run, a red\n * project check, a PR review that requested changes, and a git rebase/sync failure. */\nexport type IssueSourceKind = 'agent-run' | 'check' | 'pr-review' | 'sync';\n\n/** Derived from the world on every read, never a mark-read button — 'open' while a\n * collector still finds the failure, 'closed' once it doesn't or the promoted fix\n * that carries it ships. */\nexport type IssueStatus = 'open' | 'closed';\n\n/** One collected failure (IDEA-192), read as a short thread. `id` is derived from\n * `sourceKind` + `sourceKey`, so a repeat failure of the same thing resolves to the\n * same issue and continues its thread instead of raising a duplicate. */\nexport interface Issue {\n id: string;\n sourceKind: IssueSourceKind;\n /** Stable within `sourceKind` — a task's `planId`, a check's `name`, a PR's\n * `number` + `headSha`, or a sync failure's branch + target ref. */\n sourceKey: string;\n entityId?: string;\n entityTitle?: string;\n title: string;\n reason: string;\n /** Last output lines, when the source captured any (a check's command output, a\n * sync failure's conflicted files). */\n output?: string;\n /** Absent when the source carries no timestamp of its own (a live PR review decision). */\n occurredAt?: string;\n thread: ThreadMessage[];\n status: IssueStatus;\n /** Set once promoted (IDEA-192 phase 6) — the id of whatever now carries the work:\n * a spawned fix entity, a spawned plain idea (no parent), or the open parent an\n * issue was appended to as an inline fix. A promoted issue closes when that\n * entity's status reaches 'done', independent of whether the original source is\n * still detected as failing. */\n promotedFixId?: string;\n}\n"],"names":["PLAN_STATUSES","PLAN_KINDS","AGENT_IDS","AGENT_LABELS","AGENT_OPTIONS","coerceAgentConfig","v","toAgent","a","obj","DEFAULT_AGENTS","agentConfigsEqual","b","TOOLBAR_SEGMENT_IDS"],"mappings":"AAEO,MAAMA,IAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;A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+1,6 @@
1
1
  {
2
2
  "name": "@dendelion/paper-camp",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Local-first, AI-native project management with retro aesthetics",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.12.1",
@@ -89,7 +89,7 @@
89
89
  "@commitlint/cli": "^21.0.2",
90
90
  "@commitlint/config-conventional": "^21.0.2",
91
91
  "@dendelion/paper-camp": "0.16.0",
92
- "@dendelion/paper-ui": "^0.16.0",
92
+ "@dendelion/paper-ui": "^0.17.0",
93
93
  "@types/node": "^20.0.0",
94
94
  "@types/react": "^18.3.11",
95
95
  "@types/react-dom": "^18.3.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-nuVVSVma.js","sources":["../../../src/app/features/tasks/tasks-page.tsx"],"sourcesContent":["import { PageTitle } from '@/app/components/page-title';\nimport { fetchTaskLogLines } from '@/app/services/content/docs-api';\nimport { useAppStore } from '@/app/stores/app-store';\nimport { color } from '@/app/styles/tokens';\nimport { AGENT_LABELS, type TaskKind, type TaskLogEntry } from '@/types/index';\nimport { Button, Card, Stamp } from '@dendelion/paper-ui';\nimport { useSearch } from '@tanstack/react-router';\nimport { useEffect, useRef, useState } from 'react';\n\nconst TASK_KIND_LABELS: Record<TaskKind, string> = {\n phase: 'Phase run',\n audit: 'Audit',\n 'batch-reconcile': 'Batch reconcile',\n 'batch-draft': 'Batch draft',\n 'run-all': 'Run all phases',\n draft: 'Draft',\n extend: 'Extend',\n suggest: 'Suggest ideas',\n 'commit-suggest': 'Commit suggest',\n 'overlap-check': 'Overlap check',\n prioritise: 'Prioritise queue',\n sync: 'Sync',\n reconcile: 'Reconcile',\n 'fix-review': 'Fix review',\n 'resolve-conflict': 'Resolve conflict',\n feedback: 'Feedback reply',\n 'pr-review': 'PR review',\n};\n\nconst pad = (n: number) => String(n).padStart(2, '0');\n\nconst dayKey = (iso: string) => {\n const d = new Date(iso);\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n};\n\nconst formatDayHeader = (iso: string) =>\n new Date(iso).toLocaleDateString(undefined, {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n\nconst formatTime = (iso: string) => {\n const d = new Date(iso);\n return `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;\n};\n\nconst headerLabelClassName = 'text-sm font-semibold whitespace-nowrap overflow-hidden';\n\nconst TASK_ROWS_GRID_CLASS =\n 'grid grid-cols-[20px_116px_minmax(0,1fr)_88px_150px_72px] gap-2.5 items-center max-lg:grid-cols-[20px_116px_minmax(0,1fr)_88px_72px] max-[480px]:grid-cols-1 max-[480px]:gap-1';\n\nconst TaskLogLines = ({ id }: { id: string }) => {\n const [lines, setLines] = useState<string[] | null>(null);\n const [failed, setFailed] = useState(false);\n const [attempt, setAttempt] = useState(0);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: attempt is the retry trigger (re-runs the fetch), not a value read in the body.\n useEffect(() => {\n let cancelled = false;\n let timer: ReturnType<typeof setTimeout> | undefined;\n setLines(null);\n setFailed(false);\n // Auto-retry first (dev server briefly drops requests on hot reload); manual Retry only if it stays down.\n const load = (remaining: number) => {\n fetchTaskLogLines(id)\n .then((data) => {\n if (cancelled) return;\n setLines(data.lines ?? []);\n })\n .catch(() => {\n if (cancelled) return;\n if (remaining > 0) {\n timer = setTimeout(() => load(remaining - 1), 700);\n return;\n }\n // Empty result != failed request: conflating them mislabels a fetch error as \"no output\".\n setFailed(true);\n setLines([]);\n });\n };\n load(3);\n return () => {\n cancelled = true;\n if (timer) clearTimeout(timer);\n };\n }, [id, attempt]);\n\n const retry = (\n <Button variant=\"ghost\" size=\"small\" onClick={() => setAttempt((n) => n + 1)}>\n Retry\n </Button>\n );\n\n if (lines === null) return <p className=\"opacity-50 m-0\">Loading…</p>;\n if (failed)\n return (\n <div className=\"flex items-center gap-2\">\n <p className=\"opacity-50 m-0\">Couldn't load this task's output.</p>\n {retry}\n </div>\n );\n if (lines.length === 0)\n return (\n <div className=\"flex items-center gap-2\">\n <p className=\"opacity-50 m-0\">No output recorded.</p>\n {retry}\n </div>\n );\n return (\n <pre className=\"font-mono text-xs m-0 max-h-[320px] overflow-y-auto whitespace-pre-wrap\">\n {lines.join('\\n')}\n </pre>\n );\n};\n\nconst ChevronRightIcon = ({ size = 14, className }: { size?: number; className?: string }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className={className}\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n);\n\nconst TaskRow = ({ entry, highlighted }: { entry: TaskLogEntry; highlighted: boolean }) => {\n const [expanded, setExpanded] = useState(highlighted);\n useEffect(() => {\n if (highlighted) setExpanded(true);\n }, [highlighted]);\n const toggle = () => setExpanded((v) => !v);\n\n return (\n <div\n className={\n highlighted\n ? 'task-row-highlighted flex flex-col gap-1 rounded-[10px] outline outline-2 outline-offset-[-2px] outline-[rgba(200,154,90,0.5)]'\n : 'flex flex-col gap-1 rounded-[10px]'\n }\n >\n {/* biome-ignore lint/a11y/useSemanticElements: the clickable row wraps a Card whose block layout a native <button> would break; keyboard toggling is wired on the div. */}\n <div\n role=\"button\"\n tabIndex={0}\n aria-expanded={expanded}\n onClick={toggle}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggle();\n }\n }}\n className=\"group cursor-pointer rounded-[10px]\"\n >\n <Card size=\"small\" texture=\"canvas\" className=\"plan-row-card\">\n <div className={TASK_ROWS_GRID_CLASS}>\n <span className=\"inline-flex items-center opacity-50\">\n <ChevronRightIcon className=\"group-aria-expanded:rotate-90\" />\n </span>\n <span className=\"font-semibold whitespace-nowrap overflow-hidden\">\n {TASK_KIND_LABELS[entry.taskKind] ?? entry.taskKind}\n </span>\n <span className=\"overflow-hidden text-ellipsis whitespace-nowrap opacity-70\">\n {entry.planTitle}\n </span>\n <span className=\"text-sm opacity-50 whitespace-nowrap\">\n {AGENT_LABELS[entry.agentId]}\n </span>\n <span className=\"max-lg:hidden font-mono text-xs opacity-[0.55] whitespace-nowrap\">\n {formatTime(entry.startedAt)}–{formatTime(entry.endedAt)}\n </span>\n <div className=\"flex items-center\">\n <Stamp\n size=\"small\"\n fillColor={\n entry.outcome === 'done'\n ? 'rgba(143, 185, 150, 0.25)'\n : entry.outcome === 'superseded'\n ? 'rgba(212, 163, 115, 0.25)'\n : 'rgba(201, 139, 139, 0.25)'\n }\n textColor={\n entry.outcome === 'done'\n ? color.accentGreenDark\n : entry.outcome === 'superseded'\n ? color.accentAmberDark\n : color.accentRoseDark\n }\n >\n {entry.outcome}\n </Stamp>\n </div>\n </div>\n </Card>\n </div>\n {expanded && (\n <Card size=\"small\" texture=\"kraft\" className=\"plan-row-card\">\n {entry.outcome === 'error' && entry.reason && (\n <p className=\"m-0 mb-2 text-sm text-state-danger\">{entry.reason}</p>\n )}\n <TaskLogLines id={entry.id} />\n </Card>\n )}\n </div>\n );\n};\n\nexport const TasksPage = () => {\n const taskLog = useAppStore((s) => s.taskLog);\n const taskLogLoading = useAppStore((s) => s.taskLogLoading);\n const loadTaskLog = useAppStore((s) => s.loadTaskLog);\n const { taskId } = useSearch({ from: '/tasks' });\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n loadTaskLog();\n }, [loadTaskLog]);\n\n useEffect(() => {\n if (!taskId) return;\n const row = containerRef.current?.querySelector('.task-row-highlighted');\n row?.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }, [taskId]);\n\n const sorted = [...taskLog].sort((a, b) => b.endedAt.localeCompare(a.endedAt));\n\n const groups: { key: string; entries: TaskLogEntry[] }[] = [];\n for (const entry of sorted) {\n const key = dayKey(entry.endedAt);\n const group = groups.at(-1);\n if (group?.key === key) group.entries.push(entry);\n else groups.push({ key, entries: [entry] });\n }\n\n return (\n <div ref={containerRef}>\n <PageTitle>Tasks</PageTitle>\n {taskLogLoading && <p className=\"opacity-50\">Loading…</p>}\n {!taskLogLoading && sorted.length === 0 && (\n <p className=\"opacity-50\">No tasks have run yet.</p>\n )}\n {!taskLogLoading && sorted.length > 0 && (\n <div className=\"flex flex-col gap-1\">\n <Card size=\"small\" texture=\"kraft\" className=\"plan-row-card\">\n <div className={TASK_ROWS_GRID_CLASS}>\n <span />\n <span className={`${headerLabelClassName} opacity-60`}>Task</span>\n <span className={`${headerLabelClassName} opacity-60`}>Plan</span>\n <span className={`${headerLabelClassName} opacity-60`}>Agent</span>\n <span className={`max-lg:hidden ${headerLabelClassName} opacity-60`}>Time</span>\n <span className={`${headerLabelClassName} opacity-60`}>Outcome</span>\n </div>\n </Card>\n {groups.map((group) => (\n <div key={group.key} className=\"flex flex-col gap-1\">\n <Card size=\"small\" texture=\"kraft\" className=\"plan-row-card\">\n <span className={`${headerLabelClassName} opacity-75`}>\n {formatDayHeader(group.entries[0].endedAt)}\n </span>\n </Card>\n {group.entries.map((entry) => (\n <TaskRow key={entry.id} entry={entry} highlighted={entry.id === taskId} />\n ))}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n};\n"],"names":["TASK_KIND_LABELS","pad","n","dayKey","iso","d","formatDayHeader","formatTime","headerLabelClassName","TASK_ROWS_GRID_CLASS","TaskLogLines","id","lines","setLines","useState","failed","setFailed","attempt","setAttempt","useEffect","cancelled","timer","load","remaining","fetchTaskLogLines","data","retry","jsx","Button","jsxs","ChevronRightIcon","size","className","TaskRow","entry","highlighted","expanded","setExpanded","toggle","v","e","Card","AGENT_LABELS","Stamp","color","TasksPage","taskLog","useAppStore","s","taskLogLoading","loadTaskLog","taskId","useSearch","containerRef","useRef","row","_a","sorted","a","b","groups","key","group","PageTitle"],"mappings":"wGASA,MAAMA,EAA6C,CACjD,MAAO,YACP,MAAO,QACP,kBAAmB,kBACnB,cAAe,cACf,UAAW,iBACX,MAAO,QACP,OAAQ,SACR,QAAS,gBACT,i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,w as I,C as R,ac as _,p as G,ad as M,ae as y,K as z}from"./main--EStESJz.js";const U=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/;function H(e){if(!e)return[];const a=(e.endsWith(`
2
- `)?e.slice(0,-1):e).split(`
3
- `),i=[];let n=null,l=0,o=0;for(const c of a){const d=c.match(U);if(d){n={header:c,lines:[]},i.push(n),l=Number(d[1]),o=Number(d[2]);continue}n&&(c.startsWith("\\")||(c.startsWith("+")?(n.lines.push({type:"add",text:c.slice(1),oldLine:null,newLine:o}),o++):c.startsWith("-")?(n.lines.push({type:"remove",text:c.slice(1),oldLine:l,newLine:null}),l++):(n.lines.push({type:"context",text:c.startsWith(" ")?c.slice(1):c,oldLine:l,newLine:o}),l++,o++)))}return i}function K(e){return e?[{header:"",lines:(e.endsWith(`
4
- `)?e.slice(0,-1):e).split(`
5
- `).map((i,n)=>({type:"add",text:i,oldLine:null,newLine:n+1}))}]:[]}const C=({additions:e,deletions:a})=>s.jsxs("span",{className:"inline-flex shrink-0 gap-2 font-mono text-2xs",children:[s.jsxs("span",{className:"text-watercolor-green-dark",children:["+",e]}),s.jsxs("span",{className:"text-watercolor-rose-dark",children:["-",a]})]});function O(e){const a=e.lastIndexOf("/");return a===-1?{dir:"",base:e}:{dir:e.slice(0,a+1),base:e.slice(a+1)}}const S=({path:e,prefix:a,className:i=""})=>{const{dir:n,base:l}=O(e),o=`${a??""}${n}`;return s.jsxs("span",{className:`flex min-w-0 items-center font-mono ${i}`,children:[o&&s.jsx("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap opacity-50",children:o}),s.jsx("span",{className:"shrink-0 whitespace-nowrap",children:l})]})},W={A:{letter:"A",label:"Added",variant:"success"},M:{letter:"M",label:"Modified",variant:"info"},D:{letter:"D",label:"Deleted",variant:"error"},R:{letter:"R",label:"Renamed",variant:"info"},C:{letter:"C",label:"Copied",variant:"info"},U:{letter:"U",label:"Conflicted",variant:"warning"}},B=e=>{if(e==="??")return{letter:"??",label:"Untracked",variant:"neutral"};const[a,i]=e,n=a!==" "&&a!=="?"?a:i;return W[n]??{letter:n??"?",label:n??"Unknown",variant:"neutral"}},k=({status:e})=>{const a=B(e);return s.jsx("span",{title:a.label,children:s.jsx(u,{size:"small",variant:a.variant,children:a.letter})})},q=60,J={add:"bg-watercolor-green/[18%] text-watercolor-green-dark",remove:"bg-watercolor-rose/[18%] text-watercolor-rose-dark",context:""},Q={add:"+",remove:"-",context:" "},V=({entry:e})=>s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-3",children:[s.jsx(k,{status:e.status}),s.jsx(S,{path:e.path,prefix:e.renameSource?`${e.renameSource} → `:void 0,className:"min-w-0 flex-1 text-xs"}),s.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[e.staged&&s.jsx(u,{size:"small",children:"staged"}),!e.binary&&s.jsx(C,{additions:e.additions,deletions:e.deletions})]})]}),X=({entry:e})=>{if(e.binary)return s.jsx("p",{className:"m-0 opacity-60",children:"Binary file not shown."});if(e.contentKind==="too-large")return s.jsx("p",{className:"m-0 opacity-60",children:"File too large to preview."});const a=e.contentKind==="raw"?K(e.patch):H(e.patch);return a.length===0?e.renameSource?s.jsx("p",{className:"m-0 opacity-60",children:e.additions===0&&e.deletions===0?"Renamed, no content changes.":"Renamed with unrelated content — diff omitted."}):s.jsx("p",{className:"m-0 opacity-60",children:"No changes to preview."}):s.jsx("div",{className:"flex min-w-0 max-w-full flex-col gap-3",children:a.map((i,n)=>s.jsxs("div",{className:"min-w-0 max-w-full",children:[i.header&&s.jsx("div",{className:"mb-1 font-mono text-2xs opacity-50",children:i.header}),s.jsx("pre",{className:"m-0 min-w-0 max-w-full overflow-x-auto font-mono text-2xs leading-normal",children:i.lines.map((l,o)=>s.jsxs("span",{className:`flex ${J[l.type]}`,children:[s.jsxs("span",{className:"inline-flex shrink-0 select-none gap-2 pr-2 opacity-40","aria-hidden":"true",children:[s.jsx("span",{className:"w-8 text-right",children:l.oldLine??""}),s.jsx("span",{className:"w-8 text-right",children:l.newLine??""})]}),s.jsxs("span",{children:[Q[l.type],l.text]})]},`${l.type}-${o}`))})]},`${i.header}-${n}`))})},Y=({entry:e})=>{const a=f(c=>c.manuallyExpandedDiffPaths.has(e.path)),i=f(c=>c.manuallyCollapsedDiffPaths.has(e.path)),n=f(c=>c.setDiffCollapsed),l=i||!a&&e.additions+e.deletions>q,o=e.renameSource?`${e.renameSource} → ${e.path}`:e.path;return s.jsxs("div",{"data-diff-path":e.path,className:"min-w-0 max-w-full scroll-mt-4",children:[s.jsx("h2",{className:"sr-only",children:o}),s.jsx(F,{title:s.jsx(V,{entry:e}),expanded:!l,onToggle:()=>n(e.path,!l),children:s.jsx(X,{entry:e})})]})},Z="__git__",ee=()=>!0,se=e=>D(e,{formKey:Z,matchesSuggestionTask:ee}),te=({state:e,filesEmpty:a})=>{const i=f(r=>r.status),{checks:n}=E(),{qualityStatus:l,testStatus:o,consistencyStatus:c}=h.useMemo(()=>L(i,n),[i,n]),d=[l==="fail"&&"Quality",o==="fail"&&"Tests",c==="fail"&&"Consistency"].filter(r=>r!==!1),t=s.jsx(b,{size:"small",disabled:a||!e.commitTitle.trim()||e.committing||e.commitInFlight,onClick:e.handleCommit,children:e.committing||e.commitInFlight?"Committing…":e.stagedCount>0?`Commit ${e.stagedCount} staged`:"Commit"});return d.length===0?t:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(P,{content:`${d.join(", ")} failing`,children:s.jsx(u,{size:"small",variant:"warning",children:"!"})}),t]})},ce=()=>{const e=f(t=>t.diffFiles),a=f(t=>t.diffLoadFailed),i=f(t=>t.loadDiffFiles),n=f(t=>t.setActiveDiffPath),l=h.useRef(null),o=h.useMemo(()=>(e==null?void 0:e.map(t=>({path:t.path,staged:t.staged})))??[],[e]),c=se(o);h.useEffect(()=>{i()},[i]),h.useEffect(()=>{let t;const r=$(x=>{x.message==="changed"&&(t&&clearTimeout(t),t=setTimeout(i,250))}),m=()=>i();return window.addEventListener("focus",m),()=>{t&&clearTimeout(t),window.removeEventListener("focus",m),r()}},[i]),h.useEffect(()=>{const t=l.current;if(!t)return;const r=Array.from(t.querySelectorAll("[data-diff-path]"));if(r.length===0)return;const m=new Set,x=new IntersectionObserver(g=>{for(const p of g)p.isIntersecting?m.add(p.target):m.delete(p.target);const N=r.find(p=>m.has(p));N&&n(N.dataset.diffPath??null)},{rootMargin:"0px 0px -70% 0px"});for(const g of r)x.observe(g);return()=>x.disconnect()},[e,n]);const d="min-h-page";return a?s.jsxs("div",{children:[s.jsx(j,{children:"Git"}),s.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[s.jsx(v,{}),s.jsx(w,{})]}),s.jsxs("div",{className:`${d} flex flex-col items-start gap-3`,children:[s.jsx("p",{className:"opacity-50 m-0",children:"Couldn't load the working-tree diff."}),s.jsx(b,{variant:"secondary",size:"small",onClick:i,children:"Retry"})]})]}):e?s.jsxs("div",{children:[s.jsx(j,{children:"Git"}),s.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[s.jsx(v,{}),s.jsx(w,{})]}),e.length===0?s.jsx("div",{className:d,children:s.jsx("p",{className:"opacity-50",children:"No changed files."})}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"sticky top-0 z-10 mb-6 flex items-start gap-2 bg-[var(--pui-bg-base)] py-3 shadow-paper-sm",children:[s.jsx("div",{className:"flex-1",children:s.jsx(T,{state:c,filesEmpty:!1})}),s.jsx(te,{state:c,filesEmpty:!1})]}),s.jsx("div",{ref:l,className:`flex min-w-0 flex-col gap-6 ${d}`,children:e.map((t,r)=>s.jsxs(h.Fragment,{children:[r>0&&s.jsx(I,{}),s.jsx(Y,{entry:t})]},t.path))})]})]}):s.jsxs("div",{children:[s.jsx(j,{children:"Git"}),s.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[s.jsx(v,{}),s.jsx(w,{})]}),s.jsx("div",{className:d,children:s.jsx(A,{label:"Loading the working-tree diff…"})})]})},ae="text-2xs font-semibold tracking-[0.08em] uppercase text-ink-300 mb-2",ie=(e,a)=>{a(e),requestAnimationFrame(()=>{var i;(i=document.querySelector(`[data-diff-path="${CSS.escape(e)}"]`))==null||i.scrollIntoView({behavior:"smooth",block:"start"})})},ne=e=>{const[a,i]=e;return a!==" "&&a!=="?"&&i!==" "&&i!=="?"},oe=()=>{const e=f(t=>t.diffFiles),a=f(t=>t.activeDiffPath),i=f(t=>t.loadDiffFiles),n=f(t=>t.expandDiffPath),[l,o]=h.useState(new Set),{toast:c}=R();if(!e||e.length===0)return null;const d=async(t,r)=>{o(m=>new Set(m).add(t.path));try{await(r?M(t.path):y(t.path)),await i()}catch(m){c({title:r?"Stage failed":"Unstage failed",description:z(m.message),variant:"error"})}finally{o(m=>{const x=new Set(m);return x.delete(t.path),x})}};return s.jsx("nav",{"aria-label":"Changed files",className:"flex flex-col gap-8 -mt-5",children:s.jsxs("div",{children:[s.jsx("div",{className:ae,children:"Changed files"}),s.jsx("ul",{className:"m-0 flex list-none flex-col gap-1 p-0",children:e.map(t=>s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(_,{checked:t.staged,indeterminate:ne(t.status),disabled:l.has(t.path),onChange:r=>d(t,r.target.checked),"aria-label":t.staged?`Unstage ${t.path}`:`Stage ${t.path}`}),s.jsx(k,{status:t.status}),s.jsx(G,{size:"small",active:t.path===a,onClick:()=>ie(t.path,n),className:"flex-1",action:s.jsxs("span",{className:"flex items-center gap-2",children:[t.staged&&s.jsx(u,{size:"small",children:"staged"}),!t.binary&&s.jsx(C,{additions:t.additions,deletions:t.deletions})]}),children:s.jsx(S,{path:t.path,className:"text-2xs"})})]},t.path))})]})})};export{oe as GitFileList,ce as GitPage};
6
- //# sourceMappingURL=index-s6CVH54G.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-s6CVH54G.js","sources":["../../../src/app/utils/parse-diff.ts","../../../src/app/features/git/count-badge.tsx","../../../src/app/utils/path-display.ts","../../../src/app/features/git/file-path.tsx","../../../src/app/features/git/git-status-marker.tsx","../../../src/app/features/git/file-diff-section.tsx","../../../src/app/features/git/git-commit-controls.tsx","../../../src/app/features/git/git-page.tsx","../../../src/app/features/git/git-file-list.tsx"],"sourcesContent":["export type DiffLineType = 'add' | 'remove' | 'context';\n\nexport interface DiffLine {\n type: DiffLineType;\n text: string;\n oldLine: number | null;\n newLine: number | null;\n}\n\nexport interface DiffHunk {\n header: string;\n lines: DiffLine[];\n}\n\nconst HUNK_HEADER = /^@@ -(\\d+)(?:,\\d+)? \\+(\\d+)(?:,\\d+)? @@/;\n\n// Parses a unified diff (git.ts getWorkingDiff, contentKind: 'diff'). A real diff\n// with no hunks (pure rename, mode-only change) is just the preamble, so it yields [].\nexport function parsePatch(patch: string): DiffHunk[] {\n if (!patch) return [];\n const lines = (patch.endsWith('\\n') ? patch.slice(0, -1) : patch).split('\\n');\n\n const hunks: DiffHunk[] = [];\n let current: DiffHunk | null = null;\n let oldLine = 0;\n let newLine = 0;\n for (const line of lines) {\n const header = line.match(HUNK_HEADER);\n if (header) {\n current = { header: line, lines: [] };\n hunks.push(current);\n oldLine = Number(header[1]);\n newLine = Number(header[2]);\n continue;\n }\n if (!current) continue; // preamble: diff --git / index / --- / +++\n if (line.startsWith('\\\\')) continue; // \"\\"\n if (line.startsWith('+')) {\n current.lines.push({ type: 'add', text: line.slice(1), oldLine: null, newLine });\n newLine++;\n } else if (line.startsWith('-')) {\n current.lines.push({ type: 'remove', text: line.slice(1), oldLine, newLine: null });\n oldLine++;\n } else {\n current.lines.push({\n type: 'context',\n text: line.startsWith(' ') ? line.slice(1) : line,\n oldLine,\n newLine,\n });\n oldLine++;\n newLine++;\n }\n }\n return hunks;\n}\n\n// Untracked files store raw content, not a diff (git.ts getWorkingDiff, contentKind:\n// 'raw') — synthesize a single all-added hunk so the renderer only has one shape to draw.\nexport function rawContentHunks(content: string): DiffHunk[] {\n if (!content) return [];\n const lines = (content.endsWith('\\n') ? content.slice(0, -1) : content).split('\\n');\n return [\n {\n header: '',\n lines: lines.map((text, i) => ({ type: 'add', text, oldLine: null, newLine: i + 1 })),\n },\n ];\n}\n","interface CountBadgeProps {\n additions: number;\n deletions: number;\n}\n\nexport const CountBadge = ({ additions, deletions }: CountBadgeProps) => (\n <span className=\"inline-flex shrink-0 gap-2 font-mono text-2xs\">\n <span className=\"text-watercolor-green-dark\">+{additions}</span>\n <span className=\"text-watercolor-rose-dark\">-{deletions}</span>\n </span>\n);\n","export interface SplitPath {\n dir: string;\n base: string;\n}\n\nexport function splitPathForDisplay(path: string): SplitPath {\n const slash = path.lastIndexOf('/');\n return slash === -1\n ? { dir: '', base: path }\n : { dir: path.slice(0, slash + 1), base: path.slice(slash + 1) };\n}\n","import { splitPathForDisplay } from '@/app/utils/path-display';\n\ninterface FilePathProps {\n path: string;\n prefix?: string;\n className?: string;\n}\n\nexport const FilePath = ({ path, prefix, className = '' }: FilePathProps) => {\n const { dir, base } = splitPathForDisplay(path);\n const dimmed = `${prefix ?? ''}${dir}`;\n return (\n <span className={`flex min-w-0 items-center font-mono ${className}`}>\n {dimmed && (\n <span className=\"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap opacity-50\">\n {dimmed}\n </span>\n )}\n <span className=\"shrink-0 whitespace-nowrap\">{base}</span>\n </span>\n );\n};\n","import { Stamp, type StampVariant } from '@dendelion/paper-ui';\n\ninterface StatusInfo {\n letter: string;\n label: string;\n variant: StampVariant;\n}\n\nconst STATUS_INFO: Record<string, StatusInfo> = {\n A: { letter: 'A', label: 'Added', variant: 'success' },\n M: { letter: 'M', label: 'Modified', variant: 'info' },\n D: { letter: 'D', label: 'Deleted', variant: 'error' },\n R: { letter: 'R', label: 'Renamed', variant: 'info' },\n C: { letter: 'C', label: 'Copied', variant: 'info' },\n U: { letter: 'U', label: 'Conflicted', variant: 'warning' },\n};\n\n// Git's porcelain code is two characters: index status then worktree status.\n// The index one wins when both are set — it's the state that would actually commit.\nexport const gitStatusInfo = (status: string): StatusInfo => {\n if (status === '??') return { letter: '??', label: 'Untracked', variant: 'neutral' };\n const [x, y] = status;\n const code = x !== ' ' && x !== '?' ? x : y;\n return STATUS_INFO[code] ?? { letter: code ?? '?', label: code ?? 'Unknown', variant: 'neutral' };\n};\n\ninterface GitStatusMarkerProps {\n status: string;\n}\n\nexport const GitStatusMarker = ({ status }: GitStatusMarkerProps) => {\n const info = gitStatusInfo(status);\n return (\n <span title={info.label}>\n <Stamp size=\"small\" variant={info.variant}>\n {info.letter}\n </Stamp>\n </span>\n );\n};\n","import { useAppStore } from '@/app/stores/app-store';\nimport { type DiffLineType, parsePatch, rawContentHunks } from '@/app/utils/parse-diff';\nimport type { FileDiffEntry } from '@/types/index';\nimport { Accordion, Stamp } from '@dendelion/paper-ui';\nimport { CountBadge } from './count-badge';\nimport { FilePath } from './file-path';\nimport { GitStatusMarker } from './git-status-marker';\n\nconst COLLAPSE_LINE_THRESHOLD = 60;\n\nconst LINE_CLASS: Record<DiffLineType, string> = {\n add: 'bg-watercolor-green/[18%] text-watercolor-green-dark',\n remove: 'bg-watercolor-rose/[18%] text-watercolor-rose-dark',\n context: '',\n};\n\nconst LINE_PREFIX: Record<DiffLineType, string> = { add: '+', remove: '-', context: ' ' };\n\ninterface FileHeaderProps {\n entry: FileDiffEntry;\n}\n\nconst FileHeader = ({ entry }: FileHeaderProps) => (\n <div className=\"flex w-full min-w-0 items-center gap-3\">\n <GitStatusMarker status={entry.status} />\n <FilePath\n path={entry.path}\n prefix={entry.renameSource ? `${entry.renameSource} → ` : undefined}\n className=\"min-w-0 flex-1 text-xs\"\n />\n <span className=\"flex shrink-0 items-center gap-2\">\n {entry.staged && <Stamp size=\"small\">staged</Stamp>}\n {!entry.binary && <CountBadge additions={entry.additions} deletions={entry.deletions} />}\n </span>\n </div>\n);\n\ninterface DiffBodyProps {\n entry: FileDiffEntry;\n}\n\nconst DiffBody = ({ entry }: DiffBodyProps) => {\n if (entry.binary) {\n return <p className=\"m-0 opacity-60\">Binary file not shown.</p>;\n }\n if (entry.contentKind === 'too-large') {\n return <p className=\"m-0 opacity-60\">File too large to preview.</p>;\n }\n const hunks =\n entry.contentKind === 'raw' ? rawContentHunks(entry.patch) : parsePatch(entry.patch);\n if (hunks.length === 0) {\n if (entry.renameSource) {\n return (\n <p className=\"m-0 opacity-60\">\n {entry.additions === 0 && entry.deletions === 0\n ? 'Renamed, no content changes.'\n : 'Renamed with unrelated content — diff omitted.'}\n </p>\n );\n }\n return <p className=\"m-0 opacity-60\">No changes to preview.</p>;\n }\n return (\n <div className=\"flex min-w-0 max-w-full flex-col gap-3\">\n {hunks.map((hunk, i) => (\n <div key={`${hunk.header}-${i}`} className=\"min-w-0 max-w-full\">\n {hunk.header && <div className=\"mb-1 font-mono text-2xs opacity-50\">{hunk.header}</div>}\n {/* paper-ui's CodeBlock has no per-line add/remove styling. */}\n <pre className=\"m-0 min-w-0 max-w-full overflow-x-auto font-mono text-2xs leading-normal\">\n {hunk.lines.map((line, j) => (\n <span key={`${line.type}-${j}`} className={`flex ${LINE_CLASS[line.type]}`}>\n <span\n className=\"inline-flex shrink-0 select-none gap-2 pr-2 opacity-40\"\n aria-hidden=\"true\"\n >\n <span className=\"w-8 text-right\">{line.oldLine ?? ''}</span>\n <span className=\"w-8 text-right\">{line.newLine ?? ''}</span>\n </span>\n <span>\n {LINE_PREFIX[line.type]}\n {line.text}\n </span>\n </span>\n ))}\n </pre>\n </div>\n ))}\n </div>\n );\n};\n\ninterface FileDiffSectionProps {\n entry: FileDiffEntry;\n}\n\nexport const FileDiffSection = ({ entry }: FileDiffSectionProps) => {\n const manuallyExpanded = useAppStore((s) => s.manuallyExpandedDiffPaths.has(entry.path));\n const manuallyCollapsed = useAppStore((s) => s.manuallyCollapsedDiffPaths.has(entry.path));\n const setDiffCollapsed = useAppStore((s) => s.setDiffCollapsed);\n const collapsed =\n manuallyCollapsed ||\n (!manuallyExpanded && entry.additions + entry.deletions > COLLAPSE_LINE_THRESHOLD);\n\n const headingText = entry.renameSource ? `${entry.renameSource} → ${entry.path}` : entry.path;\n\n return (\n <div data-diff-path={entry.path} className=\"min-w-0 max-w-full scroll-mt-4\">\n <h2 className=\"sr-only\">{headingText}</h2>\n <Accordion\n title={<FileHeader entry={entry} />}\n expanded={!collapsed}\n onToggle={() => setDiffCollapsed(entry.path, !collapsed)}\n >\n <DiffBody entry={entry} />\n </Accordion>\n </div>\n );\n};\n","import { type CommitFormFile, useCommitForm } from '@/app/hooks/use-commit-form';\nimport { useDeskChecks } from '@/app/hooks/use-desk-checks';\nimport { useAppStore } from '@/app/stores/app-store';\nimport { deriveCheckStatuses } from '@/app/utils/check-status';\nimport { Button, Stamp, Tooltip } from '@dendelion/paper-ui';\nimport { useMemo } from 'react';\n\n// Stable across renders, and the same value used before this idea's staging/body\n// work — keeps drafts saved under the git page's key from being orphaned.\nconst GIT_PAGE_FORM_KEY = '__git__';\n\nconst matchAnySuggestionTask = () => true;\n\n// No plan on the git page, so this is bare commit mechanics — no phase recording, no Fix.\nexport const useGitCommitForm = (files: CommitFormFile[]) =>\n useCommitForm(files, {\n formKey: GIT_PAGE_FORM_KEY,\n matchesSuggestionTask: matchAnySuggestionTask,\n });\n\nexport type GitCommitFormState = ReturnType<typeof useGitCommitForm>;\n\n// Never Fix (plan-scoped, and the git page never has one) — a failing check is a warning instead.\nexport const GitCommitButton = ({\n state,\n filesEmpty,\n}: {\n state: GitCommitFormState;\n filesEmpty: boolean;\n}) => {\n const status = useAppStore((s) => s.status);\n const { checks: deskChecks } = useDeskChecks();\n const { qualityStatus, testStatus, consistencyStatus } = useMemo(\n () => deriveCheckStatuses(status, deskChecks),\n [status, deskChecks],\n );\n const failingChecks = [\n qualityStatus === 'fail' && 'Quality',\n testStatus === 'fail' && 'Tests',\n consistencyStatus === 'fail' && 'Consistency',\n ].filter((label): label is Exclude<typeof label, false> => label !== false);\n\n const commitButton = (\n <Button\n size=\"small\"\n disabled={filesEmpty || !state.commitTitle.trim() || state.committing || state.commitInFlight}\n onClick={state.handleCommit}\n >\n {state.committing || state.commitInFlight\n ? 'Committing…'\n : state.stagedCount > 0\n ? `Commit ${state.stagedCount} staged`\n : 'Commit'}\n </Button>\n );\n\n if (failingChecks.length === 0) return commitButton;\n\n return (\n <div className=\"flex items-center gap-2\">\n <Tooltip content={`${failingChecks.join(', ')} failing`}>\n <Stamp size=\"small\" variant=\"warning\">\n !\n </Stamp>\n </Tooltip>\n {commitButton}\n </div>\n );\n};\n","import { CommitMessageFields, GitStashSurface, GitSyncActions } from '@/app/components';\nimport { PageTitle } from '@/app/components/page-title';\nimport { FileDiffSection } from '@/app/features/git/file-diff-section';\nimport { GitCommitButton, useGitCommitForm } from '@/app/features/git/git-commit-controls';\nimport { subscribeToActivityStream } from '@/app/services/activity-stream';\nimport { useAppStore } from '@/app/stores/app-store';\nimport { Button, Divider, Spinner } from '@dendelion/paper-ui';\nimport { Fragment, useEffect, useMemo, useRef } from 'react';\n\nexport const GitPage = () => {\n const files = useAppStore((s) => s.diffFiles);\n const loadFailed = useAppStore((s) => s.diffLoadFailed);\n const loadDiffFiles = useAppStore((s) => s.loadDiffFiles);\n const setActiveDiffPath = useAppStore((s) => s.setActiveDiffPath);\n const sectionsRef = useRef<HTMLDivElement>(null);\n const commitFiles = useMemo(\n () => files?.map((entry) => ({ path: entry.path, staged: entry.staged })) ?? [],\n [files],\n );\n const commitForm = useGitCommitForm(commitFiles);\n\n useEffect(() => {\n loadDiffFiles();\n }, [loadDiffFiles]);\n\n useEffect(() => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n const unsubscribe = subscribeToActivityStream((payload) => {\n if (payload.message !== 'changed') return;\n if (timer) clearTimeout(timer);\n timer = setTimeout(loadDiffFiles, 250);\n });\n const onFocus = () => loadDiffFiles();\n window.addEventListener('focus', onFocus);\n return () => {\n if (timer) clearTimeout(timer);\n window.removeEventListener('focus', onFocus);\n unsubscribe();\n };\n }, [loadDiffFiles]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: files is the trigger to rebuild the observer, not a value read in the body.\n useEffect(() => {\n const root = sectionsRef.current;\n if (!root) return;\n const sections = Array.from(root.querySelectorAll<HTMLElement>('[data-diff-path]'));\n if (sections.length === 0) return;\n const visible = new Set<HTMLElement>();\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) visible.add(entry.target as HTMLElement);\n else visible.delete(entry.target as HTMLElement);\n }\n const topmost = sections.find((el) => visible.has(el));\n if (topmost) setActiveDiffPath(topmost.dataset.diffPath ?? null);\n },\n { rootMargin: '0px 0px -70% 0px' },\n );\n for (const el of sections) observer.observe(el);\n return () => observer.disconnect();\n }, [files, setActiveDiffPath]);\n\n const contentClass = 'min-h-page';\n\n if (loadFailed) {\n return (\n <div>\n <PageTitle>Git</PageTitle>\n <div className=\"mb-4 flex items-center gap-2\">\n <GitSyncActions />\n <GitStashSurface />\n </div>\n <div className={`${contentClass} flex flex-col items-start gap-3`}>\n <p className=\"opacity-50 m-0\">Couldn't load the working-tree diff.</p>\n <Button variant=\"secondary\" size=\"small\" onClick={loadDiffFiles}>\n Retry\n </Button>\n </div>\n </div>\n );\n }\n\n if (!files) {\n return (\n <div>\n <PageTitle>Git</PageTitle>\n <div className=\"mb-4 flex items-center gap-2\">\n <GitSyncActions />\n <GitStashSurface />\n </div>\n <div className={contentClass}>\n <Spinner label=\"Loading the working-tree diff…\" />\n </div>\n </div>\n );\n }\n\n return (\n <div>\n <PageTitle>Git</PageTitle>\n <div className=\"mb-4 flex items-center gap-2\">\n <GitSyncActions />\n <GitStashSurface />\n </div>\n {files.length === 0 ? (\n <div className={contentClass}>\n <p className=\"opacity-50\">No changed files.</p>\n </div>\n ) : (\n <>\n <div className=\"sticky top-0 z-10 mb-6 flex items-start gap-2 bg-[var(--pui-bg-base)] py-3 shadow-paper-sm\">\n <div className=\"flex-1\">\n <CommitMessageFields state={commitForm} filesEmpty={false} />\n </div>\n <GitCommitButton state={commitForm} filesEmpty={false} />\n </div>\n <div ref={sectionsRef} className={`flex min-w-0 flex-col gap-6 ${contentClass}`}>\n {files.map((entry, idx) => (\n <Fragment key={entry.path}>\n {idx > 0 && <Divider />}\n <FileDiffSection entry={entry} />\n </Fragment>\n ))}\n </div>\n </>\n )}\n </div>\n );\n};\n","import { CountBadge } from '@/app/features/git/count-badge';\nimport { FilePath } from '@/app/features/git/file-path';\nimport { GitStatusMarker } from '@/app/features/git/git-status-marker';\nimport { stagePath, unstagePath } from '@/app/services/git-api';\nimport { useAppStore } from '@/app/stores/app-store';\nimport { oneLineErrorSummary } from '@/app/utils/error-summary';\nimport type { FileDiffEntry } from '@/types/index';\nimport { Checkbox, ListItem, Stamp, useToast } from '@dendelion/paper-ui';\nimport { useState } from 'react';\n\nconst sectionLabelClass = 'text-2xs font-semibold tracking-[0.08em] uppercase text-ink-300 mb-2';\n\nconst scrollToFile = (path: string, expandDiffPath: (path: string) => void) => {\n expandDiffPath(path);\n requestAnimationFrame(() => {\n document\n .querySelector(`[data-diff-path=\"${CSS.escape(path)}\"]`)\n ?.scrollIntoView({ behavior: 'smooth', block: 'start' });\n });\n};\n\n// Both status characters set (and neither '?', which pairs up for untracked) means\n// part of the file is staged and part isn't — git can't be checked or unchecked.\nconst isPartiallyStaged = (status: string) => {\n const [x, y] = status;\n return x !== ' ' && x !== '?' && y !== ' ' && y !== '?';\n};\n\nexport const GitFileList = () => {\n const files = useAppStore((s) => s.diffFiles);\n const activePath = useAppStore((s) => s.activeDiffPath);\n const loadDiffFiles = useAppStore((s) => s.loadDiffFiles);\n const expandDiffPath = useAppStore((s) => s.expandDiffPath);\n const [pending, setPending] = useState<Set<string>>(new Set());\n const { toast } = useToast();\n\n if (!files || files.length === 0) return null;\n\n const toggleStaged = async (entry: FileDiffEntry, next: boolean) => {\n setPending((prev) => new Set(prev).add(entry.path));\n try {\n await (next ? stagePath(entry.path) : unstagePath(entry.path));\n await loadDiffFiles();\n } catch (err) {\n toast({\n title: next ? 'Stage failed' : 'Unstage failed',\n description: oneLineErrorSummary((err as Error).message),\n variant: 'error',\n });\n } finally {\n setPending((prev) => {\n const updated = new Set(prev);\n updated.delete(entry.path);\n return updated;\n });\n }\n };\n\n return (\n <nav aria-label=\"Changed files\" className=\"flex flex-col gap-8 -mt-5\">\n <div>\n <div className={sectionLabelClass}>Changed files</div>\n <ul className=\"m-0 flex list-none flex-col gap-1 p-0\">\n {files.map((entry) => (\n <li key={entry.path} className=\"flex items-center gap-2\">\n <Checkbox\n checked={entry.staged}\n indeterminate={isPartiallyStaged(entry.status)}\n disabled={pending.has(entry.path)}\n onChange={(e) => toggleStaged(entry, e.target.checked)}\n aria-label={entry.staged ? `Unstage ${entry.path}` : `Stage ${entry.path}`}\n />\n <GitStatusMarker status={entry.status} />\n <ListItem\n size=\"small\"\n active={entry.path === activePath}\n onClick={() => scrollToFile(entry.path, expandDiffPath)}\n className=\"flex-1\"\n action={\n <span className=\"flex items-center gap-2\">\n {entry.staged && <Stamp size=\"small\">staged</Stamp>}\n {!entry.binary && (\n <CountBadge additions={entry.additions} deletions={entry.deletions} />\n )}\n </span>\n }\n >\n <FilePath path={entry.path} className=\"text-2xs\" />\n </ListItem>\n </li>\n ))}\n </ul>\n </div>\n </nav>\n );\n};\n"],"names":["HUNK_HEADER","parsePatch","patch","lines","hunks","current","oldLine","newLine","line","header","rawContentHunks","content","text","i","CountBadge","additions","deletions","jsxs","splitPathForDisplay","path","slash","FilePath","prefix","className","dir","base","dimmed","jsx","STATUS_INFO","gitStatusInfo","status","x","y","code","GitStatusMarker","info","Stamp","COLLAPSE_LINE_THRESHOLD","LINE_CLASS","LINE_PREFIX","FileHeader","entry","DiffBody","hunk","j","FileDiffSection","manuallyExpanded","useAppStore","s","manuallyCollapsed","setDiffCollapsed","collapsed","headingText","Accordion","GIT_PAGE_FORM_KEY","matchAnySuggestionTask","useGitCommitForm","files","useCommitForm","GitCommitButton","state","filesEmpty","deskChecks","useDeskChecks","qualityStatus","testStatus","consistencyStatus","useMemo","deriveCheckStatuses","failingChecks","label","commitButton","Button","Tooltip","GitPage","loadFailed","loadDiffFiles","setActiveDiffPath","sectionsRef","useRef","commitFiles","commitForm","useEffect","timer","unsubscribe","subscribeToActivityStream","payload","onFocus","root","sections","visible","observer","entries","topmost","el","contentClass","PageTitle","GitSyncActions","GitStashSurface","Fragment","CommitMessageFields","idx","Divider","Spinner","sectionLabelClass","scrollToFile","expandDiffPath","_a","isPartiallyStaged","GitFileList","activePath","pending","setPending","useState","toast","useToast","toggleStaged","next","prev","stagePath","unstagePath","err","oneLineErrorSummary","updated","Checkbox","e","ListItem"],"mappings":"6MAcA,MAAMA,EAAc,0CAIb,SAASC,EAAWC,EAA2B,CACpD,GAAI,CAACA,EAAO,MAAO,CAAA,EACnB,MAAMC,GAASD,EAAM,SAAS;AAAA,CAAI,EAAIA,EAAM,MAAM,EAAG,EAAE,EAAIA,GAAO,MAAM;AAAA,CAAI,EAEtEE,EAAoB,CAAA,EAC1B,IAAIC,EAA2B,KAC3BC,EAAU,EACVC,EAAU,EACd,UAAWC,KAAQL,EAAO,CACxB,MAAMM,EAASD,EAAK,MAAMR,CAAW,EACrC,GAAIS,EAAQ,CACVJ,EAAU,CAAE,OAAQG,EAAM,MAAO,CAAA,CAAC,EAClCJ,EAAM,KAAKC,CAAO,EAClBC,EAAU,OAAOG,EAAO,CAAC,CAAC,EAC1BF,EAAU,OAAOE,EAAO,CAAC,CAAC,EAC1B,QACF,CACKJ,IACDG,EAAK,WAAW,IAAI,IACpBA,EAAK,WAAW,GAAG,GACrBH,EAAQ,MAAM,KAAK,CAAE,KAAM,MAAO,KAAMG,EAAK,MAAM,CAAC,EAAG,QAAS,KAAM,QAAAD,EAAS,EAC/EA,KACSC,EAAK,WAAW,GAAG,GAC5BH,EAAQ,MAAM,KAAK,CAAE,KAAM,SAAU,KAAMG,EAAK,MAAM,CAAC,EAAG,QAAAF,EAAS,QAAS,KAAM,EAClFA,MAEAD,EAAQ,MAAM,KAAK,CACjB,KAAM,UACN,KAAMG,EAAK,WAAW,GAAG,EAAIA,EAAK,MAAM,CAAC,EAAIA,EAC7C,QAAAF,EACA,QAAAC,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