@dendelion/paper-camp 0.17.0 → 0.18.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-2KbxO2gv.js +2 -0
- package/dist/app/assets/index-2KbxO2gv.js.map +1 -0
- package/dist/app/assets/index-B_KrbzkW.js +2 -0
- package/dist/app/assets/index-B_KrbzkW.js.map +1 -0
- package/dist/app/assets/{index-CYxk5mrY.js → index-BiMhnqOS.js} +3 -3
- package/dist/app/assets/{index-CYxk5mrY.js.map → index-BiMhnqOS.js.map} +1 -1
- package/dist/app/assets/index-DahTzD09.js +6 -0
- package/dist/app/assets/index-DahTzD09.js.map +1 -0
- package/dist/app/assets/index-Db-zMFvA.js +4 -0
- package/dist/app/assets/index-Db-zMFvA.js.map +1 -0
- package/dist/app/assets/index-Dw1f2idP.js +2 -0
- package/dist/app/assets/index-Dw1f2idP.js.map +1 -0
- package/dist/app/assets/index-UPIRvQZS.js +3 -0
- package/dist/app/assets/index-UPIRvQZS.js.map +1 -0
- package/dist/app/assets/main-BuCfycKH.css +1 -0
- package/dist/app/assets/main-CfeIUKG-.js +217 -0
- package/dist/app/assets/main-CfeIUKG-.js.map +1 -0
- package/dist/app/assets/{sidebar-section-DKgV3XAx.js → sidebar-section-Lss_HMtQ.js} +2 -2
- package/dist/app/assets/{sidebar-section-DKgV3XAx.js.map → sidebar-section-Lss_HMtQ.js.map} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/app/toolbar.js +7478 -7516
- package/dist/app/toolbar.js.map +1 -1
- package/dist/chunks/{phase-progress.DsBJvd_o.js → phase-progress.BIIDRJmI.js} +2783 -2365
- package/dist/chunks/phase-progress.BIIDRJmI.js.map +1 -0
- package/dist/cli/index.js +9650 -8810
- package/dist/cli/index.js.map +1 -1
- package/dist/core/ci/ci-release.d.ts +25 -0
- package/dist/core/ci/ci-release.d.ts.map +1 -0
- package/dist/core/ci/ci-release.test.d.ts +2 -0
- package/dist/core/ci/ci-release.test.d.ts.map +1 -0
- package/dist/core/ci/index.d.ts +2 -0
- package/dist/core/ci/index.d.ts.map +1 -0
- package/dist/core/doctor/checks/metadata.d.ts +3 -0
- package/dist/core/doctor/checks/metadata.d.ts.map +1 -0
- package/dist/core/doctor/checks/metadata.test.d.ts +2 -0
- package/dist/core/doctor/checks/metadata.test.d.ts.map +1 -0
- package/dist/core/doctor/checks/structural.d.ts +3 -0
- package/dist/core/doctor/checks/structural.d.ts.map +1 -0
- package/dist/core/doctor/checks/structural.test.d.ts +2 -0
- package/dist/core/doctor/checks/structural.test.d.ts.map +1 -0
- package/dist/core/doctor/doctor.d.ts +18 -0
- package/dist/core/doctor/doctor.d.ts.map +1 -0
- package/dist/core/doctor/finding.d.ts +25 -0
- package/dist/core/doctor/finding.d.ts.map +1 -0
- package/dist/core/doctor/finding.test.d.ts +2 -0
- package/dist/core/doctor/finding.test.d.ts.map +1 -0
- package/dist/core/doctor/fix.d.ts +25 -0
- package/dist/core/doctor/fix.d.ts.map +1 -0
- package/dist/core/doctor/fix.test.d.ts +2 -0
- package/dist/core/doctor/fix.test.d.ts.map +1 -0
- package/dist/core/doctor/index.d.ts +5 -0
- package/dist/core/doctor/index.d.ts.map +1 -0
- package/dist/core/doctor/rules.d.ts +52 -0
- package/dist/core/doctor/rules.d.ts.map +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +120 -102
- package/dist/core/notifications.d.ts +6 -0
- package/dist/core/notifications.d.ts.map +1 -0
- package/dist/core/notifications.test.d.ts +2 -0
- package/dist/core/notifications.test.d.ts.map +1 -0
- package/dist/core/parse/desk-schema.test.d.ts +2 -0
- package/dist/core/parse/desk-schema.test.d.ts.map +1 -0
- package/dist/core/parse/parser.d.ts +2 -1
- package/dist/core/parse/parser.d.ts.map +1 -1
- package/dist/core/parse/schemas.d.ts +65 -0
- package/dist/core/parse/schemas.d.ts.map +1 -1
- package/dist/types/index.d.ts +96 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +47 -40
- package/dist/vite/index.js.map +1 -1
- package/package.json +2 -3
- package/dist/app/assets/index-6xeWffZg.js +0 -2
- package/dist/app/assets/index-6xeWffZg.js.map +0 -1
- package/dist/app/assets/index-B_yczIPZ.js +0 -3
- package/dist/app/assets/index-B_yczIPZ.js.map +0 -1
- package/dist/app/assets/index-CASIH0vL.js +0 -2
- package/dist/app/assets/index-CASIH0vL.js.map +0 -1
- package/dist/app/assets/index-CjPmPsf0.js +0 -4
- package/dist/app/assets/index-CjPmPsf0.js.map +0 -1
- package/dist/app/assets/index-CnD1dVCC.js +0 -2
- package/dist/app/assets/index-CnD1dVCC.js.map +0 -1
- package/dist/app/assets/index-DLgVuxp-.js +0 -6
- package/dist/app/assets/index-DLgVuxp-.js.map +0 -1
- package/dist/app/assets/main-DR2ma6V-.js +0 -207
- package/dist/app/assets/main-DR2ma6V-.js.map +0 -1
- package/dist/app/assets/main-Ll-lvqgh.css +0 -1
- package/dist/chunks/phase-progress.DsBJvd_o.js.map +0 -1
|
@@ -1 +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;AAIzF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;iBAS3B,CAAC;AAKH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAgB9B,CAAC;AAIL,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8DhC,CAA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"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -188,6 +188,27 @@ export interface ParkedQuestion {
|
|
|
188
188
|
date?: string;
|
|
189
189
|
ageDays: number;
|
|
190
190
|
}
|
|
191
|
+
/** The two event-sourced notification kinds (IDEA-153) — 'completed' when a task
|
|
192
|
+
* reaches done/error, 'reply' when an agent posts a non-blocking feedback thread
|
|
193
|
+
* entry. Unlike ParkedQuestion (derived live from thread state), these are stored
|
|
194
|
+
* as discrete events on read, so a since-resolved source can't erase them. */
|
|
195
|
+
export type StoredNotificationKind = 'completed' | 'reply';
|
|
196
|
+
export interface StoredNotification {
|
|
197
|
+
id: string;
|
|
198
|
+
kind: StoredNotificationKind;
|
|
199
|
+
entityId: string;
|
|
200
|
+
entityTitle: string;
|
|
201
|
+
text: string;
|
|
202
|
+
date: string;
|
|
203
|
+
read: boolean;
|
|
204
|
+
/** Only set for 'completed' — the task outcome that triggered it. */
|
|
205
|
+
outcome?: 'done' | 'error';
|
|
206
|
+
}
|
|
207
|
+
/** One unified feed entry (IDEA-153) — a parked question (open→resolved, always
|
|
208
|
+
* unread while it's shown at all) alongside the two stored, read/unread kinds. */
|
|
209
|
+
export type Notification = (ParkedQuestion & {
|
|
210
|
+
kind: 'question';
|
|
211
|
+
}) | StoredNotification;
|
|
191
212
|
export type ConsistencyIssueKind = 'orphan-subject' | 'title-style';
|
|
192
213
|
export interface ConsistencyIssue {
|
|
193
214
|
kind: ConsistencyIssueKind;
|
|
@@ -388,6 +409,71 @@ export interface IntegrationConfig {
|
|
|
388
409
|
toolbar?: IntegrationToolbarConfig;
|
|
389
410
|
route?: string;
|
|
390
411
|
}
|
|
412
|
+
export interface DeskService {
|
|
413
|
+
name: string;
|
|
414
|
+
cmd: string;
|
|
415
|
+
port?: number;
|
|
416
|
+
healthcheck?: string;
|
|
417
|
+
}
|
|
418
|
+
export interface DeskCheck {
|
|
419
|
+
name: string;
|
|
420
|
+
cmd: string;
|
|
421
|
+
}
|
|
422
|
+
export interface DeskCi {
|
|
423
|
+
repo: string;
|
|
424
|
+
branch?: string;
|
|
425
|
+
releasePlease?: boolean;
|
|
426
|
+
}
|
|
427
|
+
/** Dev-loop manifest (IDEA-119): declared services, one-click checks, and CI/release sources. */
|
|
428
|
+
export interface DeskConfig {
|
|
429
|
+
services?: DeskService[];
|
|
430
|
+
checks?: DeskCheck[];
|
|
431
|
+
ci?: DeskCi;
|
|
432
|
+
}
|
|
433
|
+
export type ServiceRunStatus = 'stopped' | 'running' | 'stopping' | 'crashed';
|
|
434
|
+
export type ServiceHealth = 'unknown' | 'up' | 'down';
|
|
435
|
+
/** Live runtime view of a declared service (IDEA-119), merging manifest + process state. */
|
|
436
|
+
export interface ServiceState {
|
|
437
|
+
name: string;
|
|
438
|
+
cmd: string;
|
|
439
|
+
port?: number;
|
|
440
|
+
hasHealthcheck: boolean;
|
|
441
|
+
status: ServiceRunStatus;
|
|
442
|
+
health: ServiceHealth;
|
|
443
|
+
pid: number | null;
|
|
444
|
+
startedAt: string | null;
|
|
445
|
+
exitCode: number | null;
|
|
446
|
+
}
|
|
447
|
+
/** Live result of a declared one-click check (IDEA-119), mirroring the Stack panel's CheckResult. */
|
|
448
|
+
export interface DeskCheckState {
|
|
449
|
+
name: string;
|
|
450
|
+
cmd: string;
|
|
451
|
+
status: CheckStatus;
|
|
452
|
+
lastRun: string | null;
|
|
453
|
+
output: string;
|
|
454
|
+
}
|
|
455
|
+
export type CiRunStatus = 'success' | 'failure' | 'in_progress' | 'queued' | 'cancelled' | 'unknown';
|
|
456
|
+
export interface CiRun {
|
|
457
|
+
workflow: string;
|
|
458
|
+
status: CiRunStatus;
|
|
459
|
+
url: string | null;
|
|
460
|
+
}
|
|
461
|
+
export interface ReleasePr {
|
|
462
|
+
number: number;
|
|
463
|
+
title: string;
|
|
464
|
+
url: string;
|
|
465
|
+
version: string | null;
|
|
466
|
+
}
|
|
467
|
+
/** CI & release mirror for a declared repo (IDEA-119): latest Actions runs on the tracked
|
|
468
|
+
* branch, the open release-please PR, and the released vs. queued version. */
|
|
469
|
+
export interface CiReleaseState {
|
|
470
|
+
repo: string;
|
|
471
|
+
branch: string;
|
|
472
|
+
available: boolean;
|
|
473
|
+
runs: CiRun[];
|
|
474
|
+
releasePr: ReleasePr | null;
|
|
475
|
+
releasedVersion: string | null;
|
|
476
|
+
}
|
|
391
477
|
export interface PaperCampConfig {
|
|
392
478
|
version: string;
|
|
393
479
|
projectName: string;
|
|
@@ -405,14 +491,23 @@ export interface PaperCampConfig {
|
|
|
405
491
|
setupDismissed?: boolean;
|
|
406
492
|
/** In-app dev toolbar (IDEA-128) — the `@dendelion/paper-camp/vite` plugin's mount, toggleable for frontend targets. */
|
|
407
493
|
integration?: IntegrationConfig;
|
|
494
|
+
/** Dev-loop desk manifest (IDEA-119) — declared services, checks, and CI/release sources per project. */
|
|
495
|
+
desk?: DeskConfig;
|
|
496
|
+
/** Project-declared commands the desk/embed can run on demand (IDEA-157). */
|
|
497
|
+
commands?: {
|
|
498
|
+
/** Manual build for the Stack's Build action; no universal default. */
|
|
499
|
+
build?: string;
|
|
500
|
+
};
|
|
408
501
|
}
|
|
409
502
|
export type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';
|
|
410
503
|
export interface CheckResult {
|
|
411
504
|
status: CheckStatus;
|
|
505
|
+
/** The shell command this check runs — empty until a build command is configured. */
|
|
506
|
+
cmd: string;
|
|
412
507
|
lastRun: string | null;
|
|
413
508
|
output: string;
|
|
414
509
|
}
|
|
415
|
-
export type CheckName = 'lint' | 'format' | 'test' | 'consistency';
|
|
510
|
+
export type CheckName = 'lint' | 'format' | 'test' | 'consistency' | 'build';
|
|
416
511
|
export type CapabilityStatus = 'ok' | 'warn' | 'missing';
|
|
417
512
|
export interface CapabilityResult {
|
|
418
513
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,G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AM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,eAAe,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAChC,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oGAAoG;AACpG,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,EAAE,CAAA;KAAE,CAAC;CAC/C"}
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/types/index.ts"],"sourcesContent":["export type PlanStatus = 'idea' | 'planned' | 'in-progress' | 'review' | 'done' | 'dropped';\n\nexport const PLAN_STATUSES: PlanStatus[] = [\n 'idea',\n 'planned',\n 'in-progress',\n 'review',\n 'done',\n 'dropped',\n];\n\nexport interface LogEntry {\n date: string;\n text: string;\n}\n\nexport type PlanKind = 'feat' | 'fix' | 'chore' | 'docs' | 'refactor';\n\nexport const PLAN_KINDS: PlanKind[] = ['feat', 'fix', 'chore', 'docs', 'refactor'];\n\nexport const AGENT_IDS = ['claude-code', 'opencode'] as const;\n\nexport type AgentId = (typeof AGENT_IDS)[number];\n\nexport const AGENT_LABELS: Record<AgentId, string> = {\n 'claude-code': 'Claude Code',\n opencode: 'OpenCode',\n};\n\nexport interface PhaseRun {\n durationMs: number;\n inputTokens: number;\n outputTokens: number;\n model?: string;\n attempts: number;\n}\n\nexport interface PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review';\n run?: PhaseRun;\n}\n\nexport type PhaseMilestone = 'implement' | 'verify' | 'checkbox';\n\n/** A body section anchor is `body` for now — the whole prose block is the only\n * body section a plan/entity has until later phases break it into sub-sections. */\nexport type MarginNoteAnchor = { kind: 'phase'; index: number } | { kind: 'body' };\n\nexport type MarginNoteState = 'open' | 'resolved';\n\nexport type MarginNoteKind = 'note' | 'decision' | 'question';\n\nexport interface MarginNote {\n anchor: MarginNoteAnchor;\n prose: string;\n state: MarginNoteState;\n kind?: MarginNoteKind;\n}\n\n/** What a thread message originally was, before log/review/notes/clarifications folded\n * into one ordered thread on the entity — 'note'/'decision'/'question' carry `state`,\n * the rest are plain historical records. 'chat' is thread-native (no legacy section):\n * Paper Scout conversation, collapsed by default in thread views. */\nexport type ThreadMessageKind =\n | 'log'\n | 'clarification'\n | 'review'\n | 'note'\n | 'decision'\n | 'question'\n | 'chat';\n\nexport interface ThreadMessage {\n kind: ThreadMessageKind;\n /** Absent for messages ported from the old Notes section, which never carried a date. */\n date?: string;\n text: string;\n /** Only meaningful for note/decision/question kinds. */\n state?: MarginNoteState;\n /** Absent means 'user' — no thread message predates this field being agent-authored. */\n from?: 'user' | 'agent';\n}\n\n/** Ambient context a chat mount (desk, toolbar) feeds alongside a message — each\n * mount populates whatever it has (IDEA-130); Scout folds it into the prompt\n * silently, it never becomes a user-visible field. */\nexport interface MountContext {\n route?: string;\n focusedIdeaId?: string;\n viewport?: { width: number; height: number };\n}\n\nexport interface RawEntry {\n title: string;\n fields: Record<string, string>;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n notes?: MarginNote[];\n review?: LogEntry[];\n}\n\nexport interface ParseWarning {\n title: string;\n message: string;\n}\n\nexport interface ParseResult<T> {\n entries: T[];\n warnings: ParseWarning[];\n}\n\n/** A PR's reviewable/mergeable state, as surfaced by `gh pr list`. */\nexport type PrState = 'draft' | 'open' | 'closed' | 'merged';\n\n/** GitHub's PR review decision, as surfaced by `gh pr list --json reviewDecision`. */\nexport type ReviewDecision = 'approved' | 'changes-requested' | 'review-required';\n\n// Per-comment detail; PrInfo.unresolvedThreadCount only counts these.\nexport interface ReviewThread {\n /** GraphQL node id — what `resolveReviewThread`/`replyToReviewThread` address. */\n id: string;\n /** File path the comment is anchored to; absent for a PR-level (not diff-anchored) comment. */\n path?: string;\n line?: number;\n author?: string;\n body: string;\n}\n\n// Parsed from the JSON object a fix-review agent's prompt requires as its final line.\nexport interface FixReviewResult {\n commit: { title: string; message: string };\n addressed: string[];\n skipped: { threadId: string; why: string }[];\n}\n\nexport interface FeedbackPhaseEdit {\n op: 'add' | 'reword';\n /** 1-based position in the plan's current phase list; required for \"reword\", ignored for \"add\". */\n index?: number;\n text: string;\n description?: string;\n}\n\nexport interface FeedbackEdit {\n phases?: FeedbackPhaseEdit[];\n /** The complete replacement body, when the message corrects body prose. */\n body?: string;\n}\n\n// Parsed from the JSON object a feedback-reply agent's prompt requires as its\n// final line. The chat never creates ideas — a request is either a reply or an\n// edit on the current plan.\nexport interface FeedbackReplyResult {\n reply: string;\n edit?: FeedbackEdit;\n /** True when the user's message answers an open question the agent asked\n * earlier in this thread — the route persists that message as a clarification. */\n answersQuestion?: boolean;\n}\n\n/** Live-resolved PR info for an entity's branch — see `core/pr.ts`. */\nexport interface PrInfo {\n number: number;\n url: string;\n state: PrState;\n /** Undefined when no review has been requested/decided, or when unresolved (offline, closed/merged PR). */\n reviewDecision?: ReviewDecision;\n /** Count of unresolved review threads. Only fetched for open/draft PRs; undefined when not fetched or unresolved. */\n unresolvedThreadCount?: number;\n /** Whether a comment or review landed after the PR's last commit — a proxy for \"since the last agent pass\" (a pass ends with a push). Only fetched for open/draft PRs. */\n hasNewCommentsSincePush?: boolean;\n}\n\nexport interface PlanEntry {\n title: string;\n status: PlanStatus;\n kind?: PlanKind;\n id?: string;\n idea?: string;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n /** Version tag (e.g. v0.13.1) that first shipped this idea, stamped from the release train. */\n released?: string;\n tags: string[];\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n body: string;\n phases: PhaseItem[];\n /** Post-build findings, same checkbox grammar as `phases` — see EntityEntry.fixes. */\n fixes?: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n notes?: MarginNote[];\n /** Prose written against the whole finished plan, distinct from the flat `log` — an\n * agent later splits each entry into rework phases or a follow-up idea. */\n review?: LogEntry[];\n /** The entity's single ordered feedback thread — see EntityEntry.thread. */\n thread?: ThreadMessage[];\n /** Set by readEntities from which dir the file came from — see EntityEntry.archived. */\n archived?: boolean;\n pr?: PrInfo;\n}\n\nexport interface ArchivableIdea {\n id: string;\n title: string;\n pr: PrInfo;\n}\n\n/** One open `question` thread message, resolved to the idea it's parked on. `ageDays`\n * is `Infinity` for a question ported from the pre-Thread Notes section, which never\n * carried a date — the oldest kind of unresolved question there is. */\nexport interface ParkedQuestion {\n entityId: string;\n entityTitle: string;\n text: string;\n date?: string;\n ageDays: number;\n}\n\nexport type ConsistencyIssueKind = 'orphan-subject' | 'title-style';\n\nexport interface ConsistencyIssue {\n kind: ConsistencyIssueKind;\n section: 'plans';\n title: string;\n message: string;\n planId?: string;\n}\n\nexport interface CommentStats {\n commentLines: number;\n sourceLines: number;\n ratio: number;\n}\n\nexport interface TasksPerWeek {\n /** ISO week, e.g. \"2026-W05\". */\n week: string;\n count: number;\n}\n\nexport interface UsagePerWeek {\n /** ISO week, e.g. \"2026-W05\". */\n week: string;\n agentMinutes: number;\n inputTokens: number;\n outputTokens: number;\n}\n\nexport interface IdeaCost {\n planId: string;\n planTitle: string;\n inputTokens: number;\n outputTokens: number;\n durationMs: number;\n}\n\nexport interface CapacityStat {\n snapshot: RateLimitSnapshot;\n capturedAt: string;\n}\n\nexport interface ProjectStats {\n generatedAt: string;\n comments: CommentStats;\n testLines: number;\n /** Null when no coverage report has been emitted yet (run `pnpm test`). */\n testCoveragePct: number | null;\n entitiesByStatus: Partial<Record<EntityStatus, number>>;\n openQuestions: number;\n decisions: number;\n tasksPerWeek: TasksPerWeek[];\n usagePerWeek: UsagePerWeek[];\n medianPhaseDurationMs: number | null;\n mostExpensiveIdeas: IdeaCost[];\n capacity: CapacityStat | null;\n}\n\nexport type IdeaKind = 'idea' | 'note';\n\nexport type IdeaStatus = 'open' | 'done' | 'dropped';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n kind?: IdeaKind;\n status?: IdeaStatus;\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n /** Fallback sort key for unordered entries — see `order`. Absent on view-model-only IdeaEntry literals that never enter the worklist sort. */\n created?: string;\n log?: LogEntry[];\n}\n\n// Unified entity — one file per entity, plan as an optional Phases section.\n// Supersedes PlanEntry/IdeaEntry once the migration cutover lands.\n\n/** Work classification — same Conventional-Commits values as PlanKind; `kind` renamed to `type` in the unified schema. */\nexport type EntityType = PlanKind;\n\n/** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */\nexport type EntityStatus = PlanStatus | 'open';\n\nexport interface EntityEntry {\n id: string;\n title: string;\n /** Absent until the entity is classified (usually when its plan is drafted). */\n type?: EntityType;\n /** \"note\" marks an entity that never grows phases. */\n kind?: 'note';\n /** Stored override, not the source of truth — see entityFrontmatterSchema. */\n status?: EntityStatus;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n /** Version tag (e.g. v0.13.1) that first shipped this idea, stamped from the release train. */\n released?: string;\n tags: string[];\n /** Absent renders as the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n body: string;\n phases: PhaseItem[];\n /** Post-build findings, same checkbox grammar as `phases` — appended below Phases\n * rather than rewriting the plan's already-finished phase history. */\n fixes?: PhaseItem[];\n /** The entity's single ordered feedback thread — folds what used to be separate\n * log/clarifications/notes/review sections. */\n thread?: ThreadMessage[];\n /** Set by readEntities from which of the two scanned dirs the file came from, not the frontmatter. */\n archived?: boolean;\n}\n\n// No `id`/`status`: it only becomes a real idea if a human promotes it.\nexport interface SuggestionEntry {\n date: string;\n title: string;\n description: string;\n}\n\nexport interface RoadmapItem {\n name: string;\n description: string;\n candidates: string[];\n linked: string[];\n}\n\nexport interface RoadmapHorizon {\n title: string;\n items: RoadmapItem[];\n}\n\nexport interface Roadmap {\n goal: string;\n horizons: RoadmapHorizon[];\n standingConcerns: RoadmapItem[];\n}\n\nexport interface RoadmapLink {\n id: string;\n status: PlanStatus;\n taskRuns: number;\n pr?: PrInfo;\n released: boolean;\n}\n\nexport interface RoadmapRollup {\n total: number;\n done: number;\n}\n\nexport interface ResolvedRoadmapItem extends RoadmapItem {\n links: RoadmapLink[];\n rollup: RoadmapRollup;\n}\n\nexport interface ResolvedRoadmapHorizon {\n title: string;\n items: ResolvedRoadmapItem[];\n rollup: RoadmapRollup;\n}\n\nexport interface ResolvedRoadmap {\n goal: string;\n horizons: ResolvedRoadmapHorizon[];\n events: RoadmapEvent[];\n}\n\nexport type RoadmapEventKind = 'created' | 'task-run';\n\nexport interface RoadmapEvent {\n date: string;\n kind: RoadmapEventKind;\n entityId: string;\n horizonTitle: string;\n itemName: string;\n label: string;\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\n /** Set on GET responses when the value is withheld — secrets never reach the client. */\n isSet?: boolean;\n}\n\nexport interface AgentConfig {\n agent: AgentId;\n model?: string;\n effort?: string;\n}\n\n/** Model/effort passed to an adapter's buildArgs — the AgentConfig minus the agent id. */\nexport interface AgentRunOptions {\n model?: string;\n effort?: string;\n /** Prior claude-code session id to continue instead of starting cold; ignored by opencode. */\n resume?: string;\n}\n\n/** Maps option names to a fixed value list (renders a Select) or null (free-text or hidden). */\nexport type AgentOptionsDescriptor = Record<string, string[] | null | undefined>;\n\nexport const AGENT_OPTIONS: Record<AgentId, AgentOptionsDescriptor> = {\n 'claude-code': {\n model: ['opus', 'sonnet', 'fable', 'haiku'],\n effort: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n opencode: {\n model: null,\n },\n};\n\nexport function coerceAgentConfig(v: unknown): AgentConfig {\n const toAgent = (a: unknown): AgentId =>\n AGENT_IDS.includes(a as AgentId) ? (a as AgentId) : 'claude-code';\n if (typeof v === 'string') return { agent: toAgent(v) };\n // A missing key must not throw — that would 500 the /api/config read this protects.\n const obj = (v ?? {}) as Record<string, unknown>;\n return {\n agent: toAgent(obj.agent),\n ...(typeof obj.model === 'string' && { model: obj.model }),\n ...(typeof obj.effort === 'string' && { effort: obj.effort }),\n };\n}\n\nexport interface DefaultAgentsMap {\n phase: AgentConfig;\n planDraft: AgentConfig;\n ideaExtend: AgentConfig;\n commitSuggest: AgentConfig;\n feedback: AgentConfig;\n}\n\nexport const DEFAULT_AGENTS: DefaultAgentsMap = {\n phase: { agent: 'opencode' },\n planDraft: { agent: 'claude-code' },\n ideaExtend: { agent: 'claude-code' },\n commitSuggest: { agent: 'claude-code' },\n feedback: { agent: 'claude-code', model: 'sonnet', effort: 'medium' },\n};\n\n/** Toolbar segments, left to right (IDEA-128/IDEA-133); trimmed per project via `IntegrationConfig.toolbar.segments`. */\nexport const TOOLBAR_SEGMENT_IDS = ['focus', 'scout', 'desk'] as const;\n\nexport type ToolbarSegmentId = (typeof TOOLBAR_SEGMENT_IDS)[number];\n\nexport interface IntegrationToolbarConfig {\n enabled?: boolean;\n segments?: ToolbarSegmentId[];\n /** Opt-in escape hatch: without it, the vite plugin stays off when `mode` is `production`. */\n allowProduction?: boolean;\n}\n\nexport interface IntegrationConfig {\n toolbar?: IntegrationToolbarConfig;\n route?: string;\n}\n\nexport interface PaperCampConfig {\n version: string;\n projectName: string;\n initializedAt: string;\n /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */\n nextId?: Partial<Record<PlanKind, number>> & { idea?: number };\n port?: number;\n defaultAgents?: DefaultAgentsMap;\n /** Derived from `ROADMAP.md` on every read (IDEA-95), never written to disk; an idea's\n * `subject` not present here renders as \"No subject\". */\n subjects?: string[];\n /** Opts out of the first-run redirect to Settings > Setup while capabilities are incomplete. */\n setupDismissed?: boolean;\n /** In-app dev toolbar (IDEA-128) — the `@dendelion/paper-camp/vite` plugin's mount, toggleable for frontend targets. */\n integration?: IntegrationConfig;\n}\n\nexport type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';\n\nexport interface CheckResult {\n status: CheckStatus;\n lastRun: string | null;\n output: string;\n}\n\nexport type CheckName = 'lint' | 'format' | 'test' | 'consistency';\n\nexport type CapabilityStatus = 'ok' | 'warn' | 'missing';\n\nexport interface CapabilityResult {\n id: string;\n status: CapabilityStatus;\n detail: string;\n}\n\nexport interface AgentAuthStatus {\n loggedIn: boolean | null;\n authMethod: string | null;\n apiProvider: string | null;\n}\n\nexport type LoginRelayPhase =\n | 'starting'\n | 'awaiting-authorization'\n | 'success'\n | 'error'\n | 'cancelled';\n\nexport interface LoginRelayState {\n phase: LoginRelayPhase;\n authorizeUrl: string | null;\n error?: string;\n}\n\nexport type ServiceId = 'git' | 'gh' | `agent:${AgentId}`;\n\n/** What a Connections row offers once its service isn't `ok` — copy a command, follow a link, or read plain instructions. */\nexport type ConnectAction =\n /** `runnable` marks a command with no placeholders and no interactive prompts — safe for the server to execute directly instead of just displaying it. */\n | { kind: 'command'; command: string; runnable?: boolean }\n | { kind: 'link'; url: string; label: string }\n | { kind: 'text'; message: string };\n\nexport interface ConnectionResult {\n id: ServiceId;\n label: string;\n unlocks: string;\n status: CapabilityStatus;\n detail: string;\n authenticated: boolean | null;\n connect: ConnectAction | null;\n}\n\nexport interface MergePolicy {\n allowSquashMerge: boolean;\n allowMergeCommit: boolean;\n allowRebaseMerge: boolean;\n squashMergeCommitTitle: string;\n squashMergeCommitMessage: string;\n}\n\nexport type MergePolicyResult =\n | { status: 'ok'; repo: string; policy: MergePolicy }\n | { status: 'unavailable'; reason: string };\n\nexport interface GitStatusEntry {\n path: string;\n status: string;\n staged: boolean;\n renameSource?: string;\n}\n\nexport interface GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n ahead: number;\n behind: number;\n diverged: boolean;\n branchHygiene: BranchHygieneStatus;\n}\n\nexport interface FileDiffEntry {\n path: string;\n renameSource?: string;\n staged: boolean;\n binary: boolean;\n additions: number;\n deletions: number;\n // 'diff' is a unified patch (tracked files); 'raw' is untracked file content, not a\n // patch; 'too-large' means `patch` is empty and the file was skipped.\n contentKind: 'diff' | 'raw' | 'too-large';\n patch: string;\n}\n\nexport type BranchHygieneStatus =\n | 'clean-on-main'\n | 'stale-merged'\n | 'stale-no-upstream'\n | 'dirty'\n | 'fine';\n\nexport interface GitLiveState {\n branch: string;\n ahead: number;\n behind: number;\n dirtyCount: number;\n}\n\nexport interface GitSyncFailure {\n ok: false;\n stage: 'reconcile' | 'stash-pop' | 'conflicted';\n message: string;\n stashPending: boolean;\n // Only set when stage is 'conflicted': the files a rebase left with unresolved\n // markers, for a one-click \"ask the agent to resolve\" rather than a bare error.\n conflictedFiles?: string[];\n // Only set when stage is 'conflicted': the ref the rebase targeted, and each\n // conflicted file's last-seen content (with markers) before the rebase was\n // aborted for safety — the resolve-conflict agent's raw material.\n conflictRef?: string;\n conflictedContent?: { path: string; content: string }[];\n // Prompt for the agent recovery job (see git-sync-recovery.ts) — the deterministic\n // path's failure, the working-tree state, and the goal, packaged for a future\n // launch rather than thrown at the user.\n recoveryPrompt: string;\n // Only set when stage is 'conflicted': a prompt scoped to landing this one rebase\n // (see resolve-conflict-prompt.ts) — launched only on explicit \"ask the agent to\n // resolve\" confirmation from the sync-failed toast, never automatically.\n conflictPrompt?: string;\n}\n\nexport type GitSyncResult = { ok: true } | GitSyncFailure;\n\nexport type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error' | 'superseded';\n\nexport type TaskKind =\n | 'phase'\n | 'audit'\n | 'batch-reconcile'\n | 'run-all'\n | 'draft'\n | 'extend'\n | 'suggest'\n | 'commit-suggest'\n | 'overlap-check'\n | 'prioritise'\n | 'sync'\n | 'reconcile'\n | 'fix-review'\n | 'resolve-conflict'\n | 'feedback';\n\n// Persisted to papercamp/tasks.log (JSON Lines) — survives a dev-server restart,\n// unlike the in-memory task registry.\nexport interface TaskLogEntry {\n id: string;\n taskKind: TaskKind;\n planId?: string;\n planTitle: string;\n agentId: AgentId;\n startedAt: string;\n endedAt: string;\n outcome: 'done' | 'error' | 'superseded';\n reason?: string;\n usage?: RunUsage;\n phaseRuns?: PhaseRunRecord[];\n rateLimit?: RateLimitSnapshot;\n}\n\nexport interface RunUsage {\n durationMs: number;\n numTurns: number;\n model?: string;\n inputTokens: number;\n outputTokens: number;\n cacheCreationTokens: number;\n cacheReadTokens: number;\n costUsd: number;\n}\n\nexport interface RateLimitSnapshot {\n status: string;\n rateLimitType?: string;\n resetsAt?: number;\n overage?: boolean;\n}\n\nexport interface PhaseRunRecord {\n kind: 'phase' | 'fix';\n index: number;\n usage: RunUsage;\n}\n\nexport interface TrailHop<T> {\n reached: boolean;\n data?: T;\n}\n\nexport interface ProvenanceTrail {\n id: string;\n idea: TrailHop<{ title: string; status?: EntityStatus; type?: EntityType }>;\n phases: TrailHop<PhaseItem[]>;\n taskRuns: TrailHop<TaskLogEntry[]>;\n commits: TrailHop<string[]>;\n pr: TrailHop<PrInfo>;\n releaseLine: TrailHop<string>;\n}\n\nexport interface ReleaseNoteIdea {\n id: string;\n title: string;\n}\n\nexport interface ReleaseNoteSection {\n label: string;\n ideas: ReleaseNoteIdea[];\n}\n\nexport interface AgentTaskState {\n id: string;\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n planId?: string;\n phaseIndex?: number;\n fixAttempt?: number;\n fixAttemptCap?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n phaseAnchor?: PhaseMilestone;\n anchorEnteredAt?: number;\n lastStreamAt?: number;\n // fix-review only: prefills the commit form once the agent has reported.\n suggestedCommit?: { title: string; message: string };\n errorKind?: 'auth' | 'question';\n rateLimit?: RateLimitSnapshot;\n}\n\nexport interface OverlapVerdict {\n verdict: 'existing' | 'extend' | 'new';\n targetId: string | null;\n reasoning: string;\n}\n\n/** `why` carries one line per entry in `order`, same index — the reason for that id's placement. */\nexport interface PrioritiseVerdict {\n order: string[];\n why: string;\n}\n\nexport interface ReconcileQueueItem {\n planId: string;\n title: string;\n before: { body: string; phases: PhaseItem[] };\n}\n"],"names":["PLAN_STATUSES","PLAN_KINDS","AGENT_IDS","AGENT_LABELS","AGENT_OPTIONS","coerceAgentConfig","v","toAgent","a","obj","DEFAULT_AGENTS","TOOLBAR_SEGMENT_IDS"],"mappings":"AAEO,MAAMA,IAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASaC,IAAyB,CAAC,QAAQ,OAAO,SAAS,QAAQ,UAAU,GAEpEC,IAAY,CAAC,eAAe,UAAU,GAItCC,IAAwC;AAAA,EACnD,eAAe;AAAA,EACf,UAAU;AACZ,GA6ZaC,IAAyD;AAAA,EACpE,eAAe;AAAA,IACb,OAAO,CAAC,QAAQ,UAAU,SAAS,OAAO;AAAA,IAC1C,QAAQ,CAAC,OAAO,UAAU,QAAQ,SAAS,KAAK;AAAA,EAAA;AAAA,EAElD,UAAU;AAAA,IACR,OAAO;AAAA,EAAA;AAEX;AAEO,SAASC,EAAkBC,GAAyB;AACzD,QAAMC,IAAU,CAACC,MACfN,EAAU,SAASM,CAAY,IAAKA,IAAgB;AACtD,MAAI,OAAOF,KAAM,SAAU,QAAO,EAAE,OAAOC,EAAQD,CAAC,EAAA;AAEpD,QAAMG,IAAOH,KAAK,CAAA;AAClB,SAAO;AAAA,IACL,OAAOC,EAAQE,EAAI,KAAK;AAAA,IACxB,GAAI,OAAOA,EAAI,SAAU,YAAY,EAAE,OAAOA,EAAI,MAAA;AAAA,IAClD,GAAI,OAAOA,EAAI,UAAW,YAAY,EAAE,QAAQA,EAAI,OAAA;AAAA,EAAO;AAE/D;AAUO,MAAMC,IAAmC;AAAA,EAC9C,OAAO,EAAE,OAAO,WAAA;AAAA,EAChB,WAAW,EAAE,OAAO,cAAA;AAAA,EACpB,YAAY,EAAE,OAAO,cAAA;AAAA,EACrB,eAAe,EAAE,OAAO,cAAA;AAAA,EACxB,UAAU,EAAE,OAAO,eAAe,OAAO,UAAU,QAAQ,SAAA;AAC7D,GAGaC,IAAsB,CAAC,SAAS,SAAS,MAAM;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/types/index.ts"],"sourcesContent":["export type PlanStatus = 'idea' | 'planned' | 'in-progress' | 'review' | 'done' | 'dropped';\n\nexport const PLAN_STATUSES: PlanStatus[] = [\n 'idea',\n 'planned',\n 'in-progress',\n 'review',\n 'done',\n 'dropped',\n];\n\nexport interface LogEntry {\n date: string;\n text: string;\n}\n\nexport type PlanKind = 'feat' | 'fix' | 'chore' | 'docs' | 'refactor';\n\nexport const PLAN_KINDS: PlanKind[] = ['feat', 'fix', 'chore', 'docs', 'refactor'];\n\nexport const AGENT_IDS = ['claude-code', 'opencode'] as const;\n\nexport type AgentId = (typeof AGENT_IDS)[number];\n\nexport const AGENT_LABELS: Record<AgentId, string> = {\n 'claude-code': 'Claude Code',\n opencode: 'OpenCode',\n};\n\nexport interface PhaseRun {\n durationMs: number;\n inputTokens: number;\n outputTokens: number;\n model?: string;\n attempts: number;\n}\n\nexport interface PhaseItem {\n done: boolean;\n text: string;\n description?: string;\n source?: 'review';\n run?: PhaseRun;\n}\n\nexport type PhaseMilestone = 'implement' | 'verify' | 'checkbox';\n\n/** A body section anchor is `body` for now — the whole prose block is the only\n * body section a plan/entity has until later phases break it into sub-sections. */\nexport type MarginNoteAnchor = { kind: 'phase'; index: number } | { kind: 'body' };\n\nexport type MarginNoteState = 'open' | 'resolved';\n\nexport type MarginNoteKind = 'note' | 'decision' | 'question';\n\nexport interface MarginNote {\n anchor: MarginNoteAnchor;\n prose: string;\n state: MarginNoteState;\n kind?: MarginNoteKind;\n}\n\n/** What a thread message originally was, before log/review/notes/clarifications folded\n * into one ordered thread on the entity — 'note'/'decision'/'question' carry `state`,\n * the rest are plain historical records. 'chat' is thread-native (no legacy section):\n * Paper Scout conversation, collapsed by default in thread views. */\nexport type ThreadMessageKind =\n | 'log'\n | 'clarification'\n | 'review'\n | 'note'\n | 'decision'\n | 'question'\n | 'chat';\n\nexport interface ThreadMessage {\n kind: ThreadMessageKind;\n /** Absent for messages ported from the old Notes section, which never carried a date. */\n date?: string;\n text: string;\n /** Only meaningful for note/decision/question kinds. */\n state?: MarginNoteState;\n /** Absent means 'user' — no thread message predates this field being agent-authored. */\n from?: 'user' | 'agent';\n}\n\n/** Ambient context a chat mount (desk, toolbar) feeds alongside a message — each\n * mount populates whatever it has (IDEA-130); Scout folds it into the prompt\n * silently, it never becomes a user-visible field. */\nexport interface MountContext {\n route?: string;\n focusedIdeaId?: string;\n viewport?: { width: number; height: number };\n}\n\nexport interface RawEntry {\n title: string;\n fields: Record<string, string>;\n body: string;\n phases: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n notes?: MarginNote[];\n review?: LogEntry[];\n}\n\nexport interface ParseWarning {\n title: string;\n message: string;\n}\n\nexport interface ParseResult<T> {\n entries: T[];\n warnings: ParseWarning[];\n}\n\n/** A PR's reviewable/mergeable state, as surfaced by `gh pr list`. */\nexport type PrState = 'draft' | 'open' | 'closed' | 'merged';\n\n/** GitHub's PR review decision, as surfaced by `gh pr list --json reviewDecision`. */\nexport type ReviewDecision = 'approved' | 'changes-requested' | 'review-required';\n\n// Per-comment detail; PrInfo.unresolvedThreadCount only counts these.\nexport interface ReviewThread {\n /** GraphQL node id — what `resolveReviewThread`/`replyToReviewThread` address. */\n id: string;\n /** File path the comment is anchored to; absent for a PR-level (not diff-anchored) comment. */\n path?: string;\n line?: number;\n author?: string;\n body: string;\n}\n\n// Parsed from the JSON object a fix-review agent's prompt requires as its final line.\nexport interface FixReviewResult {\n commit: { title: string; message: string };\n addressed: string[];\n skipped: { threadId: string; why: string }[];\n}\n\nexport interface FeedbackPhaseEdit {\n op: 'add' | 'reword';\n /** 1-based position in the plan's current phase list; required for \"reword\", ignored for \"add\". */\n index?: number;\n text: string;\n description?: string;\n}\n\nexport interface FeedbackEdit {\n phases?: FeedbackPhaseEdit[];\n /** The complete replacement body, when the message corrects body prose. */\n body?: string;\n}\n\n// Parsed from the JSON object a feedback-reply agent's prompt requires as its\n// final line. The chat never creates ideas — a request is either a reply or an\n// edit on the current plan.\nexport interface FeedbackReplyResult {\n reply: string;\n edit?: FeedbackEdit;\n /** True when the user's message answers an open question the agent asked\n * earlier in this thread — the route persists that message as a clarification. */\n answersQuestion?: boolean;\n}\n\n/** Live-resolved PR info for an entity's branch — see `core/pr.ts`. */\nexport interface PrInfo {\n number: number;\n url: string;\n state: PrState;\n /** Undefined when no review has been requested/decided, or when unresolved (offline, closed/merged PR). */\n reviewDecision?: ReviewDecision;\n /** Count of unresolved review threads. Only fetched for open/draft PRs; undefined when not fetched or unresolved. */\n unresolvedThreadCount?: number;\n /** Whether a comment or review landed after the PR's last commit — a proxy for \"since the last agent pass\" (a pass ends with a push). Only fetched for open/draft PRs. */\n hasNewCommentsSincePush?: boolean;\n}\n\nexport interface PlanEntry {\n title: string;\n status: PlanStatus;\n kind?: PlanKind;\n id?: string;\n idea?: string;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n /** Version tag (e.g. v0.13.1) that first shipped this idea, stamped from the release train. */\n released?: string;\n tags: string[];\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n body: string;\n phases: PhaseItem[];\n /** Post-build findings, same checkbox grammar as `phases` — see EntityEntry.fixes. */\n fixes?: PhaseItem[];\n log?: LogEntry[];\n clarifications?: LogEntry[];\n notes?: MarginNote[];\n /** Prose written against the whole finished plan, distinct from the flat `log` — an\n * agent later splits each entry into rework phases or a follow-up idea. */\n review?: LogEntry[];\n /** The entity's single ordered feedback thread — see EntityEntry.thread. */\n thread?: ThreadMessage[];\n /** Set by readEntities from which dir the file came from — see EntityEntry.archived. */\n archived?: boolean;\n pr?: PrInfo;\n}\n\nexport interface ArchivableIdea {\n id: string;\n title: string;\n pr: PrInfo;\n}\n\n/** One open `question` thread message, resolved to the idea it's parked on. `ageDays`\n * is `Infinity` for a question ported from the pre-Thread Notes section, which never\n * carried a date — the oldest kind of unresolved question there is. */\nexport interface ParkedQuestion {\n entityId: string;\n entityTitle: string;\n text: string;\n date?: string;\n ageDays: number;\n}\n\n/** The two event-sourced notification kinds (IDEA-153) — 'completed' when a task\n * reaches done/error, 'reply' when an agent posts a non-blocking feedback thread\n * entry. Unlike ParkedQuestion (derived live from thread state), these are stored\n * as discrete events on read, so a since-resolved source can't erase them. */\nexport type StoredNotificationKind = 'completed' | 'reply';\n\nexport interface StoredNotification {\n id: string;\n kind: StoredNotificationKind;\n entityId: string;\n entityTitle: string;\n text: string;\n date: string;\n read: boolean;\n /** Only set for 'completed' — the task outcome that triggered it. */\n outcome?: 'done' | 'error';\n}\n\n/** One unified feed entry (IDEA-153) — a parked question (open→resolved, always\n * unread while it's shown at all) alongside the two stored, read/unread kinds. */\nexport type Notification = (ParkedQuestion & { kind: 'question' }) | StoredNotification;\n\nexport type ConsistencyIssueKind = 'orphan-subject' | 'title-style';\n\nexport interface ConsistencyIssue {\n kind: ConsistencyIssueKind;\n section: 'plans';\n title: string;\n message: string;\n planId?: string;\n}\n\nexport interface CommentStats {\n commentLines: number;\n sourceLines: number;\n ratio: number;\n}\n\nexport interface TasksPerWeek {\n /** ISO week, e.g. \"2026-W05\". */\n week: string;\n count: number;\n}\n\nexport interface UsagePerWeek {\n /** ISO week, e.g. \"2026-W05\". */\n week: string;\n agentMinutes: number;\n inputTokens: number;\n outputTokens: number;\n}\n\nexport interface IdeaCost {\n planId: string;\n planTitle: string;\n inputTokens: number;\n outputTokens: number;\n durationMs: number;\n}\n\nexport interface CapacityStat {\n snapshot: RateLimitSnapshot;\n capturedAt: string;\n}\n\nexport interface ProjectStats {\n generatedAt: string;\n comments: CommentStats;\n testLines: number;\n /** Null when no coverage report has been emitted yet (run `pnpm test`). */\n testCoveragePct: number | null;\n entitiesByStatus: Partial<Record<EntityStatus, number>>;\n openQuestions: number;\n decisions: number;\n tasksPerWeek: TasksPerWeek[];\n usagePerWeek: UsagePerWeek[];\n medianPhaseDurationMs: number | null;\n mostExpensiveIdeas: IdeaCost[];\n capacity: CapacityStat | null;\n}\n\nexport type IdeaKind = 'idea' | 'note';\n\nexport type IdeaStatus = 'open' | 'done' | 'dropped';\n\nexport interface IdeaEntry {\n id: string | null;\n title: string;\n body: string;\n kind?: IdeaKind;\n status?: IdeaStatus;\n /** Absent renders under the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n /** Fallback sort key for unordered entries — see `order`. Absent on view-model-only IdeaEntry literals that never enter the worklist sort. */\n created?: string;\n log?: LogEntry[];\n}\n\n// Unified entity — one file per entity, plan as an optional Phases section.\n// Supersedes PlanEntry/IdeaEntry once the migration cutover lands.\n\n/** Work classification — same Conventional-Commits values as PlanKind; `kind` renamed to `type` in the unified schema. */\nexport type EntityType = PlanKind;\n\n/** Plan lifecycle plus the note-only `open`. Notes use open → done/dropped; everything else uses the PlanStatus track. */\nexport type EntityStatus = PlanStatus | 'open';\n\nexport interface EntityEntry {\n id: string;\n title: string;\n /** Absent until the entity is classified (usually when its plan is drafted). */\n type?: EntityType;\n /** \"note\" marks an entity that never grows phases. */\n kind?: 'note';\n /** Stored override, not the source of truth — see entityFrontmatterSchema. */\n status?: EntityStatus;\n agent?: AgentId;\n created: string;\n updated?: string;\n audited?: string;\n auditedHash?: string;\n /** Version tag (e.g. v0.13.1) that first shipped this idea, stamped from the release train. */\n released?: string;\n tags: string[];\n /** Absent renders as the virtual \"No subject\" group. */\n subject?: string;\n /** Absent means unordered — sorts after all ordered entries, by created date. */\n order?: number;\n body: string;\n phases: PhaseItem[];\n /** Post-build findings, same checkbox grammar as `phases` — appended below Phases\n * rather than rewriting the plan's already-finished phase history. */\n fixes?: PhaseItem[];\n /** The entity's single ordered feedback thread — folds what used to be separate\n * log/clarifications/notes/review sections. */\n thread?: ThreadMessage[];\n /** Set by readEntities from which of the two scanned dirs the file came from, not the frontmatter. */\n archived?: boolean;\n}\n\n// No `id`/`status`: it only becomes a real idea if a human promotes it.\nexport interface SuggestionEntry {\n date: string;\n title: string;\n description: string;\n}\n\nexport interface RoadmapItem {\n name: string;\n description: string;\n candidates: string[];\n linked: string[];\n}\n\nexport interface RoadmapHorizon {\n title: string;\n items: RoadmapItem[];\n}\n\nexport interface Roadmap {\n goal: string;\n horizons: RoadmapHorizon[];\n standingConcerns: RoadmapItem[];\n}\n\nexport interface RoadmapLink {\n id: string;\n status: PlanStatus;\n taskRuns: number;\n pr?: PrInfo;\n released: boolean;\n}\n\nexport interface RoadmapRollup {\n total: number;\n done: number;\n}\n\nexport interface ResolvedRoadmapItem extends RoadmapItem {\n links: RoadmapLink[];\n rollup: RoadmapRollup;\n}\n\nexport interface ResolvedRoadmapHorizon {\n title: string;\n items: ResolvedRoadmapItem[];\n rollup: RoadmapRollup;\n}\n\nexport interface ResolvedRoadmap {\n goal: string;\n horizons: ResolvedRoadmapHorizon[];\n events: RoadmapEvent[];\n}\n\nexport type RoadmapEventKind = 'created' | 'task-run';\n\nexport interface RoadmapEvent {\n date: string;\n kind: RoadmapEventKind;\n entityId: string;\n horizonTitle: string;\n itemName: string;\n label: string;\n}\n\nexport interface EnvEntry {\n key: string;\n value: string;\n /** Set on GET responses when the value is withheld — secrets never reach the client. */\n isSet?: boolean;\n}\n\nexport interface AgentConfig {\n agent: AgentId;\n model?: string;\n effort?: string;\n}\n\n/** Model/effort passed to an adapter's buildArgs — the AgentConfig minus the agent id. */\nexport interface AgentRunOptions {\n model?: string;\n effort?: string;\n /** Prior claude-code session id to continue instead of starting cold; ignored by opencode. */\n resume?: string;\n}\n\n/** Maps option names to a fixed value list (renders a Select) or null (free-text or hidden). */\nexport type AgentOptionsDescriptor = Record<string, string[] | null | undefined>;\n\nexport const AGENT_OPTIONS: Record<AgentId, AgentOptionsDescriptor> = {\n 'claude-code': {\n model: ['opus', 'sonnet', 'fable', 'haiku'],\n effort: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n opencode: {\n model: null,\n },\n};\n\nexport function coerceAgentConfig(v: unknown): AgentConfig {\n const toAgent = (a: unknown): AgentId =>\n AGENT_IDS.includes(a as AgentId) ? (a as AgentId) : 'claude-code';\n if (typeof v === 'string') return { agent: toAgent(v) };\n // A missing key must not throw — that would 500 the /api/config read this protects.\n const obj = (v ?? {}) as Record<string, unknown>;\n return {\n agent: toAgent(obj.agent),\n ...(typeof obj.model === 'string' && { model: obj.model }),\n ...(typeof obj.effort === 'string' && { effort: obj.effort }),\n };\n}\n\nexport interface DefaultAgentsMap {\n phase: AgentConfig;\n planDraft: AgentConfig;\n ideaExtend: AgentConfig;\n commitSuggest: AgentConfig;\n feedback: AgentConfig;\n}\n\nexport const DEFAULT_AGENTS: DefaultAgentsMap = {\n phase: { agent: 'opencode' },\n planDraft: { agent: 'claude-code' },\n ideaExtend: { agent: 'claude-code' },\n commitSuggest: { agent: 'claude-code' },\n feedback: { agent: 'claude-code', model: 'sonnet', effort: 'medium' },\n};\n\n/** Toolbar segments, left to right (IDEA-128/IDEA-133); trimmed per project via `IntegrationConfig.toolbar.segments`. */\nexport const TOOLBAR_SEGMENT_IDS = ['focus', 'scout', 'desk'] as const;\n\nexport type ToolbarSegmentId = (typeof TOOLBAR_SEGMENT_IDS)[number];\n\nexport interface IntegrationToolbarConfig {\n enabled?: boolean;\n segments?: ToolbarSegmentId[];\n /** Opt-in escape hatch: without it, the vite plugin stays off when `mode` is `production`. */\n allowProduction?: boolean;\n}\n\nexport interface IntegrationConfig {\n toolbar?: IntegrationToolbarConfig;\n route?: string;\n}\n\nexport interface DeskService {\n name: string;\n cmd: string;\n port?: number;\n healthcheck?: string;\n}\n\nexport interface DeskCheck {\n name: string;\n cmd: string;\n}\n\nexport interface DeskCi {\n repo: string;\n branch?: string;\n releasePlease?: boolean;\n}\n\n/** Dev-loop manifest (IDEA-119): declared services, one-click checks, and CI/release sources. */\nexport interface DeskConfig {\n services?: DeskService[];\n checks?: DeskCheck[];\n ci?: DeskCi;\n}\n\nexport type ServiceRunStatus = 'stopped' | 'running' | 'stopping' | 'crashed';\n\nexport type ServiceHealth = 'unknown' | 'up' | 'down';\n\n/** Live runtime view of a declared service (IDEA-119), merging manifest + process state. */\nexport interface ServiceState {\n name: string;\n cmd: string;\n port?: number;\n hasHealthcheck: boolean;\n status: ServiceRunStatus;\n health: ServiceHealth;\n pid: number | null;\n startedAt: string | null;\n exitCode: number | null;\n}\n\n/** Live result of a declared one-click check (IDEA-119), mirroring the Stack panel's CheckResult. */\nexport interface DeskCheckState {\n name: string;\n cmd: string;\n status: CheckStatus;\n lastRun: string | null;\n output: string;\n}\n\nexport type CiRunStatus =\n | 'success'\n | 'failure'\n | 'in_progress'\n | 'queued'\n | 'cancelled'\n | 'unknown';\n\nexport interface CiRun {\n workflow: string;\n status: CiRunStatus;\n url: string | null;\n}\n\nexport interface ReleasePr {\n number: number;\n title: string;\n url: string;\n version: string | null;\n}\n\n/** CI & release mirror for a declared repo (IDEA-119): latest Actions runs on the tracked\n * branch, the open release-please PR, and the released vs. queued version. */\nexport interface CiReleaseState {\n repo: string;\n branch: string;\n available: boolean;\n runs: CiRun[];\n releasePr: ReleasePr | null;\n releasedVersion: string | null;\n}\n\nexport interface PaperCampConfig {\n version: string;\n projectName: string;\n initializedAt: string;\n /** The unified-entity `idea` counter; the per-kind plan counters are legacy, present only in pre-migration configs. */\n nextId?: Partial<Record<PlanKind, number>> & { idea?: number };\n port?: number;\n defaultAgents?: DefaultAgentsMap;\n /** Derived from `ROADMAP.md` on every read (IDEA-95), never written to disk; an idea's\n * `subject` not present here renders as \"No subject\". */\n subjects?: string[];\n /** Opts out of the first-run redirect to Settings > Setup while capabilities are incomplete. */\n setupDismissed?: boolean;\n /** In-app dev toolbar (IDEA-128) — the `@dendelion/paper-camp/vite` plugin's mount, toggleable for frontend targets. */\n integration?: IntegrationConfig;\n /** Dev-loop desk manifest (IDEA-119) — declared services, checks, and CI/release sources per project. */\n desk?: DeskConfig;\n /** Project-declared commands the desk/embed can run on demand (IDEA-157). */\n commands?: {\n /** Manual build for the Stack's Build action; no universal default. */\n build?: string;\n };\n}\n\nexport type CheckStatus = 'stale' | 'running' | 'pass' | 'fail';\n\nexport interface CheckResult {\n status: CheckStatus;\n /** The shell command this check runs — empty until a build command is configured. */\n cmd: string;\n lastRun: string | null;\n output: string;\n}\n\nexport type CheckName = 'lint' | 'format' | 'test' | 'consistency' | 'build';\n\nexport type CapabilityStatus = 'ok' | 'warn' | 'missing';\n\nexport interface CapabilityResult {\n id: string;\n status: CapabilityStatus;\n detail: string;\n}\n\nexport interface AgentAuthStatus {\n loggedIn: boolean | null;\n authMethod: string | null;\n apiProvider: string | null;\n}\n\nexport type LoginRelayPhase =\n | 'starting'\n | 'awaiting-authorization'\n | 'success'\n | 'error'\n | 'cancelled';\n\nexport interface LoginRelayState {\n phase: LoginRelayPhase;\n authorizeUrl: string | null;\n error?: string;\n}\n\nexport type ServiceId = 'git' | 'gh' | `agent:${AgentId}`;\n\n/** What a Connections row offers once its service isn't `ok` — copy a command, follow a link, or read plain instructions. */\nexport type ConnectAction =\n /** `runnable` marks a command with no placeholders and no interactive prompts — safe for the server to execute directly instead of just displaying it. */\n | { kind: 'command'; command: string; runnable?: boolean }\n | { kind: 'link'; url: string; label: string }\n | { kind: 'text'; message: string };\n\nexport interface ConnectionResult {\n id: ServiceId;\n label: string;\n unlocks: string;\n status: CapabilityStatus;\n detail: string;\n authenticated: boolean | null;\n connect: ConnectAction | null;\n}\n\nexport interface MergePolicy {\n allowSquashMerge: boolean;\n allowMergeCommit: boolean;\n allowRebaseMerge: boolean;\n squashMergeCommitTitle: string;\n squashMergeCommitMessage: string;\n}\n\nexport type MergePolicyResult =\n | { status: 'ok'; repo: string; policy: MergePolicy }\n | { status: 'unavailable'; reason: string };\n\nexport interface GitStatusEntry {\n path: string;\n status: string;\n staged: boolean;\n renameSource?: string;\n}\n\nexport interface GitStatusResponse {\n branch: string;\n entries: GitStatusEntry[];\n ahead: number;\n behind: number;\n diverged: boolean;\n branchHygiene: BranchHygieneStatus;\n}\n\nexport interface FileDiffEntry {\n path: string;\n renameSource?: string;\n staged: boolean;\n binary: boolean;\n additions: number;\n deletions: number;\n // 'diff' is a unified patch (tracked files); 'raw' is untracked file content, not a\n // patch; 'too-large' means `patch` is empty and the file was skipped.\n contentKind: 'diff' | 'raw' | 'too-large';\n patch: string;\n}\n\nexport type BranchHygieneStatus =\n | 'clean-on-main'\n | 'stale-merged'\n | 'stale-no-upstream'\n | 'dirty'\n | 'fine';\n\nexport interface GitLiveState {\n branch: string;\n ahead: number;\n behind: number;\n dirtyCount: number;\n}\n\nexport interface GitSyncFailure {\n ok: false;\n stage: 'reconcile' | 'stash-pop' | 'conflicted';\n message: string;\n stashPending: boolean;\n // Only set when stage is 'conflicted': the files a rebase left with unresolved\n // markers, for a one-click \"ask the agent to resolve\" rather than a bare error.\n conflictedFiles?: string[];\n // Only set when stage is 'conflicted': the ref the rebase targeted, and each\n // conflicted file's last-seen content (with markers) before the rebase was\n // aborted for safety — the resolve-conflict agent's raw material.\n conflictRef?: string;\n conflictedContent?: { path: string; content: string }[];\n // Prompt for the agent recovery job (see git-sync-recovery.ts) — the deterministic\n // path's failure, the working-tree state, and the goal, packaged for a future\n // launch rather than thrown at the user.\n recoveryPrompt: string;\n // Only set when stage is 'conflicted': a prompt scoped to landing this one rebase\n // (see resolve-conflict-prompt.ts) — launched only on explicit \"ask the agent to\n // resolve\" confirmation from the sync-failed toast, never automatically.\n conflictPrompt?: string;\n}\n\nexport type GitSyncResult = { ok: true } | GitSyncFailure;\n\nexport type AgentTaskStatus = 'starting' | 'running' | 'stopping' | 'done' | 'error' | 'superseded';\n\nexport type TaskKind =\n | 'phase'\n | 'audit'\n | 'batch-reconcile'\n | 'run-all'\n | 'draft'\n | 'extend'\n | 'suggest'\n | 'commit-suggest'\n | 'overlap-check'\n | 'prioritise'\n | 'sync'\n | 'reconcile'\n | 'fix-review'\n | 'resolve-conflict'\n | 'feedback';\n\n// Persisted to papercamp/tasks.log (JSON Lines) — survives a dev-server restart,\n// unlike the in-memory task registry.\nexport interface TaskLogEntry {\n id: string;\n taskKind: TaskKind;\n planId?: string;\n planTitle: string;\n agentId: AgentId;\n startedAt: string;\n endedAt: string;\n outcome: 'done' | 'error' | 'superseded';\n reason?: string;\n usage?: RunUsage;\n phaseRuns?: PhaseRunRecord[];\n rateLimit?: RateLimitSnapshot;\n}\n\nexport interface RunUsage {\n durationMs: number;\n numTurns: number;\n model?: string;\n inputTokens: number;\n outputTokens: number;\n cacheCreationTokens: number;\n cacheReadTokens: number;\n costUsd: number;\n}\n\nexport interface RateLimitSnapshot {\n status: string;\n rateLimitType?: string;\n resetsAt?: number;\n overage?: boolean;\n}\n\nexport interface PhaseRunRecord {\n kind: 'phase' | 'fix';\n index: number;\n usage: RunUsage;\n}\n\nexport interface TrailHop<T> {\n reached: boolean;\n data?: T;\n}\n\nexport interface ProvenanceTrail {\n id: string;\n idea: TrailHop<{ title: string; status?: EntityStatus; type?: EntityType }>;\n phases: TrailHop<PhaseItem[]>;\n taskRuns: TrailHop<TaskLogEntry[]>;\n commits: TrailHop<string[]>;\n pr: TrailHop<PrInfo>;\n releaseLine: TrailHop<string>;\n}\n\nexport interface ReleaseNoteIdea {\n id: string;\n title: string;\n}\n\nexport interface ReleaseNoteSection {\n label: string;\n ideas: ReleaseNoteIdea[];\n}\n\nexport interface AgentTaskState {\n id: string;\n status: AgentTaskStatus;\n taskKind: TaskKind;\n planTitle: string;\n planId?: string;\n phaseIndex?: number;\n fixAttempt?: number;\n fixAttemptCap?: number;\n ideaId?: string;\n agentId: AgentId;\n lines: string[];\n phaseAnchor?: PhaseMilestone;\n anchorEnteredAt?: number;\n lastStreamAt?: number;\n // fix-review only: prefills the commit form once the agent has reported.\n suggestedCommit?: { title: string; message: string };\n errorKind?: 'auth' | 'question';\n rateLimit?: RateLimitSnapshot;\n}\n\nexport interface OverlapVerdict {\n verdict: 'existing' | 'extend' | 'new';\n targetId: string | null;\n reasoning: string;\n}\n\n/** `why` carries one line per entry in `order`, same index — the reason for that id's placement. */\nexport interface PrioritiseVerdict {\n order: string[];\n why: string;\n}\n\nexport interface ReconcileQueueItem {\n planId: string;\n title: string;\n before: { body: string; phases: PhaseItem[] };\n}\n"],"names":["PLAN_STATUSES","PLAN_KINDS","AGENT_IDS","AGENT_LABELS","AGENT_OPTIONS","coerceAgentConfig","v","toAgent","a","obj","DEFAULT_AGENTS","TOOLBAR_SEGMENT_IDS"],"mappings":"AAEO,MAAMA,IAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASaC,IAAyB,CAAC,QAAQ,OAAO,SAAS,QAAQ,UAAU,GAEpEC,IAAY,CAAC,eAAe,UAAU,GAItCC,IAAwC;AAAA,EACnD,eAAe;AAAA,EACf,UAAU;AACZ,GAmbaC,IAAyD;AAAA,EACpE,eAAe;AAAA,IACb,OAAO,CAAC,QAAQ,UAAU,SAAS,OAAO;AAAA,IAC1C,QAAQ,CAAC,OAAO,UAAU,QAAQ,SAAS,KAAK;AAAA,EAAA;AAAA,EAElD,UAAU;AAAA,IACR,OAAO;AAAA,EAAA;AAEX;AAEO,SAASC,EAAkBC,GAAyB;AACzD,QAAMC,IAAU,CAACC,MACfN,EAAU,SAASM,CAAY,IAAKA,IAAgB;AACtD,MAAI,OAAOF,KAAM,SAAU,QAAO,EAAE,OAAOC,EAAQD,CAAC,EAAA;AAEpD,QAAMG,IAAOH,KAAK,CAAA;AAClB,SAAO;AAAA,IACL,OAAOC,EAAQE,EAAI,KAAK;AAAA,IACxB,GAAI,OAAOA,EAAI,SAAU,YAAY,EAAE,OAAOA,EAAI,MAAA;AAAA,IAClD,GAAI,OAAOA,EAAI,UAAW,YAAY,EAAE,QAAQA,EAAI,OAAA;AAAA,EAAO;AAE/D;AAUO,MAAMC,IAAmC;AAAA,EAC9C,OAAO,EAAE,OAAO,WAAA;AAAA,EAChB,WAAW,EAAE,OAAO,cAAA;AAAA,EACpB,YAAY,EAAE,OAAO,cAAA;AAAA,EACrB,eAAe,EAAE,OAAO,cAAA;AAAA,EACxB,UAAU,EAAE,OAAO,eAAe,OAAO,UAAU,QAAQ,SAAA;AAC7D,GAGaC,IAAsB,CAAC,SAAS,SAAS,MAAM;"}
|
package/dist/vite/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAKlD,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,SAAS,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAKlD,eAAO,MAAM,UAAU,gBAAgB,CAAC;AAExC,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,SAAS,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,CAuCvE;AAED,eAAe,SAAS,CAAC"}
|
package/dist/vite/index.js
CHANGED
|
@@ -1,68 +1,75 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { request as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return (t == null ? void 0 : t.getAttribute(
|
|
1
|
+
import { r as h, a as b } from "../chunks/dev-port.CEt1H9LA.js";
|
|
2
|
+
import { request as T } from "node:http";
|
|
3
|
+
const $ = "paper-camp-toolbar-script", g = "data-route", m = "data-paper-camp-mount";
|
|
4
|
+
function C(t) {
|
|
5
|
+
return (t == null ? void 0 : t.getAttribute(m)) ?? "";
|
|
6
6
|
}
|
|
7
|
-
typeof document > "u" ||
|
|
8
|
-
function
|
|
9
|
-
return t.replace('<div id="root">', `<div id="root" ${
|
|
7
|
+
typeof document > "u" || C(document.getElementById("root"));
|
|
8
|
+
function w(t, o) {
|
|
9
|
+
return t.replace('<div id="root">', `<div id="root" ${m}="${o}">`);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const e =
|
|
11
|
+
function y(t, o, { port: c, host: n = "127.0.0.1", mount: r = "" }) {
|
|
12
|
+
const e = T(
|
|
13
13
|
{
|
|
14
|
-
host:
|
|
15
|
-
port:
|
|
14
|
+
host: n,
|
|
15
|
+
port: c,
|
|
16
16
|
path: t.url ?? "/",
|
|
17
17
|
method: t.method,
|
|
18
|
-
headers: { ...t.headers, host: `${
|
|
18
|
+
headers: { ...t.headers, host: `${n}:${c}`, "accept-encoding": "identity" }
|
|
19
19
|
},
|
|
20
|
-
(
|
|
21
|
-
const i = (
|
|
22
|
-
if (
|
|
20
|
+
(a) => {
|
|
21
|
+
const i = (a.headers["content-type"] ?? "").includes("text/html");
|
|
22
|
+
if (r && i) {
|
|
23
23
|
const u = [];
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
o.writeHead(
|
|
27
|
-
...
|
|
28
|
-
"content-length": String(Buffer.byteLength(
|
|
29
|
-
}), o.end(
|
|
24
|
+
a.on("data", (d) => u.push(d)), a.on("end", () => {
|
|
25
|
+
const d = w(Buffer.concat(u).toString("utf-8"), r), { "transfer-encoding": s, ...p } = a.headers;
|
|
26
|
+
o.writeHead(a.statusCode ?? 502, {
|
|
27
|
+
...p,
|
|
28
|
+
"content-length": String(Buffer.byteLength(d))
|
|
29
|
+
}), o.end(d);
|
|
30
30
|
});
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
o.writeHead(
|
|
33
|
+
o.writeHead(a.statusCode ?? 502, a.headers), a.pipe(o);
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
e.on("error", () => {
|
|
37
|
-
o.statusCode = 502, o.end(`paper-camp server is not reachable on port ${
|
|
37
|
+
o.statusCode = 502, o.end(`paper-camp server is not reachable on port ${c} — run \`paper-camp dev\`.`);
|
|
38
38
|
}), t.pipe(e);
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
function
|
|
42
|
-
let o = t.port,
|
|
40
|
+
const l = "/paper-camp";
|
|
41
|
+
function A(t = {}) {
|
|
42
|
+
let o = t.port, c = !0, n = l;
|
|
43
43
|
return {
|
|
44
44
|
name: "paper-camp-toolbar",
|
|
45
45
|
apply: "serve",
|
|
46
|
-
async configureServer(
|
|
47
|
-
o ?? (o = await
|
|
48
|
-
const e = await
|
|
49
|
-
if (
|
|
46
|
+
async configureServer(r) {
|
|
47
|
+
o ?? (o = await h(r.config.root) ?? 3333);
|
|
48
|
+
const e = await b(r.config.root), a = r.config.mode === "production";
|
|
49
|
+
if (c = ((e == null ? void 0 : e.enabled) ?? !0) && (!a || (e == null ? void 0 : e.allowProduction) === !0), n = (e == null ? void 0 : e.route) ?? l, !c) return;
|
|
50
50
|
const i = o;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
r.middlewares.use((u, d, s) => {
|
|
52
|
+
const [p, f] = (u.url ?? "").split("?", 2);
|
|
53
|
+
if (p !== n) {
|
|
54
|
+
s();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
d.statusCode = 308, d.setHeader("Location", f ? `${n}/?${f}` : `${n}/`), d.end();
|
|
58
|
+
}), r.middlewares.use(n, (u, d) => {
|
|
59
|
+
y(u, d, { port: i, mount: n });
|
|
53
60
|
});
|
|
54
61
|
},
|
|
55
|
-
transformIndexHtml(
|
|
56
|
-
return
|
|
62
|
+
transformIndexHtml(r) {
|
|
63
|
+
return c ? r.replace(
|
|
57
64
|
"</body>",
|
|
58
|
-
`<script type="module" id="${
|
|
59
|
-
) :
|
|
65
|
+
`<script type="module" id="${$}" ${g}="${n}" src="${n}/toolbar.js"><\/script></body>`
|
|
66
|
+
) : r;
|
|
60
67
|
}
|
|
61
68
|
};
|
|
62
69
|
}
|
|
63
70
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
l as CAMP_ROUTE,
|
|
72
|
+
A as default,
|
|
73
|
+
A as paperCamp
|
|
67
74
|
};
|
|
68
75
|
//# sourceMappingURL=index.js.map
|
package/dist/vite/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/toolbar/route-attribute.ts","../../src/app/services/mount.ts","../../src/vite/proxy.ts","../../src/vite/index.ts"],"sourcesContent":["export const TOOLBAR_SCRIPT_ID = 'paper-camp-toolbar-script';\nexport const ROUTE_ATTRIBUTE = 'data-route';\n","export const MOUNT_ATTRIBUTE = 'data-paper-camp-mount';\n\nexport function readMountPrefix(\n root: { getAttribute(name: string): string | null } | null,\n): string {\n return root?.getAttribute(MOUNT_ATTRIBUTE) ?? '';\n}\n\nexport const mountPrefix =\n typeof document === 'undefined' ? '' : readMountPrefix(document.getElementById('root'));\n","import { type IncomingMessage, type ServerResponse, request as httpRequest } from 'node:http';\nimport { MOUNT_ATTRIBUTE } from '../app/services/mount';\n\nexport interface ProxyToCampServerOptions {\n port: number;\n host?: string;\n mount?: string;\n}\n\nexport function injectMountAttribute(html: string, mount: string): string {\n return html.replace('<div id=\"root\">', `<div id=\"root\" ${MOUNT_ATTRIBUTE}=\"${mount}\">`);\n}\n\nexport function proxyToCampServer(\n req: IncomingMessage,\n res: ServerResponse,\n { port, host = '127.0.0.1', mount = '' }: ProxyToCampServerOptions,\n): void {\n const proxyReq = httpRequest(\n {\n host,\n port,\n path: req.url ?? '/',\n method: req.method,\n headers: { ...req.headers, host: `${host}:${port}`, 'accept-encoding': 'identity' },\n },\n (proxyRes) => {\n const isHtml = (proxyRes.headers['content-type'] ?? '').includes('text/html');\n if (mount && isHtml) {\n const chunks: Buffer[] = [];\n proxyRes.on('data', (chunk) => chunks.push(chunk));\n proxyRes.on('end', () => {\n const body = injectMountAttribute(Buffer.concat(chunks).toString('utf-8'), mount);\n const { 'transfer-encoding': _te, ...headers } = proxyRes.headers;\n res.writeHead(proxyRes.statusCode ?? 502, {\n ...headers,\n 'content-length': String(Buffer.byteLength(body)),\n });\n res.end(body);\n });\n return;\n }\n res.writeHead(proxyRes.statusCode ?? 502, proxyRes.headers);\n proxyRes.pipe(res);\n },\n );\n proxyReq.on('error', () => {\n res.statusCode = 502;\n res.end(`paper-camp server is not reachable on port ${port} — run \\`paper-camp dev\\`.`);\n });\n req.pipe(proxyReq);\n}\n","import type { IncomingMessage, ServerResponse } from 'node:http';\nimport type { Plugin, ViteDevServer } from 'vite';\nimport { readConfigIntegration, readConfigPort } from '../cli/dev-port';\nimport { ROUTE_ATTRIBUTE, TOOLBAR_SCRIPT_ID } from '../toolbar/route-attribute';\nimport { proxyToCampServer } from './proxy';\n\nexport const CAMP_ROUTE = '/paper-camp';\n\nexport interface PaperCampToolbarOptions {\n port?: number;\n}\n\nexport function paperCamp(options: PaperCampToolbarOptions = {}): Plugin {\n let resolvedPort = options.port;\n let enabled = true;\n let route = CAMP_ROUTE;\n\n return {\n name: 'paper-camp-toolbar',\n apply: 'serve',\n async configureServer(server: ViteDevServer) {\n resolvedPort ??= (await readConfigPort(server.config.root)) ?? 3333;\n const integration = await readConfigIntegration(server.config.root);\n const isProduction = server.config.mode === 'production';\n enabled =\n (integration?.enabled ?? true) && (!isProduction || integration?.allowProduction === true);\n route = integration?.route ?? CAMP_ROUTE;\n if (!enabled) return;\n const port = resolvedPort;\n server.middlewares.use(route, (req: IncomingMessage, res: ServerResponse) => {\n proxyToCampServer(req, res, { port, mount: route });\n });\n },\n transformIndexHtml(html: string) {\n if (!enabled) return html;\n return html.replace(\n '</body>',\n `<script type=\"module\" id=\"${TOOLBAR_SCRIPT_ID}\" ${ROUTE_ATTRIBUTE}=\"${route}\" src=\"${route}/toolbar.js\"></script></body>`,\n );\n },\n };\n}\n\nexport default paperCamp;\n"],"names":["TOOLBAR_SCRIPT_ID","ROUTE_ATTRIBUTE","MOUNT_ATTRIBUTE","readMountPrefix","root","injectMountAttribute","html","mount","proxyToCampServer","req","res","port","host","proxyReq","httpRequest","proxyRes","isHtml","chunks","chunk","body","_te","headers","CAMP_ROUTE","paperCamp","options","resolvedPort","enabled","route","server","readConfigPort","integration","readConfigIntegration","isProduction"],"mappings":";;AAAO,MAAMA,IAAoB,6BACpBC,IAAkB,cCDlBC,IAAkB;AAExB,SAASC,EACdC,GACQ;AACR,UAAOA,KAAA,gBAAAA,EAAM,aAAaF,OAAoB;AAChD;AAGE,OAAO,WAAa,OAAmBC,EAAgB,SAAS,eAAe,MAAM,CAAC;ACAjF,SAASE,EAAqBC,GAAcC,GAAuB;AACxE,SAAOD,EAAK,QAAQ,mBAAmB,kBAAkBJ,CAAe,KAAKK,CAAK,IAAI;AACxF;AAEO,SAASC,EACdC,GACAC,GACA,EAA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AEZ,SAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM,gBAAgBM,GAAuB;AAC3C,MAAAH,UAAkB,MAAMI,EAAeD,EAAO,OAAO,IAAI,KAAM;AAC/D,YAAME,IAAc,MAAMC,EAAsBH,EAAO,OAAO,IAAI,GAC5DI,IAAeJ,EAAO,OAAO,SAAS;AAI5C,UAHAF,MACGI,KAAA,gBAAAA,EAAa,YAAW,QAAU,CAACE,MAAgBF,KAAA,gBAAAA,EAAa,qBAAoB,KACvFH,KAAQG,KAAA,gBAAAA,EAAa,UAASR,GAC1B,CAACI,EAAS;AACd,YAAMf,IAAOc;AACb,MAAAG,EAAO,YAAY,IAAID,GAAO,CAAClB,GAAsBC,MAAwB;AAC3E,QAAAF,EAAkBC,GAAKC,GAAK,EAAE,MAAAC,GAAM,OAAOgB,GAAO;AAAA,MACpD,CAAC;AAAA,IACH;AAAA,IACA,mBAAmBrB,GAAc;AAC/B,aAAKoB,IACEpB,EAAK;AAAA,QACV;AAAA,QACA,6BAA6BN,CAAiB,KAAKC,CAAe,KAAK0B,CAAK,UAAUA,CAAK;AAAA,MAAA,IAHxErB;AAAA,IAKvB;AAAA,EAAA;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/toolbar/route-attribute.ts","../../src/app/services/mount.ts","../../src/vite/proxy.ts","../../src/vite/index.ts"],"sourcesContent":["export const TOOLBAR_SCRIPT_ID = 'paper-camp-toolbar-script';\nexport const ROUTE_ATTRIBUTE = 'data-route';\n","export const MOUNT_ATTRIBUTE = 'data-paper-camp-mount';\n\nexport function readMountPrefix(\n root: { getAttribute(name: string): string | null } | null,\n): string {\n return root?.getAttribute(MOUNT_ATTRIBUTE) ?? '';\n}\n\nexport const mountPrefix =\n typeof document === 'undefined' ? '' : readMountPrefix(document.getElementById('root'));\n","import { type IncomingMessage, type ServerResponse, request as httpRequest } from 'node:http';\nimport { MOUNT_ATTRIBUTE } from '../app/services/mount';\n\nexport interface ProxyToCampServerOptions {\n port: number;\n host?: string;\n mount?: string;\n}\n\nexport function injectMountAttribute(html: string, mount: string): string {\n return html.replace('<div id=\"root\">', `<div id=\"root\" ${MOUNT_ATTRIBUTE}=\"${mount}\">`);\n}\n\nexport function proxyToCampServer(\n req: IncomingMessage,\n res: ServerResponse,\n { port, host = '127.0.0.1', mount = '' }: ProxyToCampServerOptions,\n): void {\n const proxyReq = httpRequest(\n {\n host,\n port,\n path: req.url ?? '/',\n method: req.method,\n headers: { ...req.headers, host: `${host}:${port}`, 'accept-encoding': 'identity' },\n },\n (proxyRes) => {\n const isHtml = (proxyRes.headers['content-type'] ?? '').includes('text/html');\n if (mount && isHtml) {\n const chunks: Buffer[] = [];\n proxyRes.on('data', (chunk) => chunks.push(chunk));\n proxyRes.on('end', () => {\n const body = injectMountAttribute(Buffer.concat(chunks).toString('utf-8'), mount);\n const { 'transfer-encoding': _te, ...headers } = proxyRes.headers;\n res.writeHead(proxyRes.statusCode ?? 502, {\n ...headers,\n 'content-length': String(Buffer.byteLength(body)),\n });\n res.end(body);\n });\n return;\n }\n res.writeHead(proxyRes.statusCode ?? 502, proxyRes.headers);\n proxyRes.pipe(res);\n },\n );\n proxyReq.on('error', () => {\n res.statusCode = 502;\n res.end(`paper-camp server is not reachable on port ${port} — run \\`paper-camp dev\\`.`);\n });\n req.pipe(proxyReq);\n}\n","import type { IncomingMessage, ServerResponse } from 'node:http';\nimport type { Plugin, ViteDevServer } from 'vite';\nimport { readConfigIntegration, readConfigPort } from '../cli/dev-port';\nimport { ROUTE_ATTRIBUTE, TOOLBAR_SCRIPT_ID } from '../toolbar/route-attribute';\nimport { proxyToCampServer } from './proxy';\n\nexport const CAMP_ROUTE = '/paper-camp';\n\nexport interface PaperCampToolbarOptions {\n port?: number;\n}\n\nexport function paperCamp(options: PaperCampToolbarOptions = {}): Plugin {\n let resolvedPort = options.port;\n let enabled = true;\n let route = CAMP_ROUTE;\n\n return {\n name: 'paper-camp-toolbar',\n apply: 'serve',\n async configureServer(server: ViteDevServer) {\n resolvedPort ??= (await readConfigPort(server.config.root)) ?? 3333;\n const integration = await readConfigIntegration(server.config.root);\n const isProduction = server.config.mode === 'production';\n enabled =\n (integration?.enabled ?? true) && (!isProduction || integration?.allowProduction === true);\n route = integration?.route ?? CAMP_ROUTE;\n if (!enabled) return;\n const port = resolvedPort;\n server.middlewares.use((req: IncomingMessage, res: ServerResponse, next: () => void) => {\n const [path, query] = (req.url ?? '').split('?', 2);\n if (path !== route) {\n next();\n return;\n }\n res.statusCode = 308;\n res.setHeader('Location', query ? `${route}/?${query}` : `${route}/`);\n res.end();\n });\n server.middlewares.use(route, (req: IncomingMessage, res: ServerResponse) => {\n proxyToCampServer(req, res, { port, mount: route });\n });\n },\n transformIndexHtml(html: string) {\n if (!enabled) return html;\n return html.replace(\n '</body>',\n `<script type=\"module\" id=\"${TOOLBAR_SCRIPT_ID}\" ${ROUTE_ATTRIBUTE}=\"${route}\" src=\"${route}/toolbar.js\"></script></body>`,\n );\n },\n };\n}\n\nexport default paperCamp;\n"],"names":["TOOLBAR_SCRIPT_ID","ROUTE_ATTRIBUTE","MOUNT_ATTRIBUTE","readMountPrefix","root","injectMountAttribute","html","mount","proxyToCampServer","req","res","port","host","proxyReq","httpRequest","proxyRes","isHtml","chunks","chunk","body","_te","headers","CAMP_ROUTE","paperCamp","options","resolvedPort","enabled","route","server","readConfigPort","integration","readConfigIntegration","isProduction","next","path","query"],"mappings":";;AAAO,MAAMA,IAAoB,6BACpBC,IAAkB,cCDlBC,IAAkB;AAExB,SAASC,EACdC,GACQ;AACR,UAAOA,KAAA,gBAAAA,EAAM,aAAaF,OAAoB;AAChD;AAGE,OAAO,WAAa,OAAmBC,EAAgB,SAAS,eAAe,MAAM,CAAC;ACAjF,SAASE,EAAqBC,GAAcC,GAAuB;AACxE,SAAOD,EAAK,QAAQ,mBAAmB,kBAAkBJ,CAAe,KAAKK,CAAK,IAAI;AACxF;AAEO,SAASC,EACdC,GACAC,GACA,EAAE,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|
4
4
|
"description": "Local-first, AI-native project management with retro aesthetics",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.12.1",
|
|
@@ -75,11 +75,9 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@dendelion/paper-ui": "^0.12.0",
|
|
79
78
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
80
79
|
"@tanstack/react-router": "^1.58.3",
|
|
81
80
|
"commander": "^12.0.0",
|
|
82
|
-
"framer-motion": "^12.40.0",
|
|
83
81
|
"node-pty": "^1.1.0",
|
|
84
82
|
"react-markdown": "^10.1.0",
|
|
85
83
|
"yaml": "^2.9.0",
|
|
@@ -91,6 +89,7 @@
|
|
|
91
89
|
"@commitlint/cli": "^21.0.2",
|
|
92
90
|
"@commitlint/config-conventional": "^21.0.2",
|
|
93
91
|
"@dendelion/paper-camp": "0.16.0",
|
|
92
|
+
"@dendelion/paper-ui": "^0.16.0",
|
|
94
93
|
"@types/node": "^20.0.0",
|
|
95
94
|
"@types/react": "^18.3.11",
|
|
96
95
|
"@types/react-dom": "^18.3.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{k as N,r as h,a0 as k,j as e,a1 as g,a2 as v,a3 as I,a4 as w,J as P,u as p,a as C,P as E}from"./main-DR2ma6V-.js";const j=a=>Number.isFinite(a)?a<=0?"today":a===1?"1 day ago":`${a} days ago`:"age unknown",T=({question:a,plan:x,expanded:n,onToggle:u,onOpen:t,reload:y})=>{const{toast:l}=N(),[i,m]=h.useState(""),{sending:o,send:s,undo:d,undoing:r,undoEdit:b}=k(x,{reload:y,notify:l}),c=async()=>{i.trim()&&await s(i.trim())&&m("")};return e.jsxs("div",{className:"border-b border-black/10 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-3 py-2.5",children:[e.jsx("button",{type:"button",onClick:t,"aria-label":`Open ${a.entityTitle}`,className:"bg-transparent border-none p-0 cursor-pointer",children:e.jsx(g,{id:a.entityId})}),e.jsx("button",{type:"button",onClick:u,"aria-expanded":n,className:"flex-1 min-w-0 truncate text-left bg-transparent border-none p-0 cursor-pointer",children:a.text}),e.jsx("span",{className:"opacity-50 text-xs whitespace-nowrap",children:j(a.ageDays)})]}),n&&e.jsxs("div",{className:"flex flex-col gap-3 pb-4",children:[e.jsx(v,{messages:x.thread??[],undo:d,undoing:r,onUndo:b}),e.jsx(I,{value:i,onChange:f=>m(f.target.value),"aria-label":`Reply to ${a.entityTitle}`,placeholder:"Reply to resolve and resume…",rows:2,disabled:o}),e.jsxs("div",{className:"flex justify-end items-center gap-3",children:[e.jsx("span",{className:o?"visible":"invisible",children:e.jsx(w,{size:"small",label:"Agent replying…"})}),e.jsx(P,{size:"small",onClick:c,disabled:o||!i.trim(),children:"Reply"})]})]})]})},R=()=>{const[a,x]=h.useState(null),n=p(s=>s.parkedQuestions),u=p(s=>s.parkedQuestionsError!==null),t=p(s=>s.plans),y=p(s=>s.loadPlans),l=p(s=>s.loadParkedQuestions),i=C();h.useEffect(()=>{l()},[l]);const m=async()=>{await Promise.all([y(),l()])},o=s=>{t!=null&&t.entries.some(d=>d.title===s)?i({to:"/plans/$planId",params:{planId:encodeURIComponent(s)}}):i({to:"/ideas/$ideaId",params:{ideaId:encodeURIComponent(s)}})};return e.jsxs("div",{children:[e.jsx(E,{children:"Inbox"}),e.jsx("p",{className:"opacity-50 mb-6",children:"Every open agent question, oldest first — parked decisions waiting on a human."}),u&&e.jsx("p",{className:"opacity-50",children:"Couldn't load parked questions."}),!u&&!n&&e.jsx("p",{className:"opacity-50",children:"Loading…"}),n&&n.length===0&&e.jsx("p",{className:"opacity-50",children:"Nothing parked — every agent question has an answer."}),n&&n.length>0&&e.jsx("div",{className:"flex flex-col",children:n.map((s,d)=>{const r=`${s.entityId}-${d}`,b=t==null?void 0:t.entries.find(c=>c.id===s.entityId);return b?e.jsx(T,{question:s,plan:b,expanded:a===r,onToggle:()=>x(c=>c===r?null:r),onOpen:()=>o(s.entityTitle),reload:m},r):e.jsxs("div",{className:"flex items-center gap-3 py-2.5 border-b border-black/10 last:border-b-0",children:[e.jsx("button",{type:"button",onClick:()=>o(s.entityTitle),"aria-label":`Open ${s.entityTitle}`,className:"bg-transparent border-none p-0 cursor-pointer",children:e.jsx(g,{id:s.entityId})}),e.jsx("span",{className:"flex-1 min-w-0 truncate",children:s.text}),e.jsx("span",{className:"opacity-50 text-xs whitespace-nowrap",children:j(s.ageDays)})]},r)})})]})};export{R as InboxPage};
|
|
2
|
-
//# sourceMappingURL=index-6xeWffZg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-6xeWffZg.js","sources":["../../../src/app/features/inbox/helpers.ts","../../../src/app/features/inbox/question-row.tsx","../../../src/app/features/inbox/inbox-page.tsx"],"sourcesContent":["export const formatAge = (ageDays: number): string => {\n if (!Number.isFinite(ageDays)) return 'age unknown';\n if (ageDays <= 0) return 'today';\n return ageDays === 1 ? '1 day ago' : `${ageDays} days ago`;\n};\n","import { FeedbackThread, PlanIdStamp } from '@/app/features/plans/components';\nimport { useSendFeedbackMessage } from '@/app/features/plans/hooks';\nimport type { ParkedQuestion, PlanEntry } from '@/types/index';\nimport { Button, Spinner, Textarea, useToast } from '@dendelion/paper-ui';\nimport { useState } from 'react';\nimport { formatAge } from './helpers';\n\ninterface QuestionRowProps {\n question: ParkedQuestion;\n plan: PlanEntry;\n expanded: boolean;\n onToggle: () => void;\n onOpen: () => void;\n reload: () => Promise<void>;\n}\n\nexport const QuestionRow = ({\n question,\n plan,\n expanded,\n onToggle,\n onOpen,\n reload,\n}: QuestionRowProps) => {\n const { toast } = useToast();\n const [input, setInput] = useState('');\n const { sending, send, undo, undoing, undoEdit } = useSendFeedbackMessage(plan, {\n reload,\n notify: toast,\n });\n\n const handleSend = async () => {\n if (!input.trim()) return;\n if (await send(input.trim())) setInput('');\n };\n\n return (\n <div className=\"border-b border-black/10 last:border-b-0\">\n <div className=\"flex items-center gap-3 py-2.5\">\n <button\n type=\"button\"\n onClick={onOpen}\n aria-label={`Open ${question.entityTitle}`}\n className=\"bg-transparent border-none p-0 cursor-pointer\"\n >\n <PlanIdStamp id={question.entityId} />\n </button>\n <button\n type=\"button\"\n onClick={onToggle}\n aria-expanded={expanded}\n className=\"flex-1 min-w-0 truncate text-left bg-transparent border-none p-0 cursor-pointer\"\n >\n {question.text}\n </button>\n <span className=\"opacity-50 text-xs whitespace-nowrap\">{formatAge(question.ageDays)}</span>\n </div>\n {expanded && (\n <div className=\"flex flex-col gap-3 pb-4\">\n <FeedbackThread\n messages={plan.thread ?? []}\n undo={undo}\n undoing={undoing}\n onUndo={undoEdit}\n />\n <Textarea\n value={input}\n onChange={(e) => setInput(e.target.value)}\n aria-label={`Reply to ${question.entityTitle}`}\n placeholder=\"Reply to resolve and resume…\"\n rows={2}\n disabled={sending}\n />\n <div className=\"flex justify-end items-center gap-3\">\n <span className={sending ? 'visible' : 'invisible'}>\n <Spinner size=\"small\" label=\"Agent replying…\" />\n </span>\n <Button size=\"small\" onClick={handleSend} disabled={sending || !input.trim()}>\n Reply\n </Button>\n </div>\n </div>\n )}\n </div>\n );\n};\n","import { PageTitle } from '@/app/components/page-title';\nimport { PlanIdStamp } from '@/app/features/plans/components';\nimport { useAppStore } from '@/app/stores/app-store';\nimport { useNavigate } from '@tanstack/react-router';\nimport { useEffect, useState } from 'react';\nimport { formatAge } from './helpers';\nimport { QuestionRow } from './question-row';\n\nexport const InboxPage = () => {\n const [expandedKey, setExpandedKey] = useState<string | null>(null);\n const questions = useAppStore((s) => s.parkedQuestions);\n const loadFailed = useAppStore((s) => s.parkedQuestionsError !== null);\n const plans = useAppStore((s) => s.plans);\n const loadPlans = useAppStore((s) => s.loadPlans);\n const loadParkedQuestions = useAppStore((s) => s.loadParkedQuestions);\n const navigate = useNavigate();\n\n useEffect(() => {\n loadParkedQuestions();\n }, [loadParkedQuestions]);\n\n const reload = async () => {\n await Promise.all([loadPlans(), loadParkedQuestions()]);\n };\n\n const openEntity = (title: string) => {\n if (plans?.entries.some((p) => p.title === title)) {\n navigate({ to: '/plans/$planId', params: { planId: encodeURIComponent(title) } });\n } else {\n navigate({ to: '/ideas/$ideaId', params: { ideaId: encodeURIComponent(title) } });\n }\n };\n\n return (\n <div>\n <PageTitle>Inbox</PageTitle>\n <p className=\"opacity-50 mb-6\">\n Every open agent question, oldest first — parked decisions waiting on a human.\n </p>\n {loadFailed && <p className=\"opacity-50\">Couldn't load parked questions.</p>}\n {!loadFailed && !questions && <p className=\"opacity-50\">Loading…</p>}\n {questions && questions.length === 0 && (\n <p className=\"opacity-50\">Nothing parked — every agent question has an answer.</p>\n )}\n {questions && questions.length > 0 && (\n <div className=\"flex flex-col\">\n {questions.map((q, i) => {\n const key = `${q.entityId}-${i}`;\n const plan = plans?.entries.find((p) => p.id === q.entityId);\n if (!plan) {\n return (\n <div\n key={key}\n className=\"flex items-center gap-3 py-2.5 border-b border-black/10 last:border-b-0\"\n >\n <button\n type=\"button\"\n onClick={() => openEntity(q.entityTitle)}\n aria-label={`Open ${q.entityTitle}`}\n className=\"bg-transparent border-none p-0 cursor-pointer\"\n >\n <PlanIdStamp id={q.entityId} />\n </button>\n <span className=\"flex-1 min-w-0 truncate\">{q.text}</span>\n <span className=\"opacity-50 text-xs whitespace-nowrap\">\n {formatAge(q.ageDays)}\n </span>\n </div>\n );\n }\n return (\n <QuestionRow\n key={key}\n question={q}\n plan={plan}\n expanded={expandedKey === key}\n onToggle={() => setExpandedKey((cur) => (cur === key ? null : key))}\n onOpen={() => openEntity(q.entityTitle)}\n reload={reload}\n />\n );\n })}\n </div>\n )}\n </div>\n );\n};\n"],"names":["formatAge","ageDays","QuestionRow","question","plan","expanded","onToggle","onOpen","reload","toast","useToast","input","setInput","useState","sending","send","undo","undoing","undoEdit","useSendFeedbackMessage","handleSend","jsxs","jsx","PlanIdStamp","FeedbackThread","Textarea","e","Spinner","Button","InboxPage","expandedKey","setExpandedKey","questions","useAppStore","loadFailed","plans","loadPlans","loadParkedQuestions","navigate","useNavigate","useEffect","openEntity","title","p","PageTitle","q","i","key","cur"],"mappings":"yHAAO,MAAMA,EAAaC,GACnB,OAAO,SAASA,CAAO,EACxBA,GAAW,EAAU,QAClBA,IAAY,EAAI,YAAc,GAAGA,CAAO,YAFT,cCe3BC,EAAc,CAAC,CAC1B,SAAAC,EACA,KAAAC,EACA,SAAAC,EACA,SAAAC,EACA,OAAAC,EACA,OAAAC,CACF,IAAwB,CACtB,KAAM,CAAE,MAAAC,CAAA,EAAUC,EAAA,EACZ,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAS,EAAE,EAC/B,CAAE,QAAAC,EAAS,KAAAC,EAAM,KAAAC,EAAM,QAAAC,EAAS,SAAAC,CAAA,EAAaC,EAAuBf,EAAM,CAC9E,OAAAI,EACA,OAAQC,CAAA,CACT,EAEKW,EAAa,SAAY,CACxBT,EAAM,QACP,MAAMI,EAAKJ,EAAM,MAAM,KAAY,EAAE,CAC3C,EAEA,OACEU,EAAAA,KAAC,MAAA,CAAI,UAAU,2CACb,SAAA,CAAAA,EAAAA,KAAC,MAAA,CAAI,UAAU,iCACb,SAAA,CAAAC,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,QAASf,EACT,aAAY,QAAQJ,EAAS,WAAW,GACxC,UAAU,gDAEV,SAAAmB,EAAAA,IAACC,EAAA,CAAY,GAAIpB,EAAS,QAAA,CAAU,CAAA,CAAA,EAEtCmB,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,QAAShB,EACT,gBAAeD,EACf,UAAU,kFAET,SAAAF,EAAS,IAAA,CAAA,QAEX,OAAA,CAAK,UAAU,uCAAwC,SAAAH,EAAUG,EAAS,OAAO,CAAA,CAAE,CAAA,EACtF,EACCE,GACCgB,EAAAA,KAAC,MAAA,CAAI,UAAU,2BACb,SAAA,CAAAC,EAAAA,IAACE,EAAA,CACC,SAAUpB,EAAK,QAAU,CAAA,EACzB,KAAAY,EACA,QAAAC,EACA,OAAQC,CAA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B,CAAA,CAAA,EAdKE,CAAA,CA6Bb,CAAC,CAAA,CACH,CAAA,EAEJ,CAEJ"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{u as h,B as v,r,j as e,P as L,w as u,z as y,U as S,C as A,J as T}from"./main-DR2ma6V-.js";import{c as f}from"./tokens-C3C44lLs.js";const b={phase:"Phase run",audit:"Audit","batch-reconcile":"Batch reconcile","run-all":"Run all phases",draft:"Draft",extend:"Extend",suggest:"Suggest ideas","commit-suggest":"Commit suggest","overlap-check":"Overlap check",prioritise:"Prioritise queue",sync:"Sync",reconcile:"Reconcile","fix-review":"Fix review","resolve-conflict":"Resolve conflict",feedback:"Feedback reply"},m=s=>String(s).padStart(2,"0"),_=s=>{const a=new Date(s);return`${a.getFullYear()}-${m(a.getMonth()+1)}-${m(a.getDate())}`},D=s=>new Date(s).toLocaleDateString(void 0,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),k=s=>{const a=new Date(s);return`${m(a.getHours())}:${m(a.getMinutes())}:${m(a.getSeconds())}`},p="text-sm font-semibold whitespace-nowrap overflow-hidden",N="grid grid-cols-[20px_116px_minmax(0,1fr)_88px_150px_72px] gap-2.5 items-center max-lg:grid-cols-[20px_116px_minmax(0,1fr)_88px_72px] max-[480px]:grid-cols-1 max-[480px]:gap-1",C=({id:s})=>{const[a,c]=r.useState(null),[l,i]=r.useState(!1),[o,x]=r.useState(0);r.useEffect(()=>{let n=!1,d;c(null),i(!1);const g=j=>{A(s).then(w=>{n||c(w.lines??[])}).catch(()=>{if(!n){if(j>0){d=setTimeout(()=>g(j-1),700);return}i(!0),c([])}})};return g(3),()=>{n=!0,d&&clearTimeout(d)}},[s,o]);const t=e.jsx(T,{variant:"ghost",size:"small",onClick:()=>x(n=>n+1),children:"Retry"});return a===null?e.jsx("p",{className:"opacity-50 m-0",children:"Loading…"}):l?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"opacity-50 m-0",children:"Couldn't load this task's output."}),t]}):a.length===0?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"opacity-50 m-0",children:"No output recorded."}),t]}):e.jsx("pre",{className:"font-mono text-xs m-0 max-h-[320px] overflow-y-auto whitespace-pre-wrap",children:a.join(`
|
|
2
|
-
`)})},E=({size:s=14,className:a})=>e.jsx("svg",{width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:a,children:e.jsx("polyline",{points:"9 18 15 12 9 6"})}),R=({entry:s,highlighted:a})=>{const[c,l]=r.useState(a);r.useEffect(()=>{a&&l(!0)},[a]);const i=()=>l(o=>!o);return e.jsxs("div",{className:a?"task-row-highlighted flex flex-col gap-1 rounded-[10px] outline outline-2 outline-offset-[-2px] outline-[rgba(200,154,90,0.5)]":"flex flex-col gap-1 rounded-[10px]",children:[e.jsx("div",{role:"button",tabIndex:0,"aria-expanded":c,onClick:i,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),i())},className:"group cursor-pointer rounded-[10px]",children:e.jsx(u,{size:"small",texture:"canvas",className:"plan-row-card",children:e.jsxs("div",{className:N,children:[e.jsx("span",{className:"inline-flex items-center opacity-50",children:e.jsx(E,{className:"transition-transform duration-150 ease-out group-aria-expanded:rotate-90"})}),e.jsx("span",{className:"font-semibold whitespace-nowrap overflow-hidden",children:b[s.taskKind]??s.taskKind}),e.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap opacity-70",children:s.planTitle}),e.jsx("span",{className:"text-sm opacity-50 whitespace-nowrap",children:y[s.agentId]}),e.jsxs("span",{className:"max-lg:hidden font-mono text-xs opacity-[0.55] whitespace-nowrap",children:[k(s.startedAt),"–",k(s.endedAt)]}),e.jsx("div",{className:"flex items-center",children:e.jsx(S,{size:"small",fillColor:s.outcome==="done"?"rgba(143, 185, 150, 0.25)":s.outcome==="superseded"?"rgba(212, 163, 115, 0.25)":"rgba(201, 139, 139, 0.25)",textColor:s.outcome==="done"?f.accentGreenDark:s.outcome==="superseded"?f.accentAmberDark:f.accentRoseDark,children:s.outcome})})]})})}),c&&e.jsxs(u,{size:"small",texture:"kraft",className:"plan-row-card",children:[s.outcome==="error"&&s.reason&&e.jsx("p",{className:"m-0 mb-2 text-sm text-state-danger",children:s.reason}),e.jsx(C,{id:s.id})]})]})},K=()=>{const s=h(t=>t.taskLog),a=h(t=>t.taskLogLoading),c=h(t=>t.loadTaskLog),{taskId:l}=v({from:"/tasks"}),i=r.useRef(null);r.useEffect(()=>{c()},[c]),r.useEffect(()=>{var n;if(!l)return;const t=(n=i.current)==null?void 0:n.querySelector(".task-row-highlighted");t==null||t.scrollIntoView({behavior:"smooth",block:"center"})},[l]);const o=[...s].sort((t,n)=>n.endedAt.localeCompare(t.endedAt)),x=[];for(const t of o){const n=_(t.endedAt),d=x.at(-1);(d==null?void 0:d.key)===n?d.entries.push(t):x.push({key:n,entries:[t]})}return e.jsxs("div",{ref:i,children:[e.jsx(L,{children:"Tasks"}),a&&e.jsx("p",{className:"opacity-50",children:"Loading…"}),!a&&o.length===0&&e.jsx("p",{className:"opacity-50",children:"No tasks have run yet."}),!a&&o.length>0&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(u,{size:"small",texture:"kraft",className:"plan-row-card",children:e.jsxs("div",{className:N,children:[e.jsx("span",{}),e.jsx("span",{className:`${p} opacity-60`,children:"Task"}),e.jsx("span",{className:`${p} opacity-60`,children:"Plan"}),e.jsx("span",{className:`${p} opacity-60`,children:"Agent"}),e.jsx("span",{className:`max-lg:hidden ${p} opacity-60`,children:"Time"}),e.jsx("span",{className:`${p} opacity-60`,children:"Outcome"})]})}),x.map(t=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(u,{size:"small",texture:"kraft",className:"plan-row-card",children:e.jsx("span",{className:`${p} opacity-75`,children:D(t.entries[0].endedAt)})}),t.entries.map(n=>e.jsx(R,{entry:n,highlighted:n.id===l},n.id))]},t.key))]})]})};export{K as TasksPage};
|
|
3
|
-
//# sourceMappingURL=index-B_yczIPZ.js.map
|