@rucher/carnet 0.2.0-beta.2 → 0.2.0-beta.3

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/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # @rucher/carnet
2
2
 
3
- Shared state for Rucher: groups, sessions, agents, the "On the table" line and the event journal, stored in one SQLite database per group (`<meta directory>/.rucher/carnet.db`, via `node:sqlite`).
3
+ Shared state for Rucher: groups, sessions, agents, the "On the table" line and the event journal, stored in one SQLite database for every group (`~/.local/share/rucher/carnet.db`, via `node:sqlite`), with groups defined in `~/.config/rucher/groups/<name>/group.json`.
4
4
 
5
5
  Used by the `rucher` CLI and the Carnet MCP server. See [`docs/reference.md`](https://github.com/Florian-Varrin/Rucher/blob/master/docs/reference.md) in the [repository](https://github.com/Florian-Varrin/Rucher).
6
6
 
7
7
  ```ts
8
8
  import { openCarnet } from '@rucher/carnet';
9
9
 
10
- const carnet = openCarnet({ cwd: process.cwd() });
10
+ const carnet = openCarnet({ group: 'shop' });
11
11
  const session = carnet.sessions.default();
12
12
  if (session) console.log(carnet.status.render(session));
13
13
  ```
@@ -2,6 +2,7 @@ import { DatabaseSync } from "node:sqlite";
2
2
  interface Ctx {
3
3
  db: DatabaseSync;
4
4
  now: () => Date;
5
+ group: string | null;
5
6
  }
6
7
  declare const AGENT_STATUSES: readonly ['running', 'discussing', 'answer', 'review', 'apply', 'test', 'commit', 'branch', 'closed'];
7
8
  type AgentStatus = (typeof AGENT_STATUSES)[number];
@@ -49,37 +50,68 @@ interface ListAgentsOptions {
49
50
  }
50
51
  declare const REPORTING_NOTE = "reporting";
51
52
  declare const PUBLISH_FALLBACK_MILLISECONDS = 120000;
52
- declare const GROUP_DIRECTORY = ".rucher";
53
- declare const REPORTS_DIRECTORY = "reports";
54
- declare const GROUP_FILE = "group.json";
55
- declare const DB_FILE = "carnet.db";
53
+ interface GroupRepo {
54
+ path: string;
55
+ name: string;
56
+ }
56
57
  interface Group {
57
- root: string;
58
58
  name: string;
59
- repos: string[];
60
- hosts: string[];
61
- dbPath: string;
59
+ source: string;
60
+ workspace: string;
61
+ repos: GroupRepo[];
62
+ backends: Record<string, {
63
+ settings?: Record<string, unknown>;
64
+ }>;
62
65
  }
63
66
  interface GroupFile {
64
- name: string;
65
- repos: string[];
66
- hosts?: string[] | undefined;
67
+ name?: string | undefined;
68
+ workspace?: string | undefined;
69
+ repos?: {
70
+ path: string;
71
+ name?: string | undefined;
72
+ }[] | undefined;
73
+ backends?: Group['backends'] | undefined;
67
74
  }
75
+ declare const GROUP_FILE = "group.json";
76
+ declare const INSTRUCTIONS_FILE = "CLAUDE.md";
77
+ declare function isGroupName(name: string): boolean;
78
+ declare function expandHome(path: string, env?: NodeJS.ProcessEnv): string;
79
+ declare function groupExists(name: string, env?: NodeJS.ProcessEnv): boolean;
80
+ declare function loadGroup(name: string, env?: NodeJS.ProcessEnv): Group;
81
+ declare function listGroups(env?: NodeJS.ProcessEnv): Group[];
82
+ declare function groupHosts(group: Group): string[];
83
+ interface CreateGroupOptions {
84
+ repos?: readonly string[] | undefined;
85
+ env?: NodeJS.ProcessEnv | undefined;
86
+ }
87
+ declare function createGroup(name: string, options?: CreateGroupOptions): Group;
88
+ declare function addGroupRepo(name: string, repo: string, env?: NodeJS.ProcessEnv): Group;
89
+ declare function removeGroupRepo(name: string, repo: string, env?: NodeJS.ProcessEnv): Group;
90
+ declare function renameGroup(from: string, to: string, env?: NodeJS.ProcessEnv): Group;
91
+ interface DropGroupOptions {
92
+ purge?: boolean | undefined;
93
+ env?: NodeJS.ProcessEnv | undefined;
94
+ }
95
+ declare function dropGroup(name: string, options?: DropGroupOptions): Group;
68
96
  declare function isInside(directory: string, path: string): boolean;
69
- declare function repoNameFor(group: Group, path: string | undefined): string | null;
70
- declare function repoPathFor(group: Group, path: string | undefined | null): string | null;
71
- declare function findGroupRoot(from: string): string | null;
72
- declare function reportsDirectoryOf(group: Group): string;
73
- declare function reportPathFor(group: Group, agentName: string): string;
74
- declare function isGroupRoot(directory: string): boolean;
75
- declare function loadGroup(root: string): Group;
76
- interface LocateOptions {
77
- cwd?: string;
78
- env?: NodeJS.ProcessEnv;
97
+ declare function repoNameFor(group: Group | null, path: string | undefined): string | null;
98
+ declare function repoPathFor(group: Group | null, path: string | undefined | null): string | null;
99
+ type GroupOrigin = 'session' | 'option' | 'env' | 'workspace' | 'repo' | 'none';
100
+ interface GroupResolution {
101
+ group: Group | null;
102
+ origin: GroupOrigin;
103
+ repo?: GroupRepo | undefined;
104
+ }
105
+ interface ResolveGroupOptions {
106
+ db?: DatabaseSync | undefined;
79
107
  sessionId?: string | undefined;
108
+ group?: string | undefined;
109
+ cwd?: string | undefined;
110
+ env?: NodeJS.ProcessEnv | undefined;
80
111
  }
81
- declare function pinnedGroup(env: NodeJS.ProcessEnv): Group | null;
82
- declare function locateGroup({ cwd, env, sessionId }?: LocateOptions): Group;
112
+ declare function resolveGroup({ db, sessionId, group, cwd, env }?: ResolveGroupOptions): GroupResolution;
113
+ declare function groupLabel(group: Group | null): string;
114
+ declare function requireGroup(group: Group | null): Group;
83
115
  declare function ambiguousGroupContext(reason: string): string;
84
116
  interface HostSessionPayload {
85
117
  session_id: string;
@@ -121,12 +153,12 @@ interface LaunchOptions {
121
153
  name?: string | null | undefined;
122
154
  appendPromptFile?: string | undefined;
123
155
  passthrough?: readonly string[] | undefined;
156
+ directories?: readonly string[] | undefined;
124
157
  }
125
- interface ContextFile {
126
- path: string;
127
- sync(group: Group, mode: 'merge' | 'exact'): ContextFileResult;
158
+ interface HostRender {
159
+ written: string[];
160
+ removed: string[];
128
161
  }
129
- type ContextFileResult = 'written' | 'updated' | 'unchanged' | 'no-markers';
130
162
  interface Host {
131
163
  id: string;
132
164
  displayName: string;
@@ -147,7 +179,7 @@ interface Host {
147
179
  forkCommand(parent: Session, options?: LaunchOptions): ResumeCommand;
148
180
  renameInstruction(name: string): string;
149
181
  transcriptFiles(session: Session, env?: NodeJS.ProcessEnv): string[];
150
- contextFiles: readonly ContextFile[];
182
+ renderWorkspace(group: Group): HostRender;
151
183
  }
152
184
  declare const DEFAULT_HOST = "claude-code";
153
185
  declare function allHosts(): Host[];
@@ -156,6 +188,7 @@ type SessionKind = 'active' | 'temp';
156
188
  type SessionStatus = 'running' | 'idle' | 'archived';
157
189
  interface Session {
158
190
  id: string;
191
+ groupName: string | null;
159
192
  name: string | null;
160
193
  purpose: string | null;
161
194
  kind: SessionKind;
@@ -367,10 +400,11 @@ interface CarnetOptions {
367
400
  now?: () => Date;
368
401
  }
369
402
  declare class Carnet {
370
- readonly group: Group;
403
+ readonly group: Group | null;
371
404
  readonly db: DatabaseSync;
372
405
  private readonly ctx;
373
- constructor(group: Group, db: DatabaseSync, options?: CarnetOptions);
406
+ constructor(db: DatabaseSync, group: Group | null, options?: CarnetOptions);
407
+ requireGroup(): Group;
374
408
  readonly sessions: {
375
409
  get: (id: string) => Session | undefined;
376
410
  find: (reference: string) => Session;
@@ -443,10 +477,19 @@ declare class Carnet {
443
477
  };
444
478
  close(): void;
445
479
  }
446
- interface OpenCarnetOptions extends LocateOptions, CarnetOptions {
447
- dbPath?: string;
480
+ interface OpenCarnetOptions extends CarnetOptions {
481
+ group?: string | undefined;
482
+ sessionId?: string | undefined;
483
+ cwd?: string | undefined;
484
+ env?: NodeJS.ProcessEnv | undefined;
485
+ dbPath?: string | undefined;
448
486
  }
449
487
  declare function openCarnet(options?: OpenCarnetOptions): Carnet;
450
- declare function openGroupCarnet(group: Group, options?: OpenCarnetOptions): Carnet;
451
- export { EventType as $, UpdateAgentInput as $t, DEFAULT_HALF_LIFE_DAYS as A, GROUP_DIRECTORY as At, NoteDetail as B, loadGroup as Bt, StatusLine as C, HostSubagentPayload as Ct, AddNoteInput as D, allHosts as Dt, formatClock as E, ResumeCommand as Et, NOTE_TEXT_LIMIT as F, REPORTS_DIRECTORY as Ft, isNoteKind as G, reportPathFor as Gt, STALE_AFTER_ACTIVE_DAYS as H, pinnedGroup as Ht, Note as I, ambiguousGroupContext as It, sessionNoteActivity as J, FinishAgentInput as Jt, localDay as K, reportsDirectoryOf as Kt, NoteActivity as L, findGroupRoot as Lt, DropNoteInput as M, Group as Mt, ListNotesOptions as N, GroupFile as Nt, AddNoteResult as O, hostById as Ot, NOTE_KINDS as P, LocateOptions as Pt, EVENT_TYPES as Q, StartAgentInput as Qt, NoteActivityKind as R, isGroupRoot as Rt, renderMemory as S, HostSessionPayload as St, buildStatusView as T, LaunchOptions as Tt, WeightedNote as U, repoNameFor as Ut, NoteKind as V, locateGroup as Vt, groupRepoNames as W, repoPathFor as Wt, AgentEventType as X, PUBLISH_FALLBACK_MILLISECONDS as Xt, similarity as Y, ListAgentsOptions as Yt, CarnetEvent as Z, REPORTING_NOTE as Zt, renderStatus as _, ContextFileResult as _t, openGroupCarnet as a, OPEN_AGENT_STATUSES as an, TableItem as at, MemoryOptions as b, HostPromptPayload as bt, NOTES_HEADER as c, isAgentStatus as cn, HookEnv as ct, SIMILAR_PREFIX as d, MINIMUM_ID_PREFIX as dt, AGENT_STATUSES as en, LogEventInput as et, renderAgentLine as f, Session as ft, renderSections as g, ContextFile as gt, renderNotesSummary as h, shortId as ht, openCarnet as i, MAIN_WORKING_EMOJI as in, SetTableInput as it, DUPLICATE_SIMILARITY as j, GROUP_FILE as jt, CiteNoteInput as k, DB_FILE as kt, NotesMode as l, isUserActionStatus as ln, HookSessionPayload as lt, renderNotes as m, SessionStatus as mt, CarnetOptions as n, EMOJI as nn, SessionEventType as nt, MAIN_WORKING_SUFFIX as o, USER_ACTION_STATUSES as on, MergeResult as ot, renderNoteLine as p, SessionKind as pt, memoryHalfLife as q, Agent as qt, OpenCarnetOptions as r, LEGEND as rn, isEventType as rt, NOTES_FOLD_LINES as s, UserActionStatus as sn, CreateSessionInput as st, Carnet as t, AgentStatus as tn, SESSION_EVENT_TYPES as tt, RenderOptions as u, ListSessionsOptions as ut, renderTableLine as v, DEFAULT_HOST as vt, StatusView as w, HostToolPayload as wt, memoryMaxCharacters as x, HostSessionEndPayload as xt, MEMORY_MAX_CHARACTERS as y, Host as yt, NoteCitation as z, isInside as zt };
452
- //# sourceMappingURL=carnet-Dbkz_bzM.d.mts.map
488
+ interface ResolvedCarnet {
489
+ carnet: Carnet;
490
+ resolution: GroupResolution;
491
+ }
492
+ declare function openResolvedCarnet(options?: OpenCarnetOptions): ResolvedCarnet;
493
+ declare function openGroupCarnet(group: Group | null, options?: OpenCarnetOptions): Carnet;
494
+ export { CarnetEvent as $, isGroupName as $t, AddNoteResult as A, GroupOrigin as At, NoteActivityKind as B, CreateGroupOptions as Bt, memoryMaxCharacters as C, HostSessionPayload as Ct, buildStatusView as D, ResumeCommand as Dt, StatusView as E, LaunchOptions as Et, ListNotesOptions as F, isInside as Ft, WeightedNote as G, GroupRepo as Gt, NoteDetail as H, GROUP_FILE as Ht, NOTE_KINDS as I, repoNameFor as It, localDay as J, createGroup as Jt, groupRepoNames as K, INSTRUCTIONS_FILE as Kt, NOTE_TEXT_LIMIT as L, repoPathFor as Lt, DEFAULT_HALF_LIFE_DAYS as M, ResolveGroupOptions as Mt, DUPLICATE_SIMILARITY as N, ambiguousGroupContext as Nt, formatClock as O, allHosts as Ot, DropNoteInput as P, groupLabel as Pt, AgentEventType as Q, groupHosts as Qt, Note as R, requireGroup as Rt, MemoryOptions as S, HostSessionEndPayload as St, StatusLine as T, HostToolPayload as Tt, NoteKind as U, Group as Ut, NoteCitation as V, DropGroupOptions as Vt, STALE_AFTER_ACTIVE_DAYS as W, GroupFile as Wt, sessionNoteActivity as X, expandHome as Xt, memoryHalfLife as Y, dropGroup as Yt, similarity as Z, groupExists as Zt, renderNotesSummary as _, USER_ACTION_STATUSES as _n, shortId as _t, openCarnet as a, FinishAgentInput as an, isEventType as at, renderTableLine as b, isUserActionStatus as bn, HostPromptPayload as bt, MAIN_WORKING_SUFFIX as c, REPORTING_NOTE as cn, MergeResult as ct, NotesMode as d, AGENT_STATUSES as dn, HookSessionPayload as dt, listGroups as en, EVENT_TYPES as et, RenderOptions as f, AgentStatus as fn, ListSessionsOptions as ft, renderNotes as g, OPEN_AGENT_STATUSES as gn, SessionStatus as gt, renderNoteLine as h, MAIN_WORKING_EMOJI as hn, SessionKind as ht, ResolvedCarnet as i, Agent as in, SessionEventType as it, CiteNoteInput as j, GroupResolution as jt, AddNoteInput as k, hostById as kt, NOTES_FOLD_LINES as l, StartAgentInput as ln, CreateSessionInput as lt, renderAgentLine as m, LEGEND as mn, Session as mt, CarnetOptions as n, removeGroupRepo as nn, LogEventInput as nt, openGroupCarnet as o, ListAgentsOptions as on, SetTableInput as ot, SIMILAR_PREFIX as p, EMOJI as pn, MINIMUM_ID_PREFIX as pt, isNoteKind as q, addGroupRepo as qt, OpenCarnetOptions as r, renameGroup as rn, SESSION_EVENT_TYPES as rt, openResolvedCarnet as s, PUBLISH_FALLBACK_MILLISECONDS as sn, TableItem as st, Carnet as t, loadGroup as tn, EventType as tt, NOTES_HEADER as u, UpdateAgentInput as un, HookEnv as ut, renderSections as v, UserActionStatus as vn, DEFAULT_HOST as vt, renderMemory as w, HostSubagentPayload as wt, MEMORY_MAX_CHARACTERS as x, HostRender as xt, renderStatus as y, isAgentStatus as yn, Host as yt, NoteActivity as z, resolveGroup as zt };
495
+ //# sourceMappingURL=carnet-Du3xigg-.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carnet-Du3xigg-.d.mts","names":["_$__merge_ts0.MergeResult","_$__agents_ts0.Agent","_$__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/status/model.ts","../src/agents.ts","../src/group/group.ts","../src/group/locate.ts","../src/hosts/host.ts","../src/sessions.ts","../src/merge.ts","../src/table.ts","../src/events.ts","../src/notes.ts","../src/status/view.ts","../src/memory.ts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EjC,OAAI,YAAa,OAAS,kBAAAF;IAC1B,OAAI,YAAa,OAAS,kBAAAG;IAC1B;IACA,WAAQ,oBAF+BC;;WAKhC;IACP,UAAO,SAAY,SAAO,UAAY;IAEtC,YAAS,SAAY,SAAO,UAAY;IAExC,UAAO,SAAY,SAAO,cAAc,UAAY;IAEpD,YAAS,cAAe;;WAGjB;IACP,OAAI,SAAY,YAAAC;IAChB,SAAM,SAAY,SAAO,UAAY;IAErC,WAAQ,SAAY;;EAGtB;;UAKe,0BAA0B;EACzC;EACA;EACA;EACA,MAAM,OAAO;EACb;;iBASc,WAAW,UAAS,oBAAyB;UAI5C;EACf,QAAQ;EACR,YAAY;;iBAGE,mBAAmB,UAAS,oBAAyB;iBAWrD,gBAAgB,OAAO,cAAc,UAAS,oBAAyB"}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as EventType, $t as UpdateAgentInput, A as DEFAULT_HALF_LIFE_DAYS, At as GROUP_DIRECTORY, B as NoteDetail, Bt as loadGroup, C as StatusLine, Ct as HostSubagentPayload, D as AddNoteInput, Dt as allHosts, E as formatClock, Et as ResumeCommand, F as NOTE_TEXT_LIMIT, Ft as REPORTS_DIRECTORY, G as isNoteKind, Gt as reportPathFor, H as STALE_AFTER_ACTIVE_DAYS, Ht as pinnedGroup, I as Note, It as ambiguousGroupContext, J as sessionNoteActivity, Jt as FinishAgentInput, K as localDay, Kt as reportsDirectoryOf, L as NoteActivity, Lt as findGroupRoot, M as DropNoteInput, Mt as Group, N as ListNotesOptions, Nt as GroupFile, O as AddNoteResult, Ot as hostById, P as NOTE_KINDS, Pt as LocateOptions, Q as EVENT_TYPES, Qt as StartAgentInput, R as NoteActivityKind, Rt as isGroupRoot, S as renderMemory, St as HostSessionPayload, T as buildStatusView, Tt as LaunchOptions, U as WeightedNote, Ut as repoNameFor, V as NoteKind, Vt as locateGroup, W as groupRepoNames, Wt as repoPathFor, X as AgentEventType, Xt as PUBLISH_FALLBACK_MILLISECONDS, Y as similarity, Yt as ListAgentsOptions, Z as CarnetEvent, Zt as REPORTING_NOTE, _ as renderStatus, _t as ContextFileResult, a as openGroupCarnet, an as OPEN_AGENT_STATUSES, at as TableItem, b as MemoryOptions, bt as HostPromptPayload, c as NOTES_HEADER, cn as isAgentStatus, ct as HookEnv, d as SIMILAR_PREFIX, dt as MINIMUM_ID_PREFIX, en as AGENT_STATUSES, et as LogEventInput, f as renderAgentLine, ft as Session, g as renderSections, gt as ContextFile, h as renderNotesSummary, ht as shortId, i as openCarnet, in as MAIN_WORKING_EMOJI, it as SetTableInput, j as DUPLICATE_SIMILARITY, jt as GROUP_FILE, k as CiteNoteInput, kt as DB_FILE, l as NotesMode, ln as isUserActionStatus, lt as HookSessionPayload, m as renderNotes, mt as SessionStatus, n as CarnetOptions, nn as EMOJI, nt as SessionEventType, o as MAIN_WORKING_SUFFIX, on as USER_ACTION_STATUSES, ot as MergeResult, p as renderNoteLine, pt as SessionKind, q as memoryHalfLife, qt as Agent, r as OpenCarnetOptions, rn as LEGEND, rt as isEventType, s as NOTES_FOLD_LINES, sn as UserActionStatus, st as CreateSessionInput, t as Carnet, tn as AgentStatus, tt as SESSION_EVENT_TYPES, u as RenderOptions, ut as ListSessionsOptions, v as renderTableLine, vt as DEFAULT_HOST, w as StatusView, wt as HostToolPayload, x as memoryMaxCharacters, xt as HostSessionEndPayload, y as MEMORY_MAX_CHARACTERS, yt as Host, z as NoteCitation, zt as isInside } from "./carnet-Dbkz_bzM.mjs";
1
+ import { $ as CarnetEvent, $t as isGroupName, A as AddNoteResult, At as GroupOrigin, B as NoteActivityKind, Bt as CreateGroupOptions, C as memoryMaxCharacters, Ct as HostSessionPayload, D as buildStatusView, Dt as ResumeCommand, E as StatusView, Et as LaunchOptions, F as ListNotesOptions, Ft as isInside, G as WeightedNote, Gt as GroupRepo, H as NoteDetail, Ht as GROUP_FILE, I as NOTE_KINDS, It as repoNameFor, J as localDay, Jt as createGroup, K as groupRepoNames, Kt as INSTRUCTIONS_FILE, L as NOTE_TEXT_LIMIT, Lt as repoPathFor, M as DEFAULT_HALF_LIFE_DAYS, Mt as ResolveGroupOptions, N as DUPLICATE_SIMILARITY, Nt as ambiguousGroupContext, O as formatClock, Ot as allHosts, P as DropNoteInput, Pt as groupLabel, Q as AgentEventType, Qt as groupHosts, R as Note, Rt as requireGroup, S as MemoryOptions, St as HostSessionEndPayload, T as StatusLine, Tt as HostToolPayload, U as NoteKind, Ut as Group, V as NoteCitation, Vt as DropGroupOptions, W as STALE_AFTER_ACTIVE_DAYS, Wt as GroupFile, X as sessionNoteActivity, Xt as expandHome, Y as memoryHalfLife, Yt as dropGroup, Z as similarity, Zt as groupExists, _ as renderNotesSummary, _n as USER_ACTION_STATUSES, _t as shortId, a as openCarnet, an as FinishAgentInput, at as isEventType, b as renderTableLine, bn as isUserActionStatus, bt as HostPromptPayload, c as MAIN_WORKING_SUFFIX, cn as REPORTING_NOTE, ct as MergeResult, d as NotesMode, dn as AGENT_STATUSES, dt as HookSessionPayload, en as listGroups, et as EVENT_TYPES, f as RenderOptions, fn as AgentStatus, ft as ListSessionsOptions, g as renderNotes, gn as OPEN_AGENT_STATUSES, gt as SessionStatus, h as renderNoteLine, hn as MAIN_WORKING_EMOJI, ht as SessionKind, i as ResolvedCarnet, in as Agent, it as SessionEventType, j as CiteNoteInput, jt as GroupResolution, k as AddNoteInput, kt as hostById, l as NOTES_FOLD_LINES, ln as StartAgentInput, lt as CreateSessionInput, m as renderAgentLine, mn as LEGEND, mt as Session, n as CarnetOptions, nn as removeGroupRepo, nt as LogEventInput, o as openGroupCarnet, on as ListAgentsOptions, ot as SetTableInput, p as SIMILAR_PREFIX, pn as EMOJI, pt as MINIMUM_ID_PREFIX, q as isNoteKind, qt as addGroupRepo, r as OpenCarnetOptions, rn as renameGroup, rt as SESSION_EVENT_TYPES, s as openResolvedCarnet, sn as PUBLISH_FALLBACK_MILLISECONDS, st as TableItem, t as Carnet, tn as loadGroup, tt as EventType, u as NOTES_HEADER, un as UpdateAgentInput, ut as HookEnv, v as renderSections, vn as UserActionStatus, vt as DEFAULT_HOST, w as renderMemory, wt as HostSubagentPayload, x as MEMORY_MAX_CHARACTERS, xt as HostRender, y as renderStatus, yn as isAgentStatus, yt as Host, z as NoteActivity, zt as resolveGroup } from "./carnet-Du3xigg-.mjs";
2
2
  import { DatabaseSync } from "node:sqlite";
3
3
  interface MoveOptions {
4
4
  merge?: boolean | undefined;
@@ -11,36 +11,39 @@ interface MoveResult {
11
11
  skippedAgents: string[];
12
12
  movedEvents: number;
13
13
  movedTable: boolean;
14
- unlinkedNotes: number;
14
+ keptNotes: number;
15
15
  }
16
- export declare function moveSession(source: Carnet, sessionId: string, target: Carnet, options?: MoveOptions): MoveResult;
16
+ export declare function moveSession(carnet: Carnet, sessionId: string, targetGroup: string, options?: MoveOptions): MoveResult;
17
+ export declare function sessionGroupName(db: DatabaseSync, sessionId: string): string | null | undefined;
18
+ export declare function renameGroupRows(db: DatabaseSync, from: string, to: string): void;
19
+ export declare function archiveGroupSessions(db: DatabaseSync, name: string, at: string): number;
20
+ export declare function deleteGroupNotes(db: DatabaseSync, name: string): number;
21
+ export declare function groupSessionCounts(db: DatabaseSync): Map<string, number>;
17
22
  export declare const MEMORY_DB = ":memory:";
18
23
  export declare function openDatabase(path: string): DatabaseSync;
19
24
  export declare const migrations: readonly string[];
20
25
  export declare function schemaVersion(db: DatabaseSync): number;
21
26
  export declare function migrate(db: DatabaseSync): void;
22
- type CarnetErrorCode = 'NO_GROUP' | 'GROUP_AMBIGUOUS' | 'GROUP_EXISTS' | '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' | 'AGENT_EXISTS' | 'AGENT_NOT_FOUND' | 'INVALID_STATUS' | 'INVALID_EVENT_TYPE' | 'COMMIT_REQUIRED' | 'TABLE_STATUS_WITH_MAIN_WORKING';
27
+ type CarnetErrorCode = 'NO_GROUP' | 'GROUP_AMBIGUOUS' | 'GROUP_EXISTS' | 'GROUP_NOT_FOUND' | 'GROUP_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' | 'WORKSPACE_FILE_CONFLICT' | 'AGENT_EXISTS' | 'AGENT_NOT_FOUND' | 'INVALID_STATUS' | 'INVALID_EVENT_TYPE' | 'COMMIT_REQUIRED' | 'TABLE_STATUS_WITH_MAIN_WORKING';
23
28
  export declare class CarnetError extends Error {
24
29
  readonly code: CarnetErrorCode;
25
30
  constructor(code: CarnetErrorCode, message: string);
26
31
  }
27
- interface InitOptions {
28
- name?: string | undefined;
29
- repos?: string[] | undefined;
30
- hosts?: string[] | undefined;
31
- env?: NodeJS.ProcessEnv | undefined;
32
- }
33
- export declare function initGroup(directory: string, options?: InitOptions): Group;
34
- export declare function addGroupRepo(root: string, repo: string): Group;
35
- export declare function removeGroupRepo(root: string, repo: string): Group;
36
- interface GroupReference {
37
- name: string;
38
- path: string;
32
+ interface RucherPaths {
33
+ config: string;
34
+ data: string;
35
+ state: string;
36
+ run: string;
39
37
  }
40
- export declare function rucherHome(env?: NodeJS.ProcessEnv): string;
41
- export declare function readRegistry(env?: NodeJS.ProcessEnv): GroupReference[];
42
- export declare function registerGroup(reference: GroupReference, env?: NodeJS.ProcessEnv): GroupReference[];
43
- export declare function unregisterGroups(paths: string[], env?: NodeJS.ProcessEnv): GroupReference[];
38
+ export declare function rucherPaths(env?: NodeJS.ProcessEnv): RucherPaths;
39
+ export declare function databasePath(env?: NodeJS.ProcessEnv): string;
40
+ export declare function groupsDirectory(env?: NodeJS.ProcessEnv): string;
41
+ export declare function groupSource(name: string, env?: NodeJS.ProcessEnv): string;
42
+ export declare function defaultWorkspace(name: string, env?: NodeJS.ProcessEnv): string;
43
+ export declare function promptsDirectory(env?: NodeJS.ProcessEnv): string;
44
+ export declare function corePromptPath(env?: NodeJS.ProcessEnv): string;
45
+ export declare function reportsDirectory(group: Group): string;
46
+ export declare function reportPath(group: Group, agentName: string): string;
44
47
  export declare function handleSessionEnd(carnet: Carnet, payload: HostSessionEndPayload): Session | undefined;
45
48
  interface SessionStartResult {
46
49
  session: Session;
@@ -50,7 +53,6 @@ interface SessionStartResult {
50
53
  }
51
54
  export declare function handleSessionStart(carnet: Carnet, payload: HookSessionPayload, env: HookEnv): SessionStartResult;
52
55
  export declare const PROMPT_FILE = "prompt.md";
53
- export declare const PROMPTS_DIRECTORY = "prompts";
54
56
  interface PromptSession {
55
57
  id: string;
56
58
  name: string | null;
@@ -65,26 +67,21 @@ interface AppendPromptFile {
65
67
  version: string;
66
68
  }
67
69
  export declare function baseRules(env?: NodeJS.ProcessEnv): string;
68
- export declare function groupRules(group: Group): string | undefined;
69
- export declare function rulesText(group: Group, env?: NodeJS.ProcessEnv): string;
70
- export declare function rulesVersion(group: Group, env?: NodeJS.ProcessEnv): string;
71
- export declare function assemblePrompt(group: Group, session: PromptSession, env?: NodeJS.ProcessEnv): AssembledPrompt;
72
- export declare function appendPromptFile(group: Group, session: PromptSession, env?: NodeJS.ProcessEnv): AppendPromptFile;
73
- export declare function compactReminder(group: Group, env?: NodeJS.ProcessEnv): string;
74
- export declare function outsideRucherContext(group: Group, env?: NodeJS.ProcessEnv): string;
70
+ export declare function groupRules(group: Group | null): string | undefined;
71
+ export declare function rulesText(group: Group | null, env?: NodeJS.ProcessEnv): string;
72
+ export declare function rulesVersion(group: Group | null, env?: NodeJS.ProcessEnv): string;
73
+ export declare function assemblePrompt(group: Group | null, session: PromptSession, env?: NodeJS.ProcessEnv): AssembledPrompt;
74
+ export declare function appendPromptFile(group: Group | null, session: PromptSession, env?: NodeJS.ProcessEnv): AppendPromptFile;
75
+ export declare function compactReminder(group: Group | null, env?: NodeJS.ProcessEnv): string;
76
+ export declare function outsideRucherContext(group: Group | null, env?: NodeJS.ProcessEnv): string;
75
77
  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)";
76
78
  export declare const RULES_UPDATED_NOTICE = "rucher: rules updated, will apply after the next compaction or in a new session";
77
79
  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, call agent_update at meaningful progress and agent_done as your last tool action, then reply with one line.";
78
80
  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 forks, applies, tests and commits. Agents propose, they never push.\n- Status lives in Carnet: agent statuses, the \"On the table\" 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 a fork finishes, say only \"<name> finished, report ready\". Never summarise, quote or act on its report or final message until the human asks for that fork's report, even when answering about something else.\n- Forks never commit, push, stash or record notes. A fork 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 dispatch, apply or review forks, load the rucher skill: it holds the full workflow.";
79
81
  export declare function handleUserPromptSubmit(carnet: Carnet, host: Host, payload: HostPromptPayload): Session;
80
82
  export declare function handleToolUse(carnet: Carnet, payload: HostToolPayload, env: HookEnv): string | undefined;
81
- export declare const REPOS_START = "<!-- rucher:repos start -->";
82
- export declare const REPOS_END = "<!-- rucher:repos end -->";
83
83
  export declare function transcriptTitle(path: string): string | undefined;
84
- export declare function reposBlock(group: Group): string;
85
- export declare function replaceReposBlock(content: string, group: Group): string | null;
86
- export declare function groupInstructions(group: Group): string;
87
- export declare function groupSettings(group: Group): string;
84
+ export declare function groupSettings(group: Group): Record<string, unknown>;
88
85
  export declare const claudeCode: Host;
89
86
  export declare const DEFAULT_PURGE_DAYS = 3;
90
87
  export declare function purgeDays(value: string | undefined): number;
@@ -112,5 +109,21 @@ interface StepAgentInput {
112
109
  next?: OpenAgentStatus | undefined;
113
110
  }
114
111
  export declare function stepAgent(carnet: Carnet, session: string, input: StepAgentInput): string;
115
- export { AGENT_STATUSES, type AddNoteInput, type AddNoteResult, type Agent, type AgentEventType, type AgentStatus, type AgentStep, type AppendPromptFile, type AssembledPrompt, Carnet, type CarnetErrorCode, type CarnetEvent, type CarnetOptions, type CiteNoteInput, type ContextFile, type ContextFileResult, type CreateSessionInput, DB_FILE, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HOST, DUPLICATE_SIMILARITY, type DropNoteInput, EMOJI, EVENT_TYPES, type EventType, type FinishAgentInput, GROUP_DIRECTORY, GROUP_FILE, type Group, type GroupFile, type GroupReference, type HookEnv, type HookSessionPayload, type Host, type HostPromptPayload, type HostSessionEndPayload, type HostSessionPayload, type HostSubagentPayload, type HostToolPayload, type InitOptions, LEGEND, type LaunchOptions, type ListAgentsOptions, type ListNotesOptions, type ListSessionsOptions, type LocateOptions, type LogEventInput, 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, REPORTS_DIRECTORY, type RenderOptions, type ResumeCommand, type ResumeContextOptions, 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 StatusView, type StepAgentInput, type TableItem, USER_ACTION_STATUSES, type UpdateAgentInput, type UserActionStatus, type WeightedNote, allHosts, ambiguousGroupContext, buildStatusView, findGroupRoot, formatClock, groupRepoNames, hostById, isAgentStatus, isEventType, isGroupRoot, isInside, isNoteKind, isUserActionStatus, loadGroup, localDay, locateGroup, memoryHalfLife, memoryMaxCharacters, openCarnet, openGroupCarnet, pinnedGroup, renderAgentLine, renderMemory, renderNoteLine, renderNotes, renderNotesSummary, renderSections, renderStatus, renderTableLine, repoNameFor, repoPathFor, reportPathFor, reportsDirectoryOf, sessionNoteActivity, shortId, similarity };
112
+ interface RenderResult {
113
+ workspace: string;
114
+ written: string[];
115
+ removed: string[];
116
+ }
117
+ interface WorkspaceRenderOptions {
118
+ env?: NodeJS.ProcessEnv | undefined;
119
+ host?: string | undefined;
120
+ }
121
+ export declare function renderWorkspace(group: Group, options?: WorkspaceRenderOptions): RenderResult;
122
+ export declare const GENERATED_MARKER = "generated by rucher, do not edit";
123
+ export declare const MARKDOWN_MARKER = "<!-- generated by rucher, do not edit -->\n";
124
+ export declare function markdownCopy(content: string): string;
125
+ export declare function removeStaleCopies(directory: string, keep: ReadonlySet<string>): string[];
126
+ export declare function writeGenerated(path: string, content: string): boolean;
127
+ export declare function mergeSettings(base: Record<string, unknown>, extra: Record<string, unknown>): Record<string, unknown>;
128
+ export { AGENT_STATUSES, type AddNoteInput, type AddNoteResult, type Agent, type AgentEventType, type AgentStatus, type AgentStep, type AppendPromptFile, type AssembledPrompt, Carnet, type CarnetErrorCode, type CarnetEvent, type CarnetOptions, type CiteNoteInput, type CreateGroupOptions, type CreateSessionInput, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HOST, DUPLICATE_SIMILARITY, type DropGroupOptions, type DropNoteInput, EMOJI, EVENT_TYPES, type EventType, type FinishAgentInput, GROUP_FILE, type Group, type GroupFile, type GroupOrigin, type GroupRepo, type GroupResolution, type HookEnv, type HookSessionPayload, type Host, type HostPromptPayload, type HostRender, type HostSessionEndPayload, type HostSessionPayload, type HostSubagentPayload, type HostToolPayload, INSTRUCTIONS_FILE, LEGEND, type LaunchOptions, type ListAgentsOptions, type ListNotesOptions, type ListSessionsOptions, type LogEventInput, 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 ResolveGroupOptions, type ResolvedCarnet, type ResumeCommand, type ResumeContextOptions, type RucherPaths, 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 StatusView, type StepAgentInput, type TableItem, USER_ACTION_STATUSES, type UpdateAgentInput, type UserActionStatus, type WeightedNote, type WorkspaceRenderOptions, addGroupRepo, allHosts, ambiguousGroupContext, buildStatusView, createGroup, dropGroup, expandHome, formatClock, groupExists, groupHosts, groupLabel, groupRepoNames, hostById, isAgentStatus, isEventType, isGroupName, isInside, isNoteKind, isUserActionStatus, listGroups, loadGroup, localDay, memoryHalfLife, memoryMaxCharacters, openCarnet, openGroupCarnet, openResolvedCarnet, removeGroupRepo, renameGroup, renderAgentLine, renderMemory, renderNoteLine, renderNotes, renderNotesSummary, renderSections, renderStatus, renderTableLine, repoNameFor, repoPathFor, requireGroup, resolveGroup, sessionNoteActivity, shortId, similarity };
116
129
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/move.ts","../src/db/open.ts","../src/db/schema.ts","../src/errors.ts","../src/group/init.ts","../src/group/registry.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/hosts/claude-code.ts","../src/purge.ts","../src/resume.ts","../src/subagents.ts","../src/status/note.ts","../src/steps.ts"],"mappings":";;UAKiB;EACf;EACA;;UAGe;EACf,SAAS;EACT,MAAM;EACN;EACA;EACA;EACA;EACA;;wBA8Cc,YACd,QAAQ,QACR,mBACA,QAAQ,QACR,UAAS,cACR;qBCjEU;wBAEG,aAAa,eAAe;qBCH/B;wBAgLG,cAAc,IAAI;wBASlB,QAAQ,IAAI;KC3LhB;qBA0BC,oBAAoB;WAEpB,MAAM;EADjB,YACW,MAAM,iBACf;;UCba;EACf;EACA;EACA;EACA,MAAM,OAAO;;wBAcC,UAAU,mBAAmB,UAAS,cAAmB;wBA0BzD,aAAa,cAAc,eAAe;wBAuB1C,gBAAgB,cAAc,eAAe;UC/E5C;EACf;EACA;;wBAOc,WAAW,MAAK,OAAO;wBAQvB,aAAa,MAAM,OAAO,aAAa;wBAmBvC,cACd,WAAW,gBACX,MAAM,OAAO,aACZ;wBAOa,iBAAiB,iBAAiB,MAAM,OAAO,aAAa;wBC9C5D,iBACd,QAAQ,QACR,SAAS,wBACR;UCSc;EACf,SAAS;EACT;EACA;EACA;;wBAsCc,mBACd,QAAQ,QACR,SAAS,oBACT,KAAK,UACJ;qBCtDU;qBACA;UAEI;EACf;EACA;EACA,MAAM;;UAGS;EACf;EACA;;UAGe;EACf;EACA;;wBASc,UAAU,MAAK,OAAO;wBAItB,WAAW,OAAO;wBAIlB,UAAU,OAAO,OAAO,MAAK,OAAO;wBAOpC,aAAa,OAAO,OAAO,MAAK,OAAO;wBAIvC,eACd,OAAO,OACP,SAAS,eACT,MAAK,OAAO,aACX;wBAMa,iBACd,OAAO,OACP,SAAS,eACT,MAAK,OAAO,aACX;wBASa,gBAAgB,OAAO,OAAO,MAAK,OAAO;wBAI1C,qBAAqB,OAAO,OAAO,MAAK,OAAO;qBAIlD;qBAGA;qBAGA;qBCxFA;wBCGG,uBACd,QAAQ,QACR,MAAM,MACN,SAAS,oBACR;wBCDa,cACd,QAAQ,QACR,SAAS,iBACT,KAAK;qBCmBM;qBACA;wBA6DG,gBAAgB;wBAkBhB,WAAW,OAAO;wBAOlB,kBAAkB,iBAAiB,OAAO;wBAO1C,kBAAkB,OAAO;wBAiBzB,cAAc,OAAO;qBA6DxB,YAAY;qBCvMZ;wBAGG,UAAU;qBCAb;qBACA;UAEI;EACf;EACA;;wBAGc,gBAAgB,OAAO;wBAYvB,aAAa,SAAS;wBAKtB,cACd,QAAQ,QACR,SAAS,WACP,QAAwB,kBAAyC;qBC7BxD;qBACA;qBCLA;wBAWG,aAAa;KCPxB,0BAA0B;qBAElB;KAQD,oBAAoB;UAEf;EACf;EACA,MAAM;EACN;EACA;EACA,OAAO;;wBAkBO,UAAU,QAAQ,QAAQ,iBAAiB,OAAO"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/move.ts","../src/group-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/hosts/claude-code.ts","../src/purge.ts","../src/resume.ts","../src/subagents.ts","../src/status/note.ts","../src/steps.ts","../src/render.ts","../src/workspace-files.ts"],"mappings":";;UAIiB;EACf;EACA;;UAGe;EACf,SAAS;EACT,MAAM;EACN;EACA;EACA;EACA;EACA;;wBAwBc,YACd,QAAQ,QACR,mBACA,qBACA,UAAS,cAC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