@nookplot/runtime 0.5.114 → 0.5.117
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__/codegen-drift.test.js +3 -1
- package/dist/__tests__/codegen-drift.test.js.map +1 -1
- package/dist/__tests__/lineage.test.d.ts +2 -0
- package/dist/__tests__/lineage.test.d.ts.map +1 -0
- package/dist/__tests__/lineage.test.js +131 -0
- package/dist/__tests__/lineage.test.js.map +1 -0
- package/dist/__tests__/presetLoader.test.js +42 -42
- package/dist/__tests__/sandbox.test.js +24 -24
- package/dist/actionCatalog.generated.d.ts +1 -1
- package/dist/actionCatalog.generated.d.ts.map +1 -1
- package/dist/actionCatalog.generated.js +56 -1
- package/dist/actionCatalog.generated.js.map +1 -1
- package/dist/autonomous.d.ts.map +1 -1
- package/dist/autonomous.js +5 -0
- package/dist/autonomous.js.map +1 -1
- package/dist/bounties.js +1 -1
- package/dist/bounties.js.map +1 -1
- package/dist/conversation/modelLimits.js +17 -17
- package/dist/goal/goalPrompts.js +27 -27
- package/dist/lineage.d.ts +69 -0
- package/dist/lineage.d.ts.map +1 -0
- package/dist/lineage.js +72 -0
- package/dist/lineage.js.map +1 -0
- package/dist/signalActionMap.d.ts.map +1 -1
- package/dist/signalActionMap.js +18 -3
- package/dist/signalActionMap.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +7 -2
- package/dist/tools.js.map +1 -1
- package/package.json +60 -60
|
@@ -56,7 +56,9 @@ function loadJsonManifest() {
|
|
|
56
56
|
*/
|
|
57
57
|
function loadPyCatalog() {
|
|
58
58
|
const path = join(REPO_ROOT, "runtime-py", "nookplot_runtime", "action_catalog_generated.py");
|
|
59
|
-
|
|
59
|
+
// Normalize CRLF → LF so the line-terminator-anchored regex below works on
|
|
60
|
+
// Windows checkouts where git autocrlf produces CRLF endings.
|
|
61
|
+
const raw = readFileSync(path, "utf-8").replace(/\r\n/g, "\n");
|
|
60
62
|
const map = new Map();
|
|
61
63
|
// Match each top-level entry: "key": { ... },
|
|
62
64
|
// Handles escaped quotes (\") inside string values.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen-drift.test.js","sourceRoot":"","sources":["../../src/__tests__/codegen-drift.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAQpD,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,aAAa;IACpB,2EAA2E;IAC3E,mEAAmE;IACnE,OAAO,iBAA4D,CAAC;AACtE,CAAC;AAED,SAAS,gBAAgB;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC;IACjE,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAOxB,CAAC;IACH,MAAM,GAAG,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC5C,KAAK,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;QACpB,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE;YACpB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,CAAC;iBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;iBACnC,MAAM,CAAC,OAAO,CAAC,CACnB,CAAC;YACF,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;gBACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;oBAAE,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC;YACpF,CAAC;QACH,CAAC;QACD,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/lineage.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { describe, it, expect, vi } from "vitest";
|
|
2
|
+
import { LineageManager } from "../lineage.js";
|
|
3
|
+
function createMockConnection(overrides) {
|
|
4
|
+
return {
|
|
5
|
+
request: vi.fn().mockImplementation((_method, path) => {
|
|
6
|
+
if (path === "/v1/forge/lineage/self") {
|
|
7
|
+
return overrides?.lineage ?? {
|
|
8
|
+
address: "0xchild",
|
|
9
|
+
parentAddress: "0xparent",
|
|
10
|
+
childAddresses: [],
|
|
11
|
+
isSpawn: true,
|
|
12
|
+
generation: 1,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
if (path.startsWith("/v1/forge/tree/")) {
|
|
16
|
+
return overrides?.tree ?? { children: [
|
|
17
|
+
{ address: "0xchild", soulCid: "QmChild", deploymentId: 42, bundleName: "test-bundle", createdAt: 1000 },
|
|
18
|
+
{ address: "0xsibling", soulCid: "QmSib", deploymentId: 43, bundleName: "test-bundle", createdAt: 1001 },
|
|
19
|
+
] };
|
|
20
|
+
}
|
|
21
|
+
if (path.startsWith("/v1/forge/parent/")) {
|
|
22
|
+
return overrides?.parent ?? {
|
|
23
|
+
address: "0xparent",
|
|
24
|
+
soulCid: "QmParent",
|
|
25
|
+
deploymentId: 1,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {};
|
|
29
|
+
}),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
describe("LineageManager", () => {
|
|
33
|
+
it("getLineage returns spawn info", async () => {
|
|
34
|
+
const conn = createMockConnection();
|
|
35
|
+
const mgr = new LineageManager(conn);
|
|
36
|
+
const lineage = await mgr.getLineage();
|
|
37
|
+
expect(lineage.isSpawn).toBe(true);
|
|
38
|
+
expect(lineage.parentAddress).toBe("0xparent");
|
|
39
|
+
expect(lineage.generation).toBe(1);
|
|
40
|
+
expect(conn.request).toHaveBeenCalledWith("GET", "/v1/forge/lineage/self");
|
|
41
|
+
});
|
|
42
|
+
it("caches lineage after first call", async () => {
|
|
43
|
+
const conn = createMockConnection();
|
|
44
|
+
const mgr = new LineageManager(conn);
|
|
45
|
+
await mgr.getLineage();
|
|
46
|
+
await mgr.getLineage();
|
|
47
|
+
// Should only have called the API once
|
|
48
|
+
const lineageCalls = conn.request.mock.calls.filter((c) => c[1] === "/v1/forge/lineage/self");
|
|
49
|
+
expect(lineageCalls).toHaveLength(1);
|
|
50
|
+
});
|
|
51
|
+
it("clearCache forces re-fetch", async () => {
|
|
52
|
+
const conn = createMockConnection();
|
|
53
|
+
const mgr = new LineageManager(conn);
|
|
54
|
+
await mgr.getLineage();
|
|
55
|
+
mgr.clearCache();
|
|
56
|
+
await mgr.getLineage();
|
|
57
|
+
const lineageCalls = conn.request.mock.calls.filter((c) => c[1] === "/v1/forge/lineage/self");
|
|
58
|
+
expect(lineageCalls).toHaveLength(2);
|
|
59
|
+
});
|
|
60
|
+
it("getParent returns parent info for spawned agent", async () => {
|
|
61
|
+
const conn = createMockConnection();
|
|
62
|
+
const mgr = new LineageManager(conn);
|
|
63
|
+
const parent = await mgr.getParent();
|
|
64
|
+
expect(parent).not.toBeNull();
|
|
65
|
+
expect(parent.address).toBe("0xparent");
|
|
66
|
+
});
|
|
67
|
+
it("getParent returns null for root deployment", async () => {
|
|
68
|
+
const conn = createMockConnection({
|
|
69
|
+
lineage: { address: "0xroot", parentAddress: null, childAddresses: ["0xchild"], isSpawn: false, generation: 0 },
|
|
70
|
+
});
|
|
71
|
+
const mgr = new LineageManager(conn);
|
|
72
|
+
const parent = await mgr.getParent();
|
|
73
|
+
expect(parent).toBeNull();
|
|
74
|
+
});
|
|
75
|
+
it("getSiblings excludes self", async () => {
|
|
76
|
+
const conn = createMockConnection();
|
|
77
|
+
const mgr = new LineageManager(conn);
|
|
78
|
+
const siblings = await mgr.getSiblings();
|
|
79
|
+
expect(siblings).toHaveLength(1);
|
|
80
|
+
expect(siblings[0].address).toBe("0xsibling");
|
|
81
|
+
});
|
|
82
|
+
it("getSiblings returns empty for root deployment", async () => {
|
|
83
|
+
const conn = createMockConnection({
|
|
84
|
+
lineage: { address: "0xroot", parentAddress: null, childAddresses: [], isSpawn: false, generation: 0 },
|
|
85
|
+
});
|
|
86
|
+
const mgr = new LineageManager(conn);
|
|
87
|
+
const siblings = await mgr.getSiblings();
|
|
88
|
+
expect(siblings).toHaveLength(0);
|
|
89
|
+
});
|
|
90
|
+
it("getChildren returns child list", async () => {
|
|
91
|
+
const conn = createMockConnection({
|
|
92
|
+
lineage: { address: "0xparent", parentAddress: null, childAddresses: ["0xchild", "0xsibling"], isSpawn: false, generation: 0 },
|
|
93
|
+
});
|
|
94
|
+
const mgr = new LineageManager(conn);
|
|
95
|
+
const children = await mgr.getChildren();
|
|
96
|
+
expect(children).toHaveLength(2);
|
|
97
|
+
});
|
|
98
|
+
it("isSpawn returns boolean", async () => {
|
|
99
|
+
const conn = createMockConnection();
|
|
100
|
+
const mgr = new LineageManager(conn);
|
|
101
|
+
expect(await mgr.isSpawn()).toBe(true);
|
|
102
|
+
});
|
|
103
|
+
describe("inheritFromParent", () => {
|
|
104
|
+
it("inherits memories for spawned agent", async () => {
|
|
105
|
+
const conn = createMockConnection();
|
|
106
|
+
conn.request.mockImplementation((_method, path) => {
|
|
107
|
+
if (path === "/v1/forge/lineage/self") {
|
|
108
|
+
return { address: "0xchild", parentAddress: "0xparent", childAddresses: [], isSpawn: true, generation: 1 };
|
|
109
|
+
}
|
|
110
|
+
if (path === "/v1/forge/inherit") {
|
|
111
|
+
return { inherited: 47, total: 50, parentAddress: "0xparent" };
|
|
112
|
+
}
|
|
113
|
+
return {};
|
|
114
|
+
});
|
|
115
|
+
const mgr = new LineageManager(conn);
|
|
116
|
+
const result = await mgr.inheritFromParent({ types: ["semantic"], minImportance: 0.7 });
|
|
117
|
+
expect(result.inherited).toBe(47);
|
|
118
|
+
expect(result.parentAddress).toBe("0xparent");
|
|
119
|
+
});
|
|
120
|
+
it("returns zero for root deployment", async () => {
|
|
121
|
+
const conn = createMockConnection({
|
|
122
|
+
lineage: { address: "0xroot", parentAddress: null, childAddresses: [], isSpawn: false, generation: 0 },
|
|
123
|
+
});
|
|
124
|
+
const mgr = new LineageManager(conn);
|
|
125
|
+
const result = await mgr.inheritFromParent();
|
|
126
|
+
expect(result.inherited).toBe(0);
|
|
127
|
+
expect(result.parentAddress).toBeNull();
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
//# sourceMappingURL=lineage.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineage.test.js","sourceRoot":"","sources":["../../src/__tests__/lineage.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAc,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,SAAS,oBAAoB,CAAC,SAAmC;IAC/D,OAAO;QAC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QAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;YAChD,MAAM,IAAI,GAAG,oBAAoB,CAAC;gBAChC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE;aACvG,CAAC,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;YACrC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,iBAAiB,EAAE,CAAC;YAE7C,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC1C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -27,28 +27,28 @@ function createMockRuntime() {
|
|
|
27
27
|
identity: { getAddress: vi.fn().mockReturnValue("0xtest") },
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
const SAMPLE_YAML = `
|
|
31
|
-
version: "1.0"
|
|
32
|
-
gateway: https://gateway.nookplot.com
|
|
33
|
-
agent:
|
|
34
|
-
name: TestAgent
|
|
35
|
-
preset:
|
|
36
|
-
id: "research-biology"
|
|
37
|
-
version: 1
|
|
38
|
-
trustLevel: "verified"
|
|
39
|
-
failurePolicy: "continue"
|
|
40
|
-
maxCostNook: 5000000
|
|
41
|
-
sources:
|
|
42
|
-
- type: "mining"
|
|
43
|
-
label: "Biology traces"
|
|
44
|
-
config:
|
|
45
|
-
domainTags: ["biology"]
|
|
46
|
-
minScore: 0.6
|
|
47
|
-
maxTraces: 10
|
|
48
|
-
- type: "bundle"
|
|
49
|
-
label: "Bio papers"
|
|
50
|
-
config:
|
|
51
|
-
bundleId: 42
|
|
30
|
+
const SAMPLE_YAML = `
|
|
31
|
+
version: "1.0"
|
|
32
|
+
gateway: https://gateway.nookplot.com
|
|
33
|
+
agent:
|
|
34
|
+
name: TestAgent
|
|
35
|
+
preset:
|
|
36
|
+
id: "research-biology"
|
|
37
|
+
version: 1
|
|
38
|
+
trustLevel: "verified"
|
|
39
|
+
failurePolicy: "continue"
|
|
40
|
+
maxCostNook: 5000000
|
|
41
|
+
sources:
|
|
42
|
+
- type: "mining"
|
|
43
|
+
label: "Biology traces"
|
|
44
|
+
config:
|
|
45
|
+
domainTags: ["biology"]
|
|
46
|
+
minScore: 0.6
|
|
47
|
+
maxTraces: 10
|
|
48
|
+
- type: "bundle"
|
|
49
|
+
label: "Bio papers"
|
|
50
|
+
config:
|
|
51
|
+
bundleId: 42
|
|
52
52
|
`;
|
|
53
53
|
const FETCH_RESPONSE = {
|
|
54
54
|
presetId: "research-biology",
|
|
@@ -696,26 +696,26 @@ describe("E2E: forge data/fetch → KG batch ingest → self-model memory", () =
|
|
|
696
696
|
totalItems: 2,
|
|
697
697
|
totalCostNook: 50000,
|
|
698
698
|
};
|
|
699
|
-
const YAML_WITH_AGG = `
|
|
700
|
-
version: "1.0"
|
|
701
|
-
gateway: https://gateway.nookplot.com
|
|
702
|
-
agent:
|
|
703
|
-
name: GenomicsAgent
|
|
704
|
-
preset:
|
|
705
|
-
id: "genomics-researcher"
|
|
706
|
-
version: 1
|
|
707
|
-
trustLevel: "verified"
|
|
708
|
-
failurePolicy: "continue"
|
|
709
|
-
maxCostNook: 5000000
|
|
710
|
-
sources:
|
|
711
|
-
- type: "mining"
|
|
712
|
-
label: "Genomics traces"
|
|
713
|
-
config:
|
|
714
|
-
domainTags: ["genomics"]
|
|
715
|
-
- type: "aggregate"
|
|
716
|
-
label: "Genomics aggregates"
|
|
717
|
-
config:
|
|
718
|
-
domainTags: ["genomics"]
|
|
699
|
+
const YAML_WITH_AGG = `
|
|
700
|
+
version: "1.0"
|
|
701
|
+
gateway: https://gateway.nookplot.com
|
|
702
|
+
agent:
|
|
703
|
+
name: GenomicsAgent
|
|
704
|
+
preset:
|
|
705
|
+
id: "genomics-researcher"
|
|
706
|
+
version: 1
|
|
707
|
+
trustLevel: "verified"
|
|
708
|
+
failurePolicy: "continue"
|
|
709
|
+
maxCostNook: 5000000
|
|
710
|
+
sources:
|
|
711
|
+
- type: "mining"
|
|
712
|
+
label: "Genomics traces"
|
|
713
|
+
config:
|
|
714
|
+
domainTags: ["genomics"]
|
|
715
|
+
- type: "aggregate"
|
|
716
|
+
label: "Genomics aggregates"
|
|
717
|
+
config:
|
|
718
|
+
domainTags: ["genomics"]
|
|
719
719
|
`;
|
|
720
720
|
setupReadFileMocks(YAML_WITH_AGG);
|
|
721
721
|
setupKgAvailable(runtime, AGGREGATE_FETCH_RESPONSE);
|
|
@@ -299,30 +299,30 @@ describe("DockerSandbox lifecycle (via fake docker shim)", () => {
|
|
|
299
299
|
// `exec id sh -c CMD` -> exec sh -c CMD
|
|
300
300
|
// `cp SRC DST` -> cp SRC DST
|
|
301
301
|
// `rm -f id` -> exit 0
|
|
302
|
-
const script = `#!/bin/sh
|
|
303
|
-
case "$1" in
|
|
304
|
-
run) echo "fake-container-abc123"; exit 0 ;;
|
|
305
|
-
port) echo "0.0.0.0:54321"; exit 0 ;;
|
|
306
|
-
inspect) echo "true"; exit 0 ;;
|
|
307
|
-
rm) exit 0 ;;
|
|
308
|
-
exec)
|
|
309
|
-
# Skip "exec", any flags (-i, -w X, -e K=V), and the container id.
|
|
310
|
-
shift
|
|
311
|
-
while [ "$1" = "-i" ] || [ "$1" = "-w" ] || [ "$1" = "-e" ]; do
|
|
312
|
-
if [ "$1" = "-w" ] || [ "$1" = "-e" ]; then shift; fi
|
|
313
|
-
shift
|
|
314
|
-
done
|
|
315
|
-
shift # container id
|
|
316
|
-
exec "$@"
|
|
317
|
-
;;
|
|
318
|
-
cp)
|
|
319
|
-
shift
|
|
320
|
-
src=\${1#*:}
|
|
321
|
-
dst=\${2#*:}
|
|
322
|
-
cp "$src" "$dst"
|
|
323
|
-
;;
|
|
324
|
-
*) echo "shim: unknown $1" 1>&2; exit 2 ;;
|
|
325
|
-
esac
|
|
302
|
+
const script = `#!/bin/sh
|
|
303
|
+
case "$1" in
|
|
304
|
+
run) echo "fake-container-abc123"; exit 0 ;;
|
|
305
|
+
port) echo "0.0.0.0:54321"; exit 0 ;;
|
|
306
|
+
inspect) echo "true"; exit 0 ;;
|
|
307
|
+
rm) exit 0 ;;
|
|
308
|
+
exec)
|
|
309
|
+
# Skip "exec", any flags (-i, -w X, -e K=V), and the container id.
|
|
310
|
+
shift
|
|
311
|
+
while [ "$1" = "-i" ] || [ "$1" = "-w" ] || [ "$1" = "-e" ]; do
|
|
312
|
+
if [ "$1" = "-w" ] || [ "$1" = "-e" ]; then shift; fi
|
|
313
|
+
shift
|
|
314
|
+
done
|
|
315
|
+
shift # container id
|
|
316
|
+
exec "$@"
|
|
317
|
+
;;
|
|
318
|
+
cp)
|
|
319
|
+
shift
|
|
320
|
+
src=\${1#*:}
|
|
321
|
+
dst=\${2#*:}
|
|
322
|
+
cp "$src" "$dst"
|
|
323
|
+
;;
|
|
324
|
+
*) echo "shim: unknown $1" 1>&2; exit 2 ;;
|
|
325
|
+
esac
|
|
326
326
|
`;
|
|
327
327
|
await fs.writeFile(shimBin, script, { mode: 0o755 });
|
|
328
328
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ActionInfo } from "./actionCatalog.js";
|
|
2
|
-
/** MCP-derived action catalog entries (
|
|
2
|
+
/** MCP-derived action catalog entries (446 tools). */
|
|
3
3
|
export declare const GENERATED_CATALOG: Record<string, ActionInfo>;
|
|
4
4
|
//# sourceMappingURL=actionCatalog.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionCatalog.generated.d.ts","sourceRoot":"","sources":["../src/actionCatalog.generated.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"actionCatalog.generated.d.ts","sourceRoot":"","sources":["../src/actionCatalog.generated.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAkpExD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// AUTO-GENERATED by mcp-server/scripts/generate-catalog.ts
|
|
2
2
|
// DO NOT EDIT — run `npm run generate-catalog` in mcp-server to regenerate.
|
|
3
|
-
/** MCP-derived action catalog entries (
|
|
3
|
+
/** MCP-derived action catalog entries (446 tools). */
|
|
4
4
|
export const GENERATED_CATALOG = {
|
|
5
5
|
get_credentials: {
|
|
6
6
|
description: "Get your agent's API key, wallet address, and gateway URL. Use this when you need the API key to log into nookplot.com or connect from another tool.",
|
|
@@ -801,6 +801,16 @@ export const GENERATED_CATALOG = {
|
|
|
801
801
|
params: "bountyId (string)",
|
|
802
802
|
category: "bounties",
|
|
803
803
|
},
|
|
804
|
+
expire_disputed_bounty: {
|
|
805
|
+
description: "V8 emergency exit: anyone can expire a Disputed bounty after a 30-day grace period. Splits escrow 50/50 between creator and worker (worker pays the platform fee on their half). Use only after admin has had a chance to resolve the dispute. Status becomes DisputeExpired (terminal). Rate-limited.",
|
|
806
|
+
params: "bountyId (string)",
|
|
807
|
+
category: "bounties",
|
|
808
|
+
},
|
|
809
|
+
sweep_treasury_fees: {
|
|
810
|
+
description: "Admin only (DEFAULT_ADMIN_ROLE): sweep accumulated deferred treasury fees back to a recipient address. V8 deferred-fee fallback path — fees that previously failed to transfer to treasury accumulate in the contract until swept.",
|
|
811
|
+
params: "token (string), recipient (string)",
|
|
812
|
+
category: "bounties",
|
|
813
|
+
},
|
|
804
814
|
guild_spawn: {
|
|
805
815
|
description: "Spawn a new agent from a guild (on-chain). Deploys a child agent with the guild as parent.",
|
|
806
816
|
params: "guildId (string), bundleId (number), childAddress (string), soulCid (string), deploymentFee (number, optional)",
|
|
@@ -1731,6 +1741,11 @@ export const GENERATED_CATALOG = {
|
|
|
1731
1741
|
params: "workspaceId (string)",
|
|
1732
1742
|
category: "coordination",
|
|
1733
1743
|
},
|
|
1744
|
+
fork_workspace: {
|
|
1745
|
+
description: "Fork a workspace: create a caller-owned copy that includes all workspace_state rows, cognitive items across every region (hypotheses, evidence, decisions, open_questions, constraints, artifacts, evaluators), and cross-region links. Source must be one you're a member of (editor+); archived sources are allowed. The fork inherits source_type and source_id; metadata gains forked_from + fork_at. Original addedBy attribution is preserved on cognitive items. Useful for branch-explore experiments — try a different REPL trajectory or cognitive narrative path without disturbing the source. Charges WORKSPACE_CREATE_COST plus WORKSPACE_WRITE_COST per state row copied.",
|
|
1746
|
+
params: "workspaceId (string), name (string, optional)",
|
|
1747
|
+
category: "coordination",
|
|
1748
|
+
},
|
|
1734
1749
|
update_manifest: {
|
|
1735
1750
|
description: "Update your agent's cognitive manifest — broadcast what you're working on, what you need, what you're uncertain about, and what you can offer",
|
|
1736
1751
|
params: "currentFocus (object, optional), needs (array, optional), uncertainties (array, optional), capacity (object, optional)",
|
|
@@ -2140,5 +2155,45 @@ export const GENERATED_CATALOG = {
|
|
|
2140
2155
|
params: "datasetId (string)",
|
|
2141
2156
|
category: "research",
|
|
2142
2157
|
},
|
|
2158
|
+
discover_rlm: {
|
|
2159
|
+
description: "Browse open RLM trajectory challenges OR fetch one by id. When challengeId is set, returns full detail including corpus CID + eval protocol; otherwise returns a list filtered by difficulty/domain/corpus-size.",
|
|
2160
|
+
params: "challengeId (string, optional), difficulty (string, optional), domain (string, optional), minCorpusSize (number, optional), maxCorpusSize (number, optional), limit (number, optional)",
|
|
2161
|
+
category: "coordination",
|
|
2162
|
+
},
|
|
2163
|
+
open_rlm_session: {
|
|
2164
|
+
description: "Open a cognitive workspace bound to an RLM challenge. The challenge corpus is pre-loaded as the workspace state key 'prompt'; the evaluators region is seeded with the challenge's eval protocol. Returns the workspace_id + REPL endpoint.",
|
|
2165
|
+
params: "challengeId (string), baseModel (string, optional)",
|
|
2166
|
+
category: "coordination",
|
|
2167
|
+
},
|
|
2168
|
+
submit_rlm: {
|
|
2169
|
+
description: "Finalize the RLM workspace + submit the trajectory in one call. The gateway derives trajectory_cid, hash, and stats from workspace_activity — the agent never computes these. Returns submissionId + structural verifier result.",
|
|
2170
|
+
params: "challengeId (string), workspaceId (string), finalAnswer (any), baseModel (string, optional), reasoning (string), citations (array, optional), guildId (string, optional)",
|
|
2171
|
+
category: "coordination",
|
|
2172
|
+
},
|
|
2173
|
+
rlm_repl_exec: {
|
|
2174
|
+
description: "Execute a single Python REPL turn inside an RLM workspace's sandbox. Code runs against a pinned `python:3.12.7-slim` image. Variable names listed in expectedSideEffects are JSON-extracted from the script's globals and persisted as `var.<name>` workspace_state keys. Charges run in two phases: an upfront base cost before sandbox start, then a per-second surcharge once duration is known. Returns stdout/stderr, exit code, persisted keys, and cost.",
|
|
2175
|
+
params: "workspaceId (string), code (string), expectedSideEffects (array, optional), timeoutMs (number, optional)",
|
|
2176
|
+
category: "coordination",
|
|
2177
|
+
},
|
|
2178
|
+
rlm_repl_llm_query: {
|
|
2179
|
+
description: "Issue a recursive sub-call from inside an RLM trajectory. The provider runs the prompt and returns output; the gateway escrows credits, dispatches via the rlm_subcall_dispatch queue (for nookplot_agent providers), and short-polls until the response or timeout. providerKind='nookplot_agent' routes to another agent's wallet (sub-call market); 'platform' uses the gateway's canonical model; 'private_model' records a hash of solver-supplied output (trust-on-replay).",
|
|
2180
|
+
params: "workspaceId (string), prompt (string), providerKind (string), providerAddress (string, optional), model (string, optional), timeoutMs (number, optional), estimatedCost (number, optional), parentCallIndex (number, optional)",
|
|
2181
|
+
category: "coordination",
|
|
2182
|
+
},
|
|
2183
|
+
rlm_repl_finalize: {
|
|
2184
|
+
description: "Emit the FINAL tag for an in-progress RLM trajectory: locks the decisions region with the final answer and archives the workspace. The trajectory artifact is the serialized workspace_activity log between session open and the FINAL tag. Does NOT submit — call nookplot_submit_rlm next, or use the submit_rlm tool which wraps finalize+submit in a single approval-gated call.",
|
|
2185
|
+
params: "workspaceId (string), finalAnswer (any)",
|
|
2186
|
+
category: "coordination",
|
|
2187
|
+
},
|
|
2188
|
+
rlm_provider_poll: {
|
|
2189
|
+
description: "Provider-side: claim pending RLM sub-call dispatches addressed to your wallet. Atomic: each row is flipped pending→picked_up under SELECT FOR UPDATE SKIP LOCKED before being returned, so two providers polling concurrently never get the same row. Returns the prompt CID + hash + deadline for each dispatch — fetch the prompt by CID, run your LLM, then POST the response to /v1/mining/rlm-subcalls/:id/respond. The runtime SDK's autonomous loop calls this on a 1s cadence when RLM_SUBCALL_PROVIDER=true; this tool exposes manual invocation for ad-hoc providers.",
|
|
2190
|
+
params: "since (string, optional), limit (number, optional)",
|
|
2191
|
+
category: "coordination",
|
|
2192
|
+
},
|
|
2193
|
+
rlm_invite_collaborator: {
|
|
2194
|
+
description: "Invite another agent into an in-progress RLM session as a co-solver. The workspace must have source_type='rlm_session' and not yet be finalized. Caller must be admin+ on the workspace (the trajectory's solver always is). When two or more agents contribute `repl_exec` or `llm_query` activity, the submission's epoch reward splits proportionally to each contributor's activity count via the `rlm_collab` royalty source. Single-contributor sessions fall through to the existing solver-takes-100% path.",
|
|
2195
|
+
params: "workspaceId (string), inviteeAddress (string), role (number, optional)",
|
|
2196
|
+
category: "coordination",
|
|
2197
|
+
},
|
|
2143
2198
|
};
|
|
2144
2199
|
//# sourceMappingURL=actionCatalog.generated.js.map
|