@wirecat/cli-memo 0.131.41 → 0.131.42
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/bin/memo.js +2 -2
- package/dist/bundle/{all-profiles-ZTYUFM24.js → all-profiles-ZBEW2K6Y.js} +5 -5
- package/dist/bundle/{anthropic-BLXCM7J2.js → anthropic-2OBFMS2B.js} +3 -3
- package/dist/bundle/{app-server-MXYDSTTW.js → app-server-2BPUD7XU.js} +35 -35
- package/dist/bundle/auto-NIATDHS4.js +86 -0
- package/dist/bundle/{bun-GFMA4TKJ.js → bun-4NGTZRHL.js} +2 -2
- package/dist/bundle/{bun-sqlite-3V6EB3XP.js → bun-sqlite-INSVTXFN.js} +2 -2
- package/dist/bundle/{chunk-J364I2EL.js → chunk-2IO2DEBO.js} +8 -8
- package/dist/bundle/{chunk-ONJAEHOD.js → chunk-2P54ZDQO.js} +7 -7
- package/dist/bundle/{chunk-AYOFFZMO.js → chunk-2XCXOI4F.js} +22 -4
- package/dist/bundle/{chunk-XXDWCZRM.js → chunk-42VOTRWE.js} +1 -1
- package/dist/bundle/{chunk-ULDE2Y7M.js → chunk-4OYYJSRS.js} +49 -48
- package/dist/bundle/{chunk-V5TOZXBU.js → chunk-5O3T7Z7F.js} +1267 -765
- package/dist/bundle/{chunk-QUA7EHLA.js → chunk-67TMJCHI.js} +10 -10
- package/dist/bundle/{chunk-2G66FZPO.js → chunk-6BW7SC6A.js} +1 -1
- package/dist/bundle/{chunk-A6HC2DWU.js → chunk-A2KU4HSF.js} +56 -56
- package/dist/bundle/{chunk-UA2H5FRV.js → chunk-CKLLVPTR.js} +1 -1
- package/dist/bundle/{chunk-RMJLG2D6.js → chunk-CZ2CX43P.js} +4 -4
- package/dist/bundle/{chunk-G6EOW6PY.js → chunk-DA5YMQCB.js} +2 -2
- package/dist/bundle/{chunk-SCIU5WHL.js → chunk-E3P7PIR3.js} +3 -3
- package/dist/bundle/{chunk-WG3JJ7D5.js → chunk-EKFHAT36.js} +1 -1
- package/dist/bundle/{chunk-OY2CMEUW.js → chunk-ELPCHMDA.js} +3 -3
- package/dist/bundle/{chunk-FVN42IND.js → chunk-F6UUS3OF.js} +1 -1
- package/dist/bundle/{chunk-OLVBY6N6.js → chunk-GECE7WJD.js} +2 -2
- package/dist/bundle/{chunk-Y4B4273X.js → chunk-GHLLCV4E.js} +7 -7
- package/dist/bundle/{chunk-7AS5QFWJ.js → chunk-HCMQGNZU.js} +5 -5
- package/dist/bundle/{chunk-7EOGXNLO.js → chunk-HQQC5JRS.js} +4 -4
- package/dist/bundle/{chunk-RZUSWGAC.js → chunk-IAML53OZ.js} +2 -2
- package/dist/bundle/{chunk-BFN5KXGH.js → chunk-JWQWLMFP.js} +257 -257
- package/dist/bundle/{chunk-2E4N5DVE.js → chunk-KBOLP4OR.js} +27 -27
- package/dist/bundle/{chunk-2O2BSM4K.js → chunk-KHEFBWLH.js} +1 -1
- package/dist/bundle/{chunk-JO3FC5B4.js → chunk-KKXXP5RY.js} +7 -7
- package/dist/bundle/{chunk-6V6VCYOS.js → chunk-KVKO4X7K.js} +3 -3
- package/dist/bundle/{chunk-LGILT5CA.js → chunk-LBMZ7SQI.js} +2 -2
- package/dist/bundle/{chunk-RNINC74Q.js → chunk-LJDBOXZN.js} +1 -1
- package/dist/bundle/{chunk-VT4PCMY2.js → chunk-MWKPW3RU.js} +1 -1
- package/dist/bundle/{chunk-ZETAM63O.js → chunk-NCBHNEWW.js} +1 -1
- package/dist/bundle/{chunk-5KL7T2EP.js → chunk-NP5FU56F.js} +1 -1
- package/dist/bundle/{chunk-NKKC6SLX.js → chunk-O34QHLL5.js} +1 -1
- package/dist/bundle/{chunk-Y7XDV4GQ.js → chunk-O4I3BJPM.js} +6 -6
- package/dist/bundle/{chunk-IJJ4OEXK.js → chunk-O6YTC7DC.js} +1 -1
- package/dist/bundle/{chunk-776YSJJY.js → chunk-OAIRZNL2.js} +1 -1
- package/dist/bundle/{chunk-ARNYYXLO.js → chunk-OJX6GNQY.js} +20 -20
- package/dist/bundle/{chunk-ISVO2PHD.js → chunk-OYHQYCGJ.js} +4 -4
- package/dist/bundle/{chunk-DYSWDGOU.js → chunk-PRL227K7.js} +5 -5
- package/dist/bundle/{chunk-NYNUDUFA.js → chunk-QWNEZWGZ.js} +4 -4
- package/dist/bundle/{chunk-F3OGJQWY.js → chunk-QWNVEFWY.js} +5 -5
- package/dist/bundle/{chunk-WFME7ILV.js → chunk-QWZUMUA7.js} +5 -5
- package/dist/bundle/{chunk-QCE6BNKK.js → chunk-RHIQ34XW.js} +2 -2
- package/dist/bundle/{chunk-PPSIMMJM.js → chunk-RV4EBFH2.js} +17 -9
- package/dist/bundle/{chunk-7GEK5BE5.js → chunk-T4NH7JI6.js} +2 -2
- package/dist/bundle/{chunk-N2EY7NT3.js → chunk-TBGBA45H.js} +1 -1
- package/dist/bundle/{chunk-LLL4RBDU.js → chunk-TCNOZZPS.js} +11 -11
- package/dist/bundle/{chunk-B5LF2FVU.js → chunk-TWBJOORY.js} +1 -1
- package/dist/bundle/{chunk-VF24JTL4.js → chunk-TXU5T7VA.js} +1 -1
- package/dist/bundle/{chunk-NFN3JTGD.js → chunk-UCLNEOQS.js} +12 -12
- package/dist/bundle/{chunk-S7TVQ7ES.js → chunk-UK2MCVKV.js} +305 -248
- package/dist/bundle/{chunk-3MVDNB6Y.js → chunk-UX34ZUMK.js} +3 -3
- package/dist/bundle/{chunk-BJWDBPLF.js → chunk-W7GJREIL.js} +2 -2
- package/dist/bundle/{chunk-YNYOWOKD.js → chunk-WFA2ZLJB.js} +148 -148
- package/dist/bundle/{chunk-RMMYPYNA.js → chunk-WG6AOUQW.js} +20 -20
- package/dist/bundle/{chunk-BA3HPVBN.js → chunk-WSPCOSYD.js} +4 -4
- package/dist/bundle/{chunk-NP7Y3JQ7.js → chunk-XUNIJW7V.js} +9 -9
- package/dist/bundle/{chunk-IJS2X4AZ.js → chunk-YLJWCB6F.js} +43 -43
- package/dist/bundle/{command-contract-KCV6NNGF.js → command-contract-EYE52WTH.js} +11 -11
- package/dist/bundle/{decode-SU7TIUXV.js → decode-JVG6DJJV.js} +2 -2
- package/dist/bundle/{echarts-CJG2WVOX.js → echarts-4IS4IPI4.js} +2 -2
- package/dist/bundle/{embed-IBURCPTK.js → embed-7CN33CQR.js} +3 -3
- package/dist/bundle/{embedder-SK773RJG.js → embedder-TZ345BZF.js} +6 -6
- package/dist/bundle/{entry-6WOJUMZN.js → entry-5VZRNBLV.js} +4 -4
- package/dist/bundle/failure-KIFYUUO6.js +66 -0
- package/dist/bundle/{first-run-CMSDLJGE.js → first-run-EMHSBODF.js} +5 -5
- package/dist/bundle/{first-screen-6IZLOQ3Q.js → first-screen-3PJ3HFLG.js} +12 -12
- package/dist/bundle/{instructions-RHGGUIBR.js → instructions-BTAYTZIS.js} +1 -1
- package/dist/bundle/{mcp-HBKMY35O.js → mcp-I5KREUIV.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-NBXEN7JU.js → node-FMT4QVUG.js} +2 -2
- package/dist/bundle/{node-sqlite-WAGIYOYR.js → node-sqlite-2RDIBVYM.js} +3 -3
- package/dist/bundle/{oauth-INSEXJD2.js → oauth-MF53KMXM.js} +4 -4
- package/dist/bundle/{open-LXFV2C67.js → open-WKKHNBXL.js} +2 -2
- package/dist/bundle/{openai-OCWAXC7E.js → openai-36KNG2DB.js} +7 -7
- package/dist/bundle/{process-MRPJP32M.js → process-F2FWK4Q4.js} +1 -1
- package/dist/bundle/{program-XKO4X6BB.js → program-W55Y6LL2.js} +342 -90
- package/dist/bundle/{prompt-ROLOHFNO.js → prompt-2TR6X3TJ.js} +2 -2
- package/dist/bundle/{recognize-63ZLC4DN.js → recognize-MOBCGUI7.js} +1 -1
- package/dist/bundle/{remote-J4ZBFG3Y.js → remote-GARKVCO7.js} +4 -4
- package/dist/bundle/{rerank-HUQCCGYO.js → rerank-L3G7P3KX.js} +4 -4
- package/dist/bundle/{serve-MFJYL4AB.js → serve-ABRMEJ7P.js} +6 -6
- package/dist/bundle/server-NMRAFTY3.js +61 -0
- package/dist/bundle/server-VX3L42ED.js +48 -0
- package/dist/bundle/{server-2JQ5K33G.js → server-XLMROR5L.js} +50 -50
- package/dist/bundle/{state-AV5MO77W.js → state-5N2RVH2Y.js} +3 -3
- package/dist/bundle/{store-H4HCVN4H.js → store-4ML7O47C.js} +9 -9
- package/dist/bundle/store-maintenance-command-O3OTXKNO.js +48 -0
- package/dist/bundle/update-OWKZLZTS.js +69 -0
- package/dist/discovery/command.d.ts.map +1 -1
- package/dist/discovery/command.js +3 -0
- package/dist/discovery/command.js.map +1 -1
- package/dist/doctor/command.d.ts +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +19 -0
- package/dist/examples.js.map +1 -1
- package/dist/finance/deals-command.d.ts +22 -0
- package/dist/finance/deals-command.d.ts.map +1 -0
- package/dist/finance/deals-command.js +235 -0
- package/dist/finance/deals-command.js.map +1 -0
- package/dist/knowledge/project-status-command.d.ts.map +1 -1
- package/dist/knowledge/project-status-command.js +14 -7
- package/dist/knowledge/project-status-command.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +65 -0
- package/dist/program.js.map +1 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +18 -0
- package/dist/rows.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/cli-memo/topics/money.md +6 -0
- package/dist/bundle/auto-2RK6FE5A.js +0 -86
- package/dist/bundle/failure-4N6GOEGN.js +0 -66
- package/dist/bundle/server-RKPGL53W.js +0 -48
- package/dist/bundle/server-ZN2KC4EE.js +0 -61
- package/dist/bundle/store-maintenance-command-4GYOMUXE.js +0 -48
- package/dist/bundle/update-ATXEHV72.js +0 -69
- /package/dist/bundle/{chunk-VVDYRHYP.js → chunk-O3EZTSTN.js} +0 -0
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
autoState,
|
|
7
7
|
lastAutoRun,
|
|
8
8
|
recordAutoRun
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QWNEZWGZ.js";
|
|
10
10
|
import {
|
|
11
11
|
installer,
|
|
12
12
|
latest,
|
|
13
13
|
upgradeCommand
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PRL227K7.js";
|
|
15
15
|
import {
|
|
16
16
|
mcpOwnerAllowed,
|
|
17
17
|
readOnlyAvailability,
|
|
18
18
|
refuseWritesUnderLock
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HCMQGNZU.js";
|
|
20
20
|
import {
|
|
21
21
|
answers,
|
|
22
22
|
atDetail,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
trackAnswers,
|
|
27
27
|
wholeList,
|
|
28
28
|
withStore
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2XCXOI4F.js";
|
|
30
30
|
import {
|
|
31
31
|
ATTACHMENT_CHARS,
|
|
32
32
|
DIALECTS,
|
|
@@ -56,15 +56,15 @@ import {
|
|
|
56
56
|
showMail,
|
|
57
57
|
unsetConfigKey,
|
|
58
58
|
updateConfig
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-4OYYJSRS.js";
|
|
60
60
|
import "./chunk-QP3KNC5D.js";
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-IAML53OZ.js";
|
|
62
|
+
import "./chunk-KKXXP5RY.js";
|
|
63
|
+
import "./chunk-KVKO4X7K.js";
|
|
64
64
|
import {
|
|
65
65
|
errorObject,
|
|
66
66
|
recognisable
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-E3P7PIR3.js";
|
|
68
68
|
import {
|
|
69
69
|
DISCOVERY_DESCRIPTIONS,
|
|
70
70
|
addContractInfo,
|
|
@@ -100,29 +100,29 @@ import {
|
|
|
100
100
|
tasksCommand,
|
|
101
101
|
tasksStatsCommand,
|
|
102
102
|
withSqliteSidecars
|
|
103
|
-
} from "./chunk-
|
|
104
|
-
import "./chunk-
|
|
105
|
-
import "./chunk-
|
|
103
|
+
} from "./chunk-UK2MCVKV.js";
|
|
104
|
+
import "./chunk-NP5FU56F.js";
|
|
105
|
+
import "./chunk-O34QHLL5.js";
|
|
106
106
|
import {
|
|
107
107
|
allHitItem,
|
|
108
108
|
coverageGaps,
|
|
109
109
|
messageHitItem,
|
|
110
110
|
noteHitItem,
|
|
111
111
|
shownOf
|
|
112
|
-
} from "./chunk-
|
|
113
|
-
import "./chunk-
|
|
112
|
+
} from "./chunk-WG6AOUQW.js";
|
|
113
|
+
import "./chunk-EKFHAT36.js";
|
|
114
114
|
import {
|
|
115
115
|
SKILL_TARGETS,
|
|
116
116
|
skillCommand,
|
|
117
117
|
skillPath,
|
|
118
118
|
skillVersion
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-RV4EBFH2.js";
|
|
120
120
|
import {
|
|
121
121
|
modelGateway,
|
|
122
122
|
storeInfo,
|
|
123
123
|
storeSummary
|
|
124
|
-
} from "./chunk-
|
|
125
|
-
import "./chunk-
|
|
124
|
+
} from "./chunk-YLJWCB6F.js";
|
|
125
|
+
import "./chunk-OJX6GNQY.js";
|
|
126
126
|
import {
|
|
127
127
|
LIST_QUERY_GUIDE,
|
|
128
128
|
STATUS_SIGNALS,
|
|
@@ -174,18 +174,18 @@ import {
|
|
|
174
174
|
termField,
|
|
175
175
|
typedQuery,
|
|
176
176
|
withQuery
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-JWQWLMFP.js";
|
|
178
178
|
import {
|
|
179
179
|
readBoundedUtf8File,
|
|
180
180
|
writeFileAtomic
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-UCLNEOQS.js";
|
|
182
182
|
import {
|
|
183
183
|
commandsText,
|
|
184
184
|
inSection,
|
|
185
185
|
installHelp
|
|
186
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-O4I3BJPM.js";
|
|
187
187
|
import "./chunk-HTQTIKWP.js";
|
|
188
|
-
import "./chunk-
|
|
188
|
+
import "./chunk-T4NH7JI6.js";
|
|
189
189
|
import {
|
|
190
190
|
Command,
|
|
191
191
|
FETCH,
|
|
@@ -215,23 +215,26 @@ import {
|
|
|
215
215
|
runsDirFor,
|
|
216
216
|
settingRows,
|
|
217
217
|
settingsFor
|
|
218
|
-
} from "./chunk-
|
|
219
|
-
import "./chunk-
|
|
220
|
-
import "./chunk-
|
|
218
|
+
} from "./chunk-WFA2ZLJB.js";
|
|
219
|
+
import "./chunk-2P54ZDQO.js";
|
|
220
|
+
import "./chunk-67TMJCHI.js";
|
|
221
221
|
import {
|
|
222
222
|
isNewer
|
|
223
223
|
} from "./chunk-JY34MQW4.js";
|
|
224
224
|
import "./chunk-LER7G4XY.js";
|
|
225
|
-
import "./chunk-
|
|
226
|
-
import "./chunk-
|
|
227
|
-
import "./chunk-
|
|
228
|
-
import "./chunk-
|
|
225
|
+
import "./chunk-ELPCHMDA.js";
|
|
226
|
+
import "./chunk-XUNIJW7V.js";
|
|
227
|
+
import "./chunk-TWBJOORY.js";
|
|
228
|
+
import "./chunk-HQQC5JRS.js";
|
|
229
229
|
import {
|
|
230
230
|
releaseLock,
|
|
231
231
|
takeLock
|
|
232
|
-
} from "./chunk-
|
|
233
|
-
import "./chunk-
|
|
232
|
+
} from "./chunk-RHIQ34XW.js";
|
|
233
|
+
import "./chunk-NCBHNEWW.js";
|
|
234
234
|
import {
|
|
235
|
+
DEAL_KINDS,
|
|
236
|
+
DEAL_ROLES,
|
|
237
|
+
DEAL_STATUSES,
|
|
235
238
|
EVIDENCE_FINDINGS_KIND,
|
|
236
239
|
MAIL_FINDINGS_KIND,
|
|
237
240
|
MAX_FILE_BYTES,
|
|
@@ -265,7 +268,7 @@ import {
|
|
|
265
268
|
parseReference,
|
|
266
269
|
providerNamed,
|
|
267
270
|
refLabel
|
|
268
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-5O3T7Z7F.js";
|
|
269
272
|
import {
|
|
270
273
|
FACT_STATUSES,
|
|
271
274
|
FACT_TYPES,
|
|
@@ -298,22 +301,22 @@ import {
|
|
|
298
301
|
timezoneOf,
|
|
299
302
|
validateQuery,
|
|
300
303
|
walkQuery
|
|
301
|
-
} from "./chunk-
|
|
302
|
-
import "./chunk-
|
|
303
|
-
import "./chunk-
|
|
304
|
-
import "./chunk-
|
|
305
|
-
import "./chunk-
|
|
306
|
-
import "./chunk-
|
|
307
|
-
import "./chunk-
|
|
308
|
-
import "./chunk-
|
|
309
|
-
import "./chunk-
|
|
310
|
-
import "./chunk-
|
|
304
|
+
} from "./chunk-A2KU4HSF.js";
|
|
305
|
+
import "./chunk-42VOTRWE.js";
|
|
306
|
+
import "./chunk-GHLLCV4E.js";
|
|
307
|
+
import "./chunk-OYHQYCGJ.js";
|
|
308
|
+
import "./chunk-W7GJREIL.js";
|
|
309
|
+
import "./chunk-TBGBA45H.js";
|
|
310
|
+
import "./chunk-LJDBOXZN.js";
|
|
311
|
+
import "./chunk-KHEFBWLH.js";
|
|
312
|
+
import "./chunk-DA5YMQCB.js";
|
|
313
|
+
import "./chunk-QWZUMUA7.js";
|
|
311
314
|
import {
|
|
312
315
|
sharedModelsDirectory
|
|
313
|
-
} from "./chunk-
|
|
316
|
+
} from "./chunk-UX34ZUMK.js";
|
|
314
317
|
import {
|
|
315
318
|
storePath
|
|
316
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-F6UUS3OF.js";
|
|
317
320
|
import {
|
|
318
321
|
provideTerminal,
|
|
319
322
|
terminalOf
|
|
@@ -323,12 +326,12 @@ import {
|
|
|
323
326
|
REASONS,
|
|
324
327
|
STORE_CLIENT,
|
|
325
328
|
VERSION
|
|
326
|
-
} from "./chunk-
|
|
329
|
+
} from "./chunk-6BW7SC6A.js";
|
|
327
330
|
import "./chunk-CID4MNRQ.js";
|
|
328
331
|
import "./chunk-AT5Y62SD.js";
|
|
329
332
|
import "./chunk-D72URWJE.js";
|
|
330
|
-
import "./chunk-
|
|
331
|
-
import "./chunk-
|
|
333
|
+
import "./chunk-QWNVEFWY.js";
|
|
334
|
+
import "./chunk-CKLLVPTR.js";
|
|
332
335
|
import {
|
|
333
336
|
createDeadline,
|
|
334
337
|
createRenderer,
|
|
@@ -367,7 +370,7 @@ import {
|
|
|
367
370
|
errorCodes,
|
|
368
371
|
isCliError
|
|
369
372
|
} from "./chunk-RZ54DSVU.js";
|
|
370
|
-
import "./chunk-
|
|
373
|
+
import "./chunk-TXU5T7VA.js";
|
|
371
374
|
import {
|
|
372
375
|
__name
|
|
373
376
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -649,7 +652,7 @@ var collect = /* @__PURE__ */ __name((value, previous = []) => [...previous, val
|
|
|
649
652
|
var readScope = /* @__PURE__ */ __name((command, help = ONE_ACCOUNT_HELP) => sourceOptions(command, help).option("--json", "print JSON; --json=id,title keeps only those fields"), "readScope");
|
|
650
653
|
var writeScope = /* @__PURE__ */ __name((command, help) => writeOptions(command, help).option("--json", "print JSON; --json=id,title keeps only those fields"), "writeScope");
|
|
651
654
|
|
|
652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/sender-scores.js
|
|
653
656
|
var SCORED = "mail_sender_scores";
|
|
654
657
|
var DAY = 864e5;
|
|
655
658
|
var RECENT = 2 * 365 * DAY;
|
|
@@ -665,7 +668,7 @@ var demotedSenders = /* @__PURE__ */ __name(async (store) => {
|
|
|
665
668
|
return senders;
|
|
666
669
|
}, "demotedSenders");
|
|
667
670
|
|
|
668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/sync.js
|
|
669
672
|
var DAY2 = 864e5;
|
|
670
673
|
var EDGE = 2 * DAY2;
|
|
671
674
|
|
|
@@ -1894,7 +1897,7 @@ import { createHash } from "node:crypto";
|
|
|
1894
1897
|
import { existsSync, readFileSync as readFileSync2, statSync } from "node:fs";
|
|
1895
1898
|
import { basename, extname, relative, sep } from "node:path";
|
|
1896
1899
|
|
|
1897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/services/documents/extraction.js
|
|
1898
1901
|
var Proposal = object({
|
|
1899
1902
|
kind: picklist(["summary", "digest", "fact", "preference"]),
|
|
1900
1903
|
body: pipe(string(), trim(), minLength(1), maxLength(15e3)),
|
|
@@ -1902,10 +1905,10 @@ var Proposal = object({
|
|
|
1902
1905
|
});
|
|
1903
1906
|
var Proposals = object({ items: pipe(array(Proposal), maxLength(20)) });
|
|
1904
1907
|
|
|
1905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/services/documents/mirrors.js
|
|
1906
1909
|
var ID = pipe(string(), regex(/^[A-Za-z0-9_-]{1,200}$/));
|
|
1907
1910
|
|
|
1908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/services/documents/sync.js
|
|
1909
1912
|
var MAX_PICTURE_BYTES = 25 * 1024 * 1024;
|
|
1910
1913
|
|
|
1911
1914
|
// dist/notes/links.js
|
|
@@ -3995,6 +3998,9 @@ var SECTIONS = [
|
|
|
3995
3998
|
["organizations", "organise"],
|
|
3996
3999
|
["invoices", "organise"],
|
|
3997
4000
|
["orders", "organise"],
|
|
4001
|
+
["deals", "organise"],
|
|
4002
|
+
["leads", "organise"],
|
|
4003
|
+
["pipelines", "organise"],
|
|
3998
4004
|
["payments", "organise"],
|
|
3999
4005
|
["records", "organise"],
|
|
4000
4006
|
["projects", "organise"],
|
|
@@ -4369,6 +4375,25 @@ var EXAMPLES = {
|
|
|
4369
4375
|
"facts list": ["memo facts list kind:decision project:HRB"],
|
|
4370
4376
|
"orders list": ["memo orders list status:shipped", `memo orders list number:A-1042 'supplier:"Shop One"' --json`],
|
|
4371
4377
|
"orders show": ["memo orders show order:3"],
|
|
4378
|
+
"pipelines list": ["memo pipelines list", "memo pipelines list kind:lead --json"],
|
|
4379
|
+
"pipelines show": ["memo pipelines show pipeline:2", "memo pipelines show Sales --since-time 2026-09-01"],
|
|
4380
|
+
"pipelines add": [
|
|
4381
|
+
"memo pipelines add Sales Call Quote Contract won lost",
|
|
4382
|
+
"memo pipelines add Inbound new called --kind lead"
|
|
4383
|
+
],
|
|
4384
|
+
"deals list": ["memo deals list status:open project:HRB", "memo deals list stage:Quote --json"],
|
|
4385
|
+
"deals show": ["memo deals show deal:5"],
|
|
4386
|
+
"deals add": [
|
|
4387
|
+
"memo deals add 'Site for the clinic' Call 500000.00 RUB --organization organization:3 --project HRB",
|
|
4388
|
+
"memo deals add 'Support contract' Sales/Quote --person person:7 --role decision-maker --due 2026-12-01"
|
|
4389
|
+
],
|
|
4390
|
+
"deals move": ["memo deals move deal:5 Quote"],
|
|
4391
|
+
"deals close": ["memo deals close deal:5 won", "memo deals close deal:6 lost --reason 'chose a cheaper studio'"],
|
|
4392
|
+
"leads list": ["memo leads list status:open"],
|
|
4393
|
+
"leads show": ["memo leads show lead:3"],
|
|
4394
|
+
"leads add": ["memo leads add 'Call from the site'", "memo leads add 'Clinic in Kazan' contacted --person person:9"],
|
|
4395
|
+
"leads move": ["memo leads move lead:3 qualified"],
|
|
4396
|
+
"leads close": ["memo leads close lead:3 lost --reason 'no budget'"],
|
|
4372
4397
|
"orders add": [
|
|
4373
4398
|
"memo orders add 'Shop One' 2499.00 RUB --kind personal --title A-1042",
|
|
4374
4399
|
"memo orders add 'Office Supply' --kind client --organization organization:3"
|
|
@@ -4620,7 +4645,7 @@ var memoriesCommand = /* @__PURE__ */ __name((program, streams, env) => {
|
|
|
4620
4645
|
...options.supersedes === void 0 ? {} : { supersedes: options.supersedes }
|
|
4621
4646
|
}, await by))));
|
|
4622
4647
|
});
|
|
4623
|
-
withQuery(annotate(memories.command("list"), { effects: LOCAL_READ }).description("memories, newest first"), MEMORY_QUERY).option("--limit <n>", "most memories, up to 500", positive, 100).option("--json", "print JSON; --json=id,title keeps only those fields").action((words, { json:
|
|
4648
|
+
withQuery(annotate(memories.command("list"), { effects: LOCAL_READ }).description("memories, newest first"), MEMORY_QUERY).option("--limit <n>", "most memories, up to 500", positive, 100).option("--json", "print JSON; --json=id,title keeps only those fields").action((words, { json: json7, limit }) => run(json7, (store) => listMemories(store, words, limit)));
|
|
4624
4649
|
annotate(memories.command("show"), { effects: LOCAL_READ, output: { entity: "memory" } }).description("one memory with its evidence").argument("<ref>", "memory:<id>").option("--sources", "read each piece of evidence back: who, when, a short excerpt, and whether it is gone").option("--json", "print JSON; --json=id,title keeps only those fields").action((ref, options) => run(options.json, async (store) => itemAnswer({
|
|
4625
4650
|
...memoryItem(await store.memories.get(ref)),
|
|
4626
4651
|
...options.sources ? { sources: await store.memories.sources(ref) } : {}
|
|
@@ -4738,7 +4763,7 @@ var factsCommand = /* @__PURE__ */ __name((program, streams, env) => {
|
|
|
4738
4763
|
...options.supersedes === void 0 ? {} : { supersedes: options.supersedes }
|
|
4739
4764
|
}))));
|
|
4740
4765
|
});
|
|
4741
|
-
withQuery(annotate(facts.command("list"), { effects: LOCAL_READ }).description("facts, latest first"), FACT_QUERY).option("--limit <n>", "most facts, up to 500", positive, 100).option("--json", "print JSON; --json=id,title keeps only those fields").action((words, { json:
|
|
4766
|
+
withQuery(annotate(facts.command("list"), { effects: LOCAL_READ }).description("facts, latest first"), FACT_QUERY).option("--limit <n>", "most facts, up to 500", positive, 100).option("--json", "print JSON; --json=id,title keeps only those fields").action((words, { json: json7, limit }) => run(json7, (store) => listFacts(store, words, limit)));
|
|
4742
4767
|
annotate(facts.command("show"), { effects: LOCAL_READ, output: { entity: "fact" } }).description("one fact with its evidence").argument("<ref>", "fact:<id>").option("--sources", "read each piece of evidence back: who, when, a short excerpt, and whether it is gone").option("--json", "print JSON; --json=id,title keeps only those fields").action((ref, options) => run(options.json, async (store) => itemAnswer({
|
|
4743
4768
|
...factItem(await store.facts.get(ref)),
|
|
4744
4769
|
...options.sources ? { sources: await store.facts.sources(ref) } : {}
|
|
@@ -4902,7 +4927,7 @@ var writeMeta = /* @__PURE__ */ __name((command) => byOption(command.option("--p
|
|
|
4902
4927
|
var financeCommands = /* @__PURE__ */ __name((program, streams, env) => {
|
|
4903
4928
|
const { run } = answers(program, streams, env);
|
|
4904
4929
|
const invoices = program.command("invoices").description("invoices you issued or received, with their lines and what paid them; amounts per currency").summary("invoices you issued or received, and what paid them");
|
|
4905
|
-
withQuery(json(annotate(invoices.command("list"), { effects: LOCAL_READ })).description("invoices, newest first; review:proposed lists what waits for you"), INVOICE_QUERY).option("--limit <n>", "most invoices, up to 500", positive, 100).action((words, { json:
|
|
4930
|
+
withQuery(json(annotate(invoices.command("list"), { effects: LOCAL_READ })).description("invoices, newest first; review:proposed lists what waits for you"), INVOICE_QUERY).option("--limit <n>", "most invoices, up to 500", positive, 100).action((words, { json: json7, limit }) => run(json7, (store) => listInvoices(store, words, limit)));
|
|
4906
4931
|
json(annotate(invoices.command("show"), { effects: LOCAL_READ, output: { entity: "invoice" } })).description("one invoice with its lines and the payments allocated to it").argument("<ref>", "invoice:<id>").action((ref, options) => run(options.json, async (store) => itemAnswer(await store.finance.invoice(ref))));
|
|
4907
4932
|
json(writeMeta(party(annotate(invoices.command("add"), {
|
|
4908
4933
|
effects: LOCAL_WRITE,
|
|
@@ -4926,7 +4951,7 @@ var financeCommands = /* @__PURE__ */ __name((program, streams, env) => {
|
|
|
4926
4951
|
});
|
|
4927
4952
|
});
|
|
4928
4953
|
const payments = program.command("payments").description("money paid to you or by you, and the invoices each payment settles; amounts per currency").summary("money paid to you or by you, and what it settles");
|
|
4929
|
-
withQuery(json(annotate(payments.command("list"), { effects: LOCAL_READ })).description("payments, newest first; review:proposed lists what waits for you"), PAYMENT_QUERY).option("--limit <n>", "most payments, up to 500", positive, 100).action((words, { json:
|
|
4954
|
+
withQuery(json(annotate(payments.command("list"), { effects: LOCAL_READ })).description("payments, newest first; review:proposed lists what waits for you"), PAYMENT_QUERY).option("--limit <n>", "most payments, up to 500", positive, 100).action((words, { json: json7, limit }) => run(json7, (store) => listPayments(store, words, limit)));
|
|
4930
4955
|
json(annotate(payments.command("show"), { effects: LOCAL_READ, output: { entity: "payment" } })).description("one payment with the invoices it is allocated to").argument("<ref>", "payment:<id>").action((ref, options) => run(options.json, async (store) => itemAnswer(await store.finance.payment(ref))));
|
|
4931
4956
|
json(writeMeta(party(annotate(payments.command("add"), { effects: LOCAL_WRITE, output: { entity: "payment" } }), "who paid or was paid").option("--kind <kind>", "in (paid to you) or out (paid by you)").option("--title <title>", "the payment's reference, such as the bank's purpose line").option("--occurred-time <time>", "the day it was paid, such as 2026-11-01; today when left out"))).description(`record a payment; ${PROPOSES}. payments allocate matches it to an invoice`).summary("record a payment; an agent's waits for your review").argument("<amount>", "a decimal, such as 50000.00").argument("<currency>", "ISO 4217, such as RUB").action(async (amount, currency, options, command) => {
|
|
4932
4957
|
const by = await whoRuns(command, env, { asOwner: options.asOwner, question: "record this payment as yours?" });
|
|
@@ -4957,6 +4982,163 @@ var financeCommands = /* @__PURE__ */ __name((program, streams, env) => {
|
|
|
4957
4982
|
});
|
|
4958
4983
|
}, "financeCommands");
|
|
4959
4984
|
|
|
4985
|
+
// dist/finance/deals-command.js
|
|
4986
|
+
var queryOf = /* @__PURE__ */ __name((entity) => ({
|
|
4987
|
+
entity,
|
|
4988
|
+
backend: "native",
|
|
4989
|
+
fields: [
|
|
4990
|
+
termField("project", "kw", "project:PMED"),
|
|
4991
|
+
termField("status", "enum", "status:open", { values: DEAL_STATUSES }),
|
|
4992
|
+
termField("stage", "kw", 'stage:"Quote sent"'),
|
|
4993
|
+
termField("pipeline", "kw", "pipeline:Sales"),
|
|
4994
|
+
termField("organization", "ref", 'organization:"organization:3"')
|
|
4995
|
+
]
|
|
4996
|
+
}), "queryOf");
|
|
4997
|
+
var QUERIES = { deal: queryOf("deal"), lead: queryOf("lead") };
|
|
4998
|
+
var PIPELINE_QUERY = {
|
|
4999
|
+
entity: "pipeline",
|
|
5000
|
+
backend: "native",
|
|
5001
|
+
fields: [termField("kind", "enum", "kind:lead", { values: DEAL_KINDS }), termField("name", "kw", "name:Sales")]
|
|
5002
|
+
};
|
|
5003
|
+
var listDeals = /* @__PURE__ */ __name(async (store, kind, words, limit) => {
|
|
5004
|
+
const command = `${kind}s list`;
|
|
5005
|
+
const terms = queryTerms(words, QUERIES[kind], command);
|
|
5006
|
+
const filter = {
|
|
5007
|
+
kind,
|
|
5008
|
+
...terms.has("project") ? { project: await canonicalProject(store, terms.get("project")) } : {},
|
|
5009
|
+
...terms.has("status") ? { status: terms.get("status") } : {},
|
|
5010
|
+
...terms.has("stage") ? { stage: terms.get("stage") } : {},
|
|
5011
|
+
...terms.has("pipeline") ? { pipeline: terms.get("pipeline") } : {},
|
|
5012
|
+
...terms.has("organization") ? { organization: terms.get("organization") } : {}
|
|
5013
|
+
};
|
|
5014
|
+
return pageOf(command, limit, (most) => store.deals.list({ ...filter, limit: most }));
|
|
5015
|
+
}, "listDeals");
|
|
5016
|
+
var roleOf = /* @__PURE__ */ __name((role) => {
|
|
5017
|
+
const value = role ?? "contact";
|
|
5018
|
+
if (!DEAL_ROLES.includes(value))
|
|
5019
|
+
throw new CliError("validation_error", `--role is one of ${DEAL_ROLES.join(", ")}`, { param: "--role" });
|
|
5020
|
+
return value;
|
|
5021
|
+
}, "roleOf");
|
|
5022
|
+
var referenceOf = /* @__PURE__ */ __name((kind, value) => /^\d+$/.test(value.trim()) ? `${kind}:${value.trim()}` : value.trim(), "referenceOf");
|
|
5023
|
+
var stageOf = /* @__PURE__ */ __name((stage) => {
|
|
5024
|
+
if (stage === void 0)
|
|
5025
|
+
return {};
|
|
5026
|
+
const at = stage.lastIndexOf("/");
|
|
5027
|
+
return at <= 0 ? { stage } : { pipeline: stage.slice(0, at), stage: stage.slice(at + 1) };
|
|
5028
|
+
}, "stageOf");
|
|
5029
|
+
var json2 = /* @__PURE__ */ __name((command) => command.option("--json", "print JSON; --json=ref,title keeps only those fields"), "json");
|
|
5030
|
+
var WHAT = {
|
|
5031
|
+
deal: { one: "deal", hope: "what you hope to sell, such as 'Site for the clinic'" },
|
|
5032
|
+
lead: { one: "lead", hope: "who or what came in, such as 'Call from the site'" }
|
|
5033
|
+
};
|
|
5034
|
+
var itemCommands = /* @__PURE__ */ __name((program, kind, run, env) => {
|
|
5035
|
+
const { one: one2, hope } = WHAT[kind];
|
|
5036
|
+
const group = program.command(`${kind}s`).description(kind === "deal" ? "deals you hope to win: the client, the expected amount, the stage and whether it was won or lost" : "leads: first contacts in a lead pipeline, before they are deals").summary(kind === "deal" ? "deals in your pipelines, open, won or lost" : "leads in your lead pipelines");
|
|
5037
|
+
withQuery(json2(annotate(group.command("list"), { effects: LOCAL_READ })).description(`${one2}s, newest first; status:open is what is still in play`), QUERIES[kind]).summary(`${one2}s, newest first`).option("--limit <n>", `most ${one2}s, up to 500`, positive, 100).action((words, { json: json7, limit }) => run(json7, (store) => listDeals(store, kind, words, limit)));
|
|
5038
|
+
json2(annotate(group.command("show"), { effects: LOCAL_READ, output: { entity: kind } })).description(`one ${one2} with its pipeline, stage, status, amount, the people on it and what it was read from`).summary(`one ${one2} with its stage, status, amount and people`).argument("<ref>", `${kind}:<id>`).action((ref, options) => run(options.json, async (store) => itemAnswer(await store.deals.get(ref))));
|
|
5039
|
+
json2(annotate(group.command("add"), { effects: LOCAL_WRITE, output: { entity: kind }, literal_after_dashes: true }).option("--organization <organization>", "the client: organization:<id>").option("--person <uid>", `a person on the ${one2}: person:<id>; repeat for another, up to 20`, collect).option("--role <role>", `what those people are on it: ${DEAL_ROLES.join(", ")}; contact by default`).option("--due <time>", "the day you expect it to close, such as 2026-12-01").option("--project <project>", "the project it belongs to: its key or project:<id>").option("--reason <text>", "why an agent records it, kept with it").option("--evidence <ref...>", "what shows it, up to 8: msg:, note:, document: or another reference")).description(`record a ${one2} in a stage; it is written at once, whoever runs it`).summary(`record a ${one2} in a stage`).argument("<title>", hope).argument(kind === "deal" ? "<stage>" : "[stage]", kind === "deal" ? "the stage it is in; Sales/Quote or pipeline:3/Quote names the pipeline when two have that stage" : "the stage it is in; the first stage of the only lead pipeline when left out").argument("[amount]", "the expected amount, a decimal such as 500000.00").argument("[currency]", "ISO 4217, such as RUB; given with the amount").action(async (title, stage, amount, currency, options) => {
|
|
5040
|
+
const by = authorOf(env);
|
|
5041
|
+
const role = roleOf(options.role);
|
|
5042
|
+
await run(options.json, async (store) => {
|
|
5043
|
+
const closeDate = dayOf(options.due);
|
|
5044
|
+
return itemAnswer(await store.deals.add({
|
|
5045
|
+
by,
|
|
5046
|
+
kind,
|
|
5047
|
+
title,
|
|
5048
|
+
...stageOf(stage),
|
|
5049
|
+
...options.organization === void 0 ? {} : { organization: referenceOf("organization", options.organization) },
|
|
5050
|
+
...options.person === void 0 ? {} : { people: options.person.map((person) => ({ person: referenceOf("person", person), role })) },
|
|
5051
|
+
...amount === void 0 ? {} : { amount },
|
|
5052
|
+
...currency === void 0 ? {} : { currency },
|
|
5053
|
+
...closeDate === void 0 ? {} : { closeDate },
|
|
5054
|
+
...options.project === void 0 ? {} : { project: await canonicalProject(store, options.project) },
|
|
5055
|
+
...options.reason === void 0 ? {} : { reason: options.reason },
|
|
5056
|
+
...options.evidence === void 0 ? {} : { evidence: options.evidence }
|
|
5057
|
+
}));
|
|
5058
|
+
});
|
|
5059
|
+
});
|
|
5060
|
+
json2(annotate(group.command("move"), { effects: LOCAL_WRITE, output: { entity: kind } })).description(`move a ${one2} to another stage of its pipeline; a won or lost stage closes it, an open one reopens it`).summary(`move a ${one2} to another stage`).argument("<ref>", `${kind}:<id>`).argument("<stage>", `a stage of the ${one2}'s pipeline`).action(async (ref, stage, options) => {
|
|
5061
|
+
const by = authorOf(env);
|
|
5062
|
+
await run(options.json, async (store) => itemAnswer(await store.deals.move(ref, { stage, by })));
|
|
5063
|
+
});
|
|
5064
|
+
json2(annotate(group.command("close"), { effects: LOCAL_WRITE, output: { entity: kind } }).option("--occurred-time <time>", "the day it closed, such as 2026-11-20; today when left out").option("--reason <text>", "why it was won or lost, kept with it")).description(`close a ${one2} as won or lost; it moves to its pipeline's won or lost stage when there is one`).summary(`close a ${one2} as won or lost`).argument("<ref>", `${kind}:<id>`).argument("<outcome>", "won or lost").action(async (ref, outcome, options) => {
|
|
5065
|
+
if (outcome !== "won" && outcome !== "lost")
|
|
5066
|
+
throw new CliError("validation_error", `a ${one2} closes as won or lost`, { param: "outcome" });
|
|
5067
|
+
const by = authorOf(env);
|
|
5068
|
+
const date = dayOf(options.occurredTime);
|
|
5069
|
+
await run(options.json, async (store) => itemAnswer(await store.deals.close(ref, {
|
|
5070
|
+
status: outcome,
|
|
5071
|
+
by,
|
|
5072
|
+
...date === void 0 ? {} : { date },
|
|
5073
|
+
...options.reason === void 0 ? {} : { reason: options.reason }
|
|
5074
|
+
})));
|
|
5075
|
+
});
|
|
5076
|
+
}, "itemCommands");
|
|
5077
|
+
var percent = /* @__PURE__ */ __name((share) => share === null ? "" : `, ${Math.round(share * 100)}% go on`, "percent");
|
|
5078
|
+
var funnelText = /* @__PURE__ */ __name((report) => [
|
|
5079
|
+
`${report.name} (${report.kind}), ${report.ref}${report.since === null ? "" : `, made since ${report.since}`}`,
|
|
5080
|
+
...report.stages.map((stage) => ` ${stage.position}. ${stage.name}${stage.outcome === "open" ? "" : ` [${stage.outcome}]`}: ${stage.open} open, ${stage.reached} reached${percent(stage.conversion)}`),
|
|
5081
|
+
` ${report.totals.items} in all: ${report.totals.open} open, ${report.totals.won} won, ${report.totals.lost} lost` + (report.totals.winRate === null ? "" : `, win rate ${Math.round(report.totals.winRate * 100)}%`)
|
|
5082
|
+
].join("\n"), "funnelText");
|
|
5083
|
+
var dealCommands = /* @__PURE__ */ __name((program, streams, env) => {
|
|
5084
|
+
const { run, print } = answers(program, streams, env);
|
|
5085
|
+
const pipelines = program.command("pipelines").description("sales pipelines: the stages a deal or a lead goes through, in order, and how many get through each").summary("sales pipelines, their stages and conversion");
|
|
5086
|
+
withQuery(json2(annotate(pipelines.command("list"), { effects: LOCAL_READ })).description("every pipeline with its stages in order and how many open deals or leads stand in each"), PIPELINE_QUERY).summary("every pipeline with its stages").action((words, options) => run(options.json, async (store) => {
|
|
5087
|
+
const terms = queryTerms(words, PIPELINE_QUERY, "pipelines list");
|
|
5088
|
+
const name = terms.get("name")?.toLocaleLowerCase();
|
|
5089
|
+
const kind = terms.get("kind");
|
|
5090
|
+
const all = await store.deals.pipelines(kind === void 0 ? {} : { kind });
|
|
5091
|
+
return wholeList("pipelines list", name === void 0 ? all : all.filter((one2) => one2.name.toLocaleLowerCase() === name));
|
|
5092
|
+
}));
|
|
5093
|
+
json2(annotate(pipelines.command("show"), { effects: LOCAL_READ, output: { entity: "pipeline" } }).option("--since-time <time>", "count only deals or leads made since this day, such as 2026-09-01")).description("one pipeline's funnel: per stage the open deals or leads in it, how many reached it, and the share that went on to the next stage; then won, lost and the win rate").summary("one pipeline's stages with counts and conversion").argument("<pipeline>", "pipeline:<id>, or a name only one pipeline has").action(async (pipeline, options) => {
|
|
5094
|
+
const since = dayOf(options.sinceTime);
|
|
5095
|
+
const report = await withStore(env, (store) => store.deals.pipeline(pipeline, since === void 0 ? {} : { since }));
|
|
5096
|
+
print(options.json, itemAnswer(report), funnelText(report));
|
|
5097
|
+
});
|
|
5098
|
+
json2(annotate(pipelines.command("add"), { effects: LOCAL_WRITE, literal_after_dashes: true }).option("--kind <kind>", "what it holds: deal or lead; deal by default")).description("make a pipeline with its stages in order; a stage named won or lost (any letter case) ends a deal or lead as that").summary("make a pipeline with its stages").argument("<name>", "the pipeline's name, such as Sales").argument("<stage...>", "its stages in order, such as Call Quote Contract won lost").action(async (name, stages, options) => {
|
|
5099
|
+
const kind = options.kind ?? "deal";
|
|
5100
|
+
if (!DEAL_KINDS.includes(kind))
|
|
5101
|
+
throw new CliError("validation_error", "--kind is deal or lead", { param: "--kind" });
|
|
5102
|
+
const by = authorOf(env);
|
|
5103
|
+
await run(options.json, async (store) => itemAnswer(await store.deals.addPipeline({
|
|
5104
|
+
name,
|
|
5105
|
+
kind,
|
|
5106
|
+
stages: stages.map((stage) => {
|
|
5107
|
+
const word = stage.trim().toLocaleLowerCase();
|
|
5108
|
+
return word === "won" || word === "lost" ? { name: stage, outcome: word } : stage;
|
|
5109
|
+
}),
|
|
5110
|
+
by
|
|
5111
|
+
})));
|
|
5112
|
+
});
|
|
5113
|
+
itemCommands(program, "deal", run, env);
|
|
5114
|
+
itemCommands(program, "lead", run, env);
|
|
5115
|
+
}, "dealCommands");
|
|
5116
|
+
var STATUS_DEALS = 5;
|
|
5117
|
+
var openDealsOf = /* @__PURE__ */ __name(async (store, projects) => {
|
|
5118
|
+
const found = (await Promise.all(projects.map((project) => store.deals.list({ project, status: "open" })))).flat();
|
|
5119
|
+
const sorted = found.sort((a, b) => (a.closeDate ?? "9999").localeCompare(b.closeDate ?? "9999") || b.createdAt.localeCompare(a.createdAt));
|
|
5120
|
+
return {
|
|
5121
|
+
deals: sorted.slice(0, STATUS_DEALS).map((deal) => ({
|
|
5122
|
+
ref: deal.ref,
|
|
5123
|
+
title: deal.title,
|
|
5124
|
+
stage: deal.stage,
|
|
5125
|
+
amount: deal.amount,
|
|
5126
|
+
currency: deal.currency,
|
|
5127
|
+
close_date: deal.closeDate
|
|
5128
|
+
})),
|
|
5129
|
+
more: Math.max(sorted.length - STATUS_DEALS, 0)
|
|
5130
|
+
};
|
|
5131
|
+
}, "openDealsOf");
|
|
5132
|
+
var dealsText = /* @__PURE__ */ __name(({ deals, more }) => deals.length === 0 ? [] : [
|
|
5133
|
+
"open deals:",
|
|
5134
|
+
...deals.map((deal) => {
|
|
5135
|
+
const money = deal.amount === null ? "" : `, ${deal.amount} ${deal.currency}`;
|
|
5136
|
+
const due = deal.close_date === null ? "" : `, close ${deal.close_date}`;
|
|
5137
|
+
return ` ${deal.ref} ${deal.title} \xB7 ${deal.stage}${money}${due}`;
|
|
5138
|
+
}),
|
|
5139
|
+
...more > 0 ? [` +${more} more: memo deals list status:open`] : []
|
|
5140
|
+
], "dealsText");
|
|
5141
|
+
|
|
4960
5142
|
// dist/finance/orders-command.js
|
|
4961
5143
|
var ORDER_QUERY = {
|
|
4962
5144
|
entity: "order",
|
|
@@ -4989,13 +5171,13 @@ var oneOf2 = /* @__PURE__ */ __name((value, allowed, flag) => {
|
|
|
4989
5171
|
throw new CliError("validation_error", `${flag} is one of ${allowed.join(", ")}`, { param: flag });
|
|
4990
5172
|
return value;
|
|
4991
5173
|
}, "oneOf");
|
|
4992
|
-
var
|
|
5174
|
+
var json3 = /* @__PURE__ */ __name((command) => command.option("--json", "print JSON; --json=ref,title keeps only those fields"), "json");
|
|
4993
5175
|
var orderCommands = /* @__PURE__ */ __name((program, streams, env) => {
|
|
4994
5176
|
const { run } = answers(program, streams, env);
|
|
4995
5177
|
const orders = program.command("orders").description("orders you placed or took, for whom, from which shop, and how far delivery got").summary("orders you placed or took, and how far delivery got");
|
|
4996
|
-
withQuery(
|
|
4997
|
-
|
|
4998
|
-
|
|
5178
|
+
withQuery(json3(annotate(orders.command("list"), { effects: LOCAL_READ })).description("orders, newest first; review:proposed is what waits for you"), ORDER_QUERY).option("--limit <n>", "most orders, up to 500", positive, 100).action((words, { json: json7, limit }) => run(json7, (store) => listOrders(store, words, limit)));
|
|
5179
|
+
json3(annotate(orders.command("show"), { effects: LOCAL_READ, output: { entity: "order" } })).description("one order with its customer, shop, amount, status and the mail it was read from").argument("<ref>", "order:<id>").action((ref, options) => run(options.json, async (store) => itemAnswer(await store.orders.get(ref))));
|
|
5180
|
+
json3(byOption(annotate(orders.command("add"), { effects: LOCAL_WRITE, output: { entity: "order" }, literal_after_dashes: true }).option("--kind <kind>", `why it was ordered: ${ORDER_PURPOSES.join(", ")}`).option("--person <uid>", "whom it is for, when not you: person:<id>").option("--organization <organization>", "whom it is for, when not you: organization:<id>").option("--title <title>", "the shop's order number").option("--occurred-time <time>", "the day it was ordered, such as 2026-11-01").option("--project <project>", "the project it belongs to: its key or project:<id>").option("--reason <text>", "why an agent proposes it, for the owner who decides").option("--evidence <ref...>", "what shows it, up to 8: msg:, note:, document: or another reference"))).description("record a placed order; yours is confirmed at once, an agent's waits as proposed for you in memo review").summary("record an order; an agent's waits for your review").argument("<shop>", "the shop or supplier, as its mail names it").argument("[amount]", "the order's amount, a decimal such as 2499.00").argument("[currency]", "ISO 4217, such as RUB; given with the amount").action(async (shop, amount, currency, options, command) => {
|
|
4999
5181
|
const by = await whoRuns(command, env, { asOwner: options.asOwner, question: "record this order as yours?" });
|
|
5000
5182
|
await run(options.json, async (store) => {
|
|
5001
5183
|
const customer = partyOf(options, false);
|
|
@@ -5285,18 +5467,18 @@ var ACTIONS_QUERY = {
|
|
|
5285
5467
|
fields: [termField("status", "enum", "status:proposed", { values: ["proposed", "reviewed"] })],
|
|
5286
5468
|
defaults: ["status:proposed"]
|
|
5287
5469
|
};
|
|
5288
|
-
var
|
|
5470
|
+
var json4 = /* @__PURE__ */ __name((command) => command.option("--json", "print JSON; --json=id,status keeps only those fields"), "json");
|
|
5289
5471
|
var projectActionsCommand = /* @__PURE__ */ __name((projects, streams, env) => {
|
|
5290
5472
|
const group = projects.command("actions").description("cited key documents and findings an agent proposed for a project, with the evidence to decide them").summary("an agent's proposals for a project, and deciding them");
|
|
5291
5473
|
const { run } = answers(projects, streams, env);
|
|
5292
|
-
|
|
5474
|
+
json4(annotate(group.command("add"), { effects: LOCAL_WRITE })).description("stage an agent's cited facts and follow-ups about one project for review").argument("<file>", FINDINGS_INPUT_HELP).addHelpText("after", "\nInput: schema_version 1, key, extractor, findings. Every finding names id, kind and evidence: 1\u20138 msg:, document: or note: references with the fingerprint projects evidence or notes show gives. A fact may name a project and a subject (person:, organization:, task: or project:), or neither; a task names its project. Facts name type and statement; tasks name type, title, reason and commitment (explicit or inferred). A due_at or assignee needs due_evidence or assignee_evidence citing this finding's references. A payment names payment {amount, currency, direction to_us|from_us, state paid|expected|cancelled, counterparty, paid_at}: an expected one becomes an invoice and needs a person: or organization: counterparty; a paid or cancelled one names in supersedes the invoice: it settles or voids. At most one project per batch. The same key and input returns the same batch; actions confirm and reject decide it by its id.\n").action(async (file, given, command) => {
|
|
5293
5475
|
const input = parseEvidenceFindingsJson(await readFindingsInput(file, environmentOf(projects).stdin ?? process.stdin));
|
|
5294
5476
|
const author = await whoRuns(command, env, { question: "" });
|
|
5295
5477
|
if (author === "owner")
|
|
5296
5478
|
throw new CliError("validation_error", "findings are an agent's proposals; record your own with memo facts add");
|
|
5297
5479
|
await run(given.json, async (store) => itemAnswer(await store.evidenceFindings.stage(input, author)));
|
|
5298
5480
|
});
|
|
5299
|
-
withQuery(
|
|
5481
|
+
withQuery(json4(answerEntity(annotate(group.command("list"), { effects: LOCAL_READ }), "project_action", union([
|
|
5300
5482
|
strictObject({
|
|
5301
5483
|
kind: literal("key_document"),
|
|
5302
5484
|
id: string(),
|
|
@@ -5337,7 +5519,7 @@ var projectActionsCommand = /* @__PURE__ */ __name((projects, streams, env) => {
|
|
|
5337
5519
|
});
|
|
5338
5520
|
}));
|
|
5339
5521
|
for (const name of ["confirm", "reject"]) {
|
|
5340
|
-
const command = byOption(
|
|
5522
|
+
const command = byOption(json4(annotate(group.command(name), { effects: LOCAL_WRITE })).description(name === "confirm" ? "confirm a suggested key document, or create the named findings of a batch and reject its other new ones; an agent decides for you only when agent_decisions is true, and with --reason" : "reject a suggested key document, or every new finding of a batch").summary(name === "confirm" ? "confirm a proposal, yours or an agent's with --reason" : "reject a proposal").argument("<project>", "the project's id, project:<id>, key, exact name or alias").argument("<id>", "key:<id> for a key document, or a findings batch number, as projects actions list gives them"));
|
|
5341
5523
|
if (name === "confirm")
|
|
5342
5524
|
command.argument("[findings...]", "the finding IDs of a batch to create");
|
|
5343
5525
|
command.option("--fingerprint <hash>", "a findings batch's fingerprint, as projects actions list gives it").option("--reason <text>", "why, in a few words; required when an agent decides for you").action(async (reference2, id, ...rest) => {
|
|
@@ -5798,7 +5980,7 @@ var projectGatherCommand = /* @__PURE__ */ __name((projects, print, env, warn) =
|
|
|
5798
5980
|
// dist/knowledge/project-status-command.js
|
|
5799
5981
|
var withFinance = /* @__PURE__ */ __name((row) => ({
|
|
5800
5982
|
...row,
|
|
5801
|
-
sections: { ...row.sections, finance: "memo_finance" }
|
|
5983
|
+
sections: { ...row.sections, finance: "memo_finance", deals: "memo_deal" }
|
|
5802
5984
|
}), "withFinance");
|
|
5803
5985
|
var titled = /* @__PURE__ */ __name(async (store, found) => {
|
|
5804
5986
|
const summaries = await store.refs.summaries(found.chats.map((chat) => chat.ref));
|
|
@@ -5829,14 +6011,14 @@ var outside = /* @__PURE__ */ __name((blocked) => (step, found) => {
|
|
|
5829
6011
|
};
|
|
5830
6012
|
}, "outside");
|
|
5831
6013
|
var asAction = /* @__PURE__ */ __name((step) => step.kind === "command" ? { kind: "user_action", step: step.step, why: `${step.why}: ${step.line}`, safe_to_auto_execute: false } : step, "asAction");
|
|
5832
|
-
var projectStatusCommand = /* @__PURE__ */ __name((projects, print, env) => answerEntity(annotate(projects.command("status"), { effects: LOCAL_READ, partial: true }), "project_status", projectStatusSchema, { row: withFinance(projectStatusRow(STATUS_SIGNALS)) }).description("where a project stands, from the stored messages of every chat confirmed as the project's or its child projects', in every account those links name (meta.accounts lists them): the last message, who replies next, open questions both ways, promises, amounts with their direction, payments recorded, billed, paid and owed per currency from confirmed invoices and payments (finance), how long each --context-query has been quiet on their side, and how much of each chat is held. Amounts, directions and promises found by words are marked pattern: read the cited message before trusting one. Others' questions in a group with no role, and others' word-found promises in a group, are counted on the chat's row as unlisted, not listed. next names at most two chats to read, with the messenger command that reads them. No model call; nothing leaves this machine").summary("where a project stands: whose move, open asks, money, chats to read next").argument("<project>", "an existing project's id, project:<id>, key, exact name or alias").option("--since-time <time>", "how far back: days (60d, at most 730d) or a start date (2026-09-01)", "60d").option("--before-time <time>", "fixed exclusive end: ISO 8601 timestamp with UTC offset; days back count from it").option("--context-query <words>", "words that all appear in one text; reports their last mention per side. Repeat for another", collect, []).option("--sync-profile <tool=profile>", "the messenger profile the next steps name when several are signed in to a chat's account, such as max=default; repeat for another tool", syncProfileOf).option("--purpose <purpose>", "the linked chats' purposes to read, comma-separated: work, sales, support, other, or all; default work", purposeList).addOption(annotateOption(new Option("--compact", "one line per signal, chat and next step, for an agent"), { mcp: false })).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (project, options) => {
|
|
6014
|
+
var projectStatusCommand = /* @__PURE__ */ __name((projects, print, env) => answerEntity(annotate(projects.command("status"), { effects: LOCAL_READ, partial: true }), "project_status", projectStatusSchema, { row: withFinance(projectStatusRow(STATUS_SIGNALS)) }).description("where a project stands, from the stored messages of every chat confirmed as the project's or its child projects', in every account those links name (meta.accounts lists them): the last message, who replies next, open questions both ways, promises, amounts with their direction, payments recorded, billed, paid and owed per currency from confirmed invoices and payments (finance), up to five open confirmed deals (deals), how long each --context-query has been quiet on their side, and how much of each chat is held. Amounts, directions and promises found by words are marked pattern: read the cited message before trusting one. Others' questions in a group with no role, and others' word-found promises in a group, are counted on the chat's row as unlisted, not listed. next names at most two chats to read, with the messenger command that reads them. No model call; nothing leaves this machine").summary("where a project stands: whose move, open asks, money, chats to read next").argument("<project>", "an existing project's id, project:<id>, key, exact name or alias").option("--since-time <time>", "how far back: days (60d, at most 730d) or a start date (2026-09-01)", "60d").option("--before-time <time>", "fixed exclusive end: ISO 8601 timestamp with UTC offset; days back count from it").option("--context-query <words>", "words that all appear in one text; reports their last mention per side. Repeat for another", collect, []).option("--sync-profile <tool=profile>", "the messenger profile the next steps name when several are signed in to a chat's account, such as max=default; repeat for another tool", syncProfileOf).option("--purpose <purpose>", "the linked chats' purposes to read, comma-separated: work, sales, support, other, or all; default work", purposeList).addOption(annotateOption(new Option("--compact", "one line per signal, chat and next step, for an agent"), { mcp: false })).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (project, options) => {
|
|
5833
6015
|
if (options.compact && options.json)
|
|
5834
6016
|
throw new CliError("validation_error", "--compact and --json ask for different output \u2014 pick one", {
|
|
5835
6017
|
reason: "output.conflict",
|
|
5836
6018
|
param: "--compact"
|
|
5837
6019
|
});
|
|
5838
6020
|
const chosen = options.syncProfile ?? {};
|
|
5839
|
-
const { found, finance } = await withStore(env, async (store) => {
|
|
6021
|
+
const { found, finance, open } = await withStore(env, async (store) => {
|
|
5840
6022
|
const status = await projectStatus(store, {
|
|
5841
6023
|
project,
|
|
5842
6024
|
...projectWindowOf(options.sinceTime),
|
|
@@ -5844,8 +6026,9 @@ var projectStatusCommand = /* @__PURE__ */ __name((projects, print, env) => answ
|
|
|
5844
6026
|
contextQueries: options.contextQuery,
|
|
5845
6027
|
...options.purpose ? { purposes: options.purpose } : {}
|
|
5846
6028
|
});
|
|
5847
|
-
const
|
|
5848
|
-
|
|
6029
|
+
const projects2 = [status.project.ref, ...status.children.map((child) => child.ref)];
|
|
6030
|
+
const books = await financeOf(store, projects2);
|
|
6031
|
+
return { found: await titled(store, status), finance: books, open: await openDealsOf(store, projects2) };
|
|
5849
6032
|
});
|
|
5850
6033
|
const blocked = /* @__PURE__ */ new Set();
|
|
5851
6034
|
const step = outside(blocked);
|
|
@@ -5856,11 +6039,16 @@ var projectStatusCommand = /* @__PURE__ */ __name((projects, print, env) => answ
|
|
|
5856
6039
|
};
|
|
5857
6040
|
const { item, next, missing, meta } = projectStatusAnswer(found, hints);
|
|
5858
6041
|
const gaps = [...missing, ...blocked.size ? [{ field: "next_command", why: [...blocked].join("; ") }] : []];
|
|
5859
|
-
print(options.json, itemOf({
|
|
6042
|
+
print(options.json, itemOf({
|
|
6043
|
+
...item,
|
|
6044
|
+
...finance.length ? { finance } : {},
|
|
6045
|
+
...open.deals.length ? { deals: open.deals } : {},
|
|
6046
|
+
...open.more ? { deals_more: open.more } : {}
|
|
6047
|
+
}, {
|
|
5860
6048
|
...next.length ? { next: next.map(asAction) } : {},
|
|
5861
6049
|
...gaps.length ? { missing: gaps } : {},
|
|
5862
6050
|
meta
|
|
5863
|
-
}), [projectStatusText(found, hints), ...financeText(finance)].join("\n"), options.compact === true);
|
|
6051
|
+
}), [projectStatusText(found, hints), ...financeText(finance), ...dealsText(open)].join("\n"), options.compact === true);
|
|
5864
6052
|
}), "projectStatusCommand");
|
|
5865
6053
|
|
|
5866
6054
|
// dist/knowledge/project-transfer.js
|
|
@@ -6339,11 +6527,11 @@ var keyed = /* @__PURE__ */ __name((text2, key) => {
|
|
|
6339
6527
|
});
|
|
6340
6528
|
return JSON.stringify({ ...raw, key });
|
|
6341
6529
|
}, "keyed");
|
|
6342
|
-
var
|
|
6530
|
+
var json5 = /* @__PURE__ */ __name((command) => command.option("--json", "print JSON; --json=id,status keeps only those fields"), "json");
|
|
6343
6531
|
var mailFindingsCommand = /* @__PURE__ */ __name((program, mail, streams, env) => {
|
|
6344
6532
|
const { run } = answers(program, streams, env);
|
|
6345
6533
|
const findings = mail.command("findings").description("cited tasks, task updates, facts, memories, links, contacts, invoices, payments and orders an agent read in new mail").summary("what an agent read in new mail, cited, waiting for the owner");
|
|
6346
|
-
|
|
6534
|
+
json5(proposesOnly(annotate(findings.command("add"), { effects: LOCAL_WRITE, output: { entity: "mail_findings" } }))).description("stage one mailbox's findings for the owner; nothing is created until the owner confirms").summary("stage one mailbox's findings; the owner confirms them").argument("<file>", FINDINGS_INPUT_HELP).option("--source <accounts>", MAILBOX_HELP).option("--key <key>", "the findings key `mail review --holder` gave in its mail-findings.add step").option("--dry-run", "check the batch as staging would, invoices, payments and orders tried and rolled back, and stage nothing; answers valid and every finding's problem at once").addHelpText("after", INPUT_HELP).action(async (file, given) => {
|
|
6347
6535
|
const read = await readFindingsInput(file, environmentOf(program).stdin ?? process.stdin);
|
|
6348
6536
|
const text2 = keyed(read, given.key);
|
|
6349
6537
|
const input = given.dryRun ? readMailFindingsJson(text2) : parseMailFindingsJson(text2);
|
|
@@ -6362,8 +6550,8 @@ var mailFindingsCommand = /* @__PURE__ */ __name((program, mail, streams, env) =
|
|
|
6362
6550
|
return itemAnswer({ dryRun: true, ...checked }, issues.length ? { meta: { complete: false, issues } } : void 0);
|
|
6363
6551
|
});
|
|
6364
6552
|
});
|
|
6365
|
-
|
|
6366
|
-
withQuery(
|
|
6553
|
+
json5(annotate(findings.command("show"), { effects: LOCAL_READ, output: { entity: "mail_findings" } })).description("one findings batch: its findings with their evidence, earlier decisions and the review receipt").summary("one findings batch with its evidence and decisions").argument("<id>", "the batch id `mail findings add` or `list` gave").action((id, given) => run(given.json, async (store) => itemAnswer(await store.mailFindings.get(id))));
|
|
6554
|
+
withQuery(json5(annotate(findings.command("list"), { effects: LOCAL_READ, output: { entity: "mail_findings" } })), FINDINGS_QUERY2).description("mail findings batches, newest first; status:proposed is what waits for the owner").option("--source <accounts>", "only this mailbox's batches: email:<address>").option("--limit <n>", "batches per page, at most 50", positive, 20).option("--page <n>", "which page, from 1", positive, 1).action((words, given) => run(given.json, async (store) => {
|
|
6367
6555
|
const status = queryTerms(words, FINDINGS_QUERY2, "mail findings list").get("status");
|
|
6368
6556
|
const account2 = given.source ? await oneMailboxOf(store, env, given.source) : void 0;
|
|
6369
6557
|
const found = await store.mailFindings.list({
|
|
@@ -6503,10 +6691,10 @@ var mcpCommandDefinition = /* @__PURE__ */ __name((program, streams, env, create
|
|
|
6503
6691
|
}).summary("serve this profile's commands to an AI agent").description("serve memo commands over MCP on stdio or authenticated HTTP, limited by saved permissions").option("--permission <key=level>", "tighten one saved permission for this server; repeat for more keys", (value, previous = []) => [...previous, value]).option("--http", "serve on 127.0.0.1 behind an HTTPS tunnel with an owner access-code login").option("--port <port>", `local HTTP port (default ${DEFAULT_PORT}); requires --http`).option("--public-url <url>", "tunnel's HTTPS address without /mcp, or a path of it such as https://<name>.ts.net/memo; requires --http").action(async (options) => {
|
|
6504
6692
|
if (!options.http && (options.port !== void 0 || options.publicUrl !== void 0))
|
|
6505
6693
|
throw new CliError("validation_error", "--port and --public-url require --http");
|
|
6506
|
-
const { createMemoServer } = await import("./server-
|
|
6694
|
+
const { createMemoServer } = await import("./server-XLMROR5L.js");
|
|
6507
6695
|
const build = /* @__PURE__ */ __name(() => createMemoServer(env, createProgram2, options.permission), "build");
|
|
6508
6696
|
if (options.http) {
|
|
6509
|
-
const { httpLockFile, mcpUrlOf, portOf, publicUrlOf, serveOverHttp } = await import("./mcp-
|
|
6697
|
+
const { httpLockFile, mcpUrlOf, portOf, publicUrlOf, serveOverHttp } = await import("./mcp-I5KREUIV.js");
|
|
6510
6698
|
const publicUrl = publicUrlOf(options.publicUrl, {
|
|
6511
6699
|
missing: "--http",
|
|
6512
6700
|
reaches: "the browser apps reach memo",
|
|
@@ -6558,7 +6746,7 @@ var mcpCommandDefinition = /* @__PURE__ */ __name((program, streams, env, create
|
|
|
6558
6746
|
});
|
|
6559
6747
|
});
|
|
6560
6748
|
annotate(mcp2.command("revoke"), { effects: LOCAL_WRITE, mcp: false, examples: ["memo mcp revoke --json"] }).summary("forget every login given to a browser app").description("forget every login `memo mcp serve --http` gave a browser app; each app must log in again").option("--json", "print JSON").action(async function() {
|
|
6561
|
-
const { revokeAll } = await import("./mcp-
|
|
6749
|
+
const { revokeAll } = await import("./mcp-I5KREUIV.js");
|
|
6562
6750
|
revokeAll(httpTokenFile(env));
|
|
6563
6751
|
out.print(this.opts().json, itemAnswer({ revoked: true }));
|
|
6564
6752
|
});
|
|
@@ -7089,14 +7277,14 @@ var notesCommandDefinition = /* @__PURE__ */ __name((program, streams, env) => {
|
|
|
7089
7277
|
...answer.backlinks.length ? [`linked from: ${answer.backlinks.map(({ from }) => from).join(", ")}`] : []
|
|
7090
7278
|
].join("\n"));
|
|
7091
7279
|
});
|
|
7092
|
-
withQuery(annotate(notes2.command("list"), { effects: LOCAL_READ }).description("notes, newest first"), NOTES_LIST_QUERY).option("--limit <n>", "most notes, at most 500", positive, 20).option("--page <n>", "which page, from 1", positive, 1).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (words, { json:
|
|
7280
|
+
withQuery(annotate(notes2.command("list"), { effects: LOCAL_READ }).description("notes, newest first"), NOTES_LIST_QUERY).option("--limit <n>", "most notes, at most 500", positive, 20).option("--page <n>", "which page, from 1", positive, 1).option("--json", "print JSON; --json=id,title keeps only those fields").action(async (words, { json: json7, ...paging }) => {
|
|
7093
7281
|
const terms = queryTerms(words, NOTES_LIST_QUERY, "notes list");
|
|
7094
7282
|
const about = terms.get("about");
|
|
7095
7283
|
const source = terms.get("source");
|
|
7096
7284
|
const search2 = terms.get("text");
|
|
7097
7285
|
if (about !== void 0 && terms.size > 1)
|
|
7098
7286
|
throw new CliError("validation_error", "about: stands alone in notes list: its notes are found through links");
|
|
7099
|
-
const options = { ...paging, json:
|
|
7287
|
+
const options = { ...paging, json: json7 };
|
|
7100
7288
|
const page = await withNotes(async (store) => listNotes(store, {
|
|
7101
7289
|
limit: options.limit,
|
|
7102
7290
|
offset: (options.page - 1) * options.limit,
|
|
@@ -7500,11 +7688,11 @@ var ROW = {
|
|
|
7500
7688
|
],
|
|
7501
7689
|
text: ["reason"]
|
|
7502
7690
|
};
|
|
7503
|
-
var
|
|
7691
|
+
var json6 = /* @__PURE__ */ __name((command) => command.option("--json", "print JSON; --json=id,title keeps only those fields"), "json");
|
|
7504
7692
|
var reviewCommand = /* @__PURE__ */ __name((program, streams, env) => {
|
|
7505
7693
|
const { print } = answers(program, streams, env);
|
|
7506
7694
|
const review = program.command("review").description("every proposal waiting for your decision, across projects: links, key documents, facts, invoices, payments and more").summary("every proposal waiting for your decision, across projects");
|
|
7507
|
-
|
|
7695
|
+
json6(answerEntity(withQuery(annotate(review.command("list", { isDefault: true }), { effects: LOCAL_READ }).description("what waits for the owner's decision, newest first, with titles, who proposed it, why and the evidence").summary("what waits for your decision, newest first, with titles and evidence"), REVIEW_QUERY), "memo_proposal", PROPOSAL, { row: ROW })).option("--limit <n>", "proposals per page, at most 50", positive, 20).option("--page <n>", "which page, from 1", positive, 1).option("--compact", "one line per proposal").action(async (words, given) => {
|
|
7508
7696
|
if (given.limit > 50)
|
|
7509
7697
|
throw new CliError("validation_error", "--limit is at most 50", { param: "limit" });
|
|
7510
7698
|
const found = await withStore(env, (store) => listReview(store, env, words, given));
|
|
@@ -7519,7 +7707,7 @@ var reviewCommand = /* @__PURE__ */ __name((program, streams, env) => {
|
|
|
7519
7707
|
});
|
|
7520
7708
|
print(given.json, body, reviewText(found.items, found.hasMore), given.compact);
|
|
7521
7709
|
});
|
|
7522
|
-
|
|
7710
|
+
json6(annotate(review.command("show"), { effects: LOCAL_READ })).description("one proposal with its titles, signals and the text around each piece of evidence").argument("<id>", "the proposal's id, as review lists it: 17070, fact:512, memory:88, link:17, payment:4, close:Q-15").option("--brief", "only references and their titles, without excerpts or nearby text").option("--before-n <n>", "messages or document paragraphs before the evidence, at most 5", whole, 2).option("--after-n <n>", "messages or document paragraphs after the evidence, at most 5", whole, 2).option("--compact", "one line, as review prints it").action(async (id, given) => {
|
|
7523
7711
|
const body = await withStore(env, async (store) => {
|
|
7524
7712
|
const shown = await showReview(store, env, id);
|
|
7525
7713
|
const window = {
|
|
@@ -7541,7 +7729,7 @@ var reviewCommand = /* @__PURE__ */ __name((program, streams, env) => {
|
|
|
7541
7729
|
print(given.json, body, void 0, given.compact);
|
|
7542
7730
|
});
|
|
7543
7731
|
for (const name of ["confirm", "reject"]) {
|
|
7544
|
-
const command = byOption(
|
|
7732
|
+
const command = byOption(json6(annotate(review.command(name), { effects: LOCAL_WRITE }))).description(name === "confirm" ? "confirm proposals by id or range (17070-17079,fact:500-502,17080/f1); each is decided on its own, so a refusal leaves the others decided. An agent decides only with --reason, never its own or a scan's" : "turn proposals down by id or range, with why; each is decided on its own").summary(name === "confirm" ? "confirm proposals by id or range; each on its own" : "turn proposals down, with why").argument("<ids...>", name === "confirm" ? "ids or ranges as review lists them; 17080/f1 accepts that finding and rejects the batch's others" : "ids or ranges as review lists them; a batch is turned down whole");
|
|
7545
7733
|
if (name === "confirm")
|
|
7546
7734
|
command.option("--reason <text>", "why, in a few words; required when an agent decides");
|
|
7547
7735
|
else
|
|
@@ -7562,7 +7750,7 @@ var reviewCommand = /* @__PURE__ */ __name((program, streams, env) => {
|
|
|
7562
7750
|
print(given.json, itemAnswer(result, issues.length ? { meta: { complete: false, issues } } : void 0), decidedText(result), given.compact);
|
|
7563
7751
|
});
|
|
7564
7752
|
}
|
|
7565
|
-
|
|
7753
|
+
json6(answerEntity(annotate(review.command("status"), { effects: LOCAL_READ }), "review_status", REVIEW_STATUS)).summary("since yesterday: new mail, what is owed and waiting, what agents proposed").description("the owner's daily look, with no model call: per mail account the threads with new mail, what you owe and wait for, and how far each agent's processing mark has read; then what was proposed and what waits").option("--since-time <time>", "how far back: hours or days (12h, 7d) or a start date (2026-11-01)", "1d").action(async (given) => {
|
|
7566
7754
|
const since = /^\d{4}-\d{2}-\d{2}/.test(given.sinceTime) ? Date.parse(given.sinceTime) : Date.now() - parseDuration(given.sinceTime, "--since-time");
|
|
7567
7755
|
if (Number.isNaN(since))
|
|
7568
7756
|
throw new CliError("validation_error", `--since-time takes 12h, 7d or a date, not "${given.sinceTime}"`, {
|
|
@@ -8067,8 +8255,8 @@ For an agent: read with --compact, one line per hit with its reference. Never wr
|
|
|
8067
8255
|
for (const { source, reason } of answer.skipped)
|
|
8068
8256
|
streams.diagnostic(`${source} not searched: ${reason}
|
|
8069
8257
|
`);
|
|
8070
|
-
const { limit, page, json:
|
|
8071
|
-
print(
|
|
8258
|
+
const { limit, page, json: json7, ...rest } = options;
|
|
8259
|
+
print(json7, notesAnswer(answer, limit, page, { query: words.join(" "), ...rest }), searchText(answer, (page - 1) * limit));
|
|
8072
8260
|
});
|
|
8073
8261
|
searchMemoriesCommand(group, streams, env);
|
|
8074
8262
|
annotate(group.command("people"), { effects: LOCAL_READ, output: { entity: "person" } }).description("people whose name, username or alias holds every word, in every account unless --source narrows it; each with its person:<id> for --contact and its identities").summary("people by name across every account").argument("<name...>", "parts of the name, username or alias; case and accents do not matter").option("--source <accounts>", ACCOUNTS_HELP).option("--limit <n>", "most people, at most 100", (value) => {
|
|
@@ -9011,6 +9199,69 @@ var OWN_ENTITIES = entityFields({
|
|
|
9011
9199
|
agent_action: ["id", "actor", "tool", "tier", "target", "status", "error", "started_at", "finished_at"],
|
|
9012
9200
|
meeting_project: ["id", "meeting", "project", "confirmed", "provenance", "fingerprint"],
|
|
9013
9201
|
notes_folder: ["id", "name", "path", "format", "kept_by"],
|
|
9202
|
+
deal: [
|
|
9203
|
+
"id",
|
|
9204
|
+
"ref",
|
|
9205
|
+
"kind",
|
|
9206
|
+
"title",
|
|
9207
|
+
"summary",
|
|
9208
|
+
"pipeline",
|
|
9209
|
+
"pipeline_name",
|
|
9210
|
+
"stage",
|
|
9211
|
+
"status",
|
|
9212
|
+
"organization",
|
|
9213
|
+
"currency",
|
|
9214
|
+
"amount",
|
|
9215
|
+
"close_date",
|
|
9216
|
+
"closed_date",
|
|
9217
|
+
"closed_reason",
|
|
9218
|
+
"rank",
|
|
9219
|
+
"deal",
|
|
9220
|
+
"account",
|
|
9221
|
+
"external_id",
|
|
9222
|
+
"people",
|
|
9223
|
+
"author",
|
|
9224
|
+
"model",
|
|
9225
|
+
"source",
|
|
9226
|
+
"reason",
|
|
9227
|
+
"project",
|
|
9228
|
+
"project_name",
|
|
9229
|
+
"created_at",
|
|
9230
|
+
"updated_at",
|
|
9231
|
+
"evidence"
|
|
9232
|
+
],
|
|
9233
|
+
lead: [
|
|
9234
|
+
"id",
|
|
9235
|
+
"ref",
|
|
9236
|
+
"kind",
|
|
9237
|
+
"title",
|
|
9238
|
+
"summary",
|
|
9239
|
+
"pipeline",
|
|
9240
|
+
"pipeline_name",
|
|
9241
|
+
"stage",
|
|
9242
|
+
"status",
|
|
9243
|
+
"organization",
|
|
9244
|
+
"currency",
|
|
9245
|
+
"amount",
|
|
9246
|
+
"close_date",
|
|
9247
|
+
"closed_date",
|
|
9248
|
+
"closed_reason",
|
|
9249
|
+
"rank",
|
|
9250
|
+
"deal",
|
|
9251
|
+
"account",
|
|
9252
|
+
"external_id",
|
|
9253
|
+
"people",
|
|
9254
|
+
"author",
|
|
9255
|
+
"model",
|
|
9256
|
+
"source",
|
|
9257
|
+
"reason",
|
|
9258
|
+
"project",
|
|
9259
|
+
"project_name",
|
|
9260
|
+
"created_at",
|
|
9261
|
+
"updated_at",
|
|
9262
|
+
"evidence"
|
|
9263
|
+
],
|
|
9264
|
+
pipeline: ["id", "ref", "name", "kind", "account", "external_id", "stages", "totals", "since", "created_at"],
|
|
9014
9265
|
order: [
|
|
9015
9266
|
"id",
|
|
9016
9267
|
"ref",
|
|
@@ -9173,6 +9424,7 @@ var createProgram = /* @__PURE__ */ __name(({ streams: raw = processStreams, env
|
|
|
9173
9424
|
factsCommand(program, streams, env);
|
|
9174
9425
|
financeCommands(program, streams, env);
|
|
9175
9426
|
orderCommands(program, streams, env);
|
|
9427
|
+
dealCommands(program, streams, env);
|
|
9176
9428
|
recordsCommand(program, streams, env);
|
|
9177
9429
|
findingsCommand(program, streams, env);
|
|
9178
9430
|
actionsCommand(program, streams, env);
|
|
@@ -9195,10 +9447,10 @@ var createProgram = /* @__PURE__ */ __name(({ streams: raw = processStreams, env
|
|
|
9195
9447
|
const skill2 = customizeSharedCommand(skillCommand2(APP, new URL("../skills/cli-memo/SKILL.md", new URL("../program.js", import.meta.url).href)), "Memo installs its own stored-data instructions through its environment, prints the packaged primary skill without filesystem effects, and takes --json on each skill command because it has no global one.", () => {
|
|
9196
9448
|
const out = answers(program, streams, env);
|
|
9197
9449
|
const skill3 = skillCommand(APP, new URL("../skills/cli-memo/SKILL.md", new URL("../program.js", import.meta.url).href), (command) => {
|
|
9198
|
-
const
|
|
9199
|
-
const renderer = createRenderer({ format:
|
|
9450
|
+
const json7 = command.opts().json === true;
|
|
9451
|
+
const renderer = createRenderer({ format: json7 ? "json" : "pretty", color: false, streams });
|
|
9200
9452
|
return {
|
|
9201
|
-
renderer:
|
|
9453
|
+
renderer: json7 ? { ...renderer, result: /* @__PURE__ */ __name((value) => out.print(true, itemAnswer(value)), "result") } : renderer,
|
|
9202
9454
|
streams,
|
|
9203
9455
|
env
|
|
9204
9456
|
};
|