@dendelion/paper-camp 0.13.2 → 0.14.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 (82) hide show
  1. package/dist/app/assets/index-BTh66TxZ.js +2 -0
  2. package/dist/app/assets/index-BTh66TxZ.js.map +1 -0
  3. package/dist/app/assets/{index-ChVvOU5G.js → index-C5as2mi1.js} +2 -2
  4. package/dist/app/assets/{index-ChVvOU5G.js.map → index-C5as2mi1.js.map} +1 -1
  5. package/dist/app/assets/{index-D7DjxVq7.js → index-CXl1uFWF.js} +2 -2
  6. package/dist/app/assets/{index-D7DjxVq7.js.map → index-CXl1uFWF.js.map} +1 -1
  7. package/dist/app/assets/{index-CPoqe3xq.js → index-D2zDC3YW.js} +2 -2
  8. package/dist/app/assets/{index-CPoqe3xq.js.map → index-D2zDC3YW.js.map} +1 -1
  9. package/dist/app/assets/{index-CvQKE4RC.js → index-DrOhvDGC.js} +2 -2
  10. package/dist/app/assets/{index-CvQKE4RC.js.map → index-DrOhvDGC.js.map} +1 -1
  11. package/dist/app/assets/{index-jTvzs7JN.js → index-SjRbcqaJ.js} +2 -2
  12. package/dist/app/assets/{index-jTvzs7JN.js.map → index-SjRbcqaJ.js.map} +1 -1
  13. package/dist/app/assets/main-BC7PxPmE.js +207 -0
  14. package/dist/app/assets/main-BC7PxPmE.js.map +1 -0
  15. package/dist/app/assets/{main-CZ1b3UwB.css → main-uLU_O3GC.css} +1 -1
  16. package/dist/app/assets/{sidebar-section-X7KA8eUz.js → sidebar-section-BlseNbG8.js} +2 -2
  17. package/dist/app/assets/{sidebar-section-X7KA8eUz.js.map → sidebar-section-BlseNbG8.js.map} +1 -1
  18. package/dist/app/index.html +2 -2
  19. package/dist/chunks/dev-port.CEt1H9LA.js +35 -0
  20. package/dist/chunks/dev-port.CEt1H9LA.js.map +1 -0
  21. package/dist/chunks/helpers.CUQjsQwc.js +9 -0
  22. package/dist/chunks/helpers.CUQjsQwc.js.map +1 -0
  23. package/dist/chunks/{scaffold.DTcLEZRV.js → scaffold.BL48Net9.js} +198 -180
  24. package/dist/chunks/{scaffold.DTcLEZRV.js.map → scaffold.BL48Net9.js.map} +1 -1
  25. package/dist/cli/index.js +6299 -6106
  26. package/dist/cli/index.js.map +1 -1
  27. package/dist/core/index.js +33 -32
  28. package/dist/core/parse/schemas.d.ts +8 -0
  29. package/dist/core/parse/schemas.d.ts.map +1 -1
  30. package/dist/core/thread.d.ts +8 -0
  31. package/dist/core/thread.d.ts.map +1 -1
  32. package/dist/core/thread.test.d.ts +2 -0
  33. package/dist/core/thread.test.d.ts.map +1 -0
  34. package/dist/toolbar/focus-panel.d.ts +7 -0
  35. package/dist/toolbar/focus-panel.d.ts.map +1 -0
  36. package/dist/toolbar/index.d.ts +2 -0
  37. package/dist/toolbar/index.d.ts.map +1 -0
  38. package/dist/toolbar/runs-panel.d.ts +12 -0
  39. package/dist/toolbar/runs-panel.d.ts.map +1 -0
  40. package/dist/toolbar/scout-panel.d.ts +10 -0
  41. package/dist/toolbar/scout-panel.d.ts.map +1 -0
  42. package/dist/toolbar/ship-panel.d.ts +6 -0
  43. package/dist/toolbar/ship-panel.d.ts.map +1 -0
  44. package/dist/toolbar/toolbar-element.d.ts +7 -0
  45. package/dist/toolbar/toolbar-element.d.ts.map +1 -0
  46. package/dist/toolbar/toolbar-idle.d.ts +4 -0
  47. package/dist/toolbar/toolbar-idle.d.ts.map +1 -0
  48. package/dist/toolbar/toolbar-idle.test.d.ts +2 -0
  49. package/dist/toolbar/toolbar-idle.test.d.ts.map +1 -0
  50. package/dist/toolbar/toolbar-link.d.ts +7 -0
  51. package/dist/toolbar/toolbar-link.d.ts.map +1 -0
  52. package/dist/toolbar/toolbar-shell.d.ts +15 -0
  53. package/dist/toolbar/toolbar-shell.d.ts.map +1 -0
  54. package/dist/toolbar/toolbar-shell.test.d.ts +2 -0
  55. package/dist/toolbar/toolbar-shell.test.d.ts.map +1 -0
  56. package/dist/toolbar/toolbar.d.ts +2 -0
  57. package/dist/toolbar/toolbar.d.ts.map +1 -0
  58. package/dist/toolbar/use-toolbar-shell.d.ts +8 -0
  59. package/dist/toolbar/use-toolbar-shell.d.ts.map +1 -0
  60. package/dist/toolbar.d.ts +1 -0
  61. package/dist/toolbar.js +27019 -0
  62. package/dist/toolbar.js.map +1 -0
  63. package/dist/types/index.d.ts +32 -2
  64. package/dist/types/index.d.ts.map +1 -1
  65. package/dist/types/index.js +12 -10
  66. package/dist/types/index.js.map +1 -1
  67. package/dist/vite/index.d.ts +8 -0
  68. package/dist/vite/index.d.ts.map +1 -0
  69. package/dist/vite/index.js +48 -0
  70. package/dist/vite/index.js.map +1 -0
  71. package/dist/vite/index.test.d.ts +2 -0
  72. package/dist/vite/index.test.d.ts.map +1 -0
  73. package/dist/vite/proxy.d.ts +7 -0
  74. package/dist/vite/proxy.d.ts.map +1 -0
  75. package/dist/vite/proxy.test.d.ts +2 -0
  76. package/dist/vite/proxy.test.d.ts.map +1 -0
  77. package/dist/vite.d.ts +6 -0
  78. package/package.json +12 -2
  79. package/dist/app/assets/index-CSirjtoU.js +0 -2
  80. package/dist/app/assets/index-CSirjtoU.js.map +0 -1
  81. package/dist/app/assets/main-CezpONOg.js +0 -207
  82. package/dist/app/assets/main-CezpONOg.js.map +0 -1
@@ -33,8 +33,9 @@ export interface MarginNote {
33
33
  }
34
34
  /** What a thread message originally was, before log/review/notes/clarifications folded
35
35
  * into one ordered thread on the entity — 'note'/'decision'/'question' carry `state`,
36
- * the rest are plain historical records. */
37
- export type ThreadMessageKind = 'log' | 'clarification' | 'review' | 'note' | 'decision' | 'question';
36
+ * the rest are plain historical records. 'chat' is thread-native (no legacy section):
37
+ * Paper Scout conversation, collapsed by default in thread views. */
38
+ export type ThreadMessageKind = 'log' | 'clarification' | 'review' | 'note' | 'decision' | 'question' | 'chat';
38
39
  export interface ThreadMessage {
39
40
  kind: ThreadMessageKind;
40
41
  /** Absent for messages ported from the old Notes section, which never carried a date. */
@@ -45,6 +46,17 @@ export interface ThreadMessage {
45
46
  /** Absent means 'user' — no thread message predates this field being agent-authored. */
46
47
  from?: 'user' | 'agent';
47
48
  }
49
+ /** Ambient context a chat mount (desk, toolbar) feeds alongside a message — each
50
+ * mount populates whatever it has (IDEA-130); Scout folds it into the prompt
51
+ * silently, it never becomes a user-visible field. */
52
+ export interface MountContext {
53
+ route?: string;
54
+ focusedIdeaId?: string;
55
+ viewport?: {
56
+ width: number;
57
+ height: number;
58
+ };
59
+ }
48
60
  export interface RawEntry {
49
61
  title: string;
50
62
  fields: Record<string, string>;
@@ -303,6 +315,8 @@ export interface AgentConfig {
303
315
  export interface AgentRunOptions {
304
316
  model?: string;
305
317
  effort?: string;
318
+ /** Prior claude-code session id to continue instead of starting cold; ignored by opencode. */
319
+ resume?: string;
306
320
  }
307
321
  /** Maps option names to a fixed value list (renders a Select) or null (free-text or hidden). */
308
322
  export type AgentOptionsDescriptor = Record<string, string[] | null | undefined>;
@@ -313,8 +327,22 @@ export interface DefaultAgentsMap {
313
327
  planDraft: AgentConfig;
314
328
  ideaExtend: AgentConfig;
315
329
  commitSuggest: AgentConfig;
330
+ feedback: AgentConfig;
316
331
  }
317
332
  export declare const DEFAULT_AGENTS: DefaultAgentsMap;
333
+ /** Toolbar segments, left to right (IDEA-128); trimmed per project via `IntegrationConfig.toolbar.segments`. */
334
+ export declare const TOOLBAR_SEGMENT_IDS: readonly ["focus", "scout", "runs", "ship", "desk"];
335
+ export type ToolbarSegmentId = (typeof TOOLBAR_SEGMENT_IDS)[number];
336
+ export interface IntegrationToolbarConfig {
337
+ enabled?: boolean;
338
+ segments?: ToolbarSegmentId[];
339
+ /** Opt-in escape hatch: without it, the vite plugin stays off when `mode` is `production`. */
340
+ allowProduction?: boolean;
341
+ }
342
+ export interface IntegrationConfig {
343
+ toolbar?: IntegrationToolbarConfig;
344
+ route?: string;
345
+ }
318
346
  export interface PaperCampConfig {
319
347
  version: string;
320
348
  projectName: string;
@@ -330,6 +358,8 @@ export interface PaperCampConfig {
330
358
  subjects?: string[];
331
359
  /** Opts out of the first-run redirect to Settings > Setup while capabilities are incomplete. */
332
360
  setupDismissed?: boolean;
361
+ /** In-app dev toolbar (IDEA-128) — the `@dendelion/paper-camp/vite` plugin's mount, toggleable for frontend targets. */
362
+ integration?: IntegrationConfig;
333
363
  }
334
364
  export type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';
335
365
  export interface CheckResult {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE5F,eAAO,MAAM,aAAa,EAAE,UAAU,EAOrC,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtE,eAAO,MAAM,UAAU,EAAE,QAAQ,EAAiD,CAAC;AAEnF,eAAO,MAAM,SAAS,sCAAuC,CAAC;AAE9D,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAGhD,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED;mFACmF;AACnF,MAAM,MAAM,gBAAgB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;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ClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAEhB,eAAe,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oGAAoG;AACpG,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,EAAE,CAAA;KAAE,CAAC;CAC/C"}
@@ -5,10 +5,10 @@ const c = [
5
5
  "review",
6
6
  "done",
7
7
  "dropped"
8
- ], a = ["feat", "fix", "chore", "docs", "refactor"], d = ["claude-code", "opencode"], r = {
8
+ ], a = ["feat", "fix", "chore", "docs", "refactor"], d = ["claude-code", "opencode"], s = {
9
9
  "claude-code": "Claude Code",
10
10
  opencode: "OpenCode"
11
- }, l = {
11
+ }, f = {
12
12
  "claude-code": {
13
13
  model: ["opus", "sonnet", "fable", "haiku"],
14
14
  effort: ["low", "medium", "high", "xhigh", "max"]
@@ -17,7 +17,7 @@ const c = [
17
17
  model: null
18
18
  }
19
19
  };
20
- function f(o) {
20
+ function r(o) {
21
21
  const n = (t) => d.includes(t) ? t : "claude-code";
22
22
  if (typeof o == "string") return { agent: n(o) };
23
23
  const e = o ?? {};
@@ -27,19 +27,21 @@ function f(o) {
27
27
  ...typeof e.effort == "string" && { effort: e.effort }
28
28
  };
29
29
  }
30
- const s = {
30
+ const l = {
31
31
  phase: { agent: "opencode" },
32
32
  planDraft: { agent: "claude-code" },
33
33
  ideaExtend: { agent: "claude-code" },
34
- commitSuggest: { agent: "claude-code" }
35
- };
34
+ commitSuggest: { agent: "claude-code" },
35
+ feedback: { agent: "claude-code", model: "sonnet", effort: "medium" }
36
+ }, u = ["focus", "scout", "runs", "ship", "desk"];
36
37
  export {
37
38
  d as AGENT_IDS,
38
- r as AGENT_LABELS,
39
- l as AGENT_OPTIONS,
40
- s as DEFAULT_AGENTS,
39
+ s as AGENT_LABELS,
40
+ f as AGENT_OPTIONS,
41
+ l as DEFAULT_AGENTS,
41
42
  a as PLAN_KINDS,
42
43
  c as PLAN_STATUSES,
43
- f as coerceAgentConfig
44
+ u as TOOLBAR_SEGMENT_IDS,
45
+ r as coerceAgentConfig
44
46
  };
45
47
  //# sourceMappingURL=index.js.map
@@ -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 PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review';\n}\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. */\nexport type ThreadMessageKind =\n | 'log'\n | 'clarification'\n | 'review'\n | 'note'\n | 'decision'\n | 'question';\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\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 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}\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 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\nexport type ConsistencyIssueKind = 'orphan-subject';\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 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}\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 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}\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}\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};\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}\n\nexport type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';\n\nexport interface CheckResult {\n status: CheckStatus;\n lastRun: string | null;\n output: string;\n}\n\nexport type CheckName = 'lint' | 'format' | 'test' | 'consistency';\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 GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n ahead: number;\n behind: number;\n diverged: boolean;\n branchHygiene: BranchHygieneStatus;\n}\n\nexport interface FileDiffEntry {\n path: string;\n renameSource?: 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\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 | '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\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}\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 AgentTaskState {\n id: string;\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n planId?: string;\n phaseIndex?: number;\n fixAttempt?: number;\n fixAttemptCap?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n // fix-review only: prefills the commit form once the agent has reported.\n suggestedCommit?: { title: string; message: string };\n errorKind?: 'auth' | 'question';\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"],"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,GA6VaC,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;AASO,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;AAC1B;"}
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 PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review';\n}\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 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}\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 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\nexport type ConsistencyIssueKind = 'orphan-subject';\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 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}\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 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}\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};\n\n/** Toolbar segments, left to right (IDEA-128); trimmed per project via `IntegrationConfig.toolbar.segments`. */\nexport const TOOLBAR_SEGMENT_IDS = ['focus', 'scout', 'runs', 'ship', '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 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}\n\nexport type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';\n\nexport interface CheckResult {\n status: CheckStatus;\n lastRun: string | null;\n output: string;\n}\n\nexport type CheckName = 'lint' | 'format' | 'test' | 'consistency';\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 GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n ahead: number;\n behind: number;\n diverged: boolean;\n branchHygiene: BranchHygieneStatus;\n}\n\nexport interface FileDiffEntry {\n path: string;\n renameSource?: 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\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 | '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\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}\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 AgentTaskState {\n id: string;\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n planId?: string;\n phaseIndex?: number;\n fixAttempt?: number;\n fixAttemptCap?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n // fix-review only: prefills the commit form once the agent has reported.\n suggestedCommit?: { title: string; message: string };\n errorKind?: 'auth' | 'question';\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","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,GA0WaC,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;AAUO,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;AAC7D,GAGaC,IAAsB,CAAC,SAAS,SAAS,QAAQ,QAAQ,MAAM;"}
@@ -0,0 +1,8 @@
1
+ import { Plugin } from 'vite';
2
+ export declare const CAMP_ROUTE = "/__camp";
3
+ export interface PaperCampToolbarOptions {
4
+ port?: number;
5
+ }
6
+ export declare function paperCamp(options?: PaperCampToolbarOptions): Plugin;
7
+ export default paperCamp;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAIlD,eAAO,MAAM,UAAU,YAAY,CAAC;AAEpC,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,SAAS,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,CA6BvE;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { r as l, a as m } from "../chunks/dev-port.CEt1H9LA.js";
2
+ import { request as i } from "node:http";
3
+ function f(a, r, { port: t, host: p = "127.0.0.1" }) {
4
+ const o = i(
5
+ {
6
+ host: p,
7
+ port: t,
8
+ path: a.url ?? "/",
9
+ method: a.method,
10
+ headers: { ...a.headers, host: `${p}:${t}` }
11
+ },
12
+ (e) => {
13
+ r.writeHead(e.statusCode ?? 502, e.headers), e.pipe(r);
14
+ }
15
+ );
16
+ o.on("error", () => {
17
+ r.statusCode = 502, r.end(`paper-camp server is not reachable on port ${t} — run \`paper-camp dev\`.`);
18
+ }), a.pipe(o);
19
+ }
20
+ const d = "/__camp";
21
+ function h(a = {}) {
22
+ let r = a.port, t = !0, p = d;
23
+ return {
24
+ name: "paper-camp-toolbar",
25
+ apply: "serve",
26
+ async configureServer(o) {
27
+ r ?? (r = await l(o.config.root) ?? 3333);
28
+ const e = await m(o.config.root), n = o.config.mode === "production";
29
+ if (t = ((e == null ? void 0 : e.enabled) ?? !0) && (!n || (e == null ? void 0 : e.allowProduction) === !0), p = (e == null ? void 0 : e.route) ?? d, !t) return;
30
+ const c = r;
31
+ o.middlewares.use(p, (u, s) => {
32
+ f(u, s, { port: c });
33
+ });
34
+ },
35
+ transformIndexHtml(o) {
36
+ return t ? o.replace(
37
+ "</body>",
38
+ `<script type="module" src="${p}/toolbar.js"><\/script></body>`
39
+ ) : o;
40
+ }
41
+ };
42
+ }
43
+ export {
44
+ d as CAMP_ROUTE,
45
+ h as default,
46
+ h as paperCamp
47
+ };
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/vite/proxy.ts","../../src/vite/index.ts"],"sourcesContent":["import { type IncomingMessage, type ServerResponse, request as httpRequest } from 'node:http';\n\nexport interface ProxyToCampServerOptions {\n port: number;\n host?: string;\n}\n\nexport function proxyToCampServer(\n req: IncomingMessage,\n res: ServerResponse,\n { port, host = '127.0.0.1' }: ProxyToCampServerOptions,\n): void {\n const proxyReq = httpRequest(\n {\n host,\n port,\n path: req.url ?? '/',\n method: req.method,\n headers: { ...req.headers, host: `${host}:${port}` },\n },\n (proxyRes) => {\n res.writeHead(proxyRes.statusCode ?? 502, proxyRes.headers);\n proxyRes.pipe(res);\n },\n );\n proxyReq.on('error', () => {\n res.statusCode = 502;\n res.end(`paper-camp server is not reachable on port ${port} — run \\`paper-camp dev\\`.`);\n });\n req.pipe(proxyReq);\n}\n","import type { IncomingMessage, ServerResponse } from 'node:http';\nimport type { Plugin, ViteDevServer } from 'vite';\nimport { readConfigIntegration, readConfigPort } from '../cli/dev-port';\nimport { proxyToCampServer } from './proxy';\n\nexport const CAMP_ROUTE = '/__camp';\n\nexport interface PaperCampToolbarOptions {\n port?: number;\n}\n\nexport function paperCamp(options: PaperCampToolbarOptions = {}): Plugin {\n let resolvedPort = options.port;\n let enabled = true;\n let route = CAMP_ROUTE;\n\n return {\n name: 'paper-camp-toolbar',\n apply: 'serve',\n async configureServer(server: ViteDevServer) {\n resolvedPort ??= (await readConfigPort(server.config.root)) ?? 3333;\n const integration = await readConfigIntegration(server.config.root);\n const isProduction = server.config.mode === 'production';\n enabled =\n (integration?.enabled ?? true) && (!isProduction || integration?.allowProduction === true);\n route = integration?.route ?? CAMP_ROUTE;\n if (!enabled) return;\n const port = resolvedPort;\n server.middlewares.use(route, (req: IncomingMessage, res: ServerResponse) => {\n proxyToCampServer(req, res, { port });\n });\n },\n transformIndexHtml(html: string) {\n if (!enabled) return html;\n return html.replace(\n '</body>',\n `<script type=\"module\" src=\"${route}/toolbar.js\"></script></body>`,\n );\n },\n };\n}\n\nexport default paperCamp;\n"],"names":["proxyToCampServer","req","res","port","host","proxyReq","httpRequest","proxyRes","CAMP_ROUTE","paperCamp","options","resolvedPort","enabled","route","server","readConfigPort","integration","readConfigIntegration","isProduction","html"],"mappings":";;AAOO,SAASA,EACdC,GACAC,GACA,EAAE,MAAAC,GAAM,MAAAC,IAAO,eACT;AACN,QAAMC,IAAWC;AAAAA,IACf;AAAA,MACE,MAAAF;AAAA,MACA,MAAAD;AAAA,MACA,MAAMF,EAAI,OAAO;AAAA,MACjB,QAAQA,EAAI;AAAA,MACZ,SAAS,EAAE,GAAGA,EAAI,SAAS,MAAM,GAAGG,CAAI,IA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","sourceRoot":"","sources":["../../src/vite/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { IncomingMessage, ServerResponse } from 'node:http';
2
+ export interface ProxyToCampServerOptions {
3
+ port: number;
4
+ host?: string;
5
+ }
6
+ export declare function proxyToCampServer(req: IncomingMessage, res: ServerResponse, { port, host }: ProxyToCampServerOptions): void;
7
+ //# sourceMappingURL=proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/vite/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAA0B,MAAM,WAAW,CAAC;AAE9F,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,EAAE,IAAI,EAAE,IAAkB,EAAE,EAAE,wBAAwB,GACrD,IAAI,CAmBN"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=proxy.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy.test.d.ts","sourceRoot":"","sources":["../../src/vite/proxy.test.ts"],"names":[],"mappings":""}
package/dist/vite.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from './vite/index'
2
+ export {}
3
+ import _default from './vite/index'
4
+ export default _default
5
+ export * from './vite/index'
6
+ export {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dendelion/paper-camp",
3
- "version": "0.13.2",
3
+ "version": "0.14.0",
4
4
  "description": "Local-first, AI-native project management with retro aesthetics",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.12.1",
@@ -19,6 +19,10 @@
19
19
  ".": {
20
20
  "import": "./dist/core/index.js",
21
21
  "types": "./dist/core/index.d.ts"
22
+ },
23
+ "./vite": {
24
+ "import": "./dist/vite/index.js",
25
+ "types": "./dist/vite/index.d.ts"
22
26
  }
23
27
  },
24
28
  "files": [
@@ -60,7 +64,13 @@
60
64
  },
61
65
  "peerDependencies": {
62
66
  "react": "^18.0.0",
63
- "react-dom": "^18.0.0"
67
+ "react-dom": "^18.0.0",
68
+ "vite": "^5.0.0"
69
+ },
70
+ "peerDependenciesMeta": {
71
+ "vite": {
72
+ "optional": true
73
+ }
64
74
  },
65
75
  "dependencies": {
66
76
  "@dendelion/paper-ui": "^0.12.0",
@@ -1,2 +0,0 @@
1
- import{r as d,k as T,j as e,l as E,U as R,w as L,J as f,p as N,f as G,c as V,g as X,e as Q,s as M,u as D,V as W,h as Z,a as $,m as J,P as ee,n as se,o as O,D as C,q as te,A as F,t as U,v as ae,x as ne,i as z}from"./main-CezpONOg.js";import{c as le}from"./tokens-C3C44lLs.js";import{S as B}from"./sidebar-section-X7KA8eUz.js";const ie=async()=>{try{const s=await fetch("/api/merge-policy");return s.ok?await s.json():null}catch{return null}},oe=async()=>{try{const s=await fetch("/api/merge-policy/apply",{method:"POST"});return s.ok?await s.json():null}catch{return null}},K={allowSquashMerge:!0,allowMergeCommit:!1,allowRebaseMerge:!1,squashMergeCommitTitle:"PR_TITLE",squashMergeCommitMessage:"PR_BODY"},q=[{key:"allowSquashMerge",label:"Allow squash merge"},{key:"allowMergeCommit",label:"Allow merge commit"},{key:"allowRebaseMerge",label:"Allow rebase merge"},{key:"squashMergeCommitTitle",label:"Squash commit title"},{key:"squashMergeCommitMessage",label:"Squash commit message"}];function Y(s){return typeof s=="boolean"?s?"Yes":"No":s}function re(s){return q.every(t=>s[t.key]===K[t.key])}const ce=({label:s,current:t,recommended:o,isLast:l})=>{const p=t===o;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-3 pb-2 pt-2",children:[e.jsx("span",{className:"flex-1",children:s}),e.jsx("span",{className:p?"opacity-[0.65] font-normal":"font-semibold",children:Y(t)}),!p&&e.jsxs("span",{className:"opacity-[0.45]",children:["→ ",Y(o)]})]}),!l&&e.jsx(N,{})]})},de=()=>{const[s,t]=d.useState(void 0),[o,l]=d.useState(!1),{toast:p}=T();d.useEffect(()=>{ie().then(t)},[]);const h=async()=>{l(!0);const n=await oe();l(!1),(n==null?void 0:n.status)==="ok"?(t(n),p({title:"Merge policy applied",variant:"success"})):p({title:"Failed to apply merge policy",description:(n==null?void 0:n.status)==="unavailable"?n.reason:void 0,variant:"error"})},u=(s==null?void 0:s.status)==="ok"&&re(s.policy);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"m-0",children:"Merge Policy"}),e.jsx("p",{className:"opacity-50 mt-1",children:"Paper Camp's canonical policy: squash-only merges, with the commit title and body taken from the PR."})]}),s===void 0&&e.jsx("p",{children:"Loading…"}),s===null&&e.jsx(E,{variant:"warning",children:"Failed to load merge policy."}),(s==null?void 0:s.status)==="unavailable"&&e.jsx(E,{variant:"warning",children:s.reason}),(s==null?void 0:s.status)==="ok"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("span",{className:"font-medium",children:s.repo}),e.jsx(R,{size:"small",fillColor:u?"rgba(143, 185, 150, 0.25)":"rgba(212, 163, 115, 0.25)",textColor:u?"#5E8A66":"#A67B4F",children:u?"Matches recommended policy":"Differs from recommended policy"})]}),e.jsx(L,{size:"small",texture:"kraft",children:q.map((n,r)=>e.jsx(ce,{label:n.label,current:s.policy[n.key],recommended:K[n.key],isLast:r===q.length-1},n.key))}),e.jsx("div",{className:"mt-4",children:e.jsx(f,{size:"small",onClick:h,disabled:o||u,children:o?"Applying…":"Apply recommended policy"})})]})]})},me=2e3,pe="agent:claude-code",ue=["claude auth login","claude setup-token"],he=()=>e.jsxs("div",{className:"mt-2 flex flex-col gap-2",children:[e.jsx("p",{className:"opacity-[0.65] text-sm m-0",children:"The in-app relay couldn't complete. Run one of these in a terminal instead:"}),ue.map(s=>e.jsx(W,{code:s},s)),e.jsxs("p",{className:"opacity-50 text-sm m-0",children:["Alternatively, set ",e.jsx("code",{children:"ANTHROPIC_API_KEY"})," in the server's environment — that bills as API usage rather than your Max subscription, so treat it as a fallback, not the default."]})]}),xe=({onSignedIn:s})=>{const t=D(r=>r.loginRelay),o=D(r=>r.startLoginRelay),l=D(r=>r.loadLoginRelayStatus),p=D(r=>r.cancelLoginRelay),{toast:h}=T(),u=d.useRef(null),n=t==null?void 0:t.phase;return d.useEffect(()=>{if(n!=="starting"&&n!=="awaiting-authorization")return;const r=window.setInterval(()=>l(),me);return()=>window.clearInterval(r)},[n,l]),d.useEffect(()=>{const r=t==null?void 0:t.authorizeUrl;n!=="awaiting-authorization"||!r||u.current===r||(u.current=r,window.open(r,"_blank","noopener,noreferrer"))},[n,t==null?void 0:t.authorizeUrl]),d.useEffect(()=>{n==="success"?(h({title:"Signed in",variant:"success"}),s()):n==="error"&&h({title:"Sign-in failed",description:t==null?void 0:t.error,variant:"error"})},[n]),n==="starting"?e.jsx(f,{size:"small",disabled:!0,children:"Starting…"}):n==="awaiting-authorization"?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{size:"small",onClick:()=>(t==null?void 0:t.authorizeUrl)&&window.open(t.authorizeUrl,"_blank","noopener,noreferrer"),children:"Reopen sign-in tab"}),e.jsx(f,{size:"small",onClick:()=>p(),children:"Cancel"})]}):e.jsxs("div",{children:[e.jsx(f,{size:"small",onClick:()=>o(),children:"Sign in"}),n==="error"&&e.jsx(he,{})]})},je={ok:{fill:"rgba(143, 185, 150, 0.25)",text:"#5E8A66",label:"Ready"},warn:{fill:"rgba(212, 163, 115, 0.25)",text:"#A67B4F",label:"Needs attention"},missing:{fill:"rgba(201, 139, 139, 0.25)",text:"#6E3A3A",label:"Missing"}},ge=({connection:s,onConnect:t,connecting:o})=>{const{connect:l}=s;return l?l.kind==="command"&&l.runnable?e.jsx(f,{size:"small",onClick:()=>t(s.id),disabled:o,children:o?"Running…":`Run \`${l.command}\``}):l.kind==="command"?e.jsx("div",{className:"mt-2",children:e.jsx(W,{code:l.command})}):l.kind==="link"?e.jsx(f,{size:"small",onClick:()=>window.open(l.url,"_blank","noopener,noreferrer"),children:l.label}):e.jsx("p",{className:"opacity-[0.65] text-sm mt-2 mx-0 mb-0",children:l.message}):null},fe=({connection:s,isLast:t,onRecheck:o,rechecking:l,onConnect:p,connecting:h})=>{const u=je[s.status];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"pb-3 pt-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"flex-1 font-medium",children:s.label}),s.authenticated===!1&&e.jsx(X,{content:"Installed, but not signed in",children:e.jsx(R,{size:"small",variant:"warning",children:"Not signed in"})}),e.jsx(R,{size:"small",fillColor:u.fill,textColor:u.text,children:u.label}),e.jsx(f,{size:"small",onClick:()=>o(s.id),disabled:l,children:l?"Checking…":"Recheck"})]}),e.jsxs("p",{className:"opacity-[0.65] text-sm mt-1 mx-0 mb-0",children:["Unlocks: ",s.unlocks]}),e.jsx("p",{className:"opacity-50 text-sm mt-1 mx-0 mb-0",children:s.detail}),e.jsx("div",{className:"mt-2",children:s.id===pe&&s.authenticated===!1?e.jsx(xe,{onSignedIn:()=>o(s.id)}):e.jsx(ge,{connection:s,onConnect:p,connecting:h})})]}),!t&&e.jsx(N,{})]})},ve=()=>{const[s,t]=d.useState(null),[o,l]=d.useState(!1),[p,h]=d.useState(null),[u,n]=d.useState(null),[r,S]=d.useState(!1),{toast:b}=T(),y=d.useCallback(i=>{if(i===null){l(!0);return}l(!1),t(i)},[]);d.useEffect(()=>{G().then(y),V().then(i=>S((i==null?void 0:i.setupDismissed)??!1))},[y]);const w=async i=>{h(i),y(await G()),h(null)},m=async i=>{n(i);const g=await Q(i);g?t(A=>(A==null?void 0:A.map(a=>a.id===i?g:a))??A):b({title:"Failed to connect",variant:"error"}),n(null)},x=async()=>{const i=!r,{ok:g}=await M({setupDismissed:i});g?(S(i),b({title:"Saved",variant:"success"})):b({title:"Failed to save",variant:"error"})},k=(s==null?void 0:s.every(i=>i.status==="ok"))??!0;return e.jsxs("div",{children:[e.jsx("div",{className:"mb-6",children:e.jsx("h2",{className:"m-0",children:"Setup"})}),s===null&&!o&&e.jsx("p",{children:"Loading…"}),o&&e.jsx("div",{className:"mb-4",children:e.jsx(E,{variant:"warning",children:"Failed to load connections. Try refreshing."})}),s&&e.jsxs(e.Fragment,{children:[!k&&e.jsx("div",{className:"mb-4",children:e.jsx(E,{variant:"warning",children:"Some connections are incomplete — features that depend on them stay disabled until fixed. Run the connect command below, then recheck."})}),e.jsx(L,{size:"small",texture:"kraft",children:s.map((i,g)=>e.jsx(fe,{connection:i,isLast:g===s.length-1,onRecheck:w,rechecking:p===i.id,onConnect:m,connecting:u===i.id},i.id))}),e.jsx("div",{className:"mt-4",children:e.jsx(f,{size:"small",onClick:x,children:r?"Show Setup on open again":"Don't show Setup on open"})})]})]})},be=()=>{const{subjects:s,loading:t,available:o}=Z(),l=$();return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"m-0",children:"Subjects"}),e.jsx("p",{className:"opacity-50 mt-1",children:"Subjects are the roadmap's bets and standing concerns. Edit the vocabulary on the Roadmap page."})]}),t&&e.jsx("p",{children:"Loading…"}),!t&&!o&&e.jsx("p",{className:"opacity-60 m-0",children:"Couldn't load subjects — check the server config."}),!t&&o&&e.jsxs(L,{size:"small",texture:"kraft",children:[s.length===0&&e.jsx("p",{className:"opacity-[0.45] m-0 pb-2",children:"No subjects yet."}),s.map((p,h)=>e.jsxs("div",{children:[e.jsx("div",{className:"pb-2 pt-2",children:p}),h<s.length-1&&e.jsx(N,{})]},p)),s.length>0&&e.jsx(N,{}),e.jsx("div",{className:"pt-3",children:e.jsx(f,{size:"small",onClick:()=>l({to:"/roadmap"}),children:"Go to Roadmap"})})]})]})},H=["phase","planDraft","ideaExtend","commitSuggest"],ye={phase:"Phase run",planDraft:"Plan draft",ideaExtend:"Idea extend",commitSuggest:"Commit suggest"},Ne=140,Se=160,ke=110,we=()=>e.jsxs("div",{className:"flex items-center gap-3 pb-1",children:[e.jsx("span",{className:"w-[110px] shrink-0 text-sm opacity-[0.45]",children:"Task"}),e.jsx("span",{className:"w-[140px] shrink-0 text-sm opacity-[0.45]",children:"Agent"}),e.jsx("span",{className:"w-[160px] shrink-0 text-sm opacity-[0.45]",children:"Model"}),e.jsx("span",{className:"w-[110px] shrink-0 text-sm opacity-[0.45]",children:"Effort"})]}),Ae=({taskKey:s,agentConfig:t,isLast:o,onSave:l})=>{const p=F[t.agent]??F["claude-code"],h=p.model,u=p.effort,[n,r]=d.useState(t.model??"");d.useEffect(()=>{r(t.model??"")},[t.model]);const S=m=>{var g;const x=m,k=F[x],i={agent:x};t.model&&(k.model===null||(g=k.model)!=null&&g.includes(t.model))&&(i.model=t.model),t.effort&&Array.isArray(k.effort)&&(i.effort=t.effort),l(s,i)},b=m=>{l(s,{...t,model:m||void 0})},y=()=>{l(s,{...t,model:n||void 0})},w=m=>{l(s,{...t,effort:m||void 0})};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-3 pb-2 pt-2",children:[e.jsx("span",{className:"w-[110px] shrink-0 text-sm opacity-[0.65]",children:ye[s]}),e.jsx(U,{size:"small",width:Ne,value:t.agent,onChange:S,options:ae.map(m=>({value:m,label:ne[m]}))}),Array.isArray(h)?e.jsx(U,{size:"small",width:Se,value:t.model??"",onChange:b,options:[{value:"",label:"Default"},...h.map(m=>({value:m,label:m}))]}):h===null?e.jsx(O,{size:"small",className:"w-[160px]",value:n,placeholder:"Default model",onChange:m=>r(m.target.value),onBlur:y}):null,e.jsx("div",{className:Array.isArray(u)?"visible":"invisible",children:e.jsx(U,{size:"small",width:ke,value:t.effort??"",onChange:w,options:[{value:"",label:"Default"},...(Array.isArray(u)?u:[]).map(m=>({value:m,label:m}))]})})]}),!o&&e.jsx(N,{})]})},Ce=()=>{const s=d.useRef(null),[t,o]=d.useState(void 0),{iconDataUri:l,loading:p}=se(),[h,u]=d.useState(null),n=h??l,[r,S]=d.useState(!1),[b,y]=d.useState(""),[w,m]=d.useState(""),{toast:x}=T();d.useEffect(()=>{V().then(a=>{o(a),(a==null?void 0:a.port)!==void 0&&y(String(a.port)),(a==null?void 0:a.projectName)!==void 0&&m(a.projectName)})},[]);const k=async(a,v)=>{const c=t==null?void 0:t.defaultAgents,j={phase:(c==null?void 0:c.phase)??C.phase,planDraft:(c==null?void 0:c.planDraft)??C.planDraft,ideaExtend:(c==null?void 0:c.ideaExtend)??C.ideaExtend,commitSuggest:(c==null?void 0:c.commitSuggest)??C.commitSuggest,[a]:v},{ok:I,error:P}=await M({defaultAgents:j});I?(o(_=>_&&{..._,defaultAgents:j}),x({title:"Saved",variant:"success"})):x({title:"Failed to save",description:P,variant:"error"})},i=async()=>{const a=Number(b);if(!t||!Number.isInteger(a)||a<=0||a===t.port)return;const{ok:v,error:c}=await M({port:a});v?(o(j=>j&&{...j,port:a}),x({title:"Saved",description:"Restart `paper-camp dev` to apply the new port.",variant:"success"})):x({title:"Failed to save",description:c,variant:"error"})},g=async()=>{const a=w.trim();if(!t||!a||a===t.projectName)return;const{ok:v,error:c}=await M({projectName:a});v?(o(j=>j&&{...j,projectName:a}),m(a),x({title:"Saved",variant:"success"})):x({title:"Failed to save",description:c,variant:"error"})},A=async a=>{var j;const v=(j=a.target.files)==null?void 0:j[0];if(!v)return;S(!0);const c=new FileReader;c.onloadend=async()=>{const I=c.result,P=await te(I);S(!1),P?(u(I),x({title:"Saved",variant:"success"})):x({title:"Failed to save",variant:"error"})},c.readAsDataURL(v)};return e.jsxs("div",{children:[e.jsx("div",{className:"mb-6",children:e.jsx("h2",{className:"m-0",children:"Project Info"})}),t===void 0&&e.jsx("p",{children:"Loading…"}),t===null&&e.jsxs(E,{variant:"warning",children:["No papercamp/config.json found — run ",e.jsx("code",{children:"paper-camp init"})," in this directory first."]}),t&&e.jsxs(L,{size:"small",texture:"kraft",children:[e.jsxs("div",{className:"flex items-end gap-3 pb-3",children:[e.jsx(O,{value:w,onChange:a=>m(a.target.value),onBlur:g,label:"Project Name"}),e.jsxs(R,{size:"small",fillColor:"rgba(143, 185, 150, 0.25)",textColor:le.accentGreenDark,children:["v",t.version]})]}),e.jsx(N,{}),e.jsxs("div",{className:"flex items-center gap-3 pb-3 pt-3",children:[n&&e.jsx("img",{src:n,alt:"Project icon",className:"w-10 h-10 object-contain shrink-0 rounded"}),e.jsxs("div",{children:[e.jsx("input",{ref:s,type:"file",accept:".svg,.png,.jpg,.jpeg,.gif,.webp",onChange:A,className:"hidden"}),e.jsx(f,{size:"small",onClick:()=>{var a;return(a=s.current)==null?void 0:a.click()},disabled:r,children:r?"Uploading…":"Choose File"}),p&&e.jsx("p",{className:"text-sm opacity-50 mt-1 mx-0 mb-0",children:"Loading…"}),!p&&!n&&!r&&e.jsx("p",{className:"text-sm opacity-[0.45] mt-1 mx-0 mb-0",children:"No icon set."})]})]}),e.jsx(N,{}),e.jsx("div",{className:"flex items-end gap-3 pb-3 pt-3",children:e.jsx(O,{type:"number",value:b,onChange:a=>y(a.target.value),onBlur:i,label:"Port",helperText:"Default for `paper-camp dev`. Restart the server to apply a change."})}),e.jsx(N,{}),e.jsx(we,{}),H.map((a,v)=>{var c;return e.jsx(Ae,{taskKey:a,agentConfig:((c=t.defaultAgents)==null?void 0:c[a])??C[a],isLast:v===H.length-1,onSave:k},a)})]}),e.jsxs("p",{className:"opacity-[0.45] text-sm mt-4",children:[e.jsx("strong",{children:"Initialized:"})," ",t?new Date(t.initializedAt).toLocaleString():"—"]})]})},ze=()=>{const s=J();return e.jsxs("div",{children:[e.jsx(ee,{children:"Settings"}),s==="subjects"?e.jsx(be,{}):s==="setup"?e.jsx(ve,{}):s==="merge-policy"?e.jsx(de,{}):e.jsx(Ce,{})]})},Me=()=>{const s=J(),t=$();return e.jsxs(e.Fragment,{children:[e.jsxs(B,{label:"General",children:[e.jsx(z,{size:"small",active:s===null,onClick:()=>t({to:"/settings"}),children:"Project Info"}),e.jsx(z,{size:"small",active:s==="setup",onClick:()=>t({to:"/settings/$section",params:{section:"setup"}}),children:"Setup"}),e.jsx(z,{size:"small",active:s==="merge-policy",onClick:()=>t({to:"/settings/$section",params:{section:"merge-policy"}}),children:"Merge Policy"})]}),e.jsx(B,{label:"Ideas",children:e.jsx(z,{size:"small",active:s==="subjects",onClick:()=>t({to:"/settings/$section",params:{section:"subjects"}}),children:"Subjects"})})]})};export{ze as SettingsPage,Me as SettingsSidebar};
2
- //# sourceMappingURL=index-CSirjtoU.js.map