@gendo-cash/agent 0.1.0 → 0.1.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/dist/main.mjs +12 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +14 -5
package/dist/main.mjs
CHANGED
|
@@ -8806,6 +8806,15 @@ async function connect(cfg) {
|
|
|
8806
8806
|
}
|
|
8807
8807
|
return lucid;
|
|
8808
8808
|
}
|
|
8809
|
+
function withProjectIdHeader(fetchFn, base) {
|
|
8810
|
+
return ((input2, init) => {
|
|
8811
|
+
const url2 = typeof input2 === "string" ? input2 : input2 instanceof URL ? input2.href : input2.url;
|
|
8812
|
+
if (!url2.startsWith(base) || !init?.headers) return fetchFn(input2, init);
|
|
8813
|
+
const headers = Object.fromEntries(new Headers(init.headers).entries());
|
|
8814
|
+
if (headers.project_id) headers["x-project-id"] = headers.project_id;
|
|
8815
|
+
return fetchFn(input2, { ...init, headers });
|
|
8816
|
+
});
|
|
8817
|
+
}
|
|
8809
8818
|
|
|
8810
8819
|
// ../sdk/src/core/idempotency.ts
|
|
8811
8820
|
import { CML as CML7 } from "@lucid-evolution/lucid";
|
|
@@ -38501,6 +38510,7 @@ function registerTools(server2, session2, onResult2) {
|
|
|
38501
38510
|
// src/chain.ts
|
|
38502
38511
|
async function openChain(server2, network, token) {
|
|
38503
38512
|
const base = `${server2.replace(/\/$/, "")}/chain`;
|
|
38513
|
+
globalThis.fetch = withProjectIdHeader(globalThis.fetch, base);
|
|
38504
38514
|
if (network === "Custom") {
|
|
38505
38515
|
const g = await (await fetch(`${base}/genesis`)).json();
|
|
38506
38516
|
SLOT_CONFIG_NETWORK2.Custom = { zeroTime: g.system_start * 1e3, zeroSlot: 0, slotLength: g.slot_length * 1e3 };
|
|
@@ -38830,13 +38840,13 @@ async function refresh() {
|
|
|
38830
38840
|
var tick = () => opening ??= refresh().catch((e) => void (conn = { status: "error", message: e.message })).finally(() => opening = void 0);
|
|
38831
38841
|
var onResult = (r) => {
|
|
38832
38842
|
const x = r;
|
|
38833
|
-
if (x.status === "blocked" && /not allowed|bad agent token|\b401\b/i.test(`${x.reason ?? ""} ${x.code ?? ""}`)) {
|
|
38843
|
+
if (x.status === "blocked" && /not allowed|bad agent token|doesn't recognize this agent's token|\b401\b/i.test(`${x.reason ?? ""} ${x.code ?? ""}`)) {
|
|
38834
38844
|
session = void 0;
|
|
38835
38845
|
needToken = true;
|
|
38836
38846
|
}
|
|
38837
38847
|
};
|
|
38838
38848
|
var server = new McpServer(
|
|
38839
|
-
{ name: "gendo", version: "0.1.
|
|
38849
|
+
{ name: "gendo", version: "0.1.1" },
|
|
38840
38850
|
{
|
|
38841
38851
|
instructions: [
|
|
38842
38852
|
"You pay from a gendo allowance: an on-chain budget the vault owners gave you on Cardano (preprod).",
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gendo-cash/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@gendo-cash/agent",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@lucid-evolution/lucid": "0.6.5"
|
package/package.json
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gendo-cash/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Connect an AI agent to a gendo budget: an MCP server with its own key, paired from the gendo app.",
|
|
7
|
-
"bin": {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
7
|
+
"bin": {
|
|
8
|
+
"gendo-agent": "dist/main.mjs"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"npm-shrinkwrap.json"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=22"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@lucid-evolution/lucid": "0.6.5"
|
|
19
|
+
}
|
|
11
20
|
}
|