@gmickel/gno 1.28.0 → 1.29.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/README.md +46 -20
- package/assets/skill/SKILL.md +33 -0
- package/browser-extension/artifacts/gno-browser-clipper-v1.29.0.zip +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v1.29.0.zip.sha256 +1 -0
- package/browser-extension/dist/chunk-b2zm0jjd.js +50 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/browser-extension/dist/preview.html +1 -1
- package/browser-extension/dist/service-worker.js +6 -6
- package/package.json +1 -1
- package/spec/cli.md +41 -1
- package/spec/db/schema.sql +19 -0
- package/spec/mcp.md +66 -0
- package/spec/output-schemas/ask.schema.json +31 -1
- package/spec/output-schemas/browser-clip-preview.schema.json +30 -0
- package/spec/output-schemas/collection-egress-check.schema.json +91 -0
- package/spec/output-schemas/collection-egress-policy-set.schema.json +56 -0
- package/spec/output-schemas/collection-egress-policy.schema.json +41 -0
- package/spec/output-schemas/context-capsule-v1.schema.json +89 -2
- package/spec/output-schemas/context-capsule-verification.schema.json +1 -1
- package/spec/output-schemas/egress-audit-management.schema.json +88 -0
- package/spec/output-schemas/mcp-http-error.schema.json +113 -2
- package/spec/output-schemas/publish-artifact.schema.json +32 -0
- package/spec/output-schemas/record-import.schema.json +30 -0
- package/spec/output-schemas/retrieval-trace-common.schema.json +31 -0
- package/spec/output-schemas/retrieval-trace-export.schema.json +3 -0
- package/spec/output-schemas/retrieval-trace-qrels.schema.json +3 -0
- package/spec/output-schemas/retrieval-trace-summary.schema.json +4 -0
- package/spec/output-schemas/search-results.schema.json +30 -0
- package/src/app/context-runtime-contract.ts +16 -7
- package/src/cli/commands/ask.ts +7 -0
- package/src/cli/commands/collection/index.ts +5 -0
- package/src/cli/commands/collection/policy.ts +126 -0
- package/src/cli/commands/context-build.ts +5 -0
- package/src/cli/commands/daemon.ts +45 -3
- package/src/cli/commands/egress-audit.ts +68 -0
- package/src/cli/commands/embed.ts +2 -0
- package/src/cli/commands/query.ts +12 -0
- package/src/cli/commands/replay.ts +13 -3
- package/src/cli/commands/vsearch.ts +3 -1
- package/src/cli/program.ts +123 -0
- package/src/config/index.ts +9 -0
- package/src/config/types.ts +50 -0
- package/src/core/browser-clip.ts +16 -1
- package/src/core/collection-egress-policy-projection.ts +28 -0
- package/src/core/collection-egress-policy-service.ts +443 -0
- package/src/core/collection-egress-policy-validation.ts +242 -0
- package/src/core/config-mutation.ts +31 -19
- package/src/core/context-capsule-schema.ts +111 -1
- package/src/core/context-capsule-validation.ts +4 -4
- package/src/core/context-capsule-verification.ts +5 -1
- package/src/core/context-capsule.ts +177 -132
- package/src/core/context-evidence.ts +86 -14
- package/src/core/destination-classifier.ts +402 -0
- package/src/core/egress-audit.ts +239 -0
- package/src/core/egress-authorization.ts +50 -0
- package/src/core/egress-enforcement.ts +264 -0
- package/src/core/egress-policy.ts +440 -0
- package/src/core/egress-provenance.ts +336 -0
- package/src/core/job-manager.ts +37 -0
- package/src/core/network-boundary-inventory.ts +261 -0
- package/src/core/retrieval-qrels.ts +6 -0
- package/src/core/retrieval-replay.ts +18 -4
- package/src/core/retrieval-trace-export.ts +23 -4
- package/src/core/retrieval-trace-management-helpers.ts +1 -0
- package/src/core/retrieval-trace-management-types.ts +3 -0
- package/src/core/retrieval-trace-management.ts +9 -1
- package/src/core/retrieval-trace-session.ts +94 -0
- package/src/core/retrieval-trace.ts +22 -0
- package/src/ingestion/record-adapter.ts +12 -1
- package/src/ingestion/record-container.ts +38 -22
- package/src/ingestion/sync.ts +15 -0
- package/src/ingestion/types.ts +2 -0
- package/src/llm/errors.ts +10 -0
- package/src/llm/http-inference.ts +175 -0
- package/src/llm/http-policy.ts +537 -0
- package/src/llm/httpEmbedding.ts +47 -28
- package/src/llm/httpGeneration.ts +31 -18
- package/src/llm/httpRerank.ts +30 -18
- package/src/llm/index.ts +1 -0
- package/src/llm/nodeLlamaCpp/adapter.ts +55 -20
- package/src/llm/pinned-http-connection.ts +177 -0
- package/src/mcp/context.ts +53 -1
- package/src/mcp/http-egress.ts +220 -0
- package/src/mcp/http-security.ts +32 -21
- package/src/mcp/http-session.ts +13 -2
- package/src/mcp/http-transport.ts +96 -6
- package/src/mcp/sync-egress.ts +24 -0
- package/src/mcp/tools/add-collection.ts +4 -0
- package/src/mcp/tools/ask.ts +1 -1
- package/src/mcp/tools/context.ts +9 -2
- package/src/mcp/tools/egress.ts +247 -0
- package/src/mcp/tools/embed.ts +1 -0
- package/src/mcp/tools/index-cmd.ts +7 -0
- package/src/mcp/tools/index.ts +98 -0
- package/src/mcp/tools/query.ts +10 -0
- package/src/mcp/tools/remove-collection.ts +4 -0
- package/src/mcp/tools/sync.ts +6 -0
- package/src/mcp/tools/trace.ts +7 -1
- package/src/mcp/tools/vsearch.ts +1 -0
- package/src/pipeline/egress-lineage.ts +124 -0
- package/src/pipeline/hybrid.ts +14 -0
- package/src/pipeline/search.ts +12 -0
- package/src/pipeline/types.ts +3 -0
- package/src/pipeline/vsearch.ts +41 -20
- package/src/publish/artifact.ts +31 -3
- package/src/publish/export-service.ts +25 -0
- package/src/sdk/client.ts +119 -2
- package/src/sdk/embed.ts +1 -0
- package/src/sdk/types.ts +33 -0
- package/src/serve/clipper-capture.ts +5 -1
- package/src/serve/closed-json.ts +61 -0
- package/src/serve/config-sync.ts +4 -1
- package/src/serve/context.ts +1 -0
- package/src/serve/doc-events.ts +110 -39
- package/src/serve/public/components/CollectionEgressCheckPanel.tsx +411 -0
- package/src/serve/public/components/CollectionEgressPolicyEditor.tsx +78 -0
- package/src/serve/public/components/CollectionModelDialog.tsx +93 -9
- package/src/serve/public/components/EgressAuditPanel.tsx +278 -0
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/public/pages/Collections.tsx +3 -0
- package/src/serve/resident-request.ts +80 -3
- package/src/serve/resident-runtime.ts +63 -1
- package/src/serve/routes/api.ts +174 -0
- package/src/serve/routes/clipper.ts +64 -1
- package/src/serve/routes/mcp.ts +6 -0
- package/src/serve/routes/traces.ts +27 -4
- package/src/serve/server.ts +118 -7
- package/src/store/migrations/023-collection-egress-policy.ts +61 -0
- package/src/store/migrations/024-egress-derived-lineage.ts +121 -0
- package/src/store/migrations/025-collection-egress-policy-revision.ts +40 -0
- package/src/store/migrations/index.ts +6 -0
- package/src/store/retrieval-trace-codec.ts +15 -0
- package/src/store/sqlite/adapter.ts +170 -7
- package/src/store/sqlite/change-journal-store.ts +41 -2
- package/src/store/sqlite/egress-audit-store.ts +485 -0
- package/src/store/sqlite/retrieval-trace-management-store.ts +47 -6
- package/src/store/sqlite/retrieval-trace-retention.ts +2 -0
- package/src/store/sqlite/retrieval-trace-rows.ts +8 -1
- package/src/store/sqlite/retrieval-trace-store.ts +104 -5
- package/src/store/types.ts +126 -1
- package/browser-extension/artifacts/gno-browser-clipper-v1.28.0.zip +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v1.28.0.zip.sha256 +0 -1
- package/browser-extension/dist/chunk-vn5f663b.js +0 -50
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { Database } from "bun:sqlite";
|
|
4
4
|
|
|
5
|
+
import type { EgressLineage } from "../../core/egress-provenance";
|
|
5
6
|
import type {
|
|
6
7
|
RetrievalTraceAppendResult,
|
|
7
8
|
RetrievalTraceBundle,
|
|
@@ -16,8 +17,13 @@ import type {
|
|
|
16
17
|
StoreResult,
|
|
17
18
|
} from "../types";
|
|
18
19
|
|
|
20
|
+
import {
|
|
21
|
+
egressLineageSchema,
|
|
22
|
+
mergeEgressLineages,
|
|
23
|
+
} from "../../core/egress-provenance";
|
|
19
24
|
import {
|
|
20
25
|
canonicalTraceJson,
|
|
26
|
+
hashLegacyRetrievalTraceCreation,
|
|
21
27
|
hashRetrievalTraceCreation,
|
|
22
28
|
hashTraceCanonical,
|
|
23
29
|
parseRetrievalTraceEventInput,
|
|
@@ -113,6 +119,7 @@ export const createTrace = (
|
|
|
113
119
|
const queryShapeJson = canonicalTraceJson(trace.queryShape);
|
|
114
120
|
const goalShapeJson = canonicalTraceJson(trace.goalShape);
|
|
115
121
|
const filtersJson = canonicalTraceJson(trace.filters);
|
|
122
|
+
const egressLineageJson = canonicalTraceJson(trace.egressLineage);
|
|
116
123
|
const queryBytes = enforceByteLimit(
|
|
117
124
|
trace.queryText ?? "",
|
|
118
125
|
8192,
|
|
@@ -138,16 +145,23 @@ export const createTrace = (
|
|
|
138
145
|
16_384,
|
|
139
146
|
"Retrieval trace filters"
|
|
140
147
|
);
|
|
148
|
+
const egressLineageBytes = enforceByteLimit(
|
|
149
|
+
egressLineageJson,
|
|
150
|
+
32_768,
|
|
151
|
+
"Retrieval trace egress lineage"
|
|
152
|
+
);
|
|
141
153
|
const creationDigest = hashRetrievalTraceCreation(trace);
|
|
142
154
|
const insert = db.run(
|
|
143
155
|
`INSERT OR IGNORE INTO retrieval_traces (
|
|
144
156
|
trace_id, schema_version, redaction_mode, replay_capable,
|
|
145
157
|
query_text, query_digest, query_shape_json,
|
|
146
158
|
goal_text, goal_digest, goal_shape_json, filters_json,
|
|
159
|
+
effective_egress_policy, egress_lineage_digest,
|
|
160
|
+
egress_lineage_json, egress_lineage_bytes,
|
|
147
161
|
pipeline_fingerprint, model_fingerprint, config_fingerprint,
|
|
148
162
|
index_fingerprint, status, created_at_ms, updated_at_ms,
|
|
149
|
-
expires_at_ms, byte_size, creation_digest
|
|
150
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
163
|
+
expires_at_ms, byte_size, creation_digest, creation_digest_version
|
|
164
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
151
165
|
[
|
|
152
166
|
trace.traceId,
|
|
153
167
|
trace.schemaVersion,
|
|
@@ -160,6 +174,10 @@ export const createTrace = (
|
|
|
160
174
|
trace.goalDigest,
|
|
161
175
|
goalShapeJson,
|
|
162
176
|
filtersJson,
|
|
177
|
+
trace.egressLineage.effectivePolicy,
|
|
178
|
+
trace.egressLineage.digest,
|
|
179
|
+
egressLineageJson,
|
|
180
|
+
egressLineageBytes,
|
|
163
181
|
trace.fingerprints.pipeline,
|
|
164
182
|
trace.fingerprints.model,
|
|
165
183
|
trace.fingerprints.config,
|
|
@@ -170,15 +188,51 @@ export const createTrace = (
|
|
|
170
188
|
trace.expiresAtMs,
|
|
171
189
|
queryBytes + shapeBytes + goalBytes + goalShapeBytes + filterBytes,
|
|
172
190
|
creationDigest,
|
|
191
|
+
1,
|
|
173
192
|
]
|
|
174
193
|
);
|
|
175
194
|
if (insert.changes > 0) return ok("inserted");
|
|
176
195
|
const stored = db
|
|
177
|
-
.query<
|
|
178
|
-
|
|
196
|
+
.query<
|
|
197
|
+
{
|
|
198
|
+
creation_digest: string;
|
|
199
|
+
creation_digest_version: 0 | 1;
|
|
200
|
+
egress_lineage_digest: string;
|
|
201
|
+
egress_lineage_json: string;
|
|
202
|
+
},
|
|
203
|
+
[string]
|
|
204
|
+
>(
|
|
205
|
+
`SELECT creation_digest, creation_digest_version,
|
|
206
|
+
egress_lineage_digest, egress_lineage_json
|
|
207
|
+
FROM retrieval_traces WHERE trace_id = ?`
|
|
179
208
|
)
|
|
180
209
|
.get(trace.traceId);
|
|
181
|
-
if (stored?.creation_digest === creationDigest)
|
|
210
|
+
if (stored?.creation_digest === creationDigest) {
|
|
211
|
+
if (stored.creation_digest_version === 0) {
|
|
212
|
+
db.run(
|
|
213
|
+
`UPDATE retrieval_traces SET creation_digest_version = 1
|
|
214
|
+
WHERE trace_id = ? AND creation_digest_version = 0`,
|
|
215
|
+
[trace.traceId]
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
return ok("duplicate");
|
|
219
|
+
}
|
|
220
|
+
const legacyLineage =
|
|
221
|
+
'{"digest":"87b249b76459c91c172da6be6cbe3f93b61c44869eb196f3470ec36ebb50b8b0","effectivePolicy":"local_only","sources":[{"collection":"legacy","policy":"local_only","source":"legacy_default"}]}';
|
|
222
|
+
if (
|
|
223
|
+
stored?.creation_digest_version === 0 &&
|
|
224
|
+
stored.egress_lineage_digest === trace.egressLineage.digest &&
|
|
225
|
+
stored.egress_lineage_json === legacyLineage &&
|
|
226
|
+
stored.creation_digest === hashLegacyRetrievalTraceCreation(trace)
|
|
227
|
+
) {
|
|
228
|
+
db.run(
|
|
229
|
+
`UPDATE retrieval_traces
|
|
230
|
+
SET creation_digest = ?, creation_digest_version = 1
|
|
231
|
+
WHERE trace_id = ? AND creation_digest_version = 0`,
|
|
232
|
+
[creationDigest, trace.traceId]
|
|
233
|
+
);
|
|
234
|
+
return ok("duplicate");
|
|
235
|
+
}
|
|
182
236
|
return err(
|
|
183
237
|
"CONSTRAINT_VIOLATION",
|
|
184
238
|
`trace_id ${trace.traceId} already exists with different content`
|
|
@@ -188,6 +242,51 @@ export const createTrace = (
|
|
|
188
242
|
}
|
|
189
243
|
};
|
|
190
244
|
|
|
245
|
+
export const mergeTraceEgressLineage = (
|
|
246
|
+
db: Database,
|
|
247
|
+
traceId: string,
|
|
248
|
+
input: EgressLineage
|
|
249
|
+
): StoreResult<RetrievalTraceAppendResult> => {
|
|
250
|
+
try {
|
|
251
|
+
validateTraceId(traceId, "traceId");
|
|
252
|
+
const incoming = egressLineageSchema.parse(input);
|
|
253
|
+
const stored = db
|
|
254
|
+
.query<{ egress_lineage_json: string }, [string]>(
|
|
255
|
+
"SELECT egress_lineage_json FROM retrieval_traces WHERE trace_id = ?"
|
|
256
|
+
)
|
|
257
|
+
.get(traceId);
|
|
258
|
+
if (!stored)
|
|
259
|
+
return err("NOT_FOUND", `Retrieval trace ${traceId} not found`);
|
|
260
|
+
const current = egressLineageSchema.parse(
|
|
261
|
+
JSON.parse(stored.egress_lineage_json)
|
|
262
|
+
);
|
|
263
|
+
const merged = mergeEgressLineages([current, incoming]);
|
|
264
|
+
if (merged.digest === current.digest) return ok("duplicate");
|
|
265
|
+
const lineageJson = canonicalTraceJson(merged);
|
|
266
|
+
const lineageBytes = enforceByteLimit(
|
|
267
|
+
lineageJson,
|
|
268
|
+
32_768,
|
|
269
|
+
"Retrieval trace egress lineage"
|
|
270
|
+
);
|
|
271
|
+
db.run(
|
|
272
|
+
`UPDATE retrieval_traces
|
|
273
|
+
SET effective_egress_policy = ?, egress_lineage_digest = ?,
|
|
274
|
+
egress_lineage_json = ?, egress_lineage_bytes = ?
|
|
275
|
+
WHERE trace_id = ?`,
|
|
276
|
+
[
|
|
277
|
+
merged.effectivePolicy,
|
|
278
|
+
merged.digest,
|
|
279
|
+
lineageJson,
|
|
280
|
+
lineageBytes,
|
|
281
|
+
traceId,
|
|
282
|
+
]
|
|
283
|
+
);
|
|
284
|
+
return ok("inserted");
|
|
285
|
+
} catch (cause) {
|
|
286
|
+
return traceWriteError(cause, "Failed to merge retrieval trace lineage");
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
191
290
|
export const getTrace = (
|
|
192
291
|
db: Database,
|
|
193
292
|
traceId: string
|
package/src/store/types.ts
CHANGED
|
@@ -5,8 +5,15 @@
|
|
|
5
5
|
* @module src/store/types
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type {
|
|
8
|
+
import type {
|
|
9
|
+
Collection,
|
|
10
|
+
Context,
|
|
11
|
+
EgressPolicy,
|
|
12
|
+
EgressPolicySource,
|
|
13
|
+
FtsTokenizer,
|
|
14
|
+
} from "../config/types";
|
|
9
15
|
import type { RecordAnchor, RecordMetadata } from "../converters/types";
|
|
16
|
+
import type { EgressLineage } from "../core/egress-provenance";
|
|
10
17
|
|
|
11
18
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
12
19
|
// Error Types
|
|
@@ -25,6 +32,7 @@ export type StoreErrorCode =
|
|
|
25
32
|
| "INVALID_INPUT"
|
|
26
33
|
| "IO_ERROR"
|
|
27
34
|
| "INTERNAL"
|
|
35
|
+
| "EGRESS_DENIED"
|
|
28
36
|
// Vector-specific error codes (EPIC 7)
|
|
29
37
|
| "VECTOR_WRITE_FAILED"
|
|
30
38
|
| "VECTOR_DELETE_FAILED"
|
|
@@ -73,6 +81,10 @@ export interface CollectionRow {
|
|
|
73
81
|
exclude: string[] | null;
|
|
74
82
|
updateCmd: string | null;
|
|
75
83
|
languageHint: string | null;
|
|
84
|
+
/** Effective fail-closed content transfer boundary. */
|
|
85
|
+
egressPolicy: EgressPolicy;
|
|
86
|
+
/** Whether policy was explicit or supplied by a safe default. */
|
|
87
|
+
egressPolicySource: EgressPolicySource;
|
|
76
88
|
syncedAt: string;
|
|
77
89
|
}
|
|
78
90
|
|
|
@@ -397,6 +409,7 @@ export interface DocumentChangeRow {
|
|
|
397
409
|
oldActive: boolean | null;
|
|
398
410
|
newActive: boolean | null;
|
|
399
411
|
structureDelta: DocumentChangeStructureDelta;
|
|
412
|
+
egressLineage: EgressLineage;
|
|
400
413
|
observedAtMs: number;
|
|
401
414
|
byteSize: number;
|
|
402
415
|
}
|
|
@@ -612,6 +625,10 @@ export interface FtsResult {
|
|
|
612
625
|
export interface CollectionStatus {
|
|
613
626
|
name: string;
|
|
614
627
|
path: string;
|
|
628
|
+
/** Effective fail-closed content transfer boundary. */
|
|
629
|
+
egressPolicy: EgressPolicy;
|
|
630
|
+
/** Whether policy was explicit or supplied by a safe default. */
|
|
631
|
+
egressPolicySource: EgressPolicySource;
|
|
615
632
|
totalDocuments: number;
|
|
616
633
|
activeDocuments: number;
|
|
617
634
|
errorDocuments: number;
|
|
@@ -1089,6 +1106,8 @@ export interface RetrievalTraceInput {
|
|
|
1089
1106
|
terms: number;
|
|
1090
1107
|
};
|
|
1091
1108
|
filters: Record<string, unknown>;
|
|
1109
|
+
/** Trusted collection ownership, independent from privacy-redacted filters. */
|
|
1110
|
+
egressLineage: EgressLineage;
|
|
1092
1111
|
fingerprints: RetrievalTraceFingerprints;
|
|
1093
1112
|
status: "open";
|
|
1094
1113
|
createdAtMs: number;
|
|
@@ -1173,6 +1192,7 @@ export interface RetrievalTraceExportManifestInput {
|
|
|
1173
1192
|
traceIds: string[];
|
|
1174
1193
|
format: RetrievalTraceExportFormat;
|
|
1175
1194
|
artifactHash: string;
|
|
1195
|
+
egressLineage: EgressLineage;
|
|
1176
1196
|
createdAtMs: number;
|
|
1177
1197
|
}
|
|
1178
1198
|
|
|
@@ -1183,6 +1203,65 @@ export interface RetrievalTraceExportManifestRow extends Omit<
|
|
|
1183
1203
|
traceIds: string[];
|
|
1184
1204
|
}
|
|
1185
1205
|
|
|
1206
|
+
export type EgressAuditDecision = "allow" | "deny";
|
|
1207
|
+
|
|
1208
|
+
export interface EgressAuditReceiptInput {
|
|
1209
|
+
auditId: string;
|
|
1210
|
+
decision: EgressAuditDecision;
|
|
1211
|
+
action: import("../core/egress-policy").EgressAction;
|
|
1212
|
+
destinationZone: import("../core/egress-policy").EgressDestinationZone;
|
|
1213
|
+
contentClass: import("../core/egress-policy").EgressContentClass;
|
|
1214
|
+
effectivePolicy: EgressPolicy;
|
|
1215
|
+
reasonCode: import("../core/egress-policy").EgressReasonCode;
|
|
1216
|
+
lineageDigest: string;
|
|
1217
|
+
createdAtMs: number;
|
|
1218
|
+
expiresAtMs: number;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
export interface EgressAuditReceiptRow extends EgressAuditReceiptInput {
|
|
1222
|
+
byteSize: number;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
export interface EgressAuditCursor {
|
|
1226
|
+
createdAtMs: number;
|
|
1227
|
+
auditId: string;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
export interface EgressAuditPage {
|
|
1231
|
+
receipts: EgressAuditReceiptRow[];
|
|
1232
|
+
nextCursor: EgressAuditCursor | null;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
export interface EgressAuditRetentionPolicy {
|
|
1236
|
+
maxAgeDays: number;
|
|
1237
|
+
maxReceipts: number;
|
|
1238
|
+
maxBytes: number;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
export interface EgressAuditRetentionResult {
|
|
1242
|
+
deleted: number;
|
|
1243
|
+
remainingReceipts: number;
|
|
1244
|
+
remainingBytes: number;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export interface EgressAuditPurgeResult {
|
|
1248
|
+
deleted: number;
|
|
1249
|
+
physicalCleanup: RetrievalTracePhysicalCleanupStatus;
|
|
1250
|
+
checkpointedFrames: number;
|
|
1251
|
+
remainingWalFrames: number;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
export interface EgressAuditDeleteResult extends EgressAuditPurgeResult {
|
|
1255
|
+
auditId: string;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
export interface EgressAuditStatusResult {
|
|
1259
|
+
receipts: number;
|
|
1260
|
+
bytes: number;
|
|
1261
|
+
oldestCreatedAtMs: number | null;
|
|
1262
|
+
newestCreatedAtMs: number | null;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1186
1265
|
export interface RetrievalTraceBundle {
|
|
1187
1266
|
trace: RetrievalTraceRow;
|
|
1188
1267
|
runs: RetrievalTraceRunRow[];
|
|
@@ -1357,6 +1436,12 @@ export interface StorePort {
|
|
|
1357
1436
|
trace: RetrievalTraceInput
|
|
1358
1437
|
): Promise<StoreResult<RetrievalTraceAppendResult>>;
|
|
1359
1438
|
|
|
1439
|
+
/** Widen one trace to the canonical union of observed policy ownership. */
|
|
1440
|
+
mergeRetrievalTraceEgressLineage?(
|
|
1441
|
+
traceId: string,
|
|
1442
|
+
lineage: EgressLineage
|
|
1443
|
+
): Promise<StoreResult<RetrievalTraceAppendResult>>;
|
|
1444
|
+
|
|
1360
1445
|
/** Return a trace and all of its locally stored subordinate records. */
|
|
1361
1446
|
getRetrievalTrace(
|
|
1362
1447
|
traceId: string
|
|
@@ -1433,6 +1518,46 @@ export interface StorePort {
|
|
|
1433
1518
|
nowMs: number
|
|
1434
1519
|
): Promise<StoreResult<RetrievalTraceRetentionResult>>;
|
|
1435
1520
|
|
|
1521
|
+
/** Append one content-free egress decision receipt. */
|
|
1522
|
+
appendEgressAuditReceipt(
|
|
1523
|
+
receipt: EgressAuditReceiptInput
|
|
1524
|
+
): Promise<StoreResult<RetrievalTraceAppendResult>>;
|
|
1525
|
+
|
|
1526
|
+
/** Append one receipt and enforce bounds in one atomic store transaction. */
|
|
1527
|
+
appendEgressAuditReceiptWithRetention?(
|
|
1528
|
+
receipt: EgressAuditReceiptInput,
|
|
1529
|
+
policy: EgressAuditRetentionPolicy,
|
|
1530
|
+
nowMs: number
|
|
1531
|
+
): Promise<StoreResult<RetrievalTraceAppendResult>>;
|
|
1532
|
+
|
|
1533
|
+
/** Inspect bounded receipts newest-first through an opaque cursor. */
|
|
1534
|
+
listEgressAuditReceipts(
|
|
1535
|
+
limit: number,
|
|
1536
|
+
cursor?: EgressAuditCursor
|
|
1537
|
+
): Promise<StoreResult<EgressAuditPage>>;
|
|
1538
|
+
|
|
1539
|
+
/** Inspect one content-free receipt by stable local identifier. */
|
|
1540
|
+
getEgressAuditReceipt(
|
|
1541
|
+
auditId: string
|
|
1542
|
+
): Promise<StoreResult<EgressAuditReceiptRow | null>>;
|
|
1543
|
+
|
|
1544
|
+
/** Delete exactly one audit receipt with truthful physical cleanup status. */
|
|
1545
|
+
deleteEgressAuditReceipt(
|
|
1546
|
+
auditId: string
|
|
1547
|
+
): Promise<StoreResult<EgressAuditDeleteResult>>;
|
|
1548
|
+
|
|
1549
|
+
/** Return content-free local audit storage and retention facts. */
|
|
1550
|
+
getEgressAuditStatus(): Promise<StoreResult<EgressAuditStatusResult>>;
|
|
1551
|
+
|
|
1552
|
+
/** Enforce the audit domain's independent age/count/byte policy. */
|
|
1553
|
+
enforceEgressAuditRetention(
|
|
1554
|
+
policy: EgressAuditRetentionPolicy,
|
|
1555
|
+
nowMs: number
|
|
1556
|
+
): Promise<StoreResult<EgressAuditRetentionResult>>;
|
|
1557
|
+
|
|
1558
|
+
/** Purge only audit receipts with truthful SQLite physical cleanup status. */
|
|
1559
|
+
purgeEgressAuditReceipts(): Promise<StoreResult<EgressAuditPurgeResult>>;
|
|
1560
|
+
|
|
1436
1561
|
// ─────────────────────────────────────────────────────────────────────────
|
|
1437
1562
|
// Documents
|
|
1438
1563
|
// ─────────────────────────────────────────────────────────────────────────
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5cdb85ddd0e73801a566527b7a908c8e0854a83c56cae281bab5f1285dae6734 gno-browser-clipper-v1.28.0.zip
|