arc402-cli 0.7.4 → 0.8.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/MIGRATION-SPEC.md +108 -0
- package/dist/abis.js +14 -17
- package/dist/abis.js.map +1 -1
- package/dist/bundler.d.ts +1 -1
- package/dist/bundler.d.ts.map +1 -1
- package/dist/bundler.js +27 -61
- package/dist/bundler.js.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -9
- package/dist/client.js.map +1 -1
- package/dist/coinbase-smart-wallet.js +1 -4
- package/dist/coinbase-smart-wallet.js.map +1 -1
- package/dist/commands/accept.js +25 -28
- package/dist/commands/accept.js.map +1 -1
- package/dist/commands/agent-handshake.js +15 -18
- package/dist/commands/agent-handshake.js.map +1 -1
- package/dist/commands/agent.js +98 -104
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/agreements.js +62 -98
- package/dist/commands/agreements.js.map +1 -1
- package/dist/commands/arbitrator.js +45 -81
- package/dist/commands/arbitrator.js.map +1 -1
- package/dist/commands/arena-handshake.js +27 -30
- package/dist/commands/arena-handshake.js.map +1 -1
- package/dist/commands/arena.js +12 -18
- package/dist/commands/arena.js.map +1 -1
- package/dist/commands/backup.js +30 -36
- package/dist/commands/backup.js.map +1 -1
- package/dist/commands/cancel.js +15 -18
- package/dist/commands/cancel.js.map +1 -1
- package/dist/commands/channel.js +45 -81
- package/dist/commands/channel.js.map +1 -1
- package/dist/commands/coldstart.js +31 -34
- package/dist/commands/coldstart.js.map +1 -1
- package/dist/commands/config.js +23 -29
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/contract-interaction.js +12 -15
- package/dist/commands/contract-interaction.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +98 -135
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/deliver.js +37 -76
- package/dist/commands/deliver.js.map +1 -1
- package/dist/commands/discover.js +24 -27
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/dispute.js +104 -110
- package/dist/commands/dispute.js.map +1 -1
- package/dist/commands/doctor.js +16 -55
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/endpoint.js +56 -95
- package/dist/commands/endpoint.js.map +1 -1
- package/dist/commands/feed.js +11 -18
- package/dist/commands/feed.js.map +1 -1
- package/dist/commands/hire.js +37 -40
- package/dist/commands/hire.js.map +1 -1
- package/dist/commands/migrate.js +30 -33
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/negotiate.d.ts.map +1 -1
- package/dist/commands/negotiate.js +34 -36
- package/dist/commands/negotiate.js.map +1 -1
- package/dist/commands/openshell.js +68 -104
- package/dist/commands/openshell.js.map +1 -1
- package/dist/commands/owner.js +17 -20
- package/dist/commands/owner.js.map +1 -1
- package/dist/commands/policy.js +41 -43
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/relay.d.ts.map +1 -1
- package/dist/commands/relay.js +18 -51
- package/dist/commands/relay.js.map +1 -1
- package/dist/commands/remediate.js +20 -23
- package/dist/commands/remediate.js.map +1 -1
- package/dist/commands/reputation.js +25 -27
- package/dist/commands/reputation.js.map +1 -1
- package/dist/commands/setup.js +65 -104
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/trust.js +17 -20
- package/dist/commands/trust.js.map +1 -1
- package/dist/commands/verify.js +18 -21
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/wallet.js +619 -625
- package/dist/commands/wallet.js.map +1 -1
- package/dist/commands/watch.js +33 -36
- package/dist/commands/watch.js.map +1 -1
- package/dist/commands/watchtower.js +37 -73
- package/dist/commands/watchtower.js.map +1 -1
- package/dist/commands/workroom.d.ts.map +1 -1
- package/dist/commands/workroom.js +138 -171
- package/dist/commands/workroom.js.map +1 -1
- package/dist/config.js +21 -65
- package/dist/config.js.map +1 -1
- package/dist/daemon/config.d.ts.map +1 -1
- package/dist/daemon/config.js +16 -53
- package/dist/daemon/config.js.map +1 -1
- package/dist/daemon/hire-listener.d.ts +3 -3
- package/dist/daemon/hire-listener.d.ts.map +1 -1
- package/dist/daemon/hire-listener.js +13 -47
- package/dist/daemon/hire-listener.js.map +1 -1
- package/dist/daemon/index.d.ts +1 -1
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +50 -88
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/job-lifecycle.d.ts +1 -1
- package/dist/daemon/job-lifecycle.d.ts.map +1 -1
- package/dist/daemon/job-lifecycle.js +11 -51
- package/dist/daemon/job-lifecycle.js.map +1 -1
- package/dist/daemon/notify.d.ts +1 -1
- package/dist/daemon/notify.d.ts.map +1 -1
- package/dist/daemon/notify.js +19 -53
- package/dist/daemon/notify.js.map +1 -1
- package/dist/daemon/token-metering.js +8 -47
- package/dist/daemon/token-metering.js.map +1 -1
- package/dist/daemon/userops.d.ts +2 -2
- package/dist/daemon/userops.d.ts.map +1 -1
- package/dist/daemon/userops.js +23 -27
- package/dist/daemon/userops.js.map +1 -1
- package/dist/daemon/wallet-monitor.d.ts +1 -1
- package/dist/daemon/wallet-monitor.d.ts.map +1 -1
- package/dist/daemon/wallet-monitor.js +8 -12
- package/dist/daemon/wallet-monitor.js.map +1 -1
- package/dist/drain-v4.js +26 -64
- package/dist/drain-v4.js.map +1 -1
- package/dist/endpoint-config.js +20 -63
- package/dist/endpoint-config.js.map +1 -1
- package/dist/endpoint-notify.js +9 -48
- package/dist/endpoint-notify.js.map +1 -1
- package/dist/index.js +16 -50
- package/dist/index.js.map +1 -1
- package/dist/openshell-runtime.d.ts.map +1 -1
- package/dist/openshell-runtime.js +38 -82
- package/dist/openshell-runtime.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +77 -83
- package/dist/program.js.map +1 -1
- package/dist/repl.js +25 -31
- package/dist/repl.js.map +1 -1
- package/dist/signing.js +3 -6
- package/dist/signing.js.map +1 -1
- package/dist/telegram-notify.js +3 -40
- package/dist/telegram-notify.js.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +44 -50
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/Footer.js +4 -7
- package/dist/tui/Footer.js.map +1 -1
- package/dist/tui/Header.js +7 -13
- package/dist/tui/Header.js.map +1 -1
- package/dist/tui/InputLine.js +17 -23
- package/dist/tui/InputLine.js.map +1 -1
- package/dist/tui/Viewport.js +5 -8
- package/dist/tui/Viewport.js.map +1 -1
- package/dist/tui/WalletConnectPairing.d.ts +23 -0
- package/dist/tui/WalletConnectPairing.d.ts.map +1 -0
- package/dist/tui/WalletConnectPairing.js +75 -0
- package/dist/tui/WalletConnectPairing.js.map +1 -0
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +14 -21
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/useChat.js +13 -19
- package/dist/tui/useChat.js.map +1 -1
- package/dist/tui/useCommand.js +12 -18
- package/dist/tui/useCommand.js.map +1 -1
- package/dist/tui/useScroll.js +9 -12
- package/dist/tui/useScroll.js.map +1 -1
- package/dist/ui/banner.js +12 -19
- package/dist/ui/banner.js.map +1 -1
- package/dist/ui/colors.js +13 -19
- package/dist/ui/colors.js.map +1 -1
- package/dist/ui/format.js +6 -14
- package/dist/ui/format.js.map +1 -1
- package/dist/ui/spinner.js +6 -12
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/tree.js +3 -6
- package/dist/ui/tree.js.map +1 -1
- package/dist/utils/format.js +27 -41
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/hash.js +4 -42
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/time.js +2 -6
- package/dist/utils/time.js.map +1 -1
- package/dist/wallet-router.d.ts +1 -1
- package/dist/wallet-router.d.ts.map +1 -1
- package/dist/wallet-router.js +12 -19
- package/dist/wallet-router.js.map +1 -1
- package/dist/walletconnect-session.d.ts +1 -1
- package/dist/walletconnect-session.d.ts.map +1 -1
- package/dist/walletconnect-session.js +6 -11
- package/dist/walletconnect-session.js.map +1 -1
- package/dist/walletconnect.d.ts +6 -1
- package/dist/walletconnect.d.ts.map +1 -1
- package/dist/walletconnect.js +32 -35
- package/dist/walletconnect.js.map +1 -1
- package/package.json +7 -6
- package/src/bundler.ts +1 -1
- package/src/client.ts +1 -1
- package/src/commands/accept.ts +7 -7
- package/src/commands/agent-handshake.ts +4 -4
- package/src/commands/agent.ts +9 -9
- package/src/commands/agreements.ts +8 -8
- package/src/commands/arbitrator.ts +5 -5
- package/src/commands/arena-handshake.ts +6 -6
- package/src/commands/arena.ts +2 -2
- package/src/commands/backup.ts +1 -1
- package/src/commands/cancel.ts +6 -6
- package/src/commands/channel.ts +6 -6
- package/src/commands/coldstart.ts +5 -5
- package/src/commands/config.ts +2 -2
- package/src/commands/contract-interaction.ts +2 -2
- package/src/commands/daemon.ts +14 -11
- package/src/commands/deliver.ts +9 -9
- package/src/commands/discover.ts +5 -5
- package/src/commands/dispute.ts +7 -7
- package/src/commands/doctor.ts +2 -2
- package/src/commands/endpoint.ts +6 -6
- package/src/commands/feed.ts +1 -1
- package/src/commands/hire.ts +10 -10
- package/src/commands/migrate.ts +7 -7
- package/src/commands/negotiate.ts +6 -5
- package/src/commands/openshell.ts +4 -4
- package/src/commands/owner.ts +5 -5
- package/src/commands/policy.ts +5 -5
- package/src/commands/relay.ts +5 -1
- package/src/commands/remediate.ts +5 -5
- package/src/commands/reputation.ts +6 -6
- package/src/commands/setup.ts +1 -1
- package/src/commands/trust.ts +6 -6
- package/src/commands/verify.ts +6 -6
- package/src/commands/wallet.ts +15 -15
- package/src/commands/watch.ts +3 -3
- package/src/commands/watchtower.ts +6 -6
- package/src/commands/workroom.ts +14 -10
- package/src/daemon/config.ts +2 -1
- package/src/daemon/hire-listener.ts +3 -3
- package/src/daemon/index.ts +10 -9
- package/src/daemon/job-lifecycle.ts +1 -1
- package/src/daemon/notify.ts +4 -4
- package/src/daemon/userops.ts +4 -4
- package/src/daemon/wallet-monitor.ts +2 -2
- package/src/endpoint-notify.ts +1 -1
- package/src/index.ts +8 -7
- package/src/openshell-runtime.ts +5 -1
- package/src/program.ts +36 -36
- package/src/repl.ts +3 -3
- package/src/tui/App.tsx +15 -10
- package/src/tui/Header.tsx +1 -1
- package/src/tui/InputLine.tsx +1 -1
- package/src/tui/WalletConnectPairing.tsx +131 -0
- package/src/tui/index.tsx +7 -8
- package/src/tui/useChat.ts +1 -1
- package/src/tui/useCommand.ts +4 -4
- package/src/ui/banner.ts +2 -2
- package/src/ui/tree.ts +1 -1
- package/src/wallet-router.ts +2 -2
- package/src/walletconnect-session.ts +1 -1
- package/src/walletconnect.ts +20 -5
- package/tsconfig.json +16 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletconnect.js","sourceRoot":"","sources":["../src/walletconnect.ts"],"names":[],"mappings":";;;;;AAwDA,gDAoIC;AAMD,gEAeC;AAMD,kEA8EC;AArSD,4DAAwD;AACxD,oEAAiE;AACjE,sEAAqC;AACrC,gDAAwB;AACxB,4CAAoB;AAEpB,mEAAuF;AACvF,uDAAoE;AAEpE,oFAAoF;AACpF,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAe,EAAE,EAAE;IACnD,MAAM,GAAG,GAAG,MAAM,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtE,IAAI,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QAAE,OAAO;IAC3F,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC;AAYH,KAAK,UAAU,cAAc,CAAC,SAAiB;IAC7C,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;IACtD,MAAM,WAAW,GAAG,cAAI,CAAC,IA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B,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IACpH,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5B,MAAM,MAAM,GAAG,MAAM,0BAA0B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC7B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arc402-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "ARC-402 CLI for discovery, negotiation payloads, hire/remediation/dispute workflows, and network reads",
|
|
5
5
|
"bin": {
|
|
6
6
|
"arc402": "./dist/index.js"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@arc402/sdk": "^0.3.1",
|
|
15
15
|
"@coinbase/wallet-sdk": "^4.3.7",
|
|
16
16
|
"@types/better-sqlite3": "^7.6.13",
|
|
17
|
-
"@types/react": "^
|
|
17
|
+
"@types/react": "^19.0.0",
|
|
18
18
|
"@walletconnect/keyvaluestorage": "^1.1.1",
|
|
19
19
|
"@walletconnect/sign-client": "^2.17.4",
|
|
20
20
|
"better-sqlite3": "^12.8.0",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"cli-table3": "^0.6.3",
|
|
23
23
|
"commander": "^12.1.0",
|
|
24
24
|
"ethers": "^6.13.4",
|
|
25
|
-
"ink": "^
|
|
26
|
-
"ink-text-input": "^
|
|
25
|
+
"ink": "^6.0.0",
|
|
26
|
+
"ink-text-input": "^6.0.0",
|
|
27
27
|
"jose": "^6.2.1",
|
|
28
28
|
"ora": "^8.1.1",
|
|
29
29
|
"prompts": "^2.4.2",
|
|
30
30
|
"qrcode-terminal": "^0.12.0",
|
|
31
|
-
"react": "^
|
|
31
|
+
"react": "^19.0.0",
|
|
32
32
|
"smol-toml": "^1.6.0",
|
|
33
33
|
"tweetnacl": "^1.0.3",
|
|
34
34
|
"yaml": "^2.8.2"
|
|
@@ -38,5 +38,6 @@
|
|
|
38
38
|
"@types/prompts": "^2.4.9",
|
|
39
39
|
"@types/qrcode-terminal": "^0.12.2",
|
|
40
40
|
"typescript": "^5.4.5"
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
|
+
"type": "module"
|
|
42
43
|
}
|
package/src/bundler.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
2
|
import { createPrivateKey } from "crypto";
|
|
3
|
-
import type { Arc402Config } from "./config";
|
|
3
|
+
import type { Arc402Config } from "./config.js";
|
|
4
4
|
|
|
5
5
|
export const DEFAULT_ENTRY_POINT = "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
6
6
|
export const DEFAULT_BUNDLER_URL = "https://api.pimlico.io/v2/base/rpc";
|
package/src/client.ts
CHANGED
package/src/commands/accept.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ServiceAgreementClient } from "@arc402/sdk";
|
|
3
3
|
import { ethers } from "ethers";
|
|
4
|
-
import { loadConfig } from "../config";
|
|
5
|
-
import { requireSigner } from "../client";
|
|
6
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
7
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
8
|
-
import { resolveAgentEndpoint, notifyAgent, DEFAULT_REGISTRY_ADDRESS } from "../endpoint-notify";
|
|
9
|
-
import { c } from "../ui/colors";
|
|
10
|
-
import { startSpinner } from "../ui/spinner";
|
|
4
|
+
import { loadConfig } from "../config.js";
|
|
5
|
+
import { requireSigner } from "../client.js";
|
|
6
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
7
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
8
|
+
import { resolveAgentEndpoint, notifyAgent, DEFAULT_REGISTRY_ADDRESS } from "../endpoint-notify.js";
|
|
9
|
+
import { c } from "../ui/colors.js";
|
|
10
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
11
11
|
|
|
12
12
|
export function registerAcceptCommand(program: Command): void {
|
|
13
13
|
program.command("accept <id>").description("Provider accepts a proposed agreement").action(async (id) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { requireSigner } from "../client";
|
|
5
|
-
import { c } from "../ui/colors";
|
|
6
|
-
import { renderTree } from "../ui/tree";
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { requireSigner } from "../client.js";
|
|
5
|
+
import { c } from "../ui/colors.js";
|
|
6
|
+
import { renderTree } from "../ui/tree.js";
|
|
7
7
|
|
|
8
8
|
// Challenge-response: both agents sign a shared nonce with their agent key
|
|
9
9
|
// and verify each other against AgentRegistry
|
package/src/commands/agent.ts
CHANGED
|
@@ -2,17 +2,17 @@ import { Command } from "commander";
|
|
|
2
2
|
import { AgentRegistryClient } from "@arc402/sdk";
|
|
3
3
|
import { buildMetadata, uploadMetadata, decodeMetadata } from "@arc402/sdk";
|
|
4
4
|
import { ethers } from "ethers";
|
|
5
|
-
import { loadConfig, NETWORK_DEFAULTS } from "../config";
|
|
6
|
-
import { requireSigner } from "../client";
|
|
7
|
-
import { formatDate, getTrustTier } from "../utils/format";
|
|
8
|
-
import { AGENT_REGISTRY_ABI } from "../abis";
|
|
9
|
-
import { executeContractWriteViaWallet } from "../wallet-router";
|
|
10
|
-
import { getClient } from "../client";
|
|
5
|
+
import { loadConfig, NETWORK_DEFAULTS } from "../config.js";
|
|
6
|
+
import { requireSigner } from "../client.js";
|
|
7
|
+
import { formatDate, getTrustTier } from "../utils/format.js";
|
|
8
|
+
import { AGENT_REGISTRY_ABI } from "../abis.js";
|
|
9
|
+
import { executeContractWriteViaWallet } from "../wallet-router.js";
|
|
10
|
+
import { getClient } from "../client.js";
|
|
11
11
|
import prompts from "prompts";
|
|
12
12
|
import chalk from "chalk";
|
|
13
|
-
import { startSpinner } from "../ui/spinner";
|
|
14
|
-
import { renderTree } from "../ui/tree";
|
|
15
|
-
import { c } from "../ui/colors";
|
|
13
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
14
|
+
import { renderTree } from "../ui/tree.js";
|
|
15
|
+
import { c } from "../ui/colors.js";
|
|
16
16
|
|
|
17
17
|
// ─── helpers ──────────────────────────────────────────────────────────────────
|
|
18
18
|
|
|
@@ -2,14 +2,14 @@ import { Command } from "commander";
|
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
3
|
import * as readline from "readline";
|
|
4
4
|
import { AgreementStatus, ServiceAgreementClient } from "@arc402/sdk";
|
|
5
|
-
import { loadConfig } from "../config";
|
|
6
|
-
import { getClient } from "../client";
|
|
7
|
-
import { agreementStatusLabel, formatDate, printTable, truncateAddress } from "../utils/format";
|
|
8
|
-
import { formatDeadline } from "../utils/time";
|
|
9
|
-
import { hashString } from "../utils/hash";
|
|
10
|
-
import { c } from "../ui/colors";
|
|
11
|
-
import { renderTree } from "../ui/tree";
|
|
12
|
-
import { formatAddress } from "../ui/format";
|
|
5
|
+
import { loadConfig } from "../config.js";
|
|
6
|
+
import { getClient } from "../client.js";
|
|
7
|
+
import { agreementStatusLabel, formatDate, printTable, truncateAddress } from "../utils/format.js";
|
|
8
|
+
import { formatDeadline } from "../utils/time.js";
|
|
9
|
+
import { hashString } from "../utils/hash.js";
|
|
10
|
+
import { c } from "../ui/colors.js";
|
|
11
|
+
import { renderTree } from "../ui/tree.js";
|
|
12
|
+
import { formatAddress } from "../ui/format.js";
|
|
13
13
|
|
|
14
14
|
// ─── AgreementTree minimal ABI ────────────────────────────────────────────────
|
|
15
15
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { DisputeArbitrationClient } from "@arc402/sdk";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient, requireSigner } from "../client";
|
|
5
|
-
import { c } from "../ui/colors";
|
|
6
|
-
import { startSpinner } from "../ui/spinner";
|
|
7
|
-
import { renderTree } from "../ui/tree";
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient, requireSigner } from "../client.js";
|
|
5
|
+
import { c } from "../ui/colors.js";
|
|
6
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
7
|
+
import { renderTree } from "../ui/tree.js";
|
|
8
8
|
|
|
9
9
|
export function registerArbitratorCommand(program: Command): void {
|
|
10
10
|
const arbitrator = program
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig, getUsdcAddress } from "../config";
|
|
4
|
-
import { requireSigner } from "../client";
|
|
5
|
-
import { AGENT_REGISTRY_ABI } from "../abis";
|
|
6
|
-
import { startSpinner } from "../ui/spinner";
|
|
7
|
-
import { renderTree } from "../ui/tree";
|
|
8
|
-
import { c } from "../ui/colors";
|
|
3
|
+
import { loadConfig, getUsdcAddress } from "../config.js";
|
|
4
|
+
import { requireSigner } from "../client.js";
|
|
5
|
+
import { AGENT_REGISTRY_ABI } from "../abis.js";
|
|
6
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
7
|
+
import { renderTree } from "../ui/tree.js";
|
|
8
|
+
import { c } from "../ui/colors.js";
|
|
9
9
|
|
|
10
10
|
const DEFAULT_REGISTRY_ADDRESS = "0xD5c2851B00090c92Ba7F4723FB548bb30C9B6865";
|
|
11
11
|
|
package/src/commands/arena.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import chalk from "chalk";
|
|
3
|
-
import { runFeed, FeedOptions } from "./feed";
|
|
4
|
-
import { c } from "../ui/colors";
|
|
3
|
+
import { runFeed, FeedOptions } from "./feed.js";
|
|
4
|
+
import { c } from "../ui/colors.js";
|
|
5
5
|
|
|
6
6
|
const SUBGRAPH_URL = "https://api.studio.thegraph.com/query/1744310/arc-402/v0.2.0";
|
|
7
7
|
|
package/src/commands/backup.ts
CHANGED
package/src/commands/cancel.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ServiceAgreementClient } from "@arc402/sdk";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { requireSigner } from "../client";
|
|
5
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
6
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
7
|
-
import { c } from "../ui/colors";
|
|
8
|
-
import { startSpinner } from "../ui/spinner";
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { requireSigner } from "../client.js";
|
|
5
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
6
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
7
|
+
import { c } from "../ui/colors.js";
|
|
8
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
9
9
|
|
|
10
10
|
export function registerCancelCommand(program: Command): void {
|
|
11
11
|
program.command("cancel <id>").description("Cancel a proposed agreement; use --expired for post-deadline recovery paths").option("--expired", "Call expiredCancel()", false).action(async (id, opts) => {
|
package/src/commands/channel.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import { loadConfig } from "../config";
|
|
3
|
-
import { requireSigner, getClient } from "../client";
|
|
2
|
+
import { loadConfig } from "../config.js";
|
|
3
|
+
import { requireSigner, getClient } from "../client.js";
|
|
4
4
|
import { ChannelClient } from "@arc402/sdk";
|
|
5
5
|
import type { ChannelState } from "@arc402/sdk";
|
|
6
6
|
import * as fs from "fs";
|
|
7
7
|
import * as path from "path";
|
|
8
8
|
import * as os from "os";
|
|
9
|
-
import { c } from '../ui/colors';
|
|
10
|
-
import { startSpinner } from '../ui/spinner';
|
|
11
|
-
import { renderTree } from '../ui/tree';
|
|
12
|
-
import { formatAddress } from '../ui/format';
|
|
9
|
+
import { c } from '../ui/colors.js';
|
|
10
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
11
|
+
import { renderTree } from '../ui/tree.js';
|
|
12
|
+
import { formatAddress } from '../ui/format.js';
|
|
13
13
|
|
|
14
14
|
const CHANNEL_STATES_DIR = path.join(os.homedir(), ".arc402", "channel-states");
|
|
15
15
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient, requireSigner } from "../client";
|
|
5
|
-
import { c } from '../ui/colors';
|
|
6
|
-
import { startSpinner } from '../ui/spinner';
|
|
7
|
-
import { renderTree } from '../ui/tree';
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient, requireSigner } from "../client.js";
|
|
5
|
+
import { c } from '../ui/colors.js';
|
|
6
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
7
|
+
import { renderTree } from '../ui/tree.js';
|
|
8
8
|
|
|
9
9
|
const VOUCHING_REGISTRY_ABI = [
|
|
10
10
|
"function vouch(address newAgent, uint256 stakeAmount) external payable",
|
package/src/commands/config.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import prompts from "prompts";
|
|
3
3
|
import chalk from "chalk";
|
|
4
|
-
import { Arc402Config, NETWORK_DEFAULTS, configExists, loadConfig, saveConfig, getSubdomainApi, getWcProjectId } from "../config";
|
|
5
|
-
import { c } from '../ui/colors';
|
|
4
|
+
import { Arc402Config, NETWORK_DEFAULTS, configExists, loadConfig, saveConfig, getSubdomainApi, getWcProjectId } from "../config.js";
|
|
5
|
+
import { c } from '../ui/colors.js';
|
|
6
6
|
|
|
7
7
|
export function registerConfigCommands(program: Command): void {
|
|
8
8
|
const config = program.command("config").description("Manage ARC-402 CLI configuration");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { requireSigner } from "../client";
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { requireSigner } from "../client.js";
|
|
5
5
|
import { ContractInteractionClient, IntentPayload } from "@arc402/sdk";
|
|
6
6
|
|
|
7
7
|
export function registerContractInteractionCommands(program: Command): void {
|
package/src/commands/daemon.ts
CHANGED
|
@@ -6,12 +6,12 @@ import * as os from "os";
|
|
|
6
6
|
import { spawn, spawnSync } from "child_process";
|
|
7
7
|
import { ethers } from "ethers";
|
|
8
8
|
import prompts from "prompts";
|
|
9
|
-
import { loadConfig } from "../config";
|
|
10
|
-
import { requireSigner } from "../client";
|
|
11
|
-
import { startSpinner } from "../ui/spinner";
|
|
12
|
-
import { renderTree } from "../ui/tree";
|
|
13
|
-
import { c } from "../ui/colors";
|
|
14
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
9
|
+
import { loadConfig } from "../config.js";
|
|
10
|
+
import { requireSigner } from "../client.js";
|
|
11
|
+
import { startSpinner } from "../ui/spinner.js";
|
|
12
|
+
import { renderTree } from "../ui/tree.js";
|
|
13
|
+
import { c } from "../ui/colors.js";
|
|
14
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
15
15
|
import {
|
|
16
16
|
DAEMON_DIR,
|
|
17
17
|
DAEMON_PID,
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
DAEMON_TOML,
|
|
21
21
|
TEMPLATE_DAEMON_TOML,
|
|
22
22
|
loadDaemonConfig,
|
|
23
|
-
} from "../daemon/config";
|
|
24
|
-
import { buildNotifier } from "../daemon/notify";
|
|
23
|
+
} from "../daemon/config.js";
|
|
24
|
+
import { buildNotifier } from "../daemon/notify.js";
|
|
25
25
|
import {
|
|
26
26
|
buildOpenShellSecretExports,
|
|
27
27
|
buildOpenShellSshConfig,
|
|
@@ -31,7 +31,11 @@ import {
|
|
|
31
31
|
readOpenShellConfig,
|
|
32
32
|
runCmd,
|
|
33
33
|
writeOpenShellConfig,
|
|
34
|
-
} from "../openshell-runtime";
|
|
34
|
+
} from "../openshell-runtime.js";
|
|
35
|
+
|
|
36
|
+
import { fileURLToPath } from "node:url";
|
|
37
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
38
|
+
const __dirname = path.dirname(__filename);
|
|
35
39
|
|
|
36
40
|
// ─── Constants ────────────────────────────────────────────────────────────────
|
|
37
41
|
|
|
@@ -556,8 +560,7 @@ export function registerDaemonCommands(program: Command): void {
|
|
|
556
560
|
process.exit(result.status ?? 0);
|
|
557
561
|
} else {
|
|
558
562
|
// Foreground mode without sandbox: import and run directly (blocking)
|
|
559
|
-
|
|
560
|
-
const { runDaemon } = require("../daemon/index") as { runDaemon: (fg: boolean) => Promise<void> };
|
|
563
|
+
const { runDaemon } = await import("../daemon/index.js");
|
|
561
564
|
await runDaemon(true);
|
|
562
565
|
}
|
|
563
566
|
return;
|
package/src/commands/deliver.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ServiceAgreementClient, uploadEncryptedIPFS } from "@arc402/sdk";
|
|
3
3
|
import { ethers } from "ethers";
|
|
4
|
-
import { loadConfig } from "../config";
|
|
5
|
-
import { getClient, requireSigner } from "../client";
|
|
6
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
7
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
8
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
4
|
+
import { loadConfig } from "../config.js";
|
|
5
|
+
import { getClient, requireSigner } from "../client.js";
|
|
6
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
7
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
8
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
9
9
|
import { readFile } from "fs/promises";
|
|
10
10
|
import prompts from "prompts";
|
|
11
|
-
import { resolveAgentEndpoint, notifyAgent, DEFAULT_REGISTRY_ADDRESS } from "../endpoint-notify";
|
|
12
|
-
import { c } from '../ui/colors';
|
|
13
|
-
import { startSpinner } from '../ui/spinner';
|
|
14
|
-
import { renderTree } from '../ui/tree';
|
|
11
|
+
import { resolveAgentEndpoint, notifyAgent, DEFAULT_REGISTRY_ADDRESS } from "../endpoint-notify.js";
|
|
12
|
+
import { c } from '../ui/colors.js';
|
|
13
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
14
|
+
import { renderTree } from '../ui/tree.js';
|
|
15
15
|
|
|
16
16
|
export function registerDeliverCommand(program: Command): void {
|
|
17
17
|
program
|
package/src/commands/discover.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
3
|
import { AgentRegistryClient, CapabilityRegistryClient, ReputationOracleClient, SponsorshipAttestationClient } from "@arc402/sdk";
|
|
4
|
-
import { loadConfig } from "../config";
|
|
5
|
-
import { getClient } from "../client";
|
|
6
|
-
import { getTrustTier, printTable, truncateAddress } from "../utils/format";
|
|
7
|
-
import { c } from '../ui/colors';
|
|
8
|
-
import { renderTree } from '../ui/tree';
|
|
4
|
+
import { loadConfig } from "../config.js";
|
|
5
|
+
import { getClient } from "../client.js";
|
|
6
|
+
import { getTrustTier, printTable, truncateAddress } from "../utils/format.js";
|
|
7
|
+
import { c } from '../ui/colors.js';
|
|
8
|
+
import { renderTree } from '../ui/tree.js';
|
|
9
9
|
|
|
10
10
|
// Minimal ABI for the new getAgentsWithCapability function (Spec 18)
|
|
11
11
|
const CAPABILITY_REGISTRY_EXTRA_ABI = [
|
package/src/commands/dispute.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { Command } from "commander";
|
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
3
|
import prompts from "prompts";
|
|
4
4
|
import { ArbitrationVote, DirectDisputeReason, DisputeClass, DisputeMode, DisputeOutcome, EvidenceType, ServiceAgreementClient, DisputeArbitrationClient } from "@arc402/sdk";
|
|
5
|
-
import { loadConfig } from "../config";
|
|
6
|
-
import { getClient, requireSigner } from "../client";
|
|
7
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
8
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
9
|
-
import { SERVICE_AGREEMENT_ABI } from "../abis";
|
|
10
|
-
import { c } from '../ui/colors';
|
|
11
|
-
import { startSpinner } from '../ui/spinner';
|
|
5
|
+
import { loadConfig } from "../config.js";
|
|
6
|
+
import { getClient, requireSigner } from "../client.js";
|
|
7
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
8
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
9
|
+
import { SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
10
|
+
import { c } from '../ui/colors.js';
|
|
11
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
12
12
|
|
|
13
13
|
export function registerDisputeCommand(program: Command): void {
|
|
14
14
|
const dispute = program.command("dispute").description("Formal dispute workflow; remediation-first by default, with narrow hard-fail direct-dispute exceptions");
|
package/src/commands/doctor.ts
CHANGED
|
@@ -4,8 +4,8 @@ import * as fs from "fs";
|
|
|
4
4
|
import * as path from "path";
|
|
5
5
|
import * as os from "os";
|
|
6
6
|
import { spawnSync } from "child_process";
|
|
7
|
-
import { configExists, loadConfig } from "../config";
|
|
8
|
-
import { c } from "../ui/colors";
|
|
7
|
+
import { configExists, loadConfig } from "../config.js";
|
|
8
|
+
import { c } from "../ui/colors.js";
|
|
9
9
|
|
|
10
10
|
const ARC402_DIR = path.join(os.homedir(), ".arc402");
|
|
11
11
|
const CONFIG_PATH = path.join(ARC402_DIR, "config.json");
|
package/src/commands/endpoint.ts
CHANGED
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
loadEndpointConfig,
|
|
9
9
|
normalizeAgentName,
|
|
10
10
|
saveEndpointConfig,
|
|
11
|
-
} from "../endpoint-config";
|
|
12
|
-
import { configExists, getSubdomainApi, loadConfig, NETWORK_DEFAULTS } from "../config";
|
|
13
|
-
import { DAEMON_PID } from "../daemon/config";
|
|
14
|
-
import { detectDockerAccess, readOpenShellConfig, runCmd } from "../openshell-runtime";
|
|
15
|
-
import { getClient } from "../client";
|
|
11
|
+
} from "../endpoint-config.js";
|
|
12
|
+
import { configExists, getSubdomainApi, loadConfig, NETWORK_DEFAULTS } from "../config.js";
|
|
13
|
+
import { DAEMON_PID } from "../daemon/config.js";
|
|
14
|
+
import { detectDockerAccess, readOpenShellConfig, runCmd } from "../openshell-runtime.js";
|
|
15
|
+
import { getClient } from "../client.js";
|
|
16
16
|
import * as dns from "dns/promises";
|
|
17
17
|
import * as fs from "fs";
|
|
18
18
|
import * as net from "net";
|
|
19
19
|
import chalk from "chalk";
|
|
20
|
-
import { c } from '../ui/colors';
|
|
20
|
+
import { c } from '../ui/colors.js';
|
|
21
21
|
|
|
22
22
|
interface DoctorCheck {
|
|
23
23
|
layer: string;
|
package/src/commands/feed.ts
CHANGED
package/src/commands/hire.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ServiceAgreementClient, SessionManager } from "@arc402/sdk";
|
|
3
3
|
import { ethers } from "ethers";
|
|
4
|
-
import { getUsdcAddress, loadConfig } from "../config";
|
|
5
|
-
import { requireSigner } from "../client";
|
|
6
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
7
|
-
import { parseDuration } from "../utils/time";
|
|
8
|
-
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router";
|
|
9
|
-
import { AGENT_REGISTRY_ABI, SERVICE_AGREEMENT_ABI } from "../abis";
|
|
10
|
-
import { c } from '../ui/colors';
|
|
11
|
-
import { startSpinner } from '../ui/spinner';
|
|
12
|
-
import { renderTree, TreeItem } from '../ui/tree';
|
|
13
|
-
import { formatAddress } from '../ui/format';
|
|
4
|
+
import { getUsdcAddress, loadConfig } from "../config.js";
|
|
5
|
+
import { requireSigner } from "../client.js";
|
|
6
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
7
|
+
import { parseDuration } from "../utils/time.js";
|
|
8
|
+
import { printSenderInfo, executeContractWriteViaWallet } from "../wallet-router.js";
|
|
9
|
+
import { AGENT_REGISTRY_ABI, SERVICE_AGREEMENT_ABI } from "../abis.js";
|
|
10
|
+
import { c } from '../ui/colors.js';
|
|
11
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
12
|
+
import { renderTree, TreeItem } from '../ui/tree.js';
|
|
13
|
+
import { formatAddress } from '../ui/format.js';
|
|
14
14
|
|
|
15
15
|
const DEFAULT_REGISTRY_ADDRESS = "0xD5c2851B00090c92Ba7F4723FB548bb30C9B6865";
|
|
16
16
|
|
package/src/commands/migrate.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
|
-
import { loadConfig } from "../config";
|
|
4
|
-
import { getClient, requireSigner } from "../client";
|
|
5
|
-
import { c } from '../ui/colors';
|
|
6
|
-
import { startSpinner } from '../ui/spinner';
|
|
7
|
-
import { renderTree } from '../ui/tree';
|
|
8
|
-
import { formatAddress } from '../ui/format';
|
|
3
|
+
import { loadConfig } from "../config.js";
|
|
4
|
+
import { getClient, requireSigner } from "../client.js";
|
|
5
|
+
import { c } from '../ui/colors.js';
|
|
6
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
7
|
+
import { renderTree } from '../ui/tree.js';
|
|
8
|
+
import { formatAddress } from '../ui/format.js';
|
|
9
9
|
|
|
10
10
|
const MIGRATION_REGISTRY_ABI = [
|
|
11
11
|
"function registerMigration(address oldWallet, address newWallet) external",
|
|
@@ -91,7 +91,7 @@ export function registerMigrateCommands(program: Command): void {
|
|
|
91
91
|
migratedFrom: wasSource ? migratedFrom : null,
|
|
92
92
|
};
|
|
93
93
|
if (opts.json) return console.log(JSON.stringify(payload, null, 2));
|
|
94
|
-
const statusItems: import('../ui/tree').TreeItem[] = [
|
|
94
|
+
const statusItems: import('../ui/tree.js').TreeItem[] = [
|
|
95
95
|
{ label: 'Address', value: formatAddress(address) },
|
|
96
96
|
{ label: 'Active', value: formatAddress(activeWallet) },
|
|
97
97
|
{ label: 'Status', value: isCurrent ? 'current (no further migration)' : `migrated — resolves to ${formatAddress(activeWallet)}` },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import * as fs from "node:fs";
|
|
2
3
|
import { ethers } from "ethers";
|
|
3
4
|
import {
|
|
4
5
|
createSignedProposal,
|
|
@@ -8,10 +9,10 @@ import {
|
|
|
8
9
|
NegotiationGuard,
|
|
9
10
|
SessionManager,
|
|
10
11
|
} from "@arc402/sdk";
|
|
11
|
-
import { loadConfig } from "../config";
|
|
12
|
-
import { requireSigner, getClient } from "../client";
|
|
13
|
-
import { hashFile, hashString } from "../utils/hash";
|
|
14
|
-
import { c } from '../ui/colors';
|
|
12
|
+
import { loadConfig } from "../config.js";
|
|
13
|
+
import { requireSigner, getClient } from "../client.js";
|
|
14
|
+
import { hashFile, hashString } from "../utils/hash.js";
|
|
15
|
+
import { c } from '../ui/colors.js';
|
|
15
16
|
|
|
16
17
|
const sessionManager = new SessionManager();
|
|
17
18
|
|
|
@@ -232,7 +233,7 @@ export function registerNegotiateCommands(program: Command): void {
|
|
|
232
233
|
const guard = new NegotiationGuard({ agentRegistryAddress: config.agentRegistryAddress, runner: provider });
|
|
233
234
|
|
|
234
235
|
const rawJson = opts.message.startsWith("@")
|
|
235
|
-
?
|
|
236
|
+
? fs.readFileSync(opts.message.slice(1), "utf8")
|
|
236
237
|
: opts.message;
|
|
237
238
|
|
|
238
239
|
const result = await guard.verify(rawJson);
|
|
@@ -3,8 +3,8 @@ import * as fs from "fs";
|
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
import * as os from "os";
|
|
5
5
|
import * as YAML from "yaml";
|
|
6
|
-
import { c } from '../ui/colors';
|
|
7
|
-
import { startSpinner } from '../ui/spinner';
|
|
6
|
+
import { c } from '../ui/colors.js';
|
|
7
|
+
import { startSpinner } from '../ui/spinner.js';
|
|
8
8
|
import {
|
|
9
9
|
ARC402_DIR,
|
|
10
10
|
DEFAULT_RUNTIME_REMOTE_ROOT,
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
resolveOpenShellSecrets,
|
|
17
17
|
runCmd,
|
|
18
18
|
writeOpenShellConfig,
|
|
19
|
-
} from "../openshell-runtime";
|
|
20
|
-
import { DAEMON_PID, DAEMON_LOG, DAEMON_TOML } from "../daemon/config";
|
|
19
|
+
} from "../openshell-runtime.js";
|
|
20
|
+
import { DAEMON_PID, DAEMON_LOG, DAEMON_TOML } from "../daemon/config.js";
|
|
21
21
|
|
|
22
22
|
// ─── Constants ────────────────────────────────────────────────────────────────
|
|
23
23
|
|