@toon-protocol/client-mcp 0.12.2 → 0.13.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/README.md +1 -1
- package/dist/{chunk-XVGREVEL.js → chunk-SL7UGVOC.js} +290 -3
- package/dist/chunk-SL7UGVOC.js.map +1 -0
- package/dist/{chunk-AYIP46A2.js → chunk-UXCFHAUC.js} +44 -5
- package/dist/chunk-UXCFHAUC.js.map +1 -0
- package/dist/{chunk-EAPVMGLZ.js → chunk-YVLSWU46.js} +1508 -10
- package/dist/chunk-YVLSWU46.js.map +1 -0
- package/dist/daemon.js +3 -3
- package/dist/daemon.js.map +1 -1
- package/dist/index.d.ts +303 -10
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +4 -4
- package/dist/mcp.js.map +1 -1
- package/package.json +5 -4
- package/dist/chunk-AYIP46A2.js.map +0 -1
- package/dist/chunk-EAPVMGLZ.js.map +0 -1
- package/dist/chunk-XVGREVEL.js.map +0 -1
package/dist/daemon.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
ClientRunner,
|
|
5
5
|
registerRoutes,
|
|
6
6
|
scaffoldFirstRun
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YVLSWU46.js";
|
|
8
8
|
import {
|
|
9
9
|
ControlClient,
|
|
10
10
|
ToonClient,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
resolveConfig,
|
|
18
18
|
spawnDaemonDetached,
|
|
19
19
|
waitForReady
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UXCFHAUC.js";
|
|
21
21
|
import "./chunk-32QD72IL.js";
|
|
22
22
|
import "./chunk-DLYE6U2Z.js";
|
|
23
23
|
import "./chunk-LR7W2ISE.js";
|
|
@@ -46,7 +46,7 @@ async function runForeground() {
|
|
|
46
46
|
logger: false,
|
|
47
47
|
// Keep idle keep-alive sockets open longer than the MCP-side undici client
|
|
48
48
|
// would ever pool one (its keepAliveMaxTimeout default is 600s). The client
|
|
49
|
-
// calls this localhost control
|
|
49
|
+
// calls this localhost control API infrequently, so with Node's default
|
|
50
50
|
// 5s keep-alive the daemon was reaping sockets the client still held —
|
|
51
51
|
// causing the next request to fail with ECONNRESET ("daemon not reachable")
|
|
52
52
|
// until a retry opened a fresh socket (toon-client#186). Outliving the
|
package/dist/daemon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/daemon.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * `toon-clientd` — the always-on, detached TOON client daemon. It owns the two\n * long-lived connections that cannot live in an ephemeral agent session:\n * • a BTP session to the apex/connector (paid writes), and\n * • a persistent relay Nostr-WS subscription (free reads),\n * plus the payment channels (with a persisted nonce watermark) and the signer.\n *\n * Subcommands:\n * toon-clientd run Run the daemon in the foreground (used internally by\n * the detached spawn; logs to stdout).\n * toon-clientd start Spawn the daemon detached and wait until reachable.\n * toon-clientd stop Stop a running daemon (SIGTERM the locked PID).\n * toon-clientd status Print the daemon status as JSON.\n */\n\nimport Fastify from 'fastify';\nimport { ToonClient } from '@toon-protocol/client';\nimport {\n defaultConfigPath,\n readConfigFile,\n resolveConfig,\n type ResolvedDaemonConfig,\n} from './daemon/config.js';\nimport { scaffoldFirstRun } from './daemon/first-run.js';\nimport { ClientRunner, type ToonClientLike } from './daemon/client-runner.js';\nimport { registerRoutes } from './daemon/routes.js';\nimport {\n acquireLock,\n isProcessAlive,\n readPid,\n releaseLock,\n spawnDaemonDetached,\n waitForReady,\n} from './daemon/lifecycle.js';\nimport { ControlClient } from './control-client.js';\n\nfunction baseUrl(config: ResolvedDaemonConfig): string {\n return `http://127.0.0.1:${config.httpPort}`;\n}\n\nfunction loadResolvedConfig(): ResolvedDaemonConfig {\n const path = process.env['TOON_CLIENT_CONFIG'] ?? defaultConfigPath();\n return resolveConfig(readConfigFile(path));\n}\n\n/** Run the daemon in the foreground (the detached child's actual work). */\nasync function runForeground(): Promise<void> {\n acquireLock();\n const config = loadResolvedConfig();\n const log = (msg: string): void => console.error(msg);\n\n const runner = new ClientRunner({\n config,\n createClient: (clientConfig) =>\n new ToonClient(clientConfig) as unknown as ToonClientLike,\n logger: log,\n });\n\n const app = Fastify({\n logger: false,\n // Keep idle keep-alive sockets open longer than the MCP-side undici client\n // would ever pool one (its keepAliveMaxTimeout default is 600s). The client\n // calls this localhost control
|
|
1
|
+
{"version":3,"sources":["../src/daemon.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * `toon-clientd` — the always-on, detached TOON client daemon. It owns the two\n * long-lived connections that cannot live in an ephemeral agent session:\n * • a BTP session to the apex/connector (paid writes), and\n * • a persistent relay Nostr-WS subscription (free reads),\n * plus the payment channels (with a persisted nonce watermark) and the signer.\n *\n * Subcommands:\n * toon-clientd run Run the daemon in the foreground (used internally by\n * the detached spawn; logs to stdout).\n * toon-clientd start Spawn the daemon detached and wait until reachable.\n * toon-clientd stop Stop a running daemon (SIGTERM the locked PID).\n * toon-clientd status Print the daemon status as JSON.\n */\n\nimport Fastify from 'fastify';\nimport { ToonClient } from '@toon-protocol/client';\nimport {\n defaultConfigPath,\n readConfigFile,\n resolveConfig,\n type ResolvedDaemonConfig,\n} from './daemon/config.js';\nimport { scaffoldFirstRun } from './daemon/first-run.js';\nimport { ClientRunner, type ToonClientLike } from './daemon/client-runner.js';\nimport { registerRoutes } from './daemon/routes.js';\nimport {\n acquireLock,\n isProcessAlive,\n readPid,\n releaseLock,\n spawnDaemonDetached,\n waitForReady,\n} from './daemon/lifecycle.js';\nimport { ControlClient } from './control-client.js';\n\nfunction baseUrl(config: ResolvedDaemonConfig): string {\n return `http://127.0.0.1:${config.httpPort}`;\n}\n\nfunction loadResolvedConfig(): ResolvedDaemonConfig {\n const path = process.env['TOON_CLIENT_CONFIG'] ?? defaultConfigPath();\n return resolveConfig(readConfigFile(path));\n}\n\n/** Run the daemon in the foreground (the detached child's actual work). */\nasync function runForeground(): Promise<void> {\n acquireLock();\n const config = loadResolvedConfig();\n const log = (msg: string): void => console.error(msg);\n\n const runner = new ClientRunner({\n config,\n createClient: (clientConfig) =>\n new ToonClient(clientConfig) as unknown as ToonClientLike,\n logger: log,\n });\n\n const app = Fastify({\n logger: false,\n // Keep idle keep-alive sockets open longer than the MCP-side undici client\n // would ever pool one (its keepAliveMaxTimeout default is 600s). The client\n // calls this localhost control API infrequently, so with Node's default\n // 5s keep-alive the daemon was reaping sockets the client still held —\n // causing the next request to fail with ECONNRESET (\"daemon not reachable\")\n // until a retry opened a fresh socket (toon-client#186). Outliving the\n // client's pool removes that race for non-retried (POST) requests too; the\n // client-side retry covers the residual. Localhost-only listener, so a\n // long-lived idle socket is harmless.\n keepAliveTimeout: 650_000,\n });\n registerRoutes(app, runner);\n\n // Begin bootstrap (non-blocking) before listening so /status is immediately\n // reachable and reports `bootstrapping: true` while anon/BTP come up.\n runner.start();\n\n await app.listen({ host: '127.0.0.1', port: config.httpPort });\n log(`[toon-clientd] listening on ${baseUrl(config)}`);\n\n let shuttingDown = false;\n const shutdown = async (signal: string): Promise<void> => {\n if (shuttingDown) return;\n shuttingDown = true;\n log(`[toon-clientd] received ${signal}, shutting down`);\n try {\n await app.close();\n } catch {\n /* ignore */\n }\n await runner.stop();\n releaseLock();\n setTimeout(() => process.exit(0), 500).unref();\n };\n process.on('SIGTERM', () => void shutdown('SIGTERM'));\n process.on('SIGINT', () => void shutdown('SIGINT'));\n}\n\n/** Spawn the daemon detached and wait until the control API responds. */\nasync function start(): Promise<void> {\n const config = loadResolvedConfig();\n const url = baseUrl(config);\n const existing = readPid();\n if (existing !== null && isProcessAlive(existing)) {\n console.log(`toon-clientd already running (pid ${existing}) at ${url}`);\n return;\n }\n const pid = spawnDaemonDetached();\n const ok = await waitForReady(url, 20_000);\n if (ok) {\n console.log(`toon-clientd started (pid ${pid}) at ${url}`);\n } else {\n console.error(\n `toon-clientd spawned (pid ${pid}) but did not become reachable at ${url} in time. ` +\n `Check the daemon log.`\n );\n process.exitCode = 1;\n }\n}\n\n/** Stop a running daemon via SIGTERM on the locked PID. */\nasync function stop(): Promise<void> {\n const pid = readPid();\n if (pid === null || !isProcessAlive(pid)) {\n console.log('toon-clientd is not running');\n releaseLock();\n return;\n }\n process.kill(pid, 'SIGTERM');\n // Wait briefly for the process to exit.\n for (let i = 0; i < 40; i++) {\n if (!isProcessAlive(pid)) break;\n await new Promise((r) => setTimeout(r, 100));\n }\n console.log(`toon-clientd stopped (pid ${pid})`);\n}\n\n/** Print the daemon status JSON. */\nasync function status(): Promise<void> {\n const config = loadResolvedConfig();\n const client = new ControlClient({ baseUrl: baseUrl(config) });\n try {\n const s = await client.status();\n console.log(JSON.stringify(s, null, 2));\n } catch {\n console.log(JSON.stringify({ running: false }, null, 2));\n process.exitCode = 1;\n }\n}\n\nasync function main(): Promise<void> {\n const cmd = process.argv[2] ?? 'run';\n switch (cmd) {\n case 'run':\n // First-run onboarding (#251): mint + persist an identity and scaffold\n // the transport config so a fresh install starts with no manual setup.\n await scaffoldFirstRun();\n await runForeground();\n break;\n case 'start':\n await scaffoldFirstRun();\n await start();\n break;\n case 'stop':\n await stop();\n break;\n case 'status':\n await status();\n break;\n default:\n console.error(\n `Unknown command \"${cmd}\". Usage: toon-clientd <run|start|stop|status>`\n );\n process.exitCode = 1;\n }\n}\n\nmain().catch((err) => {\n console.error(\n err instanceof Error ? (err.stack ?? err.message) : String(err)\n );\n process.exitCode = 1;\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,OAAO,aAAa;AAqBpB,SAAS,QAAQ,QAAsC;AACrD,SAAO,oBAAoB,OAAO,QAAQ;AAC5C;AAEA,SAAS,qBAA2C;AAClD,QAAM,OAAO,QAAQ,IAAI,oBAAoB,KAAK,kBAAkB;AACpE,SAAO,cAAc,eAAe,IAAI,CAAC;AAC3C;AAGA,eAAe,gBAA+B;AAC5C,cAAY;AACZ,QAAM,SAAS,mBAAmB;AAClC,QAAM,MAAM,CAAC,QAAsB,QAAQ,MAAM,GAAG;AAEpD,QAAM,SAAS,IAAI,aAAa;AAAA,IAC9B;AAAA,IACA,cAAc,CAAC,iBACb,IAAI,WAAW,YAAY;AAAA,IAC7B,QAAQ;AAAA,EACV,CAAC;AAED,QAAM,MAAM,QAAQ;AAAA,IAClB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUR,kBAAkB;AAAA,EACpB,CAAC;AACD,iBAAe,KAAK,MAAM;AAI1B,SAAO,MAAM;AAEb,QAAM,IAAI,OAAO,EAAE,MAAM,aAAa,MAAM,OAAO,SAAS,CAAC;AAC7D,MAAI,+BAA+B,QAAQ,MAAM,CAAC,EAAE;AAEpD,MAAI,eAAe;AACnB,QAAM,WAAW,OAAO,WAAkC;AACxD,QAAI,aAAc;AAClB,mBAAe;AACf,QAAI,2BAA2B,MAAM,iBAAiB;AACtD,QAAI;AACF,YAAM,IAAI,MAAM;AAAA,IAClB,QAAQ;AAAA,IAER;AACA,UAAM,OAAO,KAAK;AAClB,gBAAY;AACZ,eAAW,MAAM,QAAQ,KAAK,CAAC,GAAG,GAAG,EAAE,MAAM;AAAA,EAC/C;AACA,UAAQ,GAAG,WAAW,MAAM,KAAK,SAAS,SAAS,CAAC;AACpD,UAAQ,GAAG,UAAU,MAAM,KAAK,SAAS,QAAQ,CAAC;AACpD;AAGA,eAAe,QAAuB;AACpC,QAAM,SAAS,mBAAmB;AAClC,QAAM,MAAM,QAAQ,MAAM;AAC1B,QAAM,WAAW,QAAQ;AACzB,MAAI,aAAa,QAAQ,eAAe,QAAQ,GAAG;AACjD,YAAQ,IAAI,qCAAqC,QAAQ,QAAQ,GAAG,EAAE;AACtE;AAAA,EACF;AACA,QAAM,MAAM,oBAAoB;AAChC,QAAM,KAAK,MAAM,aAAa,KAAK,GAAM;AACzC,MAAI,IAAI;AACN,YAAQ,IAAI,6BAA6B,GAAG,QAAQ,GAAG,EAAE;AAAA,EAC3D,OAAO;AACL,YAAQ;AAAA,MACN,6BAA6B,GAAG,qCAAqC,GAAG;AAAA,IAE1E;AACA,YAAQ,WAAW;AAAA,EACrB;AACF;AAGA,eAAe,OAAsB;AACnC,QAAM,MAAM,QAAQ;AACpB,MAAI,QAAQ,QAAQ,CAAC,eAAe,GAAG,GAAG;AACxC,YAAQ,IAAI,6BAA6B;AACzC,gBAAY;AACZ;AAAA,EACF;AACA,UAAQ,KAAK,KAAK,SAAS;AAE3B,WAAS,IAAI,GAAG,IAAI,IAAI,KAAK;AAC3B,QAAI,CAAC,eAAe,GAAG,EAAG;AAC1B,UAAM,IAAI,QAAQ,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAAA,EAC7C;AACA,UAAQ,IAAI,6BAA6B,GAAG,GAAG;AACjD;AAGA,eAAe,SAAwB;AACrC,QAAM,SAAS,mBAAmB;AAClC,QAAM,SAAS,IAAI,cAAc,EAAE,SAAS,QAAQ,MAAM,EAAE,CAAC;AAC7D,MAAI;AACF,UAAM,IAAI,MAAM,OAAO,OAAO;AAC9B,YAAQ,IAAI,KAAK,UAAU,GAAG,MAAM,CAAC,CAAC;AAAA,EACxC,QAAQ;AACN,YAAQ,IAAI,KAAK,UAAU,EAAE,SAAS,MAAM,GAAG,MAAM,CAAC,CAAC;AACvD,YAAQ,WAAW;AAAA,EACrB;AACF;AAEA,eAAe,OAAsB;AACnC,QAAM,MAAM,QAAQ,KAAK,CAAC,KAAK;AAC/B,UAAQ,KAAK;AAAA,IACX,KAAK;AAGH,YAAM,iBAAiB;AACvB,YAAM,cAAc;AACpB;AAAA,IACF,KAAK;AACH,YAAM,iBAAiB;AACvB,YAAM,MAAM;AACZ;AAAA,IACF,KAAK;AACH,YAAM,KAAK;AACX;AAAA,IACF,KAAK;AACH,YAAM,OAAO;AACb;AAAA,IACF;AACE,cAAQ;AAAA,QACN,oBAAoB,GAAG;AAAA,MACzB;AACA,cAAQ,WAAW;AAAA,EACvB;AACF;AAEA,KAAK,EAAE,MAAM,CAAC,QAAQ;AACpB,UAAQ;AAAA,IACN,eAAe,QAAS,IAAI,SAAS,IAAI,UAAW,OAAO,GAAG;AAAA,EAChE;AACA,UAAQ,WAAW;AACrB,CAAC;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NostrEvent, EventTemplate } from 'nostr-tools/pure';
|
|
2
2
|
import { SwapPair } from '@toon-protocol/core';
|
|
3
3
|
import { ToonClientConfig, FaucetChain } from '@toon-protocol/client';
|
|
4
|
+
import { fetchRemoteState, GitRepoReader } from '@toon-protocol/rig';
|
|
4
5
|
import { FastifyInstance } from 'fastify';
|
|
5
6
|
import { ViewSpec } from '@toon-protocol/views';
|
|
6
7
|
|
|
@@ -501,12 +502,208 @@ interface FundWalletResponse {
|
|
|
501
502
|
interface FundStatusResponse {
|
|
502
503
|
jobs: FundWalletResponse[];
|
|
503
504
|
}
|
|
505
|
+
/** NIP-34 repository address: the owner+id pair behind `a` tags. */
|
|
506
|
+
interface GitRepoAddr {
|
|
507
|
+
/** Repository owner's Nostr pubkey (64-char hex) — author of kind:30617/30618. */
|
|
508
|
+
ownerPubkey: string;
|
|
509
|
+
/** Repository identifier (NIP-34 `d` tag). */
|
|
510
|
+
repoId: string;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* `POST /git/estimate` — plan a push (local git plumbing + remote-state read)
|
|
514
|
+
* and price it WITHOUT paying anything. The same body (plus `confirm`) drives
|
|
515
|
+
* `POST /git/push`.
|
|
516
|
+
*/
|
|
517
|
+
interface GitEstimateRequest {
|
|
518
|
+
/** Path to the local git repository (worktree or .git dir). Must exist. */
|
|
519
|
+
repoPath: string;
|
|
520
|
+
/** Repository identifier (NIP-34 `d` tag). The daemon identity is the owner. */
|
|
521
|
+
repoId: string;
|
|
522
|
+
/**
|
|
523
|
+
* Full refnames to push (e.g. `["refs/heads/main"]`). Default: every local
|
|
524
|
+
* branch and tag.
|
|
525
|
+
*/
|
|
526
|
+
refspecs?: string[];
|
|
527
|
+
/** Allow non-fast-forward updates (default false → 409 `non_fast_forward`). */
|
|
528
|
+
force?: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* Relay URLs to read remote state from and publish to. Plural from day one
|
|
531
|
+
* (forward-compat); defaults to the daemon's config-seeded relay.
|
|
532
|
+
*/
|
|
533
|
+
relayUrls?: string[];
|
|
534
|
+
/** Repo name/description for the first-push kind:30617 announcement. */
|
|
535
|
+
announcement?: {
|
|
536
|
+
name?: string;
|
|
537
|
+
description?: string;
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
/** One planned ref update (wire shape of @toon-protocol/rig `RefUpdate`). */
|
|
541
|
+
interface GitRefUpdate {
|
|
542
|
+
refname: string;
|
|
543
|
+
localSha: string;
|
|
544
|
+
/** Remote tip SHA, or null when the ref is new. */
|
|
545
|
+
remoteSha: string | null;
|
|
546
|
+
kind: 'new' | 'fast-forward' | 'forced' | 'up-to-date';
|
|
547
|
+
}
|
|
548
|
+
/** One object scheduled for upload (wire shape of `PlannedObject`). */
|
|
549
|
+
interface GitPlannedObject {
|
|
550
|
+
sha: string;
|
|
551
|
+
type: 'blob' | 'tree' | 'commit' | 'tag';
|
|
552
|
+
/** Body size in bytes (what the upload fee is charged on). */
|
|
553
|
+
size: number;
|
|
554
|
+
/** Path the object was reached by, when known (blobs / non-root trees). */
|
|
555
|
+
path?: string;
|
|
556
|
+
/** True when this SHA is the tip of a planned ref update (uploaded last). */
|
|
557
|
+
isRefTip: boolean;
|
|
558
|
+
}
|
|
559
|
+
/** Pre-push fee table (all fees in base/micro units, decimal strings). */
|
|
560
|
+
interface GitFeeEstimate {
|
|
561
|
+
objectCount: number;
|
|
562
|
+
totalObjectBytes: number;
|
|
563
|
+
/** Σ size × uploadFeePerByte. */
|
|
564
|
+
uploadFee: string;
|
|
565
|
+
/** Events to publish (refs event + announcement on first push). */
|
|
566
|
+
eventCount: number;
|
|
567
|
+
/** eventCount × per-event fee. */
|
|
568
|
+
eventFees: string;
|
|
569
|
+
/** uploadFee + eventFees. */
|
|
570
|
+
totalFee: string;
|
|
571
|
+
}
|
|
572
|
+
/** Serialized `PushPlan` — everything a confirm UI needs. */
|
|
573
|
+
interface GitEstimateResponse {
|
|
574
|
+
repoId: string;
|
|
575
|
+
refUpdates: GitRefUpdate[];
|
|
576
|
+
/** Full new ref state to publish (HEAD target first). */
|
|
577
|
+
newRefs: Record<string, string>;
|
|
578
|
+
headSymref: string | null;
|
|
579
|
+
objects: GitPlannedObject[];
|
|
580
|
+
/** sha→txId hints known WITHOUT uploading (remote tags + resolver finds). */
|
|
581
|
+
knownShaToTxId: Record<string, string>;
|
|
582
|
+
/** True when no kind:30617 exists yet — the push announces first. */
|
|
583
|
+
announceNeeded: boolean;
|
|
584
|
+
announcement: {
|
|
585
|
+
name: string;
|
|
586
|
+
description: string;
|
|
587
|
+
};
|
|
588
|
+
estimate: GitFeeEstimate;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* `POST /git/push` — plan + execute: upload the delta to Arweave and publish
|
|
592
|
+
* the cumulative kind:30618 (+ kind:30617 on first push). PERMANENT + PAID.
|
|
593
|
+
*/
|
|
594
|
+
interface GitPushRequest extends GitEstimateRequest {
|
|
595
|
+
/** Must be literally `true` — a push spends channel funds irreversibly. */
|
|
596
|
+
confirm: boolean;
|
|
597
|
+
}
|
|
598
|
+
/** One object-upload step result. */
|
|
599
|
+
interface GitUploadStep {
|
|
600
|
+
sha: string;
|
|
601
|
+
txId: string;
|
|
602
|
+
/** '0' when skipped (already on Arweave — content-addressed resume). */
|
|
603
|
+
feePaid: string;
|
|
604
|
+
skipped: boolean;
|
|
605
|
+
}
|
|
606
|
+
/** Receipt for one published event. */
|
|
607
|
+
interface GitPublishReceipt {
|
|
608
|
+
eventId: string;
|
|
609
|
+
feePaid: string;
|
|
610
|
+
}
|
|
611
|
+
/** Serialized `PushResult` — per-step receipts + total fees actually paid. */
|
|
612
|
+
interface GitPushResponse {
|
|
613
|
+
repoId: string;
|
|
614
|
+
refUpdates: GitRefUpdate[];
|
|
615
|
+
/** Per-object results, in plan order. */
|
|
616
|
+
uploads: GitUploadStep[];
|
|
617
|
+
/** kind:30617 receipt, or null when the repo was already announced. */
|
|
618
|
+
announceReceipt: GitPublishReceipt | null;
|
|
619
|
+
/** kind:30618 (cumulative refs + arweave map) receipt. */
|
|
620
|
+
refsReceipt: GitPublishReceipt;
|
|
621
|
+
/** Full sha→txId map published in the refs event. */
|
|
622
|
+
arweaveMap: Record<string, string>;
|
|
623
|
+
/** Total fees actually paid (uploads + events), base units, decimal. */
|
|
624
|
+
totalFeePaid: string;
|
|
625
|
+
/** The pre-push estimate the push ran under (compare against totalFeePaid). */
|
|
626
|
+
estimate: GitFeeEstimate;
|
|
627
|
+
}
|
|
628
|
+
/** `POST /git/issue` — publish a kind:1621 issue against a repo. PAID. */
|
|
629
|
+
interface GitIssueRequest {
|
|
630
|
+
repoAddr: GitRepoAddr;
|
|
631
|
+
/** Issue title (`subject` tag). */
|
|
632
|
+
title: string;
|
|
633
|
+
/** Issue body (Markdown content). */
|
|
634
|
+
body: string;
|
|
635
|
+
/** Labels (`t` tags). */
|
|
636
|
+
labels?: string[];
|
|
637
|
+
}
|
|
638
|
+
/** `POST /git/comment` — publish a kind:1622 comment on an issue/patch. PAID. */
|
|
639
|
+
interface GitCommentRequest {
|
|
640
|
+
repoAddr: GitRepoAddr;
|
|
641
|
+
/** Event id of the issue or patch being commented on. */
|
|
642
|
+
rootEventId: string;
|
|
643
|
+
/** Comment body (Markdown content). */
|
|
644
|
+
body: string;
|
|
645
|
+
/**
|
|
646
|
+
* Pubkey of the TARGET event's author (NIP-34 `p` threading tag — not the
|
|
647
|
+
* comment author). Defaults to the repo owner.
|
|
648
|
+
*/
|
|
649
|
+
parentAuthorPubkey?: string;
|
|
650
|
+
/** `e`-tag marker (default 'root': commenting directly on the issue/patch). */
|
|
651
|
+
marker?: 'root' | 'reply';
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* `POST /git/patch` — publish a kind:1617 patch. Supply EXACTLY ONE of
|
|
655
|
+
* `patchText` (literal `git format-patch` output) or `repoPath`+`range`
|
|
656
|
+
* (the daemon runs `git format-patch --stdout <range>` locally). PAID.
|
|
657
|
+
*/
|
|
658
|
+
interface GitPatchRequest {
|
|
659
|
+
repoAddr: GitRepoAddr;
|
|
660
|
+
/** Patch/PR title (`subject` tag). */
|
|
661
|
+
title: string;
|
|
662
|
+
/** Literal patch text. Mutually exclusive with `repoPath`+`range`. */
|
|
663
|
+
patchText?: string;
|
|
664
|
+
/** Local repository to run format-patch in. Requires `range`. */
|
|
665
|
+
repoPath?: string;
|
|
666
|
+
/** Revision range for format-patch (`<rev>`, `<rev>..<rev>`, `<rev>...<rev>`). */
|
|
667
|
+
range?: string;
|
|
668
|
+
/** Commit/parent pairs for `commit`/`parent-commit` tags. */
|
|
669
|
+
commits?: {
|
|
670
|
+
sha: string;
|
|
671
|
+
parentSha: string;
|
|
672
|
+
}[];
|
|
673
|
+
/** Branch name for the `t` tag. */
|
|
674
|
+
branch?: string;
|
|
675
|
+
}
|
|
676
|
+
type GitStatusValue = 'open' | 'applied' | 'closed' | 'draft';
|
|
677
|
+
/** `POST /git/status` — publish a kind:1630-1633 status event. PAID. */
|
|
678
|
+
interface GitStatusRequest {
|
|
679
|
+
repoAddr: GitRepoAddr;
|
|
680
|
+
/** Event id of the issue/patch whose status is being set. */
|
|
681
|
+
targetEventId: string;
|
|
682
|
+
/** open → 1630, applied → 1631, closed → 1632, draft → 1633. */
|
|
683
|
+
status: GitStatusValue;
|
|
684
|
+
/** Pubkey of the target event's author (`p` tag), when known. */
|
|
685
|
+
targetPubkey?: string;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Response of the single-event git publishes (issue/comment/patch/status):
|
|
689
|
+
* a normal publish receipt plus the NIP-34 kind that was published.
|
|
690
|
+
*/
|
|
691
|
+
interface GitEventResponse extends PublishResponse {
|
|
692
|
+
kind: number;
|
|
693
|
+
}
|
|
504
694
|
/** Uniform error envelope returned with non-2xx responses. */
|
|
505
695
|
interface ErrorResponse {
|
|
506
696
|
error: string;
|
|
507
697
|
detail?: string;
|
|
508
698
|
/** True when the caller should retry (e.g. still bootstrapping). */
|
|
509
699
|
retryable?: boolean;
|
|
700
|
+
/**
|
|
701
|
+
* Structured error payload for errors that carry data beyond a message —
|
|
702
|
+
* e.g. `non_fast_forward` includes `refs` (the rejected updates) and
|
|
703
|
+
* `oversize_objects` includes `objects` (sha/type/size/path). Extra
|
|
704
|
+
* top-level fields on the envelope are surfaced here by `ControlClient`.
|
|
705
|
+
*/
|
|
706
|
+
[extra: string]: unknown;
|
|
510
707
|
}
|
|
511
708
|
/**
|
|
512
709
|
* NIP-01 subscription filter. Tag filters use `#<single-letter>` keys, e.g.
|
|
@@ -524,7 +721,7 @@ interface NostrFilter {
|
|
|
524
721
|
}
|
|
525
722
|
|
|
526
723
|
/**
|
|
527
|
-
* Thin HTTP client for the `toon-clientd` localhost control
|
|
724
|
+
* Thin HTTP client for the `toon-clientd` localhost control API. Used by the
|
|
528
725
|
* MCP server (and any other caller) to drive the daemon without holding any
|
|
529
726
|
* chain keys or long-lived connections itself.
|
|
530
727
|
*/
|
|
@@ -534,7 +731,19 @@ declare class ControlApiError extends Error {
|
|
|
534
731
|
readonly status: number;
|
|
535
732
|
readonly retryable: boolean;
|
|
536
733
|
readonly detail?: string | undefined;
|
|
537
|
-
|
|
734
|
+
/**
|
|
735
|
+
* Structured payload for errors that carry data beyond a message — the
|
|
736
|
+
* extra top-level fields of the error envelope (e.g. `refs` on
|
|
737
|
+
* `non_fast_forward`, `objects` on `oversize_objects` from `/git/*`).
|
|
738
|
+
*/
|
|
739
|
+
readonly data?: Record<string, unknown> | undefined;
|
|
740
|
+
constructor(message: string, status: number, retryable: boolean, detail?: string | undefined,
|
|
741
|
+
/**
|
|
742
|
+
* Structured payload for errors that carry data beyond a message — the
|
|
743
|
+
* extra top-level fields of the error envelope (e.g. `refs` on
|
|
744
|
+
* `non_fast_forward`, `objects` on `oversize_objects` from `/git/*`).
|
|
745
|
+
*/
|
|
746
|
+
data?: Record<string, unknown> | undefined);
|
|
538
747
|
}
|
|
539
748
|
/** Thrown when the daemon is unreachable (not running / wrong port). */
|
|
540
749
|
declare class DaemonUnreachableError extends Error {
|
|
@@ -581,6 +790,23 @@ declare class ControlClient {
|
|
|
581
790
|
removeApex(body: RemoveApexRequest): Promise<TargetsResponse>;
|
|
582
791
|
fundWallet(body?: FundWalletRequest): Promise<FundWalletResponse>;
|
|
583
792
|
fundStatus(chain?: SettlementChain): Promise<FundStatusResponse>;
|
|
793
|
+
/**
|
|
794
|
+
* Plan + price a push without paying. Runs local git plumbing plus a relay
|
|
795
|
+
* remote-state read in the daemon, so allow more than the default budget on
|
|
796
|
+
* large repositories.
|
|
797
|
+
*/
|
|
798
|
+
gitEstimate(body: GitEstimateRequest): Promise<GitEstimateResponse>;
|
|
799
|
+
/**
|
|
800
|
+
* Execute a push (PAID: object uploads + event publishes). Uploads are
|
|
801
|
+
* sequential single-packet store writes, so a large first push can
|
|
802
|
+
* legitimately take minutes — budget accordingly rather than surfacing a
|
|
803
|
+
* still-working push as a timeout.
|
|
804
|
+
*/
|
|
805
|
+
gitPush(body: GitPushRequest): Promise<GitPushResponse>;
|
|
806
|
+
gitIssue(body: GitIssueRequest): Promise<GitEventResponse>;
|
|
807
|
+
gitComment(body: GitCommentRequest): Promise<GitEventResponse>;
|
|
808
|
+
gitPatch(body: GitPatchRequest): Promise<GitEventResponse>;
|
|
809
|
+
gitStatus(body: GitStatusRequest): Promise<GitEventResponse>;
|
|
584
810
|
/**
|
|
585
811
|
* Whether an HTTP method is safe to transparently retry. Idempotent reads
|
|
586
812
|
* (GET) and deletes can be replayed verbatim; a mutating POST cannot — the
|
|
@@ -807,7 +1033,7 @@ interface DaemonConfigFile {
|
|
|
807
1033
|
feePerEvent?: string;
|
|
808
1034
|
/** Channel nonce-watermark persistence file. Default `<dir>/channels.json`. */
|
|
809
1035
|
channelStorePath?: string;
|
|
810
|
-
/** Localhost control
|
|
1036
|
+
/** Localhost control API port. Default 8787. */
|
|
811
1037
|
httpPort?: number;
|
|
812
1038
|
/**
|
|
813
1039
|
* Active settlement chain for paid writes to the apex. A single daemon settles
|
|
@@ -864,7 +1090,7 @@ interface ResolvedDaemonConfig {
|
|
|
864
1090
|
/**
|
|
865
1091
|
* Whether a write uplink (proxy or BTP) is configured. FREE reads work
|
|
866
1092
|
* without one; a write attempt with `hasUplink === false` is rejected at the
|
|
867
|
-
* control
|
|
1093
|
+
* control API with a clear "configure an uplink" error (issue #69). Reads
|
|
868
1094
|
* (`subscribe`/`query`/`getEvents`) never consult this.
|
|
869
1095
|
*/
|
|
870
1096
|
hasUplink: boolean;
|
|
@@ -965,6 +1191,9 @@ interface ToonClientLike {
|
|
|
965
1191
|
destination?: string;
|
|
966
1192
|
claim?: unknown;
|
|
967
1193
|
ilpAmount?: bigint;
|
|
1194
|
+
/** HTTP request-target the payment-proxy replays (default '/write';
|
|
1195
|
+
* '/store' routes to the Arweave store/DVM backend). */
|
|
1196
|
+
proxyPath?: string;
|
|
968
1197
|
}): Promise<{
|
|
969
1198
|
success: boolean;
|
|
970
1199
|
eventId?: string;
|
|
@@ -1068,6 +1297,15 @@ interface ClientRunnerDeps {
|
|
|
1068
1297
|
logger?: (msg: string) => void;
|
|
1069
1298
|
/** Path to the dynamic-targets store (tests override). */
|
|
1070
1299
|
targetsPath?: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* Test seams for the `/git/*` pipeline (default: the real
|
|
1302
|
+
* @toon-protocol/rig implementations). `fetchRemoteState` opens relay
|
|
1303
|
+
* WebSockets, so tests inject a canned reader instead of hitting the network.
|
|
1304
|
+
*/
|
|
1305
|
+
gitDeps?: {
|
|
1306
|
+
fetchRemoteState?: typeof fetchRemoteState;
|
|
1307
|
+
createRepoReader?: (repoPath: string) => GitRepoReader;
|
|
1308
|
+
};
|
|
1071
1309
|
}
|
|
1072
1310
|
declare class ClientRunner {
|
|
1073
1311
|
private readonly config;
|
|
@@ -1075,6 +1313,10 @@ declare class ClientRunner {
|
|
|
1075
1313
|
private readonly createRelay;
|
|
1076
1314
|
private readonly log;
|
|
1077
1315
|
private readonly targetsPath?;
|
|
1316
|
+
/** Remote-state reader for `/git/*` (injectable — opens relay sockets). */
|
|
1317
|
+
private readonly fetchGitRemoteState;
|
|
1318
|
+
/** Local-repo reader factory for `/git/*` (injectable for tests). */
|
|
1319
|
+
private readonly createRepoReader;
|
|
1078
1320
|
/**
|
|
1079
1321
|
* Identity-level chain-read client. Reading your OWN on-chain wallet balance is
|
|
1080
1322
|
* a pure (wallet keys + chain RPC) operation that has nothing to do with the
|
|
@@ -1219,6 +1461,11 @@ declare class ClientRunner {
|
|
|
1219
1461
|
getFundStatus(chain?: FaucetChain): FundStatusResponse;
|
|
1220
1462
|
/** Full registry of relay + apex targets with per-target status. */
|
|
1221
1463
|
getTargets(): TargetsResponse;
|
|
1464
|
+
/**
|
|
1465
|
+
* Lazily open the apex channel on first paid write (deferred at bootstrap so
|
|
1466
|
+
* the wallet can be funded after start, #69) and persist it for resume.
|
|
1467
|
+
*/
|
|
1468
|
+
private ensureApexChannel;
|
|
1222
1469
|
/** Pay-to-write a single event through the selected (or default) apex. */
|
|
1223
1470
|
publish(req: PublishRequest): Promise<PublishResponse>;
|
|
1224
1471
|
/**
|
|
@@ -1279,7 +1526,7 @@ declare class ClientRunner {
|
|
|
1279
1526
|
* toon_status means it is WIRED, not that its RPC is live). A stall here used
|
|
1280
1527
|
* to block the whole control request until the client aborted, surfacing as a
|
|
1281
1528
|
* misleading "relay/apex unreachable" timeout (#199). Bound each attempt well
|
|
1282
|
-
* under the control
|
|
1529
|
+
* under the control API timeout and retry once so a single transient
|
|
1283
1530
|
* provider stall FAST-FAILS with an honest "balances handler / provider
|
|
1284
1531
|
* stalled" error instead of hanging.
|
|
1285
1532
|
*/
|
|
@@ -1308,6 +1555,52 @@ declare class ClientRunner {
|
|
|
1308
1555
|
* translate the resulting Web `Response` into the wire envelope.
|
|
1309
1556
|
*/
|
|
1310
1557
|
httpFetchPaid(req: HttpFetchPaidRequest): Promise<HttpFetchPaidResponse>;
|
|
1558
|
+
/**
|
|
1559
|
+
* The daemon `Publisher` implementation (see @toon-protocol/rig) for one
|
|
1560
|
+
* apex. Maps the interface onto the runner's production paid-write
|
|
1561
|
+
* machinery:
|
|
1562
|
+
*
|
|
1563
|
+
* - `getFeeRates`: flat `apex.feePerEvent` per publish + the network
|
|
1564
|
+
* per-byte upload rate.
|
|
1565
|
+
* - `uploadGitObject`: kind:5094 store write with Git-SHA/Git-Type/Repo
|
|
1566
|
+
* tags (the proven seed-pipeline shape), signed with the daemon key,
|
|
1567
|
+
* paid via signBalanceProof on the apex channel, routed to the store
|
|
1568
|
+
* destination (`POST /store`); the Arweave txId is decoded from the
|
|
1569
|
+
* FULFILL HTTP envelope.
|
|
1570
|
+
* - `publishEvent`: sign with the daemon key + the standard paid publish
|
|
1571
|
+
* path (signBalanceProof → publishEvent → feePaid). The daemon owns its
|
|
1572
|
+
* write routing (config-seeded relay via the apex), so the advisory
|
|
1573
|
+
* `relayUrls` list is not consulted here — remote-state reads DO use it.
|
|
1574
|
+
*/
|
|
1575
|
+
private gitPublisher;
|
|
1576
|
+
/** Upload one git object body as a paid kind:5094 store write. */
|
|
1577
|
+
private gitUploadObject;
|
|
1578
|
+
/** Sign (daemon key) + pay-to-publish one NIP-34 event via the apex. */
|
|
1579
|
+
private gitPublishEvent;
|
|
1580
|
+
/**
|
|
1581
|
+
* Plan a push: read the local repo + the remote NIP-34 state, classify ref
|
|
1582
|
+
* updates, compute the object delta, and price it. Shared by
|
|
1583
|
+
* estimate (returns the plan) and push (executes it).
|
|
1584
|
+
*/
|
|
1585
|
+
private planGitPush;
|
|
1586
|
+
/** Plan + price a push WITHOUT paying (backs `POST /git/estimate`). */
|
|
1587
|
+
gitEstimate(req: GitEstimateRequest): Promise<GitEstimateResponse>;
|
|
1588
|
+
/** Plan + EXECUTE a push: paid uploads + paid publishes (`POST /git/push`). */
|
|
1589
|
+
gitPush(req: GitPushRequest): Promise<GitPushResponse>;
|
|
1590
|
+
/** Build, sign, and pay-to-publish a kind:1621 issue. */
|
|
1591
|
+
gitIssue(req: GitIssueRequest): Promise<GitEventResponse>;
|
|
1592
|
+
/** Build, sign, and pay-to-publish a kind:1622 comment on an issue/patch. */
|
|
1593
|
+
gitComment(req: GitCommentRequest): Promise<GitEventResponse>;
|
|
1594
|
+
/**
|
|
1595
|
+
* Build, sign, and pay-to-publish a kind:1617 patch. Content is either the
|
|
1596
|
+
* supplied `patchText` or real `git format-patch --stdout <range>` output
|
|
1597
|
+
* from a local repository — exactly one source must be given.
|
|
1598
|
+
*/
|
|
1599
|
+
gitPatch(req: GitPatchRequest): Promise<GitEventResponse>;
|
|
1600
|
+
/** Build, sign, and pay-to-publish a kind:1630-1633 status event. */
|
|
1601
|
+
gitStatus(req: GitStatusRequest): Promise<GitEventResponse>;
|
|
1602
|
+
/** Sign a built NIP-34 event with the daemon key and pay-to-publish it. */
|
|
1603
|
+
private gitPublishSigned;
|
|
1311
1604
|
/** Graceful teardown: close every relay + stop every apex client. */
|
|
1312
1605
|
stop(): Promise<void>;
|
|
1313
1606
|
private selectApex;
|
|
@@ -1366,7 +1659,7 @@ interface ScaffoldOptions {
|
|
|
1366
1659
|
declare function scaffoldFirstRun(opts?: ScaffoldOptions): Promise<void>;
|
|
1367
1660
|
|
|
1368
1661
|
/**
|
|
1369
|
-
* Fastify route registration for the `toon-clientd` control
|
|
1662
|
+
* Fastify route registration for the `toon-clientd` control API. Each route
|
|
1370
1663
|
* is a thin adapter: parse/validate the request, call the `ClientRunner`, map
|
|
1371
1664
|
* errors to the uniform `ErrorResponse` envelope.
|
|
1372
1665
|
*
|
|
@@ -1404,7 +1697,7 @@ interface SpawnDaemonOptions {
|
|
|
1404
1697
|
*/
|
|
1405
1698
|
declare function spawnDaemonDetached(opts?: SpawnDaemonOptions): number;
|
|
1406
1699
|
/**
|
|
1407
|
-
* Poll the control
|
|
1700
|
+
* Poll the control API until the daemon answers `GET /status`, up to
|
|
1408
1701
|
* `timeoutMs`. Resolves true once reachable (NOT necessarily done
|
|
1409
1702
|
* bootstrapping — the BTP session can take a moment; callers surface
|
|
1410
1703
|
* `bootstrapping`).
|
|
@@ -1413,7 +1706,7 @@ declare function waitForReady(baseUrl: string, timeoutMs?: number, intervalMs?:
|
|
|
1413
1706
|
|
|
1414
1707
|
/**
|
|
1415
1708
|
* MCP tool definitions + dispatch. The MCP server is a thin proxy: each tool
|
|
1416
|
-
* maps to a `toon-clientd` control
|
|
1709
|
+
* maps to a `toon-clientd` control API call. This module is the testable core
|
|
1417
1710
|
* (no stdio / SDK transport) so the tool→HTTP mapping and the
|
|
1418
1711
|
* "bootstrapping — retry" handling can be unit-tested directly.
|
|
1419
1712
|
*/
|
|
@@ -1456,7 +1749,7 @@ interface ToolResult {
|
|
|
1456
1749
|
}
|
|
1457
1750
|
declare const TOOL_DEFINITIONS: ToolDefinition[];
|
|
1458
1751
|
/**
|
|
1459
|
-
* Dispatch an MCP tool call to the daemon control
|
|
1752
|
+
* Dispatch an MCP tool call to the daemon control API. Always resolves with a
|
|
1460
1753
|
* `ToolResult` (errors are encoded as `isError: true` text, not thrown, so the
|
|
1461
1754
|
* agent sees a readable message). A retryable error (daemon still
|
|
1462
1755
|
* bootstrapping) yields a clear "retry shortly" message.
|
|
@@ -1510,4 +1803,4 @@ interface JourneyResult {
|
|
|
1510
1803
|
*/
|
|
1511
1804
|
declare function runJourney(plan: JourneyPlan, client: ControlClient): Promise<JourneyResult>;
|
|
1512
1805
|
|
|
1513
|
-
export { type AddApexRequest, type AddApexResponse, type AddRelayRequest, type ApexNegotiationConfig, type ApexTargetStatus, type BalanceInfo, type BalancesResponse, type ChainStatus, type ChannelDepositRequest, type ChannelDepositResponse, type ChannelInfo, type ChannelsResponse, ClientRunner, type ClientRunnerDeps, type CloseChannelRequest, type CloseChannelResponse, ControlApiError, ControlClient, type ControlClientOptions, DEFAULT_KEYSTORE_PASSWORD, type DaemonConfigFile, DaemonUnreachableError, type DrainResult, type ErrorResponse, type EventsQuery, type EventsResponse, type FundStatusResponse, type FundWalletRequest, type FundWalletResponse, type HttpFetchPaidRequest, type HttpFetchPaidResponse, type JourneyPlan, type JourneyResult, type JourneyState, type JourneyStep, type JourneyStepResult, type MinimalWebSocket, type NostrFilter, NotReadyError, type OpenChannelRequest, PublishRejectedError, type PublishRequest, type PublishResponse, type PublishUnsignedRequest, type QueryRequest, type QueryResponse, RelaySubscription, type RelaySubscriptionOptions, type RelayTargetStatus, type RemoveApexRequest, type RemoveRelayRequest, type ResolvedDaemonConfig, type SettleChannelRequest, type SettleChannelResponse, type SettlementChain, type StatusResponse, type SubscribeRequest, type SubscribeResponse, type SwapClaim, type SwapRequest, type SwapResponse, TOOL_DEFINITIONS, type TargetsResponse, type ToolDefinition, type ToolResult, type ToonClientLike, type UploadMediaRequest, type UploadMediaResponse, type WebSocketFactory, acquireLock, configDir, defaultConfigPath, defaultKeystorePath, dispatchTool, hasConfiguredIdentity, isDaemonRunning, isProcessAlive, readConfigFile, readPid, registerRoutes, releaseLock, resolveConfig, resolveMnemonic, runJourney, scaffoldFirstRun, spawnDaemonDetached, waitForReady };
|
|
1806
|
+
export { type AddApexRequest, type AddApexResponse, type AddRelayRequest, type ApexNegotiationConfig, type ApexTargetStatus, type BalanceInfo, type BalancesResponse, type ChainStatus, type ChannelDepositRequest, type ChannelDepositResponse, type ChannelInfo, type ChannelsResponse, ClientRunner, type ClientRunnerDeps, type CloseChannelRequest, type CloseChannelResponse, ControlApiError, ControlClient, type ControlClientOptions, DEFAULT_KEYSTORE_PASSWORD, type DaemonConfigFile, DaemonUnreachableError, type DrainResult, type ErrorResponse, type EventsQuery, type EventsResponse, type FundStatusResponse, type FundWalletRequest, type FundWalletResponse, type GitCommentRequest, type GitEstimateRequest, type GitEstimateResponse, type GitEventResponse, type GitFeeEstimate, type GitIssueRequest, type GitPatchRequest, type GitPlannedObject, type GitPublishReceipt, type GitPushRequest, type GitPushResponse, type GitRefUpdate, type GitRepoAddr, type GitStatusRequest, type GitStatusValue, type GitUploadStep, type HttpFetchPaidRequest, type HttpFetchPaidResponse, type JourneyPlan, type JourneyResult, type JourneyState, type JourneyStep, type JourneyStepResult, type MinimalWebSocket, type NostrFilter, NotReadyError, type OpenChannelRequest, PublishRejectedError, type PublishRequest, type PublishResponse, type PublishUnsignedRequest, type QueryRequest, type QueryResponse, RelaySubscription, type RelaySubscriptionOptions, type RelayTargetStatus, type RemoveApexRequest, type RemoveRelayRequest, type ResolvedDaemonConfig, type SettleChannelRequest, type SettleChannelResponse, type SettlementChain, type StatusResponse, type SubscribeRequest, type SubscribeResponse, type SwapClaim, type SwapRequest, type SwapResponse, TOOL_DEFINITIONS, type TargetsResponse, type ToolDefinition, type ToolResult, type ToonClientLike, type UploadMediaRequest, type UploadMediaResponse, type WebSocketFactory, acquireLock, configDir, defaultConfigPath, defaultKeystorePath, dispatchTool, hasConfiguredIdentity, isDaemonRunning, isProcessAlive, readConfigFile, readPid, registerRoutes, releaseLock, resolveConfig, resolveMnemonic, runJourney, scaffoldFirstRun, spawnDaemonDetached, waitForReady };
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
hasConfiguredIdentity,
|
|
9
9
|
registerRoutes,
|
|
10
10
|
scaffoldFirstRun
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YVLSWU46.js";
|
|
12
12
|
import {
|
|
13
13
|
PUBLISH_TOOL,
|
|
14
14
|
TOOL_DEFINITIONS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
buildFollowListFilter,
|
|
19
19
|
buildProfileFilter,
|
|
20
20
|
dispatchTool
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SL7UGVOC.js";
|
|
22
22
|
import {
|
|
23
23
|
ControlApiError,
|
|
24
24
|
ControlClient,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
resolveMnemonic,
|
|
37
37
|
spawnDaemonDetached,
|
|
38
38
|
waitForReady
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UXCFHAUC.js";
|
|
40
40
|
import "./chunk-32QD72IL.js";
|
|
41
41
|
import "./chunk-DLYE6U2Z.js";
|
|
42
42
|
import "./chunk-LR7W2ISE.js";
|