ds4-context-reference-adapter 0.2.0-beta.1
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 +21 -0
- package/README.md +70 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +406 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DS4 Context Engine contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# ds4-context-reference-adapter
|
|
2
|
+
|
|
3
|
+
Non-Pi reference implementation of the DS4 `runtime-adapter-v1` contract.
|
|
4
|
+
|
|
5
|
+
The package adapts an append-only JSONL conversation owned by a small callback-driven agent runtime. It is intentionally vendor-neutral: completion transport is injected by the host, while runtime SDK dependencies stay outside `ds4-context-core`.
|
|
6
|
+
|
|
7
|
+
## Guarantees
|
|
8
|
+
|
|
9
|
+
- JSONL is canonical; in-memory snapshots are disposable and rebuildable.
|
|
10
|
+
- Canonical messages retain stable provenance and complete tool call/result atomic groups.
|
|
11
|
+
- The trusted project root is canonicalized and must match the session header.
|
|
12
|
+
- Model limits use the portable DS4 model descriptor.
|
|
13
|
+
- Provider payloads pass privacy enforcement immediately before the injected transport.
|
|
14
|
+
- Privacy failures fail closed; transport failures return an explicit native-fallback result.
|
|
15
|
+
- Unsupported compaction, provider continuation, embeddings, and local KV reuse are negotiated independently with explicit diagnostics.
|
|
16
|
+
- Shutdown is idempotent and rejects further history access.
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import {
|
|
22
|
+
JsonlReferenceRuntimeAdapter,
|
|
23
|
+
createReferenceHistory,
|
|
24
|
+
} from "ds4-context-reference-adapter";
|
|
25
|
+
|
|
26
|
+
createReferenceHistory({
|
|
27
|
+
historyFile: ".agent/session.jsonl",
|
|
28
|
+
runtimeId: "my-runtime",
|
|
29
|
+
sessionId: "session-1",
|
|
30
|
+
projectRoot: process.cwd(),
|
|
31
|
+
messages: [],
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const adapter = new JsonlReferenceRuntimeAdapter({
|
|
35
|
+
historyFile: ".agent/session.jsonl",
|
|
36
|
+
projectRoot: process.cwd(),
|
|
37
|
+
runtimeId: "my-runtime",
|
|
38
|
+
model: {
|
|
39
|
+
provider: "my-provider",
|
|
40
|
+
id: "my-model",
|
|
41
|
+
contextWindow: 32_768,
|
|
42
|
+
maxTokens: 4_096,
|
|
43
|
+
},
|
|
44
|
+
transport: async ({ payload }) => invokeMyRuntime(payload),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const snapshot = await adapter.snapshotHistory();
|
|
48
|
+
const negotiation = adapter.negotiateCapabilities([
|
|
49
|
+
{ id: "compaction" },
|
|
50
|
+
{ id: "embeddings" },
|
|
51
|
+
]);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`createReferenceHistory` refuses to overwrite an existing canonical session. `appendReferenceHistoryMessage` appends one provenance-checked message. Applications should serialize canonical writes according to their own runtime lifecycle.
|
|
55
|
+
|
|
56
|
+
## Conformance
|
|
57
|
+
|
|
58
|
+
Adapter authors can reuse the framework-neutral kit exported by core:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import {
|
|
62
|
+
assertRuntimeAdapterConformance,
|
|
63
|
+
runRuntimeAdapterConformance,
|
|
64
|
+
} from "ds4-context-core/adapter/conformance";
|
|
65
|
+
|
|
66
|
+
const report = await runRuntimeAdapterConformance(myAdapterFactory);
|
|
67
|
+
assertRuntimeAdapterConformance(report);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
See the repository's `docs/RUNTIME_ADAPTER_KIT.md` for the complete contract, compatibility decision, packaging rules, and failure semantics.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type RuntimeAdapter, type RuntimeAdapterDiagnostic, type RuntimeAdapterIdentity, type RuntimeCapabilityDeclaration, type RuntimeCapabilityNegotiation, type RuntimeCapabilityRequest, type RuntimeCompletionRequest, type RuntimeCompletionResult, type RuntimeCompletionTransport, type RuntimeHistorySnapshot, type RuntimePrivacyRequest, type RuntimePrivacyResult } from "ds4-context-core/adapter/runtime-adapter";
|
|
2
|
+
import type { PrivacyConfig } from "ds4-context-core/config/config";
|
|
3
|
+
import type { CanonicalMessage } from "ds4-context-core/core/canonical-message";
|
|
4
|
+
import type { ModelDescriptor } from "ds4-context-core/core/model-profile";
|
|
5
|
+
import type { EmbeddingPort } from "ds4-context-core/retrieval/embedding";
|
|
6
|
+
export declare const REFERENCE_ADAPTER_VERSION = "0.2.0-beta.1";
|
|
7
|
+
export declare const REFERENCE_HISTORY_RECORD_TYPE = "ds4-runtime-session-v1";
|
|
8
|
+
export declare const REFERENCE_ADAPTER_DEFAULT_PRIVACY: PrivacyConfig;
|
|
9
|
+
export interface CreateReferenceHistoryInput {
|
|
10
|
+
historyFile: string;
|
|
11
|
+
runtimeId?: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
projectRoot: string;
|
|
14
|
+
messages?: readonly CanonicalMessage[];
|
|
15
|
+
}
|
|
16
|
+
export interface ReferenceRuntimeAdapterOptions {
|
|
17
|
+
historyFile: string;
|
|
18
|
+
projectRoot: string;
|
|
19
|
+
model: ModelDescriptor;
|
|
20
|
+
transport: RuntimeCompletionTransport;
|
|
21
|
+
runtimeId?: string;
|
|
22
|
+
privacy?: PrivacyConfig;
|
|
23
|
+
embeddingPort?: EmbeddingPort;
|
|
24
|
+
maxHistoryBytes?: number;
|
|
25
|
+
maxHistoryMessages?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function createReferenceHistory(input: CreateReferenceHistoryInput): string;
|
|
28
|
+
export declare function appendReferenceHistoryMessage(historyFile: string, message: CanonicalMessage): void;
|
|
29
|
+
export declare class JsonlReferenceRuntimeAdapter implements RuntimeAdapter {
|
|
30
|
+
readonly identity: RuntimeAdapterIdentity;
|
|
31
|
+
readonly embeddingPort?: EmbeddingPort;
|
|
32
|
+
private readonly historyFile;
|
|
33
|
+
private readonly projectRoot;
|
|
34
|
+
private readonly model;
|
|
35
|
+
private readonly transport;
|
|
36
|
+
private readonly privacy;
|
|
37
|
+
private readonly maxHistoryBytes;
|
|
38
|
+
private readonly maxHistoryMessages;
|
|
39
|
+
private readonly diagnosticEntries;
|
|
40
|
+
private cached?;
|
|
41
|
+
private closed;
|
|
42
|
+
constructor(options: ReferenceRuntimeAdapterOptions);
|
|
43
|
+
capabilityDeclarations(): readonly RuntimeCapabilityDeclaration[];
|
|
44
|
+
negotiateCapabilities(requested: readonly RuntimeCapabilityRequest[]): RuntimeCapabilityNegotiation;
|
|
45
|
+
snapshotHistory(): Promise<RuntimeHistorySnapshot>;
|
|
46
|
+
rebuildDerivedState(): Promise<RuntimeHistorySnapshot>;
|
|
47
|
+
currentModel(): Promise<ModelDescriptor>;
|
|
48
|
+
trustedProjectRoot(): Promise<string>;
|
|
49
|
+
enforcePrivacy<T>(request: RuntimePrivacyRequest<T>): Promise<RuntimePrivacyResult<T>>;
|
|
50
|
+
complete<T>(request: RuntimeCompletionRequest<T>): Promise<RuntimeCompletionResult>;
|
|
51
|
+
diagnostics(): readonly RuntimeAdapterDiagnostic[];
|
|
52
|
+
shutdown(): Promise<void>;
|
|
53
|
+
private assertOpen;
|
|
54
|
+
private pushDiagnostic;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAG1E,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AACxD,eAAO,MAAM,6BAA6B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,CAAC,QAAQ,CAAC,iBAAiB,CAAkC;IACpE,OAAO,CAAC,MAAM,CAAC,CAAyB;IACxC,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,EAAE,8BAA8B;IAyBnD,sBAAsB,IAAI,SAAS,4BAA4B,EAAE;IAejE,qBAAqB,CAAC,SAAS,EAAE,SAAS,wBAAwB,EAAE,GAAG,4BAA4B;IAI7F,eAAe,IAAI,OAAO,CAAC,sBAAsB,CAAC;IA6ClD,mBAAmB,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAYtD,YAAY,IAAI,OAAO,CAAC,eAAe,CAAC;IAKxC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAKrC,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAwBtF,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA2DzF,WAAW,IAAI,SAAS,wBAAwB,EAAE;IAI5C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAW/B,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,cAAc;CAIvB"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import { appendFileSync, chmodSync, mkdirSync, readFileSync, realpathSync, statSync, writeFileSync, } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { RUNTIME_ADAPTER_CONTRACT_VERSION, RUNTIME_HISTORY_SCHEMA_VERSION, buildCanonicalToolAtomicGroups, negotiateRuntimeCapabilities, validateRuntimeHistorySnapshot, } from "ds4-context-core/adapter/runtime-adapter";
|
|
4
|
+
import { PrivacyPolicyEngine } from "ds4-context-core/privacy/privacy-policy";
|
|
5
|
+
import { sha256 } from "ds4-context-core/shared/hash";
|
|
6
|
+
export const REFERENCE_ADAPTER_VERSION = "0.2.0-beta.1";
|
|
7
|
+
export const REFERENCE_HISTORY_RECORD_TYPE = "ds4-runtime-session-v1";
|
|
8
|
+
const DEFAULT_MAX_HISTORY_BYTES = 64 * 1024 * 1024;
|
|
9
|
+
const DEFAULT_MAX_HISTORY_MESSAGES = 100_000;
|
|
10
|
+
const MAX_DIAGNOSTICS = 100;
|
|
11
|
+
export const REFERENCE_ADAPTER_DEFAULT_PRIVACY = {
|
|
12
|
+
enabled: true,
|
|
13
|
+
defaultClassification: "normal",
|
|
14
|
+
localProviders: ["ollama", "llama-cpp", "lmstudio"],
|
|
15
|
+
remoteDefaultAllowed: ["normal", "internal"],
|
|
16
|
+
remoteProviders: {},
|
|
17
|
+
redactSecrets: true,
|
|
18
|
+
};
|
|
19
|
+
function canonicalPath(path) {
|
|
20
|
+
return realpathSync.native(resolve(path));
|
|
21
|
+
}
|
|
22
|
+
function positiveInteger(value, fallback, label) {
|
|
23
|
+
const selected = value ?? fallback;
|
|
24
|
+
if (!Number.isSafeInteger(selected) || selected <= 0) {
|
|
25
|
+
throw new Error(`${label} must be a positive integer`);
|
|
26
|
+
}
|
|
27
|
+
return selected;
|
|
28
|
+
}
|
|
29
|
+
function recordLine(value) {
|
|
30
|
+
return `${JSON.stringify(value)}\n`;
|
|
31
|
+
}
|
|
32
|
+
function isRecord(value) {
|
|
33
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
34
|
+
}
|
|
35
|
+
function validCanonicalMessage(value) {
|
|
36
|
+
if (!isRecord(value)
|
|
37
|
+
|| typeof value.id !== "string"
|
|
38
|
+
|| typeof value.sourceEntryId !== "string"
|
|
39
|
+
|| typeof value.role !== "string"
|
|
40
|
+
|| !["system", "user", "assistant", "tool", "custom"].includes(value.role)
|
|
41
|
+
|| !Array.isArray(value.blocks)
|
|
42
|
+
|| !isRecord(value.provenance)
|
|
43
|
+
|| !isRecord(value.flags))
|
|
44
|
+
return false;
|
|
45
|
+
const provenance = value.provenance;
|
|
46
|
+
if ((provenance.source !== "pi-session" && provenance.source !== "runtime-session")
|
|
47
|
+
|| typeof provenance.sessionId !== "string"
|
|
48
|
+
|| typeof provenance.entryId !== "string"
|
|
49
|
+
|| (provenance.runtimeId !== undefined && typeof provenance.runtimeId !== "string"))
|
|
50
|
+
return false;
|
|
51
|
+
return value.blocks.every((block) => {
|
|
52
|
+
if (!isRecord(block) || typeof block.type !== "string")
|
|
53
|
+
return false;
|
|
54
|
+
switch (block.type) {
|
|
55
|
+
case "text": return typeof block.text === "string";
|
|
56
|
+
case "thinking": return typeof block.thinking === "string";
|
|
57
|
+
case "toolCall": return typeof block.id === "string" && typeof block.name === "string";
|
|
58
|
+
case "toolResult":
|
|
59
|
+
return typeof block.toolCallId === "string"
|
|
60
|
+
&& typeof block.toolName === "string"
|
|
61
|
+
&& typeof block.content === "string"
|
|
62
|
+
&& typeof block.isError === "boolean";
|
|
63
|
+
case "image":
|
|
64
|
+
return (block.mimeType === undefined || typeof block.mimeType === "string")
|
|
65
|
+
&& (block.data === undefined || typeof block.data === "string");
|
|
66
|
+
case "fileReference": return typeof block.path === "string";
|
|
67
|
+
case "artifactReference": return typeof block.artifactId === "string";
|
|
68
|
+
case "summaryReference": return typeof block.summaryId === "string";
|
|
69
|
+
case "opaqueProvider": return "value" in block;
|
|
70
|
+
default: return false;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function referenceSnapshot(input) {
|
|
75
|
+
return {
|
|
76
|
+
schemaVersion: RUNTIME_HISTORY_SCHEMA_VERSION,
|
|
77
|
+
runtimeId: input.runtimeId,
|
|
78
|
+
sessionId: input.sessionId,
|
|
79
|
+
revision: input.revision,
|
|
80
|
+
projectRoot: input.projectRoot,
|
|
81
|
+
messages: input.messages,
|
|
82
|
+
toolAtomicGroups: buildCanonicalToolAtomicGroups(input.messages),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function assertValidMessages(runtimeId, sessionId, projectRoot, messages) {
|
|
86
|
+
if (!messages.every(validCanonicalMessage)) {
|
|
87
|
+
throw new Error("Reference history contains an invalid canonical message");
|
|
88
|
+
}
|
|
89
|
+
const snapshot = referenceSnapshot({
|
|
90
|
+
runtimeId,
|
|
91
|
+
sessionId,
|
|
92
|
+
projectRoot,
|
|
93
|
+
revision: "pending-write",
|
|
94
|
+
messages: structuredClone([...messages]),
|
|
95
|
+
});
|
|
96
|
+
const issues = validateRuntimeHistorySnapshot(snapshot);
|
|
97
|
+
if (issues.length > 0) {
|
|
98
|
+
throw new Error(`Reference history is invalid: ${[...new Set(issues.map((issue) => issue.code))].join(", ")}`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export function createReferenceHistory(input) {
|
|
102
|
+
const historyFile = resolve(input.historyFile);
|
|
103
|
+
const projectRoot = canonicalPath(input.projectRoot);
|
|
104
|
+
const runtimeId = input.runtimeId?.trim() || "jsonl-reference";
|
|
105
|
+
const sessionId = input.sessionId.trim();
|
|
106
|
+
if (!sessionId)
|
|
107
|
+
throw new Error("Reference session ID must be non-empty");
|
|
108
|
+
const messages = [...(input.messages ?? [])];
|
|
109
|
+
assertValidMessages(runtimeId, sessionId, projectRoot, messages);
|
|
110
|
+
const header = {
|
|
111
|
+
type: REFERENCE_HISTORY_RECORD_TYPE,
|
|
112
|
+
runtimeId,
|
|
113
|
+
sessionId,
|
|
114
|
+
projectRoot,
|
|
115
|
+
};
|
|
116
|
+
const serialized = [
|
|
117
|
+
recordLine(header),
|
|
118
|
+
...messages.map((message) => recordLine({ type: "message", message })),
|
|
119
|
+
].join("");
|
|
120
|
+
mkdirSync(dirname(historyFile), { recursive: true, mode: 0o700 });
|
|
121
|
+
writeFileSync(historyFile, serialized, { encoding: "utf8", flag: "wx", mode: 0o600 });
|
|
122
|
+
try {
|
|
123
|
+
chmodSync(historyFile, 0o600);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// Permission hardening is best effort on platforms without POSIX modes.
|
|
127
|
+
}
|
|
128
|
+
return historyFile;
|
|
129
|
+
}
|
|
130
|
+
export function appendReferenceHistoryMessage(historyFile, message) {
|
|
131
|
+
const path = resolve(historyFile);
|
|
132
|
+
const parsed = parseReferenceHistory(path, DEFAULT_MAX_HISTORY_BYTES, DEFAULT_MAX_HISTORY_MESSAGES);
|
|
133
|
+
const projectRoot = canonicalPath(parsed.header.projectRoot);
|
|
134
|
+
if (message.provenance.sessionId !== parsed.header.sessionId
|
|
135
|
+
|| message.provenance.runtimeId !== parsed.header.runtimeId) {
|
|
136
|
+
throw new Error("Reference message provenance does not match the canonical session");
|
|
137
|
+
}
|
|
138
|
+
assertValidMessages(parsed.header.runtimeId, parsed.header.sessionId, projectRoot, [...parsed.messages, message]);
|
|
139
|
+
appendFileSync(path, recordLine({ type: "message", message }), { encoding: "utf8", mode: 0o600 });
|
|
140
|
+
}
|
|
141
|
+
function parseReferenceHistory(path, maxHistoryBytes, maxHistoryMessages) {
|
|
142
|
+
const stats = statSync(path);
|
|
143
|
+
if (!stats.isFile() || stats.size <= 0 || stats.size > maxHistoryBytes) {
|
|
144
|
+
throw new Error("Reference history file size is invalid");
|
|
145
|
+
}
|
|
146
|
+
const raw = readFileSync(path, "utf8");
|
|
147
|
+
if (!raw.endsWith("\n"))
|
|
148
|
+
throw new Error("Reference history has an unterminated final record");
|
|
149
|
+
const lines = raw.slice(0, -1).split("\n");
|
|
150
|
+
const firstLine = lines.shift();
|
|
151
|
+
if (!firstLine)
|
|
152
|
+
throw new Error("Reference history header is missing");
|
|
153
|
+
let header;
|
|
154
|
+
try {
|
|
155
|
+
header = JSON.parse(firstLine);
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
throw new Error("Reference history header is malformed");
|
|
159
|
+
}
|
|
160
|
+
if (header.type !== REFERENCE_HISTORY_RECORD_TYPE
|
|
161
|
+
|| typeof header.runtimeId !== "string" || !header.runtimeId.trim()
|
|
162
|
+
|| typeof header.sessionId !== "string" || !header.sessionId.trim()
|
|
163
|
+
|| typeof header.projectRoot !== "string" || !header.projectRoot.trim()) {
|
|
164
|
+
throw new Error("Reference history header is invalid");
|
|
165
|
+
}
|
|
166
|
+
if (lines.length > maxHistoryMessages)
|
|
167
|
+
throw new Error("Reference history message limit exceeded");
|
|
168
|
+
const messages = lines.map((line) => {
|
|
169
|
+
let record;
|
|
170
|
+
try {
|
|
171
|
+
record = JSON.parse(line);
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
throw new Error("Reference history message record is malformed");
|
|
175
|
+
}
|
|
176
|
+
if (record.type !== "message" || !validCanonicalMessage(record.message)) {
|
|
177
|
+
throw new Error("Reference history message record is invalid");
|
|
178
|
+
}
|
|
179
|
+
return record.message;
|
|
180
|
+
});
|
|
181
|
+
return { header, raw, messages };
|
|
182
|
+
}
|
|
183
|
+
export class JsonlReferenceRuntimeAdapter {
|
|
184
|
+
identity;
|
|
185
|
+
embeddingPort;
|
|
186
|
+
historyFile;
|
|
187
|
+
projectRoot;
|
|
188
|
+
model;
|
|
189
|
+
transport;
|
|
190
|
+
privacy;
|
|
191
|
+
maxHistoryBytes;
|
|
192
|
+
maxHistoryMessages;
|
|
193
|
+
diagnosticEntries = [];
|
|
194
|
+
cached;
|
|
195
|
+
closed = false;
|
|
196
|
+
constructor(options) {
|
|
197
|
+
this.historyFile = resolve(options.historyFile);
|
|
198
|
+
this.projectRoot = canonicalPath(options.projectRoot);
|
|
199
|
+
this.model = structuredClone(options.model);
|
|
200
|
+
if (!this.model.provider.trim() || !this.model.id.trim()
|
|
201
|
+
|| !Number.isFinite(this.model.contextWindow) || this.model.contextWindow <= 0) {
|
|
202
|
+
throw new Error("Reference adapter model descriptor is invalid");
|
|
203
|
+
}
|
|
204
|
+
this.transport = options.transport;
|
|
205
|
+
this.privacy = new PrivacyPolicyEngine(options.privacy ?? REFERENCE_ADAPTER_DEFAULT_PRIVACY);
|
|
206
|
+
this.maxHistoryBytes = positiveInteger(options.maxHistoryBytes, DEFAULT_MAX_HISTORY_BYTES, "maxHistoryBytes");
|
|
207
|
+
this.maxHistoryMessages = positiveInteger(options.maxHistoryMessages, DEFAULT_MAX_HISTORY_MESSAGES, "maxHistoryMessages");
|
|
208
|
+
if (options.embeddingPort)
|
|
209
|
+
this.embeddingPort = options.embeddingPort;
|
|
210
|
+
this.identity = {
|
|
211
|
+
runtimeId: options.runtimeId?.trim() || "jsonl-reference",
|
|
212
|
+
adapterName: "ds4-context-reference-adapter",
|
|
213
|
+
adapterVersion: REFERENCE_ADAPTER_VERSION,
|
|
214
|
+
contractVersion: RUNTIME_ADAPTER_CONTRACT_VERSION,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
capabilityDeclarations() {
|
|
218
|
+
return [
|
|
219
|
+
{ id: "compaction", supported: false, reason: "reference JSONL runtime has no native compaction hook" },
|
|
220
|
+
{
|
|
221
|
+
id: "provider-continuation",
|
|
222
|
+
supported: false,
|
|
223
|
+
reason: "reference completion transport exposes no provider continuation handle",
|
|
224
|
+
},
|
|
225
|
+
...(this.embeddingPort
|
|
226
|
+
? [{ id: "embeddings", supported: true, version: "embedding-port-v1" }]
|
|
227
|
+
: [{ id: "embeddings", supported: false, reason: "no embedding port was configured" }]),
|
|
228
|
+
{ id: "local-kv-reuse", supported: false, reason: "reference completion transport exposes no local KV state" },
|
|
229
|
+
];
|
|
230
|
+
}
|
|
231
|
+
negotiateCapabilities(requested) {
|
|
232
|
+
return negotiateRuntimeCapabilities(this.capabilityDeclarations(), requested);
|
|
233
|
+
}
|
|
234
|
+
async snapshotHistory() {
|
|
235
|
+
this.assertOpen();
|
|
236
|
+
let parsed;
|
|
237
|
+
let projectRoot;
|
|
238
|
+
try {
|
|
239
|
+
parsed = parseReferenceHistory(this.historyFile, this.maxHistoryBytes, this.maxHistoryMessages);
|
|
240
|
+
projectRoot = canonicalPath(parsed.header.projectRoot);
|
|
241
|
+
}
|
|
242
|
+
catch {
|
|
243
|
+
this.pushDiagnostic({
|
|
244
|
+
code: "canonical-history-read-failed",
|
|
245
|
+
severity: "error",
|
|
246
|
+
message: "Canonical JSONL history is missing, corrupt, truncated, or outside configured bounds",
|
|
247
|
+
});
|
|
248
|
+
throw new Error("Reference canonical history is unavailable");
|
|
249
|
+
}
|
|
250
|
+
if (parsed.header.runtimeId !== this.identity.runtimeId || projectRoot !== this.projectRoot) {
|
|
251
|
+
this.pushDiagnostic({
|
|
252
|
+
code: "canonical-history-identity-mismatch",
|
|
253
|
+
severity: "error",
|
|
254
|
+
message: "Canonical history identity does not match the trusted adapter configuration",
|
|
255
|
+
});
|
|
256
|
+
throw new Error("Reference canonical history identity mismatch");
|
|
257
|
+
}
|
|
258
|
+
const revision = sha256(parsed.raw);
|
|
259
|
+
if (this.cached?.revision === revision)
|
|
260
|
+
return structuredClone(this.cached);
|
|
261
|
+
const snapshot = referenceSnapshot({
|
|
262
|
+
runtimeId: parsed.header.runtimeId,
|
|
263
|
+
sessionId: parsed.header.sessionId,
|
|
264
|
+
projectRoot,
|
|
265
|
+
revision,
|
|
266
|
+
messages: parsed.messages,
|
|
267
|
+
});
|
|
268
|
+
const issues = validateRuntimeHistorySnapshot(snapshot);
|
|
269
|
+
if (issues.length > 0) {
|
|
270
|
+
this.pushDiagnostic({
|
|
271
|
+
code: "canonical-history-invalid",
|
|
272
|
+
severity: "error",
|
|
273
|
+
message: `Canonical history validation failed with ${issues.length} issue(s)`,
|
|
274
|
+
});
|
|
275
|
+
throw new Error("Reference canonical history validation failed");
|
|
276
|
+
}
|
|
277
|
+
this.cached = structuredClone(snapshot);
|
|
278
|
+
return structuredClone(snapshot);
|
|
279
|
+
}
|
|
280
|
+
async rebuildDerivedState() {
|
|
281
|
+
this.assertOpen();
|
|
282
|
+
this.cached = undefined;
|
|
283
|
+
const snapshot = await this.snapshotHistory();
|
|
284
|
+
this.pushDiagnostic({
|
|
285
|
+
code: "derived-state-rebuilt",
|
|
286
|
+
severity: "info",
|
|
287
|
+
message: "Disposable adapter state was rebuilt from canonical JSONL history",
|
|
288
|
+
});
|
|
289
|
+
return snapshot;
|
|
290
|
+
}
|
|
291
|
+
async currentModel() {
|
|
292
|
+
this.assertOpen();
|
|
293
|
+
return structuredClone(this.model);
|
|
294
|
+
}
|
|
295
|
+
async trustedProjectRoot() {
|
|
296
|
+
this.assertOpen();
|
|
297
|
+
return this.projectRoot;
|
|
298
|
+
}
|
|
299
|
+
async enforcePrivacy(request) {
|
|
300
|
+
this.assertOpen();
|
|
301
|
+
if (!request.provider.trim())
|
|
302
|
+
throw new Error("Privacy provider must be non-empty");
|
|
303
|
+
try {
|
|
304
|
+
const policy = this.privacy.policy(request.provider);
|
|
305
|
+
const sanitized = this.privacy.sanitizeProviderPayload(request.payload, request.provider);
|
|
306
|
+
return {
|
|
307
|
+
provider: request.provider,
|
|
308
|
+
destination: policy.destination,
|
|
309
|
+
payload: sanitized.value,
|
|
310
|
+
changed: sanitized.changed,
|
|
311
|
+
blockedBlocks: sanitized.blockedBlocks,
|
|
312
|
+
secretRedactions: sanitized.secretRedactions,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
this.pushDiagnostic({
|
|
317
|
+
code: "privacy-enforcement-failed",
|
|
318
|
+
severity: "error",
|
|
319
|
+
message: "Privacy enforcement failed closed before completion transport",
|
|
320
|
+
});
|
|
321
|
+
throw new Error("Reference privacy enforcement failed closed");
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
async complete(request) {
|
|
325
|
+
if (this.closed) {
|
|
326
|
+
return {
|
|
327
|
+
status: "fallback",
|
|
328
|
+
code: "adapter-closed",
|
|
329
|
+
reason: "reference adapter is closed",
|
|
330
|
+
retryable: false,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
if (!request.provider.trim() || !request.model.trim()) {
|
|
334
|
+
this.pushDiagnostic({
|
|
335
|
+
code: "completion-request-invalid",
|
|
336
|
+
severity: "warning",
|
|
337
|
+
message: "Completion request is missing provider or model identity",
|
|
338
|
+
});
|
|
339
|
+
return {
|
|
340
|
+
status: "fallback",
|
|
341
|
+
code: "invalid-request",
|
|
342
|
+
reason: "completion request is invalid",
|
|
343
|
+
retryable: false,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
let sanitized;
|
|
347
|
+
try {
|
|
348
|
+
sanitized = await this.enforcePrivacy({ provider: request.provider, payload: request.payload });
|
|
349
|
+
}
|
|
350
|
+
catch {
|
|
351
|
+
return {
|
|
352
|
+
status: "fallback",
|
|
353
|
+
code: "privacy-enforcement-failed",
|
|
354
|
+
reason: "privacy enforcement failed closed",
|
|
355
|
+
retryable: false,
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
try {
|
|
359
|
+
const output = await this.transport({
|
|
360
|
+
provider: request.provider,
|
|
361
|
+
model: request.model,
|
|
362
|
+
destination: sanitized.destination,
|
|
363
|
+
payload: sanitized.payload,
|
|
364
|
+
});
|
|
365
|
+
const { payload: _payload, ...privacy } = sanitized;
|
|
366
|
+
return { status: "completed", output, privacy };
|
|
367
|
+
}
|
|
368
|
+
catch {
|
|
369
|
+
this.pushDiagnostic({
|
|
370
|
+
code: "completion-transport-failed",
|
|
371
|
+
severity: "warning",
|
|
372
|
+
message: "Completion transport failed; native runtime fallback remains available",
|
|
373
|
+
});
|
|
374
|
+
return {
|
|
375
|
+
status: "fallback",
|
|
376
|
+
code: "transport-failed",
|
|
377
|
+
reason: "completion transport failed",
|
|
378
|
+
retryable: true,
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
diagnostics() {
|
|
383
|
+
return this.diagnosticEntries.map((diagnostic) => ({ ...diagnostic }));
|
|
384
|
+
}
|
|
385
|
+
async shutdown() {
|
|
386
|
+
if (this.closed)
|
|
387
|
+
return;
|
|
388
|
+
this.closed = true;
|
|
389
|
+
this.cached = undefined;
|
|
390
|
+
this.pushDiagnostic({
|
|
391
|
+
code: "adapter-closed",
|
|
392
|
+
severity: "info",
|
|
393
|
+
message: "Reference adapter lifecycle closed cleanly",
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
assertOpen() {
|
|
397
|
+
if (this.closed)
|
|
398
|
+
throw new Error("Reference adapter is closed");
|
|
399
|
+
}
|
|
400
|
+
pushDiagnostic(diagnostic) {
|
|
401
|
+
this.diagnosticEntries.push(diagnostic);
|
|
402
|
+
if (this.diagnosticEntries.length > MAX_DIAGNOSTICS)
|
|
403
|
+
this.diagnosticEntries.shift();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EACL,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,8BAA8B,GAa/B,MAAM,0CAA0C,CAAC;AAIlD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAE9E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,cAAc,CAAC;AACxD,MAAM,CAAC,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AACtE,MAAM,yBAAyB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,MAAM,CAAC,MAAM,iCAAiC,GAAkB;IAC9D,OAAO,EAAE,IAAI;IACb,qBAAqB,EAAE,QAAQ;IAC/B,cAAc,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC;IACnD,oBAAoB,EAAE,CAAC,QAAQ,E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.1",
|
|
4
|
+
"description": "Non-Pi JSONL reference runtime adapter and DS4 adapter-contract example.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Alucard24",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Alucard24/ds4-context-engine.git",
|
|
11
|
+
"directory": "packages/reference-adapter"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/Alucard24/ds4-context-engine#runtime-adapter-kit",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/Alucard24/ds4-context-engine/issues"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"context-engine",
|
|
22
|
+
"agent-runtime",
|
|
23
|
+
"runtime-adapter",
|
|
24
|
+
"jsonl",
|
|
25
|
+
"reference-implementation"
|
|
26
|
+
],
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"import": "./dist/index.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsc -p tsconfig.build.json",
|
|
42
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
43
|
+
"prepack": "npm run build"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22.19.0"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"ds4-context-core": "0.2.0-beta.1"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "22.19.19",
|
|
53
|
+
"typescript": "5.9.3"
|
|
54
|
+
}
|
|
55
|
+
}
|