agentix-cli 0.53.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-R62ZQVSF.js → App-VRTLAPRF.js} +2 -2
- package/dist/{ChatApp-AS567EFE.js → ChatApp-YENWPZT4.js} +2 -2
- package/dist/{agent-H4NB4BUA.js → agent-HVUGHYBF.js} +2 -2
- package/dist/{board-dashboard-E3MUVNVQ.js → board-dashboard-3XJVYDB3.js} +416 -180
- package/dist/board-dashboard-3XJVYDB3.js.map +1 -0
- package/dist/chunk-2D3RYIDU.js +3 -0
- package/dist/chunk-2D3RYIDU.js.map +1 -0
- package/dist/{chunk-CCMM5TP4.js → chunk-2TJYZF4E.js} +2 -2
- package/dist/{chunk-FSZXY53Z.js → chunk-33QV5O6P.js} +2 -2
- package/dist/{chunk-NF52Q3TV.js → chunk-37EABIOJ.js} +2 -2
- package/dist/chunk-3RCFUIYR.js +29 -0
- package/dist/chunk-3RCFUIYR.js.map +1 -0
- package/dist/{chunk-6OOK7Y4S.js → chunk-3W2KMI5O.js} +2 -2
- package/dist/{chunk-47EEUZBK.js → chunk-4FFWNPFX.js} +4 -4
- package/dist/chunk-4FFWNPFX.js.map +1 -0
- package/dist/{chunk-FS4WBYY3.js → chunk-4HNHHKJF.js} +2 -2
- package/dist/{chunk-SABOPOYX.js → chunk-6JHA3ZE6.js} +139 -139
- package/dist/chunk-6JHA3ZE6.js.map +1 -0
- package/dist/{chunk-QU6ZUKAD.js → chunk-BKDUCPZ3.js} +2 -2
- package/dist/{chunk-IDYP7G7Z.js → chunk-BMSPRUEJ.js} +33 -33
- package/dist/{chunk-IDYP7G7Z.js.map → chunk-BMSPRUEJ.js.map} +1 -1
- package/dist/{chunk-TH5KNJLA.js → chunk-ENRJ2QEH.js} +2 -2
- package/dist/{chunk-C5JXPMTW.js → chunk-HQMISQ7L.js} +2 -2
- package/dist/{chunk-7DPKPBRJ.js → chunk-KLDGJSR5.js} +2 -2
- package/dist/{ntfy-ZY2NPGBA.js → chunk-KZKDVIOE.js} +3 -3
- package/dist/chunk-KZKDVIOE.js.map +1 -0
- package/dist/{chunk-KB7YIM3W.js → chunk-M67AN4J7.js} +2 -2
- package/dist/{chunk-WKTFP3SK.js → chunk-NO2HOK4B.js} +2 -2
- package/dist/chunk-QD6IICK7.js +2 -0
- package/dist/chunk-QD6IICK7.js.map +1 -0
- package/dist/{chunk-OV35MJKS.js → chunk-QX4R5WY7.js} +2 -2
- package/dist/{chunk-PGJL5V6Y.js → chunk-QYHABRLM.js} +2 -2
- package/dist/{chunk-7OWXFLAM.js → chunk-TLFJVLVQ.js} +166 -160
- package/dist/chunk-TLFJVLVQ.js.map +1 -0
- package/dist/{chunk-OMTRHHZJ.js → chunk-UYMK3XNB.js} +44 -45
- package/dist/chunk-UYMK3XNB.js.map +1 -0
- package/dist/{chunk-VD4TMPJI.js → chunk-WLRHL2P7.js} +2 -2
- package/dist/chunk-WWMFNLKD.js +10 -0
- package/dist/chunk-WWMFNLKD.js.map +1 -0
- package/dist/{chunk-KJWBQZT7.js → chunk-XWU7O3S5.js} +2 -2
- package/dist/{chunk-KFG6WWFS.js → chunk-ZOJUHPD5.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client-N4XQEAVL.js +2 -0
- package/dist/{compaction-NWPBPWY2.js → compaction-H5U32UU6.js} +2 -2
- package/dist/{config-3SW4V44Z.js → config-KHKIY6LI.js} +2 -2
- package/dist/config-mutator-ZZKFQ7HJ.js +2 -0
- package/dist/doctor-QICAXIQB.js +2 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/memory-extract-F76BE6KA.js +2 -0
- package/dist/ntfy-52EXHVMD.js +2 -0
- package/dist/program-ZWNGK3RB.js +2 -0
- package/dist/{promote-DJFMTLRC.js → promote-H6ZHJXTY.js} +2 -2
- package/dist/push-HEDA6P3B.js +2 -0
- package/dist/push-HEDA6P3B.js.map +1 -0
- package/dist/push-keys-2DTD7YNQ.js +2 -0
- package/dist/push-store-LXTYULUF.js +2 -0
- package/dist/query-FTE4FLYK.js +2 -0
- package/dist/registry-HDOFVNRK.js +2 -0
- package/dist/{request-planner-2H7HCUCZ.js → request-planner-ABD4WIGM.js} +2 -2
- package/dist/{review-candidates-U7R64OCS.js → review-candidates-B6574GOJ.js} +2 -2
- package/dist/{routing-LVQH6WOJ.js → routing-BGKZOHOA.js} +2 -2
- package/dist/schedule-tool-UDHXTKWV.js +2 -0
- package/dist/scheduler-NQM3HVUY.js +2 -0
- package/dist/scheduler-NQM3HVUY.js.map +1 -0
- package/dist/{seat-2KGFNCIW.js → seat-VGST5AQB.js} +2 -2
- package/dist/seat-VGST5AQB.js.map +1 -0
- package/dist/{select-XGK27RPP.js → select-Y7SBUCGJ.js} +2 -2
- package/dist/{set-enabled-7YGN2FAZ.js → set-enabled-ARKMDLXN.js} +2 -2
- package/dist/{tool-HKDIZ6I4.js → tool-5EVYUN2G.js} +2 -2
- package/dist/wiki-GREI2TSP.js +2 -0
- package/dist/wiki-GREI2TSP.js.map +1 -0
- package/package.json +3 -1
- package/dist/board-dashboard-E3MUVNVQ.js.map +0 -1
- package/dist/chunk-47EEUZBK.js.map +0 -1
- package/dist/chunk-7OWXFLAM.js.map +0 -1
- package/dist/chunk-D4HAR3L3.js +0 -28
- package/dist/chunk-D4HAR3L3.js.map +0 -1
- package/dist/chunk-HRBKSZ34.js +0 -2
- package/dist/chunk-HRBKSZ34.js.map +0 -1
- package/dist/chunk-OMTRHHZJ.js.map +0 -1
- package/dist/chunk-SABOPOYX.js.map +0 -1
- package/dist/client-XTQDYMOX.js +0 -2
- package/dist/config-mutator-H32FXUYJ.js +0 -2
- package/dist/doctor-J6RCHFVE.js +0 -2
- package/dist/memory-extract-MGGXIZTE.js +0 -2
- package/dist/ntfy-ZY2NPGBA.js.map +0 -1
- package/dist/program-SQTOPCQW.js +0 -2
- package/dist/query-UAZUMU4N.js +0 -2
- package/dist/registry-4OUBA2TY.js +0 -2
- package/dist/schedule-tool-2BONJVCJ.js +0 -2
- package/dist/scheduler-7CEXDECA.js +0 -2
- package/dist/wiki-6YT7B5HU.js +0 -2
- /package/dist/{App-R62ZQVSF.js.map → App-VRTLAPRF.js.map} +0 -0
- /package/dist/{ChatApp-AS567EFE.js.map → ChatApp-YENWPZT4.js.map} +0 -0
- /package/dist/{agent-H4NB4BUA.js.map → agent-HVUGHYBF.js.map} +0 -0
- /package/dist/{chunk-CCMM5TP4.js.map → chunk-2TJYZF4E.js.map} +0 -0
- /package/dist/{chunk-FSZXY53Z.js.map → chunk-33QV5O6P.js.map} +0 -0
- /package/dist/{chunk-NF52Q3TV.js.map → chunk-37EABIOJ.js.map} +0 -0
- /package/dist/{chunk-6OOK7Y4S.js.map → chunk-3W2KMI5O.js.map} +0 -0
- /package/dist/{chunk-FS4WBYY3.js.map → chunk-4HNHHKJF.js.map} +0 -0
- /package/dist/{chunk-QU6ZUKAD.js.map → chunk-BKDUCPZ3.js.map} +0 -0
- /package/dist/{chunk-TH5KNJLA.js.map → chunk-ENRJ2QEH.js.map} +0 -0
- /package/dist/{chunk-C5JXPMTW.js.map → chunk-HQMISQ7L.js.map} +0 -0
- /package/dist/{chunk-7DPKPBRJ.js.map → chunk-KLDGJSR5.js.map} +0 -0
- /package/dist/{chunk-KB7YIM3W.js.map → chunk-M67AN4J7.js.map} +0 -0
- /package/dist/{chunk-WKTFP3SK.js.map → chunk-NO2HOK4B.js.map} +0 -0
- /package/dist/{chunk-OV35MJKS.js.map → chunk-QX4R5WY7.js.map} +0 -0
- /package/dist/{chunk-PGJL5V6Y.js.map → chunk-QYHABRLM.js.map} +0 -0
- /package/dist/{chunk-VD4TMPJI.js.map → chunk-WLRHL2P7.js.map} +0 -0
- /package/dist/{chunk-KJWBQZT7.js.map → chunk-XWU7O3S5.js.map} +0 -0
- /package/dist/{chunk-KFG6WWFS.js.map → chunk-ZOJUHPD5.js.map} +0 -0
- /package/dist/{client-XTQDYMOX.js.map → client-N4XQEAVL.js.map} +0 -0
- /package/dist/{compaction-NWPBPWY2.js.map → compaction-H5U32UU6.js.map} +0 -0
- /package/dist/{config-3SW4V44Z.js.map → config-KHKIY6LI.js.map} +0 -0
- /package/dist/{config-mutator-H32FXUYJ.js.map → config-mutator-ZZKFQ7HJ.js.map} +0 -0
- /package/dist/{doctor-J6RCHFVE.js.map → doctor-QICAXIQB.js.map} +0 -0
- /package/dist/{memory-extract-MGGXIZTE.js.map → memory-extract-F76BE6KA.js.map} +0 -0
- /package/dist/{program-SQTOPCQW.js.map → ntfy-52EXHVMD.js.map} +0 -0
- /package/dist/{promote-DJFMTLRC.js.map → program-ZWNGK3RB.js.map} +0 -0
- /package/dist/{query-UAZUMU4N.js.map → promote-H6ZHJXTY.js.map} +0 -0
- /package/dist/{registry-4OUBA2TY.js.map → push-keys-2DTD7YNQ.js.map} +0 -0
- /package/dist/{routing-LVQH6WOJ.js.map → push-store-LXTYULUF.js.map} +0 -0
- /package/dist/{schedule-tool-2BONJVCJ.js.map → query-FTE4FLYK.js.map} +0 -0
- /package/dist/{scheduler-7CEXDECA.js.map → registry-HDOFVNRK.js.map} +0 -0
- /package/dist/{request-planner-2H7HCUCZ.js.map → request-planner-ABD4WIGM.js.map} +0 -0
- /package/dist/{review-candidates-U7R64OCS.js.map → review-candidates-B6574GOJ.js.map} +0 -0
- /package/dist/{seat-2KGFNCIW.js.map → routing-BGKZOHOA.js.map} +0 -0
- /package/dist/{wiki-6YT7B5HU.js.map → schedule-tool-UDHXTKWV.js.map} +0 -0
- /package/dist/{select-XGK27RPP.js.map → select-Y7SBUCGJ.js.map} +0 -0
- /package/dist/{set-enabled-7YGN2FAZ.js.map → set-enabled-ARKMDLXN.js.map} +0 -0
- /package/dist/{tool-HKDIZ6I4.js.map → tool-5EVYUN2G.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as c}from"./chunk-KZKDVIOE.js";import"./chunk-QIJLFPWE.js";var m="/app#alerts",h=3e3,f=2,P=40,w=120,x=1e3;function A(i,e="AgentX"){let s=c(i.text||""),r=(i.buttons??[]).filter(t=>t.url&&t.url.length<=x).slice(0,f).map((t,d)=>({action:`b${d}`,title:g(t.label,P),url:t.url})),o={title:g(s.title||e,w),body:s.body,url:r[0]?.url??m,actions:r},a=()=>Buffer.byteLength(JSON.stringify(o),"utf8");if(a()>h){let t=[...o.body],d=a()-h;for(t=t.slice(0,Math.max(0,t.length-d-1)),o.body=t.join("")+"\u2026";a()>h&&t.length>0;)t=t.slice(0,Math.max(0,t.length-32)),o.body=t.join("")+"\u2026"}return o}function g(i,e){let s=[...i];return s.length>e?s.slice(0,e-1).join("")+"\u2026":i}var y=class{constructor(e){this.deps=e;this.log=e.log??console.error.bind(console,"[push]")}name="push";log;async start(){let e=this.deps.store.list().length;this.log(`push: ready (${e} subscribed phone${e===1?"":"s"})${this.deps.keys()?"":" \u2014 no keys yet, run: agentx app push-keys"}`)}async stop(){}onMessage(e){}async send(e){let s=this.deps.keys();if(!s)throw new Error("push: no keys \u2014 run `agentx app push-keys` on this node");let r=(e.chatId||"").trim(),o=r&&r!=="default"?r:void 0,a=[];for(let n of this.deps.store.list(o))this.deps.deviceActive(n.deviceId)&&n.publicKey===s.publicKey?a.push(n):this.deps.store.unsubscribe(n.endpoint);if(a.length===0)throw new Error(o?`push: phone ${o} has not turned on notifications`:"push: no phone has turned on notifications \u2014 open Alerts in the phone app");let t=A(e),d=JSON.stringify(t),v={vapidDetails:{subject:this.deps.subject,publicKey:s.publicKey,privateKey:s.privateKey},TTL:this.deps.ttlSeconds},u=0,l=[];if(await Promise.all(a.map(async n=>{try{await this.deps.sender({endpoint:n.endpoint,keys:{p256dh:n.p256dh,auth:n.auth}},d,v),u++}catch(p){p?.statusCode===404||p?.statusCode===410?(this.deps.store.unsubscribe(n.endpoint),this.log(`push: removed expired subscription for ${n.deviceName}`)):l.push(`${n.deviceName}: ${p?.statusCode?`HTTP ${p.statusCode} `:""}${p?.body||p?.message||p}`.slice(0,200))}})),u===0)throw new Error(`push: not delivered \u2014 ${l.join("; ")||"every subscription had expired"}`);return l.length&&this.log(`push: ${l.length} phone(s) failed: ${l.join("; ")}`),this.deps.store.log({title:t.title,body:t.body,url:t.url,delivered:u,deviceId:o??null},this.deps.keepRecent),String(u)}},b=class{constructor(e,s,r=console.error.bind(console,"[push]")){this.peer=e;this.forward=s;this.log=r}name="push";async start(){this.log(`push: relaying to ${this.peer}`)}async stop(){}onMessage(e){}async send(e){if(e.relayed)throw new Error(`push: this node relays too (channels.push.relayTo = ${this.peer}); set relayTo only on nodes that don't host the phone app`);return this.forward(this.peer,{channel:"push",chatId:e.chatId||"default",text:e.text,...e.buttons?.length?{buttons:e.buttons}:{},relayed:!0})}};export{m as DEFAULT_OPEN_URL,h as MAX_PAYLOAD_BYTES,y as PushAdapter,b as PushRelayAdapter,A as buildPushPayload};
|
|
2
|
+
//# sourceMappingURL=push-HEDA6P3B.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/channels/push.ts"],"sourcesContent":["import type { ChannelAdapter, IncomingMessage, OutgoingMessage } from \"./types\"\nimport type { PushStore, PushSubscriptionRow } from \"./push-store\"\nimport type { PushKeys } from \"./push-keys\"\nimport { splitTitle } from \"./ntfy\"\n\n// --- push channel — Web Push to the phone app ---\n//\n// Outbound only, like ntfy, and registered as a ChannelAdapter for the same\n// reason: notifications.destination, POST /send, `agentx notify`, cron\n// failure pings and Focus digests all reach it through router.sendOutbound().\n//\n// One node hosts the phone app (/app) and so holds the subscriptions; it\n// runs PushAdapter. Every other node runs PushRelayAdapter under the same\n// channel name, which forwards to the host over the mesh, so callers never\n// need to know where the phone is paired.\n//\n// Addressing: `chatId` \"default\" (or empty) means every subscribed phone;\n// anything else is one phone's device id (the tok_… id from\n// `agentx app devices`).\n\n/** Where a tap lands when the message has no button of its own. */\nexport const DEFAULT_OPEN_URL = \"/app#alerts\"\n/** Push services refuse payloads over 4096 bytes after encryption (413,\n * which is not retried). The JSON is kept well under that, in bytes. */\nexport const MAX_PAYLOAD_BYTES = 3000\n/** Chrome shows at most two action buttons. */\nconst MAX_ACTIONS = 2\nconst MAX_LABEL = 40\nconst MAX_TITLE = 120\n/** Longer links are dropped rather than cut, since a cut link is broken. */\nconst MAX_URL = 1000\n\nexport interface PushPayload {\n title: string\n body: string\n /** Opened when the notification itself is tapped. */\n url: string\n actions: Array<{ action: string; title: string; url: string }>\n}\n\n/** What web-push's sendNotification needs; injected so tests stay offline. */\nexport type PushSender = (\n sub: { endpoint: string; keys: { p256dh: string; auth: string } },\n payload: string,\n opts: { vapidDetails: { subject: string; publicKey: string; privateKey: string }; TTL: number },\n) => Promise<unknown>\n\nexport interface PushAdapterDeps {\n store: PushStore\n keys: () => PushKeys | null\n /** mailto: or https: contact the push services can reach you at. */\n subject: string\n ttlSeconds: number\n keepRecent: number\n /** False for a phone whose device token was revoked or expired. */\n deviceActive: (deviceId: string) => boolean\n sender: PushSender\n log?: (...args: unknown[]) => void\n}\n\nexport function buildPushPayload(msg: OutgoingMessage, defaultTitle = \"AgentX\"): PushPayload {\n const split = splitTitle(msg.text || \"\")\n const actions = (msg.buttons ?? [])\n .filter((b) => b.url && b.url.length <= MAX_URL)\n .slice(0, MAX_ACTIONS)\n .map((b, i) => ({ action: `b${i}`, title: clip(b.label, MAX_LABEL), url: b.url }))\n const payload: PushPayload = {\n title: clip(split.title || defaultTitle, MAX_TITLE),\n body: split.body,\n url: actions[0]?.url ?? DEFAULT_OPEN_URL,\n actions,\n }\n // Trim the body by bytes, not characters: Arabic, CJK and emoji take\n // several bytes each.\n const size = () => Buffer.byteLength(JSON.stringify(payload), \"utf8\")\n if (size() > MAX_PAYLOAD_BYTES) {\n let chars = [...payload.body]\n const over = size() - MAX_PAYLOAD_BYTES\n chars = chars.slice(0, Math.max(0, chars.length - over - 1))\n payload.body = chars.join(\"\") + \"…\"\n while (size() > MAX_PAYLOAD_BYTES && chars.length > 0) {\n chars = chars.slice(0, Math.max(0, chars.length - 32))\n payload.body = chars.join(\"\") + \"…\"\n }\n }\n return payload\n}\n\nfunction clip(s: string, max: number): string {\n const chars = [...s]\n return chars.length > max ? chars.slice(0, max - 1).join(\"\") + \"…\" : s\n}\n\nexport class PushAdapter implements ChannelAdapter {\n readonly name = \"push\"\n private log: (...args: unknown[]) => void\n\n constructor(private deps: PushAdapterDeps) {\n this.log = deps.log ?? console.error.bind(console, \"[push]\")\n }\n\n async start(): Promise<void> {\n const n = this.deps.store.list().length\n this.log(`push: ready (${n} subscribed phone${n === 1 ? \"\" : \"s\"})${this.deps.keys() ? \"\" : \" — no keys yet, run: agentx app push-keys\"}`)\n }\n\n async stop(): Promise<void> {}\n\n onMessage(_handler: (msg: IncomingMessage) => Promise<void>): void {}\n\n async send(msg: OutgoingMessage): Promise<string | void> {\n const keys = this.deps.keys()\n if (!keys) throw new Error(\"push: no keys — run `agentx app push-keys` on this node\")\n const requested = (msg.chatId || \"\").trim()\n const device = requested && requested !== \"default\" ? requested : undefined\n\n const subs: PushSubscriptionRow[] = []\n for (const s of this.deps.store.list(device)) {\n // A revoked phone stops getting pushes even if its browser never\n // unsubscribed, and a row made with replaced keys can never be\n // delivered; either goes, so it isn't retried every time. The phone\n // re-subscribes with the new key when the app next opens.\n if (this.deps.deviceActive(s.deviceId) && s.publicKey === keys.publicKey) subs.push(s)\n else this.deps.store.unsubscribe(s.endpoint)\n }\n if (subs.length === 0) {\n throw new Error(device\n ? `push: phone ${device} has not turned on notifications`\n : \"push: no phone has turned on notifications — open Alerts in the phone app\")\n }\n\n const payload = buildPushPayload(msg)\n const body = JSON.stringify(payload)\n const opts = {\n vapidDetails: { subject: this.deps.subject, publicKey: keys.publicKey, privateKey: keys.privateKey },\n TTL: this.deps.ttlSeconds,\n }\n let delivered = 0\n const errors: string[] = []\n await Promise.all(subs.map(async (s) => {\n try {\n await this.deps.sender({ endpoint: s.endpoint, keys: { p256dh: s.p256dh, auth: s.auth } }, body, opts)\n delivered++\n } catch (e: any) {\n // 404/410: the browser dropped the subscription (app removed,\n // permission withdrawn). Anything else may be temporary; keep it.\n if (e?.statusCode === 404 || e?.statusCode === 410) {\n this.deps.store.unsubscribe(s.endpoint)\n this.log(`push: removed expired subscription for ${s.deviceName}`)\n } else {\n errors.push(`${s.deviceName}: ${e?.statusCode ? `HTTP ${e.statusCode} ` : \"\"}${e?.body || e?.message || e}`.slice(0, 200))\n }\n }\n }))\n\n if (delivered === 0) throw new Error(`push: not delivered — ${errors.join(\"; \") || \"every subscription had expired\"}`)\n if (errors.length) this.log(`push: ${errors.length} phone(s) failed: ${errors.join(\"; \")}`)\n this.deps.store.log({ title: payload.title, body: payload.body, url: payload.url, delivered, deviceId: device ?? null }, this.deps.keepRecent)\n return String(delivered)\n }\n}\n\n/** Payload for the host's POST /channel/send. */\nexport interface PushRelayPayload {\n channel: \"push\"\n chatId: string\n text: string\n buttons?: OutgoingMessage[\"buttons\"]\n relayed: true\n}\n\n/** The `push` channel on a node that doesn't host the phone app: forwards\n * each message to the host (channels.push.relayTo) over the mesh. */\nexport class PushRelayAdapter implements ChannelAdapter {\n readonly name = \"push\"\n\n constructor(\n private peer: string,\n private forward: (peer: string, payload: PushRelayPayload) => Promise<string | void>,\n private log: (...args: unknown[]) => void = console.error.bind(console, \"[push]\"),\n ) {}\n\n async start(): Promise<void> {\n this.log(`push: relaying to ${this.peer}`)\n }\n\n async stop(): Promise<void> {}\n\n onMessage(_handler: (msg: IncomingMessage) => Promise<void>): void {}\n\n async send(msg: OutgoingMessage & { relayed?: boolean }): Promise<string | void> {\n // Two nodes each set to relay to the other would bounce a message forever.\n if (msg.relayed) throw new Error(`push: this node relays too (channels.push.relayTo = ${this.peer}); set relayTo only on nodes that don't host the phone app`)\n return this.forward(this.peer, {\n channel: \"push\",\n chatId: msg.chatId || \"default\",\n text: msg.text,\n ...(msg.buttons?.length ? { buttons: msg.buttons } : {}),\n relayed: true,\n })\n }\n}\n"],"mappings":"oEAqB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EAAI,OAAQ,EAAI,CAAC,EACtD,QAAS,EACX,CAAC,CACH,CACF","names":["DEFAULT_OPEN_URL","MAX_PAYLOAD_BYTES","MAX_ACTIONS","MAX_LABEL","MAX_TITLE","MAX_URL","buildPushPayload","msg","defaultTitle","split","splitTitle","actions","b","i","clip","payload","size","chars","over","s","max","PushAdapter","deps","n","_handler","keys","requested","device","subs","body","opts","delivered","errors","e","PushRelayAdapter","peer","forward","log"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-BKDUCPZ3.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-37EABIOJ.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as agenticQuery};
|
|
2
|
+
//# sourceMappingURL=query-FTE4FLYK.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{F as a,G as b,H as c,I as d,J as e,K as f,L as g,M as h,N as i,O as j}from"./chunk-BMSPRUEJ.js";import"./chunk-HQMISQ7L.js";import"./chunk-WP6KLXTP.js";import"./chunk-N6EWZGIX.js";import"./chunk-DP7RTNDM.js";import"./chunk-ZOJUHPD5.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-4HNHHKJF.js";import"./chunk-M67AN4J7.js";import"./chunk-DWADWDMU.js";import"./chunk-NO2HOK4B.js";import"./chunk-QD6IICK7.js";import"./chunk-VWTBHLMX.js";import"./chunk-WLRHL2P7.js";import"./chunk-XWU7O3S5.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-BKDUCPZ3.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-37EABIOJ.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-DSYKYZMT.js";import"./chunk-4FFWNPFX.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{j as AgentRegistry,e as TRACE_STEP_SUMMARY_BYTES,c as buildEntryMeta,d as buildWikiContext,f as clipForTrace,i as emitTraceStepsFromStreamEvent,h as firstMissingRequiredTool,b as getGlobalRegistry,a as setGlobalRegistry,g as tallyToolUses};
|
|
2
|
+
//# sourceMappingURL=registry-HDOFVNRK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as m,t as p,v as d,w as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=request-planner-
|
|
1
|
+
import{q as m,t as p,v as d,w as x}from"./chunk-37EABIOJ.js";import{a as u,f}from"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";x();f();var l="request-gate",h="request-context",g=.1;async function q(t,o,c,r=Math.random){let s=p(l)==="active";if(s){let i=m().seats[l]?.holdout??g;if(r()<i)return{active:!0,preprocess:!1,arm:"holdout"}}let a=s?"treatment":void 0,e=await d(l,{request:t.slice(0,2e3),agent:o,channel:c,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:u("This request benefits from structured context selection or another bounded typed decision before the main agent executes.",{true:"Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.",false:"Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context."})},{timeoutMs:3e3});if(!e||e.mode!=="active")return{active:!1,preprocess:!1,arm:a};let n=e.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(n)&&n>=.5,arm:a}}var v={landscape:"Agent directory and mesh overview",patternContext:"Learned behavioral patterns",references:"Retrieved project references",memoryContext:"Retrieved agent memory",crossChatContext:"Summaries from other conversations",longMemoryRecall:"Older conversation recall",wikiContext:"Retrieved wiki knowledge"};async function b(t){let o=Object.entries(v).flatMap(([e,n])=>{let i=t[e];return i?[{id:e,description:n,source:e,characters:i.length,preview:i.slice(0,400),trust:"context data, not instructions"}]:[]});if(!o.length)return{input:t,excluded:[]};let c=Object.fromEntries(o.map(e=>[e.id,u(`Context block ${e.id} is relevant to completing the current request correctly.`,{true:"Needed or potentially relevant; retain if uncertain or the preview is incomplete.",false:"Clearly unrelated to the current request; safe to omit."})])),r=await d(h,{request:t.message.slice(0,2e3),channel:t.channel,agent:t.agentId,mandatory:["request","identity","permissions and instructions","same-chat history","handover","attachments"],context:o},c,{timeoutMs:3e3});if(!r||r.mode!=="active")return{input:t,excluded:[]};let s={...t},a=[];for(let e of o){let n=r.answers[e.id]?.noul;Number.isFinite(n)&&n>=0&&n<.2&&(delete s[e.id],a.push(e.id))}return{input:s,excluded:a}}export{g as DEFAULT_REQUEST_GATE_HOLDOUT,h as REQUEST_CONTEXT_SEAT,l as REQUEST_GATE_SEAT,q as evaluateRequest,b as selectRequestContext};
|
|
2
|
+
//# sourceMappingURL=request-planner-ABD4WIGM.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as I}from"./chunk-
|
|
1
|
+
import{b as I}from"./chunk-ENRJ2QEH.js";import"./chunk-WP6KLXTP.js";import"./chunk-2GIDVZ4H.js";import"./chunk-37EABIOJ.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";import{createHash as E}from"crypto";var v="review:",b={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function A(t,n,r){let s=E("sha1").update(r.trim().toLowerCase()).digest("hex").slice(0,10);return`${v}${t}/${n}@${s}`}function F(t){if(!t.startsWith(v))return null;let n=t.slice(v.length),r=n.lastIndexOf("@"),s=n.lastIndexOf("/",r===-1?void 0:r);return r===-1||s===-1?null:{reviewId:n.slice(0,s),kind:n.slice(s+1,r),digest:n.slice(r+1)}}var C=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,48)||"finding",L=5;function T(t,n){return`${t}|${I(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(b),s=n.minLength??24,h=[],d=new Map,u=new Map,f=new Map,x=new Map;for(let e of t){let i;try{i=JSON.parse(e.result)}catch{continue}let o=e.updated_at?new Date(e.updated_at).toISOString():new Date().toISOString();for(let c of r){let l=b[c];if(!l)continue;let R=i[c];if(Array.isArray(R))for(let $ of R){let a=String($?.text??"").trim();if(a.length<s)continue;let g=A(e.id,c,a),_=g.slice(g.lastIndexOf("@")),w=`${c}${_}`,y=T(c,a),S=f.get(y)??new Set;if(S.add(e.session_id??e.id),f.set(y,S),d.has(w))continue;let O=String($?.evidence??"").trim(),k={occurrences:1,agentId:e.agent,key:`${e.agent}/${l}_${C(a)}`,stamp:g,memory:{name:C(a),type:l,description:a.slice(0,200),body:"",createdAt:o,updatedAt:o}};x.set(g,{text:a,evidence:O,agent:e.agent,source:e.source}),d.set(w,k),u.set(w,y),h.push(k)}}}for(let[e,i]of d){let o=f.get(u.get(e)??"");i.occurrences=o?.size??1,i.sessions=[...o??[]].slice(0,L);let c=x.get(i.stamp);i.memory.body=D(c,i.occurrences)}let m=new Map;for(let[e,i]of d){let o=u.get(e)??e,c=m.get(o)??[];c.push(i),m.set(o,c)}let M=[...m.values()].sort((e,i)=>i[0].occurrences-e[0].occurrences),p=[];for(let e=0;p.length<h.length;e++){let i=!1;for(let o of M)e<o.length&&(p.push(o[e]),i=!0);if(!i)break}return p}function D(t,n){let r=`${t.agent}${t.source?` via ${t.source}`:""}`,s=[];return n>1?(s.push(`Observed in ${n} separate sessions. Most recently stated as:`),s.push(`> ${t.text}`),s.push(`Recurring across ${n} sessions is what makes this worth recording \u2014 any single occurrence is session state, the repetition is the finding.`)):s.push(t.text),t.evidence&&s.push(`**Evidence:** ${t.evidence}`),s.push(`_From ${n>1?"session reviews":"a session review"} of ${r}._`),s.join(`
|
|
2
2
|
|
|
3
3
|
`)}export{L as MAX_EVIDENCE_SESSIONS,b as PROMOTABLE_KINDS,v as REVIEW_STAMP_PREFIX,F as parseReviewStamp,A as reviewStamp,K as reviewsToCandidates};
|
|
4
|
-
//# sourceMappingURL=review-candidates-
|
|
4
|
+
//# sourceMappingURL=review-candidates-B6574GOJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=routing-
|
|
1
|
+
import{a,b}from"./chunk-M67AN4J7.js";import"./chunk-37EABIOJ.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{a as cheapModelForEngine,b as routeTaskModel};
|
|
2
|
+
//# sourceMappingURL=routing-BGKZOHOA.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b}from"./chunk-2TJYZF4E.js";import"./chunk-RKPAVWXF.js";import"./chunk-QYHABRLM.js";import"./chunk-ZOJUHPD5.js";import"./chunk-4HNHHKJF.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-QIJLFPWE.js";export{b as resolveScheduleCaller,a as runScheduleTool};
|
|
2
|
+
//# sourceMappingURL=schedule-tool-UDHXTKWV.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as a,o as b,p as c,q as d,r as e,s as f}from"./chunk-ZOJUHPD5.js";import"./chunk-4HNHHKJF.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-QIJLFPWE.js";export{a as AGENT_RUN_TIMEOUT_FLOOR,f as CronScheduler,b as agentRunTimeout,e as cronRunId,d as getNextCronDate,c as runLinkIds};
|
|
2
|
+
//# sourceMappingURL=scheduler-NQM3HVUY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=seat-
|
|
1
|
+
import{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i}from"./chunk-37EABIOJ.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";i();export{h as askSeat,a as configureDecisions,c as decisionsRuntime,f as getSeatMode,d as parseSeatMode,g as recordSeatOutcome,b as resetDecisionsRuntime,e as seatEnvVar};
|
|
2
|
+
//# sourceMappingURL=seat-VGST5AQB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as S,w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=select-
|
|
1
|
+
import{v as S,w}from"./chunk-37EABIOJ.js";import{a as g,b as h,f as R}from"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import{d as f}from"./chunk-VDMYBPYB.js";import"./chunk-4FFWNPFX.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";w();R();var p="skill-select";function y(l){return{task:d(l.task,1200),...l.agent?{agent:l.agent}:{},skills:l.candidates.map(t=>({name:t.name,purpose:d(t.description,300),...t.category?{category:t.category}:{},...t.tags?.length?{tags:t.tags.slice(0,8)}:{}}))}}function b(l){let t={};for(let i of l)t[i.name]=d(i.description,300);return{anyRelevant:g("At least one of these skills is about the task at hand.",{true:"The task is the kind of work one of these skills exists for, and following it would change how the work is done \u2014 it names the same system, the same procedure or the same kind of artefact.",false:"None of them is about this task. They may share vocabulary with it, mention the same tools, or belong to the same project without bearing on what is being asked. Sharing words with a task is not being about it."}),best:h(t,"Which skill is this task most about?")}}function v(l){let t=l.anyRelevant,i=l.best,o=Object.entries(i.probabilities??{}).map(([e,s])=>({name:e,p:Number(s)||0})).sort((e,s)=>s.p-e.p);return{anyRelevant:t.noul,name:i.choice,confidence:i.confidence,ranked:o}}function d(l,t){return l.length>t?`${l.slice(0,t)}\u2026`:l}var x=.1,A=12;async function E(l,t,i={}){let o=i.minRelevant??.6,e=f(l,t).filter(n=>n.relevance>=x).slice(0,A),s=e.map(n=>({name:n.skill.frontmatter.name,lexical:n.relevance}));if(e.length===0)return{skill:null,anyRelevant:0,confidence:0,shortlist:s,judged:!1,reason:"no skill mentions anything in this task"};if(e.length===1)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`only ${e[0].skill.frontmatter.name} matched (${e[0].matchReason})`};let r=e.map(n=>({name:n.skill.frontmatter.name,description:n.skill.frontmatter.description,category:n.skill.frontmatter.category??null,tags:n.skill.frontmatter.tags})),m=await S(p,y({task:t,agent:i.agent??null,candidates:r}),b(r),{incumbent:{best:r[0].name},features:{agent:i.agent??"unknown",candidates:r.length}});if(!m)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`seat off \u2014 lexical top match (${e[0].matchReason})`};let a=v(m.answers),c=s.map(n=>({...n,p:a.ranked.find(k=>k.name===n.name)?.p??0})).sort((n,k)=>(k.p??0)-(n.p??0));if(a.anyRelevant<o)return{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`nothing on the shortlist is about this task (${a.anyRelevant.toFixed(2)} below ${o})`};let u=e.find(n=>n.skill.frontmatter.name===a.name);return u?{skill:u.skill,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`${a.name} (confidence ${a.confidence.toFixed(2)})`}:{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`seat chose "${a.name}", which was not on the shortlist`}}export{E as pickSkillForTask};
|
|
2
|
+
//# sourceMappingURL=select-Y7SBUCGJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=set-enabled-
|
|
1
|
+
import{b as a}from"./chunk-4HNHHKJF.js";import"./chunk-4FFWNPFX.js";import"./chunk-QIJLFPWE.js";async function i(o,r,s={}){let e=null,n=await a(l=>{let t=l.crons?.[o];if(t?r&&t.approval?.action==="create"?e={ok:!1,status:409,error:`schedule "${o}" is waiting for approval: agentx schedule approve ${o}`}:t.enabled===r&&(e={ok:!0,id:o,enabled:r,changed:!1}):e={ok:!1,status:404,error:`no schedule "${o}"`},e)throw new Error("no write");t.enabled=r,e={ok:!0,id:o,enabled:r,changed:!0}},{configPath:s.configPath,reload:!1});return e&&(!e.ok||!e.changed)?e:n.success?e??{ok:!1,status:500,error:"mutation did not run"}:{ok:!1,status:500,error:n.error||"could not write agentx.json"}}export{i as setCronEnabled};
|
|
2
|
+
//# sourceMappingURL=set-enabled-ARKMDLXN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=tool-
|
|
1
|
+
import{b as p}from"./chunk-2TJYZF4E.js";import"./chunk-RKPAVWXF.js";import"./chunk-QYHABRLM.js";import"./chunk-ZOJUHPD5.js";import"./chunk-4HNHHKJF.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-QIJLFPWE.js";var f=new Set(["cron","heartbeat","api","a2a","mesh","approvals"]);function u(t){return typeof t=="string"?t.trim():""}async function y(t,i){let c=i.fetch??fetch,d=i.daemonUrl.replace(/\/$/,""),s=(u(t.action)||"create").toLowerCase(),r=p(t,i.env??process.env);if(s==="status"){let o=u(t.id);if(!o)return"Error: `id` is required for status (the card id you got when you raised it).";try{let n=await c(`${d}/approvals/${encodeURIComponent(o)}`,{signal:AbortSignal.timeout(1e4)}),a=await n.json().catch(()=>({}));if(!n.ok)return`Error: ${a?.error||`HTTP ${n.status}`}`;let e=a.card;return r&&e.raised_by!==r.agentId?`Error: card "${o}" was raised by another agent.`:e.status==="pending"?`Card ${e.id} is still waiting for the operator. It expires ${e.expires}; then "${e.if_silent}" applies.`:e.status==="decided"?`Card ${e.id}: the operator said ${String(e.verdict).toUpperCase()}.${e.note?` Note: ${e.note}`:""}`:`Card ${e.id} expired unanswered; the default applied: ${e.outcome??e.if_silent}.`}catch(n){return`Error: couldn't reach the daemon (${n?.message??n}).`}}if(s!=="create")return`Error: unknown action "${s}". Use create or status.`;if(!r)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=r.channel&&r.chatId&&!f.has(r.channel)?{channel:r.channel,chatId:r.chatId,...r.accountId?{accountId:r.accountId}:{}}:void 0,h={title:t.title,ask:t.ask,recommend:t.recommend,if_silent:t.if_silent,expires:t.expires,source:t.source,raised_by:r.agentId,...l?{reply:l}:{}};try{let o=await c(`${d}/approvals`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:AbortSignal.timeout(1e4)}),n=await o.json().catch(()=>({}));if(!o.ok)return`Error: ${n?.error||`HTTP ${o.status}`}`;let a=n.card;return[`Decision card ${a.id} is in the operator's Approvals inbox.`,`If nobody answers by ${a.expires}, "${a.if_silent}" applies.`,"You will get a message with the result. Tell the requester it is waiting for approval; don't ask the operator again in chat."].join(" ")}catch(o){return`Error: couldn't reach the daemon (${o?.message??o}).`}}export{y as runApprovalTool};
|
|
2
|
+
//# sourceMappingURL=tool-5EVYUN2G.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./chunk-VWTBHLMX.js";import{a as b}from"./chunk-WLRHL2P7.js";import{e as a}from"./chunk-XWU7O3S5.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import{a as c}from"./chunk-BKDUCPZ3.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-37EABIOJ.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-4FFWNPFX.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
|
|
2
|
+
//# sourceMappingURL=wiki-GREI2TSP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentix-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "AI operations layer for small and medium businesses. Routes Telegram, WhatsApp, GitLab, GitHub, crons, webhooks, and mesh tasks to AI agents. Web wizard for operators, CLI for engineers. Self-hosted.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
"react": "^18.3.1",
|
|
104
104
|
"react-dom": "^18.3.1",
|
|
105
105
|
"undici": "^8.1.0",
|
|
106
|
+
"web-push": "^3.6.7",
|
|
106
107
|
"yaml": "^2.8.4",
|
|
107
108
|
"zod": "^3.20.2"
|
|
108
109
|
},
|
|
@@ -112,6 +113,7 @@
|
|
|
112
113
|
"@types/qrcode-terminal": "^0.12.2",
|
|
113
114
|
"@types/react": "^18.3.28",
|
|
114
115
|
"@types/react-dom": "^18.3.7",
|
|
116
|
+
"@types/web-push": "^3.6.4",
|
|
115
117
|
"lucide-static": "^1.8.0",
|
|
116
118
|
"mermaid": "^11.14.0",
|
|
117
119
|
"prettier": "^3.0.0",
|