@sigloch/graph-api-core 3.0.0 → 3.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.
- package/dist/audit.d.ts +35 -0
- package/package.json +3 -3
package/dist/audit.d.ts
CHANGED
|
@@ -40,6 +40,41 @@ export interface AuditEntry {
|
|
|
40
40
|
* at exactly the records it affected.
|
|
41
41
|
*/
|
|
42
42
|
rulesetVersion?: string;
|
|
43
|
+
/**
|
|
44
|
+
* PROVENANCE (CR-GC-354) — the four fields that make a record answer the base question
|
|
45
|
+
* of an audit trail: WHO, with WHICH PROMPT, reached WHICH RESULT. The result half was
|
|
46
|
+
* always there; these are the other two.
|
|
47
|
+
*
|
|
48
|
+
* All four are DERIVED at the recording site, never self-declared by the consumer.
|
|
49
|
+
* `consumerId` is the counter-example that motivated this: it IS a self-declared field
|
|
50
|
+
* and 40% of the records carry its anonymous default. A prompt a model writes about
|
|
51
|
+
* itself is a paraphrase — it already contains the interpretation a later consumer
|
|
52
|
+
* would want to predict — so it is worthless as provenance.
|
|
53
|
+
*
|
|
54
|
+
* Session this record was written in — groups the records of ONE conversation.
|
|
55
|
+
* Assigned by the recording host, not accepted from the caller.
|
|
56
|
+
*/
|
|
57
|
+
sessionId?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The LLM that emitted the commands (e.g. the executor's configured model). The
|
|
60
|
+
* dimension rule calibration breaks down by ("R-01 dominated rejections: Haiku 26/29,
|
|
61
|
+
* Opus 17/18, devstral 10/23") and the one a client-side transcript cannot supply for
|
|
62
|
+
* a local or third-party model, because no transcript exists there.
|
|
63
|
+
*/
|
|
64
|
+
model?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The triggering prompt VERBATIM, truncated by the recording host's policy (the
|
|
67
|
+
* contract states that it is truncated, the host states where).
|
|
68
|
+
*
|
|
69
|
+
* Same absence asymmetry as `rulesPassed`: a missing field means NOT RECORDED, never
|
|
70
|
+
* "empty prompt". A consumer must not read absence as "no prompt was given".
|
|
71
|
+
*/
|
|
72
|
+
intent?: string;
|
|
73
|
+
/**
|
|
74
|
+
* `true` when `intent` was truncated. Present only in that case — no silent cut, and
|
|
75
|
+
* no `false` noise on the overwhelming majority of records that fit.
|
|
76
|
+
*/
|
|
77
|
+
intentTruncated?: boolean;
|
|
43
78
|
}
|
|
44
79
|
export interface AuditLog {
|
|
45
80
|
record(entry: AuditEntry): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigloch/graph-api-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"prepublishOnly": "npm run build && npm run test"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@sigloch/contracts": "^4.
|
|
24
|
+
"@sigloch/contracts": "^4.1.0",
|
|
25
25
|
"zod": "^4.3.6"
|
|
26
26
|
},
|
|
27
27
|
"license": "MIT",
|
|
28
|
-
"description": "Framework-agnostic graph engine core
|
|
28
|
+
"description": "Framework-agnostic graph engine core — ontology-typed nodes/traces, rule evaluation, views",
|
|
29
29
|
"author": "sigloch-consulting",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|