@dendelion/paper-camp 0.2.1 → 0.3.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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Re-exports from `schemas.ts` for backwards compatibility.
3
+ *
4
+ * This file is referenced by `papercamp/about.md` as the "single source of truth"
5
+ * for the frontmatter format. Keeping it as a thin barrel means existing docs/links
6
+ * don't break while the actual schemas live alongside their field-based counterparts
7
+ * in one file.
8
+ */
9
+ export { dateString, planFrontmatterSchema, ideaFrontmatterSchema, } from './schemas';
10
+ export type { PlanFrontmatter, IdeaFrontmatter } from './schemas';
11
+ //# sourceMappingURL=frontmatter-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontmatter-schemas.d.ts","sourceRoot":"","sources":["../../src/core/frontmatter-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=frontmatter.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontmatter.test.d.ts","sourceRoot":"","sources":["../../src/core/frontmatter.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { IdeaEntry, PlanEntry } from '../types/index';
2
+ /**
3
+ * Pure, no I/O — kept out of parser.ts so client-bundled importers (e.g.
4
+ * app-store.ts) don't pull in parser.ts's Node-only file-reading code.
5
+ */
6
+ export declare function deriveIdeaStatuses(ideas: IdeaEntry[], plans: PlanEntry[]): IdeaEntry[];
7
+ //# sourceMappingURL=idea-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"idea-status.d.ts","sourceRoot":"","sources":["../../src/core/idea-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAYtF"}
@@ -1,35 +1,54 @@
1
- import { A as e, P as r, a as n, b as i, c as t, d as o, e as p, f as E, g as d, h as S, i as l, j as m, k as P, l as A, o as c, p as f, m as y, n as I, q as N, r as _, s as g, t as u, u as D, v as T, w as h } from "../chunks/serializer.D1Ts_p8h.js";
2
- import { AGENT_IDS as v, AGENT_LABELS as C, DEFAULT_AGENTS as F, PLAN_KINDS as G, PLAN_STATUSES as O } from "../types/index.js";
1
+ import { A as e, P as r, a as n, b as t, c as i, d as o, e as l, f as d, g as p, h as m, i as P, j as E, k as S, l as c, m as f, n as A, o as F, p as I, q as g, r as N, s as h, t as y, u as T, v as _, w as C, x as D, y as O, z as u, B as L, C as x, D as G, E as v, F as M, G as Q, H as z, I as B, J as R, K as j, L as k, M as w, N as K, O as U } from "../chunks/serializer.DL7H4ZTd.js";
2
+ import { AGENT_IDS as q, AGENT_LABELS as H, AGENT_OPTIONS as J, DEFAULT_AGENTS as V, PLAN_KINDS as W, PLAN_STATUSES as X, coerceAgentConfig as Y } from "../types/index.js";
3
3
  export {
4
- v as AGENT_IDS,
5
- C as AGENT_LABELS,
4
+ q as AGENT_IDS,
5
+ H as AGENT_LABELS,
6
+ J as AGENT_OPTIONS,
6
7
  e as AlreadyInitializedError,
7
- F as DEFAULT_AGENTS,
8
+ V as DEFAULT_AGENTS,
8
9
  r as PAPER_CAMP_VERSION,
9
- G as PLAN_KINDS,
10
- O as PLAN_STATUSES,
11
- n as appendBlock,
10
+ W as PLAN_KINDS,
11
+ X as PLAN_STATUSES,
12
+ n as agentConfigSchema,
13
+ t as appendBlock,
12
14
  i as applyEnvEntries,
13
- t as assignPlanId,
14
- o as decisionFieldsSchema,
15
- p as deriveIdeaStatuses,
16
- E as findConsistencyIssues,
17
- d as formatDecisionEntry,
18
- S as formatOpenQuestionEntry,
19
- l as formatPlanEntry,
20
- m as formatPlans,
21
- P as formatProgressEntry,
22
- A as initProject,
23
- c as openQuestionFieldsSchema,
24
- f as paperCampConfigSchema,
25
- y as parseDecisions,
26
- I as parseEnv,
27
- N as parseIdeas,
28
- _ as parseOpenQuestions,
29
- g as parsePlans,
30
- u as parseProgress,
31
- D as parseRawEntries,
32
- T as planFieldsSchema,
33
- h as todayDateString
15
+ o as archivePlanFile,
16
+ l as assignPlanId,
17
+ Y as coerceAgentConfig,
18
+ d as dateString,
19
+ p as decisionFieldsSchema,
20
+ m as findConsistencyIssues,
21
+ P as formatDecisionEntry,
22
+ E as formatIdeaFile,
23
+ S as formatIdeasIndex,
24
+ c as formatOpenQuestionEntry,
25
+ f as formatOpenQuestions,
26
+ A as formatPlanEntry,
27
+ F as formatPlanFile,
28
+ I as formatPlans,
29
+ g as formatPlansIndex,
30
+ N as formatProgressEntry,
31
+ h as ideaFrontmatterSchema,
32
+ y as initProject,
33
+ T as openQuestionFieldsSchema,
34
+ _ as paperCampConfigSchema,
35
+ C as parseDecisions,
36
+ D as parseEnv,
37
+ O as parseFrontmatter,
38
+ u as parseIdeaFile,
39
+ L as parseIdeas,
40
+ x as parseOpenQuestions,
41
+ G as parsePlanFile,
42
+ v as parsePlans,
43
+ M as parseProgress,
44
+ Q as parseRawEntries,
45
+ z as planFieldsSchema,
46
+ B as planFrontmatterSchema,
47
+ R as readAllIdeaFiles,
48
+ j as readAllPlanFiles,
49
+ k as readIdeasMerged,
50
+ w as readPlansMerged,
51
+ K as serializeFrontmatter,
52
+ U as todayDateString
34
53
  };
35
54
  //# sourceMappingURL=index.js.map
@@ -1,16 +1,61 @@
1
- import { ConsistencyIssue, DecisionEntry, IdeaEntry, OpenQuestionEntry, ParseResult, PlanEntry, ProgressEntry, RawEntry } from '../types/index';
1
+ import { z } from 'zod';
2
+ import { ConsistencyIssue, DecisionEntry, IdeaEntry, OpenQuestionEntry, ParseResult, ParseWarning, PlanEntry, ProgressEntry, RawEntry } from '../types/index';
2
3
  export declare function parseRawEntries(markdown: string): RawEntry[];
3
4
  export declare function parsePlans(markdown: string): ParseResult<PlanEntry>;
4
5
  export declare function parseDecisions(markdown: string): ParseResult<DecisionEntry>;
5
6
  export declare function parseOpenQuestions(markdown: string): ParseResult<OpenQuestionEntry>;
7
+ /**
8
+ * Extracts and validates YAML frontmatter from a markdown string.
9
+ * Returns the parsed data + body without warnings on success.
10
+ * Returns partial data + warnings when frontmatter is absent, malformed,
11
+ * or fails schema validation — never throws.
12
+ */
13
+ export declare function parseFrontmatter<T>(content: string, schema: z.ZodType<T>): {
14
+ data: T | null;
15
+ body: string;
16
+ warnings: ParseWarning[];
17
+ };
18
+ /**
19
+ * Parse a single per-plan file with YAML frontmatter.
20
+ * The body after frontmatter is scanned for ### Phases and ### Log sections,
21
+ * same as the monolithic parser.
22
+ */
23
+ export declare function parsePlanFile(content: string): ParseResult<PlanEntry>;
24
+ /**
25
+ * Parse a single per-idea file with YAML frontmatter.
26
+ */
27
+ export declare function parseIdeaFile(content: string): ParseResult<IdeaEntry>;
6
28
  /** ideas.md is split into sections by `---` separators. Each section has an optional
7
- * `### IDEA-N:` heading prefix followed by a short title, and a prose body. */
29
+ * `## IDEA-N:` heading prefix followed by a short title, and a prose body. */
8
30
  export declare function parseIdeas(markdown: string): IdeaEntry[];
9
- export declare function deriveIdeaStatuses(ideas: IdeaEntry[], plans: PlanEntry[]): IdeaEntry[];
10
31
  /** Read-only cross-reference checks over already-parsed decisions/open-questions/plans —
11
32
  * dangling `resolved-by`/`superseded-by` titles, and open questions blocking an
12
33
  * already-active plan. */
13
34
  export declare function findConsistencyIssues(decisions: DecisionEntry[], openQuestions: OpenQuestionEntry[], plans: PlanEntry[]): ConsistencyIssue[];
14
- /** progress.md is an append-only date log, not a record-based file — no fields, no validation. */
35
+ /**
36
+ * Reads all per-file plans from a directory, including its `archive/` subdirectory
37
+ * (done/dropped plans live there — see core/serializer.ts's archive move). Excludes
38
+ * index.md in either directory.
39
+ * Returns empty result if the directory doesn't exist or has no plan files.
40
+ */
41
+ export declare function readAllPlanFiles(plansDir: string): Promise<ParseResult<PlanEntry> & {
42
+ fileCount: number;
43
+ }>;
44
+ /**
45
+ * Reads all per-file ideas from a directory (non-recursive, excludes index.md).
46
+ */
47
+ export declare function readAllIdeaFiles(ideasDir: string): Promise<ParseResult<IdeaEntry> & {
48
+ fileCount: number;
49
+ }>;
50
+ /**
51
+ * Merges per-file plan entries with monolithic fallback, deduplicating by id/title.
52
+ * Per-file entries take precedence; any plan in per-file that also exists in
53
+ * the monolithic file is only included once (per-file version wins).
54
+ */
55
+ export declare function readPlansMerged(plansDir: string, monolithicPath: string): Promise<ParseResult<PlanEntry>>;
56
+ /**
57
+ * Merges per-file idea entries with monolithic fallback, deduplicating by id.
58
+ */
59
+ export declare function readIdeasMerged(ideasDir: string, monolithicPath: string): Promise<ParseResult<IdeaEntry>>;
15
60
  export declare function parseProgress(markdown: string): ProgressEntry[];
16
61
  //# sourceMappingURL=parser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/core/parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,SAAS,EAET,iBAAiB,EACjB,WAAW,EAEX,SAAS,EACT,aAAa,EACb,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAgHxB,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAwC5D;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAqCnE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,aAAa,CAAC,CAwB3E;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,iBAAiB,CAA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intent?: string;
8
8
  }
9
9
  /**
10
- * Scaffolds .paper-camp/config.json and papercamp/*.md. Never overwrites existing
11
- * files a project's memory is never something `init` should clobber.
10
+ * Scaffolds papercamp/config.json and papercamp/ directory structure.
11
+ * Creates per-file plan/idea directories and index files, plus monolithic
12
+ * files for the remaining sections (progress, decisions, open-questions).
13
+ * Never overwrites existing files.
12
14
  */
13
15
  export declare function initProject(targetDir: string, options: InitOptions): Promise<void>;
14
16
  //# sourceMappingURL=scaffold.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/core/scaffold.ts"],"names":[],"mappings":"AAKA,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;;;GAGG;AACH,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCxF"}
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/core/scaffold.ts"],"names":[],"mappings":"AAKA,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;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgDxF"}
@@ -1,4 +1,13 @@
1
1
  import { z } from 'zod';
2
+ export declare const agentConfigSchema: z.ZodPreprocess<z.ZodObject<{
3
+ agent: z.ZodEnum<{
4
+ "claude-code": "claude-code";
5
+ opencode: "opencode";
6
+ }>;
7
+ model: z.ZodOptional<z.ZodString>;
8
+ effort: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>>;
10
+ export declare const dateString: z.ZodString;
2
11
  export declare const planFieldsSchema: z.ZodObject<{
3
12
  status: z.ZodEnum<{
4
13
  idea: "idea";
@@ -42,6 +51,38 @@ export declare const openQuestionFieldsSchema: z.ZodObject<{
42
51
  'resolved-by': z.ZodOptional<z.ZodString>;
43
52
  blocks: z.ZodOptional<z.ZodString>;
44
53
  }, z.core.$strip>;
54
+ export declare const planFrontmatterSchema: z.ZodObject<{
55
+ id: z.ZodString;
56
+ title: z.ZodString;
57
+ kind: z.ZodEnum<{
58
+ feat: "feat";
59
+ fix: "fix";
60
+ chore: "chore";
61
+ docs: "docs";
62
+ refactor: "refactor";
63
+ }>;
64
+ status: z.ZodEnum<{
65
+ idea: "idea";
66
+ planned: "planned";
67
+ "in-progress": "in-progress";
68
+ review: "review";
69
+ done: "done";
70
+ dropped: "dropped";
71
+ }>;
72
+ idea: z.ZodOptional<z.ZodString>;
73
+ agent: z.ZodOptional<z.ZodEnum<{
74
+ "claude-code": "claude-code";
75
+ opencode: "opencode";
76
+ }>>;
77
+ created: z.ZodString;
78
+ updated: z.ZodOptional<z.ZodString>;
79
+ audited: z.ZodOptional<z.ZodString>;
80
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
81
+ }, z.core.$strip>;
82
+ export declare const ideaFrontmatterSchema: z.ZodObject<{
83
+ id: z.ZodString;
84
+ title: z.ZodString;
85
+ }, z.core.$strip>;
45
86
  export declare const paperCampConfigSchema: z.ZodObject<{
46
87
  version: z.ZodString;
47
88
  projectName: z.ZodString;
@@ -58,21 +99,43 @@ export declare const paperCampConfigSchema: z.ZodObject<{
58
99
  opencode: "opencode";
59
100
  }>>;
60
101
  defaultAgents: z.ZodOptional<z.ZodObject<{
61
- phase: z.ZodEnum<{
62
- "claude-code": "claude-code";
63
- opencode: "opencode";
64
- }>;
65
- planDraft: z.ZodEnum<{
66
- "claude-code": "claude-code";
67
- opencode: "opencode";
68
- }>;
69
- ideaExtend: z.ZodEnum<{
70
- "claude-code": "claude-code";
71
- opencode: "opencode";
72
- }>;
102
+ phase: z.ZodPreprocess<z.ZodObject<{
103
+ agent: z.ZodEnum<{
104
+ "claude-code": "claude-code";
105
+ opencode: "opencode";
106
+ }>;
107
+ model: z.ZodOptional<z.ZodString>;
108
+ effort: z.ZodOptional<z.ZodString>;
109
+ }, z.core.$strip>>;
110
+ planDraft: z.ZodPreprocess<z.ZodObject<{
111
+ agent: z.ZodEnum<{
112
+ "claude-code": "claude-code";
113
+ opencode: "opencode";
114
+ }>;
115
+ model: z.ZodOptional<z.ZodString>;
116
+ effort: z.ZodOptional<z.ZodString>;
117
+ }, z.core.$strip>>;
118
+ ideaExtend: z.ZodPreprocess<z.ZodObject<{
119
+ agent: z.ZodEnum<{
120
+ "claude-code": "claude-code";
121
+ opencode: "opencode";
122
+ }>;
123
+ model: z.ZodOptional<z.ZodString>;
124
+ effort: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strip>>;
126
+ commitSuggest: z.ZodPreprocess<z.ZodObject<{
127
+ agent: z.ZodEnum<{
128
+ "claude-code": "claude-code";
129
+ opencode: "opencode";
130
+ }>;
131
+ model: z.ZodOptional<z.ZodString>;
132
+ effort: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strip>>;
73
134
  }, z.core.$strip>>;
74
135
  }, z.core.$strip>;
75
136
  export type PlanFields = z.infer<typeof planFieldsSchema>;
76
137
  export type DecisionFields = z.infer<typeof decisionFieldsSchema>;
77
138
  export type OpenQuestionFields = z.infer<typeof openQuestionFieldsSchema>;
139
+ export type PlanFrontmatter = z.infer<typeof planFrontmatterSchema>;
140
+ export type IdeaFrontmatter = z.infer<typeof ideaFrontmatterSchema>;
78
141
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","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AAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- import { LogEntry, PhaseItem } from '../types/index';
1
+ import { IdeaEntry, LogEntry, PhaseItem, PlanEntry } from '../types/index';
2
2
  export declare function todayDateString(): string;
3
3
  /**
4
- * Mints the next `<KIND>-<N>` plan ID from the persistent counter in `.paper-camp/config.json`,
4
+ * Mints the next `<KIND>-<N>` plan ID from the persistent counter in `papercamp/config.json`,
5
5
  * incrementing and writing it back. Calls are chained through a module-level promise so two
6
6
  * near-simultaneous calls within this process never read the same counter value and mint a
7
7
  * duplicate ID — this does not protect against a concurrent call from a separate process (e.g.
@@ -45,7 +45,57 @@ export declare function formatOpenQuestionEntry(input: NewOpenQuestionInput): st
45
45
  export declare function formatProgressEntry(date: string, items: string[]): string;
46
46
  /** Serializes an array of plan entries back to a plans.md file. */
47
47
  export declare function formatPlans(entries: NewPlanInput[]): string;
48
+ /** Serializes an array of open-question entries back to an open-questions.md file. */
49
+ export declare function formatOpenQuestions(entries: NewOpenQuestionInput[]): string;
48
50
  /** Appends a pre-formatted block to a papercamp file, separated by a single blank line. */
49
51
  export declare function appendBlock(filePath: string, block: string): Promise<void>;
52
+ export declare function serializeFrontmatter(data: Record<string, unknown>): string;
53
+ interface NewPlanFileInput {
54
+ id: string;
55
+ title: string;
56
+ kind: string;
57
+ status: string;
58
+ idea?: string;
59
+ agent?: string;
60
+ created: string;
61
+ updated?: string;
62
+ audited?: string;
63
+ tags?: string[];
64
+ body?: string;
65
+ phases?: PhaseItem[];
66
+ log?: LogEntry[];
67
+ clarifications?: LogEntry[];
68
+ }
69
+ /**
70
+ * Serializes a plan entry as a standalone file with YAML frontmatter.
71
+ * Output format:
72
+ * ---
73
+ * id: FEAT-24
74
+ * kind: feat
75
+ * ...
76
+ * ---
77
+ * body...
78
+ *
79
+ * ### Phases
80
+ * ...
81
+ */
82
+ export declare function formatPlanFile(input: NewPlanFileInput): string;
83
+ interface NewIdeaFileInput {
84
+ id: string;
85
+ title: string;
86
+ body?: string;
87
+ }
88
+ /**
89
+ * Serializes an idea entry as a standalone file with YAML frontmatter.
90
+ */
91
+ export declare function formatIdeaFile(input: NewIdeaFileInput): string;
92
+ /**
93
+ * Moves a per-file plan from papercamp/plans/<id>.md to papercamp/plans/archive/<id>.md.
94
+ * This is a pure file move — no parse-and-re-serialize step.
95
+ * Returns true if the file was moved, false if no per-file exists for this plan.
96
+ */
97
+ export declare function archivePlanFile(root: string, planId: string): Promise<boolean>;
98
+ export declare function formatPlansIndex(entries: PlanEntry[]): string;
99
+ export declare function formatIdeasIndex(ideas: IdeaEntry[]): string;
50
100
  export {};
51
101
  //# sourceMappingURL=serializer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../src/core/serializer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAID;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmBhG;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAA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;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAiD9D;AAED,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAW9D;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAepF;AAMD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAgB7D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,MAAM,CAgB3D"}
@@ -43,6 +43,7 @@ export interface PlanEntry {
43
43
  agent?: AgentId;
44
44
  created: string;
45
45
  updated?: string;
46
+ audited?: string;
46
47
  tags: string[];
47
48
  body: string;
48
49
  phases: PhaseItem[];
@@ -87,10 +88,25 @@ export interface EnvEntry {
87
88
  key: string;
88
89
  value: string;
89
90
  }
91
+ export interface AgentConfig {
92
+ agent: AgentId;
93
+ model?: string;
94
+ effort?: string;
95
+ }
96
+ /** Model/effort passed to an adapter's buildArgs — the AgentConfig minus the agent id. */
97
+ export interface AgentRunOptions {
98
+ model?: string;
99
+ effort?: string;
100
+ }
101
+ /** Maps option names to a fixed value list (renders a Select) or null (free-text or hidden). */
102
+ export type AgentOptionsDescriptor = Record<string, string[] | null | undefined>;
103
+ export declare const AGENT_OPTIONS: Record<AgentId, AgentOptionsDescriptor>;
104
+ export declare function coerceAgentConfig(v: unknown): AgentConfig;
90
105
  export interface DefaultAgentsMap {
91
- phase: AgentId;
92
- planDraft: AgentId;
93
- ideaExtend: AgentId;
106
+ phase: AgentConfig;
107
+ planDraft: AgentConfig;
108
+ ideaExtend: AgentConfig;
109
+ commitSuggest: AgentConfig;
94
110
  }
95
111
  export declare const DEFAULT_AGENTS: DefaultAgentsMap;
96
112
  export interface PaperCampConfig {
@@ -112,13 +128,15 @@ export interface GitStatusEntry {
112
128
  path: string;
113
129
  status: string;
114
130
  staged: boolean;
131
+ renameSource?: string;
115
132
  }
116
133
  export interface GitStatusResponse {
117
134
  branch: string;
118
135
  entries: GitStatusEntry[];
136
+ ahead: number;
119
137
  }
120
138
  export type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error';
121
- export type TaskKind = 'phase' | 'audit' | 'draft' | 'extend';
139
+ export type TaskKind = 'phase' | 'audit' | 'batch-audit' | 'draft' | 'extend' | 'commit-suggest';
122
140
  export interface AgentTaskState {
123
141
  status: AgentTaskStatus;
124
142
  taskKind: TaskKind;
@@ -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,MAAM,cAAc,GAAG,SAAS,GAAG,YAAY,CAAC;AAEtD,MAAM,MAAM,cAAc,G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AM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB"}
@@ -1,23 +1,45 @@
1
- const e = [
1
+ const c = [
2
2
  "idea",
3
3
  "planned",
4
4
  "in-progress",
5
5
  "review",
6
6
  "done",
7
7
  "dropped"
8
- ], o = ["feat", "fix", "chore", "docs", "refactor"], d = ["claude-code", "opencode"], c = {
8
+ ], a = ["feat", "fix", "chore", "docs", "refactor"], d = ["claude-code", "opencode"], r = {
9
9
  "claude-code": "Claude Code",
10
10
  opencode: "OpenCode"
11
- }, n = {
12
- phase: "opencode",
13
- planDraft: "claude-code",
14
- ideaExtend: "claude-code"
11
+ }, l = {
12
+ "claude-code": {
13
+ model: ["opus", "sonnet", "fable", "haiku"],
14
+ effort: ["low", "medium", "high", "xhigh", "max"]
15
+ },
16
+ opencode: {
17
+ model: null
18
+ }
19
+ };
20
+ function f(o) {
21
+ const n = (t) => d.includes(t) ? t : "claude-code";
22
+ if (typeof o == "string") return { agent: n(o) };
23
+ const e = o ?? {};
24
+ return {
25
+ agent: n(e.agent),
26
+ ...typeof e.model == "string" && { model: e.model },
27
+ ...typeof e.effort == "string" && { effort: e.effort }
28
+ };
29
+ }
30
+ const s = {
31
+ phase: { agent: "opencode" },
32
+ planDraft: { agent: "claude-code" },
33
+ ideaExtend: { agent: "claude-code" },
34
+ commitSuggest: { agent: "claude-code" }
15
35
  };
16
36
  export {
17
37
  d as AGENT_IDS,
18
- c as AGENT_LABELS,
19
- n as DEFAULT_AGENTS,
20
- o as PLAN_KINDS,
21
- e as PLAN_STATUSES
38
+ r as AGENT_LABELS,
39
+ l as AGENT_OPTIONS,
40
+ s as DEFAULT_AGENTS,
41
+ a as PLAN_KINDS,
42
+ c as PLAN_STATUSES,
43
+ f as coerceAgentConfig
22
44
  };
23
45
  //# 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 type DecisionStatus = 'decided' | 'superseded';\n\nexport type QuestionStatus = 'open' | 'resolved';\n\nexport interface PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review';\n}\n\n/** Raw shape produced by the generic heading-block parser, before per-file validation. */\nexport interface RawEntry {\n title: string;\n fields: Record<string, string>;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: 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\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 tags: string[];\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n}\n\nexport interface DecisionEntry {\n title: string;\n date: string;\n status: DecisionStatus;\n supersededBy?: string;\n body: string;\n}\n\nexport interface OpenQuestionEntry {\n title: string;\n status: QuestionStatus;\n raised: string;\n resolvedBy?: string;\n blocks?: string;\n body: string;\n}\n\nexport type ConsistencyIssueKind =\n | 'dangling-resolved-by'\n | 'dangling-superseded-by'\n | 'blocked-plan-active';\n\nexport interface ConsistencyIssue {\n kind: ConsistencyIssueKind;\n section: 'decisions' | 'open-questions';\n title: string;\n message: string;\n planId?: string;\n}\n\nexport type IdeaStatus = 'planned' | 'done';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n status?: IdeaStatus;\n}\n\nexport interface ProgressEntry {\n date: string;\n items: string[];\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\n}\n\nexport interface DefaultAgentsMap {\n phase: AgentId;\n planDraft: AgentId;\n ideaExtend: AgentId;\n}\n\nexport const DEFAULT_AGENTS: DefaultAgentsMap = {\n phase: 'opencode',\n planDraft: 'claude-code',\n ideaExtend: 'claude-code',\n};\n\nexport interface PaperCampConfig {\n version: string;\n projectName: string;\n initializedAt: string;\n nextId?: Record<PlanKind, number>;\n port?: number;\n defaultAgents?: DefaultAgentsMap;\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';\n\nexport interface GitStatusEntry {\n path: string;\n status: string;\n staged: boolean;\n}\n\nexport interface GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n}\n\nexport type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error';\n\nexport type TaskKind = 'phase' | 'audit' | 'draft' | 'extend';\n\nexport interface AgentTaskState {\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n planId?: string;\n phaseIndex?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n}\n"],"names":["PLAN_STATUSES","PLAN_KINDS","AGENT_IDS","AGENT_LABELS","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,GAwGaC,IAAmC;AAAA,EAC9C,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AACd;"}
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 type DecisionStatus = 'decided' | 'superseded';\n\nexport type QuestionStatus = 'open' | 'resolved';\n\nexport interface PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review';\n}\n\n/** Raw shape produced by the generic heading-block parser, before per-file validation. */\nexport interface RawEntry {\n title: string;\n fields: Record<string, string>;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: 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\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 tags: string[];\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n}\n\nexport interface DecisionEntry {\n title: string;\n date: string;\n status: DecisionStatus;\n supersededBy?: string;\n body: string;\n}\n\nexport interface OpenQuestionEntry {\n title: string;\n status: QuestionStatus;\n raised: string;\n resolvedBy?: string;\n blocks?: string;\n body: string;\n}\n\nexport type ConsistencyIssueKind =\n | 'dangling-resolved-by'\n | 'dangling-superseded-by'\n | 'blocked-plan-active';\n\nexport interface ConsistencyIssue {\n kind: ConsistencyIssueKind;\n section: 'decisions' | 'open-questions';\n title: string;\n message: string;\n planId?: string;\n}\n\nexport type IdeaStatus = 'planned' | 'done';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n status?: IdeaStatus;\n}\n\nexport interface ProgressEntry {\n date: string;\n items: string[];\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\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 // Tolerate null/undefined and partial legacy entries — a missing key must not\n // throw (that would 500 the /api/config read this coercion exists to protect).\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 nextId?: Record<PlanKind, number>;\n port?: number;\n defaultAgents?: DefaultAgentsMap;\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';\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}\n\nexport type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error';\n\nexport type TaskKind = 'phase' | 'audit' | 'batch-audit' | 'draft' | 'extend' | 'commit-suggest';\n\nexport interface AgentTaskState {\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n planId?: string;\n phaseIndex?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\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,GAkHaC,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;AAGpD,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;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dendelion/paper-camp",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Local-first, AI-native project management with retro aesthetics",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.12.1",
@@ -56,6 +56,7 @@
56
56
  "commander": "^12.0.0",
57
57
  "framer-motion": "^12.40.0",
58
58
  "react-markdown": "^10.1.0",
59
+ "yaml": "^2.9.0",
59
60
  "zod": "^4.4.3",
60
61
  "zustand": "^4.5.0"
61
62
  },