@omni-commerce/cli 0.18.0 → 0.19.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/dist/index.js +13 -27
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -84,7 +84,7 @@ async function openBrowser(url) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// src/version.ts
|
|
87
|
-
var CLI_VERSION = "0.
|
|
87
|
+
var CLI_VERSION = "0.19.0";
|
|
88
88
|
|
|
89
89
|
// src/browser-login.ts
|
|
90
90
|
function loginOrigin(baseUrl) {
|
|
@@ -439,27 +439,7 @@ var COMMANDS = [
|
|
|
439
439
|
httpMethod: "POST",
|
|
440
440
|
path: "/api/v1/agents/{agentId}/invoke",
|
|
441
441
|
summary: "Invoke a saved agent",
|
|
442
|
-
description: "Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.\n\nRequires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.\n\nSend one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.\n\nConversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.\n\naudience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.\n\nSend decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.",
|
|
443
|
-
flags: [
|
|
444
|
-
{
|
|
445
|
-
name: "agentId",
|
|
446
|
-
flag: "agent-id",
|
|
447
|
-
required: true,
|
|
448
|
-
source: "path"
|
|
449
|
-
}
|
|
450
|
-
],
|
|
451
|
-
acceptsJsonBody: true,
|
|
452
|
-
acceptsFile: false,
|
|
453
|
-
bodyRequired: true
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
trail: ["agents", "messages"],
|
|
457
|
-
resourcePath: ["agents"],
|
|
458
|
-
methodName: "messages",
|
|
459
|
-
httpMethod: "POST",
|
|
460
|
-
path: "/api/v1/agents/{agentId}/messages",
|
|
461
|
-
summary: "Invoke a saved agent (alias)",
|
|
462
|
-
description: "Alias of /agents/{agentId}/invoke with the identical request and response. Prefer /invoke.\n\nInvoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.\n\nRequires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.\n\nSend one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.\n\nConversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.\n\naudience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.\n\nSend decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.",
|
|
442
|
+
description: "Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.\n\n### Authorization\n\nRequires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.\n\n### Messages and conversation history\n\nSend one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.\n\nConversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.\n\naudience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.\n\n### Approvals\n\nSend decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.",
|
|
463
443
|
flags: [
|
|
464
444
|
{
|
|
465
445
|
name: "agentId",
|
|
@@ -479,7 +459,7 @@ var COMMANDS = [
|
|
|
479
459
|
httpMethod: "POST",
|
|
480
460
|
path: "/api/v1/agents/{agentId}/runs",
|
|
481
461
|
summary: "Start a saved agent run",
|
|
482
|
-
description: "Queue durable execution using the identical invocation contract. Poll Location, honoring Retry-After.\n\nInvoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.\n\nRequires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.\n\nSend one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.\n\nConversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.\n\naudience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.\n\nSend decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.",
|
|
462
|
+
description: "Queue durable execution using the identical invocation contract. Poll Location, honoring Retry-After.\n\nInvoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.\n\n### Authorization\n\nRequires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.\n\n### Messages and conversation history\n\nSend one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.\n\nConversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.\n\naudience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.\n\n### Approvals\n\nSend decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.",
|
|
483
463
|
flags: [
|
|
484
464
|
{
|
|
485
465
|
name: "agentId",
|
|
@@ -531,7 +511,7 @@ var COMMANDS = [
|
|
|
531
511
|
httpMethod: "POST",
|
|
532
512
|
path: "/api/v1/agents/general/invoke",
|
|
533
513
|
summary: "Invoke the Omni agent",
|
|
534
|
-
description: 'Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.\n\nA waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run
|
|
514
|
+
description: 'Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.\n\n### Waiting and approvals\n\nA waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run.\n\n### Messages and tools\n\nOmit `config.enabled_tools` to use the organization\'s agent tools. Send only new messages on each turn; thread_id continues the conversation stored in Omni sessions and checkpoints. Omit thread_id for a new conversation. Optional message IDs use native LangGraph replacement semantics, not run idempotency. audience=customer restricts tools to public storefront access without establishing a verified customer identity. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.',
|
|
535
515
|
flags: [],
|
|
536
516
|
acceptsJsonBody: true,
|
|
537
517
|
acceptsFile: false,
|
|
@@ -3120,6 +3100,12 @@ var COMMANDS = [
|
|
|
3120
3100
|
flag: "offset",
|
|
3121
3101
|
required: false,
|
|
3122
3102
|
source: "query"
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
name: "includeSummary",
|
|
3106
|
+
flag: "include-summary",
|
|
3107
|
+
required: false,
|
|
3108
|
+
source: "query"
|
|
3123
3109
|
}
|
|
3124
3110
|
],
|
|
3125
3111
|
acceptsJsonBody: false,
|
|
@@ -3133,7 +3119,7 @@ var COMMANDS = [
|
|
|
3133
3119
|
httpMethod: "POST",
|
|
3134
3120
|
path: "/api/v1/orders",
|
|
3135
3121
|
summary: "Create Order",
|
|
3136
|
-
description: "Create a native `agentic` order with line items. This operation uses the same upsert path as agentic checkout completion.\n\n### Authentication\n\nRequires `orders:write`.\n\n### Upsert behavior\n\n- Reusing an `externalOrderId` updates the existing order instead of creating a duplicate.\n- For one-row-per-SKU integrations, use the marketplace order ID as `externalOrderId` and the row ID as `items[].externalOrderItemId`.\n- When `totalAmount` is omitted, OmniCommerce recomputes it from all order lines after the upsert.\n\n### Pricing and catalog defaults\n\n- Each line can provide `
|
|
3122
|
+
description: "Create a native `agentic` order with line items. This operation uses the same upsert path as agentic checkout completion.\n\n### Authentication\n\nRequires `orders:write`.\n\n### Upsert behavior\n\n- Reusing an `externalOrderId` updates the existing order instead of creating a duplicate.\n- For one-row-per-SKU integrations, use the marketplace order ID as `externalOrderId` and the row ID as `items[].externalOrderItemId`.\n- When `totalAmount` is omitted, OmniCommerce recomputes it from all order lines after the upsert.\n\n### Pricing and catalog defaults\n\n- Each line can provide `unitPrice`, `paidPrice`, and `costPrice`.\n- When `productId` is provided, missing price or currency values may resolve from the product catalog.\n- An explicit `costPrice` updates `product_data.costPrice` and is snapshotted on the order line. Omitting it never clears an existing product cost.\n\n### Country resolution\n\nWhen `country` is empty, OmniCommerce may derive it from an unambiguous order currency, such as PHP for the Philippines. USD is not used to infer a country.",
|
|
3137
3123
|
flags: [],
|
|
3138
3124
|
acceptsJsonBody: true,
|
|
3139
3125
|
acceptsFile: false,
|
|
@@ -3888,7 +3874,7 @@ var COMMANDS = [
|
|
|
3888
3874
|
httpMethod: "POST",
|
|
3889
3875
|
path: "/api/v1/products/bulk-import",
|
|
3890
3876
|
summary: "Bulk Import Products from JSON or CSV",
|
|
3891
|
-
description: "Queue a bulk product import for the authenticated organization.\n\n### Destinations\n\nSupply targetMarketplaces and marketplaceStoreSelections to prepare for specific connected stores. Set deferStoreSelection=true to choose marketplaces only and assign stores later with POST /api/v1/products/marketplace-stores. Omit marketplaceStoreSelections and leave workflow.publish off when deferring. Automatic publishing requires catalog:sync in addition to catalog:write.\n\nSupply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`.
|
|
3877
|
+
description: "Queue a bulk product import for the authenticated organization.\n\n### Destinations\n\nSupply targetMarketplaces and marketplaceStoreSelections to prepare for specific connected stores. Set deferStoreSelection=true to choose marketplaces only and assign stores later with POST /api/v1/products/marketplace-stores. Omit marketplaceStoreSelections and leave workflow.publish off when deferring. Automatic publishing requires catalog:sync in addition to catalog:write.\n\nSupply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`. Taxonomy enrichment can propose missing required sale attributes in its existing attribute request when supported by product evidence. Supplied values take precedence. At Zalora publish time, a missing required Size defaults to One Size only when valid for the selected category and supplied size system. Missing or incompatible size systems and other required options block publishing. Each row remains a standalone product.\n\n### Input options\n\n- Upload a CSV (2 MiB) or JSON products file (8 MiB) using `multipart/form-data`.\n- Send JSON with a `products` array of 1\u20135,000 flat product objects (8 MiB request maximum).\n- Send JSON with inline `csvText`.\n- Send JSON referencing a stored `documentId`.\n\n### Asynchronous result\n\nThe API creates import rows, then queues draft creation and AI Review through Inngest. Completed import jobs expose `reviewBatchIds`, `reviewUrls`, and `reviewWarnings`. Set workflow.autoApplyHighConfidence=true with independent workflow.enrichmentAutoApplyThreshold and workflow.taxonomyAutoApplyThreshold (0.62\u20131) to apply qualifying proposals; image changes still require visual approval. autoApproveThreshold is a separate import-row setting, not a Review threshold. Set workflow.publish=true to queue publication to saved stores after every required scope for a product is approved and applied. Both automatic and manual approval resume publishing. Pending, rejected, failed and cancelled scopes block that product while eligible products continue. Poll GET /api/v1/jobs/{jobId}; publishing includes ordered per-product/store receipts and verified publish-job status. Import completed does not mean published.\n\nCancel an in-flight import with `POST /api/v1/jobs/{jobId}/cancel`.",
|
|
3892
3878
|
flags: [],
|
|
3893
3879
|
acceptsJsonBody: true,
|
|
3894
3880
|
acceptsFile: true,
|
|
@@ -7484,7 +7470,7 @@ ${unique.map((line) => ` omni ${line}`).join("\n")}
|
|
|
7484
7470
|
return 1;
|
|
7485
7471
|
}
|
|
7486
7472
|
const timeoutRaw = flagString(parsed.flags, "timeout");
|
|
7487
|
-
const timeoutInSeconds = timeoutRaw ? Number(timeoutRaw) : command2.path.startsWith("/api/v1/agents/") &&
|
|
7473
|
+
const timeoutInSeconds = timeoutRaw ? Number(timeoutRaw) : command2.path.startsWith("/api/v1/agents/") && command2.path.endsWith("/invoke") ? 780 : void 0;
|
|
7488
7474
|
const client = new OmniClient({
|
|
7489
7475
|
apiKey: credentials.apiKey,
|
|
7490
7476
|
baseUrl: credentials.baseUrl,
|