@rucher/carnet 0.2.0-beta.9 → 0.3.0-beta.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.
@@ -166,6 +166,10 @@ interface ResolveWorkspaceOptions {
166
166
  declare function resolveWorkspace({ db, sessionId, workspace, cwd, env }?: ResolveWorkspaceOptions): WorkspaceResolution;
167
167
  declare function workspaceLabel(workspace: Workspace | null): string;
168
168
  declare function requireWorkspace(workspace: Workspace | null): Workspace;
169
+ interface UndoStep {
170
+ command: string;
171
+ run: () => void;
172
+ }
169
173
  interface HostSessionPayload {
170
174
  session_id: string;
171
175
  cwd?: string | undefined;
@@ -222,6 +226,14 @@ interface HostRender {
222
226
  written: string[];
223
227
  removed: string[];
224
228
  }
229
+ interface RelocatedFolder {
230
+ from: string;
231
+ to: string;
232
+ }
233
+ interface ProjectRelocation {
234
+ moves: RelocatedFolder[];
235
+ undo: UndoStep[];
236
+ }
225
237
  interface Host {
226
238
  id: string;
227
239
  displayName: string;
@@ -246,6 +258,8 @@ interface Host {
246
258
  hasConversation(session: Session, env?: NodeJS.ProcessEnv): boolean;
247
259
  continues(parent: Session, childId: string, env?: NodeJS.ProcessEnv): boolean;
248
260
  renderRunDirectory(workspace: Workspace): HostRender;
261
+ relocateProject?(from: string, to: string, env: NodeJS.ProcessEnv, mode?: 'move' | 'merge'): ProjectRelocation | null;
262
+ moveTrust?(from: string, to: string | null, env: NodeJS.ProcessEnv): boolean;
249
263
  }
250
264
  declare const DEFAULT_HOST = "claude-code";
251
265
  declare function allHosts(): Host[];
@@ -558,7 +572,7 @@ declare class Carnet {
558
572
  list: (session: string, options?: ListAgentsOptions) => Agent[];
559
573
  reorderQueue: (session: string, names: string[]) => Agent[];
560
574
  byHostAgentId: (session: string, hostAgentId: string) => Agent | undefined;
561
- pairSubagent: (session: string, hostAgentId: string, names?: readonly string[]) => Agent | undefined;
575
+ pairSubagent: (session: string, hostAgentId: string, names?: readonly string[], agentType?: string) => Agent | undefined;
562
576
  unpaired: (session: string, names: readonly string[]) => Agent | undefined;
563
577
  pendingPlan: (session: string) => Agent | undefined;
564
578
  requestLaunch: (session: string, name: string) => void;
@@ -628,5 +642,5 @@ interface ResolvedCarnet {
628
642
  }
629
643
  declare function openResolvedCarnet(options?: OpenCarnetOptions): ResolvedCarnet;
630
644
  declare function openWorkspaceCarnet(workspace: Workspace | null, options?: OpenCarnetOptions): Carnet;
631
- export { NoteDetail as $, definitionInstructions as $t, memoryMaxCharacters as A, MAIN_WORKING_EMOJI as An, LaunchOptions as At, AddNoteInput as B, EventType as Bn, requireWorkspace as Bt, renderNotes as C, EMOJI as Cn, HostPromptPayload as Ct, renderTableLine as D, LEGEND as Dn, HostStopPayload as Dt, renderStatus as E, KIND_TAG_PATTERN as En, HostSessionPayload as Et, buildStatusView as F, isUserActionStatus as Fn, WorkspaceOrigin as Ft, DropNoteInput as G, DropWorkspaceOptions as Gt, CiteNoteInput as H, SESSION_EVENT_TYPES as Hn, workspaceLabel as Ht, formatClock as I, kindTag as In, WorkspaceResolution as It, NOTE_TEXT_LIMIT as J, Workspace as Jt, ListNotesOptions as K, INSTRUCTIONS_FILE as Kt, TURNS as L, AgentEventType as Ln, isInside as Lt, StatusLine as M, USER_ACTION_STATUSES as Mn, allHosts as Mt, StatusView as N, UserActionStatus as Nn, hostById as Nt, MEMORY_MAX_CHARACTERS as O, MAIN_FAILED_EMOJI as On, HostSubagentPayload as Ot, StatusViewOptions as P, isAgentStatus as Pn, ResolveWorkspaceOptions as Pt, NoteCitation as Q, createWorkspace as Qt, Turn as R, CarnetEvent as Rn, repoNameFor as Rt, renderNoteLine as S, AgentStatus as Sn, Host as St, renderSections as T, KIND_LEGEND as Tn, HostSessionEndPayload as Tt, DEFAULT_HALF_LIFE_DAYS as U, SessionEventType as Un, AGENTS_FILE as Ut, AddNoteResult as V, LogEventInput as Vn, resolveWorkspace as Vt, DUPLICATE_SIMILARITY as W, isEventType as Wn, CreateWorkspaceOptions as Wt, NoteActivity as X, WorkspaceRepo as Xt, Note as Y, WorkspaceFile as Yt, NoteActivityKind as Z, addWorkspaceRepo as Zt, NotesMode as _, StartAgentInput as _n, Session as _t, ResolvedCarnet as a, removeWorkspaceRepo as an, memoryHalfLife as at, renderAgentLine as b, statusWhenDone as bn, shortId as bt, openWorkspaceCarnet as c, AGENT_KINDS as cn, workspaceRepoNames as ct, MAIN_HEADER as d, FinishAgentInput as dn, MergeResult as dt, dropWorkspace as en, NoteKind as et, MAIN_IDLE as f, KIND_REQUIRED as fn, CreateSessionInput as ft, NOTES_HEADER as g, SANDBOX_KINDS as gn, MINIMUM_ID_PREFIX as gt, NOTES_FOLD_LINES as h, REPORTING_NOTE as hn, ListSessionsOptions as ht, OpenCarnetOptions as i, loadWorkspace as in, localDay as it, renderMemory as j, OPEN_AGENT_STATUSES as jn, ResumeCommand as jt, MemoryOptions as k, MAIN_WAITING_EMOJI as kn, HostToolPayload as kt, BLOCKED_HEADER as l, Agent as ln, SetTableInput as lt, MAIN_WORKING_SUFFIX as m, PUBLISH_FALLBACK_MILLISECONDS as mn, HookSessionPayload as mt, CarnetOptions as n, isWorkspaceName as nn, WeightedNote as nt, openCarnet as o, workspaceExists as on, sessionNoteActivity as ot, MAIN_WAITING_SUFFIX as p, ListAgentsOptions as pn, HookEnv as pt, NOTE_KINDS as q, WORKSPACE_FILE as qt, ClosedAgent as r, listWorkspaces as rn, isNoteKind as rt, openResolvedCarnet as s, workspaceHosts as sn, similarity as st, Carnet as t, expandHome as tn, STALE_AFTER_ACTIVE_DAYS as tt, MAIN_FAILED_SUFFIX as u, AgentKind as un, TableItem as ut, RenderOptions as v, UpdateAgentInput as vn, SessionKind as vt, renderNotesSummary as w, KIND_ABBREVIATIONS as wn, HostRender as wt, renderMainLine as x, AGENT_STATUSES as xn, DEFAULT_HOST as xt, SIMILAR_PREFIX as y, isAgentKind as yn, SessionStatus as yt, TurnOptions as z, EVENT_TYPES as zn, repoPathFor as zt };
632
- //# sourceMappingURL=carnet-DcHESFRd.d.mts.map
645
+ export { NoteDetail as $, addWorkspaceRepo as $t, memoryMaxCharacters as A, MAIN_FAILED_EMOJI as An, LaunchOptions as At, AddNoteInput as B, CarnetEvent as Bn, repoNameFor as Bt, renderNotes as C, AGENT_STATUSES as Cn, HostPromptPayload as Ct, renderTableLine as D, KIND_LEGEND as Dn, HostStopPayload as Dt, renderStatus as E, KIND_ABBREVIATIONS as En, HostSessionPayload as Et, buildStatusView as F, UserActionStatus as Fn, hostById as Ft, DropNoteInput as G, SessionEventType as Gn, AGENTS_FILE as Gt, CiteNoteInput as H, EventType as Hn, requireWorkspace as Ht, formatClock as I, isAgentStatus as In, ResolveWorkspaceOptions as It, NOTE_TEXT_LIMIT as J, INSTRUCTIONS_FILE as Jt, ListNotesOptions as K, isEventType as Kn, CreateWorkspaceOptions as Kt, TURNS as L, isUserActionStatus as Ln, WorkspaceOrigin as Lt, StatusLine as M, MAIN_WORKING_EMOJI as Mn, RelocatedFolder as Mt, StatusView as N, OPEN_AGENT_STATUSES as Nn, ResumeCommand as Nt, MEMORY_MAX_CHARACTERS as O, KIND_TAG_PATTERN as On, HostSubagentPayload as Ot, StatusViewOptions as P, USER_ACTION_STATUSES as Pn, allHosts as Pt, NoteCitation as Q, WorkspaceRepo as Qt, Turn as R, kindTag as Rn, WorkspaceResolution as Rt, renderNoteLine as S, statusWhenDone as Sn, Host as St, renderSections as T, EMOJI as Tn, HostSessionEndPayload as Tt, DEFAULT_HALF_LIFE_DAYS as U, LogEventInput as Un, resolveWorkspace as Ut, AddNoteResult as V, EVENT_TYPES as Vn, repoPathFor as Vt, DUPLICATE_SIMILARITY as W, SESSION_EVENT_TYPES as Wn, workspaceLabel as Wt, NoteActivity as X, Workspace as Xt, Note as Y, WORKSPACE_FILE as Yt, NoteActivityKind as Z, WorkspaceFile as Zt, NotesMode as _, REPORTING_NOTE as _n, Session as _t, ResolvedCarnet as a, listWorkspaces as an, memoryHalfLife as at, renderAgentLine as b, UpdateAgentInput as bn, shortId as bt, openWorkspaceCarnet as c, workspaceExists as cn, workspaceRepoNames as ct, MAIN_HEADER as d, Agent as dn, MergeResult as dt, createWorkspace as en, NoteKind as et, MAIN_IDLE as f, AgentKind as fn, CreateSessionInput as ft, NOTES_HEADER as g, PUBLISH_FALLBACK_MILLISECONDS as gn, MINIMUM_ID_PREFIX as gt, NOTES_FOLD_LINES as h, ListAgentsOptions as hn, ListSessionsOptions as ht, OpenCarnetOptions as i, isWorkspaceName as in, localDay as it, renderMemory as j, MAIN_WAITING_EMOJI as jn, ProjectRelocation as jt, MemoryOptions as k, LEGEND as kn, HostToolPayload as kt, BLOCKED_HEADER as l, workspaceHosts as ln, SetTableInput as lt, MAIN_WORKING_SUFFIX as m, KIND_REQUIRED as mn, HookSessionPayload as mt, CarnetOptions as n, dropWorkspace as nn, WeightedNote as nt, openCarnet as o, loadWorkspace as on, sessionNoteActivity as ot, MAIN_WAITING_SUFFIX as p, FinishAgentInput as pn, HookEnv as pt, NOTE_KINDS as q, DropWorkspaceOptions as qt, ClosedAgent as r, expandHome as rn, isNoteKind as rt, openResolvedCarnet as s, removeWorkspaceRepo as sn, similarity as st, Carnet as t, definitionInstructions as tn, STALE_AFTER_ACTIVE_DAYS as tt, MAIN_FAILED_SUFFIX as u, AGENT_KINDS as un, TableItem as ut, RenderOptions as v, SANDBOX_KINDS as vn, SessionKind as vt, renderNotesSummary as w, AgentStatus as wn, HostRender as wt, renderMainLine as x, isAgentKind as xn, DEFAULT_HOST as xt, SIMILAR_PREFIX as y, StartAgentInput as yn, SessionStatus as yt, TurnOptions as z, AgentEventType as zn, isInside as zt };
646
+ //# sourceMappingURL=carnet-BFA2yya4.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carnet-BFA2yya4.d.mts","names":["_$__merge_ts0.MergeResult","_$__questions_ts0.Question","_$__findings_ts0.Finding","_$__table_ts0.TableItem","_$__events_ts0.CarnetEvent","_$__notes_ts0.AddNoteResult","_$__notes_ts0.Note","_$__notes_ts0.NoteDetail","_$__notes_ts0.WeightedNote","_$__notes_ts0.NoteCitation","_$__notes_ts0.NoteActivity","_$__status_view_ts0.StatusView"],"sources":["../src/context.ts","../src/events.ts","../src/status/model.ts","../src/agents.ts","../src/workspace/workspace.ts","../src/workspace/locate.ts","../src/workspace/undo.ts","../src/hosts/host.ts","../src/sessions.ts","../src/merge.ts","../src/questions.ts","../src/findings.ts","../src/table.ts","../src/notes.ts","../src/turn.ts","../src/status/view.ts","../src/memory.ts","../src/status/render.ts","../src/carnet.ts"],"mappings":";UAEiB;EACf,IAAI;EACJ,WAAW;EAEX;;cCFW;cAaA;KAOD,yBAAyB;KACzB,2BAA2B;KAC3B,YAAY,iBAAiB;UAIxB;EACf;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;;UAGe;EACf,MAAM;EACN;EACA;EACA;EACA;;iBAqBc,YAAY,iBAAiB,SAAS;cCnEzC;KAUD,sBAAsB;cAErB;KAED,2BAA2B;cAE1B,OAAO,OAAO,QAAQ;cAStB;cACA;cACA;cAEA;cAGA;WACX;WACA;WACA;WACA;;iBAIc,QAAQ,mBAAmB;cAI9B,kBAAgB;cAEhB;iBAEG,cAAc,iBAAiB,SAAS;iBAIxC,mBAAmB,iBAAiB,SAAS;cAIhD;cCjDA;KAED,oBAAoB;cAEnB;iBAWG,YAAY,iBAAiB,SAAS;UAWrC;EACf;EACA;EACA,MAAM;EACN,cAAc;EAEd;EAEA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EAEA;;UAGe;EACf;EACA;EACA,MAAM;EACN;EACA;EACA;EAEA;;cAGW,wBAAwB;UAEpB;EACf,QAAQ;EAER;EACA;EAEA;;UAGe;EACf;EACA;;UAGe;EACf;;cAmDW;cACA;iBAkRG,eAAe,MAAM,WAAW,wBAAwB;UAuDvD;EACf,MAAM;EACN;EACA;;UChde;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA,OAAO;EACP,UAA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oryMaxCharacters, An as MAIN_WORKING_EMOJI, At as LaunchOptions, B as AddNoteInput, Bn as EventType, Bt as requireWorkspace, C as renderNotes, Cn as EMOJI, Ct as HostPromptPayload, D as renderTableLine, Dn as LEGEND, Dt as HostStopPayload, E as renderStatus, En as KIND_TAG_PATTERN, Et as HostSessionPayload, F as buildStatusView, Fn as isUserActionStatus, Ft as WorkspaceOrigin, G as DropNoteInput, Gt as DropWorkspaceOptions, H as CiteNoteInput, Hn as SESSION_EVENT_TYPES, Ht as workspaceLabel, I as formatClock, In as kindTag, It as WorkspaceResolution, J as NOTE_TEXT_LIMIT, Jt as Workspace, K as ListNotesOptions, Kt as INSTRUCTIONS_FILE, L as TURNS, Ln as AgentEventType, Lt as isInside, M as StatusLine, Mn as USER_ACTION_STATUSES, Mt as allHosts, N as StatusView, Nn as UserActionStatus, Nt as hostById, O as MEMORY_MAX_CHARACTERS, On as MAIN_FAILED_EMOJI, Ot as HostSubagentPayload, P as StatusViewOptions, Pn as isAgentStatus, Pt as ResolveWorkspaceOptions, Q as NoteCitation, Qt as createWorkspace, R as Turn, Rn as CarnetEvent, Rt as repoNameFor, S as renderNoteLine, Sn as AgentStatus, St as Host, T as renderSections, Tn as KIND_LEGEND, Tt as HostSessionEndPayload, U as DEFAULT_HALF_LIFE_DAYS, Un as SessionEventType, Ut as AGENTS_FILE, V as AddNoteResult, Vn as LogEventInput, Vt as resolveWorkspace, W as DUPLICATE_SIMILARITY, Wn as isEventType, Wt as CreateWorkspaceOptions, X as NoteActivity, Xt as WorkspaceRepo, Y as Note, Yt as WorkspaceFile, Z as NoteActivityKind, Zt as addWorkspaceRepo, _ as NotesMode, _n as StartAgentInput, _t as Session, a as ResolvedCarnet, an as removeWorkspaceRepo, at as memoryHalfLife, b as renderAgentLine, bn as statusWhenDone, bt as shortId, c as openWorkspaceCarnet, cn as AGENT_KINDS, ct as workspaceRepoNames, d as MAIN_HEADER, dn as FinishAgentInput, dt as MergeResult, en as dropWorkspace, et as NoteKind, f as MAIN_IDLE, fn as KIND_REQUIRED, ft as CreateSessionInput, g as NOTES_HEADER, gn as SANDBOX_KINDS, gt as MINIMUM_ID_PREFIX, h as NOTES_FOLD_LINES, hn as REPORTING_NOTE, ht as ListSessionsOptions, i as OpenCarnetOptions, in as loadWorkspace, it as localDay, j as renderMemory, jn as OPEN_AGENT_STATUSES, jt as ResumeCommand, k as MemoryOptions, kn as MAIN_WAITING_EMOJI, kt as HostToolPayload, l as BLOCKED_HEADER, ln as Agent, lt as SetTableInput, m as MAIN_WORKING_SUFFIX, mn as PUBLISH_FALLBACK_MILLISECONDS, mt as HookSessionPayload, n as CarnetOptions, nn as isWorkspaceName, nt as WeightedNote, o as openCarnet, on as workspaceExists, ot as sessionNoteActivity, p as MAIN_WAITING_SUFFIX, pn as ListAgentsOptions, pt as HookEnv, q as NOTE_KINDS, qt as WORKSPACE_FILE, r as ClosedAgent, rn as listWorkspaces, rt as isNoteKind, s as openResolvedCarnet, sn as workspaceHosts, st as similarity, t as Carnet, tn as expandHome, tt as STALE_AFTER_ACTIVE_DAYS, u as MAIN_FAILED_SUFFIX, un as AgentKind, ut as TableItem, v as RenderOptions, vn as UpdateAgentInput, vt as SessionKind, w as renderNotesSummary, wn as KIND_ABBREVIATIONS, wt as HostRender, x as renderMainLine, xn as AGENT_STATUSES, xt as DEFAULT_HOST, y as SIMILAR_PREFIX, yn as isAgentKind, yt as SessionStatus, z as TurnOptions, zn as EVENT_TYPES, zt as repoPathFor } from "./carnet-DcHESFRd.mjs";
1
+ import { $ as NoteDetail, $t as addWorkspaceRepo, A as memoryMaxCharacters, An as MAIN_FAILED_EMOJI, At as LaunchOptions, B as AddNoteInput, Bn as CarnetEvent, Bt as repoNameFor, C as renderNotes, Cn as AGENT_STATUSES, Ct as HostPromptPayload, D as renderTableLine, Dn as KIND_LEGEND, Dt as HostStopPayload, E as renderStatus, En as KIND_ABBREVIATIONS, Et as HostSessionPayload, F as buildStatusView, Fn as UserActionStatus, Ft as hostById, G as DropNoteInput, Gn as SessionEventType, Gt as AGENTS_FILE, H as CiteNoteInput, Hn as EventType, Ht as requireWorkspace, I as formatClock, In as isAgentStatus, It as ResolveWorkspaceOptions, J as NOTE_TEXT_LIMIT, Jt as INSTRUCTIONS_FILE, K as ListNotesOptions, Kn as isEventType, Kt as CreateWorkspaceOptions, L as TURNS, Ln as isUserActionStatus, Lt as WorkspaceOrigin, M as StatusLine, Mn as MAIN_WORKING_EMOJI, Mt as RelocatedFolder, N as StatusView, Nn as OPEN_AGENT_STATUSES, Nt as ResumeCommand, O as MEMORY_MAX_CHARACTERS, On as KIND_TAG_PATTERN, Ot as HostSubagentPayload, P as StatusViewOptions, Pn as USER_ACTION_STATUSES, Pt as allHosts, Q as NoteCitation, Qt as WorkspaceRepo, R as Turn, Rn as kindTag, Rt as WorkspaceResolution, S as renderNoteLine, Sn as statusWhenDone, St as Host, T as renderSections, Tn as EMOJI, Tt as HostSessionEndPayload, U as DEFAULT_HALF_LIFE_DAYS, Un as LogEventInput, Ut as resolveWorkspace, V as AddNoteResult, Vn as EVENT_TYPES, Vt as repoPathFor, W as DUPLICATE_SIMILARITY, Wn as SESSION_EVENT_TYPES, Wt as workspaceLabel, X as NoteActivity, Xt as Workspace, Y as Note, Yt as WORKSPACE_FILE, Z as NoteActivityKind, Zt as WorkspaceFile, _ as NotesMode, _n as REPORTING_NOTE, _t as Session, a as ResolvedCarnet, an as listWorkspaces, at as memoryHalfLife, b as renderAgentLine, bn as UpdateAgentInput, bt as shortId, c as openWorkspaceCarnet, cn as workspaceExists, ct as workspaceRepoNames, d as MAIN_HEADER, dn as Agent, dt as MergeResult, en as createWorkspace, et as NoteKind, f as MAIN_IDLE, fn as AgentKind, ft as CreateSessionInput, g as NOTES_HEADER, gn as PUBLISH_FALLBACK_MILLISECONDS, gt as MINIMUM_ID_PREFIX, h as NOTES_FOLD_LINES, hn as ListAgentsOptions, ht as ListSessionsOptions, i as OpenCarnetOptions, in as isWorkspaceName, it as localDay, j as renderMemory, jn as MAIN_WAITING_EMOJI, jt as ProjectRelocation, k as MemoryOptions, kn as LEGEND, kt as HostToolPayload, l as BLOCKED_HEADER, ln as workspaceHosts, lt as SetTableInput, m as MAIN_WORKING_SUFFIX, mn as KIND_REQUIRED, mt as HookSessionPayload, n as CarnetOptions, nn as dropWorkspace, nt as WeightedNote, o as openCarnet, on as loadWorkspace, ot as sessionNoteActivity, p as MAIN_WAITING_SUFFIX, pn as FinishAgentInput, pt as HookEnv, q as NOTE_KINDS, qt as DropWorkspaceOptions, r as ClosedAgent, rn as expandHome, rt as isNoteKind, s as openResolvedCarnet, sn as removeWorkspaceRepo, st as similarity, t as Carnet, tn as definitionInstructions, tt as STALE_AFTER_ACTIVE_DAYS, u as MAIN_FAILED_SUFFIX, un as AGENT_KINDS, ut as TableItem, v as RenderOptions, vn as SANDBOX_KINDS, vt as SessionKind, w as renderNotesSummary, wn as AgentStatus, wt as HostRender, x as renderMainLine, xn as isAgentKind, xt as DEFAULT_HOST, y as SIMILAR_PREFIX, yn as StartAgentInput, yt as SessionStatus, z as TurnOptions, zn as AgentEventType, zt as isInside } from "./carnet-BFA2yya4.mjs";
2
2
  import { DatabaseSync } from "node:sqlite";
3
3
  interface MoveOptions {
4
4
  merge?: boolean | undefined;
@@ -19,16 +19,96 @@ export declare function archiveWorkspaceSessions(db: DatabaseSync, name: string,
19
19
  export declare function deleteWorkspaceNotes(db: DatabaseSync, name: string): number;
20
20
  export declare function workspaceSessionCounts(db: DatabaseSync): Map<string, number>;
21
21
  export declare function workspaceLastActive(db: DatabaseSync): Map<string, string>;
22
+ interface WorkspaceRowCounts {
23
+ sessions: number;
24
+ notes: number;
25
+ activeDays: number;
26
+ }
27
+ interface RunningSessionRow {
28
+ id: string;
29
+ name: string | null;
30
+ hostPid: number;
31
+ }
32
+ interface RenameWorkspaceOptions {
33
+ env?: NodeJS.ProcessEnv | undefined;
34
+ dryRun?: boolean | undefined;
35
+ isAlive: (processId: number) => boolean;
36
+ now?: (() => Date) | undefined;
37
+ }
38
+ interface FolderMove {
39
+ what: string;
40
+ from: string;
41
+ to: string;
42
+ }
43
+ interface RenamePlan {
44
+ from: string;
45
+ to: string;
46
+ moves: FolderMove[];
47
+ rows: WorkspaceRowCounts;
48
+ running: RunningSessionRow[];
49
+ }
50
+ interface RenameResult extends RenamePlan {
51
+ backup: string;
52
+ paths: number;
53
+ trustMoved: boolean;
54
+ warnings: string[];
55
+ }
56
+ export declare function planWorkspaceRename(db: DatabaseSync, from: string, to: string, options: RenameWorkspaceOptions): RenamePlan;
57
+ export declare function renameWorkspace(db: DatabaseSync, from: string, to: string, options: RenameWorkspaceOptions): RenamePlan | RenameResult;
58
+ interface MergeWorkspacesOptions {
59
+ env?: NodeJS.ProcessEnv | undefined;
60
+ isAlive: (processId: number) => boolean;
61
+ now?: (() => Date) | undefined;
62
+ }
63
+ interface FileMove {
64
+ from: string;
65
+ to: string;
66
+ }
67
+ interface MergePlan {
68
+ from: string;
69
+ into: string;
70
+ rows: WorkspaceRowCounts;
71
+ firstNumber: number;
72
+ lastNumber: number;
73
+ running: RunningSessionRow[];
74
+ reposAdded: string[];
75
+ reposRenamed: [string, string][];
76
+ settingsConflicts: string[];
77
+ reports: FileMove[];
78
+ sandboxes: FileMove[];
79
+ files: FileMove[];
80
+ instructions: string;
81
+ }
82
+ interface MergeResult$1 extends MergePlan {
83
+ backup: string;
84
+ projectMoves: number;
85
+ trustDropped: boolean;
86
+ instructionsPath: string;
87
+ warnings: string[];
88
+ }
89
+ export declare function planWorkspaceMerge(db: DatabaseSync, fromName: string, intoName: string, options: MergeWorkspacesOptions): MergePlan;
90
+ export declare function mergeWorkspaces(db: DatabaseSync, fromName: string, intoName: string, options: MergeWorkspacesOptions): MergeResult$1;
91
+ export declare function backupsDirectory(env?: NodeJS.ProcessEnv): string;
22
92
  export declare const MEMORY_DB = ":memory:";
23
93
  export declare function openDatabase(path: string): DatabaseSync;
24
94
  export declare const migrations: readonly string[];
25
95
  export declare function schemaVersion(db: DatabaseSync): number;
26
96
  export declare function migrate(db: DatabaseSync): void;
27
- type CarnetErrorCode = 'NO_WORKSPACE' | 'WORKSPACE_EXISTS' | 'WORKSPACE_NOT_FOUND' | 'WORKSPACE_NAME_INVALID' | 'REPO_NOT_FOUND' | 'REPO_NAME_TAKEN' | 'NOTE_NOT_FOUND' | 'INVALID_NOTE' | 'UNKNOWN_HOST' | 'NO_SESSION' | 'SESSION_NOT_FOUND' | 'SESSION_AMBIGUOUS' | 'SESSION_NAME_TAKEN' | 'SESSION_NAME_REQUIRED' | 'SESSION_RUNNING' | 'SESSION_KIND_INVALID' | 'SESSION_MERGE_INVALID' | 'SESSION_EXISTS' | 'SESSION_MOVE_INVALID' | 'SESSION_CWD_MISSING' | 'RUN_DIRECTORY_FILE_CONFLICT' | 'WORKSPACE_INSTRUCTIONS_CONFLICT' | 'AGENT_EXISTS' | 'AGENT_NOT_FOUND' | 'INVALID_TARGET' | 'INVALID_BLOCKER' | 'INVALID_KIND' | 'INVALID_SANDBOX' | 'INVALID_QUESTIONS' | 'QUESTION_NOT_FOUND' | 'FINDING_NOT_FOUND' | 'REASON_REQUIRED' | 'SECTION_NOT_FOUND' | 'REPORT_MISSING' | 'INVALID_STATUS' | 'INVALID_EVENT_TYPE' | 'COMMIT_REQUIRED';
97
+ type CarnetErrorCode = 'NO_WORKSPACE' | 'WORKSPACE_EXISTS' | 'WORKSPACE_NOT_FOUND' | 'WORKSPACE_NAME_INVALID' | 'WORKSPACE_BUSY' | 'WORKSPACE_RELOCATE_FAILED' | 'REPO_NOT_FOUND' | 'REPO_NAME_TAKEN' | 'NOTE_NOT_FOUND' | 'INVALID_NOTE' | 'UNKNOWN_HOST' | 'NO_SESSION' | 'SESSION_NOT_FOUND' | 'SESSION_AMBIGUOUS' | 'SESSION_NAME_TAKEN' | 'SESSION_NAME_REQUIRED' | 'SESSION_RUNNING' | 'SESSION_KIND_INVALID' | 'SESSION_MERGE_INVALID' | 'SESSION_EXISTS' | 'SESSION_MOVE_INVALID' | 'SESSION_CWD_MISSING' | 'RUN_DIRECTORY_FILE_CONFLICT' | 'WORKSPACE_INSTRUCTIONS_CONFLICT' | 'AGENT_EXISTS' | 'AGENT_NOT_FOUND' | 'AGENT_AMBIGUOUS' | 'INVALID_TARGET' | 'INVALID_BLOCKER' | 'INVALID_KIND' | 'INVALID_SANDBOX' | 'INVALID_QUESTIONS' | 'QUESTION_NOT_FOUND' | 'FINDING_NOT_FOUND' | 'REASON_REQUIRED' | 'SECTION_NOT_FOUND' | 'REPORT_MISSING' | 'INVALID_STATUS' | 'INVALID_EVENT_TYPE' | 'COMMIT_REQUIRED' | 'SCHEMA_TOO_NEW';
28
98
  export declare class CarnetError extends Error {
29
99
  readonly code: CarnetErrorCode;
30
100
  constructor(code: CarnetErrorCode, message: string);
31
101
  }
102
+ export declare function locateAgent(carnet: Carnet, name: string): {
103
+ session: Session;
104
+ agent: Agent;
105
+ };
106
+ export declare function nextAgent(carnet: Carnet, session: string, prefix?: string): string | undefined;
107
+ interface ReportDocument {
108
+ text: string;
109
+ path: string;
110
+ }
111
+ export declare function reportDocument(carnet: Carnet, session: string, name: string): ReportDocument;
32
112
  interface RucherPaths {
33
113
  config: string;
34
114
  data: string;
@@ -79,12 +159,12 @@ export declare function outsideRucherContext(workspace: Workspace | null, env?:
79
159
  export declare const OUTSIDE_RUCHER_NOTICE = "rucher: session started without rucher, the Rucher rules are not in its system prompt (use rucher new, tmp or resume)";
80
160
  export declare const RULES_UPDATED_NOTICE = "rucher: rules updated, will apply after the next compaction or in a new session";
81
161
  export declare const SUBAGENT_RULES = "Rucher rules for sub-agents: never commit, push or stash. When your task asks for a report, write it to the file it names. If your prompt names you as a Carnet agent, follow the contract of its kind, call agent_update at meaningful progress and agent_done as your last tool action, then reply with one line.";
82
- export declare const CORE_RULES = "- Work can be parallel, review stays sequential: forks work at the same time, the human handles their results one at a time.\n- The human keeps the hand: only the human launches agents, asks for their report and its next action (inject, validate, apply, triage), applies, tests and commits. Agents propose, they never push.\n- Status lives in Carnet: agent statuses, the Main line and the journal go through the Carnet tools, never into status files nor chat updates. Update before and after each piece of work.\n- When an agent finishes, say only \"<name> finished, report ready\". Never summarise, quote or act on its report or final message until the human asks for that report (/rucher:report), even when answering about something else.\n- Agents never commit, push, stash or record notes. An agent follows its kind's contract, writes its report to a file ending with a Learnings section, calls agent_done as its last tool action, then replies with one line that carries no results, such as \"<name> done, report written\". Only the main agent records notes, at the end of a step.\n- To launch agents or handle their results, load the rucher skill: it holds the full workflow.";
162
+ export declare const CORE_RULES = "- Work can be parallel, review stays sequential: forks work at the same time, the human handles their results one at a time.\n- The human keeps the hand: only the human launches agents, asks for their report and its next action (inject, validate, apply, triage), applies, tests and commits. Agents propose, they never push.\n- Status lives in Carnet: agent statuses, the Main line and the journal go through the Carnet tools, never into status files nor chat updates. Update before and after each piece of work.\n- When an agent finishes, say only \"<name> finished, report ready\". Never summarise, quote or act on its report or final message until the human asks for that report or its next action (/rucher:next), even when answering about something else.\n- Agents never commit, push, stash or record notes. An agent follows its kind's contract, writes its report to a file ending with a Learnings section, calls agent_done as its last tool action, then replies with one line that carries no results, such as \"<name> done, report written\". Only the main agent records notes, at the end of a step.\n- To launch agents or handle their results, load the rucher skill: it holds the full workflow.";
83
163
  export declare function handleUserPromptSubmit(carnet: Carnet, host: Host, payload: HostPromptPayload, options?: TurnOptions): Session;
84
164
  export declare function handleToolUse(carnet: Carnet, payload: HostToolPayload, env: HookEnv, options?: TurnOptions): string | undefined;
85
165
  export declare const WAITING_TOOL = "AskUserQuestion";
86
166
  export declare function handleToolStart(carnet: Carnet, payload: HostToolPayload): void;
87
- export declare function guardSubagentCall(carnet: Carnet, payload: HostToolPayload, scratchRoot: string): string | undefined;
167
+ export declare function guardSubagentCall(carnet: Carnet, payload: HostToolPayload, scratchRoots: string[]): string | undefined;
88
168
  export declare function guardMainLaunch(carnet: Carnet, payload: HostToolPayload): string | undefined;
89
169
  export declare const GUARDED_TOOLS: Set<string>;
90
170
  interface GuardInput {
@@ -95,7 +175,7 @@ interface GuardInput {
95
175
  cwd?: string | undefined;
96
176
  worktree?: string | null | undefined;
97
177
  sandbox?: string | null | undefined;
98
- scratchRoot: string;
178
+ scratchRoots: string[];
99
179
  }
100
180
  export declare function guardToolCall(input: GuardInput): string | undefined;
101
181
  export declare function kindOfAgentType(agentType: string | undefined): AgentKind | undefined;
@@ -110,6 +190,8 @@ interface LaunchCall {
110
190
  export declare function guardLaunch(call: LaunchCall): string | undefined;
111
191
  export declare function transcriptTitle(path: string): string | undefined;
112
192
  export declare function workspaceSettings(workspace: Workspace): Record<string, unknown>;
193
+ export declare function claudeProjectFolder(cwd: string, env?: NodeJS.ProcessEnv): string;
194
+ export declare function claudeConfigFile(env?: NodeJS.ProcessEnv): string;
113
195
  export declare const claudeCode: Host;
114
196
  export declare const DEFAULT_PURGE_DAYS = 3;
115
197
  export declare function purgeDays(value: string | undefined): number;
@@ -162,5 +244,5 @@ export declare function markdownCopy(content: string): string;
162
244
  export declare function removeStaleCopies(directory: string, keep: ReadonlySet<string>): string[];
163
245
  export declare function writeGenerated(path: string, content: string): boolean;
164
246
  export declare function mergeSettings(base: Record<string, unknown>, extra: Record<string, unknown>): Record<string, unknown>;
165
- export { AGENTS_FILE, AGENT_KINDS, AGENT_STATUSES, type AddNoteInput, type AddNoteResult, type Agent, type AgentEventType, type AgentKind, type AgentStatus, type AgentStep, type AppendPromptFile, type AssembledPrompt, BLOCKED_HEADER, Carnet, type CarnetErrorCode, type CarnetEvent, type CarnetOptions, type CiteNoteInput, type ClosedAgent, type CreateSessionInput, type CreateWorkspaceOptions, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HOST, DUPLICATE_SIMILARITY, type DropNoteInput, type DropWorkspaceOptions, EMOJI, EVENT_TYPES, type EventType, type FinishAgentInput, type HookEnv, type HookSessionPayload, type Host, type HostPromptPayload, type HostRender, type HostSessionEndPayload, type HostSessionPayload, type HostSubagentPayload, type HostToolPayload, INSTRUCTIONS_FILE, KIND_ABBREVIATIONS, KIND_LEGEND, KIND_REQUIRED, KIND_TAG_PATTERN, LEGEND, type LaunchOptions, type ListAgentsOptions, type ListNotesOptions, type ListSessionsOptions, type LogEventInput, MAIN_FAILED_EMOJI, MAIN_FAILED_SUFFIX, MAIN_HEADER, MAIN_IDLE, MAIN_WAITING_EMOJI, MAIN_WAITING_SUFFIX, MAIN_WORKING_EMOJI, MAIN_WORKING_SUFFIX, MEMORY_MAX_CHARACTERS, MINIMUM_ID_PREFIX, type MemoryOptions, type MergeResult, type MoveOptions, type MoveResult, NOTES_FOLD_LINES, NOTES_HEADER, NOTE_KINDS, NOTE_TEXT_LIMIT, type Note, type NoteActivity, type NoteActivityKind, type NoteCitation, type NoteDetail, type NoteKind, type NotesMode, type OpenCarnetOptions, PUBLISH_FALLBACK_MILLISECONDS, type PromptSession, REPORTING_NOTE, type RenderOptions, type RenderResult, type ResolveWorkspaceOptions, type ResolvedCarnet, type ResumeCommand, type ResumeContextOptions, type RucherPaths, type RunDirectoryRenderOptions, SANDBOX_KINDS, SESSION_EVENT_TYPES, SIMILAR_PREFIX, STALE_AFTER_ACTIVE_DAYS, type Session, type SessionEventType, type SessionKind, type SessionStartResult, type SessionStatus, type SetTableInput, type StartAgentInput, type StatusLine, type StatusLineOptions, type StatusView, type StatusViewOptions, type StepAgentInput, TURNS, type TableItem, type Turn, type TurnOptions, USER_ACTION_STATUSES, type UpdateAgentInput, type UserActionStatus, WORKSPACE_FILE, type WeightedNote, type Workspace, type WorkspaceFile, type WorkspaceOrigin, type WorkspaceRepo, type WorkspaceResolution, addWorkspaceRepo, allHosts, buildStatusView, createWorkspace, definitionInstructions, dropWorkspace, expandHome, formatClock, hostById, isAgentKind, isAgentStatus, isEventType, isInside, isNoteKind, isUserActionStatus, isWorkspaceName, kindTag, listWorkspaces, loadWorkspace, localDay, memoryHalfLife, memoryMaxCharacters, openCarnet, openResolvedCarnet, openWorkspaceCarnet, removeWorkspaceRepo, renderAgentLine, renderMainLine, renderMemory, renderNoteLine, renderNotes, renderNotesSummary, renderSections, renderStatus, renderTableLine, repoNameFor, repoPathFor, requireWorkspace, resolveWorkspace, sessionNoteActivity, shortId, similarity, statusWhenDone, workspaceExists, workspaceHosts, workspaceLabel, workspaceRepoNames };
247
+ export { AGENTS_FILE, AGENT_KINDS, AGENT_STATUSES, type AddNoteInput, type AddNoteResult, type Agent, type AgentEventType, type AgentKind, type AgentStatus, type AgentStep, type AppendPromptFile, type AssembledPrompt, BLOCKED_HEADER, Carnet, type CarnetErrorCode, type CarnetEvent, type CarnetOptions, type CiteNoteInput, type ClosedAgent, type CreateSessionInput, type CreateWorkspaceOptions, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HOST, DUPLICATE_SIMILARITY, type DropNoteInput, type DropWorkspaceOptions, EMOJI, EVENT_TYPES, type EventType, type FileMove, type FinishAgentInput, type FolderMove, type HookEnv, type HookSessionPayload, type Host, type HostPromptPayload, type HostRender, type HostSessionEndPayload, type HostSessionPayload, type HostSubagentPayload, type HostToolPayload, INSTRUCTIONS_FILE, KIND_ABBREVIATIONS, KIND_LEGEND, KIND_REQUIRED, KIND_TAG_PATTERN, LEGEND, type LaunchOptions, type ListAgentsOptions, type ListNotesOptions, type ListSessionsOptions, type LogEventInput, MAIN_FAILED_EMOJI, MAIN_FAILED_SUFFIX, MAIN_HEADER, MAIN_IDLE, MAIN_WAITING_EMOJI, MAIN_WAITING_SUFFIX, MAIN_WORKING_EMOJI, MAIN_WORKING_SUFFIX, MEMORY_MAX_CHARACTERS, MINIMUM_ID_PREFIX, type MemoryOptions, type MergePlan, type MergeResult, type MergeWorkspacesOptions, type MoveOptions, type MoveResult, NOTES_FOLD_LINES, NOTES_HEADER, NOTE_KINDS, NOTE_TEXT_LIMIT, type Note, type NoteActivity, type NoteActivityKind, type NoteCitation, type NoteDetail, type NoteKind, type NotesMode, type OpenCarnetOptions, PUBLISH_FALLBACK_MILLISECONDS, type ProjectRelocation, type PromptSession, REPORTING_NOTE, type RelocatedFolder, type RenamePlan, type RenameResult, type RenameWorkspaceOptions, type RenderOptions, type RenderResult, type ReportDocument, type ResolveWorkspaceOptions, type ResolvedCarnet, type ResumeCommand, type ResumeContextOptions, type RucherPaths, type RunDirectoryRenderOptions, type RunningSessionRow, SANDBOX_KINDS, SESSION_EVENT_TYPES, SIMILAR_PREFIX, STALE_AFTER_ACTIVE_DAYS, type Session, type SessionEventType, type SessionKind, type SessionStartResult, type SessionStatus, type SetTableInput, type StartAgentInput, type StatusLine, type StatusLineOptions, type StatusView, type StatusViewOptions, type StepAgentInput, TURNS, type TableItem, type Turn, type TurnOptions, USER_ACTION_STATUSES, type UpdateAgentInput, type UserActionStatus, WORKSPACE_FILE, type WeightedNote, type Workspace, type WorkspaceFile, type MergeResult$1 as WorkspaceMergeResult, type WorkspaceOrigin, type WorkspaceRepo, type WorkspaceResolution, type WorkspaceRowCounts, addWorkspaceRepo, allHosts, buildStatusView, createWorkspace, definitionInstructions, dropWorkspace, expandHome, formatClock, hostById, isAgentKind, isAgentStatus, isEventType, isInside, isNoteKind, isUserActionStatus, isWorkspaceName, kindTag, listWorkspaces, loadWorkspace, localDay, memoryHalfLife, memoryMaxCharacters, openCarnet, openResolvedCarnet, openWorkspaceCarnet, removeWorkspaceRepo, renderAgentLine, renderMainLine, renderMemory, renderNoteLine, renderNotes, renderNotesSummary, renderSections, renderStatus, renderTableLine, repoNameFor, repoPathFor, requireWorkspace, resolveWorkspace, sessionNoteActivity, shortId, similarity, statusWhenDone, workspaceExists, workspaceHosts, workspaceLabel, workspaceRepoNames };
166
248
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/move.ts","../src/workspace-rows.ts","../src/db/open.ts","../src/db/schema.ts","../src/errors.ts","../src/paths.ts","../src/hook/session-end.ts","../src/hook/session-start.ts","../src/prompt/prompt.ts","../src/prompt/core-rules.ts","../src/hook/user-prompt-submit.ts","../src/hook/post-tool-use.ts","../src/guard.ts","../src/launch.ts","../src/hosts/claude-code.ts","../src/purge.ts","../src/resume.ts","../src/subagents.ts","../src/status/note.ts","../src/status/line.ts","../src/steps.ts","../src/render.ts","../src/run-directory-files.ts"],"mappings":";;UAIiB;EACf;EACA;;UAGe;EACf,SAAS;EACT,MAAM;EACN;EACA;EACA;EACA;EACA;;wBAwBc,YACd,QAAQ,QACR,mBACA,yBACA,UAAS,cACR;wBC/Ba,qBAAqB,IAAI,cAAc;wBAOvC,yBAAyB,IAAI,cAAc,cAAc;wBAiBzD,qBAAqB,IAAI,cAAc;wBAIvC,uBAAuB,IAAI,eAAe;wBAU1C,oBAAoB,IAAI,eAAe;qBCjD1C;wBAEG,aAAa,eAAe;qBCQ/B;wBAybG,cAAc,IAAI;wBASlB,QAAQ,IAAI;KC/chB;qBAuCC,oBAAoB;WAEpB,MAAM;EADjB,YACW,MAAM,iBACf;;UCtCa;EACf;EACA;EACA;EACA;;wBAQc,YAAY,MAAK,OAAO,aAA2B;wBAuBnD,aAAa,MAAM,OAAO;wBAI1B,oBAAoB,MAAM,OAAO;wBAIjC,oBAAoB,cAAc,MAAM,OAAO;wBAI/C,oBAAoB,cAAc,MAAM,OAAO;wBAI/C,iBAAiB,MAAM,OAAO;wBAI9B,eAAe,MAAM,OAAO;wBAI5B,iBAAiB,WAAW;wBAI5B,mBAAmB,WAAW;wBAI9B,WAAW,WAAW,WAAW;wBCnEjC,iBACd,QAAQ,QACR,SAAS,wBACR;wBAOa,WAAW,QAAQ,QAAQ,SAAS;UCEnC;EACf,SAAS;EACT;EACA;EACA;;wBAoDc,mBACd,QAAQ,QACR,SAAS,oBACT,KAAK,UACJ;qBCpEU;UAEI;EACf;EACA;EACA,MAAM;;UAGS;EACf;EACA;;UAGe;EACf;EACA;;wBASc,UAAU,MAAK,OAAO;wBAItB,eAAe,WAAW;wBAI1B,UACd,WAAW,kBACX,MAAK,OAAO;wBAUE,aACd,WAAW,kBACX,MAAK,OAAO;wBAKE,eACd,WAAW,kBACX,SAAS,eACT,MAAK,OAAO,aAC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wBAWb,kBAAkB,mBAAmB,MAAM;wBAa3C,eAAe,cAAc;wBAiB7B,cACd,MAAM,yBACN,OAAO,0BACN"}
1
+ {"version":3,"file":"index.d.mts","names":["MergeResult"],"sources":["../src/move.ts","../src/workspace-rows.ts","../src/workspace/rename.ts","../src/workspace/merge.ts","../src/workspace/backup.ts","../src/db/open.ts","../src/db/schema.ts","../src/errors.ts","../src/kinds.ts","../src/paths.ts","../src/hook/session-end.ts","../src/hook/session-start.ts","../src/prompt/prompt.ts","../src/prompt/core-rules.ts","../src/hook/user-prompt-submit.ts","../src/hook/post-tool-use.ts","../src/guard.ts","../src/launch.ts","../src/hosts/claude-code.ts","../src/purge.ts","../src/resume.ts","../src/subagents.ts","../src/status/note.ts","../src/status/line.ts","../src/steps.ts","../src/render.ts","../src/run-directory-files.ts"],"mappings":";;UAIiB;EACf;EACA;;UAGe;EACf,SAAS;EACT,MAAM;EACN;EACA;EACA;EACA;EACA;;wBAwBc,YACd,QAAQ,QACR,mBACA,yBACA,UAAS,cACR;wBC9Ba,qBAAqB,IAAI,cAAc;wBAOvC,yBAAyB,IAAI,cAAc,cAAc;wBAczD,qBAAqB,IAAI,cAAc;wBAIvC,uBAAuB,IAAI,eAAe;wBAU1C,oBAAoB,IAAI,eAAe;UAkCtC;EACf;EACA;EACA;;UAee;EACf;EACA;EACA;;UCjFe;EACf,MAAM,OAAO;EACb;EACA,UAAU;EACV,aAAa;;UAGE;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA,OAAO;EACP,MAAM;EACN,SAAS;;UAGM,qBAAqB;EACpC;EACA;EACA;EACA;;wBAqBc,oBACd,IAAI,cACJ,cACA,YACA,SAAS,yBACR;wBAqCa,gBACd,IAAI,cACJ,cACA,YACA,SAAS,yBACR,aAAa;UCjFC;EACf,MAAM,OAAO;EACb,UAAU;EACV,aAAa;;UAGE;EACf;EACA;;UAGe;EACf;EACA;EACA,MAAM;EAEN;EACA;EACA,SAAS;EACT;EACA;EACA;EACA,SAAS;EACT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