@wirecat/cli-template 0.16.0 → 0.17.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/.github/workflows/ci.yml +18 -0
- package/.github/workflows/release-pr.yml +37 -0
- package/CHANGELOG.md +14 -0
- package/bin/release +10 -3
- package/biome.json +6 -0
- package/contracts/plan.json +2 -1
- package/dist/bin/clidev.js +2 -2
- package/dist/bundle/{all-profiles-FS7AEOE7.js → all-profiles-CCT2XPJL.js} +7 -7
- package/dist/bundle/{anthropic-5RN7BGDI.js → anthropic-QLLP7EE4.js} +4 -4
- package/dist/bundle/{app-server-WGTKZQKJ.js → app-server-ELI5TGL7.js} +36 -36
- package/dist/bundle/{bun-ILPS6AYA.js → bun-C7JS2V7G.js} +2 -2
- package/dist/bundle/{bun-sqlite-WK2IGBGD.js → bun-sqlite-OM72TCYT.js} +3 -3
- package/dist/bundle/{chunk-ADFSSIV4.js → chunk-2Y5NBD7U.js} +4 -4
- package/dist/bundle/{chunk-7EUX7AZV.js → chunk-33JGD2CR.js} +3 -3
- package/dist/bundle/{chunk-JFXWLQ2L.js → chunk-3VVIEZRY.js} +2 -2
- package/dist/bundle/{chunk-CGFQT3LQ.js → chunk-6PHTRAZA.js} +1 -1
- package/dist/bundle/{chunk-VS5LGSTM.js → chunk-6VCFDEHT.js} +1 -1
- package/dist/bundle/{chunk-NENYWEXF.js → chunk-7OQF5ZMN.js} +1 -1
- package/dist/bundle/{chunk-6WOJIAYA.js → chunk-AKUMR7PE.js} +2 -2
- package/dist/bundle/{chunk-BPMKAZSS.js → chunk-ASO23RNM.js} +152 -79
- package/dist/bundle/{chunk-VOTEB3AN.js → chunk-AUVPTFUS.js} +1 -1
- package/dist/bundle/{chunk-JJZCPBH3.js → chunk-BOCIYBBO.js} +53 -44
- package/dist/bundle/{chunk-QGOOPPEW.js → chunk-BXZRTMXA.js} +5 -5
- package/dist/bundle/{chunk-SKBRW5U3.js → chunk-DVLM23HB.js} +2 -2
- package/dist/bundle/{chunk-YIVY2WI3.js → chunk-E4KQOKQ5.js} +1 -1
- package/dist/bundle/{chunk-ZSY4WAGI.js → chunk-EQDVQN4E.js} +299 -258
- package/dist/bundle/{chunk-RFJKNFVF.js → chunk-FF3AGTHY.js} +6 -6
- package/dist/bundle/{chunk-TXHCL75B.js → chunk-GG5PXNMH.js} +25 -22
- package/dist/bundle/{chunk-DEHBTFIC.js → chunk-GUCMIUNB.js} +2 -2
- package/dist/bundle/{chunk-RYOAQCVJ.js → chunk-HVAEHUSZ.js} +2 -2
- package/dist/bundle/{chunk-CTBHQRX6.js → chunk-ITPFCKCL.js} +13 -13
- package/dist/bundle/{chunk-Z5NL6YNU.js → chunk-J2RUBXCI.js} +6 -6
- package/dist/bundle/{chunk-7Z4HR6GO.js → chunk-KRXN3FV3.js} +1 -1
- package/dist/bundle/{chunk-OF56L2JU.js → chunk-LFLN6PVS.js} +4 -4
- package/dist/bundle/{chunk-YNROUY3R.js → chunk-LN53L2V5.js} +11 -11
- package/dist/bundle/{chunk-WDWP5N6M.js → chunk-MLSN3UP4.js} +26 -26
- package/dist/bundle/{chunk-3MDNAYQA.js → chunk-O6PBO4BU.js} +1 -1
- package/dist/bundle/{chunk-5KAYQKBK.js → chunk-QJS4WWYK.js} +63 -63
- package/dist/bundle/{chunk-EA3TMI4A.js → chunk-QLBS6OC2.js} +2362 -1225
- package/dist/bundle/{chunk-5HHIPDNW.js → chunk-QVPTZDRA.js} +2 -2
- package/dist/bundle/{chunk-OGTRPW2K.js → chunk-R5CPFSPI.js} +7 -7
- package/dist/bundle/{chunk-2MWNE4L3.js → chunk-R5IY4O25.js} +4 -4
- package/dist/bundle/{chunk-C3GNOEJP.js → chunk-RGKXMVOZ.js} +3 -3
- package/dist/bundle/{chunk-G45R7M42.js → chunk-RT46AWIH.js} +1 -1
- package/dist/bundle/{chunk-MEXT6XDP.js → chunk-RUHNHEAF.js} +3 -3
- package/dist/bundle/{chunk-ORV4EGNC.js → chunk-S465TCR3.js} +8 -8
- package/dist/bundle/{chunk-WM5AMTRY.js → chunk-SQKP6V4S.js} +27 -13
- package/dist/bundle/{chunk-VPCXYY46.js → chunk-SQOXYNKF.js} +1 -1
- package/dist/bundle/{chunk-NVPWZF67.js → chunk-URPKIONS.js} +8 -8
- package/dist/bundle/{chunk-HTYLT6ME.js → chunk-UW4PJZVJ.js} +282 -170
- package/dist/bundle/{chunk-ENDBOYQR.js → chunk-WKUJCPSP.js} +89 -45
- package/dist/bundle/{chunk-FMO6F5Q2.js → chunk-WQBBSVZM.js} +2 -2
- package/dist/bundle/{chunk-LRHX62ZF.js → chunk-WRLOK7XC.js} +3 -3
- package/dist/bundle/{chunk-MBBOINK4.js → chunk-X44ZT64I.js} +3 -3
- package/dist/bundle/{chunk-ATHZEV2Z.js → chunk-XKL5FRH3.js} +3 -3
- package/dist/bundle/{chunk-ETJXPB6A.js → chunk-XS56LIQ7.js} +4 -4
- package/dist/bundle/{chunk-3WDYHOAF.js → chunk-YIH3PYWJ.js} +1 -1
- package/dist/bundle/{chunk-EILS4BTQ.js → chunk-ZRNBKTPP.js} +26 -26
- package/dist/bundle/clidev.js +3 -3
- package/dist/bundle/{command-contract-ZDU73EPH.js → command-contract-RV5ZOEAT.js} +11 -11
- package/dist/bundle/{decode-QMLOGZ6R.js → decode-V7HNHZBC.js} +3 -3
- package/dist/bundle/{echarts-DRDGGHJT.js → echarts-Y42YP2OL.js} +2 -2
- package/dist/bundle/{embed-PIR2LJR2.js → embed-JSQZL7JF.js} +4 -4
- package/dist/bundle/{embedder-6KBRPAEQ.js → embedder-7BHRCXWL.js} +7 -7
- package/dist/bundle/{first-run-JO3CMY3Z.js → first-run-BJ36KGST.js} +8 -8
- package/dist/bundle/first-screen-5YHQVNY4.js +26 -0
- package/dist/bundle/{instructions-EOQOXY6V.js → instructions-UWERND54.js} +1 -1
- package/dist/bundle/{mcp-7HBLFGCW.js → mcp-P4FSBSRS.js} +2 -2
- package/dist/bundle/{node-52WF2326.js → node-PZDNPKN7.js} +2 -2
- package/dist/bundle/{node-sqlite-LIK6OYNF.js → node-sqlite-4F5NLRNT.js} +4 -4
- package/dist/bundle/{oauth-7FVF7HQQ.js → oauth-VDXNA3DK.js} +5 -5
- package/dist/bundle/{open-CRZDEATN.js → open-EUJRQQNS.js} +3 -3
- package/dist/bundle/{openai-WAJ6WREQ.js → openai-EIBV2K72.js} +12 -12
- package/dist/bundle/{process-YIQPKLZI.js → process-XD5ZIFIL.js} +1 -1
- package/dist/bundle/{program-ZFFFPBRS.js → program-TJTVMIOX.js} +866 -495
- package/dist/bundle/{prompt-QQIVHO3M.js → prompt-LYUZNHDK.js} +3 -3
- package/dist/bundle/{recognize-4KLBZDEC.js → recognize-LQMHLOD5.js} +2 -2
- package/dist/bundle/{remote-BABMZTHA.js → remote-34HUWSZI.js} +5 -5
- package/dist/bundle/{rerank-P3IQQJIL.js → rerank-ONBASQ5Z.js} +5 -5
- package/dist/bundle/{serve-25SSAKRZ.js → serve-UJ7FDYAM.js} +7 -7
- package/dist/bundle/{server-P4XUYY5A.js → server-GNT76BXM.js} +28 -28
- package/dist/bundle/server-J4YIXKMI.js +52 -0
- package/dist/bundle/{state-QCQALQBJ.js → state-IW5OO6IZ.js} +4 -4
- package/dist/bundle/{store-ZECPRGGH.js → store-55UB27H2.js} +12 -10
- package/dist/bundle/store-maintenance-command-BLDKUZ3L.js +42 -0
- package/dist/commands/session.js +1 -1
- package/dist/commands/session.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +1 -0
- package/dist/program.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/dev/skills/release/SKILL.md +9 -3
- package/docs/dev/skills/release/fresh-audit.md +1 -1
- package/kit/dist/new.js +1 -0
- package/package.json +4 -4
- package/src/commands/session.ts +1 -1
- package/src/program.ts +1 -0
- package/src/version.ts +1 -1
- package/dist/bundle/first-screen-3T5IXTFL.js +0 -26
- package/dist/bundle/server-G4GCDMYI.js +0 -52
- package/dist/bundle/store-maintenance-command-ECUO5G6L.js +0 -42
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
agentJson,
|
|
8
8
|
commandAvailability,
|
|
9
9
|
failureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SQKP6V4S.js";
|
|
11
11
|
import {
|
|
12
12
|
callerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3VVIEZRY.js";
|
|
14
14
|
import {
|
|
15
15
|
QUERY_ARGUMENT,
|
|
16
16
|
lentConnection,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
refuseLacking,
|
|
19
19
|
servicesFor,
|
|
20
20
|
storeModeDeps
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EQDVQN4E.js";
|
|
22
22
|
import {
|
|
23
23
|
MAX_BUFFERED_INPUT
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QVPTZDRA.js";
|
|
25
25
|
import {
|
|
26
26
|
DEFAULT_OUTPUT_BYTES,
|
|
27
27
|
ENTITIES,
|
|
@@ -45,16 +45,16 @@ import {
|
|
|
45
45
|
sealed,
|
|
46
46
|
startRecording,
|
|
47
47
|
traceOf
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-UW4PJZVJ.js";
|
|
49
49
|
import {
|
|
50
50
|
currentCaller,
|
|
51
51
|
keepsSuccess,
|
|
52
52
|
runContextOf,
|
|
53
53
|
withCaller
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-S465TCR3.js";
|
|
55
55
|
import {
|
|
56
56
|
queryDescription
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-QJS4WWYK.js";
|
|
58
58
|
import {
|
|
59
59
|
COMPACT_FLAG,
|
|
60
60
|
CliError,
|
|
@@ -97,15 +97,15 @@ import {
|
|
|
97
97
|
unknown,
|
|
98
98
|
word,
|
|
99
99
|
writes
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-MLSN3UP4.js";
|
|
101
101
|
import {
|
|
102
102
|
__name
|
|
103
103
|
} from "./chunk-ZVVMGPBJ.js";
|
|
104
104
|
|
|
105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
106
106
|
import { Readable } from "node:stream";
|
|
107
107
|
|
|
108
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
108
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
|
|
109
109
|
var LINT_SEVERITIES = ["high", "medium", "low"];
|
|
110
110
|
var lintRuleSchema = strictObject({
|
|
111
111
|
id: word,
|
|
@@ -233,7 +233,7 @@ var overrideSchema = strictObject({
|
|
|
233
233
|
});
|
|
234
234
|
var overridesSchema = array(overrideSchema);
|
|
235
235
|
|
|
236
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
236
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/audit.js
|
|
237
237
|
var auditRuleSchema = strictObject({ id: word, severity: picklist(LINT_SEVERITIES), summary: text });
|
|
238
238
|
var defineAuditRules = /* @__PURE__ */ __name((input) => parseRegistry("audit rules", array(auditRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineAuditRules");
|
|
239
239
|
var AUDIT_RULES = defineAuditRules([
|
|
@@ -342,7 +342,7 @@ var REQUIRED_ROOTS = defineRequiredRoots([
|
|
|
342
342
|
{ path: ["upgrade"], meaning: "updates the CLI" }
|
|
343
343
|
]);
|
|
344
344
|
|
|
345
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
345
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/fields.js
|
|
346
346
|
var fieldRuleSchema = strictObject({ id: word, rule: text });
|
|
347
347
|
var defineFieldRules = /* @__PURE__ */ __name((input) => parseRegistry("output field rules", array(fieldRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineFieldRules");
|
|
348
348
|
var FIELD_RULES = defineFieldRules([
|
|
@@ -358,7 +358,7 @@ var FIELD_RULES = defineFieldRules([
|
|
|
358
358
|
}
|
|
359
359
|
]);
|
|
360
360
|
|
|
361
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
361
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/identifiers.js
|
|
362
362
|
var key = pipe(string(), regex(SNAKE_CASE, "a snake_case key"));
|
|
363
363
|
var identifierSchema = strictObject({ key, meaning: text, replaces: optional(array(key)) });
|
|
364
364
|
var defineIdentifiers = /* @__PURE__ */ __name((input) => parseRegistry("identifiers", array(identifierSchema), input, (identifiers) => {
|
|
@@ -380,7 +380,7 @@ var IDENTIFIERS = defineIdentifiers([
|
|
|
380
380
|
{ key: "trace_id", meaning: "the distributed trace a run belongs to, from `traceparent`" }
|
|
381
381
|
]);
|
|
382
382
|
|
|
383
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
383
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-calendar.js
|
|
384
384
|
var CALENDAR_FLAGS = [
|
|
385
385
|
{ name: "--end-time", value: "<time>", role: "value", type: "time", meaning: "when it ends" },
|
|
386
386
|
{
|
|
@@ -454,7 +454,47 @@ var CALENDAR_FLAGS = [
|
|
|
454
454
|
}
|
|
455
455
|
];
|
|
456
456
|
|
|
457
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
457
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-crm.js
|
|
458
|
+
var CRM_FLAGS = [
|
|
459
|
+
{
|
|
460
|
+
name: "--pipeline",
|
|
461
|
+
value: "<pipeline>",
|
|
462
|
+
role: "value",
|
|
463
|
+
type: "string",
|
|
464
|
+
meaning: "a CRM pipeline: pipeline:<id>, or a name only one pipeline has"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
name: "--stage",
|
|
468
|
+
value: "<stage>",
|
|
469
|
+
role: "value",
|
|
470
|
+
type: "string",
|
|
471
|
+
meaning: "a stage of the record's pipeline, by the CRM's id or its name"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
name: "--amount",
|
|
475
|
+
value: "<decimal>",
|
|
476
|
+
role: "value",
|
|
477
|
+
type: "string",
|
|
478
|
+
meaning: "a sum of money as a decimal, such as 1500.50, in --currency"
|
|
479
|
+
},
|
|
480
|
+
{ name: "--currency", value: "<code>", role: "value", type: "string", meaning: "an ISO 4217 code, such as EUR" },
|
|
481
|
+
{
|
|
482
|
+
name: "--close-date",
|
|
483
|
+
value: "<date>",
|
|
484
|
+
role: "value",
|
|
485
|
+
type: "time",
|
|
486
|
+
meaning: "the day a deal or lead is expected to close, YYYY-MM-DD"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
name: "--owner",
|
|
490
|
+
value: "<user>",
|
|
491
|
+
role: "value",
|
|
492
|
+
type: "id",
|
|
493
|
+
meaning: "the CRM user a record is assigned to, by the CRM's id"
|
|
494
|
+
}
|
|
495
|
+
];
|
|
496
|
+
|
|
497
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-how.js
|
|
458
498
|
var HOW_FLAGS = [
|
|
459
499
|
{
|
|
460
500
|
name: "--limit",
|
|
@@ -1448,7 +1488,7 @@ var HOW_FLAGS = [
|
|
|
1448
1488
|
}
|
|
1449
1489
|
];
|
|
1450
1490
|
|
|
1451
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1491
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-mail.js
|
|
1452
1492
|
var MAIL_FLAGS = [
|
|
1453
1493
|
{
|
|
1454
1494
|
name: "--cc",
|
|
@@ -1478,7 +1518,68 @@ var MAIL_FLAGS = [
|
|
|
1478
1518
|
}
|
|
1479
1519
|
];
|
|
1480
1520
|
|
|
1481
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1521
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-privacy.js
|
|
1522
|
+
var PRIVACY_FLAGS = [
|
|
1523
|
+
{
|
|
1524
|
+
name: "--about-text",
|
|
1525
|
+
value: "<who>",
|
|
1526
|
+
role: "value",
|
|
1527
|
+
type: "choice",
|
|
1528
|
+
meaning: "who sees the about text: everyone, contacts or nobody"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
name: "--calls",
|
|
1532
|
+
value: "<who>",
|
|
1533
|
+
role: "value",
|
|
1534
|
+
type: "choice",
|
|
1535
|
+
meaning: "whose calls ring: everyone, contacts or nobody"
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: "--chat-invites",
|
|
1539
|
+
value: "<who>",
|
|
1540
|
+
role: "value",
|
|
1541
|
+
type: "choice",
|
|
1542
|
+
meaning: "who may add the account to groups and channels: everyone, contacts or nobody"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
name: "--find-by-phone",
|
|
1546
|
+
value: "<who>",
|
|
1547
|
+
role: "value",
|
|
1548
|
+
type: "choice",
|
|
1549
|
+
meaning: "who finds the account by its number: everyone, contacts or nobody"
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
name: "--hide-online",
|
|
1553
|
+
value: "<on|off>",
|
|
1554
|
+
role: "value",
|
|
1555
|
+
type: "choice",
|
|
1556
|
+
meaning: "hide online status and last seen"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
name: "--last-seen",
|
|
1560
|
+
value: "<who>",
|
|
1561
|
+
role: "value",
|
|
1562
|
+
type: "choice",
|
|
1563
|
+
meaning: "who sees when the account was last online: everyone, contacts or nobody"
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
name: "--phone-number",
|
|
1567
|
+
value: "<who>",
|
|
1568
|
+
role: "value",
|
|
1569
|
+
type: "choice",
|
|
1570
|
+
meaning: "who sees the number: everyone, contacts or nobody"
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
name: "--profile-photo",
|
|
1574
|
+
value: "<who>",
|
|
1575
|
+
role: "value",
|
|
1576
|
+
type: "choice",
|
|
1577
|
+
meaning: "who sees the profile photo: everyone, contacts or nobody"
|
|
1578
|
+
},
|
|
1579
|
+
{ name: "--read-receipts", value: "<on|off>", role: "value", type: "choice", meaning: "send read receipts" }
|
|
1580
|
+
];
|
|
1581
|
+
|
|
1582
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-what.js
|
|
1482
1583
|
var WHAT_FLAGS = [
|
|
1483
1584
|
{
|
|
1484
1585
|
name: "--analysis-provider",
|
|
@@ -1901,6 +2002,13 @@ var WHAT_FLAGS = [
|
|
|
1901
2002
|
meaning: "look again from this day, for what arrived late"
|
|
1902
2003
|
},
|
|
1903
2004
|
{ name: "--run", value: "<id>", role: "target", type: "id", meaning: "the run it is about" },
|
|
2005
|
+
{
|
|
2006
|
+
name: "--write",
|
|
2007
|
+
value: "<id>",
|
|
2008
|
+
role: "target",
|
|
2009
|
+
type: "id",
|
|
2010
|
+
meaning: "one write of a run, by the operation_id its answer listed: undo or act on that write alone"
|
|
2011
|
+
},
|
|
1904
2012
|
{
|
|
1905
2013
|
name: "--target",
|
|
1906
2014
|
value: "<ref>",
|
|
@@ -2103,63 +2211,6 @@ var WHAT_FLAGS = [
|
|
|
2103
2211
|
type: "path",
|
|
2104
2212
|
meaning: "an Ogg Opus file sent as a voice message"
|
|
2105
2213
|
},
|
|
2106
|
-
{
|
|
2107
|
-
name: "--about-text",
|
|
2108
|
-
value: "<who>",
|
|
2109
|
-
role: "value",
|
|
2110
|
-
type: "choice",
|
|
2111
|
-
meaning: "who sees the about text: everyone, contacts or nobody"
|
|
2112
|
-
},
|
|
2113
|
-
{
|
|
2114
|
-
name: "--calls",
|
|
2115
|
-
value: "<who>",
|
|
2116
|
-
role: "value",
|
|
2117
|
-
type: "choice",
|
|
2118
|
-
meaning: "whose calls ring: everyone, contacts or nobody"
|
|
2119
|
-
},
|
|
2120
|
-
{
|
|
2121
|
-
name: "--chat-invites",
|
|
2122
|
-
value: "<who>",
|
|
2123
|
-
role: "value",
|
|
2124
|
-
type: "choice",
|
|
2125
|
-
meaning: "who may add the account to groups and channels: everyone, contacts or nobody"
|
|
2126
|
-
},
|
|
2127
|
-
{
|
|
2128
|
-
name: "--find-by-phone",
|
|
2129
|
-
value: "<who>",
|
|
2130
|
-
role: "value",
|
|
2131
|
-
type: "choice",
|
|
2132
|
-
meaning: "who finds the account by its number: everyone, contacts or nobody"
|
|
2133
|
-
},
|
|
2134
|
-
{
|
|
2135
|
-
name: "--hide-online",
|
|
2136
|
-
value: "<on|off>",
|
|
2137
|
-
role: "value",
|
|
2138
|
-
type: "choice",
|
|
2139
|
-
meaning: "hide online status and last seen"
|
|
2140
|
-
},
|
|
2141
|
-
{
|
|
2142
|
-
name: "--last-seen",
|
|
2143
|
-
value: "<who>",
|
|
2144
|
-
role: "value",
|
|
2145
|
-
type: "choice",
|
|
2146
|
-
meaning: "who sees when the account was last online: everyone, contacts or nobody"
|
|
2147
|
-
},
|
|
2148
|
-
{
|
|
2149
|
-
name: "--phone-number",
|
|
2150
|
-
value: "<who>",
|
|
2151
|
-
role: "value",
|
|
2152
|
-
type: "choice",
|
|
2153
|
-
meaning: "who sees the number: everyone, contacts or nobody"
|
|
2154
|
-
},
|
|
2155
|
-
{
|
|
2156
|
-
name: "--profile-photo",
|
|
2157
|
-
value: "<who>",
|
|
2158
|
-
role: "value",
|
|
2159
|
-
type: "choice",
|
|
2160
|
-
meaning: "who sees the profile photo: everyone, contacts or nobody"
|
|
2161
|
-
},
|
|
2162
|
-
{ name: "--read-receipts", value: "<on|off>", role: "value", type: "choice", meaning: "send read receipts" },
|
|
2163
2214
|
{
|
|
2164
2215
|
name: "--until",
|
|
2165
2216
|
value: "<time>",
|
|
@@ -2262,6 +2313,13 @@ var WHAT_FLAGS = [
|
|
|
2262
2313
|
type: "id",
|
|
2263
2314
|
meaning: "never show this chat in it; repeat it for more"
|
|
2264
2315
|
},
|
|
2316
|
+
{
|
|
2317
|
+
name: "--field",
|
|
2318
|
+
value: "<key=value>",
|
|
2319
|
+
role: "value",
|
|
2320
|
+
type: "string",
|
|
2321
|
+
meaning: "set one named field on a write, as key=value; repeat it for more"
|
|
2322
|
+
},
|
|
2265
2323
|
{
|
|
2266
2324
|
name: "--file",
|
|
2267
2325
|
value: "<file>",
|
|
@@ -2476,7 +2534,7 @@ var WHAT_FLAGS = [
|
|
|
2476
2534
|
}
|
|
2477
2535
|
];
|
|
2478
2536
|
|
|
2479
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2537
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/vocabulary.js
|
|
2480
2538
|
var FLAG_TYPES = [
|
|
2481
2539
|
"switch",
|
|
2482
2540
|
"count",
|
|
@@ -2617,6 +2675,7 @@ var verbs = [
|
|
|
2617
2675
|
// Only when someone asks, never from a matching name: WC-ACCT-11 in docs/standards/accounts.md.
|
|
2618
2676
|
["link", "record that two identities are one person"],
|
|
2619
2677
|
["unlink", "undo a link"],
|
|
2678
|
+
["allocate", "match a payment to the invoice or order it settles, in whole or in part"],
|
|
2620
2679
|
["lookup", "ask the messenger who is behind a phone number"],
|
|
2621
2680
|
[
|
|
2622
2681
|
"inspect",
|
|
@@ -2717,6 +2776,20 @@ var collections = [
|
|
|
2717
2776
|
"derived records attached to a selected entity, with explicit coverage of included and omitted facets"
|
|
2718
2777
|
],
|
|
2719
2778
|
["organizations", "companies, teams, families or communities"],
|
|
2779
|
+
[
|
|
2780
|
+
"records",
|
|
2781
|
+
"documents of the owner's business, such as an invoice or a receipt, kept with the things they are about"
|
|
2782
|
+
],
|
|
2783
|
+
["invoices", "bills the owner sends or receives, with their amounts and due dates"],
|
|
2784
|
+
["orders", "what a customer asked for and the owner owes or delivers"],
|
|
2785
|
+
["payments", "money that moved in or out, each one matched to the invoices it settles"],
|
|
2786
|
+
["deals", "sales the owner works on, each at a stage of a pipeline, with an amount and an outcome"],
|
|
2787
|
+
["leads", "possible customers not yet qualified into a deal"],
|
|
2788
|
+
["pipelines", "ordered sets of stages a deal moves through"],
|
|
2789
|
+
["stages", "steps of a pipeline, each open, won or lost"],
|
|
2790
|
+
["products", "goods and services the owner sells, with their prices"],
|
|
2791
|
+
["users", "people who work in the owner's account at a service, such as a CRM's employees"],
|
|
2792
|
+
["fields", "a record type's field definitions: code, label, type and options, such as a CRM's custom fields"],
|
|
2720
2793
|
[
|
|
2721
2794
|
"identities",
|
|
2722
2795
|
"ways to reach a person or an organization: an account in one messenger or mailbox, an e-mail address, a phone"
|
|
@@ -2846,10 +2919,10 @@ var VOCABULARY = defineVocabulary({
|
|
|
2846
2919
|
],
|
|
2847
2920
|
views: views.map(([entry, meaning]) => ({ word: entry, meaning })),
|
|
2848
2921
|
roots: roots.map(([entry, meaning]) => ({ word: entry, meaning })),
|
|
2849
|
-
flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS]
|
|
2922
|
+
flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...PRIVACY_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS, ...CRM_FLAGS]
|
|
2850
2923
|
});
|
|
2851
2924
|
|
|
2852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
2853
2926
|
var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
|
|
2854
2927
|
var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
|
|
2855
2928
|
var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
|
|
@@ -3072,7 +3145,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
3072
3145
|
}
|
|
3073
3146
|
}, "runCommandForAgent");
|
|
3074
3147
|
|
|
3075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/tool.js
|
|
3076
3149
|
var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
|
|
3077
3150
|
var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
|
|
3078
3151
|
var message = pipe(
|
|
@@ -3331,7 +3404,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
|
|
|
3331
3404
|
return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
|
|
3332
3405
|
}, "failed");
|
|
3333
3406
|
|
|
3334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/surface.js
|
|
3335
3408
|
import { randomUUID } from "node:crypto";
|
|
3336
3409
|
var MATCHES = 8;
|
|
3337
3410
|
var ANSWER = answerSchema();
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/background/processes.js
|
|
8
8
|
import { execFileSync } from "node:child_process";
|
|
9
9
|
import { readdirSync, readFileSync, readlinkSync } from "node:fs";
|
|
10
10
|
var alive = /* @__PURE__ */ __name((pid) => {
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
refuseLacking,
|
|
14
14
|
servicesFor,
|
|
15
15
|
throughWrapper
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EQDVQN4E.js";
|
|
17
17
|
import {
|
|
18
18
|
servingProfiles
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RGKXMVOZ.js";
|
|
20
20
|
import {
|
|
21
21
|
AUTHORITY_KEY,
|
|
22
22
|
CEILING_KEY,
|
|
@@ -45,29 +45,29 @@ import {
|
|
|
45
45
|
rememberAccount,
|
|
46
46
|
rootOf2 as rootOf,
|
|
47
47
|
skipFlagFor
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-UW4PJZVJ.js";
|
|
49
49
|
import {
|
|
50
50
|
isCliFailure,
|
|
51
51
|
providerErrorKey
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-S465TCR3.js";
|
|
53
53
|
import {
|
|
54
54
|
openStore
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-QLBS6OC2.js";
|
|
56
56
|
import {
|
|
57
57
|
CliError,
|
|
58
58
|
logRecordOf,
|
|
59
59
|
realSleep,
|
|
60
60
|
resolvePaths,
|
|
61
61
|
writeSecurely
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-MLSN3UP4.js";
|
|
63
63
|
import {
|
|
64
64
|
__name
|
|
65
65
|
} from "./chunk-ZVVMGPBJ.js";
|
|
66
66
|
|
|
67
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
67
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
68
68
|
import { randomUUID } from "node:crypto";
|
|
69
69
|
|
|
70
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
70
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
71
71
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
72
72
|
import { dirname, join } from "node:path";
|
|
73
73
|
var MOST_DEADLINES = 50;
|
|
@@ -151,11 +151,11 @@ var FloodMemory = class {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
155
155
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
156
156
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
157
157
|
|
|
158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
159
159
|
import { closeSync, mkdirSync as mkdirSync2, openSync, statSync, unlinkSync } from "node:fs";
|
|
160
160
|
import { dirname as dirname2 } from "node:path";
|
|
161
161
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -222,7 +222,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
222
222
|
}
|
|
223
223
|
}, "lockTime");
|
|
224
224
|
|
|
225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
226
226
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
227
227
|
var SendJournal = class {
|
|
228
228
|
static {
|
|
@@ -299,7 +299,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
299
299
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
300
300
|
}, "withSendId");
|
|
301
301
|
|
|
302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
303
303
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
304
304
|
import { join as join3 } from "node:path";
|
|
305
305
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -411,7 +411,7 @@ var RecipientList = class {
|
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
413
|
|
|
414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
415
415
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
416
416
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
417
417
|
"attachments.extract",
|
|
@@ -604,7 +604,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
604
604
|
}), "guardFor");
|
|
605
605
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
606
606
|
|
|
607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
608
608
|
import { openSync as openSync2 } from "node:fs";
|
|
609
609
|
import { createInterface } from "node:readline";
|
|
610
610
|
import { ReadStream } from "node:tty";
|
|
@@ -659,7 +659,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
659
659
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
660
660
|
}, "terminalAsker");
|
|
661
661
|
|
|
662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
663
663
|
import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
664
664
|
import { join as join4 } from "node:path";
|
|
665
665
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -717,8 +717,39 @@ var Pacer = class {
|
|
|
717
717
|
renameSync2(temporary, this.path);
|
|
718
718
|
}
|
|
719
719
|
};
|
|
720
|
+
var ANNOUNCE_WAIT_MS = 5e3;
|
|
721
|
+
var LONGEST_PACE_WAIT_MS = 5 * 6e4;
|
|
722
|
+
var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
|
|
723
|
+
const { name, operation, warn } = options;
|
|
724
|
+
const now = options.now ?? Date.now;
|
|
725
|
+
let at = now();
|
|
726
|
+
try {
|
|
727
|
+
at = await pacer.reserve();
|
|
728
|
+
} catch (error) {
|
|
729
|
+
warn?.(`could not remember ${name}'s wait (${error instanceof Error ? error.message : String(error)})`, {
|
|
730
|
+
event: "warning",
|
|
731
|
+
code: "wait_not_remembered",
|
|
732
|
+
operation
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
const waitMs = at - now();
|
|
736
|
+
if (waitMs <= 0)
|
|
737
|
+
return;
|
|
738
|
+
if (waitMs > LONGEST_PACE_WAIT_MS)
|
|
739
|
+
throw new CliError("rate_limited", `${name} asked this profile to wait, ${Math.ceil(waitMs / 1e3)} s are left \u2014 nothing was sent to ${name}`, { retry_after_ms: waitMs, retry_at: new Date(at).toISOString(), remembered: true });
|
|
740
|
+
if (waitMs >= ANNOUNCE_WAIT_MS) {
|
|
741
|
+
const seconds = Math.ceil(waitMs / 1e3);
|
|
742
|
+
warn?.(`waiting ${seconds} s to keep this profile's pace with ${name}`, {
|
|
743
|
+
event: "warning",
|
|
744
|
+
code: "pace_wait",
|
|
745
|
+
operation,
|
|
746
|
+
counts: { seconds }
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
|
|
750
|
+
}, "waitForTurn");
|
|
720
751
|
|
|
721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
722
753
|
var HOUSEKEEPING = /* @__PURE__ */ new Set([
|
|
723
754
|
"help",
|
|
724
755
|
"guide",
|
|
@@ -798,12 +829,10 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
798
829
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
799
830
|
}, "refuseUnknownPermissionKeys");
|
|
800
831
|
|
|
801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
802
833
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
803
834
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
804
835
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
805
|
-
var ANNOUNCE_WAIT_MS = 5e3;
|
|
806
|
-
var LONGEST_PACE_WAIT_MS = 5 * 6e4;
|
|
807
836
|
var chatOf = /* @__PURE__ */ __name((args) => typeof args[0] === "string" && /^-?\d+$/.test(args[0]) ? args[0] : void 0, "chatOf");
|
|
808
837
|
var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer }) => {
|
|
809
838
|
const kept = /* @__PURE__ */ __name(async (operation, what2) => {
|
|
@@ -859,28 +888,8 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
859
888
|
await kept(operation, () => pacer.holdFor(waitMs));
|
|
860
889
|
}, "noted");
|
|
861
890
|
const turn = /* @__PURE__ */ __name(async (operation) => {
|
|
862
|
-
if (
|
|
863
|
-
|
|
864
|
-
let at = Date.now();
|
|
865
|
-
await kept(operation, async () => {
|
|
866
|
-
at = await pacer.reserve();
|
|
867
|
-
});
|
|
868
|
-
const waitMs = at - Date.now();
|
|
869
|
-
if (waitMs <= 0)
|
|
870
|
-
return;
|
|
871
|
-
if (waitMs > LONGEST_PACE_WAIT_MS) {
|
|
872
|
-
throw new CliError("rate_limited", `${name} asked this profile to wait, ${Math.ceil(waitMs / 1e3)} s are left \u2014 nothing was sent to ${name}`, { retry_after_ms: waitMs, retry_at: new Date(at).toISOString(), remembered: true });
|
|
873
|
-
}
|
|
874
|
-
if (waitMs >= ANNOUNCE_WAIT_MS) {
|
|
875
|
-
const seconds = Math.ceil(waitMs / 1e3);
|
|
876
|
-
warn(`waiting ${seconds} s to keep this profile's pace with ${name}`, {
|
|
877
|
-
event: "warning",
|
|
878
|
-
code: "pace_wait",
|
|
879
|
-
operation,
|
|
880
|
-
counts: { seconds }
|
|
881
|
-
});
|
|
882
|
-
}
|
|
883
|
-
await new Promise((resolve) => setTimeout(resolve, waitMs));
|
|
891
|
+
if (pacer)
|
|
892
|
+
await waitForTurn(pacer, { name, operation, warn });
|
|
884
893
|
}, "turn");
|
|
885
894
|
return throughWrapper(messenger, {}, (operation, call) => {
|
|
886
895
|
if (LONG_LIVED.has(operation))
|
|
@@ -917,7 +926,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
917
926
|
});
|
|
918
927
|
}, "flooded");
|
|
919
928
|
|
|
920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
921
930
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
922
931
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
923
932
|
const write = currentOperation();
|
|
@@ -1016,7 +1025,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
1016
1025
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
1017
1026
|
}, "byPart");
|
|
1018
1027
|
|
|
1019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
1020
1029
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
1021
1030
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
|
|
1022
1031
|
let warned = false;
|
|
@@ -1592,7 +1601,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1592
1601
|
}
|
|
1593
1602
|
}, "keep");
|
|
1594
1603
|
|
|
1595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1596
1605
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1597
1606
|
let opened;
|
|
1598
1607
|
return {
|
|
@@ -2,21 +2,21 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
storePath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AKUMR7PE.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError,
|
|
8
8
|
resolvePaths,
|
|
9
9
|
singleLine
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MLSN3UP4.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
16
16
|
import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
17
17
|
import { dirname, join, resolve } from "node:path";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
|
|
20
20
|
var DEFAULT_TASK_CATEGORIES = [
|
|
21
21
|
{
|
|
22
22
|
name: "taxes",
|
|
@@ -771,7 +771,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
|
|
|
771
771
|
}
|
|
772
772
|
}, "storedTaskCategories");
|
|
773
773
|
|
|
774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
775
775
|
var SECTION = "task_categories";
|
|
776
776
|
var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
|
|
777
777
|
const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
|