@nookplot/runtime 0.5.72 → 0.5.74
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 +676 -12
- 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 +34 -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/cliques.d.ts +89 -0
- package/dist/cliques.d.ts.map +1 -0
- package/dist/cliques.js +102 -0
- package/dist/cliques.js.map +1 -0
- 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 +55 -4
- package/dist/signalActionMap.js.map +1 -1
- package/package.json +1 -1
package/dist/cro.d.ts
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
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
|
+
import type { ConnectionManager } from "./connection.js";
|
|
20
|
+
export type CRONodeType = "observation" | "hypothesis" | "evidence" | "inference" | "conclusion" | "counterargument" | "experiment" | "dead-end" | "open-question" | "external-input";
|
|
21
|
+
export type CROEdgeType = "supports" | "contradicts" | "refines" | "depends-on" | "enables" | "blocks" | "subsumes" | "analogous-to" | "derived-from" | "tested-by";
|
|
22
|
+
export interface CRONode {
|
|
23
|
+
id: string;
|
|
24
|
+
type: CRONodeType;
|
|
25
|
+
content: string;
|
|
26
|
+
confidence: number;
|
|
27
|
+
sources?: Array<{
|
|
28
|
+
type: "content-cid" | "bundle" | "url" | "agent" | "on-chain";
|
|
29
|
+
ref: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
}>;
|
|
32
|
+
metadata?: {
|
|
33
|
+
addedBy?: string;
|
|
34
|
+
addedAt?: string;
|
|
35
|
+
revisedFrom?: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface CROEdge {
|
|
39
|
+
from: string;
|
|
40
|
+
to: string;
|
|
41
|
+
type: CROEdgeType;
|
|
42
|
+
strength?: number;
|
|
43
|
+
explanation?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface CROConclusion {
|
|
46
|
+
statement: string;
|
|
47
|
+
confidence: number;
|
|
48
|
+
supportingNodes: string[];
|
|
49
|
+
}
|
|
50
|
+
export interface CROAlternative {
|
|
51
|
+
statement: string;
|
|
52
|
+
confidence: number;
|
|
53
|
+
conditions: string;
|
|
54
|
+
supportingNodes?: string[];
|
|
55
|
+
}
|
|
56
|
+
export interface CROSensitivity {
|
|
57
|
+
assumptionId: string;
|
|
58
|
+
ifChanged: string;
|
|
59
|
+
conclusionImpact: "unchanged" | "weakened" | "invalidated" | "reversed" | "strengthened";
|
|
60
|
+
newConfidence: number;
|
|
61
|
+
}
|
|
62
|
+
export interface CROAssumption {
|
|
63
|
+
id: string;
|
|
64
|
+
statement: string;
|
|
65
|
+
confidence: number;
|
|
66
|
+
basis?: string;
|
|
67
|
+
falsifiable?: boolean;
|
|
68
|
+
testMethod?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface CROConstraint {
|
|
71
|
+
id: string;
|
|
72
|
+
statement: string;
|
|
73
|
+
type: "hard" | "soft" | "preference";
|
|
74
|
+
source?: string;
|
|
75
|
+
weight?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface ReasoningObject {
|
|
78
|
+
context: {
|
|
79
|
+
domain: string;
|
|
80
|
+
goal: {
|
|
81
|
+
statement: string;
|
|
82
|
+
successCriteria?: string[];
|
|
83
|
+
scope?: {
|
|
84
|
+
includes?: string[];
|
|
85
|
+
excludes?: string[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
assumptions?: CROAssumption[];
|
|
89
|
+
constraints?: CROConstraint[];
|
|
90
|
+
};
|
|
91
|
+
graph: {
|
|
92
|
+
nodes: CRONode[];
|
|
93
|
+
edges: CROEdge[];
|
|
94
|
+
};
|
|
95
|
+
conclusions: {
|
|
96
|
+
primary: CROConclusion;
|
|
97
|
+
alternatives?: CROAlternative[];
|
|
98
|
+
sensitivity?: CROSensitivity[];
|
|
99
|
+
};
|
|
100
|
+
openItems?: {
|
|
101
|
+
questions?: Array<{
|
|
102
|
+
question: string;
|
|
103
|
+
valueOfResolution?: number;
|
|
104
|
+
suggestedApproach?: string;
|
|
105
|
+
relatedNodes?: string[];
|
|
106
|
+
}>;
|
|
107
|
+
blockedOn?: Array<{
|
|
108
|
+
description: string;
|
|
109
|
+
type: "data" | "computation" | "expertise" | "decision" | "external";
|
|
110
|
+
estimatedImpact?: number;
|
|
111
|
+
}>;
|
|
112
|
+
suggestedExperiments?: Array<{
|
|
113
|
+
description: string;
|
|
114
|
+
expectedOutcome?: string;
|
|
115
|
+
costEstimate?: string;
|
|
116
|
+
informationGain?: number;
|
|
117
|
+
}>;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export declare class CROBuilder {
|
|
121
|
+
private domain;
|
|
122
|
+
private goalStatement;
|
|
123
|
+
private successCriteria;
|
|
124
|
+
private scopeIncludes;
|
|
125
|
+
private scopeExcludes;
|
|
126
|
+
private assumptions;
|
|
127
|
+
private constraints;
|
|
128
|
+
private nodes;
|
|
129
|
+
private edges;
|
|
130
|
+
private primaryConclusion;
|
|
131
|
+
private alternatives;
|
|
132
|
+
private sensitivity;
|
|
133
|
+
private questions;
|
|
134
|
+
private blockers;
|
|
135
|
+
private experiments;
|
|
136
|
+
constructor(domain: string, goalStatement: string);
|
|
137
|
+
/** Add a success criterion for the goal. */
|
|
138
|
+
addCriterion(criterion: string): this;
|
|
139
|
+
/** Set scope boundaries. */
|
|
140
|
+
setScope(includes?: string[], excludes?: string[]): this;
|
|
141
|
+
/** Add an assumption with confidence. */
|
|
142
|
+
addAssumption(id: string, statement: string, confidence: number, opts?: {
|
|
143
|
+
basis?: string;
|
|
144
|
+
falsifiable?: boolean;
|
|
145
|
+
testMethod?: string;
|
|
146
|
+
}): this;
|
|
147
|
+
/** Add a constraint. */
|
|
148
|
+
addConstraint(id: string, statement: string, type: "hard" | "soft" | "preference", opts?: {
|
|
149
|
+
source?: string;
|
|
150
|
+
weight?: number;
|
|
151
|
+
}): this;
|
|
152
|
+
/** Add a reasoning node to the graph. */
|
|
153
|
+
addNode(node: CRONode): this;
|
|
154
|
+
/** Shortcut: add an observation node. */
|
|
155
|
+
observe(id: string, content: string, confidence: number): this;
|
|
156
|
+
/** Shortcut: add a hypothesis node. */
|
|
157
|
+
hypothesize(id: string, content: string, confidence: number): this;
|
|
158
|
+
/** Shortcut: add an evidence node. */
|
|
159
|
+
evidence(id: string, content: string, confidence: number): this;
|
|
160
|
+
/** Shortcut: add an inference node. */
|
|
161
|
+
infer(id: string, content: string, confidence: number): this;
|
|
162
|
+
/** Shortcut: add a counterargument node. */
|
|
163
|
+
counter(id: string, content: string, confidence: number): this;
|
|
164
|
+
/** Shortcut: mark a dead end. */
|
|
165
|
+
deadEnd(id: string, content: string): this;
|
|
166
|
+
/** Add an edge (relationship) between two nodes. */
|
|
167
|
+
addEdge(from: string, to: string, type: CROEdgeType, strength?: number, explanation?: string): this;
|
|
168
|
+
/** Shortcut: node A supports node B. */
|
|
169
|
+
supports(from: string, to: string, strength?: number): this;
|
|
170
|
+
/** Shortcut: node A contradicts node B. */
|
|
171
|
+
contradicts(from: string, to: string, strength?: number): this;
|
|
172
|
+
/** Shortcut: node A refines node B. */
|
|
173
|
+
refines(from: string, to: string, strength?: number): this;
|
|
174
|
+
/** Shortcut: node A depends on node B. */
|
|
175
|
+
dependsOn(from: string, to: string): this;
|
|
176
|
+
/** Set the primary conclusion. */
|
|
177
|
+
conclude(statement: string, confidence: number, supportingNodes: string[]): this;
|
|
178
|
+
/** Add an alternative conclusion. */
|
|
179
|
+
alternative(statement: string, confidence: number, conditions: string, supportingNodes?: string[]): this;
|
|
180
|
+
/** Add a sensitivity analysis entry. */
|
|
181
|
+
addSensitivity(assumptionId: string, ifChanged: string, impact: CROSensitivity["conclusionImpact"], newConfidence: number): this;
|
|
182
|
+
/** Add an open question. */
|
|
183
|
+
addQuestion(question: string, opts?: {
|
|
184
|
+
value?: number;
|
|
185
|
+
approach?: string;
|
|
186
|
+
nodes?: string[];
|
|
187
|
+
}): this;
|
|
188
|
+
/** Add a blocker. */
|
|
189
|
+
addBlocker(description: string, type: "data" | "computation" | "expertise" | "decision" | "external", impact?: number): this;
|
|
190
|
+
/** Add a suggested experiment. */
|
|
191
|
+
addExperiment(description: string, opts?: {
|
|
192
|
+
expected?: string;
|
|
193
|
+
cost?: string;
|
|
194
|
+
infoGain?: number;
|
|
195
|
+
}): this;
|
|
196
|
+
/** Build the ReasoningObject. Throws if primary conclusion is missing. */
|
|
197
|
+
build(): ReasoningObject;
|
|
198
|
+
}
|
|
199
|
+
export declare class CROManager {
|
|
200
|
+
private readonly connection;
|
|
201
|
+
constructor(connection: ConnectionManager);
|
|
202
|
+
/**
|
|
203
|
+
* Load a validated CRO from a bundle.
|
|
204
|
+
*/
|
|
205
|
+
load(bundleId: number): Promise<unknown>;
|
|
206
|
+
/**
|
|
207
|
+
* Get a human-readable summary of a CRO.
|
|
208
|
+
*/
|
|
209
|
+
summarize(bundleId: number): Promise<{
|
|
210
|
+
bundleId: number;
|
|
211
|
+
summary: string;
|
|
212
|
+
}>;
|
|
213
|
+
/**
|
|
214
|
+
* Validate a CRO structure without creating a bundle.
|
|
215
|
+
*/
|
|
216
|
+
validate(cro: ReasoningObject): Promise<unknown>;
|
|
217
|
+
/**
|
|
218
|
+
* Diff two CRO bundles.
|
|
219
|
+
*/
|
|
220
|
+
diff(bundleIdA: number, bundleIdB: number): Promise<unknown>;
|
|
221
|
+
/**
|
|
222
|
+
* Merge two CRO bundles (returns merged CRO payload, does not create a bundle).
|
|
223
|
+
*/
|
|
224
|
+
merge(bundleIdA: number, bundleIdB: number, strategy?: "union" | "prefer-a" | "prefer-b" | "highest-confidence"): Promise<unknown>;
|
|
225
|
+
/**
|
|
226
|
+
* Extend a CRO with new nodes and edges (returns extended payload).
|
|
227
|
+
*/
|
|
228
|
+
extend(bundleId: number, nodes: CRONode[], edges?: CROEdge[]): Promise<unknown>;
|
|
229
|
+
/**
|
|
230
|
+
* Send a message with artifact references attached.
|
|
231
|
+
*/
|
|
232
|
+
sendMessageWithArtifacts(channelId: string, content: string, artifacts: Array<{
|
|
233
|
+
bundleId: number;
|
|
234
|
+
artifactType?: string;
|
|
235
|
+
relationship?: string;
|
|
236
|
+
nodeHighlights?: string[];
|
|
237
|
+
summary?: string;
|
|
238
|
+
}>, opts?: {
|
|
239
|
+
messageType?: string;
|
|
240
|
+
metadata?: Record<string, unknown>;
|
|
241
|
+
}): Promise<unknown>;
|
|
242
|
+
}
|
|
243
|
+
//# sourceMappingURL=cro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cro.d.ts","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;IAIlE;;OAEG;IACG,KAAK,CACT,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,GAAE,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,oBAA8B,GAC3E,OAAO,CAAC,OAAO,CAAC;IAQnB;;OAEG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrF;;OAEG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,KAAK,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC,EACF,IAAI,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAClE,OAAO,CAAC,OAAO,CAAC;CAQpB"}
|
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;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I,MAAM;YACxC,QAAQ,EAAE,IAAI,EAAE,QAAQ;YACxB,SAAS;SACV,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
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
|