ton-mesh-harness 0.13.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 +444 -0
- package/dist/cli.js +38739 -0
- package/dist/daemon/installer-utils.d.ts +103 -0
- package/dist/daemon/installer.d.ts +30 -0
- package/dist/daemon/linger.d.ts +10 -0
- package/dist/daemon/platform.d.ts +47 -0
- package/dist/daemon/ports.d.ts +14 -0
- package/dist/daemon/rldp-http-proxy-installer.d.ts +10 -0
- package/dist/daemon/service.d.ts +36 -0
- package/dist/daemon/tonutils-installer.d.ts +10 -0
- package/dist/daemon/tonutils-process.d.ts +90 -0
- package/dist/deeplink.d.ts +25 -0
- package/dist/dns.d.ts +39 -0
- package/dist/mcp.js +38097 -0
- package/dist/network.d.ts +5 -0
- package/dist/sdk/abort.d.ts +25 -0
- package/dist/sdk/agentic-config.d.ts +199 -0
- package/dist/sdk/agentic-sign.d.ts +48 -0
- package/dist/sdk/check.d.ts +24 -0
- package/dist/sdk/deploy.d.ts +96 -0
- package/dist/sdk/dns-helpers.d.ts +158 -0
- package/dist/sdk/dns-onchain.d.ts +39 -0
- package/dist/sdk/dns.d.ts +125 -0
- package/dist/sdk/endpoints.d.ts +58 -0
- package/dist/sdk/json-schemas.d.ts +38 -0
- package/dist/sdk/log.d.ts +43 -0
- package/dist/sdk/provenance.d.ts +87 -0
- package/dist/sdk/resolve-tx.d.ts +70 -0
- package/dist/sdk/schemas.d.ts +885 -0
- package/dist/sdk/site-record.d.ts +25 -0
- package/dist/sdk/status.d.ts +23 -0
- package/dist/sdk/walletkit-network.d.ts +30 -0
- package/dist/sdk.d.ts +46 -0
- package/dist/sdk.js +37789 -0
- package/dist/utils/http.d.ts +25 -0
- package/dist/utils/tunnel-config.d.ts +20 -0
- package/dist/version.d.ts +13 -0
- package/dist/wallet/FSStorage.d.ts +12 -0
- package/dist/wallet/SendProvider.d.ts +17 -0
- package/dist/wallet/Storage.d.ts +5 -0
- package/dist/wallet/TonConnectProvider.d.ts +48 -0
- package/dist/wallet/constants.d.ts +12 -0
- package/dist/wallet/ui.d.ts +13 -0
- package/package.json +105 -0
- package/skills/mesh-deploy.md +283 -0
- package/templates/.well-known/mcp.json +44 -0
- package/templates/github-workflow-agentic.yml +94 -0
- package/templates/github-workflow.yml +76 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mesh_site_record` SDK — build a Tonkeeper sign link that sets ONLY
|
|
3
|
+
* the `site` (dns_adnl_address) record for a `.ton` domain.
|
|
4
|
+
*
|
|
5
|
+
* Unlike `deploy()` with a site ADNL (which bundles a `storage` write and
|
|
6
|
+
* re-uploads a bag), this touches nothing but the site record: it resolves
|
|
7
|
+
* the domain NFT, builds the `change_dns_record` body, and returns a
|
|
8
|
+
* Tonkeeper transfer deeplink. No bag, no daemon, no TonConnect — the caller
|
|
9
|
+
* opens the deeplink in Tonkeeper and approves once.
|
|
10
|
+
*
|
|
11
|
+
* This is the programmatic twin of the `site-record` CLI subcommand; both
|
|
12
|
+
* render the same `SiteRecordResult`.
|
|
13
|
+
*
|
|
14
|
+
* NO `console.*` IN THIS FILE — lint-enforced.
|
|
15
|
+
*/
|
|
16
|
+
import { type SiteRecordResult } from './schemas';
|
|
17
|
+
/**
|
|
18
|
+
* Build the site-record deeplink for a domain + ADNL identity.
|
|
19
|
+
*
|
|
20
|
+
* Throws `SdkError(ERR_INVALID_INPUT)` for malformed input (bad domain /
|
|
21
|
+
* non-hex ADNL) and `SdkError(ERR_NO_DOMAIN)` when the domain NFT can't be
|
|
22
|
+
* resolved via TONAPI. Does NOT broadcast anything — the returned deeplink
|
|
23
|
+
* is what actually writes the record, once a wallet signs it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function siteRecord(rawInput: unknown): Promise<SiteRecordResult>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mesh_status` SDK — one-shot snapshot of a bag's network state.
|
|
3
|
+
*
|
|
4
|
+
* Where `verifyBagOnNetwork` polls until accessible-or-timeout, `status()`
|
|
5
|
+
* is a single TONAPI query plus an optional DNS-record read. Designed for
|
|
6
|
+
* the post-deploy "is my bag propagated?" question agents ask.
|
|
7
|
+
*
|
|
8
|
+
* Spec: docs/v0.8/mcp-core-requirements.md §F2 (deferred mesh_status,
|
|
9
|
+
* landed in rc6).
|
|
10
|
+
*
|
|
11
|
+
* NO `console.*` IN THIS FILE — lint-enforced.
|
|
12
|
+
*/
|
|
13
|
+
import { type StatusResult } from './schemas';
|
|
14
|
+
/**
|
|
15
|
+
* Single-shot status snapshot.
|
|
16
|
+
*
|
|
17
|
+
* Throws `SdkError(ERR_INVALID_INPUT)` for malformed input (bag_id empty,
|
|
18
|
+
* domain not a string). Network failures are absorbed — they surface as
|
|
19
|
+
* `bag_accessible: false` (TONAPI 404 / timeout / DNS error etc.) rather
|
|
20
|
+
* than thrown errors, because "is it propagated?" with no answer is
|
|
21
|
+
* meaningfully different from "the SDK crashed."
|
|
22
|
+
*/
|
|
23
|
+
export declare function status(rawInput: unknown): Promise<StatusResult>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny isolation layer for walletkit-specific factories. Keeping this
|
|
3
|
+
* in its own module means modules that DON'T sign or look up txs
|
|
4
|
+
* (e.g. agentic-config.ts, endpoints.ts, deploy.ts) don't pull in
|
|
5
|
+
* `@ton/walletkit` — which matters because walletkit ships ESM files
|
|
6
|
+
* with directory imports that Node 22+ rejects unless the build inlines
|
|
7
|
+
* `@ton/walletkit` (bun build externalizes every other dep but bundles
|
|
8
|
+
* this one — see scripts/build.ts).
|
|
9
|
+
*
|
|
10
|
+
* Only `agentic-sign.ts` and `resolve-tx.ts` import from here.
|
|
11
|
+
*
|
|
12
|
+
* NO `console.*` IN THIS FILE — lint-enforced.
|
|
13
|
+
*/
|
|
14
|
+
import { ApiClientToncenter, Network } from '@ton/walletkit';
|
|
15
|
+
import type { AgenticNetwork } from './agentic-config';
|
|
16
|
+
/**
|
|
17
|
+
* Convert our string-discriminated `AgenticNetwork` to walletkit's
|
|
18
|
+
* chainId-tagged `Network` object.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getWalletkitNetwork(network: AgenticNetwork): ReturnType<typeof Network.mainnet>;
|
|
21
|
+
/**
|
|
22
|
+
* Build an `ApiClientToncenter` for the given network using the
|
|
23
|
+
* canonical Toncenter v3 endpoint (single source of truth in
|
|
24
|
+
* `endpoints.ts`). The API key is optional — without it the client
|
|
25
|
+
* uses the public per-IP rate limit.
|
|
26
|
+
*
|
|
27
|
+
* Centralised so the signer (`agentic-sign.ts`) and the tx-hash
|
|
28
|
+
* resolver (`resolve-tx.ts`) don't both reconstruct the same config.
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildToncenterClient(network: AgenticNetwork, apiKey: string | undefined): ApiClientToncenter;
|
package/dist/sdk.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public SDK entry — what `import { ... } from 'ton-mesh-harness/sdk'`
|
|
3
|
+
* exposes to npm consumers.
|
|
4
|
+
*
|
|
5
|
+
* Stability contract:
|
|
6
|
+
*
|
|
7
|
+
* - Exports added here are subject to semver. Removing or renaming
|
|
8
|
+
* requires a major bump.
|
|
9
|
+
* - The CLI (`dist/cli.js`) and MCP server (`dist/mcp.js`) consume
|
|
10
|
+
* these same symbols internally — the surfaces stay aligned by
|
|
11
|
+
* construction.
|
|
12
|
+
* - We intentionally re-export from focused submodules rather than
|
|
13
|
+
* `export * from './sdk/index'` to keep the public surface
|
|
14
|
+
* enumerable in one file.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
*
|
|
18
|
+
* import {
|
|
19
|
+
* checkEnv,
|
|
20
|
+
* deploy,
|
|
21
|
+
* status,
|
|
22
|
+
* type DeployOptions,
|
|
23
|
+
* } from 'ton-mesh-harness/sdk'
|
|
24
|
+
*
|
|
25
|
+
* const result = await checkEnv()
|
|
26
|
+
* if (!result.ready) {
|
|
27
|
+
* // surface result.blocking[].fix_hint to the user
|
|
28
|
+
* return
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* for await (const ev of deploy({
|
|
32
|
+
* source_dir: './dist',
|
|
33
|
+
* domain: 'myprotocol.ton',
|
|
34
|
+
* wallet: { kind: 'tonconnect', connector: 'Tonkeeper' },
|
|
35
|
+
* })) {
|
|
36
|
+
* // handle event by ev.phase ...
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
39
|
+
export { checkEnv } from './sdk/check';
|
|
40
|
+
export { deploy, SdkError, type DeployInput, type DeployControl, } from './sdk/deploy';
|
|
41
|
+
export { status } from './sdk/status';
|
|
42
|
+
export { siteRecord } from './sdk/site-record';
|
|
43
|
+
export { CheckEnvOptionsSchema, CheckEnvResultSchema, DeployOptionsSchema, DeployResultSchema, DeployEventSchema, ErrorPayloadSchema, ErrCodeSchema, SiteRecordOptionsSchema, SiteRecordResultSchema, StatusOptionsSchema, StatusResultSchema, WalletSpecSchema, parseWalletInput, type CheckEnvOptions, type CheckEnvResult, type DeployOptions, type DeployResult, type DeployEvent, type DeployPhase, type ErrCode, type ErrorPayload, type SiteRecordOptions, type SiteRecordResult, type StatusOptions, type StatusResult, type WalletSpec, } from './sdk/schemas';
|
|
44
|
+
export { ALL_TOOLS, MESH_CHECK_ENV_TOOL, MESH_DEPLOY_TOOL, MESH_SITE_RECORD_TOOL, MESH_STATUS_TOOL, SUPPLEMENTARY_SCHEMAS, SCHEMA_VERSION, type ToolJsonSchema, type JsonSchema, } from './sdk/json-schemas';
|
|
45
|
+
export { createSdkLogger, type SdkLogger } from './sdk/log';
|
|
46
|
+
export { MESH_HARNESS_VERSION } from './version';
|