@t2000/cli 9.13.0 → 10.0.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/README.md +2 -2
- package/dist/{chunk-XPCTSCTS.js → chunk-45A36TR5.js} +11 -11
- package/dist/{chunk-XPCTSCTS.js.map → chunk-45A36TR5.js.map} +1 -1
- package/dist/{dist-ZIRF2Q6M.js → dist-6UOQ3CIE.js} +6 -6
- package/dist/{dist-WU4EKM5J.js → dist-GRR5N77K.js} +57 -57
- package/dist/{dist-WU4EKM5J.js.map → dist-GRR5N77K.js.map} +1 -1
- package/dist/index.js +71 -70
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- /package/dist/{dist-ZIRF2Q6M.js.map → dist-6UOQ3CIE.js.map} +0 -0
package/README.md
CHANGED
|
@@ -24,8 +24,8 @@ t2 send 5 USDC alice.sui # gasless USDC send to a SuiNS name
|
|
|
24
24
|
t2 swap 100 USDC SUI # best-route swap via Cetus
|
|
25
25
|
t2 pay https://mpp.t2000.ai/openai/v1/chat/completions --data '…'
|
|
26
26
|
t2 agents # look up agents in the directory (agents.t2000.ai)
|
|
27
|
-
t2
|
|
28
|
-
t2 browse "market report" # find
|
|
27
|
+
t2 service create --name "Sui market report" --price 5 --sla 24h # sell deliverable work — no server needed
|
|
28
|
+
t2 browse "market report" # find agent services; hire with t2 job create --agent … --service …
|
|
29
29
|
t2 job watch --mine # your provider inbox — every job selling to you
|
|
30
30
|
t2 agent sell https://api.you.com/v1 # or list your own x402 endpoint (per-call, live-probed)
|
|
31
31
|
t2 mcp install # wire Claude Desktop / Cursor / Windsurf
|
|
@@ -12197,27 +12197,27 @@ async function commerceFetchJson(url, init) {
|
|
|
12197
12197
|
}
|
|
12198
12198
|
return json;
|
|
12199
12199
|
}
|
|
12200
|
-
async function
|
|
12200
|
+
async function listServices(base, filter = {}) {
|
|
12201
12201
|
const params = new URLSearchParams();
|
|
12202
12202
|
if (filter.agent) params.set("agent", filter.agent);
|
|
12203
12203
|
if (filter.query) params.set("q", filter.query);
|
|
12204
12204
|
const qs = params.size > 0 ? `?${params.toString()}` : "";
|
|
12205
|
-
const json = await commerceFetchJson(`${base}/
|
|
12206
|
-
const
|
|
12207
|
-
return { total: json.total ??
|
|
12205
|
+
const json = await commerceFetchJson(`${base}/services${qs}`);
|
|
12206
|
+
const services = json.services ?? [];
|
|
12207
|
+
return { total: json.total ?? services.length, services };
|
|
12208
12208
|
}
|
|
12209
|
-
async function
|
|
12210
|
-
const {
|
|
12209
|
+
async function fetchService(base, agent, slug) {
|
|
12210
|
+
const { services: rows } = await listServices(base, { agent });
|
|
12211
12211
|
const match = rows.find((o) => o.slug === slug.trim().toLowerCase());
|
|
12212
12212
|
if (!match) {
|
|
12213
12213
|
const live = rows.filter((o) => !o.retired).map((o) => o.slug);
|
|
12214
12214
|
throw new Error(
|
|
12215
|
-
`Agent ${truncateAddress(agent)} has no
|
|
12215
|
+
`Agent ${truncateAddress(agent)} has no service "${slug}".` + (live.length > 0 ? ` Live services: ${live.join(", ")}` : "")
|
|
12216
12216
|
);
|
|
12217
12217
|
}
|
|
12218
12218
|
if (match.retired) {
|
|
12219
12219
|
throw new Error(
|
|
12220
|
-
`
|
|
12220
|
+
`Service "${slug}" is retired \u2014 the seller no longer sells it.`
|
|
12221
12221
|
);
|
|
12222
12222
|
}
|
|
12223
12223
|
return match;
|
|
@@ -12820,8 +12820,8 @@ export {
|
|
|
12820
12820
|
jobActionsFor,
|
|
12821
12821
|
verifyJobForSeller,
|
|
12822
12822
|
DEFAULT_COMMERCE_API_BASE,
|
|
12823
|
-
|
|
12824
|
-
|
|
12823
|
+
listServices,
|
|
12824
|
+
fetchService,
|
|
12825
12825
|
putJobSpec,
|
|
12826
12826
|
getJobSpec,
|
|
12827
12827
|
SPONSORED_PYTH_DEPENDENT_PROVIDERS,
|
|
@@ -12863,4 +12863,4 @@ export {
|
|
|
12863
12863
|
@scure/bip39/index.js:
|
|
12864
12864
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
12865
12865
|
*/
|
|
12866
|
-
//# sourceMappingURL=chunk-
|
|
12866
|
+
//# sourceMappingURL=chunk-45A36TR5.js.map
|