@tomradex/files 0.0.0-stage → 0.17.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/LICENSE +204 -0
- package/dist/agent-index.d.ts +41 -0
- package/dist/channels.d.ts +90 -0
- package/dist/git-backend.d.ts +29 -0
- package/dist/git-store.d.ts +203 -0
- package/dist/git-sync.d.ts +100 -0
- package/dist/index.d.ts +11 -0
- package/dist/mime.d.ts +6 -0
- package/dist/runtime.js +1 -0
- package/dist/scopes.d.ts +29 -0
- package/dist/service.d.ts +220 -0
- package/dist/store.d.ts +64 -0
- package/dist/tools.d.ts +9 -0
- package/dist/types.d.ts +332 -0
- package/dist/words.d.ts +19 -0
- package/package.json +46 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { Files, FilesConfig, LOCAL_BACKEND, folderName } from "./service.js";
|
|
2
|
+
export { BINARY_LIMIT, GitFileStore, IDS_DIR, IDS_FILE, normalizeRel, parseLedger, type GitRemoteTarget, type GitStoreOptions, type Ledger } from "./git-store.js";
|
|
3
|
+
export { createGitBackend, type GitBackendOptions } from "./git-backend.js";
|
|
4
|
+
export { buildAgentIndex, estimateTokens, formatSize, shortDate, type AgentIndex, type AgentIndexInput } from "./agent-index.js";
|
|
5
|
+
export { DEFAULT_AGENT_POLICY, DEFAULT_SYNC_POLICY, listingAt, policyAt, readStoredPolicy, validPolicy, type StoredPolicy } from "./git-sync.js";
|
|
6
|
+
export { isTextMime, looksBinary, mimeOf } from "./mime.js";
|
|
7
|
+
export { MIGRATIONS, OpsStore, RemoteStore, TABLES, type FileOpKind, type FileOpRow, type RemoteRow } from "./store.js";
|
|
8
|
+
export { FileChangedError, FileMovedOnError, FilesUnavailableError, InvalidPathError, ProjectRepositoryError, UnknownBackendError, type AttachmentInput, type ConflictChoice, type ConnectionState, type FileChange, type FileConflict, type FileContent, type FileEntry, type FileStore, type FileVersion, type FilesBackend, type FilesBackendView, type FilesConnection, type FilesInfo, type FilesStatus, type FilesSyncState, type FilesSyncPolicy, type FileSyncPreference, type FilesAgentPolicy, type FileListPreference, type FileSearchInput, type FileSearchHit, type FileSearchResult, type ListMode, type PathPolicy, type PathPreference, type SyncMode, type OpenStoreOptions, type ProjectRepository, type StoreEnv, type SaveResult, type WriteEntry, type WriteOptions } from "./types.js";
|
|
9
|
+
export type {} from "./channels.js";
|
|
10
|
+
export { Files as default } from "./service.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/mime.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const mimeOf: (file: string) => string;
|
|
2
|
+
/** Text as the viewer understands it: shown as characters, never bytes. `svg` counts — it is markup. */
|
|
3
|
+
export declare const isTextMime: (mime: string) => boolean;
|
|
4
|
+
/** Bytes that cannot be UTF-8 text: a NUL in the first 8 KiB is how git decides too. */
|
|
5
|
+
export declare const looksBinary: (bytes: Buffer) => boolean;
|
|
6
|
+
//# sourceMappingURL=mime.d.ts.map
|
package/dist/runtime.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
throw new Error("@tomradex/files is Tomrade's own code: a full-mode plugin gets the running app's copy, so load the plugin in Tomrade");
|
package/dist/scopes.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** The remote directory a store was last bound to: "" for a repository root, null when it never shared. */
|
|
2
|
+
export declare function boundDirectory(dir: string): string | null;
|
|
3
|
+
/** A repository root and a folder in it are different enough that a store must not serve both; folders are alike. */
|
|
4
|
+
export declare const separateWorlds: (from: string | null, to: string) => boolean;
|
|
5
|
+
/** The id a store's operations are filed under, so undo knows which store they belong to. */
|
|
6
|
+
export declare function storeId(dir: string): string;
|
|
7
|
+
export declare function ensureStoreId(dir: string, created: boolean): void;
|
|
8
|
+
/**
|
|
9
|
+
* Where a project's earlier Files stores go when the remote scope moves
|
|
10
|
+
* between a repository root and a folder: whole, beside the live one, never
|
|
11
|
+
* copied into it. A root scope shows the repository as it is — code and all —
|
|
12
|
+
* so its content is not what a folder scope should publish, and a folder's
|
|
13
|
+
* content is not what a root scope should receive twice.
|
|
14
|
+
*/
|
|
15
|
+
export declare class FilesArchive {
|
|
16
|
+
readonly root: string;
|
|
17
|
+
constructor(root: string);
|
|
18
|
+
/** Whether moving a store from one remote directory to another calls for a separate store. */
|
|
19
|
+
static rotates(from: string | null, to: string): boolean;
|
|
20
|
+
/** Stores kept here. */
|
|
21
|
+
dirs(): string[];
|
|
22
|
+
/**
|
|
23
|
+
* Park the live store and bring back the one bound to `directory` if it is
|
|
24
|
+
* here, so switching back and forth restores each view as it was. Returns
|
|
25
|
+
* how to put things back, for a bind that then fails.
|
|
26
|
+
*/
|
|
27
|
+
rotate(live: string, directory: string): () => void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=scopes.d.ts.map
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { Context, Service } from "cordis";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type FileDescription, type FileReference, type Item } from "@tomradex/domain";
|
|
4
|
+
import { type AgentIndex } from "./agent-index.js";
|
|
5
|
+
import { type RemoteRow } from "./store.js";
|
|
6
|
+
import { type AttachmentInput, type ConflictChoice, type ConnectionState, type FileConflict, type FileContent, type FileEntry, type FileStore, type FileVersion, type FilesBackend, type FilesBackendView, type FilesInfo, type FilesStatus, type FilesSyncPolicy, type FilesAgentPolicy, type FileSearchInput, type FileSearchResult, type ListMode, type SaveResult, type SyncMode, type WriteOptions } from "./types.js";
|
|
7
|
+
import { type FilesReader } from "@tomradex/contracts";
|
|
8
|
+
declare module "cordis" {
|
|
9
|
+
interface Context {
|
|
10
|
+
files: Files;
|
|
11
|
+
}
|
|
12
|
+
interface Events {
|
|
13
|
+
"files/registered"(backendId: string): void;
|
|
14
|
+
"files/unregistered"(backendId: string): void;
|
|
15
|
+
/** A project's files or their sync state moved. */
|
|
16
|
+
"files/changed"(projectId: string): void;
|
|
17
|
+
"files/synced"(projectId: string, status: FilesStatus): void;
|
|
18
|
+
/** A file or folder moved through the service; awaited, so whatever follows the path moves with it. */
|
|
19
|
+
"files/moved"(projectId: string, from: string, to: string): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export declare const FilesConfig: z.ZodPreprocess<z.ZodObject<{
|
|
23
|
+
gitBinary: z.ZodDefault<z.ZodString>;
|
|
24
|
+
autoSyncMs: z.ZodDefault<z.ZodNumber>;
|
|
25
|
+
settleMs: z.ZodDefault<z.ZodNumber>;
|
|
26
|
+
pushMs: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
watch: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
+
folder: z.ZodDefault<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
export type FilesConfig = z.infer<typeof FilesConfig>;
|
|
31
|
+
/** The backend every project starts on: versions here, shared nowhere. */
|
|
32
|
+
export declare const LOCAL_BACKEND = "local";
|
|
33
|
+
/** A workstream's name as one folder name: separators and a leading dot would make it something else. */
|
|
34
|
+
export declare const folderName: (name: string) => string;
|
|
35
|
+
export declare class Files extends Service implements FilesReader {
|
|
36
|
+
readonly config: FilesConfig;
|
|
37
|
+
static provide: string;
|
|
38
|
+
static inject: string[];
|
|
39
|
+
/** The status bar's and the palette's words, in the person's language now. */
|
|
40
|
+
private words;
|
|
41
|
+
static Config: z.ZodPreprocess<z.ZodObject<{
|
|
42
|
+
gitBinary: z.ZodDefault<z.ZodString>;
|
|
43
|
+
autoSyncMs: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
settleMs: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
pushMs: z.ZodDefault<z.ZodNumber>;
|
|
46
|
+
watch: z.ZodDefault<z.ZodBoolean>;
|
|
47
|
+
folder: z.ZodDefault<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
/** How file records name themselves in the timeline: `files:<seq>`. */
|
|
50
|
+
static readonly PROVIDER = "files";
|
|
51
|
+
private readonly home;
|
|
52
|
+
private readonly registry;
|
|
53
|
+
private readonly open;
|
|
54
|
+
private readonly opening;
|
|
55
|
+
private readonly lastState;
|
|
56
|
+
/** Titles cost a read each; a file that has not changed has not retitled itself. */
|
|
57
|
+
private readonly titles;
|
|
58
|
+
private remotes;
|
|
59
|
+
private ops;
|
|
60
|
+
constructor(ctx: Context, config: FilesConfig);
|
|
61
|
+
[Service.init](): () => void;
|
|
62
|
+
private warn;
|
|
63
|
+
private notify;
|
|
64
|
+
/** Reversible: the backend, and its option in every project, goes with the plugin that registered it. */
|
|
65
|
+
register<C>(backend: FilesBackend<C>): () => void;
|
|
66
|
+
get(backendId: string): FilesBackend;
|
|
67
|
+
has(backendId: string): boolean;
|
|
68
|
+
describe(): FilesBackendView[];
|
|
69
|
+
browse(backendId: string): Promise<{
|
|
70
|
+
label: string;
|
|
71
|
+
config: unknown;
|
|
72
|
+
}[]>;
|
|
73
|
+
draft(backendId: string, name: string): Promise<unknown>;
|
|
74
|
+
connection(backendId: string): Promise<ConnectionState>;
|
|
75
|
+
connect(backendId: string, secret: string): Promise<ConnectionState>;
|
|
76
|
+
/** Begin a sign-in finished in the browser; `connection()` reports when it lands. */
|
|
77
|
+
signIn(backendId: string): Promise<ConnectionState>;
|
|
78
|
+
disconnect(backendId: string): Promise<void>;
|
|
79
|
+
/** This machine's copy: beside the project's folder, or inside `.tomrade/` when that folder is somebody's checkout. */
|
|
80
|
+
dirFor(projectId: string): string | null;
|
|
81
|
+
remoteOf(projectId: string): RemoteRow | null;
|
|
82
|
+
/** The repository Tomrade drives for the project itself: Files may share a folder in it, never its root or the store's own folder. */
|
|
83
|
+
private projectRepository;
|
|
84
|
+
/** In a repository Tomrade drives, the files keep a repository of their own; the outer one must not swallow it. */
|
|
85
|
+
private ensureIgnored;
|
|
86
|
+
store(projectId: string): Promise<FileStore>;
|
|
87
|
+
private remoteKey;
|
|
88
|
+
private openStore;
|
|
89
|
+
private archiveOf;
|
|
90
|
+
/** Put the live store aside for a scope it should not feed, and say where it went. */
|
|
91
|
+
private park;
|
|
92
|
+
close(projectId: string): void;
|
|
93
|
+
/** Re-read the remote row and open the store again; a no-op for a project nobody has opened. */
|
|
94
|
+
private reopen;
|
|
95
|
+
info(projectId: string): Promise<FilesInfo>;
|
|
96
|
+
status(projectId: string): Promise<FilesStatus>;
|
|
97
|
+
tree(projectId: string): Promise<FileEntry[]>;
|
|
98
|
+
list(projectId: string, dir?: string): Promise<FileEntry[]>;
|
|
99
|
+
read(projectId: string, p: string): Promise<FileContent | null>;
|
|
100
|
+
readVersion(projectId: string, ref: FileReference): Promise<FileContent | null>;
|
|
101
|
+
/** Stores parked by an earlier scope, read but never opened: open() would scaffold and sync them. */
|
|
102
|
+
private archiveStores;
|
|
103
|
+
locate(projectId: string, fileId: string): Promise<string | null>;
|
|
104
|
+
/** The latest content wherever the file has moved; null when it is not here — deleted, or not synced to this machine yet. */
|
|
105
|
+
readById(projectId: string, fileId: string): Promise<FileContent | null>;
|
|
106
|
+
/** The resolver's view of linked files: where each is now, what it is. A missing id is left out, never an error. */
|
|
107
|
+
describeFiles(projectId: string, fileIds: string[]): Promise<FileDescription[]>;
|
|
108
|
+
private description;
|
|
109
|
+
history(projectId: string, p: string, limit?: number): Promise<FileVersion[]>;
|
|
110
|
+
/** The resolver tickets pin versions through: exact pair or null, never a guess. */
|
|
111
|
+
resolveVersion(projectId: string, ref: FileReference): Promise<FileReference | null>;
|
|
112
|
+
/**
|
|
113
|
+
* Run one operation and remember it as the versions before and after, so ⌘Z
|
|
114
|
+
* can put its paths back. A store without `head`/`restore` is not undoable,
|
|
115
|
+
* and an op that changed nothing leaves no record. Any record is a write:
|
|
116
|
+
* the redo stack, here and in the backlog, is void.
|
|
117
|
+
*/
|
|
118
|
+
private recordOp;
|
|
119
|
+
private recordOf;
|
|
120
|
+
private describeOp;
|
|
121
|
+
/** The files' place in ⌘Z and the history window: each op is put back or done again by restoring its paths. */
|
|
122
|
+
private readonly provider;
|
|
123
|
+
private undoneSummary;
|
|
124
|
+
write(projectId: string, p: string, body: Buffer | string, opts?: WriteOptions): Promise<FileContent>;
|
|
125
|
+
/**
|
|
126
|
+
* A save that refuses to land over somebody else's: with `expect` (the hash
|
|
127
|
+
* the editor read) a file that moved on comes back as it is now instead.
|
|
128
|
+
*/
|
|
129
|
+
save(projectId: string, p: string, body: string, opts: {
|
|
130
|
+
expect?: string | null;
|
|
131
|
+
message?: string;
|
|
132
|
+
}): Promise<SaveResult>;
|
|
133
|
+
/** Several files as one version and one step of history; nothing lands when any `expect` fails. */
|
|
134
|
+
writeMany(projectId: string, entries: {
|
|
135
|
+
path: string;
|
|
136
|
+
body: string | Buffer;
|
|
137
|
+
expect?: string | null;
|
|
138
|
+
}[], opts?: {
|
|
139
|
+
message?: string;
|
|
140
|
+
}): Promise<string | null>;
|
|
141
|
+
/**
|
|
142
|
+
* Copy files or folders from this machine into a folder of the store. A file
|
|
143
|
+
* is a version of its own; a folder lands whole and is saved as one version,
|
|
144
|
+
* hidden names left behind and empty folders kept with a marker.
|
|
145
|
+
*/
|
|
146
|
+
importFiles(projectId: string, dir: string, sources: string[]): Promise<FileEntry[]>;
|
|
147
|
+
/** Each write returns the history record it made — `files:<seq>`, for `oplog.revert` — or null when nothing changed. */
|
|
148
|
+
mkdir(projectId: string, p: string): Promise<string | null>;
|
|
149
|
+
move(projectId: string, from: string, to: string): Promise<string | null>;
|
|
150
|
+
copy(projectId: string, from: string, to: string): Promise<string | null>;
|
|
151
|
+
remove(projectId: string, p: string): Promise<string | null>;
|
|
152
|
+
syncPolicy(projectId: string): Promise<FilesSyncPolicy>;
|
|
153
|
+
setSyncRules(projectId: string, paths: string[], mode: SyncMode | "inherit"): Promise<FilesSyncPolicy>;
|
|
154
|
+
agentPolicy(projectId: string): Promise<FilesAgentPolicy>;
|
|
155
|
+
setAgentRules(projectId: string, paths: string[], mode: ListMode | "inherit"): Promise<FilesAgentPolicy>;
|
|
156
|
+
/** Text across the project's files. A backend that cannot search says so rather than pretending to find nothing. */
|
|
157
|
+
search(projectId: string, input: FileSearchInput): Promise<FileSearchResult>;
|
|
158
|
+
/**
|
|
159
|
+
* What an agent is told this project holds. Discovery only: everything here
|
|
160
|
+
* is also reachable without it, and what is left out is reachable too.
|
|
161
|
+
*/
|
|
162
|
+
agentIndex(projectId: string, opts?: {
|
|
163
|
+
budget?: number;
|
|
164
|
+
focus?: string[];
|
|
165
|
+
native?: boolean;
|
|
166
|
+
}): Promise<AgentIndex | null>;
|
|
167
|
+
/**
|
|
168
|
+
* The heading a document gives itself: front matter first, then the first
|
|
169
|
+
* heading, and for a folder its README's. Only the head of a file is read,
|
|
170
|
+
* and only once per version of it — an index is rebuilt on every turn.
|
|
171
|
+
*/
|
|
172
|
+
private titleOf;
|
|
173
|
+
/**
|
|
174
|
+
* The index as a prompt wants it: the person's budget, and the ticket's own
|
|
175
|
+
* folder kept open whatever that budget is.
|
|
176
|
+
*/
|
|
177
|
+
indexFor(projectId: string, native: boolean, itemId?: string): Promise<AgentIndex | null>;
|
|
178
|
+
sync(projectId: string): Promise<FilesStatus>;
|
|
179
|
+
/** The sweep: every project open on this machine with files, or a remote, is saved and synced. */
|
|
180
|
+
syncAll(): Promise<void>;
|
|
181
|
+
conflicts(projectId: string): Promise<FileConflict[]>;
|
|
182
|
+
resolve(projectId: string, p: string, choice: ConflictChoice): Promise<FilesStatus>;
|
|
183
|
+
resolveAll(projectId: string, choice: ConflictChoice): Promise<FilesStatus>;
|
|
184
|
+
bind(projectId: string, backendId: string, rawConfig: unknown): Promise<FilesStatus>;
|
|
185
|
+
unbind(projectId: string): Promise<FilesInfo>;
|
|
186
|
+
/**
|
|
187
|
+
* Where a ticket's files land unless a path says otherwise: a top-level
|
|
188
|
+
* folder named after its workstream. A name, not a binding — renaming the
|
|
189
|
+
* workstream starts a new folder and moves nothing.
|
|
190
|
+
*/
|
|
191
|
+
folderFor(projectId: string, itemId: string): string;
|
|
192
|
+
/** Agents name tickets by key as often as by id, like every other item tool accepts. */
|
|
193
|
+
private ticketOf;
|
|
194
|
+
/** `path` inside the ticket's workstream folder. */
|
|
195
|
+
pathFor(projectId: string, itemId: string, p: string): string;
|
|
196
|
+
/** Bring files from this machine into the ticket's workstream folder and pin them in one go. */
|
|
197
|
+
importFor(projectId: string, itemId: string, input: {
|
|
198
|
+
sources: string[];
|
|
199
|
+
role: "input" | "output";
|
|
200
|
+
}): Promise<Item>;
|
|
201
|
+
/**
|
|
202
|
+
* Files a ticket body is about to link to, saved under
|
|
203
|
+
* `<workstream>/attachments/<KEY>/` as one version and one step of history.
|
|
204
|
+
* A name already taken there, or earlier in the batch, gets a number.
|
|
205
|
+
*/
|
|
206
|
+
addAttachments(projectId: string, itemId: string, files: AttachmentInput[]): Promise<FileDescription[]>;
|
|
207
|
+
/** Pin the file's latest version to a ticket. The working copy is saved first, so what is pinned is what is there. */
|
|
208
|
+
attach(projectId: string, itemId: string, input: {
|
|
209
|
+
path: string;
|
|
210
|
+
role: "input" | "output";
|
|
211
|
+
name?: string;
|
|
212
|
+
}): Promise<Item>;
|
|
213
|
+
/** Settle once and add every chosen file to the ticket in one item write. */
|
|
214
|
+
attachMany(projectId: string, itemId: string, input: {
|
|
215
|
+
paths: string[];
|
|
216
|
+
role: "input" | "output";
|
|
217
|
+
names?: Record<string, string>;
|
|
218
|
+
}): Promise<Item>;
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=service.d.ts.map
|
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Db, Migration } from "@tomradex/db";
|
|
2
|
+
import type { Author } from "@tomradex/domain";
|
|
3
|
+
/** The remote a project shares its files through. Per project, non-secret, travels in the project's folder. */
|
|
4
|
+
export interface RemoteRow {
|
|
5
|
+
projectId: string;
|
|
6
|
+
backend: string;
|
|
7
|
+
config: Record<string, unknown>;
|
|
8
|
+
updatedAt: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const MIGRATIONS: Migration[];
|
|
11
|
+
export declare const TABLES: {
|
|
12
|
+
readonly plugin_files_remotes: {
|
|
13
|
+
readonly project: "project_id";
|
|
14
|
+
readonly export: {
|
|
15
|
+
readonly order: "project_id";
|
|
16
|
+
readonly always: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly plugin_files_ops: {
|
|
20
|
+
readonly project: "project_id";
|
|
21
|
+
readonly export: false;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type FileOpKind = "write" | "mkdir" | "move" | "copy" | "remove" | "import";
|
|
25
|
+
/** One operation on a project's files, undoable while its paths stay as it left them. */
|
|
26
|
+
export interface FileOpRow {
|
|
27
|
+
scopeId: string;
|
|
28
|
+
seq: number;
|
|
29
|
+
projectId: string;
|
|
30
|
+
at: number;
|
|
31
|
+
by: Author;
|
|
32
|
+
runId: string | null;
|
|
33
|
+
kind: FileOpKind;
|
|
34
|
+
/** The path the op is about; for a move or copy, where it started. */
|
|
35
|
+
path: string;
|
|
36
|
+
/** Where a move or copy landed. */
|
|
37
|
+
target: string | null;
|
|
38
|
+
/** Every path the op touched — what undo puts back. */
|
|
39
|
+
paths: string[];
|
|
40
|
+
/** The version before the op, and the one it left. */
|
|
41
|
+
base: string;
|
|
42
|
+
head: string;
|
|
43
|
+
undoneAt: number | null;
|
|
44
|
+
}
|
|
45
|
+
export declare class OpsStore {
|
|
46
|
+
private readonly pool;
|
|
47
|
+
constructor(pool: Db);
|
|
48
|
+
record(op: Omit<FileOpRow, "seq" | "undoneAt">): FileOpRow;
|
|
49
|
+
get(projectId: string, seq: number): FileOpRow | null;
|
|
50
|
+
/** Newest first, undone ones included. */
|
|
51
|
+
list(projectId: string, limit: number): FileOpRow[];
|
|
52
|
+
markUndone(projectId: string, seq: number, at: number | null): void;
|
|
53
|
+
/** The redo stack is void: a write landed somewhere. */
|
|
54
|
+
forget(projectId: string): void;
|
|
55
|
+
}
|
|
56
|
+
export declare class RemoteStore {
|
|
57
|
+
private readonly pool;
|
|
58
|
+
constructor(pool: Db);
|
|
59
|
+
restore(projectId: string, row: RemoteRow | null): void;
|
|
60
|
+
get(projectId: string): RemoteRow | null;
|
|
61
|
+
set(projectId: string, backend: string, config: Record<string, unknown>): RemoteRow;
|
|
62
|
+
clear(projectId: string): void;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=store.d.ts.map
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Context } from "cordis";
|
|
2
|
+
import type { Files } from "./service.js";
|
|
3
|
+
/**
|
|
4
|
+
* The agent's hands on a project's files. Every save is a version; the pair a
|
|
5
|
+
* write returns is what a ticket pins. What the browsing tools volunteer
|
|
6
|
+
* follows the project's agent index — a path the caller names is always read.
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerTools(ctx: Context, files: Files): void;
|
|
9
|
+
//# sourceMappingURL=tools.d.ts.map
|