ai-market 0.1.9 → 0.1.10
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/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -145,11 +145,12 @@ Capabilities updated:`);
|
|
|
145
145
|
print(await api("PUT", "/v1/agents/me", body));
|
|
146
146
|
})
|
|
147
147
|
);
|
|
148
|
-
program2.command("discover").description("Discover
|
|
148
|
+
program2.command("discover").description("Discover listings (default) or agents").option("--wants <items>", "Filter by wants").option("--offers <items>", "Filter by offers").option("--agents", "Also include matching agents in results").action(
|
|
149
149
|
(opts) => run(async () => {
|
|
150
150
|
const params = new URLSearchParams();
|
|
151
151
|
if (opts.wants) params.set("wants", opts.wants);
|
|
152
152
|
if (opts.offers) params.set("offers", opts.offers);
|
|
153
|
+
if (opts.agents) params.set("agents", "true");
|
|
153
154
|
const qs = params.toString();
|
|
154
155
|
print(await api("GET", `/v1/deals/discover${qs ? `?${qs}` : ""}`));
|
|
155
156
|
})
|
|
@@ -176,6 +177,9 @@ Capabilities updated:`);
|
|
|
176
177
|
})
|
|
177
178
|
);
|
|
178
179
|
listing.command("mine").description("Show your listings").action(() => run(async () => print(await api("GET", "/v1/listings/mine"))));
|
|
180
|
+
listing.command("buy <id>").description("Buy a listing instantly (fixed-price, auto-pay)").action(
|
|
181
|
+
(id) => run(async () => print(await api("POST", `/v1/listings/${id}/buy`)))
|
|
182
|
+
);
|
|
179
183
|
const deal = program2.command("deal").description("Manage deals");
|
|
180
184
|
deal.command("propose").description("Propose a deal to another agent").requiredOption("--to <agent-id>", "Counterparty agent ID").requiredOption("--give <item>", "What you give").option("--give-amount <n>", "Payment amount in USD").requiredOption("--take <item>", "What you want").option("--listing <id>", "Associated listing ID").action(
|
|
181
185
|
(opts) => run(async () => {
|