@izagood/avcs 0.1.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.
Files changed (111) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +221 -0
  3. package/dist/api/repo.d.ts +616 -0
  4. package/dist/api/repo.d.ts.map +1 -0
  5. package/dist/api/repo.js +1772 -0
  6. package/dist/api/repo.js.map +1 -0
  7. package/dist/cli.d.ts +3 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +660 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/concurrency/lease.d.ts +27 -0
  12. package/dist/concurrency/lease.d.ts.map +1 -0
  13. package/dist/concurrency/lease.js +63 -0
  14. package/dist/concurrency/lease.js.map +1 -0
  15. package/dist/core/canonical.d.ts +16 -0
  16. package/dist/core/canonical.d.ts.map +1 -0
  17. package/dist/core/canonical.js +66 -0
  18. package/dist/core/canonical.js.map +1 -0
  19. package/dist/core/cbor.d.ts +9 -0
  20. package/dist/core/cbor.d.ts.map +1 -0
  21. package/dist/core/cbor.js +213 -0
  22. package/dist/core/cbor.js.map +1 -0
  23. package/dist/core/clock.d.ts +18 -0
  24. package/dist/core/clock.d.ts.map +1 -0
  25. package/dist/core/clock.js +32 -0
  26. package/dist/core/clock.js.map +1 -0
  27. package/dist/core/identity.d.ts +34 -0
  28. package/dist/core/identity.d.ts.map +1 -0
  29. package/dist/core/identity.js +62 -0
  30. package/dist/core/identity.js.map +1 -0
  31. package/dist/hub/hubClient.d.ts +38 -0
  32. package/dist/hub/hubClient.d.ts.map +1 -0
  33. package/dist/hub/hubClient.js +157 -0
  34. package/dist/hub/hubClient.js.map +1 -0
  35. package/dist/hub/hubServer.d.ts +28 -0
  36. package/dist/hub/hubServer.d.ts.map +1 -0
  37. package/dist/hub/hubServer.js +365 -0
  38. package/dist/hub/hubServer.js.map +1 -0
  39. package/dist/index.d.ts +13 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +19 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/objects/types.d.ts +352 -0
  44. package/dist/objects/types.d.ts.map +1 -0
  45. package/dist/objects/types.js +17 -0
  46. package/dist/objects/types.js.map +1 -0
  47. package/dist/observe/logger.d.ts +27 -0
  48. package/dist/observe/logger.d.ts.map +1 -0
  49. package/dist/observe/logger.js +37 -0
  50. package/dist/observe/logger.js.map +1 -0
  51. package/dist/observe/metrics.d.ts +20 -0
  52. package/dist/observe/metrics.d.ts.map +1 -0
  53. package/dist/observe/metrics.js +42 -0
  54. package/dist/observe/metrics.js.map +1 -0
  55. package/dist/policy/owners.d.ts +5 -0
  56. package/dist/policy/owners.d.ts.map +1 -0
  57. package/dist/policy/owners.js +38 -0
  58. package/dist/policy/owners.js.map +1 -0
  59. package/dist/policy/reliability.d.ts +7 -0
  60. package/dist/policy/reliability.d.ts.map +1 -0
  61. package/dist/policy/reliability.js +41 -0
  62. package/dist/policy/reliability.js.map +1 -0
  63. package/dist/query/diff.d.ts +16 -0
  64. package/dist/query/diff.d.ts.map +1 -0
  65. package/dist/query/diff.js +32 -0
  66. package/dist/query/diff.js.map +1 -0
  67. package/dist/reducer/incremental.d.ts +2 -0
  68. package/dist/reducer/incremental.d.ts.map +1 -0
  69. package/dist/reducer/incremental.js +14 -0
  70. package/dist/reducer/incremental.js.map +1 -0
  71. package/dist/reducer/policy.d.ts +17 -0
  72. package/dist/reducer/policy.d.ts.map +1 -0
  73. package/dist/reducer/policy.js +143 -0
  74. package/dist/reducer/policy.js.map +1 -0
  75. package/dist/reducer/reducer.d.ts +155 -0
  76. package/dist/reducer/reducer.d.ts.map +1 -0
  77. package/dist/reducer/reducer.js +849 -0
  78. package/dist/reducer/reducer.js.map +1 -0
  79. package/dist/release/sbom.d.ts +7 -0
  80. package/dist/release/sbom.d.ts.map +1 -0
  81. package/dist/release/sbom.js +26 -0
  82. package/dist/release/sbom.js.map +1 -0
  83. package/dist/semantic/contract.d.ts +32 -0
  84. package/dist/semantic/contract.d.ts.map +1 -0
  85. package/dist/semantic/contract.js +150 -0
  86. package/dist/semantic/contract.js.map +1 -0
  87. package/dist/semantic/symbols.d.ts +45 -0
  88. package/dist/semantic/symbols.d.ts.map +1 -0
  89. package/dist/semantic/symbols.js +323 -0
  90. package/dist/semantic/symbols.js.map +1 -0
  91. package/dist/store/applyRedactions.d.ts +16 -0
  92. package/dist/store/applyRedactions.d.ts.map +1 -0
  93. package/dist/store/applyRedactions.js +60 -0
  94. package/dist/store/applyRedactions.js.map +1 -0
  95. package/dist/store/lock.d.ts +12 -0
  96. package/dist/store/lock.d.ts.map +1 -0
  97. package/dist/store/lock.js +63 -0
  98. package/dist/store/lock.js.map +1 -0
  99. package/dist/store/objectStore.d.ts +127 -0
  100. package/dist/store/objectStore.d.ts.map +1 -0
  101. package/dist/store/objectStore.js +549 -0
  102. package/dist/store/objectStore.js.map +1 -0
  103. package/dist/validation/repair.d.ts +31 -0
  104. package/dist/validation/repair.d.ts.map +1 -0
  105. package/dist/validation/repair.js +37 -0
  106. package/dist/validation/repair.js.map +1 -0
  107. package/dist/validation/runner.d.ts +20 -0
  108. package/dist/validation/runner.d.ts.map +1 -0
  109. package/dist/validation/runner.js +90 -0
  110. package/dist/validation/runner.js.map +1 -0
  111. package/package.json +83 -0
@@ -0,0 +1,616 @@
1
+ import { Buffer } from "node:buffer";
2
+ import { ObjectStore } from "../store/objectStore.ts";
3
+ import { type ReductionResult } from "../reducer/reducer.ts";
4
+ import type { OwnerRule } from "../objects/types.ts";
5
+ import { Keyring, type KeyRecord } from "../core/identity.ts";
6
+ import { type LeaseConflict } from "../concurrency/lease.ts";
7
+ import { Metrics } from "../observe/metrics.ts";
8
+ import { type Logger } from "../observe/logger.ts";
9
+ import type { Actor, AnyObject, EvidenceKind, EvidenceResult, Intent, IntentKind, Line, Membership, Operation, OperationBody, OperationTarget, Policy, Protection, RoleName, ScopeRef, View, ViewQuery, WorkLease } from "../objects/types.ts";
10
+ /**
11
+ * How AVCS history relates to a co-located git repo (docs/14). The git tree git tracks
12
+ * is always the materialized *projection* — a derived artifact AVCS can recompute. What
13
+ * differs by mode is whether the rich `.avcs/` history travels with it:
14
+ *
15
+ * - `sidecar` (default): `.avcs/` is fully git-ignored. git sees ONLY the clean
16
+ * projection, so a single developer adopts AVCS locally with zero team
17
+ * friction — no team decision required. History stays local (or syncs via
18
+ * the hub between adopters).
19
+ * - `committed`: `.avcs/objects` + `refs` are committed alongside the projection, so the
20
+ * full intent/decision history travels via `git push`. This is a team-wide
21
+ * adoption decision; flip to it with `setGitMode("committed")` once agreed.
22
+ */
23
+ export type GitMode = "sidecar" | "committed";
24
+ export declare class Repo {
25
+ #private;
26
+ readonly dir: string;
27
+ readonly store: ObjectStore;
28
+ readonly keyring: Keyring;
29
+ readonly metrics: Metrics;
30
+ /** Structured logger (silent by default; CLI/hub/MCP wire a console/OTel sink). */
31
+ logger: Logger;
32
+ private constructor();
33
+ static init(dir: string): Promise<Repo>;
34
+ static open(dir: string): Promise<Repo>;
35
+ policy(): Promise<Policy>;
36
+ /** Replace the active policy (new version ⇒ a distinguishable checkpoint). */
37
+ setPolicy(policy: Policy): Promise<string>;
38
+ /** Set code-owner rules (Phase 5), bumping the policy version. */
39
+ setOwners(owners: OwnerRule[]): Promise<string>;
40
+ /** actorId → learned reliability nudge, from history. */
41
+ reliability(): Promise<Map<string, number>>;
42
+ /** Persist a public key as trusted and load it into the keyring. */
43
+ registerPublicKey(rec: KeyRecord): Promise<void>;
44
+ /**
45
+ * Mint a keypair for an actor, register the public half as trusted, and return
46
+ * the private half for the caller to hold. (MVP: a real deployment keeps private
47
+ * keys with the actor, never in the repo.)
48
+ */
49
+ generateActorKey(actor: Actor, keyId?: string): Promise<{
50
+ keyId: string;
51
+ privateKey: string;
52
+ publicKey: string;
53
+ }>;
54
+ readIntent(oid: string): Promise<Intent>;
55
+ listIntents(): Promise<Intent[]>;
56
+ createIntent(args: {
57
+ title: string;
58
+ owner: string;
59
+ kind?: IntentKind;
60
+ priority?: Intent["priority"];
61
+ constraints?: string[];
62
+ constraintKinds?: Intent["constraintKinds"];
63
+ successCriteria?: string[];
64
+ allowedScopes?: ScopeRef[];
65
+ }): Promise<string>;
66
+ startSession(args: {
67
+ intentOid: string;
68
+ actor: Actor;
69
+ summary?: string;
70
+ openedEntities?: ScopeRef[];
71
+ baseViewOid?: string | null;
72
+ }): Promise<string>;
73
+ static readonly CHUNK_THRESHOLD: number;
74
+ static readonly CHUNK_SIZE: number;
75
+ putBlob(content: string | Uint8Array): Promise<string>;
76
+ readBlob(oid: string): Promise<Buffer>;
77
+ proposeOperation(args: {
78
+ sessionOid: string;
79
+ intentOid: string;
80
+ actor: Actor;
81
+ target: OperationTarget;
82
+ body: OperationBody;
83
+ declaredPurpose: string;
84
+ causalDeps?: string[];
85
+ effects?: Operation["effects"];
86
+ confidence?: number;
87
+ line?: string;
88
+ derivedFrom?: string;
89
+ revertOf?: string;
90
+ coAuthors?: Actor[];
91
+ private?: boolean;
92
+ signWith?: {
93
+ keyId: string;
94
+ privateKey: string;
95
+ };
96
+ }): Promise<string>;
97
+ /** Convenience: write file content as a blob + a put_file operation. */
98
+ proposeFileWrite(args: {
99
+ sessionOid: string;
100
+ intentOid: string;
101
+ actor: Actor;
102
+ path: string;
103
+ content: string;
104
+ declaredPurpose: string;
105
+ causalDeps?: string[];
106
+ effects?: Operation["effects"];
107
+ line?: string;
108
+ signWith?: {
109
+ keyId: string;
110
+ privateKey: string;
111
+ };
112
+ }): Promise<string>;
113
+ /**
114
+ * Phase 2: replace one named top-level symbol within a file. Two such edits to
115
+ * different symbols of the same file auto-merge. Should causally depend on the op
116
+ * that established the file (`causalDeps`) so reconstruction starts from it.
117
+ */
118
+ proposeSymbolEdit(args: {
119
+ sessionOid: string;
120
+ intentOid: string;
121
+ actor: Actor;
122
+ path: string;
123
+ symbolName: string;
124
+ newText: string;
125
+ declaredPurpose: string;
126
+ causalDeps?: string[];
127
+ effects?: Operation["effects"];
128
+ line?: string;
129
+ signWith?: {
130
+ keyId: string;
131
+ privateKey: string;
132
+ };
133
+ }): Promise<string>;
134
+ /**
135
+ * M3 AST op: rename a top-level symbol (declaration + same-file references). Contends
136
+ * on both the old and new symbol keys. Should causally depend on the op that
137
+ * established the file. Cross-file references are a follow-up (needs reference analysis).
138
+ */
139
+ proposeRenameSymbol(args: {
140
+ sessionOid: string;
141
+ intentOid: string;
142
+ actor: Actor;
143
+ path: string;
144
+ from: string;
145
+ to: string;
146
+ declaredPurpose: string;
147
+ causalDeps?: string[];
148
+ line?: string;
149
+ }): Promise<string>;
150
+ /**
151
+ * M3 AST op: move a top-level symbol from one file to another. Contends on the
152
+ * symbol at both source and destination. Cross-file references are a follow-up.
153
+ */
154
+ proposeMoveSymbol(args: {
155
+ sessionOid: string;
156
+ intentOid: string;
157
+ actor: Actor;
158
+ fromPath: string;
159
+ toPath: string;
160
+ symbolName: string;
161
+ declaredPurpose: string;
162
+ causalDeps?: string[];
163
+ line?: string;
164
+ signWith?: {
165
+ keyId: string;
166
+ privateKey: string;
167
+ };
168
+ }): Promise<string>;
169
+ attachEvidence(args: {
170
+ forOps: string[];
171
+ kind: EvidenceKind;
172
+ result: EvidenceResult;
173
+ producedBy: Actor;
174
+ command?: string;
175
+ detail?: string;
176
+ /** Produced by a secret-less isolated runner over untrusted code (Phase 11). */
177
+ fromUntrustedRunner?: boolean;
178
+ /** Sign the evidence so the trust gate can verify it cryptographically. */
179
+ signWith?: {
180
+ keyId: string;
181
+ privateKey: string;
182
+ };
183
+ }): Promise<string>;
184
+ recordDecision(args: {
185
+ conflictId: string;
186
+ chosenOps: string[];
187
+ rejectedOps: string[];
188
+ reason: string;
189
+ decidedBy: Actor;
190
+ futurePolicy?: string;
191
+ signWith?: {
192
+ keyId: string;
193
+ privateKey: string;
194
+ };
195
+ }): Promise<string>;
196
+ activeLeases(): Promise<WorkLease[]>;
197
+ /**
198
+ * Request a soft write-lease over scopes. Returns the granted lease oid, or the
199
+ * conflicts that block it (overlapping active exclusive lease held by another).
200
+ */
201
+ requestLease(args: {
202
+ intentOid: string;
203
+ sessionOid: string;
204
+ actor: Actor;
205
+ writeScopes: ScopeRef[];
206
+ mode?: "exclusive" | "shared";
207
+ ttlMs?: number;
208
+ }): Promise<{
209
+ granted: true;
210
+ leaseOid: string;
211
+ } | {
212
+ granted: false;
213
+ conflicts: LeaseConflict[];
214
+ }>;
215
+ /** Build a minimal repair packet for ops whose validation failed. */
216
+ repairContext(opOids: string[]): Promise<import("../validation/repair.ts").RepairContext>;
217
+ getView(name: string): Promise<View>;
218
+ createView(name: string, query: ViewQuery, baseViewOid?: string | null): Promise<string>;
219
+ listLines(): Promise<Line[]>;
220
+ /**
221
+ * Fork a new line from `fromLine` at its current (or a given) checkpoint. The fork
222
+ * checkpoint freezes what the new line inherits; everything the base line does
223
+ * afterwards stays out of the new line. Also creates a same-named view selecting it.
224
+ */
225
+ createLine(name: string, fromLine?: string, atCheckpointOid?: string): Promise<string>;
226
+ /** Frontier (accepted head ops) of a line — the causalDeps a new op should build on. */
227
+ lineFrontier(lineName: string): Promise<string[]>;
228
+ /**
229
+ * Port (cherry-pick / backport) an operation onto another line: mint a NEW op on
230
+ * the target line carrying the source's body, based on the target line's current
231
+ * frontier, with `derivedFrom` provenance. set_symbol re-splices against the target
232
+ * line's content automatically at materialize; put_file replaces on the target line.
233
+ */
234
+ portOp(sourceOpOid: string, targetLine: string, actor?: Actor): Promise<string>;
235
+ static readonly ROLE_WEIGHT: Record<RoleName, number>;
236
+ /** Issue a root-signed membership granting a role; registers the member's key. */
237
+ registerMembership(args: {
238
+ actorId: string;
239
+ publicKey: string;
240
+ role: RoleName;
241
+ actorKind?: "human" | "ai_agent" | "ci_bot";
242
+ scopes?: ScopeRef[];
243
+ root: {
244
+ keyId: string;
245
+ privateKey: string;
246
+ };
247
+ }): Promise<string>;
248
+ membershipOf(actorId: string): Promise<Membership | null>;
249
+ roleOf(actorId: string): Promise<RoleName>;
250
+ hasRole(actorId: string, min: RoleName): Promise<boolean>;
251
+ /** Revoke a membership (admin only): future ops/decisions by this actor lose trust. */
252
+ revokeMembership(actorId: string, byAdmin: string): Promise<void>;
253
+ setProtection(p: Omit<Protection, "type" | "createdAt">): Promise<string>;
254
+ getProtection(view: string): Promise<Protection | null>;
255
+ /** Current protected head (a checkpoint oid) of a view, or null if never finalized. */
256
+ protectedHead(view: string): Promise<string | null>;
257
+ /**
258
+ * Finalize (= PR merge): advance a view's protected head to `newCheckpoint` via a
259
+ * compare-and-swap on `parentHead`. Rejects a stale (non-fast-forward) finalize
260
+ * even for admins unless allowForcePush — this is the causal-currency guard (docs/08
261
+ * §6/§9): authority never licenses overwriting fresher history.
262
+ */
263
+ finalize(args: {
264
+ view: string;
265
+ newCheckpoint: string;
266
+ parentHead: string | null;
267
+ by: string;
268
+ }): Promise<{
269
+ finalized: true;
270
+ head: string;
271
+ } | {
272
+ finalized: false;
273
+ reason: string;
274
+ }>;
275
+ /**
276
+ * Redact (tombstone) a blob's bytes — for a leaked secret. Admin-only. The oid is
277
+ * preserved so all references and the treeHash stay valid; the plaintext is evicted
278
+ * from this store (and, once a real sync ships, propagated to every replica).
279
+ */
280
+ redact(blobOid: string, reason: string, by: string, signWith?: {
281
+ keyId: string;
282
+ privateKey: string;
283
+ }): Promise<string>;
284
+ /** Break-glass: a maintainer/admin grants an expiring waiver of required checks. */
285
+ grantOverride(args: {
286
+ view: string;
287
+ waiveChecks: EvidenceKind[];
288
+ reason: string;
289
+ by: string;
290
+ ttlMs?: number;
291
+ }): Promise<string>;
292
+ /**
293
+ * Rollback a protected head to an earlier checkpoint — FORWARD-only: it advances the
294
+ * head (a new finalize CAS) to point at a prior state, never rewriting history.
295
+ */
296
+ rollbackTo(view: string, checkpointOid: string, by: string): Promise<{
297
+ finalized: true;
298
+ head: string;
299
+ } | {
300
+ finalized: false;
301
+ reason: string;
302
+ }>;
303
+ /** A reviewer approves (or requests changes on) a checkpoint. = PR approve. */
304
+ approve(checkpointOid: string, by: string, verdict?: "approve" | "request_changes", opts?: {
305
+ reason?: string;
306
+ signWith?: {
307
+ keyId: string;
308
+ privateKey: string;
309
+ };
310
+ }): Promise<string>;
311
+ /**
312
+ * Pull objects from another repo's store into this one. Objects are append-only and
313
+ * content-addressed, so sync is a conflict-free union of whatever the other side has
314
+ * that we lack. `gate` (optional) lets a hub reject ops not signed by a known member.
315
+ * Returns counts. Refs (governance) are NOT synced — those are hub-authoritative.
316
+ */
317
+ pull(otherDir: string, opts?: {
318
+ requireSignedMembers?: boolean;
319
+ }): Promise<{
320
+ copied: number;
321
+ rejected: number;
322
+ }>;
323
+ /** Apply all known redaction tombstones locally (evict bytes; oids preserved). */
324
+ applyRedactions(): Promise<number>;
325
+ /** Push objects this repo holds that a network hub lacks (M2 / docs/10 WS-B). */
326
+ pushHub(hubUrl: string): Promise<{
327
+ pushed: number;
328
+ rejected: number;
329
+ }>;
330
+ /** Request a finalize (= PR merge) on a network hub via its CAS endpoint (E6). */
331
+ finalizeHub(hubUrl: string, args: {
332
+ view: string;
333
+ newCheckpoint: string;
334
+ parentHead: string | null;
335
+ by: string;
336
+ signWith?: {
337
+ keyId: string;
338
+ privateKey: string;
339
+ };
340
+ }): Promise<{
341
+ status: number;
342
+ finalized: boolean;
343
+ head?: string;
344
+ reason?: string;
345
+ }>;
346
+ /** Pull objects a network hub holds that this repo lacks. */
347
+ pullHub(hubUrl: string): Promise<{
348
+ pulled: number;
349
+ }>;
350
+ /** Resolve a view's query into the candidate operation set, then reduce. */
351
+ materialize(viewName?: string): Promise<ReductionResult>;
352
+ /** List currently-quarantined ops (outsider contributions awaiting review). */
353
+ quarantinedOps(line?: string): Promise<string[]>;
354
+ /**
355
+ * Phase 11: a non-member (external contributor) submits an op. It self-signs and
356
+ * lands quarantined. Admission control caps outstanding outsider ops per actor.
357
+ */
358
+ proposeOutsider(args: Parameters<Repo["proposeOperation"]>[0] & {
359
+ maxOutstanding?: number;
360
+ }): Promise<string>;
361
+ /** A reviewer promotes quarantined outsider ops into the normal accepted flow. */
362
+ promote(opOids: string[], byActor: string, reason?: string): Promise<string>;
363
+ /**
364
+ * Revert an op: a forward-only inverse. Restores the op's file to its pre-op content
365
+ * (or deletes it if it didn't exist before) as a NEW op with `revertOf` provenance —
366
+ * append-only, recorded, itself revertable. File-granular in the MVP.
367
+ */
368
+ revert(opOid: string, actor: Actor, line?: string): Promise<string>;
369
+ static readonly REDUCE_CACHE_MAX = 64;
370
+ /** Write a view's materialized files into `workDir` (alongside .avcs, like git). */
371
+ checkoutInto(workDir: string, view?: string): Promise<string[]>;
372
+ /**
373
+ * Commit a working tree: diff `workDir`'s files against the materialized view and
374
+ * author put_file / delete_file ops for the changes (the git `add`+`commit` step,
375
+ * which agents do via operation.propose). Causally builds on the current frontier.
376
+ */
377
+ commitWorkingTree(workDir: string, opts: {
378
+ message: string;
379
+ actor: Actor;
380
+ line?: string;
381
+ }): Promise<{
382
+ ops: string[];
383
+ added: string[];
384
+ modified: string[];
385
+ removed: string[];
386
+ intent: string;
387
+ }>;
388
+ /** Read the repo-local git-bridge mode (default `sidecar` for pre-existing repos). */
389
+ getGitMode(): Promise<GitMode>;
390
+ /** Whether `git-sync --commit` injects AVCS provenance trailers (default on). */
391
+ gitTrailerEnabled(): Promise<boolean>;
392
+ /** Persist the git-bridge mode and (re)write `.avcs/.gitignore` to match it. */
393
+ setGitMode(mode: GitMode): Promise<void>;
394
+ /**
395
+ * Build the commit-message trailer block that links a git commit to its AVCS provenance
396
+ * (the git→avcs half). A reader with the `.avcs/` history can resolve the checkpoint;
397
+ * for a teammate without AVCS it is a harmless annotation (like `Co-authored-by`).
398
+ */
399
+ gitTrailer(info: {
400
+ checkpoint: string;
401
+ treeHash: string;
402
+ intent?: string;
403
+ }): string;
404
+ /** Record the git commit ↔ AVCS checkpoint back-link (the avcs→git half of provenance). */
405
+ recordGitCommit(sha: string, checkpointOid: string): Promise<void>;
406
+ /** The checkpoint a git commit was synced from, if a back-link was recorded locally. */
407
+ gitCheckpoint(sha: string): Promise<string | null>;
408
+ /**
409
+ * Resolve the canonical projection (path→content) a checkpoint froze, for provenance
410
+ * verification. `treeHashOk` re-confirms the checkpoint's recorded treeHash still
411
+ * reproduces from its frontier (internal integrity); `files` is what git's committed
412
+ * tree at the linked SHA must match exactly for the commit to be a faithful projection.
413
+ */
414
+ checkpointFiles(checkpointOid: string): Promise<{
415
+ treeHash: string;
416
+ treeHashOk: boolean;
417
+ files: {
418
+ path: string;
419
+ content: string;
420
+ }[];
421
+ }>;
422
+ /**
423
+ * Persist the provenance handoff for the git-hook trio (pre-commit writes it; the
424
+ * prepare-commit-msg and post-commit hooks consume it). Local working state, git-ignored.
425
+ */
426
+ writeGitPending(info: {
427
+ checkpoint: string;
428
+ treeHash: string;
429
+ intent?: string;
430
+ }): Promise<void>;
431
+ /** Read the pending provenance handoff, or null if none is staged. */
432
+ readGitPending(): Promise<{
433
+ checkpoint: string;
434
+ treeHash: string;
435
+ intent?: string;
436
+ } | null>;
437
+ /** Clear the pending provenance handoff (post-commit, after recording the back-link). */
438
+ clearGitPending(): Promise<void>;
439
+ /**
440
+ * Rebuild every rebuildable cache from the object store: the entity index AND the
441
+ * op-log/obj-log. This is the recovery path after objects arrive OUTSIDE the normal
442
+ * authoring code path — e.g. a `git pull`/`merge` that unions committed-mode
443
+ * `.avcs/objects` straight onto disk. Those logs are git-ignored, so without this the
444
+ * op-LOG (which `materialize` reads its op SET from) would stay stale and silently miss
445
+ * the pulled ops. Rebuilding the op-log is therefore essential, not just cosmetic.
446
+ * Idempotent.
447
+ */
448
+ reindex(): Promise<{
449
+ ops: number;
450
+ }>;
451
+ /**
452
+ * One-shot "prepare the working tree for `git commit`" (docs/14). The bridge between
453
+ * AVCS development and a `git add`/`commit`/`push`:
454
+ * 1. capture any direct working-tree edits as ops (so nothing a human/agent typed is
455
+ * lost — direct edits and agent-proposed ops converge into one history),
456
+ * 2. gate: if the view has open (needs-human) conflicts, REFUSE — never let a
457
+ * conflicted tree be committed; the caller routes the human to `avcs conflicts`,
458
+ * 3. checkpoint the verified state vector (the git "commit unit"), and
459
+ * 4. re-project so the working tree is EXACTLY reduce()'s output (folding in any
460
+ * auto-merged concurrent ops), making git track the deterministic projection.
461
+ * Git invocation (`git add`) is intentionally left to the caller/CLI so this core stays
462
+ * git-agnostic; `.avcs/.gitignore` (ensured here) makes a plain `git add -A` mode-correct.
463
+ */
464
+ gitSync(opts: {
465
+ message: string;
466
+ actor: Actor;
467
+ line?: string;
468
+ }): Promise<{
469
+ mode: GitMode;
470
+ captured: {
471
+ ops: string[];
472
+ added: string[];
473
+ modified: string[];
474
+ removed: string[];
475
+ intent: string;
476
+ };
477
+ conflicts: ReductionResult["conflicts"];
478
+ checkpoint?: string;
479
+ treeHash?: string;
480
+ reprojected?: number;
481
+ }>;
482
+ /** Export the whole repo (all objects + refs) as a portable bundle for backup/transfer. */
483
+ exportBundle(): Promise<{
484
+ version: number;
485
+ objects: AnyObject[];
486
+ refs: Record<string, string>;
487
+ }>;
488
+ /** Import a bundle into this repo (idempotent, content-addressed). Rebuilds the entity index. */
489
+ importBundle(bundle: {
490
+ objects: AnyObject[];
491
+ refs?: Record<string, string>;
492
+ }): Promise<{
493
+ objects: number;
494
+ refs: number;
495
+ }>;
496
+ /**
497
+ * Pack loose objects into a packfile (docs/11 B2) — a maintenance op that reduces inode
498
+ * count and speeds full scans. Reads stay correct throughout (loose-first, then packs);
499
+ * blobs are intentionally left loose so redaction can always scrub their bytes.
500
+ */
501
+ pack(): Promise<{
502
+ packed: number;
503
+ }>;
504
+ /**
505
+ * Compaction (docs/11 B3): persist the current reduction of `view` as a durable base
506
+ * snapshot. A later COLD materialize (with AVCS_COMPACT=1) loads it and `reduceIncremental`s
507
+ * only the ops added since — folding settled history into the base instead of replaying
508
+ * it — while the original ops stay on disk (append-only audit preserved). Correctness is
509
+ * the same invariant as Track A: reduceIncremental(base, current) ≡ full reduce, gated by
510
+ * the property harness and (with AVCS_VERIFY_INCREMENTAL=1) a per-call self-check.
511
+ */
512
+ compact(view?: string): Promise<{
513
+ baseOps: number;
514
+ }>;
515
+ /**
516
+ * Garbage-collect (docs/10 WS-C). Reclaims only objects UNREACHABLE from the
517
+ * authoritative graph — never the append-only audit history of accepted ops:
518
+ * - orphan blobs: stored blobs no remaining op references (incl. chunk blobs whose
519
+ * manifest is gone);
520
+ * - expired quarantine: outsider ops still quarantined (non-member, never promoted),
521
+ * past `quarantineTtlMs`, that nothing else builds on — the one place append-only
522
+ * yields (abandoned/spam contributions, docs/09 G5).
523
+ * `dryRun` reports without deleting.
524
+ */
525
+ gc(opts?: {
526
+ quarantineTtlMs?: number;
527
+ dryRun?: boolean;
528
+ }): Promise<{
529
+ blobs: string[];
530
+ quarantinedOps: string[];
531
+ }>;
532
+ /**
533
+ * Materialize the state AT a given frontier: reduce only the causal closure of
534
+ * `headOps`. The basis for time-travel — history, bisect, and diff-at-point all
535
+ * reduce over a prefix instead of the whole graph. (Phase 9 / Phase 10)
536
+ */
537
+ materializeAt(headOps: string[], includeStatuses?: ViewQuery["includeStatuses"]): Promise<ReductionResult>;
538
+ /**
539
+ * History of one entity (file path or `<path>#<symbol>`) in causal order, via the
540
+ * entity index — O(ops-on-that-entity), not a full-store scan. The basis for blame
541
+ * and `log -p`. (Phase 9 / Phase 10)
542
+ */
543
+ historyOf(entityKey: string): Promise<Operation[]>;
544
+ /**
545
+ * Blame: who currently owns an entity and WHY — the accepted head op on its key,
546
+ * with actor + intent + purpose. Stronger than git blame: the 'why' is first-class.
547
+ */
548
+ blame(entityKey: string, line?: string): Promise<{
549
+ op: string;
550
+ actor: Actor;
551
+ purpose: string;
552
+ intentTitle?: string;
553
+ at: string;
554
+ } | null>;
555
+ /** `log -p` for one entity: each op with its before/after content reconstructed. */
556
+ logP(entityKey: string, filePath: string): Promise<{
557
+ op: string;
558
+ purpose: string;
559
+ before: string;
560
+ after: string;
561
+ }[]>;
562
+ /** Diff two views (or, with materializeAt, two frontiers). */
563
+ diff(viewA: string, viewB: string): Promise<import("../query/diff.ts").TreeDiff>;
564
+ /**
565
+ * Bisect: find the first operation (between a known-good and known-bad frontier)
566
+ * that makes `isBad` true. Deterministic — re-reduces at each step with no checkout.
567
+ */
568
+ bisect(goodHeads: string[], badHeads: string[], isBad: (res: ReductionResult) => boolean | Promise<boolean>): Promise<string | null>;
569
+ /**
570
+ * Decision memory: given a conflict key, recall prior human rulings on the same
571
+ * key — their verdict, reason, and any distilled `futurePolicy`. The next agent
572
+ * (and the conflict UI) can reuse them instead of re-litigating.
573
+ */
574
+ recallDecisions(conflictKey: string): Promise<{
575
+ reason: string;
576
+ futurePolicy?: string;
577
+ decidedBy: string;
578
+ }[]>;
579
+ /** All distilled `futurePolicy` rules a human has left behind — learned constraints. */
580
+ learnedPolicies(): Promise<string[]>;
581
+ /**
582
+ * Write the materialized tree to a directory. Refuses to clobber an existing
583
+ * non-empty directory unless it carries our marker, so a stray `--out` can't
584
+ * `rm -rf` someone's source tree.
585
+ */
586
+ writeWorkspace(result: ReductionResult, targetDir: string): Promise<void>;
587
+ createCheckpoint(viewName: string, summary: string): Promise<string>;
588
+ /** Resolve the materialized tree into {path, content} entries. */
589
+ materializedFiles(result: ReductionResult): Promise<{
590
+ path: string;
591
+ content: string;
592
+ }[]>;
593
+ /**
594
+ * Phase 6: cut a Release — a verified checkpoint + its evidence + an SBOM of what
595
+ * shipped + signed-off artifacts. Refuses unless the view is conflict-free (no open
596
+ * conflicts and no semantic contract breaks): you cannot release an unverified tree.
597
+ */
598
+ cutRelease(viewName: string, opts?: {
599
+ artifacts?: import("../objects/types.ts").ArtifactRef[];
600
+ signedBy?: string[];
601
+ signWith?: {
602
+ keyId: string;
603
+ privateKey: string;
604
+ };
605
+ summary?: string;
606
+ version?: string;
607
+ supportStatus?: "supported" | "maintenance" | "eol";
608
+ }): Promise<{
609
+ released: true;
610
+ releaseOid: string;
611
+ } | {
612
+ released: false;
613
+ reason: string;
614
+ }>;
615
+ }
616
+ //# sourceMappingURL=repo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo.d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