@bondedhq/shared 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +17 -2
- package/dist/abis.d.ts +8639 -0
- package/dist/abis.js +11234 -0
- package/dist/actuarial.d.ts +158 -0
- package/dist/actuarial.js +210 -0
- package/dist/agent-url.d.ts +172 -0
- package/dist/agent-url.js +248 -0
- package/dist/agent.d.ts +184 -0
- package/dist/agent.js +133 -0
- package/dist/allowances.d.ts +54 -0
- package/dist/allowances.js +68 -0
- package/dist/bounty-example.d.ts +6 -0
- package/dist/bounty-example.js +23 -0
- package/dist/bounty-spec.d.ts +36 -0
- package/dist/bounty-spec.js +111 -0
- package/dist/canonical.d.ts +8 -0
- package/dist/canonical.js +44 -0
- package/dist/chains.d.ts +58 -0
- package/dist/chains.js +123 -0
- package/dist/deployments.d.ts +32 -0
- package/dist/deployments.js +41 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +33 -0
- package/dist/leaderboard.d.ts +105 -0
- package/dist/leaderboard.js +85 -0
- package/dist/llm.d.ts +121 -0
- package/dist/llm.js +105 -0
- package/dist/mandate-rules.d.ts +54 -0
- package/dist/mandate-rules.js +69 -0
- package/dist/module-install.d.ts +145 -0
- package/dist/module-install.js +133 -0
- package/dist/notifications.d.ts +48 -0
- package/dist/notifications.js +45 -0
- package/dist/observed-rates.d.ts +125 -0
- package/dist/observed-rates.js +158 -0
- package/dist/problems.d.ts +44 -0
- package/dist/problems.js +148 -0
- package/dist/quote.d.ts +123 -0
- package/dist/quote.js +167 -0
- package/dist/report-fixes.d.ts +89 -0
- package/dist/report-fixes.js +159 -0
- package/dist/runner.d.ts +376 -0
- package/dist/runner.js +353 -0
- package/dist/schemas/attack.d.ts +121 -0
- package/dist/schemas/attack.js +142 -0
- package/dist/schemas/attestation.d.ts +284 -0
- package/dist/schemas/attestation.js +175 -0
- package/dist/schemas/common.d.ts +22 -0
- package/dist/schemas/common.js +53 -0
- package/dist/schemas/mandate-commitment.d.ts +13 -0
- package/dist/schemas/mandate-commitment.js +37 -0
- package/dist/schemas/mandate.d.ts +170 -0
- package/dist/schemas/mandate.js +113 -0
- package/dist/self-serve.d.ts +133 -0
- package/dist/self-serve.js +110 -0
- package/dist/sentinel-cascade.d.ts +64 -0
- package/dist/sentinel-cascade.js +64 -0
- package/dist/sentinel.d.ts +133 -0
- package/dist/sentinel.js +101 -0
- package/dist/suggested-mandate.d.ts +81 -0
- package/dist/suggested-mandate.js +112 -0
- package/dist/tee.d.ts +61 -0
- package/dist/tee.js +93 -0
- package/dist/tiers.d.ts +19 -0
- package/dist/tiers.js +23 -0
- package/dist/troubleshooting-doc.d.ts +11 -0
- package/dist/troubleshooting-doc.js +46 -0
- package/package.json +59 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { UNKNOWN_PROBLEM, troubleshootingList } from "./problems.js";
|
|
2
|
+
/**
|
|
3
|
+
* The troubleshooting page (docs/TROUBLESHOOTING.md), built from `PROBLEMS`: one section per
|
|
4
|
+
* code, whose heading is the code itself, so the docs site's anchor for it is `#<code>` (the
|
|
5
|
+
* links the web app and the runner print). `pnpm docs:troubleshooting` writes it; a test fails
|
|
6
|
+
* when the committed page is out of date.
|
|
7
|
+
*/
|
|
8
|
+
/** Each area's heading, in the order the page lists them. */
|
|
9
|
+
export const PROBLEM_AREAS = {
|
|
10
|
+
"sign-in": "Signing in and signed requests",
|
|
11
|
+
requests: "Limits and requests",
|
|
12
|
+
registration: "Registering an agent",
|
|
13
|
+
connection: "Connecting your agent",
|
|
14
|
+
check: "Connection checks",
|
|
15
|
+
rating: "Ratings",
|
|
16
|
+
cover: "Cover and claims",
|
|
17
|
+
vault: "The vault",
|
|
18
|
+
notifications: "Notifications",
|
|
19
|
+
service: "Bonded's own services",
|
|
20
|
+
};
|
|
21
|
+
/** Text that Markdown would read as markup (HTML tags), made plain. */
|
|
22
|
+
const plain = (text) => text.replace(/</g, "<").replace(/>/g, ">");
|
|
23
|
+
export function troubleshootingMarkdown() {
|
|
24
|
+
const list = troubleshootingList();
|
|
25
|
+
const lines = [
|
|
26
|
+
"# Troubleshooting",
|
|
27
|
+
"",
|
|
28
|
+
"Every problem, warning and refusal Bonded shows, with what to do about it. Each one has a stable code: the web app's **How to fix this** links, the runner's `how to fix:` lines and the API's `code` fields all point at its section here, whose heading is the code.",
|
|
29
|
+
"",
|
|
30
|
+
"Where a message carries numbers, ids or times, the sentence below is its gist. The API returns the code next to each sentence: `code` beside `error` on a refusal (and in `details.code`), `issues[].code` on a connection check's problems and warnings, `problems[].code` in an agent's health panel, and `code` on an in-app notification.",
|
|
31
|
+
"",
|
|
32
|
+
"This page is generated from `PROBLEMS` in [packages/shared/src/problems.ts](../packages/shared/src/problems.ts) by `pnpm docs:troubleshooting`. Don't edit it by hand: change the list and run the command.",
|
|
33
|
+
"",
|
|
34
|
+
];
|
|
35
|
+
for (const [area, title] of Object.entries(PROBLEM_AREAS)) {
|
|
36
|
+
const entries = list.filter((p) => p.area === area);
|
|
37
|
+
if (!entries.length)
|
|
38
|
+
continue;
|
|
39
|
+
lines.push(`## ${title}`, "");
|
|
40
|
+
for (const p of entries)
|
|
41
|
+
lines.push(`### ${p.code}`, "", `**Message:** ${plain(p.sentence)}`, "", `**What to do:** ${plain(p.fix)}`, "");
|
|
42
|
+
}
|
|
43
|
+
lines.push("## Anything else", "", `### ${UNKNOWN_PROBLEM}`, "", "**Message:** a sentence this page doesn't list yet. The API gives it the code `other`.", "", "**What to do:** the sentence says what went wrong in its own words. If it isn't clear, check the status page (Status, at the foot of the web app) and try again; if it keeps happening, open an issue with the message.", "");
|
|
44
|
+
return lines.join("\n");
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=troubleshooting-doc.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bondedhq/shared",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Bonded's shared schemas, ABIs, chain configs, signing types and the agent and runner protocols.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"bonded",
|
|
8
|
+
"ai-agents",
|
|
9
|
+
"mandate-vault",
|
|
10
|
+
"zod",
|
|
11
|
+
"abi"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/ddboy19912/bonded/tree/main/packages/shared#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ddboy19912/bonded/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/ddboy19912/bonded.git",
|
|
20
|
+
"directory": "packages/shared"
|
|
21
|
+
},
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./agent-url": {
|
|
31
|
+
"types": "./dist/agent-url.d.ts",
|
|
32
|
+
"import": "./dist/agent-url.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"!dist/**/*.map",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"viem": "^2.56.9",
|
|
49
|
+
"yaml": "^2.9.1",
|
|
50
|
+
"zod": "^4.6.5"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsc -p tsconfig.build.json",
|
|
54
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
55
|
+
"lint": "eslint src test",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"abis": "node scripts/gen-abis.mjs",
|
|
58
|
+
"abis:check": "node scripts/gen-abis.mjs --check",
|
|
59
|
+
"docs:troubleshooting": "tsc -p tsconfig.build.json && node scripts/gen-troubleshooting.mjs",
|
|
60
|
+
"docs:troubleshooting:check": "tsc -p tsconfig.build.json && node scripts/gen-troubleshooting.mjs --check"
|
|
61
|
+
}
|
|
6
62
|
}
|