@pmate/cli 0.20.4 → 0.20.6

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.d.ts CHANGED
@@ -600,6 +600,7 @@ type ServiceCommandArgs = {
600
600
  page: number;
601
601
  history: boolean;
602
602
  search?: string;
603
+ follow: boolean;
603
604
  };
604
605
  type VercelProjectsCommandArgs = {
605
606
  type: Command.Vercel;
package/dist/index.js CHANGED
@@ -12712,7 +12712,7 @@ __export(index_exports, {
12712
12712
  module.exports = __toCommonJS(index_exports);
12713
12713
  var import_node_fs16 = require("fs");
12714
12714
  var import_node_path21 = __toESM(require("path"));
12715
- var import_chalk3 = __toESM(require("chalk"));
12715
+ var import_chalk4 = __toESM(require("chalk"));
12716
12716
 
12717
12717
  // src/cli.ts
12718
12718
  var import_chalk = __toESM(require("chalk"));
@@ -20065,6 +20065,8 @@ var import_node_fs14 = require("fs");
20065
20065
  var import_node_os6 = __toESM(require("os"));
20066
20066
  var import_node_path19 = __toESM(require("path"));
20067
20067
  var import_node_child_process9 = require("child_process");
20068
+ var import_node_readline = require("readline");
20069
+ var import_chalk3 = __toESM(require("chalk"));
20068
20070
  var ServiceRuntimeRunner = class {
20069
20071
  async deploy(service, options = {}) {
20070
20072
  switch (service.runtimeType) {
@@ -20117,6 +20119,61 @@ var ServiceRuntimeRunner = class {
20117
20119
  ui.title(`Logs for ${namespace}/${appName}`);
20118
20120
  ui.info("Source", { mode: options.history ? "history" : "online" });
20119
20121
  this.renderPage(page);
20122
+ if (options.follow) {
20123
+ await this.followLogs(namespace, appName, {
20124
+ page: options.page ?? 0,
20125
+ history: options.history ?? false,
20126
+ search: options.search,
20127
+ seedItems: page.data
20128
+ });
20129
+ }
20130
+ }
20131
+ async followLogs(namespace, appName, options) {
20132
+ const recent = [...options.seedItems];
20133
+ const interactive = this.createFollowConsole((state) => {
20134
+ this.renderFollowSnapshot(recent, state);
20135
+ });
20136
+ let running = true;
20137
+ interactive?.rl.on("close", () => {
20138
+ running = false;
20139
+ });
20140
+ const seen = new Set(options.seedItems.map((item) => item.hash));
20141
+ ui.info(
20142
+ "Follow",
20143
+ interactive ? "enabled (poll every 2s, Ctrl+C to stop, /help for filters)" : "enabled (poll every 2s, Ctrl+C to stop)"
20144
+ );
20145
+ interactive?.renderPrompt();
20146
+ while (running) {
20147
+ await this.sleep(2e3);
20148
+ let page;
20149
+ try {
20150
+ page = await this.fetchLogPage(namespace, appName, {
20151
+ page: options.page,
20152
+ history: options.history,
20153
+ search: options.search
20154
+ });
20155
+ } catch (error) {
20156
+ const message = error instanceof Error ? error.message : String(error);
20157
+ ui.warn("Follow fetch failed", { message });
20158
+ continue;
20159
+ }
20160
+ const newItems = page.data.filter((item) => !seen.has(item.hash));
20161
+ if (newItems.length === 0) {
20162
+ continue;
20163
+ }
20164
+ const ordered = [...newItems].reverse();
20165
+ for (const item of ordered) {
20166
+ seen.add(item.hash);
20167
+ recent.unshift(item);
20168
+ if (recent.length > 200) {
20169
+ recent.pop();
20170
+ }
20171
+ if (this.matchFollowFilter(item, interactive?.state)) {
20172
+ ui.plain(this.renderLogLine(item));
20173
+ interactive?.renderPrompt();
20174
+ }
20175
+ }
20176
+ }
20120
20177
  }
20121
20178
  getDeploy(service) {
20122
20179
  return service.deploy ?? {};
@@ -20367,20 +20424,29 @@ var ServiceRuntimeRunner = class {
20367
20424
  async fetchLogPage(namespace, appName, options) {
20368
20425
  const baseUrl = (process.env.INDEXER_BASE_URL || "https://indexer.pmate.chat").replace(/\/$/, "");
20369
20426
  const chainId = process.env.BLOCKCHAIN_CHAIN_ID || "pmate";
20370
- const action = options.history ? "list" : "search";
20427
+ const hasSearch = Boolean(options.search?.trim());
20428
+ const action = options.history || !hasSearch ? "list" : "search";
20371
20429
  const url = new URL(
20372
20430
  `/chains/${encodeURIComponent(chainId)}/namespaces/${encodeURIComponent(namespace)}/log/${encodeURIComponent(appName)}/${action}`,
20373
20431
  `${baseUrl}/`
20374
20432
  );
20375
20433
  url.searchParams.set("page_id", String(options.page));
20376
- if (options.search && !options.history) {
20377
- url.searchParams.set("keyword", options.search);
20434
+ if (hasSearch && !options.history) {
20435
+ url.searchParams.set("keyword", options.search.trim());
20378
20436
  }
20379
20437
  const response = await fetch(url.toString(), {
20380
20438
  method: "GET",
20381
20439
  headers: { Accept: "application/json" }
20382
20440
  });
20383
20441
  const payload = await response.json();
20442
+ if (response.status === 404 && /resource not found/i.test(payload.message || "")) {
20443
+ return {
20444
+ page: options.page,
20445
+ totalPage: 0,
20446
+ pageSize: 100,
20447
+ data: []
20448
+ };
20449
+ }
20384
20450
  if (!response.ok || !payload.success || !payload.data) {
20385
20451
  throw new Error(payload.message || `Log request failed: ${response.status}`);
20386
20452
  }
@@ -20394,10 +20460,392 @@ var ServiceRuntimeRunner = class {
20394
20460
  items: page.data.length
20395
20461
  });
20396
20462
  for (const item of page.data) {
20397
- const ts = new Date(item.time).toISOString();
20398
- ui.plain(`${ts} [${item.type}] ${JSON.stringify(item.data)} #${item.hash}`);
20463
+ ui.plain(this.renderLogLine(item));
20464
+ }
20465
+ }
20466
+ renderLogLine(item) {
20467
+ const ts = import_chalk3.default.white(new Date(item.time).toISOString());
20468
+ const resolvedLevel = this.resolveItemLevel(item);
20469
+ const isErrorLike = resolvedLevel === "error" || /error|failed/i.test(item.type);
20470
+ const type = isErrorLike ? import_chalk3.default.bold.red(`[${item.type}]`) : import_chalk3.default.bold.blue(`[${item.type}]`);
20471
+ const level = resolvedLevel ? `${isErrorLike ? import_chalk3.default.bold.red(resolvedLevel.toUpperCase()) : import_chalk3.default.bold.yellow(resolvedLevel.toUpperCase())} ` : "";
20472
+ const data = this.formatLogData(item.data);
20473
+ const hash = import_chalk3.default.gray(`#${item.hash}`);
20474
+ return `${ts} ${level}${type} ${data} ${hash}`;
20475
+ }
20476
+ formatLogData(value) {
20477
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
20478
+ return import_chalk3.default.gray(this.formatAnyValue(value));
20479
+ }
20480
+ const objectValue = value;
20481
+ const entries = Object.entries(objectValue);
20482
+ if (entries.length === 0) {
20483
+ return "{}";
20484
+ }
20485
+ const body = entries.map(([key, item]) => `${import_chalk3.default.bold.white(key)}: ${import_chalk3.default.gray(this.formatAnyValue(item))}`).join(", ");
20486
+ return `{ ${body} }`;
20487
+ }
20488
+ formatAnyValue(value) {
20489
+ if (typeof value === "string") {
20490
+ return value;
20491
+ }
20492
+ if (typeof value === "number" || typeof value === "boolean" || value === null) {
20493
+ return String(value);
20494
+ }
20495
+ try {
20496
+ return JSON.stringify(value);
20497
+ } catch {
20498
+ return String(value);
20399
20499
  }
20400
20500
  }
20501
+ createFollowConsole(onFilterChanged) {
20502
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
20503
+ return void 0;
20504
+ }
20505
+ const state = {};
20506
+ const rl = (0, import_node_readline.createInterface)({
20507
+ input: process.stdin,
20508
+ output: process.stdout,
20509
+ terminal: true
20510
+ });
20511
+ const renderPrompt = () => {
20512
+ const hints = [];
20513
+ if (state.search) hints.push(`search=${state.search}`);
20514
+ if (state.type) hints.push(`type=${state.type}`);
20515
+ if (state.level) hints.push(`level=${state.level}`);
20516
+ if (state.whereExpr) hints.push(`where=${state.whereExpr}`);
20517
+ const suffix = hints.length ? ` (${hints.join(", ")})` : "";
20518
+ rl.setPrompt(import_chalk3.default.gray(`filter>${suffix} `));
20519
+ rl.prompt();
20520
+ };
20521
+ rl.on("line", (raw) => {
20522
+ const line = raw.trim();
20523
+ if (!line) {
20524
+ renderPrompt();
20525
+ return;
20526
+ }
20527
+ if (line === "/help") {
20528
+ ui.info("Follow commands", [
20529
+ "/search <text> set keyword filter on event + payload",
20530
+ "/type <event> set event type filter",
20531
+ "/level <lvl> set level filter (debug|info|warn|error)",
20532
+ "<text> wildcard match on event + payload (equivalent to *text*)",
20533
+ "<expr> set JSON field filter (supports &&, ||, ())",
20534
+ " e.g. datamode=prompt && (type=task_end || level=error)",
20535
+ "/clear clear all filters",
20536
+ "/quit exit follow mode"
20537
+ ]);
20538
+ renderPrompt();
20539
+ return;
20540
+ }
20541
+ if (line === "/clear") {
20542
+ delete state.search;
20543
+ delete state.type;
20544
+ delete state.level;
20545
+ delete state.whereExpr;
20546
+ delete state.whereAst;
20547
+ ui.success("Filters cleared");
20548
+ onFilterChanged?.(state);
20549
+ renderPrompt();
20550
+ return;
20551
+ }
20552
+ if (line === "/quit" || line === "/exit") {
20553
+ rl.close();
20554
+ return;
20555
+ }
20556
+ if (line.startsWith("/search ")) {
20557
+ const value = line.slice("/search ".length).trim();
20558
+ state.search = value || void 0;
20559
+ ui.success("Updated search filter", { search: state.search });
20560
+ onFilterChanged?.(state);
20561
+ renderPrompt();
20562
+ return;
20563
+ }
20564
+ if (line.startsWith("/type ")) {
20565
+ const value = line.slice("/type ".length).trim();
20566
+ state.type = value || void 0;
20567
+ ui.success("Updated type filter", { type: state.type });
20568
+ onFilterChanged?.(state);
20569
+ renderPrompt();
20570
+ return;
20571
+ }
20572
+ if (line.startsWith("/level ")) {
20573
+ const value = line.slice("/level ".length).trim().toLowerCase();
20574
+ if (value !== "debug" && value !== "info" && value !== "warn" && value !== "error") {
20575
+ ui.warn("Invalid level", { value, allowed: ["debug", "info", "warn", "error"] });
20576
+ renderPrompt();
20577
+ return;
20578
+ }
20579
+ state.level = value;
20580
+ ui.success("Updated level filter", { level: state.level });
20581
+ onFilterChanged?.(state);
20582
+ renderPrompt();
20583
+ return;
20584
+ }
20585
+ if (!line.startsWith("/")) {
20586
+ if (this.isPlainWildcardInput(line)) {
20587
+ state.search = line;
20588
+ delete state.whereExpr;
20589
+ delete state.whereAst;
20590
+ ui.success("Updated wildcard filter", { search: state.search });
20591
+ onFilterChanged?.(state);
20592
+ renderPrompt();
20593
+ return;
20594
+ }
20595
+ try {
20596
+ const parsed = this.parseWhereExpression(line);
20597
+ state.whereExpr = line;
20598
+ state.whereAst = parsed;
20599
+ ui.success("Updated where filter", { where: state.whereExpr });
20600
+ onFilterChanged?.(state);
20601
+ } catch {
20602
+ ui.warn("Unknown follow command", { command: line, hint: "Type /help" });
20603
+ }
20604
+ renderPrompt();
20605
+ return;
20606
+ }
20607
+ ui.warn("Unknown follow command", { command: line, hint: "Type /help" });
20608
+ renderPrompt();
20609
+ });
20610
+ return { rl, state, renderPrompt };
20611
+ }
20612
+ matchFollowFilter(item, state) {
20613
+ if (!state) return true;
20614
+ if (state.type && !item.type.includes(state.type)) {
20615
+ return false;
20616
+ }
20617
+ if (state.level && this.resolveItemLevel(item) !== state.level) {
20618
+ return false;
20619
+ }
20620
+ if (state.search) {
20621
+ const haystack = `${item.type} ${JSON.stringify(item.data)}`;
20622
+ if (!haystack.toLowerCase().includes(state.search.toLowerCase())) {
20623
+ return false;
20624
+ }
20625
+ }
20626
+ if (state.whereAst && !this.evaluateWhereNode(item, state.whereAst)) {
20627
+ return false;
20628
+ }
20629
+ return true;
20630
+ }
20631
+ renderFollowSnapshot(recent, state) {
20632
+ const matched = recent.filter((item) => this.matchFollowFilter(item, state));
20633
+ ui.info("Filter snapshot", {
20634
+ matched: matched.length,
20635
+ recent: recent.length,
20636
+ shown: Math.min(matched.length, 20)
20637
+ });
20638
+ const toShow = matched.slice(0, 20);
20639
+ for (const item of toShow.reverse()) {
20640
+ ui.plain(this.renderLogLine(item));
20641
+ }
20642
+ }
20643
+ resolveItemLevel(item) {
20644
+ if (item.level) return item.level;
20645
+ if (!item.data || typeof item.data !== "object" || Array.isArray(item.data)) {
20646
+ return void 0;
20647
+ }
20648
+ const level = item.data.level;
20649
+ if (level === "debug" || level === "info" || level === "warn" || level === "error") {
20650
+ return level;
20651
+ }
20652
+ return void 0;
20653
+ }
20654
+ parseWhereExpression(expr) {
20655
+ const tokens = this.tokenizeWhere(expr);
20656
+ if (tokens.length === 0) {
20657
+ throw new Error("Expression is empty");
20658
+ }
20659
+ let idx = 0;
20660
+ const parsePrimary = () => {
20661
+ const token = tokens[idx];
20662
+ if (!token) {
20663
+ throw new Error("Unexpected end of expression");
20664
+ }
20665
+ if (token.kind === "lparen") {
20666
+ idx += 1;
20667
+ const node = parseOr();
20668
+ const closing = tokens[idx];
20669
+ if (!closing || closing.kind !== "rparen") {
20670
+ throw new Error("Missing closing ')' ");
20671
+ }
20672
+ idx += 1;
20673
+ return node;
20674
+ }
20675
+ if (token.kind !== "ident") {
20676
+ throw new Error(`Expected field name, got "${token.raw}"`);
20677
+ }
20678
+ const rawKey = token.value;
20679
+ idx += 1;
20680
+ const op = tokens[idx];
20681
+ if (!op || op.kind !== "eq") {
20682
+ throw new Error(`Expected "=" after "${rawKey}"`);
20683
+ }
20684
+ idx += 1;
20685
+ const valueToken = tokens[idx];
20686
+ if (!valueToken || valueToken.kind !== "ident" && valueToken.kind !== "quoted") {
20687
+ throw new Error(`Expected value after "${rawKey}="`);
20688
+ }
20689
+ idx += 1;
20690
+ return {
20691
+ kind: "clause",
20692
+ clause: {
20693
+ path: this.normalizeWhereKey(rawKey),
20694
+ expected: this.parseWhereValue(valueToken.value)
20695
+ }
20696
+ };
20697
+ };
20698
+ const parseAnd = () => {
20699
+ let node = parsePrimary();
20700
+ while (tokens[idx]?.kind === "and") {
20701
+ idx += 1;
20702
+ node = { kind: "and", left: node, right: parsePrimary() };
20703
+ }
20704
+ return node;
20705
+ };
20706
+ const parseOr = () => {
20707
+ let node = parseAnd();
20708
+ while (tokens[idx]?.kind === "or") {
20709
+ idx += 1;
20710
+ node = { kind: "or", left: node, right: parseAnd() };
20711
+ }
20712
+ return node;
20713
+ };
20714
+ const ast = parseOr();
20715
+ if (idx < tokens.length) {
20716
+ throw new Error(`Unexpected token "${tokens[idx].raw}"`);
20717
+ }
20718
+ return ast;
20719
+ }
20720
+ normalizeWhereKey(key) {
20721
+ const raw = key.trim();
20722
+ if (raw === "datamode") return "data.mode";
20723
+ if (raw === "type") return "type";
20724
+ if (raw === "level") return "level";
20725
+ if (raw === "taskid") return "data.taskId";
20726
+ return raw;
20727
+ }
20728
+ parseWhereValue(raw) {
20729
+ const trimmed = raw.trim();
20730
+ if (trimmed === "true") return true;
20731
+ if (trimmed === "false") return false;
20732
+ if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
20733
+ return Number(trimmed);
20734
+ }
20735
+ if (trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'")) {
20736
+ return trimmed.slice(1, -1);
20737
+ }
20738
+ return trimmed;
20739
+ }
20740
+ tokenizeWhere(expr) {
20741
+ const tokens = [];
20742
+ let i = 0;
20743
+ const input = expr.trim();
20744
+ while (i < input.length) {
20745
+ const ch = input[i];
20746
+ if (/\s/.test(ch)) {
20747
+ i += 1;
20748
+ continue;
20749
+ }
20750
+ if (ch === "(") {
20751
+ tokens.push({ kind: "lparen", raw: ch });
20752
+ i += 1;
20753
+ continue;
20754
+ }
20755
+ if (ch === ")") {
20756
+ tokens.push({ kind: "rparen", raw: ch });
20757
+ i += 1;
20758
+ continue;
20759
+ }
20760
+ if (ch === "=") {
20761
+ tokens.push({ kind: "eq", raw: ch });
20762
+ i += 1;
20763
+ continue;
20764
+ }
20765
+ if (ch === "&" && input[i + 1] === "&") {
20766
+ tokens.push({ kind: "and", raw: "&&" });
20767
+ i += 2;
20768
+ continue;
20769
+ }
20770
+ if (ch === "|" && input[i + 1] === "|") {
20771
+ tokens.push({ kind: "or", raw: "||" });
20772
+ i += 2;
20773
+ continue;
20774
+ }
20775
+ if (ch === '"' || ch === "'") {
20776
+ const quote = ch;
20777
+ i += 1;
20778
+ let value = "";
20779
+ while (i < input.length && input[i] !== quote) {
20780
+ value += input[i];
20781
+ i += 1;
20782
+ }
20783
+ if (i >= input.length) {
20784
+ throw new Error("Unterminated quoted string");
20785
+ }
20786
+ i += 1;
20787
+ tokens.push({ kind: "quoted", raw: `${quote}${value}${quote}`, value });
20788
+ continue;
20789
+ }
20790
+ let raw = "";
20791
+ while (i < input.length) {
20792
+ const c = input[i];
20793
+ if (/\s/.test(c) || c === "(" || c === ")" || c === "=") break;
20794
+ if (c === "&" && input[i + 1] === "&" || c === "|" && input[i + 1] === "|") break;
20795
+ raw += c;
20796
+ i += 1;
20797
+ }
20798
+ if (!raw) {
20799
+ throw new Error(`Unexpected token near "${input.slice(i)}"`);
20800
+ }
20801
+ tokens.push({ kind: "ident", raw, value: raw });
20802
+ }
20803
+ return tokens;
20804
+ }
20805
+ readPathValue(source, pathExpr) {
20806
+ const path22 = pathExpr.split(".").map((segment) => segment.trim()).filter(Boolean);
20807
+ let cursor = source;
20808
+ for (const segment of path22) {
20809
+ if (!cursor || typeof cursor !== "object" || Array.isArray(cursor)) {
20810
+ return void 0;
20811
+ }
20812
+ cursor = cursor[segment];
20813
+ }
20814
+ return cursor;
20815
+ }
20816
+ equalsExpected(actual, expected) {
20817
+ if (actual === void 0) return false;
20818
+ if (typeof expected === "number") {
20819
+ if (typeof actual === "number") return actual === expected;
20820
+ if (typeof actual === "string" && /^-?\d+(\.\d+)?$/.test(actual.trim())) {
20821
+ return Number(actual) === expected;
20822
+ }
20823
+ return false;
20824
+ }
20825
+ if (typeof expected === "boolean") {
20826
+ if (typeof actual === "boolean") return actual === expected;
20827
+ if (typeof actual === "string") return actual.toLowerCase() === String(expected);
20828
+ return false;
20829
+ }
20830
+ if (typeof actual === "string") return actual === expected;
20831
+ if (typeof actual === "number" || typeof actual === "boolean") {
20832
+ return String(actual) === expected;
20833
+ }
20834
+ return false;
20835
+ }
20836
+ isPlainWildcardInput(input) {
20837
+ return !/[=()]/.test(input) && !input.includes("&&") && !input.includes("||");
20838
+ }
20839
+ evaluateWhereNode(item, node) {
20840
+ if (node.kind === "clause") {
20841
+ const actual = this.readPathValue(item, node.clause.path);
20842
+ return this.equalsExpected(actual, node.clause.expected);
20843
+ }
20844
+ if (node.kind === "and") {
20845
+ return this.evaluateWhereNode(item, node.left) && this.evaluateWhereNode(item, node.right);
20846
+ }
20847
+ return this.evaluateWhereNode(item, node.left) || this.evaluateWhereNode(item, node.right);
20848
+ }
20401
20849
  resolveTemplatePath(templateName) {
20402
20850
  const candidates = [
20403
20851
  import_node_path19.default.join(__dirname, "..", "templates", templateName),
@@ -20671,7 +21119,8 @@ var ServiceCommandHandler = class {
20671
21119
  await runtime.log(record, {
20672
21120
  page: args.page,
20673
21121
  history: args.history,
20674
- search: args.search
21122
+ search: args.search,
21123
+ follow: args.follow
20675
21124
  });
20676
21125
  return;
20677
21126
  }
@@ -21867,6 +22316,7 @@ function parseServiceArgs(tokens) {
21867
22316
  let page = 0;
21868
22317
  let history = false;
21869
22318
  let search;
22319
+ let follow = false;
21870
22320
  while (rest.length > 0) {
21871
22321
  const token = rest.shift();
21872
22322
  switch (token) {
@@ -21885,6 +22335,10 @@ function parseServiceArgs(tokens) {
21885
22335
  case "--search":
21886
22336
  search = requireValue5(rest, token);
21887
22337
  break;
22338
+ case "--follow":
22339
+ case "-f":
22340
+ follow = true;
22341
+ break;
21888
22342
  case "--json":
21889
22343
  json = true;
21890
22344
  break;
@@ -21896,7 +22350,7 @@ function parseServiceArgs(tokens) {
21896
22350
  const namespace = parsedRef.namespace;
21897
22351
  const name = parsedRef.objectId;
21898
22352
  if (action === "log") {
21899
- return { type: "service" /* Service */, action, namespace, name, baseUrl, json, page, history, search };
22353
+ return { type: "service" /* Service */, action, namespace, name, baseUrl, json, page, history, search, follow };
21900
22354
  }
21901
22355
  if (action === "deploy" || action === "init") {
21902
22356
  return { type: "service" /* Service */, action, namespace, name, cwd, baseUrl, json };
@@ -22249,137 +22703,137 @@ var pkg = JSON.parse(
22249
22703
  (0, import_node_fs16.readFileSync)(import_node_path21.default.resolve(__dirname, "..", "package.json"), "utf8")
22250
22704
  );
22251
22705
  var HELP_TEXT = [
22252
- import_chalk3.default.bold(`pmate v${pkg.version}`),
22706
+ import_chalk4.default.bold(`pmate v${pkg.version}`),
22253
22707
  "",
22254
- import_chalk3.default.bold("Usage:"),
22255
- ` ${import_chalk3.default.cyan("pmate")} ${import_chalk3.default.gray("[options]")}`,
22708
+ import_chalk4.default.bold("Usage:"),
22709
+ ` ${import_chalk4.default.cyan("pmate")} ${import_chalk4.default.gray("[options]")}`,
22256
22710
  "",
22257
- import_chalk3.default.bold("Options:"),
22258
- ` ${import_chalk3.default.green("-h, --help")} Show this help output`,
22259
- ` ${import_chalk3.default.green("-v, --version")} Print the current version`,
22260
- ` ${import_chalk3.default.green("-n, --name <n>")} Print a greeting for <n>`,
22711
+ import_chalk4.default.bold("Options:"),
22712
+ ` ${import_chalk4.default.green("-h, --help")} Show this help output`,
22713
+ ` ${import_chalk4.default.green("-v, --version")} Print the current version`,
22714
+ ` ${import_chalk4.default.green("-n, --name <n>")} Print a greeting for <n>`,
22261
22715
  "",
22262
- import_chalk3.default.bold("Commands:"),
22263
- ` ${import_chalk3.default.cyan("list [path]")} List apps from .pmate.yaml in the target folder`,
22264
- ` ${import_chalk3.default.cyan("login")} Log in and store a session in ~/.pmate/session.json`,
22265
- ` ${import_chalk3.default.gray(" [--app <app-id>]")}`,
22266
- ` ${import_chalk3.default.cyan("add-dns")} Add a DNS record via Aliyun DNS`,
22267
- ` ${import_chalk3.default.gray(" --type <t> --value <v> --rr <rr> [--ttl <n>] [--domain <name>]")}`,
22268
- ` ${import_chalk3.default.cyan("sts")} Request an OSS STS token from the CI server`,
22269
- ` ${import_chalk3.default.cyan("bucket")} Manage OSS buckets`,
22270
- ` ${import_chalk3.default.gray(" --create --name <bucket> [--subdomain <name> --domain <name>]")}`,
22271
- ` ${import_chalk3.default.cyan("delete")} Tear down app resources created by init`,
22272
- ` ${import_chalk3.default.gray(" [app] <app-name> [--cwd <dir>]")}`,
22273
- ` ${import_chalk3.default.cyan("dev")} Run the dev script for app dir from .pmate.yaml`,
22274
- ` ${import_chalk3.default.gray(" <app-name> [--cwd <dir>]")}`,
22275
- ` ${import_chalk3.default.cyan("env")} Manage app env vars on the server`,
22276
- ` ${import_chalk3.default.gray(" <app-name> --list|--set <key> --value <value> [--delete <key>] [--cwd <dir>] [--verbose|-v]")}`,
22277
- ` ${import_chalk3.default.cyan("pr")} Create or update GitHub PRs with AI assistance`,
22278
- ` ${import_chalk3.default.gray(" merge [<pr>] (defaults: --squash --delete-branch)")}`,
22279
- ` ${import_chalk3.default.cyan("commit")} Create an AI-generated commit from local changes`,
22280
- ` ${import_chalk3.default.gray(" [--push] [--cwd <dir>]")}`,
22281
- ` ${import_chalk3.default.cyan("summary")} Summarize a GitHub PR with AI`,
22282
- ` ${import_chalk3.default.gray(" --pr <id> [--cwd <dir>]")}`,
22283
- ` ${import_chalk3.default.cyan("quiz")} Manage quiz papers on quiz-api`,
22284
- ` ${import_chalk3.default.gray(" create-draft --paper-id <id>")}`,
22285
- ` ${import_chalk3.default.gray(" update-meta --paper-id <id> --file <metadata.json>")}`,
22286
- ` ${import_chalk3.default.gray(" append-step --paper-id <id> --file <step.json>")}`,
22287
- ` ${import_chalk3.default.gray(" update-step --paper-id <id> --step-id <step-id> --file <step.json>")}`,
22288
- ` ${import_chalk3.default.gray(" reorder --paper-id <id> --step-ids <id1,id2,...>")}`,
22289
- ` ${import_chalk3.default.gray(" activate --paper-id <id>")}`,
22290
- ` ${import_chalk3.default.gray(" view --paper-id <id>")}`,
22291
- ` ${import_chalk3.default.gray(" edit-step --paper-id <id> --step-id <step-id> --file <step.json> [--new-paper-id <id>] [--activate]")}`,
22292
- ` ${import_chalk3.default.cyan("linear")} Create Linear issues`,
22293
- ` ${import_chalk3.default.gray(" (default) create via REPL")}`,
22294
- ` ${import_chalk3.default.gray(" create --repl [--cwd <dir>]")}`,
22295
- ` ${import_chalk3.default.gray(" create --title <title> [--desc <markdown>]")}`,
22296
- ` ${import_chalk3.default.gray(" [--team-id <id>|--team-key <key>] [--priority <0-4>]")}`,
22297
- ` ${import_chalk3.default.gray(" [--parent-id <id>] [--state-id <id>] [--cwd <dir>]")}`,
22298
- ` ${import_chalk3.default.gray(" cycle [--team-id <id>|--team-key <key>] [--account <title>] [--cwd <dir>]")}`,
22299
- ` ${import_chalk3.default.gray(" teams [--account <title>] [--cwd <dir>]")}`,
22300
- ` ${import_chalk3.default.gray(" whoami [--account <title>] [--cwd <dir>]")}`,
22301
- ` ${import_chalk3.default.gray(" update <issue> [--title <title>] [--desc <markdown>]")}`,
22302
- ` ${import_chalk3.default.gray(" [--team-id <id>|--team-key <key>] [--priority <0-4>]")}`,
22303
- ` ${import_chalk3.default.gray(" [--parent-id <id>] [--state-id <id>] [--cwd <dir>]")}`,
22304
- ` ${import_chalk3.default.gray(" view <issue> [--cwd <dir>]")}`,
22305
- ` ${import_chalk3.default.gray(" sub-issues <issue> [--cwd <dir>]")}`,
22306
- ` ${import_chalk3.default.gray(" comment <issue> --body <markdown> [--cwd <dir>]")}`,
22307
- ` ${import_chalk3.default.gray(" comments <issue> [--cwd <dir>]")}`,
22308
- ` ${import_chalk3.default.gray(" user-issues <user> [--cycle <number>] [--status <status>] [--cwd <dir>]")}`,
22309
- ` ${import_chalk3.default.gray(" issues [--query <text>] [--user <user>] [--status <status>] [--cycle <number>]")}`,
22310
- ` ${import_chalk3.default.gray(" [--team-id <id>|--team-key <key>] [--limit <1-250>] [--cwd <dir>]")}`,
22311
- ` ${import_chalk3.default.gray(" --pr [--cwd <dir>] (legacy)")}`,
22312
- ` ${import_chalk3.default.gray(" --repl [--cwd <dir>] (legacy)")}`,
22313
- ` ${import_chalk3.default.gray(" --screen-shot [--cwd <dir>] (legacy)")}`,
22314
- ` ${import_chalk3.default.cyan("notion")} View, create, or update Notion pages`,
22315
- ` ${import_chalk3.default.gray(" view <page-id|url>")}`,
22316
- ` ${import_chalk3.default.gray(" create --title <title> (--parent <page-id|url>|--private) [--content <text>|--file <path>]")}`,
22317
- ` ${import_chalk3.default.gray(" update <page-id|url> --content <text> [--append]")}`,
22318
- ` ${import_chalk3.default.gray(" update <page-id|url> --file <path> [--append]")}`,
22319
- ` ${import_chalk3.default.cyan("qrcode")} Capture a QR code screenshot and decode it`,
22320
- ` ${import_chalk3.default.cyan("oss")} Manage OSS buckets`,
22321
- ` ${import_chalk3.default.gray(" list")}`,
22322
- ` ${import_chalk3.default.gray(" upload --file <path> --key <key>")}`,
22323
- ` ${import_chalk3.default.cyan("random")} Generate random strings for tokens`,
22324
- ` ${import_chalk3.default.gray(" [--length <n>] [--charset base64url|hex|alnum|ascii]")}`,
22325
- ` ${import_chalk3.default.gray(" [--count <n>]")}`,
22326
- ` ${import_chalk3.default.gray(" --easy [--words <n>] [--digits <n>] [--separator <s>] [--count <n>]")}`,
22327
- ` ${import_chalk3.default.cyan("collect")} Collect threads/messages from Electron chat app via CDP`,
22328
- ` ${import_chalk3.default.gray(" --list [--endpoint <url>] [--json]")}`,
22329
- ` ${import_chalk3.default.gray(" --thread <name> [--endpoint <url>] [--json]")}`,
22330
- ` ${import_chalk3.default.cyan("agent")} Manage agent registry entries via agent-ui-api`,
22331
- ` ${import_chalk3.default.gray(" namespaces [--base-url <url>] [--json]")}`,
22332
- ` ${import_chalk3.default.gray(" list [--namespace <ns>] [--base-url <url>] [--json]")}`,
22333
- ` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22334
- ` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22335
- ` ${import_chalk3.default.gray(" create [<namespace>] --file <path> [--base-url <url>] [--json]")}`,
22336
- ` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22337
- ` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22338
- ` ${import_chalk3.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22339
- ` ${import_chalk3.default.gray(" default namespace: pmate; default base URL: https://agent-api.pmate.chat")}`,
22340
- ` ${import_chalk3.default.cyan("ns")} Manage registered namespaces`,
22341
- ` ${import_chalk3.default.gray(" list [--chain <chain>] [--base-url <url>] [--json]")}`,
22342
- ` ${import_chalk3.default.gray(" get <namespace> [--chain <chain>] [--base-url <url>] [--json]")}`,
22343
- ` ${import_chalk3.default.gray(" create <namespace> [--chain <chain>] [--base-url <url>] [--json]")}`,
22344
- ` ${import_chalk3.default.cyan("role")} Manage role definitions via auth-api`,
22345
- ` ${import_chalk3.default.gray(" definition list [--base-url <url>] [--json]")}`,
22346
- ` ${import_chalk3.default.gray(" definition create <role> [--display-name <name>] [--description <text>] [--base-url <url>] [--json]")}`,
22347
- ` ${import_chalk3.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
22348
- ` ${import_chalk3.default.cyan("account")} View accounts and manage account role bindings`,
22349
- ` ${import_chalk3.default.gray(" view (--account <id> | --mobile <mobile> | --nickname <nickname>) [--base-url <url>] [--json]")}`,
22350
- ` ${import_chalk3.default.gray(" role list --account <id> [--namespace <ns>] [--base-url <url>] [--json]")}`,
22351
- ` ${import_chalk3.default.gray(" role add --account <id> --namespace <ns> --role <role> [--base-url <url>] [--json]")}`,
22352
- ` ${import_chalk3.default.gray(" role remove --account <id> --namespace <ns> --role <role> [--base-url <url>] [--json]")}`,
22353
- ` ${import_chalk3.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
22354
- ` ${import_chalk3.default.cyan("store")} Manage @pmate/store namespaces, tables, and kv stores`,
22355
- ` ${import_chalk3.default.gray(" namespace list [--chain <chain>] [--indexer-base-url <url>] [--json]")}`,
22356
- ` ${import_chalk3.default.gray(" table list|get|exists|create|update|delete <name> [options]")}`,
22357
- ` ${import_chalk3.default.gray(" kv list|get|exists|set|delete <name> [options]")}`,
22358
- ` ${import_chalk3.default.gray(" defaults: chain=pmate namespace=pmate env base URLs from BLOCKCHAIN_BASE_URL / INDEXER_BASE_URL")}`,
22359
- ` ${import_chalk3.default.cyan("app")} Manage app registry entries via apps-api`,
22360
- ` ${import_chalk3.default.gray(" list [--ns <namespace>] [--base-url <url>] [--json]")}`,
22361
- ` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22362
- ` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22363
- ` ${import_chalk3.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
22364
- ` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22365
- ` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22366
- ` ${import_chalk3.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22367
- ` ${import_chalk3.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
22368
- ` ${import_chalk3.default.cyan("service")} Manage service registry entries via apps-api`,
22369
- ` ${import_chalk3.default.gray(" list [--namespace <ns>] [--repo <owner/name|https://github.com/owner/name>] [--base-url <url>] [--json]")}`,
22370
- ` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22371
- ` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22372
- ` ${import_chalk3.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
22373
- ` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22374
- ` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22375
- ` ${import_chalk3.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22376
- ` ${import_chalk3.default.gray(" deploy <ns:objectId> [--cwd <dir>] [--base-url <url>]")}`,
22377
- ` ${import_chalk3.default.gray(" init <ns:objectId> [--cwd <dir>] [--base-url <url>]")}`,
22378
- ` ${import_chalk3.default.gray(" log <ns:objectId> [--page <n>] [--history] [--search <keyword>] [--base-url <url>]")}`,
22379
- ` ${import_chalk3.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
22380
- ` ${import_chalk3.default.cyan("vercel")} Wrap common Vercel CLI inspection commands`,
22381
- ` ${import_chalk3.default.gray(" projects [--scope <scope>]")}`,
22382
- ` ${import_chalk3.default.gray(" deploys --project <name> [--last-week] [--scope <scope>]")}`
22716
+ import_chalk4.default.bold("Commands:"),
22717
+ ` ${import_chalk4.default.cyan("list [path]")} List apps from .pmate.yaml in the target folder`,
22718
+ ` ${import_chalk4.default.cyan("login")} Log in and store a session in ~/.pmate/session.json`,
22719
+ ` ${import_chalk4.default.gray(" [--app <app-id>]")}`,
22720
+ ` ${import_chalk4.default.cyan("add-dns")} Add a DNS record via Aliyun DNS`,
22721
+ ` ${import_chalk4.default.gray(" --type <t> --value <v> --rr <rr> [--ttl <n>] [--domain <name>]")}`,
22722
+ ` ${import_chalk4.default.cyan("sts")} Request an OSS STS token from the CI server`,
22723
+ ` ${import_chalk4.default.cyan("bucket")} Manage OSS buckets`,
22724
+ ` ${import_chalk4.default.gray(" --create --name <bucket> [--subdomain <name> --domain <name>]")}`,
22725
+ ` ${import_chalk4.default.cyan("delete")} Tear down app resources created by init`,
22726
+ ` ${import_chalk4.default.gray(" [app] <app-name> [--cwd <dir>]")}`,
22727
+ ` ${import_chalk4.default.cyan("dev")} Run the dev script for app dir from .pmate.yaml`,
22728
+ ` ${import_chalk4.default.gray(" <app-name> [--cwd <dir>]")}`,
22729
+ ` ${import_chalk4.default.cyan("env")} Manage app env vars on the server`,
22730
+ ` ${import_chalk4.default.gray(" <app-name> --list|--set <key> --value <value> [--delete <key>] [--cwd <dir>] [--verbose|-v]")}`,
22731
+ ` ${import_chalk4.default.cyan("pr")} Create or update GitHub PRs with AI assistance`,
22732
+ ` ${import_chalk4.default.gray(" merge [<pr>] (defaults: --squash --delete-branch)")}`,
22733
+ ` ${import_chalk4.default.cyan("commit")} Create an AI-generated commit from local changes`,
22734
+ ` ${import_chalk4.default.gray(" [--push] [--cwd <dir>]")}`,
22735
+ ` ${import_chalk4.default.cyan("summary")} Summarize a GitHub PR with AI`,
22736
+ ` ${import_chalk4.default.gray(" --pr <id> [--cwd <dir>]")}`,
22737
+ ` ${import_chalk4.default.cyan("quiz")} Manage quiz papers on quiz-api`,
22738
+ ` ${import_chalk4.default.gray(" create-draft --paper-id <id>")}`,
22739
+ ` ${import_chalk4.default.gray(" update-meta --paper-id <id> --file <metadata.json>")}`,
22740
+ ` ${import_chalk4.default.gray(" append-step --paper-id <id> --file <step.json>")}`,
22741
+ ` ${import_chalk4.default.gray(" update-step --paper-id <id> --step-id <step-id> --file <step.json>")}`,
22742
+ ` ${import_chalk4.default.gray(" reorder --paper-id <id> --step-ids <id1,id2,...>")}`,
22743
+ ` ${import_chalk4.default.gray(" activate --paper-id <id>")}`,
22744
+ ` ${import_chalk4.default.gray(" view --paper-id <id>")}`,
22745
+ ` ${import_chalk4.default.gray(" edit-step --paper-id <id> --step-id <step-id> --file <step.json> [--new-paper-id <id>] [--activate]")}`,
22746
+ ` ${import_chalk4.default.cyan("linear")} Create Linear issues`,
22747
+ ` ${import_chalk4.default.gray(" (default) create via REPL")}`,
22748
+ ` ${import_chalk4.default.gray(" create --repl [--cwd <dir>]")}`,
22749
+ ` ${import_chalk4.default.gray(" create --title <title> [--desc <markdown>]")}`,
22750
+ ` ${import_chalk4.default.gray(" [--team-id <id>|--team-key <key>] [--priority <0-4>]")}`,
22751
+ ` ${import_chalk4.default.gray(" [--parent-id <id>] [--state-id <id>] [--cwd <dir>]")}`,
22752
+ ` ${import_chalk4.default.gray(" cycle [--team-id <id>|--team-key <key>] [--account <title>] [--cwd <dir>]")}`,
22753
+ ` ${import_chalk4.default.gray(" teams [--account <title>] [--cwd <dir>]")}`,
22754
+ ` ${import_chalk4.default.gray(" whoami [--account <title>] [--cwd <dir>]")}`,
22755
+ ` ${import_chalk4.default.gray(" update <issue> [--title <title>] [--desc <markdown>]")}`,
22756
+ ` ${import_chalk4.default.gray(" [--team-id <id>|--team-key <key>] [--priority <0-4>]")}`,
22757
+ ` ${import_chalk4.default.gray(" [--parent-id <id>] [--state-id <id>] [--cwd <dir>]")}`,
22758
+ ` ${import_chalk4.default.gray(" view <issue> [--cwd <dir>]")}`,
22759
+ ` ${import_chalk4.default.gray(" sub-issues <issue> [--cwd <dir>]")}`,
22760
+ ` ${import_chalk4.default.gray(" comment <issue> --body <markdown> [--cwd <dir>]")}`,
22761
+ ` ${import_chalk4.default.gray(" comments <issue> [--cwd <dir>]")}`,
22762
+ ` ${import_chalk4.default.gray(" user-issues <user> [--cycle <number>] [--status <status>] [--cwd <dir>]")}`,
22763
+ ` ${import_chalk4.default.gray(" issues [--query <text>] [--user <user>] [--status <status>] [--cycle <number>]")}`,
22764
+ ` ${import_chalk4.default.gray(" [--team-id <id>|--team-key <key>] [--limit <1-250>] [--cwd <dir>]")}`,
22765
+ ` ${import_chalk4.default.gray(" --pr [--cwd <dir>] (legacy)")}`,
22766
+ ` ${import_chalk4.default.gray(" --repl [--cwd <dir>] (legacy)")}`,
22767
+ ` ${import_chalk4.default.gray(" --screen-shot [--cwd <dir>] (legacy)")}`,
22768
+ ` ${import_chalk4.default.cyan("notion")} View, create, or update Notion pages`,
22769
+ ` ${import_chalk4.default.gray(" view <page-id|url>")}`,
22770
+ ` ${import_chalk4.default.gray(" create --title <title> (--parent <page-id|url>|--private) [--content <text>|--file <path>]")}`,
22771
+ ` ${import_chalk4.default.gray(" update <page-id|url> --content <text> [--append]")}`,
22772
+ ` ${import_chalk4.default.gray(" update <page-id|url> --file <path> [--append]")}`,
22773
+ ` ${import_chalk4.default.cyan("qrcode")} Capture a QR code screenshot and decode it`,
22774
+ ` ${import_chalk4.default.cyan("oss")} Manage OSS buckets`,
22775
+ ` ${import_chalk4.default.gray(" list")}`,
22776
+ ` ${import_chalk4.default.gray(" upload --file <path> --key <key>")}`,
22777
+ ` ${import_chalk4.default.cyan("random")} Generate random strings for tokens`,
22778
+ ` ${import_chalk4.default.gray(" [--length <n>] [--charset base64url|hex|alnum|ascii]")}`,
22779
+ ` ${import_chalk4.default.gray(" [--count <n>]")}`,
22780
+ ` ${import_chalk4.default.gray(" --easy [--words <n>] [--digits <n>] [--separator <s>] [--count <n>]")}`,
22781
+ ` ${import_chalk4.default.cyan("collect")} Collect threads/messages from Electron chat app via CDP`,
22782
+ ` ${import_chalk4.default.gray(" --list [--endpoint <url>] [--json]")}`,
22783
+ ` ${import_chalk4.default.gray(" --thread <name> [--endpoint <url>] [--json]")}`,
22784
+ ` ${import_chalk4.default.cyan("agent")} Manage agent registry entries via agent-ui-api`,
22785
+ ` ${import_chalk4.default.gray(" namespaces [--base-url <url>] [--json]")}`,
22786
+ ` ${import_chalk4.default.gray(" list [--namespace <ns>] [--base-url <url>] [--json]")}`,
22787
+ ` ${import_chalk4.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22788
+ ` ${import_chalk4.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22789
+ ` ${import_chalk4.default.gray(" create [<namespace>] --file <path> [--base-url <url>] [--json]")}`,
22790
+ ` ${import_chalk4.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22791
+ ` ${import_chalk4.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22792
+ ` ${import_chalk4.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22793
+ ` ${import_chalk4.default.gray(" default namespace: pmate; default base URL: https://agent-api.pmate.chat")}`,
22794
+ ` ${import_chalk4.default.cyan("ns")} Manage registered namespaces`,
22795
+ ` ${import_chalk4.default.gray(" list [--chain <chain>] [--base-url <url>] [--json]")}`,
22796
+ ` ${import_chalk4.default.gray(" get <namespace> [--chain <chain>] [--base-url <url>] [--json]")}`,
22797
+ ` ${import_chalk4.default.gray(" create <namespace> [--chain <chain>] [--base-url <url>] [--json]")}`,
22798
+ ` ${import_chalk4.default.cyan("role")} Manage role definitions via auth-api`,
22799
+ ` ${import_chalk4.default.gray(" definition list [--base-url <url>] [--json]")}`,
22800
+ ` ${import_chalk4.default.gray(" definition create <role> [--display-name <name>] [--description <text>] [--base-url <url>] [--json]")}`,
22801
+ ` ${import_chalk4.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
22802
+ ` ${import_chalk4.default.cyan("account")} View accounts and manage account role bindings`,
22803
+ ` ${import_chalk4.default.gray(" view (--account <id> | --mobile <mobile> | --nickname <nickname>) [--base-url <url>] [--json]")}`,
22804
+ ` ${import_chalk4.default.gray(" role list --account <id> [--namespace <ns>] [--base-url <url>] [--json]")}`,
22805
+ ` ${import_chalk4.default.gray(" role add --account <id> --namespace <ns> --role <role> [--base-url <url>] [--json]")}`,
22806
+ ` ${import_chalk4.default.gray(" role remove --account <id> --namespace <ns> --role <role> [--base-url <url>] [--json]")}`,
22807
+ ` ${import_chalk4.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
22808
+ ` ${import_chalk4.default.cyan("store")} Manage @pmate/store namespaces, tables, and kv stores`,
22809
+ ` ${import_chalk4.default.gray(" namespace list [--chain <chain>] [--indexer-base-url <url>] [--json]")}`,
22810
+ ` ${import_chalk4.default.gray(" table list|get|exists|create|update|delete <name> [options]")}`,
22811
+ ` ${import_chalk4.default.gray(" kv list|get|exists|set|delete <name> [options]")}`,
22812
+ ` ${import_chalk4.default.gray(" defaults: chain=pmate namespace=pmate env base URLs from BLOCKCHAIN_BASE_URL / INDEXER_BASE_URL")}`,
22813
+ ` ${import_chalk4.default.cyan("app")} Manage app registry entries via apps-api`,
22814
+ ` ${import_chalk4.default.gray(" list [--ns <namespace>] [--base-url <url>] [--json]")}`,
22815
+ ` ${import_chalk4.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22816
+ ` ${import_chalk4.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22817
+ ` ${import_chalk4.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
22818
+ ` ${import_chalk4.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22819
+ ` ${import_chalk4.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22820
+ ` ${import_chalk4.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22821
+ ` ${import_chalk4.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
22822
+ ` ${import_chalk4.default.cyan("service")} Manage service registry entries via apps-api`,
22823
+ ` ${import_chalk4.default.gray(" list [--namespace <ns>] [--repo <owner/name|https://github.com/owner/name>] [--base-url <url>] [--json]")}`,
22824
+ ` ${import_chalk4.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22825
+ ` ${import_chalk4.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22826
+ ` ${import_chalk4.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
22827
+ ` ${import_chalk4.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22828
+ ` ${import_chalk4.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22829
+ ` ${import_chalk4.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22830
+ ` ${import_chalk4.default.gray(" deploy <ns:objectId> [--cwd <dir>] [--base-url <url>]")}`,
22831
+ ` ${import_chalk4.default.gray(" init <ns:objectId> [--cwd <dir>] [--base-url <url>]")}`,
22832
+ ` ${import_chalk4.default.gray(" log <ns:objectId> [--page <n>] [--history] [--search <keyword>] [--follow|-f] [--base-url <url>]")}`,
22833
+ ` ${import_chalk4.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
22834
+ ` ${import_chalk4.default.cyan("vercel")} Wrap common Vercel CLI inspection commands`,
22835
+ ` ${import_chalk4.default.gray(" projects [--scope <scope>]")}`,
22836
+ ` ${import_chalk4.default.gray(" deploys --project <name> [--last-week] [--scope <scope>]")}`
22383
22837
  ].join("\n");
22384
22838
  function parseArgs(argv) {
22385
22839
  const result = { help: false, version: false, rest: [] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.20.4",
3
+ "version": "0.20.6",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {