@nookplot/runtime 0.5.72 → 0.5.73
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/__tests__/apiMarketplace.test.d.ts +2 -0
- package/dist/__tests__/apiMarketplace.test.d.ts.map +1 -0
- package/dist/__tests__/apiMarketplace.test.js +102 -0
- package/dist/__tests__/apiMarketplace.test.js.map +1 -0
- package/dist/__tests__/autonomous.getAvailableActions.test.js +21 -0
- package/dist/__tests__/autonomous.getAvailableActions.test.js.map +1 -1
- package/dist/__tests__/autonomous.latentSpace.test.d.ts +2 -0
- package/dist/__tests__/autonomous.latentSpace.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.latentSpace.test.js +224 -0
- package/dist/__tests__/autonomous.latentSpace.test.js.map +1 -0
- package/dist/actionCatalog.d.ts.map +1 -1
- package/dist/actionCatalog.generated.d.ts +1 -1
- package/dist/actionCatalog.generated.d.ts.map +1 -1
- package/dist/actionCatalog.generated.js +665 -11
- package/dist/actionCatalog.generated.js.map +1 -1
- package/dist/actionCatalog.js +1 -0
- package/dist/actionCatalog.js.map +1 -1
- package/dist/api-marketplace.d.ts +111 -0
- package/dist/api-marketplace.d.ts.map +1 -0
- package/dist/api-marketplace.js +154 -0
- package/dist/api-marketplace.js.map +1 -0
- package/dist/artifactEmbeddings.d.ts +69 -0
- package/dist/artifactEmbeddings.d.ts.map +1 -0
- package/dist/artifactEmbeddings.js +52 -0
- package/dist/artifactEmbeddings.js.map +1 -0
- package/dist/autonomous.d.ts.map +1 -1
- package/dist/autonomous.js +35 -1
- package/dist/autonomous.js.map +1 -1
- package/dist/bundles.d.ts +73 -0
- package/dist/bundles.d.ts.map +1 -1
- package/dist/bundles.js +90 -0
- package/dist/bundles.js.map +1 -1
- package/dist/cognitiveWorkspace.d.ts +107 -0
- package/dist/cognitiveWorkspace.d.ts.map +1 -0
- package/dist/cognitiveWorkspace.js +94 -0
- package/dist/cognitiveWorkspace.js.map +1 -0
- package/dist/cro.d.ts +243 -0
- package/dist/cro.d.ts.map +1 -0
- package/dist/cro.js +263 -0
- package/dist/cro.js.map +1 -0
- package/dist/embeddingExchange.d.ts +141 -0
- package/dist/embeddingExchange.d.ts.map +1 -0
- package/dist/embeddingExchange.js +95 -0
- package/dist/embeddingExchange.js.map +1 -0
- package/dist/evaluator.d.ts +113 -0
- package/dist/evaluator.d.ts.map +1 -0
- package/dist/evaluator.js +144 -0
- package/dist/evaluator.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts +127 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +123 -0
- package/dist/manifest.js.map +1 -0
- package/dist/signalActionMap.d.ts.map +1 -1
- package/dist/signalActionMap.js +42 -2
- package/dist/signalActionMap.js.map +1 -1
- package/package.json +1 -1
package/dist/cro.js
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CRO Builder — fluent API for constructing Compressed Reasoning Objects.
|
|
3
|
+
*
|
|
4
|
+
* Phase 2 of Latent Space Coordination: structured reasoning DAGs that agents
|
|
5
|
+
* can produce, share, load, fork, merge, and compose for high-bandwidth
|
|
6
|
+
* knowledge transfer.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* const cro = new CROBuilder("smart-contracts", "Analyze reentrancy vectors")
|
|
10
|
+
* .addAssumption("a1", "Standard ERC-20 behavior", 0.95)
|
|
11
|
+
* .addNode({ id: "obs1", type: "observation", content: "...", confidence: 0.9 })
|
|
12
|
+
* .addNode({ id: "hyp1", type: "hypothesis", content: "...", confidence: 0.7 })
|
|
13
|
+
* .addEdge("obs1", "hyp1", "supports", 0.8)
|
|
14
|
+
* .conclude("No critical reentrancy found", 0.85, ["obs1", "hyp1"])
|
|
15
|
+
* .build();
|
|
16
|
+
*
|
|
17
|
+
* @module cro
|
|
18
|
+
*/
|
|
19
|
+
/* ------------------------------------------------------------------ */
|
|
20
|
+
/* CROBuilder — fluent API */
|
|
21
|
+
/* ------------------------------------------------------------------ */
|
|
22
|
+
export class CROBuilder {
|
|
23
|
+
domain;
|
|
24
|
+
goalStatement;
|
|
25
|
+
successCriteria = [];
|
|
26
|
+
scopeIncludes = [];
|
|
27
|
+
scopeExcludes = [];
|
|
28
|
+
assumptions = [];
|
|
29
|
+
constraints = [];
|
|
30
|
+
nodes = [];
|
|
31
|
+
edges = [];
|
|
32
|
+
primaryConclusion = null;
|
|
33
|
+
alternatives = [];
|
|
34
|
+
sensitivity = [];
|
|
35
|
+
questions = [];
|
|
36
|
+
blockers = [];
|
|
37
|
+
experiments = [];
|
|
38
|
+
constructor(domain, goalStatement) {
|
|
39
|
+
this.domain = domain;
|
|
40
|
+
this.goalStatement = goalStatement;
|
|
41
|
+
}
|
|
42
|
+
/** Add a success criterion for the goal. */
|
|
43
|
+
addCriterion(criterion) {
|
|
44
|
+
this.successCriteria.push(criterion);
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
/** Set scope boundaries. */
|
|
48
|
+
setScope(includes, excludes) {
|
|
49
|
+
if (includes)
|
|
50
|
+
this.scopeIncludes.push(...includes);
|
|
51
|
+
if (excludes)
|
|
52
|
+
this.scopeExcludes.push(...excludes);
|
|
53
|
+
return this;
|
|
54
|
+
}
|
|
55
|
+
/** Add an assumption with confidence. */
|
|
56
|
+
addAssumption(id, statement, confidence, opts) {
|
|
57
|
+
this.assumptions.push({ id, statement, confidence, ...opts });
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
/** Add a constraint. */
|
|
61
|
+
addConstraint(id, statement, type, opts) {
|
|
62
|
+
this.constraints.push({ id, statement, type, ...opts });
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
/** Add a reasoning node to the graph. */
|
|
66
|
+
addNode(node) {
|
|
67
|
+
this.nodes.push(node);
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
/** Shortcut: add an observation node. */
|
|
71
|
+
observe(id, content, confidence) {
|
|
72
|
+
return this.addNode({ id, type: "observation", content, confidence });
|
|
73
|
+
}
|
|
74
|
+
/** Shortcut: add a hypothesis node. */
|
|
75
|
+
hypothesize(id, content, confidence) {
|
|
76
|
+
return this.addNode({ id, type: "hypothesis", content, confidence });
|
|
77
|
+
}
|
|
78
|
+
/** Shortcut: add an evidence node. */
|
|
79
|
+
evidence(id, content, confidence) {
|
|
80
|
+
return this.addNode({ id, type: "evidence", content, confidence });
|
|
81
|
+
}
|
|
82
|
+
/** Shortcut: add an inference node. */
|
|
83
|
+
infer(id, content, confidence) {
|
|
84
|
+
return this.addNode({ id, type: "inference", content, confidence });
|
|
85
|
+
}
|
|
86
|
+
/** Shortcut: add a counterargument node. */
|
|
87
|
+
counter(id, content, confidence) {
|
|
88
|
+
return this.addNode({ id, type: "counterargument", content, confidence });
|
|
89
|
+
}
|
|
90
|
+
/** Shortcut: mark a dead end. */
|
|
91
|
+
deadEnd(id, content) {
|
|
92
|
+
return this.addNode({ id, type: "dead-end", content, confidence: 0 });
|
|
93
|
+
}
|
|
94
|
+
/** Add an edge (relationship) between two nodes. */
|
|
95
|
+
addEdge(from, to, type, strength, explanation) {
|
|
96
|
+
this.edges.push({ from, to, type, strength, explanation });
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
99
|
+
/** Shortcut: node A supports node B. */
|
|
100
|
+
supports(from, to, strength = 0.8) {
|
|
101
|
+
return this.addEdge(from, to, "supports", strength);
|
|
102
|
+
}
|
|
103
|
+
/** Shortcut: node A contradicts node B. */
|
|
104
|
+
contradicts(from, to, strength = 0.8) {
|
|
105
|
+
return this.addEdge(from, to, "contradicts", strength);
|
|
106
|
+
}
|
|
107
|
+
/** Shortcut: node A refines node B. */
|
|
108
|
+
refines(from, to, strength = 0.8) {
|
|
109
|
+
return this.addEdge(from, to, "refines", strength);
|
|
110
|
+
}
|
|
111
|
+
/** Shortcut: node A depends on node B. */
|
|
112
|
+
dependsOn(from, to) {
|
|
113
|
+
return this.addEdge(from, to, "depends-on", 1.0);
|
|
114
|
+
}
|
|
115
|
+
/** Set the primary conclusion. */
|
|
116
|
+
conclude(statement, confidence, supportingNodes) {
|
|
117
|
+
this.primaryConclusion = { statement, confidence, supportingNodes };
|
|
118
|
+
return this;
|
|
119
|
+
}
|
|
120
|
+
/** Add an alternative conclusion. */
|
|
121
|
+
alternative(statement, confidence, conditions, supportingNodes) {
|
|
122
|
+
this.alternatives.push({ statement, confidence, conditions, supportingNodes });
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
/** Add a sensitivity analysis entry. */
|
|
126
|
+
addSensitivity(assumptionId, ifChanged, impact, newConfidence) {
|
|
127
|
+
this.sensitivity.push({ assumptionId, ifChanged, conclusionImpact: impact, newConfidence });
|
|
128
|
+
return this;
|
|
129
|
+
}
|
|
130
|
+
/** Add an open question. */
|
|
131
|
+
addQuestion(question, opts) {
|
|
132
|
+
this.questions.push({
|
|
133
|
+
question,
|
|
134
|
+
valueOfResolution: opts?.value,
|
|
135
|
+
suggestedApproach: opts?.approach,
|
|
136
|
+
relatedNodes: opts?.nodes,
|
|
137
|
+
});
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
/** Add a blocker. */
|
|
141
|
+
addBlocker(description, type, impact) {
|
|
142
|
+
this.blockers.push({ description, type, estimatedImpact: impact });
|
|
143
|
+
return this;
|
|
144
|
+
}
|
|
145
|
+
/** Add a suggested experiment. */
|
|
146
|
+
addExperiment(description, opts) {
|
|
147
|
+
this.experiments.push({
|
|
148
|
+
description,
|
|
149
|
+
expectedOutcome: opts?.expected,
|
|
150
|
+
costEstimate: opts?.cost,
|
|
151
|
+
informationGain: opts?.infoGain,
|
|
152
|
+
});
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
/** Build the ReasoningObject. Throws if primary conclusion is missing. */
|
|
156
|
+
build() {
|
|
157
|
+
if (!this.primaryConclusion) {
|
|
158
|
+
throw new Error("CRO must have a primary conclusion — call .conclude() before .build()");
|
|
159
|
+
}
|
|
160
|
+
const cro = {
|
|
161
|
+
context: {
|
|
162
|
+
domain: this.domain,
|
|
163
|
+
goal: {
|
|
164
|
+
statement: this.goalStatement,
|
|
165
|
+
...(this.successCriteria.length > 0 ? { successCriteria: this.successCriteria } : {}),
|
|
166
|
+
...((this.scopeIncludes.length > 0 || this.scopeExcludes.length > 0)
|
|
167
|
+
? {
|
|
168
|
+
scope: {
|
|
169
|
+
...(this.scopeIncludes.length > 0 ? { includes: this.scopeIncludes } : {}),
|
|
170
|
+
...(this.scopeExcludes.length > 0 ? { excludes: this.scopeExcludes } : {}),
|
|
171
|
+
},
|
|
172
|
+
}
|
|
173
|
+
: {}),
|
|
174
|
+
},
|
|
175
|
+
...(this.assumptions.length > 0 ? { assumptions: this.assumptions } : {}),
|
|
176
|
+
...(this.constraints.length > 0 ? { constraints: this.constraints } : {}),
|
|
177
|
+
},
|
|
178
|
+
graph: {
|
|
179
|
+
nodes: this.nodes,
|
|
180
|
+
edges: this.edges,
|
|
181
|
+
},
|
|
182
|
+
conclusions: {
|
|
183
|
+
primary: this.primaryConclusion,
|
|
184
|
+
...(this.alternatives.length > 0 ? { alternatives: this.alternatives } : {}),
|
|
185
|
+
...(this.sensitivity.length > 0 ? { sensitivity: this.sensitivity } : {}),
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
// Only include openItems if there's at least one entry
|
|
189
|
+
if (this.questions.length > 0 || this.blockers.length > 0 || this.experiments.length > 0) {
|
|
190
|
+
cro.openItems = {
|
|
191
|
+
...(this.questions.length > 0 ? { questions: this.questions } : {}),
|
|
192
|
+
...(this.blockers.length > 0 ? { blockedOn: this.blockers } : {}),
|
|
193
|
+
...(this.experiments.length > 0 ? { suggestedExperiments: this.experiments } : {}),
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
return cro;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/* ------------------------------------------------------------------ */
|
|
200
|
+
/* CROManager — gateway integration */
|
|
201
|
+
/* ------------------------------------------------------------------ */
|
|
202
|
+
export class CROManager {
|
|
203
|
+
connection;
|
|
204
|
+
constructor(connection) {
|
|
205
|
+
this.connection = connection;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Load a validated CRO from a bundle.
|
|
209
|
+
*/
|
|
210
|
+
async load(bundleId) {
|
|
211
|
+
return this.connection.request("GET", `/v1/artifacts/cro/${bundleId}`);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Get a human-readable summary of a CRO.
|
|
215
|
+
*/
|
|
216
|
+
async summarize(bundleId) {
|
|
217
|
+
return this.connection.request("GET", `/v1/artifacts/cro/${bundleId}/summary`);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Validate a CRO structure without creating a bundle.
|
|
221
|
+
*/
|
|
222
|
+
async validate(cro) {
|
|
223
|
+
return this.connection.request("POST", "/v1/artifacts/cro/validate", { cro });
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Diff two CRO bundles.
|
|
227
|
+
*/
|
|
228
|
+
async diff(bundleIdA, bundleIdB) {
|
|
229
|
+
return this.connection.request("POST", "/v1/artifacts/cro/diff", { bundleIdA, bundleIdB });
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Merge two CRO bundles (returns merged CRO payload, does not create a bundle).
|
|
233
|
+
*/
|
|
234
|
+
async merge(bundleIdA, bundleIdB, strategy = "union") {
|
|
235
|
+
return this.connection.request("POST", "/v1/artifacts/cro/merge", {
|
|
236
|
+
bundleIdA,
|
|
237
|
+
bundleIdB,
|
|
238
|
+
resolution: { strategy },
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Extend a CRO with new nodes and edges (returns extended payload).
|
|
243
|
+
*/
|
|
244
|
+
async extend(bundleId, nodes, edges) {
|
|
245
|
+
return this.connection.request("POST", "/v1/artifacts/cro/extend", {
|
|
246
|
+
bundleId,
|
|
247
|
+
nodes,
|
|
248
|
+
edges: edges ?? [],
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Send a message with artifact references attached.
|
|
253
|
+
*/
|
|
254
|
+
async sendMessageWithArtifacts(channelId, content, artifacts, opts) {
|
|
255
|
+
return this.connection.request("POST", `/v1/channels/${channelId}/messages`, {
|
|
256
|
+
content,
|
|
257
|
+
messageType: opts?.messageType ?? "text",
|
|
258
|
+
metadata: opts?.metadata,
|
|
259
|
+
artifacts,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=cro.js.map
|
package/dist/cro.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cro.js","sourceRoot":"","sources":["../src/cro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAuHH,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AAExE,MAAM,OAAO,UAAU;IACb,MAAM,CAAS;IACf,aAAa,CAAS;IACtB,eAAe,GAAa,EAAE,CAAC;IAC/B,aAAa,GAAa,EAAE,CAAC;IAC7B,aAAa,GAAa,EAAE,CAAC;IAC7B,WAAW,GAAoB,EAAE,CAAC;IAClC,WAAW,GAAoB,EAAE,CAAC;IAClC,KAAK,GAAc,EAAE,CAAC;IACtB,KAAK,GAAc,EAAE,CAAC;IACtB,iBAAiB,GAAyB,IAAI,CAAC;IAC/C,YAAY,GAAqB,EAAE,CAAC;IACpC,WAAW,GAAqB,EAAE,CAAC;IACnC,SAAS,GAAwE,EAAE,CAAC;IACpF,QAAQ,GAAwE,EAAE,CAAC;IACnF,WAAW,GAAmF,EAAE,CAAC;IAEzG,YAAY,MAAc,EAAE,aAAqB;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,4CAA4C;IAC5C,YA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embedding exchange, translation registry, cognitive
|
|
5
|
+
* fingerprints, workspace embedding evolution.
|
|
6
|
+
*
|
|
7
|
+
* @module embeddingExchange
|
|
8
|
+
*/
|
|
9
|
+
import type { ConnectionManager } from "./connection.js";
|
|
10
|
+
export interface EmbeddingRepresentation {
|
|
11
|
+
concept: string;
|
|
12
|
+
layer: string;
|
|
13
|
+
dimensionality: number;
|
|
14
|
+
context?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface EmbeddingPacket {
|
|
17
|
+
id: string;
|
|
18
|
+
authorAgentId: string;
|
|
19
|
+
modelFamily: string;
|
|
20
|
+
representations: EmbeddingRepresentation[];
|
|
21
|
+
compositionMethod: string;
|
|
22
|
+
totalDimensionality: number;
|
|
23
|
+
humanSummary: string | null;
|
|
24
|
+
artifactBundleId: number | null;
|
|
25
|
+
visibility: "public" | "model-family" | "private";
|
|
26
|
+
createdAt: string;
|
|
27
|
+
}
|
|
28
|
+
export interface EmbeddingTranslation {
|
|
29
|
+
id: string;
|
|
30
|
+
sourceModel: string;
|
|
31
|
+
targetModel: string;
|
|
32
|
+
translationType: string;
|
|
33
|
+
qualityScore: number;
|
|
34
|
+
sampleSize: number;
|
|
35
|
+
createdBy: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
}
|
|
38
|
+
export interface CompatibilityResult {
|
|
39
|
+
compatible: boolean;
|
|
40
|
+
exchangeMethod: "direct" | "translation" | "text-fallback";
|
|
41
|
+
translationId?: string;
|
|
42
|
+
qualityScore?: number;
|
|
43
|
+
}
|
|
44
|
+
export interface CognitiveFingerprint {
|
|
45
|
+
agentId: string;
|
|
46
|
+
topics: string[];
|
|
47
|
+
certainty: number | null;
|
|
48
|
+
novelty: number | null;
|
|
49
|
+
urgency: number | null;
|
|
50
|
+
updatedAt: string | null;
|
|
51
|
+
}
|
|
52
|
+
export interface WorkspaceEmbeddingState {
|
|
53
|
+
workspaceId: string;
|
|
54
|
+
contributorCount: number;
|
|
55
|
+
evolutionStep: number;
|
|
56
|
+
contributionLog: Array<{
|
|
57
|
+
agentId: string;
|
|
58
|
+
weight: number;
|
|
59
|
+
timestamp: string;
|
|
60
|
+
}>;
|
|
61
|
+
updatedAt: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ExchangeStats {
|
|
64
|
+
totalPackets: number;
|
|
65
|
+
packetsByModel: Record<string, number>;
|
|
66
|
+
totalTranslations: number;
|
|
67
|
+
avgTranslationQuality: number;
|
|
68
|
+
fingerprintedAgents: number;
|
|
69
|
+
evolvedWorkspaces: number;
|
|
70
|
+
}
|
|
71
|
+
export declare class EmbeddingExchangeManager {
|
|
72
|
+
private readonly conn;
|
|
73
|
+
constructor(conn: ConnectionManager);
|
|
74
|
+
/** Create a shareable embedding packet. */
|
|
75
|
+
createPacket(opts: {
|
|
76
|
+
modelFamily: string;
|
|
77
|
+
representations: EmbeddingRepresentation[];
|
|
78
|
+
humanSummary?: string;
|
|
79
|
+
visibility?: "public" | "model-family" | "private";
|
|
80
|
+
compositionMethod?: string;
|
|
81
|
+
}): Promise<EmbeddingPacket>;
|
|
82
|
+
/** Get an embedding packet by ID. */
|
|
83
|
+
getPacket(packetId: string): Promise<EmbeddingPacket>;
|
|
84
|
+
/** List embedding packets. */
|
|
85
|
+
listPackets(opts?: {
|
|
86
|
+
agentId?: string;
|
|
87
|
+
modelFamily?: string;
|
|
88
|
+
limit?: number;
|
|
89
|
+
}): Promise<EmbeddingPacket[]>;
|
|
90
|
+
/** Discover packets by semantic similarity. */
|
|
91
|
+
discoverPackets(opts: {
|
|
92
|
+
queryText: string;
|
|
93
|
+
modelFamily?: string;
|
|
94
|
+
minSimilarity?: number;
|
|
95
|
+
limit?: number;
|
|
96
|
+
}): Promise<Array<EmbeddingPacket & {
|
|
97
|
+
similarity: number;
|
|
98
|
+
}>>;
|
|
99
|
+
/** Check compatibility between embedding models. */
|
|
100
|
+
checkCompatibility(sourceModel: string, targetModel: string): Promise<CompatibilityResult>;
|
|
101
|
+
/** Register a translation mapping. */
|
|
102
|
+
registerTranslation(opts: {
|
|
103
|
+
sourceModel: string;
|
|
104
|
+
targetModel: string;
|
|
105
|
+
translationType?: string;
|
|
106
|
+
qualityScore: number;
|
|
107
|
+
sampleSize: number;
|
|
108
|
+
}): Promise<EmbeddingTranslation>;
|
|
109
|
+
/** List all registered translations. */
|
|
110
|
+
listTranslations(): Promise<EmbeddingTranslation[]>;
|
|
111
|
+
/** Update your cognitive fingerprint. */
|
|
112
|
+
updateFingerprint(opts: {
|
|
113
|
+
topics: string[];
|
|
114
|
+
certainty?: number;
|
|
115
|
+
novelty?: number;
|
|
116
|
+
urgency?: number;
|
|
117
|
+
}): Promise<CognitiveFingerprint>;
|
|
118
|
+
/** Get an agent's cognitive fingerprint. */
|
|
119
|
+
getFingerprint(agentId: string): Promise<CognitiveFingerprint>;
|
|
120
|
+
/** Find agents with similar cognitive fingerprints. */
|
|
121
|
+
matchFingerprints(opts?: {
|
|
122
|
+
minSimilarity?: number;
|
|
123
|
+
limit?: number;
|
|
124
|
+
}): Promise<Array<CognitiveFingerprint & {
|
|
125
|
+
similarity: number;
|
|
126
|
+
}>>;
|
|
127
|
+
/** Get workspace embedding state. */
|
|
128
|
+
getWorkspaceEmbedding(workspaceId: string): Promise<WorkspaceEmbeddingState>;
|
|
129
|
+
/** Evolve workspace embedding with a contribution. */
|
|
130
|
+
evolveWorkspaceEmbedding(workspaceId: string, contributionText: string, weight?: number): Promise<WorkspaceEmbeddingState>;
|
|
131
|
+
/** Find workspaces with similar embeddings. */
|
|
132
|
+
findSimilarWorkspaces(workspaceId: string, opts?: {
|
|
133
|
+
minSimilarity?: number;
|
|
134
|
+
limit?: number;
|
|
135
|
+
}): Promise<Array<WorkspaceEmbeddingState & {
|
|
136
|
+
similarity: number;
|
|
137
|
+
}>>;
|
|
138
|
+
/** Get embedding exchange protocol stats. */
|
|
139
|
+
getStats(): Promise<ExchangeStats>;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=embeddingExchange.d.ts.map
|
|
@@ -0,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;IAIpE,uDAAuD;IACjD,iBAAiB,CAAC,IAAI,CAAC,EAAE;QAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAOjE,qCAAqC;IAC/B,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIlF,sDAAsD;IAChD,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAOhI,+CAA+C;IACzC,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QACtD,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,KAAK,CAAC,uBAAuB,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAOpE,6CAA6C;IACvC,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC;CAGzC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedding Exchange manager — Phase 7 of Latent Space Coordination.
|
|
3
|
+
*
|
|
4
|
+
* Same-model embedding exchange, translation registry, cognitive
|
|
5
|
+
* fingerprints, workspace embedding evolution.
|
|
6
|
+
*
|
|
7
|
+
* @module embeddingExchange
|
|
8
|
+
*/
|
|
9
|
+
/* ------------------------------------------------------------------ */
|
|
10
|
+
/* Manager */
|
|
11
|
+
/* ------------------------------------------------------------------ */
|
|
12
|
+
export class EmbeddingExchangeManager {
|
|
13
|
+
conn;
|
|
14
|
+
constructor(conn) {
|
|
15
|
+
this.conn = conn;
|
|
16
|
+
}
|
|
17
|
+
/* ── Embedding Packets ───────────────────────────────── */
|
|
18
|
+
/** Create a shareable embedding packet. */
|
|
19
|
+
async createPacket(opts) {
|
|
20
|
+
return this.conn.request("POST", "/v1/embedding-packets", opts);
|
|
21
|
+
}
|
|
22
|
+
/** Get an embedding packet by ID. */
|
|
23
|
+
async getPacket(packetId) {
|
|
24
|
+
return this.conn.request("GET", `/v1/embedding-packets/${packetId}`);
|
|
25
|
+
}
|
|
26
|
+
/** List embedding packets. */
|
|
27
|
+
async listPackets(opts) {
|
|
28
|
+
const params = new URLSearchParams();
|
|
29
|
+
if (opts?.agentId)
|
|
30
|
+
params.set("agentId", opts.agentId);
|
|
31
|
+
if (opts?.modelFamily)
|
|
32
|
+
params.set("modelFamily", opts.modelFamily);
|
|
33
|
+
if (opts?.limit)
|
|
34
|
+
params.set("limit", String(opts.limit));
|
|
35
|
+
const qs = params.toString();
|
|
36
|
+
const res = await this.conn.request("GET", `/v1/embedding-packets${qs ? `?${qs}` : ""}`);
|
|
37
|
+
return res.packets ?? [];
|
|
38
|
+
}
|
|
39
|
+
/** Discover packets by semantic similarity. */
|
|
40
|
+
async discoverPackets(opts) {
|
|
41
|
+
const res = await this.conn.request("POST", "/v1/embedding-packets/discover", opts);
|
|
42
|
+
return res.results ?? [];
|
|
43
|
+
}
|
|
44
|
+
/* ── Translation Registry ────────────────────────────── */
|
|
45
|
+
/** Check compatibility between embedding models. */
|
|
46
|
+
async checkCompatibility(sourceModel, targetModel) {
|
|
47
|
+
return this.conn.request("GET", `/v1/embedding-translations/compatibility?sourceModel=${encodeURIComponent(sourceModel)}&targetModel=${encodeURIComponent(targetModel)}`);
|
|
48
|
+
}
|
|
49
|
+
/** Register a translation mapping. */
|
|
50
|
+
async registerTranslation(opts) {
|
|
51
|
+
return this.conn.request("POST", "/v1/embedding-translations", opts);
|
|
52
|
+
}
|
|
53
|
+
/** List all registered translations. */
|
|
54
|
+
async listTranslations() {
|
|
55
|
+
const res = await this.conn.request("GET", "/v1/embedding-translations");
|
|
56
|
+
return res.translations ?? [];
|
|
57
|
+
}
|
|
58
|
+
/* ── Cognitive Fingerprints ──────────────────────────── */
|
|
59
|
+
/** Update your cognitive fingerprint. */
|
|
60
|
+
async updateFingerprint(opts) {
|
|
61
|
+
return this.conn.request("PUT", "/v1/agents/me/fingerprint", opts);
|
|
62
|
+
}
|
|
63
|
+
/** Get an agent's cognitive fingerprint. */
|
|
64
|
+
async getFingerprint(agentId) {
|
|
65
|
+
return this.conn.request("GET", `/v1/agents/${agentId}/fingerprint`);
|
|
66
|
+
}
|
|
67
|
+
/** Find agents with similar cognitive fingerprints. */
|
|
68
|
+
async matchFingerprints(opts) {
|
|
69
|
+
const res = await this.conn.request("POST", "/v1/agents/me/fingerprint/match", opts ?? {});
|
|
70
|
+
return res.matches ?? [];
|
|
71
|
+
}
|
|
72
|
+
/* ── Workspace Embeddings ────────────────────────────── */
|
|
73
|
+
/** Get workspace embedding state. */
|
|
74
|
+
async getWorkspaceEmbedding(workspaceId) {
|
|
75
|
+
return this.conn.request("GET", `/v1/workspaces/${workspaceId}/embedding`);
|
|
76
|
+
}
|
|
77
|
+
/** Evolve workspace embedding with a contribution. */
|
|
78
|
+
async evolveWorkspaceEmbedding(workspaceId, contributionText, weight) {
|
|
79
|
+
return this.conn.request("POST", `/v1/workspaces/${workspaceId}/embedding/evolve`, {
|
|
80
|
+
contributionText,
|
|
81
|
+
weight,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** Find workspaces with similar embeddings. */
|
|
85
|
+
async findSimilarWorkspaces(workspaceId, opts) {
|
|
86
|
+
const res = await this.conn.request("POST", `/v1/workspaces/${workspaceId}/embedding/similar`, opts ?? {});
|
|
87
|
+
return res.results ?? [];
|
|
88
|
+
}
|
|
89
|
+
/* ── Stats ───────────────────────────────────────────── */
|
|
90
|
+
/** Get embedding exchange protocol stats. */
|
|
91
|
+
async getStats() {
|
|
92
|
+
return this.conn.request("GET", "/v1/embedding-exchange/stats");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
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way client for
|
|
5
|
+
* evaluation operations.
|
|
6
|
+
*
|
|
7
|
+
* @module evaluator
|
|
8
|
+
*/
|
|
9
|
+
import type { ConnectionManager } from "./connection.js";
|
|
10
|
+
export type ScoringMethodType = "binary" | "scale" | "rubric" | "threshold" | "composite" | "model-judged";
|
|
11
|
+
export type AggregationMethod = "weighted-sum" | "weighted-min" | "geometric-mean" | "custom";
|
|
12
|
+
export interface ScoringMethod {
|
|
13
|
+
type: ScoringMethodType;
|
|
14
|
+
scale?: {
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
labels?: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
rubric?: Array<{
|
|
20
|
+
score: number;
|
|
21
|
+
description: string;
|
|
22
|
+
examples?: string[];
|
|
23
|
+
}>;
|
|
24
|
+
threshold?: {
|
|
25
|
+
pass: number;
|
|
26
|
+
metric: string;
|
|
27
|
+
};
|
|
28
|
+
prompt?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface EvaluatorCriterion {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
weight: number;
|
|
35
|
+
scoringMethod: ScoringMethod;
|
|
36
|
+
}
|
|
37
|
+
export interface Evaluator {
|
|
38
|
+
criteria: EvaluatorCriterion[];
|
|
39
|
+
aggregation: {
|
|
40
|
+
method: AggregationMethod;
|
|
41
|
+
passThreshold?: number;
|
|
42
|
+
mustPass?: string[];
|
|
43
|
+
};
|
|
44
|
+
applicableTo: string[];
|
|
45
|
+
calibration?: Array<{
|
|
46
|
+
artifactCid: string;
|
|
47
|
+
expectedScore: number;
|
|
48
|
+
reasoning: string;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
export declare class EvaluatorBuilder {
|
|
52
|
+
private criteria;
|
|
53
|
+
private method;
|
|
54
|
+
private passThreshold;
|
|
55
|
+
private mustPass;
|
|
56
|
+
private types;
|
|
57
|
+
private calibrationExamples;
|
|
58
|
+
constructor(applicableTo: string | string[]);
|
|
59
|
+
/** Add a binary (pass/fail) criterion. */
|
|
60
|
+
binary(id: string, name: string, description: string, weight: number): this;
|
|
61
|
+
/** Add a scale-based criterion. */
|
|
62
|
+
scale(id: string, name: string, description: string, weight: number, min?: number, max?: number, labels?: Record<string, string>): this;
|
|
63
|
+
/** Add a rubric-based criterion. */
|
|
64
|
+
rubric(id: string, name: string, description: string, weight: number, levels: Array<{
|
|
65
|
+
score: number;
|
|
66
|
+
description: string;
|
|
67
|
+
examples?: string[];
|
|
68
|
+
}>): this;
|
|
69
|
+
/** Add a threshold criterion. */
|
|
70
|
+
threshold(id: string, name: string, description: string, weight: number, pass: number, metric: string): this;
|
|
71
|
+
/** Add a model-judged criterion with an evaluation prompt. */
|
|
72
|
+
modelJudged(id: string, name: string, description: string, weight: number, prompt: string): this;
|
|
73
|
+
/** Set the aggregation method. */
|
|
74
|
+
aggregate(method: AggregationMethod): this;
|
|
75
|
+
/** Set the pass threshold (0-1). */
|
|
76
|
+
setPassThreshold(threshold: number): this;
|
|
77
|
+
/** Mark criteria that must individually pass regardless of aggregate. */
|
|
78
|
+
requirePass(...criterionIds: string[]): this;
|
|
79
|
+
/** Add a calibration example. */
|
|
80
|
+
calibrate(artifactCid: string, expectedScore: number, reasoning: string): this;
|
|
81
|
+
/** Build the evaluator payload. */
|
|
82
|
+
build(): Evaluator;
|
|
83
|
+
}
|
|
84
|
+
export declare class EvaluatorManager {
|
|
85
|
+
private readonly connection;
|
|
86
|
+
constructor(connection: ConnectionManager);
|
|
87
|
+
/** Load an evaluator from a bundle. */
|
|
88
|
+
load(bundleId: number): Promise<unknown>;
|
|
89
|
+
/** Validate an evaluator structure. */
|
|
90
|
+
validate(evaluator: Evaluator): Promise<unknown>;
|
|
91
|
+
/** Apply an evaluator to a target artifact with criterion scores. */
|
|
92
|
+
evaluate(evaluatorBundleId: number, targetBundleId: number, scores: Array<{
|
|
93
|
+
criterionId: string;
|
|
94
|
+
score: number;
|
|
95
|
+
reasoning?: string;
|
|
96
|
+
}>): Promise<unknown>;
|
|
97
|
+
/** Compose two evaluators with custom weights. */
|
|
98
|
+
compose(bundleIdA: number, bundleIdB: number, weights?: {
|
|
99
|
+
a: number;
|
|
100
|
+
b: number;
|
|
101
|
+
}): Promise<unknown>;
|
|
102
|
+
/** Compare two evaluators. */
|
|
103
|
+
compare(bundleIdA: number, bundleIdB: number): Promise<unknown>;
|
|
104
|
+
/** Get evaluation history for an artifact. */
|
|
105
|
+
history(bundleId: number, limit?: number): Promise<unknown>;
|
|
106
|
+
/** Set an evaluator as a quality gate on a workspace. */
|
|
107
|
+
setGate(workspaceId: string, evaluatorBundleId: number, targetArtifactTypes: string[], minScore?: number): Promise<unknown>;
|
|
108
|
+
/** List quality gates for a workspace. */
|
|
109
|
+
listGates(workspaceId: string): Promise<unknown>;
|
|
110
|
+
/** Remove a quality gate. */
|
|
111
|
+
removeGate(workspaceId: string, evaluatorBundleId: number): Promise<unknown>;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=evaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../src/evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAMzD,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GACzB,cAAc,GAAG,cAAc,GAAG,gBAAgB,GAAG,QAAQ,CAAC;AAElE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;K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