@cello-protocol/cli 0.0.306 → 0.0.307
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/.claude-plugin/marketplace.json +15 -0
- package/README.md +107 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +564 -0
- package/dist/daemon/account-page-assets.d.ts +4 -0
- package/dist/daemon/account-page-assets.js +160 -0
- package/dist/daemon/account-page.d.ts +14 -0
- package/dist/daemon/account-page.js +104 -0
- package/dist/daemon/address.d.ts +10 -0
- package/dist/daemon/address.js +34 -0
- package/dist/daemon/away.d.ts +31 -0
- package/dist/daemon/away.js +65 -0
- package/dist/daemon/channel-store.d.ts +112 -0
- package/dist/daemon/channel-store.js +284 -0
- package/dist/daemon/channels.d.ts +46 -0
- package/dist/daemon/channels.js +1049 -0
- package/dist/daemon/contacts.d.ts +26 -0
- package/dist/daemon/contacts.js +74 -0
- package/dist/daemon/engine.d.ts +80 -0
- package/dist/daemon/engine.js +2882 -0
- package/dist/daemon/errors.d.ts +5 -0
- package/dist/daemon/errors.js +16 -0
- package/dist/daemon/governance.d.ts +66 -0
- package/dist/daemon/governance.js +514 -0
- package/dist/daemon/guards.d.ts +36 -0
- package/dist/daemon/guards.js +140 -0
- package/dist/daemon/issuer-client.d.ts +56 -0
- package/dist/daemon/issuer-client.js +143 -0
- package/dist/daemon/link.d.ts +30 -0
- package/dist/daemon/link.js +191 -0
- package/dist/daemon/log.d.ts +1 -0
- package/dist/daemon/log.js +4 -0
- package/dist/daemon/main.d.ts +1 -0
- package/dist/daemon/main.js +511 -0
- package/dist/daemon/paths.d.ts +6 -0
- package/dist/daemon/paths.js +21 -0
- package/dist/daemon/pii.d.ts +24 -0
- package/dist/daemon/pii.js +146 -0
- package/dist/daemon/policy-cadence.d.ts +33 -0
- package/dist/daemon/policy-cadence.js +59 -0
- package/dist/daemon/policy-proposals.d.ts +41 -0
- package/dist/daemon/policy-proposals.js +83 -0
- package/dist/daemon/policy-store.d.ts +47 -0
- package/dist/daemon/policy-store.js +144 -0
- package/dist/daemon/presented.d.ts +36 -0
- package/dist/daemon/presented.js +94 -0
- package/dist/daemon/rate-limit.d.ts +17 -0
- package/dist/daemon/rate-limit.js +44 -0
- package/dist/daemon/reach.d.ts +63 -0
- package/dist/daemon/reach.js +207 -0
- package/dist/daemon/screening.d.ts +97 -0
- package/dist/daemon/screening.js +362 -0
- package/dist/daemon/settings.d.ts +125 -0
- package/dist/daemon/settings.js +73 -0
- package/dist/daemon/signal-rules.d.ts +55 -0
- package/dist/daemon/signal-rules.js +127 -0
- package/dist/daemon/signal-store.d.ts +53 -0
- package/dist/daemon/signal-store.js +114 -0
- package/dist/daemon/store.d.ts +188 -0
- package/dist/daemon/store.js +474 -0
- package/dist/daemon/tiers.d.ts +14 -0
- package/dist/daemon/tiers.js +9 -0
- package/dist/daemon/wallet.d.ts +73 -0
- package/dist/daemon/wallet.js +428 -0
- package/dist/daemon/who-label.d.ts +3 -0
- package/dist/daemon/who-label.js +11 -0
- package/dist/guidance.d.ts +39 -0
- package/dist/guidance.js +98 -0
- package/dist/hermes-bridge.d.ts +26 -0
- package/dist/hermes-bridge.js +180 -0
- package/dist/install-mcp.d.ts +6 -0
- package/dist/install-mcp.js +77 -0
- package/dist/ipc/client.d.ts +18 -0
- package/dist/ipc/client.js +107 -0
- package/dist/ipc/operations.d.ts +30 -0
- package/dist/ipc/operations.js +835 -0
- package/dist/ipc/protocol.d.ts +21 -0
- package/dist/ipc/protocol.js +1 -0
- package/dist/issuer-list-sign.d.ts +12 -0
- package/dist/issuer-list-sign.js +43 -0
- package/dist/local-operations.d.ts +2 -0
- package/dist/local-operations.js +73 -0
- package/dist/mcp-tools.d.ts +14 -0
- package/dist/mcp-tools.js +45 -0
- package/dist/mcp.d.ts +2 -0
- package/dist/mcp.js +155 -0
- package/dist/protocol/aead.d.ts +4 -0
- package/dist/protocol/aead.js +35 -0
- package/dist/protocol/cbor.d.ts +40 -0
- package/dist/protocol/cbor.js +106 -0
- package/dist/protocol/chain.d.ts +44 -0
- package/dist/protocol/chain.js +126 -0
- package/dist/protocol/channel.d.ts +153 -0
- package/dist/protocol/channel.js +298 -0
- package/dist/protocol/encode.d.ts +6 -0
- package/dist/protocol/encode.js +21 -0
- package/dist/protocol/identity.d.ts +27 -0
- package/dist/protocol/identity.js +94 -0
- package/dist/protocol/issuer-list.d.ts +56 -0
- package/dist/protocol/issuer-list.js +193 -0
- package/dist/protocol/issuer-roots.d.ts +6 -0
- package/dist/protocol/issuer-roots.js +10 -0
- package/dist/protocol/key-agreement.d.ts +20 -0
- package/dist/protocol/key-agreement.js +88 -0
- package/dist/protocol/merkle.d.ts +16 -0
- package/dist/protocol/merkle.js +166 -0
- package/dist/protocol/ml-dsa.d.ts +28 -0
- package/dist/protocol/ml-dsa.js +58 -0
- package/dist/protocol/ml-kem.d.ts +14 -0
- package/dist/protocol/ml-kem.js +57 -0
- package/dist/protocol/pq-errors.d.ts +9 -0
- package/dist/protocol/pq-errors.js +23 -0
- package/dist/protocol/pq-warnings.d.ts +1 -0
- package/dist/protocol/pq-warnings.js +18 -0
- package/dist/protocol/presented-signals.d.ts +17 -0
- package/dist/protocol/presented-signals.js +92 -0
- package/dist/protocol/salt.d.ts +5 -0
- package/dist/protocol/salt.js +47 -0
- package/dist/protocol/seal.d.ts +58 -0
- package/dist/protocol/seal.js +220 -0
- package/dist/protocol/signal.d.ts +54 -0
- package/dist/protocol/signal.js +266 -0
- package/dist/protocol/status.d.ts +41 -0
- package/dist/protocol/status.js +64 -0
- package/dist/protocol/structures.d.ts +359 -0
- package/dist/protocol/structures.js +296 -0
- package/dist/protocol/transcript.d.ts +61 -0
- package/dist/protocol/transcript.js +319 -0
- package/dist/protocol/wire.d.ts +212 -0
- package/dist/protocol/wire.js +161 -0
- package/dist/require-node.d.ts +1 -0
- package/dist/require-node.js +10 -0
- package/dist/screener/affordance.d.ts +1 -0
- package/dist/screener/affordance.js +2 -0
- package/dist/screener/classifier-selfcheck.d.ts +29 -0
- package/dist/screener/classifier-selfcheck.js +56 -0
- package/dist/screener/exfil.d.ts +11 -0
- package/dist/screener/exfil.js +45 -0
- package/dist/screener/gitleaks-rules.d.ts +9 -0
- package/dist/screener/gitleaks-rules.js +226 -0
- package/dist/screener/inbound.d.ts +25 -0
- package/dist/screener/inbound.js +102 -0
- package/dist/screener/injection-classifier-onnx.d.ts +20 -0
- package/dist/screener/injection-classifier-onnx.js +89 -0
- package/dist/screener/injection-classifier-wasm.d.ts +2 -0
- package/dist/screener/injection-classifier-wasm.js +97 -0
- package/dist/screener/injection-patterns.d.ts +8 -0
- package/dist/screener/injection-patterns.js +48 -0
- package/dist/screener/injection-windows.d.ts +9 -0
- package/dist/screener/injection-windows.js +37 -0
- package/dist/screener/language.d.ts +15 -0
- package/dist/screener/language.js +71 -0
- package/dist/screener/linear-regex.d.ts +8 -0
- package/dist/screener/linear-regex.js +27 -0
- package/dist/screener/model-installer.d.ts +14 -0
- package/dist/screener/model-installer.js +61 -0
- package/dist/screener/outbound.d.ts +19 -0
- package/dist/screener/outbound.js +62 -0
- package/dist/screener/sanitize.d.ts +44 -0
- package/dist/screener/sanitize.js +361 -0
- package/dist/screener/scan-variants.d.ts +5 -0
- package/dist/screener/scan-variants.js +146 -0
- package/dist/screener/screener-model-manifest.d.ts +16 -0
- package/dist/screener/screener-model-manifest.js +20 -0
- package/dist/screener/screener-state.d.ts +29 -0
- package/dist/screener/screener-state.js +119 -0
- package/dist/screener/secrets.d.ts +18 -0
- package/dist/screener/secrets.js +84 -0
- package/dist/screener/worker.d.ts +6 -0
- package/dist/screener/worker.js +83 -0
- package/dist/setup.d.ts +9 -0
- package/dist/setup.js +252 -0
- package/dist/shipped-issuer-list.d.ts +1 -0
- package/dist/shipped-issuer-list.js +3 -0
- package/dist/signals-text.d.ts +46 -0
- package/dist/signals-text.js +81 -0
- package/dist/verify-seal.d.ts +9 -0
- package/dist/verify-seal.js +30 -0
- package/hermes/plugin/__init__.py +1040 -0
- package/hermes/plugin/plugin.yaml +30 -0
- package/hermes/skills/cello-bridge-setup/SKILL.md +38 -0
- package/hermes/skills/cello-policy/SKILL.md +44 -0
- package/package.json +48 -16
- package/plugins/cello/.claude-plugin/plugin.json +19 -0
- package/plugins/cello/.mcp.json +7 -0
- package/plugins/cello/skills/cello/SKILL.md +117 -0
- package/dist/arg-parse.d.ts +0 -19
- package/dist/arg-parse.d.ts.map +0 -1
- package/dist/arg-parse.js +0 -29
- package/dist/arg-parse.js.map +0 -1
- package/dist/bin/cello.d.ts +0 -15
- package/dist/bin/cello.d.ts.map +0 -1
- package/dist/bin/cello.js +0 -110
- package/dist/bin/cello.js.map +0 -1
- package/dist/cli-args.d.ts +0 -62
- package/dist/cli-args.d.ts.map +0 -1
- package/dist/cli-args.js +0 -129
- package/dist/cli-args.js.map +0 -1
- package/dist/commands.d.ts +0 -196
- package/dist/commands.d.ts.map +0 -1
- package/dist/commands.js +0 -1544
- package/dist/commands.js.map +0 -1
- package/dist/hermes/assets.d.ts +0 -41
- package/dist/hermes/assets.d.ts.map +0 -1
- package/dist/hermes/assets.js +0 -2281
- package/dist/hermes/assets.js.map +0 -1
- package/dist/hermes/install-hermes.d.ts +0 -50
- package/dist/hermes/install-hermes.d.ts.map +0 -1
- package/dist/hermes/install-hermes.js +0 -232
- package/dist/hermes/install-hermes.js.map +0 -1
- package/dist/json-out.d.ts +0 -41
- package/dist/json-out.d.ts.map +0 -1
- package/dist/json-out.js +0 -59
- package/dist/json-out.js.map +0 -1
- package/dist/node-runtime-guard-init.d.ts +0 -6
- package/dist/node-runtime-guard-init.d.ts.map +0 -1
- package/dist/node-runtime-guard-init.js +0 -7
- package/dist/node-runtime-guard-init.js.map +0 -1
- package/dist/node-runtime-guard.d.ts +0 -48
- package/dist/node-runtime-guard.d.ts.map +0 -1
- package/dist/node-runtime-guard.js +0 -79
- package/dist/node-runtime-guard.js.map +0 -1
- package/dist/parity-commands.d.ts +0 -427
- package/dist/parity-commands.d.ts.map +0 -1
- package/dist/parity-commands.js +0 -953
- package/dist/parity-commands.js.map +0 -1
- package/dist/registry.d.ts +0 -120
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -2169
- package/dist/registry.js.map +0 -1
- package/dist/screener-commands.d.ts +0 -85
- package/dist/screener-commands.d.ts.map +0 -1
- package/dist/screener-commands.js +0 -313
- package/dist/screener-commands.js.map +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const date = (seconds) => new Date(seconds * 1000).toISOString().slice(0, 10);
|
|
2
|
+
export function signalsListText(result) {
|
|
3
|
+
const { signals, not_shown: notShown } = result;
|
|
4
|
+
if (signals.length === 0 && notShown === 0)
|
|
5
|
+
return "No trust signals in this agent's wallet. To get them: cello signals collect\n";
|
|
6
|
+
if (signals.length === 0)
|
|
7
|
+
return `No active trust signals. ${notShown} superseded or expired (run with --all to show).\n`;
|
|
8
|
+
const shown = (s) => s.consent_state === "accepted";
|
|
9
|
+
const lines = signals.map((s) => {
|
|
10
|
+
const consent = s.consent_state === "accepted" ? "—" : s.consent_state === "pending" ? "PENDING" : s.consent_state;
|
|
11
|
+
const include = shown(s) ? (s.default_present ? "✓" : "–") : "✗";
|
|
12
|
+
return ` ${s.type.padEnd(22)} ${`${s.signal_hash.slice(0, 12)}…`} ${s.status.padEnd(12)} ${consent.padEnd(9)} ${(s.same_operator ? "own" : "—").padEnd(6)} ${include.padEnd(7)} ${(s.public ? "public" : "—").padEnd(6)} ${date(s.issued_at)} ${s.expires_at === null ? "never " : date(s.expires_at)} ${s.counts_as_verified ? s.issuer_address : `UNKNOWN ${s.issuer_address}`}`;
|
|
13
|
+
});
|
|
14
|
+
const header = ` ${"type".padEnd(22)} hash status consent co-own include public issued expires issuer`;
|
|
15
|
+
const legend = [" include: ✓ = shown by default – = left out", " To change: cello signals enable <hash> or cello signals disable <hash>", " public: anyone with this agent's address can read it. To change: cello signals publish <hash> or cello signals unpublish <hash>"];
|
|
16
|
+
if (signals.some((s) => s.same_operator))
|
|
17
|
+
legend.push(" co-own: 'own' = the endorser and the subject are your own agents. It's still shown, but doesn't count toward a counterparty's minimum.");
|
|
18
|
+
if (signals.some((s) => !shown(s)))
|
|
19
|
+
legend.push(" consent: PENDING = someone issued this about you, and nobody sees it until you accept. ✗ = can't be shown, whatever 'include' says.");
|
|
20
|
+
if (notShown > 0)
|
|
21
|
+
legend.push(` (${notShown} superseded or expired not shown: run with --all to include)`);
|
|
22
|
+
const notes = signals.flatMap((s) => s.notes.map((note) => `\n${s.signal_hash.slice(0, 12)}…:\n${note}`));
|
|
23
|
+
return `${[header, ` ${"─".repeat(126)}`, ...lines, ...legend, ...notes].join("\n")}\n`;
|
|
24
|
+
}
|
|
25
|
+
export function signalViewText(s) {
|
|
26
|
+
const when = (seconds) => (seconds === null ? "never" : new Date(seconds * 1000).toISOString());
|
|
27
|
+
const lines = [
|
|
28
|
+
`type: ${s.type}`,
|
|
29
|
+
`signal_hash: ${s.signal_hash}`,
|
|
30
|
+
`status: ${s.status}`,
|
|
31
|
+
`default_present: ${s.default_present ? "yes" : "no"}`,
|
|
32
|
+
`subject_kind: ${s.subject_kind}`,
|
|
33
|
+
`issuer_kind: ${s.issuer_kind}`,
|
|
34
|
+
`issuer: ${s.issuer_address} (${s.issuer_standing})`,
|
|
35
|
+
`issuer_pubkey: ${s.issuer_pubkey}`,
|
|
36
|
+
`schema_version: ${s.schema_version ?? "—"}`,
|
|
37
|
+
`issued_at: ${when(s.issued_at)}`,
|
|
38
|
+
`expires_at: ${when(s.expires_at)}`,
|
|
39
|
+
`supersedes: ${s.supersedes_hash ?? "—"}`,
|
|
40
|
+
];
|
|
41
|
+
if (s.payload !== undefined)
|
|
42
|
+
lines.push(`payload: ${JSON.stringify(s.payload, null, 2)}`);
|
|
43
|
+
return `${[...lines, ...s.notes.map((note) => `\n${note}`)].join("\n")}\n`;
|
|
44
|
+
}
|
|
45
|
+
// What a person sees after looking another agent up. The notes carry the unverified-claim wording, so they are never dropped.
|
|
46
|
+
export function publicSignalsText(result) {
|
|
47
|
+
const { agent, signals, refused } = result;
|
|
48
|
+
const head = `Public signals of ${agent.slice(0, 12)}…`;
|
|
49
|
+
if (signals.length === 0 && refused.length === 0)
|
|
50
|
+
return `${head}: none. An agent with no public signals proves nothing either way.\n`;
|
|
51
|
+
const lines = signals.map((s) => ` ${s.type.padEnd(22)} ${date(s.issued_at)} ${s.expires_at === null ? "never " : date(s.expires_at)} ${s.counts_as_verified ? s.issuer_address : `UNKNOWN ${s.issuer_address}`}`);
|
|
52
|
+
const header = ` ${"type".padEnd(22)} issued expires issuer`;
|
|
53
|
+
const out = [head, header, ` ${"─".repeat(80)}`, ...lines];
|
|
54
|
+
if (refused.length > 0)
|
|
55
|
+
out.push(` ${refused.length} file${refused.length === 1 ? "" : "s"} the server returned failed a check here and ${refused.length === 1 ? "was" : "were"} left out: ${refused.map((r) => r.fault).join(", ")}`);
|
|
56
|
+
out.push(" UNKNOWN = an issuer this machine doesn't recognise: the claim is only that agent's own.");
|
|
57
|
+
const notes = signals.flatMap((s) => s.notes.map((note) => `\n${s.type}:\n${note}`));
|
|
58
|
+
return `${[...out, ...notes].join("\n")}\n`;
|
|
59
|
+
}
|
|
60
|
+
// What a person sees of the signals the other side showed with a call. The notes carry the unverified-claim wording, so they are never dropped.
|
|
61
|
+
export function presentedText(result) {
|
|
62
|
+
const { from, theirs, refused, theirs_unreadable: unreadable, yours_sent: yoursSent } = result;
|
|
63
|
+
const head = `Signals ${from.slice(0, 12)}… showed with this call`;
|
|
64
|
+
const out = [];
|
|
65
|
+
if (unreadable)
|
|
66
|
+
out.push(`${head}: something was sent that couldn't be opened, which is not the same as nothing sent.`);
|
|
67
|
+
else if (theirs.length === 0 && refused.length === 0)
|
|
68
|
+
out.push(`${head}: none.`);
|
|
69
|
+
else {
|
|
70
|
+
out.push(`${head}:`, ` ${"type".padEnd(22)} issued expires issuer`, ` ${"─".repeat(80)}`);
|
|
71
|
+
for (const s of theirs)
|
|
72
|
+
out.push(` ${s.type.padEnd(22)} ${date(s.issued_at)} ${s.expires_at === null ? "never " : date(s.expires_at)} ${s.counts_as_verified ? s.issuer_address : `UNKNOWN ${s.issuer_address}`}`);
|
|
73
|
+
if (refused.length > 0)
|
|
74
|
+
out.push(` ${refused.length} sent file${refused.length === 1 ? "" : "s"} failed a check here and ${refused.length === 1 ? "was" : "were"} left out: ${refused.map((r) => r.fault).join(", ")}`);
|
|
75
|
+
if (theirs.some((s) => !s.counts_as_verified))
|
|
76
|
+
out.push(" UNKNOWN = an issuer this machine doesn't recognise: the claim is only that agent's own.");
|
|
77
|
+
}
|
|
78
|
+
out.push(` You sent ${yoursSent} with this call.`);
|
|
79
|
+
const notes = theirs.flatMap((s) => s.notes.map((note) => `\n${s.type}:\n${note}`));
|
|
80
|
+
return `${[...out, ...notes].join("\n")}\n`;
|
|
81
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type FileToCheck = {
|
|
2
|
+
raw: unknown;
|
|
3
|
+
sealKeyId: Uint8Array;
|
|
4
|
+
refused?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
refused: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
export declare function readFileToCheck(params: Record<string, unknown>): FileToCheck;
|
|
9
|
+
export declare function verifySeal(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Checks a seal file in the caller's own process. It never opens a socket, and needs no daemon, server or agent,
|
|
2
|
+
// so a third party with nothing but this code, the file and a seal key id gets the same answer.
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { checkSealRecord, describeSeal, sealSummary } from "./protocol/seal.js";
|
|
5
|
+
function refused(fault, message) {
|
|
6
|
+
return { ok: false, fault, message };
|
|
7
|
+
}
|
|
8
|
+
export function readFileToCheck(params) {
|
|
9
|
+
const file = params["file"];
|
|
10
|
+
const sealKey = params["seal_key"];
|
|
11
|
+
if (typeof sealKey !== "string" || !/^[0-9a-fA-F]{64}$/.test(sealKey))
|
|
12
|
+
return { refused: refused("bad_seal_key", "seal_key must be the seal key's id, 64 hex characters") };
|
|
13
|
+
if (typeof file !== "string")
|
|
14
|
+
return { refused: refused("unreadable_file", "file must be a path") };
|
|
15
|
+
try {
|
|
16
|
+
return { raw: JSON.parse(readFileSync(file, "utf8")), sealKeyId: new Uint8Array(Buffer.from(sealKey, "hex")) };
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
return { refused: refused("unreadable_file", `${file} can't be read as JSON: ${err instanceof Error ? err.message : String(err)}`) };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export async function verifySeal(params) {
|
|
23
|
+
const input = readFileToCheck(params);
|
|
24
|
+
if (input.refused)
|
|
25
|
+
return input.refused;
|
|
26
|
+
const check = await checkSealRecord(input.raw, input.sealKeyId);
|
|
27
|
+
if (!check.ok)
|
|
28
|
+
return refused(check.fault, check.message);
|
|
29
|
+
return { ok: true, ...sealSummary(check.record), statement: describeSeal(check.record) };
|
|
30
|
+
}
|