@dendelion/paper-camp 0.19.0 → 0.21.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 (100) hide show
  1. package/README.md +34 -0
  2. package/dist/app/assets/index-BK4XPXt_.js +4 -0
  3. package/dist/app/assets/index-BK4XPXt_.js.map +1 -0
  4. package/dist/app/assets/index-BZnU3b_x.js +2 -0
  5. package/dist/app/assets/index-BZnU3b_x.js.map +1 -0
  6. package/dist/app/assets/index-BxQBW2Oi.js +2 -0
  7. package/dist/app/assets/index-BxQBW2Oi.js.map +1 -0
  8. package/dist/app/assets/index-COEivZHG.js +6 -0
  9. package/dist/app/assets/index-COEivZHG.js.map +1 -0
  10. package/dist/app/assets/index-COQOoPiS.js +2 -0
  11. package/dist/app/assets/{index-B6251tL6.js.map → index-COQOoPiS.js.map} +1 -1
  12. package/dist/app/assets/index-DIlqYxon.js +7 -0
  13. package/dist/app/assets/index-DIlqYxon.js.map +1 -0
  14. package/dist/app/assets/index-VXeQcBh1.js +2 -0
  15. package/dist/app/assets/index-VXeQcBh1.js.map +1 -0
  16. package/dist/app/assets/{index-nuVVSVma.js → index-vgBxkLmQ.js} +2 -2
  17. package/dist/app/assets/index-vgBxkLmQ.js.map +1 -0
  18. package/dist/app/assets/main-DEUaro51.css +1 -0
  19. package/dist/app/assets/main-s2b5XHSS.js +425 -0
  20. package/dist/app/assets/main-s2b5XHSS.js.map +1 -0
  21. package/dist/app/assets/sidebar-section-4MxZoa3M.js +2 -0
  22. package/dist/app/assets/sidebar-section-4MxZoa3M.js.map +1 -0
  23. package/dist/app/index.html +6 -6
  24. package/dist/app/toolbar.js +13828 -5485
  25. package/dist/app/toolbar.js.map +1 -1
  26. package/dist/chunks/{phase-progress.CwSKAAZ-.js → phase-progress.DimXpZFz.js} +1909 -1746
  27. package/dist/chunks/phase-progress.DimXpZFz.js.map +1 -0
  28. package/dist/cli/index.js +6765 -6293
  29. package/dist/cli/index.js.map +1 -1
  30. package/dist/core/corpus-format.d.ts +25 -0
  31. package/dist/core/corpus-format.d.ts.map +1 -0
  32. package/dist/core/corpus-format.test.d.ts +2 -0
  33. package/dist/core/corpus-format.test.d.ts.map +1 -0
  34. package/dist/core/doctor/checks/metadata.d.ts.map +1 -1
  35. package/dist/core/doctor/rules.d.ts +6 -1
  36. package/dist/core/doctor/rules.d.ts.map +1 -1
  37. package/dist/core/entity-view.d.ts +6 -0
  38. package/dist/core/entity-view.d.ts.map +1 -0
  39. package/dist/core/git-log.d.ts +2 -0
  40. package/dist/core/git-log.d.ts.map +1 -1
  41. package/dist/core/git-pr/pr-lookup.d.ts +6 -1
  42. package/dist/core/git-pr/pr-lookup.d.ts.map +1 -1
  43. package/dist/core/git-pr/pr.d.ts +10 -0
  44. package/dist/core/git-pr/pr.d.ts.map +1 -1
  45. package/dist/core/index.js +102 -99
  46. package/dist/core/issues.d.ts +50 -0
  47. package/dist/core/issues.d.ts.map +1 -0
  48. package/dist/core/issues.test.d.ts +2 -0
  49. package/dist/core/issues.test.d.ts.map +1 -0
  50. package/dist/core/parse/parser.d.ts.map +1 -1
  51. package/dist/core/parse/schemas.d.ts +19 -4
  52. package/dist/core/parse/schemas.d.ts.map +1 -1
  53. package/dist/core/phase-run.d.ts +1 -0
  54. package/dist/core/phase-run.d.ts.map +1 -1
  55. package/dist/core/readers.d.ts +11 -5
  56. package/dist/core/readers.d.ts.map +1 -1
  57. package/dist/core/release-notes.d.ts +2 -0
  58. package/dist/core/release-notes.d.ts.map +1 -1
  59. package/dist/core/roadmap.d.ts +21 -0
  60. package/dist/core/roadmap.d.ts.map +1 -1
  61. package/dist/core/run-order.d.ts +2 -1
  62. package/dist/core/run-order.d.ts.map +1 -1
  63. package/dist/core/scaffold/scaffold.d.ts +1 -2
  64. package/dist/core/scaffold/scaffold.d.ts.map +1 -1
  65. package/dist/core/scaffold/templates.d.ts +1 -1
  66. package/dist/core/scaffold/templates.d.ts.map +1 -1
  67. package/dist/core/sections.d.ts.map +1 -1
  68. package/dist/core/serialize/entity-file.d.ts +79 -0
  69. package/dist/core/serialize/entity-file.d.ts.map +1 -0
  70. package/dist/core/serialize/index.d.ts +1 -0
  71. package/dist/core/serialize/index.d.ts.map +1 -1
  72. package/dist/core/serialize/serializer.d.ts +1 -74
  73. package/dist/core/serialize/serializer.d.ts.map +1 -1
  74. package/dist/core/stats.d.ts +2 -0
  75. package/dist/core/stats.d.ts.map +1 -1
  76. package/dist/core/status/status.d.ts +25 -4
  77. package/dist/core/status/status.d.ts.map +1 -1
  78. package/dist/types/index.d.ts +86 -8
  79. package/dist/types/index.d.ts.map +1 -1
  80. package/dist/types/index.js +16 -15
  81. package/dist/types/index.js.map +1 -1
  82. package/package.json +3 -3
  83. package/dist/app/assets/index-B6251tL6.js +0 -2
  84. package/dist/app/assets/index-BNoowtMI.js +0 -7
  85. package/dist/app/assets/index-BNoowtMI.js.map +0 -1
  86. package/dist/app/assets/index-D2iIIpI1.js +0 -4
  87. package/dist/app/assets/index-D2iIIpI1.js.map +0 -1
  88. package/dist/app/assets/index-D5j1njQR.js +0 -2
  89. package/dist/app/assets/index-D5j1njQR.js.map +0 -1
  90. package/dist/app/assets/index-DLkUANCR.js +0 -2
  91. package/dist/app/assets/index-DLkUANCR.js.map +0 -1
  92. package/dist/app/assets/index-nuVVSVma.js.map +0 -1
  93. package/dist/app/assets/index-s6CVH54G.js +0 -6
  94. package/dist/app/assets/index-s6CVH54G.js.map +0 -1
  95. package/dist/app/assets/main--EStESJz.js +0 -217
  96. package/dist/app/assets/main--EStESJz.js.map +0 -1
  97. package/dist/app/assets/main-CAJuC1Pz.css +0 -1
  98. package/dist/app/assets/sidebar-section-DTU8Naqm.js +0 -2
  99. package/dist/app/assets/sidebar-section-DTU8Naqm.js.map +0 -1
  100. package/dist/chunks/phase-progress.CwSKAAZ-.js.map +0 -1
@@ -1,10 +1,31 @@
1
1
  import { PlanEntry, ResolvedRoadmap, Roadmap, RoadmapEvent, TaskLogEntry } from '../types/index';
2
+ /**
3
+ * Only `## The goal`, `## Horizon N — …`, and `## Standing concerns` headings are
4
+ * inspected; other prose (intro, "How this file works") is skipped.
5
+ */
2
6
  export declare function parseRoadmap(markdown: string): Roadmap;
7
+ /**
8
+ * Removes one item's bullet (with its continuation lines and candidates), or — if
9
+ * `candidateName` is given — just that one candidate bullet, leaving the item in place.
10
+ */
3
11
  export declare function removeRoadmapItem(markdown: string, horizonTitle: string, itemName: string, candidateName?: string): string;
12
+ /**
13
+ * Appends a new item bullet (`- **name** — description`) at the end of a horizon's
14
+ * item list, in the shape parseItems expects. No-op if the horizon doesn't exist.
15
+ */
4
16
  export declare function addRoadmapItem(markdown: string, horizonTitle: string, name: string, description: string): string;
5
17
  export declare function addRoadmapCandidate(markdown: string, horizonTitle: string, itemName: string, candidateName: string): string;
6
18
  export declare function linkRoadmapItem(markdown: string, horizonTitle: string, itemName: string, entityId: string): string;
19
+ /**
20
+ * The subject vocabulary in order: horizon items (H1 near-term → H3 long bets), then
21
+ * standing concerns last. The one ordered read every subject picker/grouping should use.
22
+ */
7
23
  export declare function deriveSubjectVocabulary(roadmap: Roadmap): string[];
8
24
  export declare function resolveRoadmap(roadmap: Roadmap, entities: PlanEntry[], taskLog?: TaskLogEntry[], changelog?: string): ResolvedRoadmap;
25
+ /**
26
+ * One chronological model over two append-only sources, keyed back to the roadmap item
27
+ * via its `linked` entity ids. `updated` is deliberately excluded (see IDEA-92's Timeline
28
+ * phase) since a last-touched timestamp can't stand in for history.
29
+ */
9
30
  export declare function deriveRoadmapEvents(roadmap: Roadmap, entities: PlanEntry[], taskLog: TaskLogEntry[]): RoadmapEvent[];
10
31
  //# sourceMappingURL=roadmap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"roadmap.d.ts","sourceRoot":"","sources":["../../src/core/roadmap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,YAAY,EAEZ,YAAY,EACb,MAAM,gBAAgB,CAAC;A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oCtD;AAyCD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACrB,MAAM,CAkBR;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,MAAM,CASR;AAID,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,MAAM,CAOR;AAID,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,MAAM,CAOR;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAKlE;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,EAAE,EACrB,OAAO,GAAE,YAAY,EAAO,EAC5B,SAAS,SAAK,GACb,eAAe,CAsCjB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,SAAS,EAAE,EACrB,OAAO,EAAE,YAAY,EAAE,GACtB,YAAY,EAAE,CAyChB"}
@@ -1,3 +1,4 @@
1
+ import { EntityKind } from '../types/index';
1
2
  import { RunOrderFileEntry } from './run-order-file';
2
3
  /** Classification input — status must be the DERIVED status (what the UI shows),
3
4
  * not the stored frontmatter override, or merged-PR `done` entries get ordered. */
@@ -19,7 +20,7 @@ export declare function classifyRunOrderEntries(entries: {
19
20
  title: string;
20
21
  created: string;
21
22
  status?: string;
22
- kind?: 'note';
23
+ kind?: EntityKind;
23
24
  }[], work: {
24
25
  id?: string;
25
26
  status?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"run-order.d.ts","sourceRoot":"","sources":["../../src/core/run-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAI1D;oFACoF;AACpF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,GAAG,OAAO,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EACzF,IAAI,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EACxC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK;IAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,SAAS,GACzE,aAAa,EAAE,CAejB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,iBAAiB,EAAE,EACzB,OAAO,EAAE,aAAa,EAAE,EACxB,KAAK,CAAC,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpC,iBAAiB,EAAE,CA6BrB;AAED,qFAAqF;AACrF,wBAAgB,YAAY,CAAC,CAAC,EAAE,iBAAiB,EAAE,EAAE,CAAC,EAAE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BAAiB,EAAE,EAAE,CAAC,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAEpF"}
@@ -1,10 +1,9 @@
1
- export declare const PAPER_CAMP_VERSION = "0.1.0";
1
+ export declare const PAPER_CAMP_VERSION: string;
2
2
  export declare class AlreadyInitializedError extends Error {
3
3
  constructor(targetDir: string);
4
4
  }
5
5
  export interface InitOptions {
6
6
  projectName: string;
7
- intent?: string;
8
7
  }
9
8
  export declare function initProject(targetDir: string, options: InitOptions): Promise<void>;
10
9
  //# sourceMappingURL=scaffold.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/scaffold.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,SAAS,EAAE,MAAM;CAG9B;AAaD,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmDxF"}
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/scaffold.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,kBAAkB,QAAmB,CAAC;AAEnD,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,SAAS,EAAE,MAAM;CAG9B;AAaD,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA4CxF"}
@@ -1,3 +1,3 @@
1
- export declare const SKILL_MD_CONTENT = "---\nname: paper-camp\ndescription: Work inside a project that has a papercamp/ folder \u2014 its unified idea entities (each holding its plan as a section), with decisions and open questions logged as notes on the idea they bind. Use this whenever the working directory contains papercamp/ (papercamp/ideas/), and especially before starting, continuing, or completing any plan phase, drafting an idea, logging a decision, or answering \"what are we working on / what's next\".\n---\n\n# Paper Camp\n\nPaper Camp is this project's planning methodology: plans and ideas are one\nthing, a unified entity file under `papercamp/ideas/`, with decisions and\nopen questions logged as notes bound to the idea they concern. This skill\ntells you how to read that state before acting and how to keep it honest as\nyou work.\n\nIf a `papercamp` MCP server is connected in this session, prefer its tools\n(list/get plans, update phase, etc.) over raw file access \u2014\nthey enforce the same guards (id allocation, branch conflicts) that the file\ngrammar below assumes. Everything in this skill still applies conceptually;\nonly the mechanism changes.\n\n## Before doing any work\n\nRead, in this order, whatever exists:\n\n1. `papercamp/ideas/index.md` \u2014 every entity's id/title/type/status/tags, at\n a glance. Ideas and plans are one thing: an entity is an *idea* for its\n whole life, and its plan is a `### Phases` section inside the same file.\n2. The specific entity file at `papercamp/ideas/<ID>.md` (e.g. `IDEA-43.md`)\n for the work you're about to do \u2014 YAML frontmatter (`id`, `title`,\n `type`, `status`, `tags`, ...) plus prose rationale, then optionally a\n `### Phases` list of `- [ ]`/`- [x]` checkboxes with an indented\n description under each. Done/dropped entities live in\n `papercamp/ideas/archive/`.\n Its notes carry any decision or open question bound to it \u2014 settled calls\n you shouldn't re-litigate without flagging it to the user first, and\n unresolved questions that might block or redirect the work you're about\n to start.\n\nSkip files that don't exist yet (a fresh project may have empty logs).\n\n## While working\n\n- Work one plan phase at a time unless told otherwise \u2014 don't cascade into\n later phases just because they look quick.\n- If a phase's boundary or intent is unclear, ask before continuing.\n- Prose in plans and ideas is more current than your memory of past\n conversations. If they conflict, the files win \u2014 say so and resync.\n\n## Keep the project current as you go\n\n- **Plan phases**: when you finish a phase, flip its checkbox from `- [ ]` to\n `- [x]` in the plan's frontmatter file. Change only that line \u2014 don't touch\n other phases or prose.\n- **Plan status**: keep the plan's `status:` frontmatter honest\n (`planned` / `in-progress` / `review` / `done`). When every phase is\n checked, set status to `review` \u2014 never `done`. `done` is a human-only\n promotion after review; an agent finishing the last phase does not close\n the plan itself.\n- **Decisions / open questions**: if you settle something ambiguous while\n working, log it as a decision note on the idea it bounds; if you surface a\n question you can't resolve yourself, add it as a question note on that idea\n rather than guessing silently.\n\n## What this skill deliberately does not do\n\nIt does not maintain a separate \"current focus\" file \u2014 that's derived at\nsession start from live plan data, not hand-maintained here. It does\nnot define the file formats in full; treat the existing files under\n`papercamp/` as the grammar reference (mirror their structure exactly rather\nthan inventing a new shape).\n";
1
+ export declare const SKILL_MD_CONTENT = "---\nname: paper-camp\ndescription: Work inside a project that has a papercamp/ folder \u2014 its unified idea entities (each holding its plan as a section), with decisions and open questions logged as notes on the idea they bind. Use this whenever the working directory contains papercamp/ (papercamp/ideas/), and especially before starting, continuing, or completing any plan phase, drafting an idea, logging a decision, or answering \"what are we working on / what's next\".\n---\n\n# Paper Camp\n\nPaper Camp is this project's planning methodology: plans and ideas are one\nthing, a unified entity file under `papercamp/ideas/`, with decisions and\nopen questions logged as notes bound to the idea they concern. This skill\ntells you how to read that state before acting and how to keep it honest as\nyou work.\n\nIf a `papercamp` MCP server is connected in this session, prefer its tools\n(list/get plans, update phase, etc.) over raw file access \u2014\nthey enforce the same guards (id allocation, branch conflicts) that the file\ngrammar below assumes. Everything in this skill still applies conceptually;\nonly the mechanism changes.\n\n## Before doing any work\n\nRead, in this order, whatever exists:\n\n1. `papercamp/ideas/` \u2014 one file per entity, named by id. Ideas and plans are\n one thing: an entity is an *idea* for its whole life, and its plan is a\n `### Phases` section inside the same file.\n2. The specific entity file at `papercamp/ideas/<ID>.md` (e.g. `IDEA-43.md`)\n for the work you're about to do \u2014 YAML frontmatter (`id`, `title`,\n `type`, `status`, `tags`, ...) plus prose rationale, then optionally a\n `### Phases` list of `- [ ]`/`- [x]` checkboxes with an indented\n description under each. Done/dropped entities live in\n `papercamp/ideas/archive/`.\n Its notes carry any decision or open question bound to it \u2014 settled calls\n you shouldn't re-litigate without flagging it to the user first, and\n unresolved questions that might block or redirect the work you're about\n to start.\n\nSkip files that don't exist yet (a fresh project may have empty logs).\n\n## While working\n\n- Work one plan phase at a time unless told otherwise \u2014 don't cascade into\n later phases just because they look quick.\n- If a phase's boundary or intent is unclear, ask before continuing.\n- Prose in plans and ideas is more current than your memory of past\n conversations. If they conflict, the files win \u2014 say so and resync.\n\n## Keep the project current as you go\n\n- **Plan phases**: when you finish a phase, flip its checkbox from `- [ ]` to\n `- [x]` in the plan's frontmatter file. Change only that line \u2014 don't touch\n other phases or prose.\n- **Plan status**: keep the plan's `status:` frontmatter honest\n (`planned` / `in-progress` / `review` / `done`). When every phase is\n checked, set status to `review` \u2014 never `done`. `done` is a human-only\n promotion after review; an agent finishing the last phase does not close\n the plan itself.\n- **Decisions / open questions**: if you settle something ambiguous while\n working, log it as a decision note on the idea it bounds; if you surface a\n question you can't resolve yourself, add it as a question note on that idea\n rather than guessing silently.\n\n## What this skill deliberately does not do\n\nIt does not maintain a separate \"current focus\" file \u2014 that's derived at\nsession start from live plan data, not hand-maintained here. It does\nnot define the file formats in full; treat the existing files under\n`papercamp/` as the grammar reference (mirror their structure exactly rather\nthan inventing a new shape).\n";
2
2
  export declare const CLAUDE_SETTINGS_JSON: string;
3
3
  //# sourceMappingURL=templates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/templates.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,moHAqE5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,QAa5B,CAAC"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/templates.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,smHAqE5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,QAa5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../src/core/sections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAC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K,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;IACnE,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;CACzC;AAED,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,SAAS,CAIhD,CAAC;AAEF;8EAC8E;AAC9E,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,SAAS,CAI/C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,QAAQ,CAI5C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,UAAU,CAAC,QAAQ,CAIvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,UAAU,CAIhD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,QAAQ,CAI/C,CAAC;AAoCF,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,aAAa,CAIpD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { LogEntry, MarginNote, PhaseItem, SuggestionEntry, ThreadMessage } from '../../types/index';
2
+ export declare function todayDateString(): string;
3
+ /** Every agent-authored thread message must carry `from: 'agent'` or it renders as the
4
+ * user's own message in the feedback chat — build them through here so it can't be forgotten. */
5
+ export declare function agentThreadMessage(text: string, kind?: ThreadMessage['kind']): ThreadMessage;
6
+ interface NewPlanInput {
7
+ title: string;
8
+ status: string;
9
+ kind?: string;
10
+ id?: string;
11
+ idea?: string;
12
+ agent?: string;
13
+ created: string;
14
+ updated?: string;
15
+ tags?: string[];
16
+ body?: string;
17
+ phases?: PhaseItem[];
18
+ log?: LogEntry[];
19
+ clarifications?: LogEntry[];
20
+ notes?: MarginNote[];
21
+ }
22
+ export declare function formatPlanEntry(input: NewPlanInput): string;
23
+ export declare function formatPlans(entries: NewPlanInput[]): string;
24
+ export declare function serializeFrontmatter(data: Record<string, unknown>): string;
25
+ interface NewPlanFileInput {
26
+ id: string;
27
+ title: string;
28
+ kind: string;
29
+ status: string;
30
+ idea?: string;
31
+ agent?: string;
32
+ created: string;
33
+ updated?: string;
34
+ audited?: string;
35
+ auditedHash?: string;
36
+ tags?: string[];
37
+ body?: string;
38
+ phases?: PhaseItem[];
39
+ log?: LogEntry[];
40
+ clarifications?: LogEntry[];
41
+ notes?: MarginNote[];
42
+ }
43
+ export declare function formatPlanFile(input: NewPlanFileInput): string;
44
+ interface NewEntityFileInput {
45
+ id: string;
46
+ title: string;
47
+ type?: string;
48
+ kind?: string;
49
+ status?: string;
50
+ idea?: string;
51
+ agent?: string;
52
+ created: string;
53
+ updated?: string;
54
+ audited?: string;
55
+ auditedHash?: string;
56
+ released?: string;
57
+ tags?: string[];
58
+ subject?: string;
59
+ order?: number;
60
+ issueSource?: string;
61
+ body?: string;
62
+ phases?: PhaseItem[];
63
+ fixes?: PhaseItem[];
64
+ thread?: ThreadMessage[];
65
+ unknownFrontmatter?: Record<string, unknown>;
66
+ }
67
+ export declare function formatEntityFile(input: NewEntityFileInput): string;
68
+ interface NewIdeaFileInput {
69
+ id: string;
70
+ title: string;
71
+ kind?: string;
72
+ status?: string;
73
+ body?: string;
74
+ log?: LogEntry[];
75
+ }
76
+ export declare function formatIdeaFile(input: NewIdeaFileInput): string;
77
+ export declare function removeSuggestionLine(markdown: string, target: SuggestionEntry): string;
78
+ export {};
79
+ //# sourceMappingURL=entity-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-file.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/entity-file.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,eAAe,EACf,aAAa,EACd,MAAM,mBAAmB,CAAC;AAwB3B,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;iGACiG;AACjG,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,aAAa,CAAC,MAAM,CAAS,GAClC,a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AAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAa9D;AAID,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,MAAM,CAkBtF"}
@@ -1,3 +1,4 @@
1
+ export * from './entity-file';
1
2
  export * from './serializer';
2
3
  export * from './content-hash';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
@@ -1,79 +1,6 @@
1
- import { EntityEntry, LogEntry, MarginNote, PhaseItem, SuggestionEntry, ThreadMessage } from '../../types/index';
2
- export declare function todayDateString(): string;
3
- export declare function agentThreadMessage(text: string, kind?: ThreadMessage['kind']): ThreadMessage;
4
1
  export declare function assignPlanId(configPath: string, kind: string): Promise<string | undefined>;
5
- interface NewPlanInput {
6
- title: string;
7
- status: string;
8
- kind?: string;
9
- id?: string;
10
- idea?: string;
11
- agent?: string;
12
- created: string;
13
- updated?: string;
14
- tags?: string[];
15
- body?: string;
16
- phases?: PhaseItem[];
17
- log?: LogEntry[];
18
- clarifications?: LogEntry[];
19
- notes?: MarginNote[];
20
- }
21
- export declare function formatPlanEntry(input: NewPlanInput): string;
22
- export declare function formatPlans(entries: NewPlanInput[]): string;
23
- export declare function serializeFrontmatter(data: Record<string, unknown>): string;
24
- interface NewPlanFileInput {
25
- id: string;
26
- title: string;
27
- kind: string;
28
- status: string;
29
- idea?: string;
30
- agent?: string;
31
- created: string;
32
- updated?: string;
33
- audited?: string;
34
- auditedHash?: string;
35
- tags?: string[];
36
- body?: string;
37
- phases?: PhaseItem[];
38
- log?: LogEntry[];
39
- clarifications?: LogEntry[];
40
- notes?: MarginNote[];
41
- }
42
- export declare function formatPlanFile(input: NewPlanFileInput): string;
43
- interface NewEntityFileInput {
44
- id: string;
45
- title: string;
46
- type?: string;
47
- kind?: string;
48
- status?: string;
49
- agent?: string;
50
- created: string;
51
- updated?: string;
52
- audited?: string;
53
- auditedHash?: string;
54
- released?: string;
55
- tags?: string[];
56
- subject?: string;
57
- order?: number;
58
- body?: string;
59
- phases?: PhaseItem[];
60
- fixes?: PhaseItem[];
61
- thread?: ThreadMessage[];
62
- }
63
- export declare function formatEntityFile(input: NewEntityFileInput): string;
64
2
  export declare function assignEntityId(configPath: string): Promise<string | undefined>;
3
+ export declare function assignTicketId(configPath: string): Promise<string | undefined>;
65
4
  export declare function ensureSubject(configPath: string, subject: string): Promise<void>;
66
- interface NewIdeaFileInput {
67
- id: string;
68
- title: string;
69
- kind?: string;
70
- status?: string;
71
- body?: string;
72
- log?: LogEntry[];
73
- }
74
- export declare function formatIdeaFile(input: NewIdeaFileInput): string;
75
5
  export declare function archiveEntityFile(root: string, entityId: string): Promise<boolean>;
76
- export declare function removeSuggestionLine(markdown: string, target: SuggestionEntry): string;
77
- export declare function formatEntitiesIndex(entities: EntityEntry[]): string;
78
- export {};
79
6
  //# sourceMappingURL=serializer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/serializer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,UAAU,EACV,SAAS,EACT,eAAe,EACf,aAAa,EACd,MAAM,mBAAmB,CAAC;AAwB3B,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAKD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,E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AC,OAAO,CAAC,CAexF"}
@@ -4,6 +4,8 @@ export declare function countThreadNotes(entities: EntityEntry[]): {
4
4
  openQuestions: number;
5
5
  decisions: number;
6
6
  };
7
+ /** ISO 8601 week, via the standard "shift to the week's Thursday" algorithm — ties
8
+ * activity to a calendar week regardless of which day it started on. */
7
9
  export declare function isoWeekKey(dateStr: string): string;
8
10
  export declare function tasksPerWeek(entries: TaskLogEntry[]): TasksPerWeek[];
9
11
  export declare function usagePerWeek(entries: TaskLogEntry[]): UsagePerWeek[];
@@ -1 +1 @@
1
- {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/core/stats.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EAEZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,YAAY,EAEZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACb,MAAM,gBAAgB,CAAC;AAoExB,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,WAAW,EAAE,GACtB,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAOvC;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAUA;AAKD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CASpE;AAqBD,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAoBpE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,GAAG,IAAI,CAa5E;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,GAAG,IAAI,CAa3E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,SAAI,GAAG,QAAQ,EAAE,CAsBjF;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAyB7E"}
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/core/stats.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EAEZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,YAAY,EAEZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACb,MAAM,gBAAgB,CAAC;AAoExB,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,WAAW,EAAE,GACtB,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAOvC;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAUA;AAED;wEACwE;AACxE,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CASpE;AAqBD,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAoBpE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,GAAG,IAAI,CAa5E;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,GAAG,IAAI,CAa3E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,SAAI,GAAG,QAAQ,EAAE,CAsBjF;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAyB7E"}
@@ -1,13 +1,34 @@
1
- import { EntityStatus, PhaseItem, PrInfo } from '../../types/index';
1
+ import { EntityKind, EntityStatus, PhaseItem, PlanStatus, PrInfo } from '../../types/index';
2
2
  export interface StatusDerivationInput {
3
- kind?: 'note';
3
+ kind?: EntityKind;
4
4
  status?: EntityStatus;
5
5
  phases: PhaseItem[];
6
6
  fixes?: PhaseItem[];
7
- }
8
- export interface ArchivabilityInput extends StatusDerivationInput {
9
7
  archived?: boolean;
10
8
  }
9
+ export type ArchivabilityInput = StatusDerivationInput;
10
+ /**
11
+ * The fix/reopen boundary predicate (IDEA-187): a done/archived entity's file is
12
+ * read-only, so new work spawns a linked fix entity instead. Reads the stored status,
13
+ * not the derived one — a merged-but-not-yet-archived idea counts once `status: done`
14
+ * is actually stamped (readEntities sets `archived` from the file's directory).
15
+ */
16
+ export declare function isClosedEntity(entity: {
17
+ status?: EntityStatus;
18
+ archived?: boolean;
19
+ }): boolean;
11
20
  export declare function deriveStatus(entity: StatusDerivationInput, pr: PrInfo | undefined, prLookupResolved: boolean, hasMainActivity?: boolean): EntityStatus | undefined;
21
+ /**
22
+ * Mirrors deriveStatus's guards up to its `!prLookupResolved` branch: true exactly when
23
+ * GitHub was unreachable and nothing derivable (archived/dropped/a resolved PR) overrode
24
+ * the guess.
25
+ */
26
+ export declare function isStatusFallback(entity: StatusDerivationInput, pr: PrInfo | undefined, prLookupResolved: boolean): boolean;
12
27
  export declare function isArchivable(entity: ArchivabilityInput, pr: PrInfo | undefined): boolean;
28
+ /**
29
+ * A board's status rolls up from its tickets' derived statuses, the way a plan's rolls
30
+ * up from its phases, capped at `review` since closing an entity is always a human
31
+ * promotion (IDEA-187), never automatic.
32
+ */
33
+ export declare function deriveBoardStatus(ticketStatuses: EntityStatus[]): PlanStatus;
13
34
  //# sourceMappingURL=status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/core/status/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,mBAAmB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gBAAgB,EAAE,OAAO,EACzB,eAAe,UAAQ,GACtB,YAAY,GAAG,SAAS,CAsB1B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,qBAAqB,EAC7B,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,gBAAgB,EAAE,OAAO,GACxB,OAAO,CAMT;AAID,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAIxF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,GAAG,UAAU,CAK5E"}
@@ -1,3 +1,4 @@
1
+ export declare const PAIRING_TOKEN_HEADER: "x-pairing-token";
1
2
  export type PlanStatus = 'idea' | 'planned' | 'in-progress' | 'review' | 'done' | 'dropped';
2
3
  export declare const PLAN_STATUSES: PlanStatus[];
3
4
  export interface LogEntry {
@@ -20,7 +21,7 @@ export interface PhaseItem {
20
21
  done: boolean;
21
22
  text: string;
22
23
  description?: string;
23
- source?: 'review' | 'manual';
24
+ source?: 'review' | 'manual' | 'issue';
24
25
  run?: PhaseRun;
25
26
  }
26
27
  export type PhaseMilestone = 'implement' | 'verify' | 'checkbox';
@@ -114,6 +115,9 @@ export interface PrReviewFinding {
114
115
  body: string;
115
116
  }
116
117
  export type PrReviewVerdict = 'approve' | 'comment' | 'request-changes';
118
+ /** Parsed from the JSON object a pr-review agent's prompt requires as its final
119
+ * line (see buildPrReviewPrompt). `findings` become per-line PR review comments;
120
+ * the other fields are rendered per destination. */
117
121
  export interface PrReviewResult {
118
122
  verdict: PrReviewVerdict;
119
123
  assessment: string;
@@ -132,6 +136,9 @@ export interface FeedbackEdit {
132
136
  /** The complete replacement body, when the message corrects body prose. */
133
137
  body?: string;
134
138
  }
139
+ /** Parsed from the JSON object a feedback-reply agent's prompt requires as its
140
+ * final line. The chat never creates ideas — a request is either a reply or an
141
+ * edit on the current plan. */
135
142
  export interface FeedbackReplyResult {
136
143
  reply: string;
137
144
  edit?: FeedbackEdit;
@@ -170,6 +177,9 @@ export interface PlanEntry {
170
177
  title: string;
171
178
  status: PlanStatus;
172
179
  kind?: PlanKind;
180
+ /** 'fix'/'board'/'ticket' mark a structural role beyond a plain plan-bearing idea —
181
+ * undefined for an ordinary one. Distinct from `kind`, which carries the commit type. */
182
+ entityKind?: EntityKind;
173
183
  id?: string;
174
184
  idea?: string;
175
185
  agent?: AgentId;
@@ -184,6 +194,8 @@ export interface PlanEntry {
184
194
  subject?: string;
185
195
  /** Absent means unordered — sorts after all ordered entries, by created date. */
186
196
  order?: number;
197
+ /** See EntityEntry.issueSource. */
198
+ issueSource?: string;
187
199
  body: string;
188
200
  phases: PhaseItem[];
189
201
  /** Post-build findings, same checkbox grammar as `phases` — see EntityEntry.fixes. */
@@ -199,6 +211,9 @@ export interface PlanEntry {
199
211
  /** Set by readEntities from which dir the file came from — see EntityEntry.archived. */
200
212
  archived?: boolean;
201
213
  pr?: PrInfo;
214
+ /** True when `status` is a guessed fallback because GitHub's PR state
215
+ * couldn't be resolved — see isStatusFallback. */
216
+ statusFallback?: boolean;
202
217
  }
203
218
  export interface ArchivableIdea {
204
219
  id: string;
@@ -307,15 +322,21 @@ export interface IdeaEntry {
307
322
  export type EntityType = PlanKind;
308
323
  /** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */
309
324
  export type EntityStatus = PlanStatus | 'open';
325
+ /** "note" never grows phases; "fix" is a follow-up entity linked to a done/archived
326
+ * parent via `idea` — see entityFrontmatterSchema. "board" carries no phases, decomposing
327
+ * into "ticket" children instead (IDEA-201) — a ticket is a full entity with its own
328
+ * `TICKET-N` id, linked back to its board via `idea`. Omitted for a normal idea. */
329
+ export type EntityKind = 'note' | 'fix' | 'board' | 'ticket';
310
330
  export interface EntityEntry {
311
331
  id: string;
312
332
  title: string;
313
333
  /** Absent until the entity is classified (usually when its plan is drafted). */
314
334
  type?: EntityType;
315
- /** "note" marks an entity that never grows phases. */
316
- kind?: 'note';
335
+ kind?: EntityKind;
317
336
  /** Stored override, not the source of truth — see entityFrontmatterSchema. */
318
337
  status?: EntityStatus;
338
+ /** IDEA-N backlink to the parent this fix addresses; required when kind: fix. */
339
+ idea?: string;
319
340
  agent?: AgentId;
320
341
  created: string;
321
342
  updated?: string;
@@ -326,8 +347,15 @@ export interface EntityEntry {
326
347
  tags: string[];
327
348
  /** Absent renders as the virtual "No subject" group. */
328
349
  subject?: string;
329
- /** Absent means unordered — sorts after all ordered entries, by created date. */
350
+ /** Absent means unordered — sorts after all ordered entries, by created date. Overlaid
351
+ * with the run-order rank by readEntities — see `storedOrder` for the frontmatter value. */
330
352
  order?: number;
353
+ /** The frontmatter `order` as read from disk, before readEntities overlays the run-order
354
+ * rank onto `order` — what a write path should persist back. See entityFileInput. */
355
+ storedOrder?: number;
356
+ /** The Issue.id this entity was spawned to promote, if any — how a promoted
357
+ * issue is re-matched to its target on every read. */
358
+ issueSource?: string;
331
359
  body: string;
332
360
  phases: PhaseItem[];
333
361
  /** Post-build findings, same checkbox grammar as `phases` — appended below Phases
@@ -338,6 +366,9 @@ export interface EntityEntry {
338
366
  thread?: ThreadMessage[];
339
367
  /** Set by readEntities from which of the two scanned dirs the file came from, not the frontmatter. */
340
368
  archived?: boolean;
369
+ /** Frontmatter keys this paper-camp doesn't recognise, carried through verbatim so a
370
+ * write never drops a field a newer version wrote — see entityFrontmatterKnownKeys. */
371
+ unknownFrontmatter?: Record<string, unknown>;
341
372
  }
342
373
  export interface SuggestionEntry {
343
374
  date: string;
@@ -505,12 +536,16 @@ export interface CiReleaseState {
505
536
  releasedVersion: string | null;
506
537
  }
507
538
  export interface PaperCampConfig {
508
- version: string;
539
+ /** Corpus format version (see CORPUS_FORMAT_VERSION) — the shape this file and the
540
+ * entity frontmatter it sits alongside conform to, not the npm package version. */
541
+ version: number;
509
542
  projectName: string;
510
543
  initializedAt: string;
511
- /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */
544
+ /** The unified-entity `idea` counter, plus the `ticket` counter (IDEA-201); the
545
+ * per-kind plan counters are legacy, present only in pre-migration configs. */
512
546
  nextId?: Partial<Record<PlanKind, number>> & {
513
547
  idea?: number;
548
+ ticket?: number;
514
549
  };
515
550
  port?: number;
516
551
  defaultAgents?: DefaultAgentsMap;
@@ -556,6 +591,11 @@ export interface LoginRelayState {
556
591
  error?: string;
557
592
  }
558
593
  export type ServiceId = 'git' | 'gh' | `agent:${AgentId}`;
594
+ /** The two plugin extension points (IDEA-193): 'external' reaches another system on
595
+ * the user's behalf (GitHub today) with a remote-account credential; 'local' is a
596
+ * tool the runtime drives on the machine (git, an agent CLI) with its own local
597
+ * session, never a remote identity. */
598
+ export type PluginKind = 'external' | 'local';
559
599
  /** What a Connections row offers once its service isn't `ok` — copy a command, follow a link, or read plain instructions. */
560
600
  export type ConnectAction =
561
601
  /** `runnable` marks a command with no placeholders and no interactive prompts — safe for the server to execute directly instead of just displaying it. */
@@ -573,6 +613,7 @@ export type ConnectAction =
573
613
  };
574
614
  export interface ConnectionResult {
575
615
  id: ServiceId;
616
+ kind: PluginKind;
576
617
  label: string;
577
618
  unlocks: string;
578
619
  status: CapabilityStatus;
@@ -663,7 +704,7 @@ export type GitSyncResult = {
663
704
  ok: true;
664
705
  } | GitSyncFailure;
665
706
  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';
707
+ 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
708
  export interface TaskLogEntry {
668
709
  id: string;
669
710
  taskKind: TaskKind;
@@ -677,6 +718,9 @@ export interface TaskLogEntry {
677
718
  usage?: RunUsage;
678
719
  phaseRuns?: PhaseRunRecord[];
679
720
  rateLimit?: RateLimitSnapshot;
721
+ /** issue-fix only: the Issue.id (IDEA-192) this run was launched to fix, so a
722
+ * repeat failure's thread can be reconstructed by matching entries to the issue. */
723
+ issueId?: string;
680
724
  }
681
725
  export interface RunUsage {
682
726
  durationMs: number;
@@ -747,6 +791,7 @@ export interface AgentTaskState {
747
791
  prReviewUrl?: string;
748
792
  errorKind?: 'auth' | 'question';
749
793
  rateLimit?: RateLimitSnapshot;
794
+ issueId?: string;
750
795
  }
751
796
  export interface OverlapVerdict {
752
797
  verdict: 'existing' | 'extend' | 'new';
@@ -756,7 +801,9 @@ export interface OverlapVerdict {
756
801
  /** `why` carries one line per entry in `order`, same index — the reason for that id's placement. */
757
802
  export interface PrioritiseVerdict {
758
803
  order: string[];
759
- why: string;
804
+ /** One reason per `order` entry, same index. May be short if the agent
805
+ * under-supplied after a retry — callers fall back per missing index. */
806
+ why: string[];
760
807
  }
761
808
  export interface ReconcileQueueItem {
762
809
  planId: string;
@@ -766,4 +813,35 @@ export interface ReconcileQueueItem {
766
813
  phases: PhaseItem[];
767
814
  };
768
815
  }
816
+ /** The four failures IDEA-192 collects into one place: a failed agent run, a red
817
+ * project check, a PR review that requested changes, and a git rebase/sync failure. */
818
+ export type IssueSourceKind = 'agent-run' | 'check' | 'pr-review' | 'sync';
819
+ /** Derived from the world on every read, never a mark-read button — 'open' while a
820
+ * collector still finds the failure, 'closed' once it doesn't or the promoted fix
821
+ * that carries it ships. */
822
+ export type IssueStatus = 'open' | 'closed';
823
+ /** One collected failure (IDEA-192), read as a short thread. `id` is derived from
824
+ * `sourceKind` + `sourceKey`, so a repeat failure of the same thing resolves to the
825
+ * same issue and continues its thread instead of raising a duplicate. */
826
+ export interface Issue {
827
+ id: string;
828
+ sourceKind: IssueSourceKind;
829
+ /** Stable within `sourceKind` — a task's `planId`, a check's `name`, a PR's
830
+ * `number` + `headSha`, or a sync failure's branch + target ref. */
831
+ sourceKey: string;
832
+ entityId?: string;
833
+ entityTitle?: string;
834
+ title: string;
835
+ reason: string;
836
+ /** Last output lines, when the source captured any (a check's command output, a
837
+ * sync failure's conflicted files). */
838
+ output?: string;
839
+ /** Absent when the source carries no timestamp of its own (a live PR review decision). */
840
+ occurredAt?: string;
841
+ thread: ThreadMessage[];
842
+ status: IssueStatus;
843
+ /** Set once promoted — the id of whatever now carries the work. A promoted
844
+ * issue closes when that entity's status reaches 'done'. */
845
+ promotedFixId?: string;
846
+ }
769
847
  //# sourceMappingURL=index.d.ts.map