@dendelion/paper-camp 0.7.0 → 0.8.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.
- package/dist/app/assets/index-CF8jC3IN.js +2 -0
- package/dist/app/assets/index-CF8jC3IN.js.map +1 -0
- package/dist/app/assets/index-DGXi8vpJ.js +2 -0
- package/dist/app/assets/index-DGXi8vpJ.js.map +1 -0
- package/dist/app/assets/main-D66GnCKz.css +1 -0
- package/dist/app/assets/main-DJDNx4Xs.js +218 -0
- package/dist/app/assets/main-DJDNx4Xs.js.map +1 -0
- package/dist/app/assets/sidebar-section-C2j12TzE.js +2 -0
- package/dist/app/assets/sidebar-section-C2j12TzE.js.map +1 -0
- package/dist/app/img/paper-logo.png +0 -0
- package/dist/app/img/paper-logo.svg +7 -0
- package/dist/app/index.html +7 -3
- package/dist/app/manifest.json +13 -0
- package/dist/chunks/{serializer.DiYtNSka.js → serializer.BfH7zTwv.js} +1767 -1395
- package/dist/chunks/serializer.BfH7zTwv.js.map +1 -0
- package/dist/cli/index.js +6501 -6167
- package/dist/cli/index.js.map +1 -1
- package/dist/core/git-pr/branch.d.ts.map +1 -0
- package/dist/core/git-pr/index.d.ts +4 -0
- package/dist/core/git-pr/index.d.ts.map +1 -0
- package/dist/core/git-pr/pr-lookup.d.ts +57 -0
- package/dist/core/git-pr/pr-lookup.d.ts.map +1 -0
- package/dist/core/git-pr/pr.d.ts +101 -0
- package/dist/core/git-pr/pr.d.ts.map +1 -0
- package/dist/core/{pr.test.d.ts.map → git-pr/pr.test.d.ts.map} +1 -1
- package/dist/core/git-pr/scopes.d.ts +8 -0
- package/dist/core/git-pr/scopes.d.ts.map +1 -0
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +76 -55
- package/dist/core/parse/entity.test.d.ts.map +1 -0
- package/dist/core/parse/frontmatter-schemas.d.ts.map +1 -0
- package/dist/core/parse/frontmatter.test.d.ts.map +1 -0
- package/dist/core/parse/index.d.ts +3 -0
- package/dist/core/parse/index.d.ts.map +1 -0
- package/dist/core/{parser.d.ts → parse/parser.d.ts} +16 -11
- package/dist/core/parse/parser.d.ts.map +1 -0
- package/dist/core/parse/parser.test.d.ts.map +1 -0
- package/dist/core/parse/schemas.d.ts.map +1 -0
- package/dist/core/readers.d.ts +8 -0
- package/dist/core/readers.d.ts.map +1 -1
- package/dist/core/scaffold/index.d.ts +3 -0
- package/dist/core/scaffold/index.d.ts.map +1 -0
- package/dist/core/scaffold/scaffold.d.ts.map +1 -0
- package/dist/core/scaffold/scaffold.test.d.ts.map +1 -0
- package/dist/core/scaffold/templates.d.ts.map +1 -0
- package/dist/core/{content-hash.d.ts → serialize/content-hash.d.ts} +1 -1
- package/dist/core/serialize/content-hash.d.ts.map +1 -0
- package/dist/core/serialize/content-hash.test.d.ts.map +1 -0
- package/dist/core/serialize/index.d.ts +3 -0
- package/dist/core/serialize/index.d.ts.map +1 -0
- package/dist/core/{serializer.d.ts → serialize/serializer.d.ts} +19 -7
- package/dist/core/serialize/serializer.d.ts.map +1 -0
- package/dist/core/status/index.d.ts +2 -0
- package/dist/core/status/index.d.ts.map +1 -0
- package/dist/core/{status.d.ts → status/status.d.ts} +4 -4
- package/dist/core/status/status.d.ts.map +1 -0
- package/dist/core/status/status.test.d.ts.map +1 -0
- package/dist/img/paper-logo.png +0 -0
- package/dist/img/paper-logo.svg +7 -0
- package/dist/manifest.json +13 -0
- package/dist/types/index.d.ts +45 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +7 -2
- package/dist/app/assets/main-5JSkR2Qf.js +0 -182
- package/dist/app/assets/main-5JSkR2Qf.js.map +0 -1
- package/dist/app/assets/main-B8HU5n_F.css +0 -1
- package/dist/chunks/serializer.DiYtNSka.js.map +0 -1
- package/dist/core/branch.d.ts.map +0 -1
- package/dist/core/content-hash.d.ts.map +0 -1
- package/dist/core/content-hash.test.d.ts.map +0 -1
- package/dist/core/entity.test.d.ts.map +0 -1
- package/dist/core/frontmatter-schemas.d.ts.map +0 -1
- package/dist/core/frontmatter.test.d.ts.map +0 -1
- package/dist/core/parser.d.ts.map +0 -1
- package/dist/core/parser.test.d.ts.map +0 -1
- package/dist/core/pr.d.ts +0 -27
- package/dist/core/pr.d.ts.map +0 -1
- package/dist/core/scaffold.d.ts.map +0 -1
- package/dist/core/scaffold.test.d.ts.map +0 -1
- package/dist/core/schemas.d.ts.map +0 -1
- package/dist/core/serializer.d.ts.map +0 -1
- package/dist/core/status.d.ts.map +0 -1
- package/dist/core/status.test.d.ts.map +0 -1
- package/dist/core/templates.d.ts.map +0 -1
- /package/dist/core/{branch.d.ts → git-pr/branch.d.ts} +0 -0
- /package/dist/core/{pr.test.d.ts → git-pr/pr.test.d.ts} +0 -0
- /package/dist/core/{entity.test.d.ts → parse/entity.test.d.ts} +0 -0
- /package/dist/core/{frontmatter-schemas.d.ts → parse/frontmatter-schemas.d.ts} +0 -0
- /package/dist/core/{frontmatter.test.d.ts → parse/frontmatter.test.d.ts} +0 -0
- /package/dist/core/{parser.test.d.ts → parse/parser.test.d.ts} +0 -0
- /package/dist/core/{schemas.d.ts → parse/schemas.d.ts} +0 -0
- /package/dist/core/{scaffold.d.ts → scaffold/scaffold.d.ts} +0 -0
- /package/dist/core/{scaffold.test.d.ts → scaffold/scaffold.test.d.ts} +0 -0
- /package/dist/core/{templates.d.ts → scaffold/templates.d.ts} +0 -0
- /package/dist/core/{content-hash.test.d.ts → serialize/content-hash.test.d.ts} +0 -0
- /package/dist/core/{status.test.d.ts → status/status.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/branch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PrInfo, ReviewThread } from '../../types/index';
|
|
2
|
+
/**
|
|
3
|
+
* The entity id a PR references — its `**Plan:** \`IDEA-N\`` body line (stamped
|
|
4
|
+
* by draft-pr.yml), falling back to the `feat/idea-N-…` id prefix of its head
|
|
5
|
+
* branch. Both key off the stable id, never the title, so a renamed entity's PR
|
|
6
|
+
* still resolves. Shared by the row-level index (`prEntityId`) and the
|
|
7
|
+
* single-ref lookup (`resolvePlanForPrRef` in `pr.ts`).
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveEntityIdFromPrRef(body: string | null | undefined, branch: string | null | undefined): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Splits a PR's `html_url` into the owner/repo/number a `gh api graphql` call
|
|
12
|
+
* needs. Also used by `pr.ts`'s consistency-comment sync to build the REST
|
|
13
|
+
* PATCH endpoint for editing an existing sticky comment.
|
|
14
|
+
*/
|
|
15
|
+
export declare function parsePrUrl(url: string): {
|
|
16
|
+
owner: string;
|
|
17
|
+
repo: string;
|
|
18
|
+
number: string;
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* Per-comment detail for a PR's unresolved review threads, for the fix-review
|
|
22
|
+
* launch path (`POST /api/agent/launch-fix-review`) to hand to
|
|
23
|
+
* `buildFixReviewPrompt`. Each thread is represented by its first comment, since
|
|
24
|
+
* that's the one that states what needs fixing. Best-effort: resolves `[]` on
|
|
25
|
+
* any failure so a launch with no readable threads falls back to
|
|
26
|
+
* `buildFixReviewPrompt`'s own empty-threads guard rather than erroring out.
|
|
27
|
+
*/
|
|
28
|
+
export declare function fetchUnresolvedThreads(root: string, url: string): Promise<ReviewThread[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Marks a review thread resolved. Called once the fix that addresses it is
|
|
31
|
+
* actually pushed (see the git push route) — resolving earlier would mark the
|
|
32
|
+
* thread done against code the PR can't see yet. Best-effort: returns false on
|
|
33
|
+
* any failure rather than throwing, since a failed resolve must not fail a push.
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveReviewThread(root: string, threadId: string): Promise<boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* Posts a reply on a review thread — used to record why the agent deliberately
|
|
38
|
+
* skipped a comment, so a rejected suggestion reads as a reasoned decision
|
|
39
|
+
* rather than silence. Best-effort, same as resolveReviewThread.
|
|
40
|
+
*/
|
|
41
|
+
export declare function replyToReviewThread(root: string, threadId: string, body: string): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Every PR in the repo indexed by the entity id it references, resolved via a
|
|
44
|
+
* single `gh pr list` and cached for `ttlMs`, feeding `core/status.ts`'s
|
|
45
|
+
* PR-driven status derivation. `undefined` when the lookup can't resolve at
|
|
46
|
+
* all (no `gh`, not authenticated, offline, no GitHub remote); callers fall
|
|
47
|
+
* back to stored status.
|
|
48
|
+
* An entity simply absent from the returned map has no PR (a confirmed answer).
|
|
49
|
+
*/
|
|
50
|
+
export declare function resolvePrsByEntity(root: string, ttlMs?: number): Promise<Map<string, PrInfo> | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* Clears the module-level PR cache. Used by the manual refresh route
|
|
53
|
+
* (`POST /api/refresh`) so a user-triggered refresh re-resolves PR/review state
|
|
54
|
+
* instead of replaying the TTL window, and by tests to isolate cases.
|
|
55
|
+
*/
|
|
56
|
+
export declare function clearPrCache(): void;
|
|
57
|
+
//# sourceMappingURL=pr-lookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-lookup.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/pr-lookup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAkB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAmD9E;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM,GAAG,IAAI,CAKf;AA8BD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAK9F;AAyID;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAkB/F;AAgBD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK1F;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAKlB;AAiFD;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,KAAK,SAAkB,GACtB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,CAS1C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ConsistencyIssue, EntityType, PhaseItem } from '../../types/index';
|
|
2
|
+
export { clearPrCache, fetchUnresolvedThreads, replyToReviewThread, resolvePrsByEntity, resolveReviewThread, } from './pr-lookup';
|
|
3
|
+
/** The fields later Scout workflows need to mirror a plan onto its PR. */
|
|
4
|
+
export interface ResolvedPlanForPr {
|
|
5
|
+
id: string;
|
|
6
|
+
kind?: EntityType;
|
|
7
|
+
tags: string[];
|
|
8
|
+
phases: PhaseItem[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolves the plan a PR (given by number or branch) mirrors, and parses
|
|
12
|
+
* `papercamp/ideas/<ID>.md` for the fields the mirroring workflows need. `ref`
|
|
13
|
+
* is passed straight to `gh pr view`, so both a PR number and a branch name
|
|
14
|
+
* work; when no PR exists yet for a branch, falls back to reading the plan id
|
|
15
|
+
* out of the branch name itself (same convention `draft-pr.yml` uses to name
|
|
16
|
+
* the PR in the first place). Returns `undefined` when the id can't be
|
|
17
|
+
* resolved at all, or when it doesn't match a file under `papercamp/ideas/`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolvePlanForPrRef(root: string, ref: string): Promise<ResolvedPlanForPr | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* Renders a plan's `### Phases` as a GitHub task-list checklist and
|
|
22
|
+
* inserts/replaces it in a PR body between marker comments, leaving
|
|
23
|
+
* everything else — notably the `**Plan:**` line `draft-pr.yml` stamps — untouched.
|
|
24
|
+
* Idempotent: the same `phases` always renders the same section text, so a
|
|
25
|
+
* caller can compare the result to the current body and skip the `gh pr edit`
|
|
26
|
+
* call when nothing changed.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderPlanPhasesIntoBody(body: string, phases: PhaseItem[]): string;
|
|
29
|
+
export type SyncPlanPhasesResult = 'updated' | 'unchanged' | 'unresolved';
|
|
30
|
+
/**
|
|
31
|
+
* On push to a plan branch: rewrites the PR body's phases checklist to match
|
|
32
|
+
* `### Phases` in the plan file, preserving the `**Plan:**` line and
|
|
33
|
+
* everything else. Only calls `gh pr edit` when the rendered body actually
|
|
34
|
+
* differs from the PR's current body, so rerunning on an unchanged plan is a
|
|
35
|
+
* no-op — the idempotency `renderPlanPhasesIntoBody` makes possible.
|
|
36
|
+
*/
|
|
37
|
+
export declare function syncPlanPhasesToPr(root: string, ref: string): Promise<SyncPlanPhasesResult>;
|
|
38
|
+
/**
|
|
39
|
+
* The labels a PR should carry for a plan: its `kind` (feat/fix/…, the
|
|
40
|
+
* type-enum values) plus whichever `tags` are also recognized commit scopes
|
|
41
|
+
* (`COMMIT_SCOPES` — the same area vocabulary `.commitlintrc.json`'s
|
|
42
|
+
* `scope-enum` uses), so free-form tags that aren't area names don't leak
|
|
43
|
+
* into GitHub labels. Order-stable and de-duped.
|
|
44
|
+
*/
|
|
45
|
+
export declare function derivePrLabels(plan: Pick<ResolvedPlanForPr, 'kind' | 'tags'>): string[];
|
|
46
|
+
export type SyncPrLabelsResult = 'updated' | 'unchanged' | 'unresolved';
|
|
47
|
+
/**
|
|
48
|
+
* On push to a plan branch: applies the labels `derivePrLabels` derives from
|
|
49
|
+
* the plan's `kind`/`tags`, creating any that don't exist in the repo yet.
|
|
50
|
+
* Additive only — a label already on the PR (human-added or from a previous
|
|
51
|
+
* run) is left alone, and a plan label no longer implied by the file is not
|
|
52
|
+
* removed, so a human's own labeling is never clobbered. Only calls `gh` to
|
|
53
|
+
* add labels that are actually missing from the PR, so rerunning on an
|
|
54
|
+
* unchanged plan is a no-op.
|
|
55
|
+
*/
|
|
56
|
+
export declare function syncPrLabelsToPr(root: string, ref: string): Promise<SyncPrLabelsResult>;
|
|
57
|
+
export type SyncPrReadinessResult = 'ready' | 'closed' | 'unchanged' | 'unresolved';
|
|
58
|
+
/**
|
|
59
|
+
* On push to a plan branch: one-way plan → PR readiness, never plan status.
|
|
60
|
+
* A stored `dropped` override closes an open PR (abandonment leaves no other
|
|
61
|
+
* trace to derive from, per `core/status.ts`). Otherwise, once every phase in
|
|
62
|
+
* the plan is checked, a draft PR flips to ready for review — the phases list
|
|
63
|
+
* is the derived `review` signal per `core/status.ts`. Anything already in the
|
|
64
|
+
* target state (a non-draft PR with all phases done, an already-closed
|
|
65
|
+
* dropped PR) is a no-op, so rerunning on an unchanged plan doesn't call `gh`
|
|
66
|
+
* again. Marking a plan `done` on merge is deliberately not done here — that's
|
|
67
|
+
* `core/status.ts`'s derivation from the merged PR, not a write this function
|
|
68
|
+
* makes.
|
|
69
|
+
*/
|
|
70
|
+
export declare function syncPrReadinessToPr(root: string, ref: string): Promise<SyncPrReadinessResult>;
|
|
71
|
+
interface AuditSummary {
|
|
72
|
+
audited: string;
|
|
73
|
+
/** Whether the plan's content has changed since the stored `audited-hash`. */
|
|
74
|
+
stale: boolean;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Renders `findConsistencyIssues`' repo-wide results, plus the plan's own
|
|
78
|
+
* convergence-audit staleness where one has been recorded, as a sticky PR
|
|
79
|
+
* comment body wrapped in marker comments (same `find/replace-by-marker`
|
|
80
|
+
* shape as `renderPlanPhasesIntoBody`). Deterministic for the same inputs, so
|
|
81
|
+
* a caller can compare against the existing sticky comment and skip the `gh`
|
|
82
|
+
* call when nothing changed.
|
|
83
|
+
*/
|
|
84
|
+
export declare function renderConsistencyComment(issues: ConsistencyIssue[], audit?: AuditSummary): string;
|
|
85
|
+
export type SyncConsistencyCommentResult = 'created' | 'updated' | 'unchanged' | 'unresolved';
|
|
86
|
+
/**
|
|
87
|
+
* On push to a plan branch: upserts a single sticky Scout comment on the PR with
|
|
88
|
+
* `findConsistencyIssues`' repo-wide results (dangling decision/question links, an
|
|
89
|
+
* open question blocking an already-active plan) and, when the plan carries a
|
|
90
|
+
* recorded convergence audit, whether it's gone stale since — so Paper Camp's own
|
|
91
|
+
* structured checks sit next to CI and CodeRabbit where review actually happens.
|
|
92
|
+
* Reads decisions/open-questions/plans straight off the checked-out branch (same
|
|
93
|
+
* corpus `/api/consistency` reads), not scoped to just this plan, since most issue
|
|
94
|
+
* kinds aren't plan-specific. Finds the existing sticky comment by its marker and
|
|
95
|
+
* PATCHes it via the REST id parsed from its URL rather than `gh pr comment
|
|
96
|
+
* --edit-last`, which isn't safe once Scout has posted any other unrelated comment.
|
|
97
|
+
* Only calls `gh` when the rendered body actually changed, so a rerun on an
|
|
98
|
+
* unchanged repo state is a no-op.
|
|
99
|
+
*/
|
|
100
|
+
export declare function syncConsistencyCommentToPr(root: string, ref: string): Promise<SyncConsistencyCommentResult>;
|
|
101
|
+
//# sourceMappingURL=pr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/pr.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAe,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAY9F,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAgErB,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAgCD;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAKxC;AAMD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAOlF;AAmBD,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;AAE1E;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAUjG;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,EAAE,CAOvF;AAgED,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;AAExE;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAoB7F;AA4BD,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC;AAEpF;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,qBAAqB,CAAC,CAgBhC;AAKD,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAkBjG;AAwDD,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;AAE9F;;;;;;;;;;;;;GAaG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,4BAA4B,CAAC,CAuCvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.test.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"pr.test.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/pr.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Valid commit scopes — keep in sync with `.commitlintrc.json`'s `scope-enum`.
|
|
3
|
+
* Doubles as the area-label vocabulary Scout's PR label sync reuses (see
|
|
4
|
+
* `derivePrLabels` in `pr.ts`), so a plan tag only becomes a label when it's
|
|
5
|
+
* also a recognized commit scope.
|
|
6
|
+
*/
|
|
7
|
+
export declare const COMMIT_SCOPES: Set<string>;
|
|
8
|
+
//# sourceMappingURL=scopes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../src/core/git-pr/scopes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,aAAa,aAmBxB,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from './env';
|
|
2
|
-
export * from './parser';
|
|
3
2
|
export * from './readers';
|
|
4
|
-
export * from './
|
|
3
|
+
export * from './parse';
|
|
4
|
+
export * from './git-pr';
|
|
5
5
|
export * from './scaffold';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './serialize';
|
|
7
7
|
export * from '../types/index';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -1,60 +1,81 @@
|
|
|
1
|
-
import { A as e, P as t,
|
|
2
|
-
import { AGENT_IDS as
|
|
1
|
+
import { A as e, C as r, a as n, P as t, S as i, b as o, c as l, d as E, e as d, f as m, g as P, h as p, i as S, j as c, k as y, l as T, m as h, n as I, o as f, p as F, q as N, r as g, s as C, t as _, u as A, v, w as L, x as O, y as u, z as D, B as R, D as G, E as U, F as b, G as B, H as M, I as Q, J as w, K as x, L as k, M as z, N as K, O as W, Q as j, R as H, T as J, U as V, V as Y, W as q, X, Y as Z, Z as $, _ as aa, $ as sa, a0 as ea, a1 as ra, a2 as na, a3 as ta, a4 as ia, a5 as oa, a6 as la, a7 as Ea, a8 as da, a9 as ma, aa as Pa, ab as pa, ac as Sa, ad as ca, ae as ya } from "../chunks/serializer.BfH7zTwv.js";
|
|
2
|
+
import { AGENT_IDS as ha, AGENT_LABELS as Ia, AGENT_OPTIONS as fa, DEFAULT_AGENTS as Fa, PLAN_KINDS as Na, PLAN_STATUSES as ga, coerceAgentConfig as Ca } from "../types/index.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
ha as AGENT_IDS,
|
|
5
|
+
Ia as AGENT_LABELS,
|
|
6
|
+
fa as AGENT_OPTIONS,
|
|
7
7
|
e as AlreadyInitializedError,
|
|
8
|
-
|
|
8
|
+
r as CLAUDE_SETTINGS_JSON,
|
|
9
|
+
n as COMMIT_SCOPES,
|
|
10
|
+
Fa as DEFAULT_AGENTS,
|
|
9
11
|
t as PAPER_CAMP_VERSION,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
m as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
g as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
12
|
+
Na as PLAN_KINDS,
|
|
13
|
+
ga as PLAN_STATUSES,
|
|
14
|
+
i as SKILL_MD_CONTENT,
|
|
15
|
+
o as SUGGESTION_ENTRY_RE,
|
|
16
|
+
l as agentConfigSchema,
|
|
17
|
+
E as appendBlock,
|
|
18
|
+
d as applyEnvEntries,
|
|
19
|
+
m as archiveEntityFile,
|
|
20
|
+
P as assignEntityId,
|
|
21
|
+
p as assignPlanId,
|
|
22
|
+
S as branchName,
|
|
23
|
+
c as clearPrCache,
|
|
24
|
+
Ca as coerceAgentConfig,
|
|
25
|
+
y as computePlanContentHash,
|
|
26
|
+
T as dateString,
|
|
27
|
+
h as decisionFieldsSchema,
|
|
28
|
+
I as derivePrLabels,
|
|
29
|
+
f as entityFrontmatterSchema,
|
|
30
|
+
F as entityToIdea,
|
|
31
|
+
N as entityToPlan,
|
|
32
|
+
g as fetchUnresolvedThreads,
|
|
33
|
+
C as findConsistencyIssues,
|
|
34
|
+
_ as formatDecisionEntry,
|
|
35
|
+
A as formatEntitiesIndex,
|
|
36
|
+
v as formatEntityFile,
|
|
37
|
+
L as formatIdeaFile,
|
|
38
|
+
O as formatOpenQuestionEntry,
|
|
39
|
+
u as formatOpenQuestions,
|
|
40
|
+
D as formatPlanEntry,
|
|
41
|
+
R as formatPlanFile,
|
|
42
|
+
G as formatPlans,
|
|
43
|
+
U as formatProgressEntry,
|
|
44
|
+
b as ideaFrontmatterSchema,
|
|
45
|
+
B as initProject,
|
|
46
|
+
M as openQuestionFieldsSchema,
|
|
47
|
+
Q as paperCampConfigSchema,
|
|
48
|
+
w as parseDecisions,
|
|
49
|
+
x as parseEntityFile,
|
|
50
|
+
k as parseEnv,
|
|
51
|
+
z as parseFrontmatter,
|
|
52
|
+
K as parseIdeaFile,
|
|
53
|
+
W as parseIdeas,
|
|
54
|
+
j as parseOpenQuestions,
|
|
55
|
+
H as parsePlanFile,
|
|
56
|
+
J as parsePlans,
|
|
57
|
+
V as parseProgress,
|
|
58
|
+
Y as parseRawEntries,
|
|
59
|
+
q as parseSuggestions,
|
|
60
|
+
X as planFieldsSchema,
|
|
61
|
+
Z as planFrontmatterSchema,
|
|
62
|
+
$ as prependProgressItem,
|
|
63
|
+
aa as readEntities,
|
|
64
|
+
sa as readEntitiesWithDerivedStatus,
|
|
65
|
+
ea as readNoteEntries,
|
|
66
|
+
ra as readWorkEntries,
|
|
67
|
+
na as removeSuggestionLine,
|
|
68
|
+
ta as renderConsistencyComment,
|
|
69
|
+
ia as renderPlanPhasesIntoBody,
|
|
70
|
+
oa as replyToReviewThread,
|
|
71
|
+
la as resolvePlanForPrRef,
|
|
72
|
+
Ea as resolvePrsByEntity,
|
|
73
|
+
da as resolveReviewThread,
|
|
74
|
+
ma as serializeFrontmatter,
|
|
75
|
+
Pa as syncConsistencyCommentToPr,
|
|
76
|
+
pa as syncPlanPhasesToPr,
|
|
77
|
+
Sa as syncPrLabelsToPr,
|
|
78
|
+
ca as syncPrReadinessToPr,
|
|
79
|
+
ya as todayDateString
|
|
59
80
|
};
|
|
60
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.test.d.ts","sourceRoot":"","sources":["../../../src/core/parse/entity.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter-schemas.d.ts","sourceRoot":"","sources":["../../../src/core/parse/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 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.test.d.ts","sourceRoot":"","sources":["../../../src/core/parse/frontmatter.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/parse/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ConsistencyIssue, DecisionEntry, EntityEntry, IdeaEntry, OpenQuestionEntry, ParseResult, ParseWarning, PlanEntry, ProgressEntry, RawEntry } from '
|
|
2
|
+
import { ConsistencyIssue, DecisionEntry, EntityEntry, IdeaEntry, OpenQuestionEntry, ParseResult, ParseWarning, PlanEntry, ProgressEntry, RawEntry, SuggestionEntry } from '../../types/index';
|
|
3
3
|
export declare function parseRawEntries(markdown: string): RawEntry[];
|
|
4
4
|
export declare function parsePlans(markdown: string): ParseResult<PlanEntry>;
|
|
5
5
|
export declare function parseDecisions(markdown: string): ParseResult<DecisionEntry>;
|
|
@@ -16,16 +16,11 @@ export declare function parseFrontmatter<T>(content: string, schema: z.ZodType<T
|
|
|
16
16
|
warnings: ParseWarning[];
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* Parses a unified entity file (FEAT-42 phases 7+): one file per entity — an
|
|
25
|
-
* "idea" for its whole life, plan as an optional `### Phases` body section.
|
|
26
|
-
* Same body pipeline as parsePlanFile (Phases/Log/Clarifications extraction);
|
|
27
|
-
* the frontmatter differs: `type` instead of `kind`, no `idea:` backlink, and
|
|
28
|
-
* the note/status asymmetry from the idea schema folded in.
|
|
19
|
+
* Parses a unified entity file: one file per entity — an "idea" for its whole
|
|
20
|
+
* life, plan as an optional `### Phases` body section. Same body pipeline as
|
|
21
|
+
* parsePlanFile (Phases/Log/Clarifications extraction); the frontmatter
|
|
22
|
+
* differs: `type` instead of `kind`, no `idea:` backlink, and the note/status
|
|
23
|
+
* asymmetry from the idea schema folded in.
|
|
29
24
|
*/
|
|
30
25
|
export declare function parseEntityFile(content: string): ParseResult<EntityEntry>;
|
|
31
26
|
export declare function parsePlanFile(content: string): ParseResult<PlanEntry>;
|
|
@@ -42,4 +37,14 @@ export declare function parseIdeas(markdown: string): IdeaEntry[];
|
|
|
42
37
|
export declare function findConsistencyIssues(decisions: DecisionEntry[], openQuestions: OpenQuestionEntry[], plans: PlanEntry[]): ConsistencyIssue[];
|
|
43
38
|
/** progress.md is an append-only date log, not a record-based file — no fields, no validation. */
|
|
44
39
|
export declare function parseProgress(markdown: string): ProgressEntry[];
|
|
40
|
+
export declare const SUGGESTION_ENTRY_RE: RegExp;
|
|
41
|
+
/**
|
|
42
|
+
* suggestions.md is a flat, append-only line log — sibling to decisions.md/
|
|
43
|
+
* open-questions.md/progress.md but with no `## Heading` per entry and no
|
|
44
|
+
* `**Field:**` lines: each line already carries its own date, title, and a
|
|
45
|
+
* one-line description (like plans' dated `### Log` grammar), and there is
|
|
46
|
+
* no `id` or `status` since a suggestion never counts as a plan/idea until a
|
|
47
|
+
* human promotes it.
|
|
48
|
+
*/
|
|
49
|
+
export declare function parseSuggestions(markdown: string): SuggestionEntry[];
|
|
45
50
|
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../src/core/parse/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,SAAS,EAET,iBAAiB,EACjB,WAAW,EACX,YAAY,EAEZ,SAAS,EACT,aAAa,EACb,QAAQ,EACR,eAAe,EAChB,MAAM,mBAAmB,CAAC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C;AAEnF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,EAAE,CASpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.test.d.ts","sourceRoot":"","sources":["../../../src/core/parse/parser.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/core/parse/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB;;;;;;;kBAO7B,CAAC;AAEF,eAAO,MAAM,UAAU,aAAiE,CAAC;AAMzF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;iBAS3B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;iBAI/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;iBAKnC,CAAC;AAQH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAgB9B,CAAC;AAOL,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+ChC,CAAC;AAEL,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BhC,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,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;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/core/readers.d.ts
CHANGED
|
@@ -21,6 +21,14 @@ export declare function readEntities(ideasDir: string): Promise<ParseResult<Enti
|
|
|
21
21
|
export declare function entityToPlan(e: EntityEntry, pr?: PrInfo, prLookupResolved?: boolean): PlanEntry;
|
|
22
22
|
/** IdeaEntry view of a note entity, for the note-shaped API/UI surface. */
|
|
23
23
|
export declare function entityToIdea(e: EntityEntry): IdeaEntry;
|
|
24
|
+
/**
|
|
25
|
+
* Every entity (including notes) with `status` replaced by its derived value —
|
|
26
|
+
* for callers that need the resolved lifecycle without the PlanEntry reshape,
|
|
27
|
+
* namely index generation and the branch-guard. One `gh` PR listing resolves
|
|
28
|
+
* every entity's PR (matched by id), cached. This is a shallow copy: it never
|
|
29
|
+
* touches disk, so it's safe to feed straight back into
|
|
30
|
+
* `entityToPlan`/`deriveStatus` elsewhere without risking a stale-status write.
|
|
31
|
+
*/
|
|
24
32
|
export declare function readEntitiesWithDerivedStatus(ideasDir: string): Promise<ParseResult<EntityEntry>>;
|
|
25
33
|
/** All work entities (non-notes) in PlanEntry shape — the `/api/plans` view. */
|
|
26
34
|
export declare function readWorkEntries(ideasDir: string): Promise<ParseResult<PlanEntry>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../src/core/readers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAET,WAAW,EAEX,SAAS,EAET,MAAM,EACP,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"readers.d.ts","sourceRoot":"","sources":["../../src/core/readers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAET,WAAW,EAEX,SAAS,EAET,MAAM,EACP,MAAM,gBAAgB,CAAC;AA2BxB;;;GAGG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAwB3D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB,UAAQ,GAAG,SAAS,CAmB7F;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,GAAG,SAAS,CAStD;AASD;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CACjD,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAOnC;AAED,gFAAgF;AAChF,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAQvF;AAED,oEAAoE;AACpE,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAMvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/scaffold.ts"],"names":[],"mappings":"AAMA,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,CAwCxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold.test.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/scaffold.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/core/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,0pIA2E5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,QAmB5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-hash.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/content-hash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAWrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-hash.test.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/content-hash.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +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,4 +1,4 @@
|
|
|
1
|
-
import { EntityEntry, LogEntry, PhaseItem } from '
|
|
1
|
+
import { EntityEntry, LogEntry, PhaseItem, SuggestionEntry } from '../../types/index';
|
|
2
2
|
export declare function todayDateString(): string;
|
|
3
3
|
/**
|
|
4
4
|
* Mints the next `<KIND>-<N>` plan ID from the persistent counter in `papercamp/config.json`,
|
|
@@ -106,16 +106,16 @@ interface NewEntityFileInput {
|
|
|
106
106
|
clarifications?: LogEntry[];
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
* Serializes a unified entity file
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
109
|
+
* Serializes a unified entity file — same body sections as formatPlanFile
|
|
110
|
+
* (Clarifications/Phases/Log), but `type` instead of `kind`, no `idea:`
|
|
111
|
+
* backlink, and no `## id: title` body heading (title lives in frontmatter
|
|
112
|
+
* only).
|
|
113
113
|
*/
|
|
114
114
|
export declare function formatEntityFile(input: NewEntityFileInput): string;
|
|
115
115
|
/**
|
|
116
116
|
* Mints the next lifetime IDEA-N entity id from the unified `nextId.idea`
|
|
117
|
-
* counter — the single id space every entity lives in
|
|
118
|
-
*
|
|
117
|
+
* counter — the single id space every entity lives in. Same
|
|
118
|
+
* chaining/guarantees as assignPlanId (which it delegates to).
|
|
119
119
|
*/
|
|
120
120
|
export declare function assignEntityId(configPath: string): Promise<string | undefined>;
|
|
121
121
|
interface NewIdeaFileInput {
|
|
@@ -136,6 +136,18 @@ export declare function formatIdeaFile(input: NewIdeaFileInput): string;
|
|
|
136
136
|
* Returns true if the file was moved, false if no file exists for this entity.
|
|
137
137
|
*/
|
|
138
138
|
export declare function archiveEntityFile(root: string, entityId: string): Promise<boolean>;
|
|
139
|
+
/**
|
|
140
|
+
* Removes one line from suggestions.md's flat log. Re-parses each candidate
|
|
141
|
+
* line with parseSuggestions' own grammar and compares the parsed fields —
|
|
142
|
+
* not a reconstructed literal string — since parseSuggestions trims title/
|
|
143
|
+
* description and a reconstruction would miss extra internal whitespace an
|
|
144
|
+
* LLM-authored line might contain. Only the first match is removed —
|
|
145
|
+
* suggestions carry no id, so field matching is the only way to address a
|
|
146
|
+
* specific line (see IDEA-62's promote/dismiss routes, both of which call
|
|
147
|
+
* this before writing the file back).
|
|
148
|
+
*/
|
|
149
|
+
export declare function removeSuggestionLine(markdown: string, target: SuggestionEntry): string;
|
|
150
|
+
/** Generates papercamp/ideas/index.md, the one unified table. */
|
|
139
151
|
export declare function formatEntitiesIndex(entities: EntityEntry[]): string;
|
|
140
152
|
export {};
|
|
141
153
|
//# sourceMappingURL=serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../../../src/core/serialize/serializer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAG3F,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,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;IACjB,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAqC3D;AAED,UAA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,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAEpF;AAED,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAqB9D;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAexF;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,MAAM,CAkBtF;AAED,iEAAiE;AACjE,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,MAAM,CAgBnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/status/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityStatus, PhaseItem, PrInfo } from '
|
|
1
|
+
import { EntityStatus, PhaseItem, PrInfo } from '../../types/index';
|
|
2
2
|
/** The subset of an entity's shape the status ladder needs to look at. */
|
|
3
3
|
export interface StatusDerivationInput {
|
|
4
4
|
kind?: 'note';
|
|
@@ -7,9 +7,9 @@ export interface StatusDerivationInput {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Derives lifecycle status from the entity's phases and its GitHub PR instead of
|
|
10
|
-
* trusting the stored `status` field, so it can't drift from reality
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* trusting the stored `status` field, so it can't drift from reality. Tracking
|
|
11
|
+
* keys off the PR (matched by id), not a local branch: the PR is canonical
|
|
12
|
+
* across clones and survives the branch being deleted after merge.
|
|
13
13
|
*
|
|
14
14
|
* Ladder: idea (no phases) -> planned (phases, no PR) -> in-progress (PR open or
|
|
15
15
|
* draft) -> review (PR open/draft AND every phase checked) -> done (PR merged).
|
|
@@ -0,0 +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,CAAC;AAEzE,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,qBAAqB,EAC7B,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,gBAAgB,EAAE,OAAO,GACxB,YAAY,GAAG,SAAS,CAgB1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.test.d.ts","sourceRoot":"","sources":["../../../src/core/status/status.test.ts"],"names":[],"mappings":""}
|
|
Binary file
|