@omni-commerce/cli 0.17.0 → 0.18.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 -0
- package/dist/index.js +168 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @omni-commerce/cli
|
|
2
2
|
|
|
3
|
+
CLI 0.18.0 adds `omni email list-accounts`, `search`, `get-message` and `create-draft` for your own connected mailbox. Run `omni auth login` again to receive the `email:read` and `email:write` scopes; nothing is sent.
|
|
4
|
+
|
|
3
5
|
CLI 0.17.0 exposes normalized order attribution through `omni orders list`, `omni orders get`, and `omni analytics get-orders`. Use `--from`, `--to`, `--store`, `--currency`, `--time-zone`, and `--format json` for scoped channel/creator reports.
|
|
4
6
|
|
|
5
7
|
CLI 0.16.0 supports marketplace-only bulk import and enrichment, including CSV uploads. Use `omni products assign-marketplace-stores` to save stores before publishing.
|
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.18.0";
|
|
88
88
|
|
|
89
89
|
// src/browser-login.ts
|
|
90
90
|
function loginOrigin(baseUrl) {
|
|
@@ -432,14 +432,54 @@ var COMMANDS = [
|
|
|
432
432
|
acceptsFile: false,
|
|
433
433
|
bodyRequired: true
|
|
434
434
|
},
|
|
435
|
+
{
|
|
436
|
+
trail: ["agents", "invoke"],
|
|
437
|
+
resourcePath: ["agents"],
|
|
438
|
+
methodName: "invoke",
|
|
439
|
+
httpMethod: "POST",
|
|
440
|
+
path: "/api/v1/agents/{agentId}/invoke",
|
|
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
|
+
},
|
|
435
455
|
{
|
|
436
456
|
trail: ["agents", "messages"],
|
|
437
457
|
resourcePath: ["agents"],
|
|
438
458
|
methodName: "messages",
|
|
439
459
|
httpMethod: "POST",
|
|
440
460
|
path: "/api/v1/agents/{agentId}/messages",
|
|
441
|
-
summary: "
|
|
442
|
-
description: "
|
|
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.",
|
|
463
|
+
flags: [
|
|
464
|
+
{
|
|
465
|
+
name: "agentId",
|
|
466
|
+
flag: "agent-id",
|
|
467
|
+
required: true,
|
|
468
|
+
source: "path"
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
acceptsJsonBody: true,
|
|
472
|
+
acceptsFile: false,
|
|
473
|
+
bodyRequired: true
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
trail: ["agents", "runs"],
|
|
477
|
+
resourcePath: ["agents"],
|
|
478
|
+
methodName: "runs",
|
|
479
|
+
httpMethod: "POST",
|
|
480
|
+
path: "/api/v1/agents/{agentId}/runs",
|
|
481
|
+
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.",
|
|
443
483
|
flags: [
|
|
444
484
|
{
|
|
445
485
|
name: "agentId",
|
|
@@ -458,8 +498,8 @@ var COMMANDS = [
|
|
|
458
498
|
methodName: "getRuns",
|
|
459
499
|
httpMethod: "GET",
|
|
460
500
|
path: "/api/v1/agents/{agentId}/runs/{runId}",
|
|
461
|
-
summary: "Get
|
|
462
|
-
description: "Read
|
|
501
|
+
summary: "Get a saved agent run",
|
|
502
|
+
description: "Read the canonical run resource. Organization, caller, credential and exact agent access are checked again. Requires agents:invoke.",
|
|
463
503
|
flags: [
|
|
464
504
|
{
|
|
465
505
|
name: "agentId",
|
|
@@ -491,7 +531,7 @@ var COMMANDS = [
|
|
|
491
531
|
httpMethod: "POST",
|
|
492
532
|
path: "/api/v1/agents/general/invoke",
|
|
493
533
|
summary: "Invoke the Omni agent",
|
|
494
|
-
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. Omit `config.enabled_tools` to use the organization\'s agent tools. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.',
|
|
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. Omit `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.',
|
|
495
535
|
flags: [],
|
|
496
536
|
acceptsJsonBody: true,
|
|
497
537
|
acceptsFile: false,
|
|
@@ -2297,6 +2337,121 @@ var COMMANDS = [
|
|
|
2297
2337
|
acceptsFile: false,
|
|
2298
2338
|
bodyRequired: false
|
|
2299
2339
|
},
|
|
2340
|
+
{
|
|
2341
|
+
trail: ["email", "list-accounts"],
|
|
2342
|
+
resourcePath: ["email"],
|
|
2343
|
+
methodName: "listAccounts",
|
|
2344
|
+
httpMethod: "GET",
|
|
2345
|
+
path: "/api/v1/email/accounts",
|
|
2346
|
+
summary: "List Email Accounts",
|
|
2347
|
+
description: "Your connected Gmail and Outlook accounts, default first. Pass an account's `connectionId` to the other email endpoints to choose it.\n\n### Authorization\n\nRequires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.",
|
|
2348
|
+
flags: [
|
|
2349
|
+
{
|
|
2350
|
+
name: "organizationId",
|
|
2351
|
+
flag: "organization-id",
|
|
2352
|
+
required: false,
|
|
2353
|
+
source: "query"
|
|
2354
|
+
}
|
|
2355
|
+
],
|
|
2356
|
+
acceptsJsonBody: false,
|
|
2357
|
+
acceptsFile: false,
|
|
2358
|
+
bodyRequired: false
|
|
2359
|
+
},
|
|
2360
|
+
{
|
|
2361
|
+
trail: ["email", "create-draft"],
|
|
2362
|
+
resourcePath: ["email"],
|
|
2363
|
+
methodName: "createDraft",
|
|
2364
|
+
httpMethod: "POST",
|
|
2365
|
+
path: "/api/v1/email/drafts",
|
|
2366
|
+
summary: "Create Email Draft",
|
|
2367
|
+
description: "Save a draft in your mailbox; nothing is sent. Pass `replyToMessageId` (and `threadId`) from Search Emails to draft a reply in its conversation. Review and send it from Gmail or Outlook.\n\nWhen the provider saved a draft whose threading could not be verified, the request fails with `unverifiedDraftId` in `data` so you can find or discard it.\n\n### Authorization\n\nRequires `email:write` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.",
|
|
2368
|
+
flags: [],
|
|
2369
|
+
acceptsJsonBody: true,
|
|
2370
|
+
acceptsFile: false,
|
|
2371
|
+
bodyRequired: true
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
trail: ["email", "get-message"],
|
|
2375
|
+
resourcePath: ["email"],
|
|
2376
|
+
methodName: "getMessage",
|
|
2377
|
+
httpMethod: "GET",
|
|
2378
|
+
path: "/api/v1/email/messages/{messageId}",
|
|
2379
|
+
summary: "Get Email Message",
|
|
2380
|
+
description: "One message from your mailbox: headers, plain-text body (at most 12,000 characters) and attachment metadata. Use a message `id` from Search Emails; encode it as one path segment.\n\n### Authorization\n\nRequires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.",
|
|
2381
|
+
flags: [
|
|
2382
|
+
{
|
|
2383
|
+
name: "messageId",
|
|
2384
|
+
flag: "message-id",
|
|
2385
|
+
required: true,
|
|
2386
|
+
source: "path"
|
|
2387
|
+
},
|
|
2388
|
+
{
|
|
2389
|
+
name: "connectionId",
|
|
2390
|
+
flag: "connection-id",
|
|
2391
|
+
required: false,
|
|
2392
|
+
source: "query"
|
|
2393
|
+
},
|
|
2394
|
+
{
|
|
2395
|
+
name: "organizationId",
|
|
2396
|
+
flag: "organization-id",
|
|
2397
|
+
required: false,
|
|
2398
|
+
source: "query"
|
|
2399
|
+
}
|
|
2400
|
+
],
|
|
2401
|
+
acceptsJsonBody: false,
|
|
2402
|
+
acceptsFile: false,
|
|
2403
|
+
bodyRequired: false
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
trail: ["email", "search"],
|
|
2407
|
+
resourcePath: ["email"],
|
|
2408
|
+
methodName: "search",
|
|
2409
|
+
httpMethod: "GET",
|
|
2410
|
+
path: "/api/v1/email/search",
|
|
2411
|
+
summary: "Search Emails",
|
|
2412
|
+
description: "One page of message summaries (subject, from, to, date, snippet, read and draft state) from your mailbox. Gmail accepts its search operators (`from:`, `subject:`, `newer_than:`); Outlook takes free text.\n\nPass `nextPageToken` back as `pageToken` with the same mailbox, query, `readState` and `maxResults` until it is null; a token is refused with different search arguments. `readState=unread` filters unread messages, which is not the same as unreplied.\n\n### Authorization\n\nRequires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.",
|
|
2413
|
+
flags: [
|
|
2414
|
+
{
|
|
2415
|
+
name: "query",
|
|
2416
|
+
flag: "query",
|
|
2417
|
+
required: false,
|
|
2418
|
+
source: "query"
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
name: "connectionId",
|
|
2422
|
+
flag: "connection-id",
|
|
2423
|
+
required: false,
|
|
2424
|
+
source: "query"
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
name: "maxResults",
|
|
2428
|
+
flag: "max-results",
|
|
2429
|
+
required: false,
|
|
2430
|
+
source: "query"
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
name: "pageToken",
|
|
2434
|
+
flag: "page-token",
|
|
2435
|
+
required: false,
|
|
2436
|
+
source: "query"
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
name: "readState",
|
|
2440
|
+
flag: "read-state",
|
|
2441
|
+
required: false,
|
|
2442
|
+
source: "query"
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
name: "organizationId",
|
|
2446
|
+
flag: "organization-id",
|
|
2447
|
+
required: false,
|
|
2448
|
+
source: "query"
|
|
2449
|
+
}
|
|
2450
|
+
],
|
|
2451
|
+
acceptsJsonBody: false,
|
|
2452
|
+
acceptsFile: false,
|
|
2453
|
+
bodyRequired: false
|
|
2454
|
+
},
|
|
2300
2455
|
{
|
|
2301
2456
|
trail: ["evaluate", "run"],
|
|
2302
2457
|
resourcePath: ["evaluate"],
|
|
@@ -6488,6 +6643,12 @@ var CAMPAIGN_INPUTS = {
|
|
|
6488
6643
|
type: "string",
|
|
6489
6644
|
enum: ["general", "shop_follow"]
|
|
6490
6645
|
},
|
|
6646
|
+
redemptionPoints: {
|
|
6647
|
+
description: "Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types.",
|
|
6648
|
+
type: "integer",
|
|
6649
|
+
exclusiveMinimum: 0,
|
|
6650
|
+
maximum: 9007199254740991
|
|
6651
|
+
},
|
|
6491
6652
|
repeatPurchaseMinCount: {
|
|
6492
6653
|
description: "Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer.",
|
|
6493
6654
|
type: "integer",
|
|
@@ -7323,7 +7484,7 @@ ${unique.map((line) => ` omni ${line}`).join("\n")}
|
|
|
7323
7484
|
return 1;
|
|
7324
7485
|
}
|
|
7325
7486
|
const timeoutRaw = flagString(parsed.flags, "timeout");
|
|
7326
|
-
const timeoutInSeconds = timeoutRaw ? Number(timeoutRaw) : command2.path
|
|
7487
|
+
const timeoutInSeconds = timeoutRaw ? Number(timeoutRaw) : command2.path.startsWith("/api/v1/agents/") && (command2.path.endsWith("/invoke") || command2.path.endsWith("/messages")) ? 780 : void 0;
|
|
7327
7488
|
const client = new OmniClient({
|
|
7328
7489
|
apiKey: credentials.apiKey,
|
|
7329
7490
|
baseUrl: credentials.baseUrl,
|