@herbertgao/pi-extensions 2026.10.2 → 2026.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -12
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +8 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +1 -1
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -5
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/invocation-config.ts +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/mention-clone.ts +48 -72
- package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/output-file.ts +15 -6
- package/node_modules/@herbertgao/pi-subagents/src/workflow/collisions.ts +4 -1
- package/node_modules/@herbertgao/pi-subagents/src/workflow/json-schema.ts +9 -8
- package/node_modules/@narumitw/pi-caffeinate/dist/index.ts +6 -1
- package/node_modules/@narumitw/pi-caffeinate/dist/index.ts.map +2 -2
- package/node_modules/@narumitw/pi-caffeinate/package.json +1 -1
- package/node_modules/@narumitw/pi-caffeinate/src/dbus-inhibit.ts +13 -1
- package/node_modules/pi-lens/CHANGELOG.md +95 -0
- package/node_modules/pi-lens/README.md +1 -0
- package/node_modules/pi-lens/dist/chunk-2FQ62SPM.js +83 -0
- package/node_modules/pi-lens/dist/{chunk-6P62QVEA.js → chunk-2UMYMRI3.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-O6TQT6RI.js → chunk-34OCDWOS.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-XK4CIILI.js → chunk-3FERWMCH.js} +26 -26
- package/node_modules/pi-lens/dist/{chunk-ZAWW3AF6.js → chunk-3JL6IFD7.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-OAXNDZJ7.js → chunk-3JSEWUWI.js} +8 -4
- package/node_modules/pi-lens/dist/{chunk-RPD5K5NC.js → chunk-3MRXIJ6I.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-IVP5KAB7.js → chunk-3P4PF2BX.js} +14 -14
- package/node_modules/pi-lens/dist/{chunk-5THXD6X5.js → chunk-3PNFWVHT.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-VD4JQCQC.js → chunk-3TTPKMEF.js} +37 -37
- package/node_modules/pi-lens/dist/{chunk-7F72PXY2.js → chunk-5JHXUETW.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-5ZEJHV35.js → chunk-64LU2OVH.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-ODEEOXPH.js → chunk-6B5I6ICN.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-5RXBNSW2.js → chunk-6P54TMWL.js} +16 -8
- package/node_modules/pi-lens/dist/{chunk-K6VYLB2U.js → chunk-6UYA642J.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-V7R425XG.js → chunk-6XX5HCLK.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-D6QS3U6M.js → chunk-7AXO3ZDF.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-YGVYKNSN.js → chunk-7BX5DWSA.js} +59 -12
- package/node_modules/pi-lens/dist/{chunk-N3YQJI6O.js → chunk-7ELY2CSM.js} +7 -4
- package/node_modules/pi-lens/dist/{chunk-AWE5TMPO.js → chunk-7M4T5N3V.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-AJ3QXTRQ.js → chunk-AFZYMAIV.js} +33 -33
- package/node_modules/pi-lens/dist/{chunk-AJXODZY6.js → chunk-ALQRYH6O.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-AJVLWNFN.js → chunk-AXKPQ6ZI.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-HWBZIGMJ.js → chunk-BHWHXMQ2.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-IXEBJSUE.js → chunk-BJF25SUG.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-GVXA6CCE.js → chunk-BNKLYOOO.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-T4ERT73Y.js → chunk-CBD2B5CP.js} +20 -20
- package/node_modules/pi-lens/dist/{chunk-O5WILGMI.js → chunk-CFYISHUW.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-EOKRQ3SA.js → chunk-CMU4RMJB.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-YSNFMJKN.js → chunk-CULQYFLU.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-ORTMY4Q4.js → chunk-D65GOCJB.js} +21 -14
- package/node_modules/pi-lens/dist/{chunk-NTUJEGDZ.js → chunk-D6YF5HKX.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-BRJKOBZP.js → chunk-DMS52BEP.js} +17 -6
- package/node_modules/pi-lens/dist/{chunk-NL5GLMFI.js → chunk-ELVWJYRV.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-4W2PLC4J.js → chunk-EUT3B22Y.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-GUOGVTCQ.js → chunk-F5VLZHUW.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-I7SPGOWI.js → chunk-FGALODG3.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-Q5U6FMDI.js → chunk-G3RLJYA2.js} +12 -6
- package/node_modules/pi-lens/dist/{chunk-FJNKANOS.js → chunk-GAYGGICG.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-HVUZXSWK.js → chunk-H2W2AXD3.js} +38 -40
- package/node_modules/pi-lens/dist/{chunk-VHQLPIRJ.js → chunk-H5EV3VMF.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-27BBHSZC.js → chunk-HREZQCT3.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-TT22N74J.js → chunk-HSIRMK2D.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-3I5QFT3N.js → chunk-IMSQR4WO.js} +6 -3
- package/node_modules/pi-lens/dist/{chunk-B3I2UUT4.js → chunk-IQZXOZ7S.js} +156 -32
- package/node_modules/pi-lens/dist/{chunk-RIISMHKN.js → chunk-IR6XFA5P.js} +14 -13
- package/node_modules/pi-lens/dist/{chunk-LNAKEO63.js → chunk-IUKPRZER.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-RUOG5D2C.js → chunk-IUR76K6A.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-TO6WL3GM.js → chunk-J3FZR3YY.js} +12 -2
- package/node_modules/pi-lens/dist/{chunk-Y4T27COV.js → chunk-J6DFZDFA.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-E4MAEDPM.js → chunk-J7WJZ6W7.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-52H5B5TC.js → chunk-JONGANYH.js} +30 -30
- package/node_modules/pi-lens/dist/{chunk-TGPXLY2J.js → chunk-KJCWXUUS.js} +35 -1
- package/node_modules/pi-lens/dist/{chunk-I3R7GKDR.js → chunk-KJN4IOEJ.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-RPD4ZSB7.js → chunk-KMGPUKFD.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-OQGFCZJ4.js → chunk-LD7WFTRX.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-DIULIWKU.js → chunk-LNOMA3MP.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-HHYAELLJ.js → chunk-MGIWSROG.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-YLF3PPT5.js → chunk-MQA2YBAH.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-TVN5N6GY.js → chunk-MTDRLSI7.js} +690 -186
- package/node_modules/pi-lens/dist/{chunk-DQ2NZ7C4.js → chunk-N2IRDBZI.js} +44 -6
- package/node_modules/pi-lens/dist/{chunk-AHDW3GPE.js → chunk-N77WFUL7.js} +22 -22
- package/node_modules/pi-lens/dist/{chunk-NXPS2L6U.js → chunk-N7YNJE5R.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-7FBF7NPR.js → chunk-NFXP47RV.js} +13 -12
- package/node_modules/pi-lens/dist/{chunk-UY752QSN.js → chunk-NJF2X5XF.js} +17 -17
- package/node_modules/pi-lens/dist/{chunk-WONERJTP.js → chunk-O7HZX7CA.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-AS44CFQ4.js → chunk-OC7LYAU5.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-4RERDEXR.js → chunk-OEX24ECI.js} +30 -30
- package/node_modules/pi-lens/dist/{chunk-6VCD4VKZ.js → chunk-OYOB3ZFG.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-IIXOAGHR.js → chunk-OYTMZXRF.js} +18 -15
- package/node_modules/pi-lens/dist/{chunk-ARFCXG7S.js → chunk-OZJINN4O.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-34U7PLGE.js → chunk-PCHDGUKT.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-VCSRSYLF.js → chunk-RJFED73B.js} +34 -36
- package/node_modules/pi-lens/dist/chunk-RTQNRM5X.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-PAK6IDME.js → chunk-S6AMWKPC.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-U3VGR4VU.js → chunk-T4QZ6FEH.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-VN2AXLEX.js → chunk-T54VJRAD.js} +54 -12
- package/node_modules/pi-lens/dist/{chunk-ZMOL6RQC.js → chunk-TA5L5KWQ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-JOLITGCC.js → chunk-TQFBZVCG.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VDBPVIKD.js → chunk-U52SAGRM.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-LW6XKDZQ.js → chunk-UEAHAMEI.js} +284 -35
- package/node_modules/pi-lens/dist/{chunk-NMABWBZN.js → chunk-UGSMCQ4D.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-6QIUX4EP.js → chunk-USHG4DLH.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-LSMJ6KBE.js → chunk-V5MEBST3.js} +16 -16
- package/node_modules/pi-lens/dist/chunk-VGEVL5EQ.js +29 -0
- package/node_modules/pi-lens/dist/{chunk-47D2BO4S.js → chunk-VPWKF3GN.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-UK3CMEAL.js → chunk-VSMJK3ZJ.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-22AVIGXS.js → chunk-VYKKMYVT.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-OS32RNR2.js → chunk-VZHJS6DR.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-E2WFBRHM.js → chunk-WATC3IQR.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-WPE5FPGR.js +54 -0
- package/node_modules/pi-lens/dist/{chunk-V5PXFSZK.js → chunk-WSEWKCXU.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-NKOUFPQF.js → chunk-WW5BLB74.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-PWFHBTSF.js → chunk-XGUL4SLQ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-F3P7VQ7H.js → chunk-XHSCVSOL.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-DFVMIKMQ.js → chunk-YLN4K6WD.js} +45 -9
- package/node_modules/pi-lens/dist/{chunk-VNMT7C64.js → chunk-Z6BB4JLQ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-NTHH2J74.js → chunk-Z7QQA2KT.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-F3AU2TMM.js → chunk-ZETYB3XG.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-XECLWQZN.js → chunk-ZMOMPX2Z.js} +12 -10
- package/node_modules/pi-lens/dist/{chunk-C2AUYXQH.js → chunk-ZOEYVXSV.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-TLGFBM3F.js → chunk-ZZUFZUQZ.js} +68 -64
- package/node_modules/pi-lens/dist/index.js +30113 -28398
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +8 -8
- package/node_modules/pi-lens/dist/mcp/cli.js +37 -37
- package/node_modules/pi-lens/dist/mcp/server.js +257 -158
- package/node_modules/pi-lens/dist/mcp/worker.js +55 -55
- package/node_modules/pi-lens/dist/probes/installer.js +19 -19
- package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +2 -2
- package/node_modules/pi-lens/docs/configuration.md +9 -2
- package/node_modules/pi-lens/docs/custom-rules.md +25 -2
- package/node_modules/pi-lens/docs/environment-variables.md +34 -6
- package/node_modules/pi-lens/docs/features.md +37 -1
- package/node_modules/pi-lens/docs/globalconfig.md +1 -1
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +2 -1
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +9 -5
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +43 -1
- package/node_modules/pi-lens/docs/pi-lens-monitor.md +3 -1
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +4 -3
- package/node_modules/pi-lens/docs/schema/pi-lens-config-v1.json +530 -0
- package/node_modules/pi-lens/docs/servercapabilities.md +4 -1
- package/node_modules/pi-lens/docs/word-index.md +6 -0
- package/node_modules/pi-lens/package.json +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-identity-operator-on-literals-test.yml +12 -2
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/throw-new-error-js-test.yml +2 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/throw-new-error-test.yml +2 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-identity-operator-on-literals.yml +20 -12
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/throw-new-error-js.yml +2 -2
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/throw-new-error.yml +2 -2
- package/node_modules/pi-web-access/CHANGELOG.md +28 -0
- package/node_modules/pi-web-access/README.md +10 -6
- package/node_modules/pi-web-access/ceramic.ts +219 -0
- package/node_modules/pi-web-access/curator-page.ts +3 -1
- package/node_modules/pi-web-access/curator-server.ts +1 -0
- package/node_modules/pi-web-access/dist/index.js +846 -588
- package/node_modules/pi-web-access/dist/mcp-cli.js +725 -516
- package/node_modules/pi-web-access/gemini-search.ts +8 -4
- package/node_modules/pi-web-access/github-extract.ts +34 -2
- package/node_modules/pi-web-access/index.ts +72 -30
- package/node_modules/pi-web-access/openai-search.ts +3 -3
- package/node_modules/pi-web-access/package.json +2 -2
- package/node_modules/pi-web-access/page-query.ts +6 -9
- package/node_modules/pi-web-access/parallel-mcp.ts +2 -0
- package/node_modules/pi-web-access/query-rewrite.ts +2 -2
- package/node_modules/pi-web-access/storage.ts +49 -0
- package/node_modules/pi-web-access/summary-review.ts +7 -6
- package/node_modules/pi-web-access/utils.ts +21 -6
- package/node_modules/pi-web-access/web-tool-core.ts +1 -0
- package/package.json +7 -12
- package/node_modules/pi-lens/dist/chunk-54B42YRX.js +0 -27
- package/node_modules/pi-lens/dist/chunk-CGGAIP7J.js +0 -29
- package/node_modules/pi-lens/dist/chunk-HMFXILPV.js +0 -83
- package/node_modules/pi-lens/dist/chunk-T6D4Q4AQ.js +0 -54
- package/node_modules/pi-web-access/opencode-session-headers.ts +0 -24
- package/node_modules/remote-pi/LICENSE +0 -21
- package/node_modules/remote-pi/README.md +0 -675
- package/node_modules/remote-pi/dist/actions/handlers.d.ts +0 -122
- package/node_modules/remote-pi/dist/actions/handlers.js +0 -160
- package/node_modules/remote-pi/dist/actions/handlers.js.map +0 -1
- package/node_modules/remote-pi/dist/actions/registry.d.ts +0 -39
- package/node_modules/remote-pi/dist/actions/registry.js +0 -58
- package/node_modules/remote-pi/dist/actions/registry.js.map +0 -1
- package/node_modules/remote-pi/dist/bin/supervisord.d.ts +0 -2
- package/node_modules/remote-pi/dist/bin/supervisord.js +0 -86
- package/node_modules/remote-pi/dist/bin/supervisord.js.map +0 -1
- package/node_modules/remote-pi/dist/commands/builtin_mirror.d.ts +0 -58
- package/node_modules/remote-pi/dist/commands/builtin_mirror.js +0 -71
- package/node_modules/remote-pi/dist/commands/builtin_mirror.js.map +0 -1
- package/node_modules/remote-pi/dist/commands/list_commands.d.ts +0 -60
- package/node_modules/remote-pi/dist/commands/list_commands.js +0 -73
- package/node_modules/remote-pi/dist/commands/list_commands.js.map +0 -1
- package/node_modules/remote-pi/dist/config.d.ts +0 -62
- package/node_modules/remote-pi/dist/config.js +0 -115
- package/node_modules/remote-pi/dist/config.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/client.d.ts +0 -20
- package/node_modules/remote-pi/dist/daemon/client.js +0 -131
- package/node_modules/remote-pi/dist/daemon/client.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/control_protocol.d.ts +0 -176
- package/node_modules/remote-pi/dist/daemon/control_protocol.js +0 -63
- package/node_modules/remote-pi/dist/daemon/control_protocol.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/cron_log.d.ts +0 -45
- package/node_modules/remote-pi/dist/daemon/cron_log.js +0 -72
- package/node_modules/remote-pi/dist/daemon/cron_log.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/cron_registry.d.ts +0 -80
- package/node_modules/remote-pi/dist/daemon/cron_registry.js +0 -194
- package/node_modules/remote-pi/dist/daemon/cron_registry.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/id.d.ts +0 -24
- package/node_modules/remote-pi/dist/daemon/id.js +0 -36
- package/node_modules/remote-pi/dist/daemon/id.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/install.d.ts +0 -170
- package/node_modules/remote-pi/dist/daemon/install.js +0 -547
- package/node_modules/remote-pi/dist/daemon/install.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/registry.d.ts +0 -63
- package/node_modules/remote-pi/dist/daemon/registry.js +0 -153
- package/node_modules/remote-pi/dist/daemon/registry.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/rpc_child.d.ts +0 -194
- package/node_modules/remote-pi/dist/daemon/rpc_child.js +0 -389
- package/node_modules/remote-pi/dist/daemon/rpc_child.js.map +0 -1
- package/node_modules/remote-pi/dist/daemon/supervisor.d.ts +0 -93
- package/node_modules/remote-pi/dist/daemon/supervisor.js +0 -596
- package/node_modules/remote-pi/dist/daemon/supervisor.js.map +0 -1
- package/node_modules/remote-pi/dist/extension_ui_bridge.d.ts +0 -26
- package/node_modules/remote-pi/dist/extension_ui_bridge.js +0 -341
- package/node_modules/remote-pi/dist/extension_ui_bridge.js.map +0 -1
- package/node_modules/remote-pi/dist/index.d.ts +0 -213
- package/node_modules/remote-pi/dist/index.js +0 -4996
- package/node_modules/remote-pi/dist/index.js.map +0 -1
- package/node_modules/remote-pi/dist/mcp/mesh_result.d.ts +0 -10
- package/node_modules/remote-pi/dist/mcp/mesh_result.js +0 -42
- package/node_modules/remote-pi/dist/mcp/mesh_result.js.map +0 -1
- package/node_modules/remote-pi/dist/mcp/mesh_server.d.ts +0 -16
- package/node_modules/remote-pi/dist/mcp/mesh_server.js +0 -327
- package/node_modules/remote-pi/dist/mcp/mesh_server.js.map +0 -1
- package/node_modules/remote-pi/dist/mesh/canonical.d.ts +0 -30
- package/node_modules/remote-pi/dist/mesh/canonical.js +0 -61
- package/node_modules/remote-pi/dist/mesh/canonical.js.map +0 -1
- package/node_modules/remote-pi/dist/mesh/client.d.ts +0 -18
- package/node_modules/remote-pi/dist/mesh/client.js +0 -125
- package/node_modules/remote-pi/dist/mesh/client.js.map +0 -1
- package/node_modules/remote-pi/dist/mesh/encoding.d.ts +0 -38
- package/node_modules/remote-pi/dist/mesh/encoding.js +0 -216
- package/node_modules/remote-pi/dist/mesh/encoding.js.map +0 -1
- package/node_modules/remote-pi/dist/mesh/self_revoke.d.ts +0 -73
- package/node_modules/remote-pi/dist/mesh/self_revoke.js +0 -401
- package/node_modules/remote-pi/dist/mesh/self_revoke.js.map +0 -1
- package/node_modules/remote-pi/dist/mesh/siblings.d.ts +0 -49
- package/node_modules/remote-pi/dist/mesh/siblings.js +0 -159
- package/node_modules/remote-pi/dist/mesh/siblings.js.map +0 -1
- package/node_modules/remote-pi/dist/mesh/types.d.ts +0 -34
- package/node_modules/remote-pi/dist/mesh/types.js +0 -11
- package/node_modules/remote-pi/dist/mesh/types.js.map +0 -1
- package/node_modules/remote-pi/dist/mesh/verify.d.ts +0 -17
- package/node_modules/remote-pi/dist/mesh/verify.js +0 -86
- package/node_modules/remote-pi/dist/mesh/verify.js.map +0 -1
- package/node_modules/remote-pi/dist/pairing/crypto.d.ts +0 -8
- package/node_modules/remote-pi/dist/pairing/crypto.js +0 -22
- package/node_modules/remote-pi/dist/pairing/crypto.js.map +0 -1
- package/node_modules/remote-pi/dist/pairing/handshake.d.ts +0 -28
- package/node_modules/remote-pi/dist/pairing/handshake.js +0 -113
- package/node_modules/remote-pi/dist/pairing/handshake.js.map +0 -1
- package/node_modules/remote-pi/dist/pairing/noise-sha256.d.ts +0 -16
- package/node_modules/remote-pi/dist/pairing/noise-sha256.js +0 -103
- package/node_modules/remote-pi/dist/pairing/noise-sha256.js.map +0 -1
- package/node_modules/remote-pi/dist/pairing/qr.d.ts +0 -59
- package/node_modules/remote-pi/dist/pairing/qr.js +0 -125
- package/node_modules/remote-pi/dist/pairing/qr.js.map +0 -1
- package/node_modules/remote-pi/dist/pairing/storage.d.ts +0 -120
- package/node_modules/remote-pi/dist/pairing/storage.js +0 -604
- package/node_modules/remote-pi/dist/pairing/storage.js.map +0 -1
- package/node_modules/remote-pi/dist/protocol/codec.d.ts +0 -7
- package/node_modules/remote-pi/dist/protocol/codec.js +0 -49
- package/node_modules/remote-pi/dist/protocol/codec.js.map +0 -1
- package/node_modules/remote-pi/dist/protocol/types.d.ts +0 -393
- package/node_modules/remote-pi/dist/protocol/types.js +0 -2
- package/node_modules/remote-pi/dist/protocol/types.js.map +0 -1
- package/node_modules/remote-pi/dist/rooms.d.ts +0 -29
- package/node_modules/remote-pi/dist/rooms.js +0 -57
- package/node_modules/remote-pi/dist/rooms.js.map +0 -1
- package/node_modules/remote-pi/dist/session/address.d.ts +0 -49
- package/node_modules/remote-pi/dist/session/address.js +0 -58
- package/node_modules/remote-pi/dist/session/address.js.map +0 -1
- package/node_modules/remote-pi/dist/session/agent_bridge.d.ts +0 -55
- package/node_modules/remote-pi/dist/session/agent_bridge.js +0 -146
- package/node_modules/remote-pi/dist/session/agent_bridge.js.map +0 -1
- package/node_modules/remote-pi/dist/session/bridge.d.ts +0 -37
- package/node_modules/remote-pi/dist/session/bridge.js +0 -130
- package/node_modules/remote-pi/dist/session/bridge.js.map +0 -1
- package/node_modules/remote-pi/dist/session/broker.d.ts +0 -189
- package/node_modules/remote-pi/dist/session/broker.js +0 -507
- package/node_modules/remote-pi/dist/session/broker.js.map +0 -1
- package/node_modules/remote-pi/dist/session/broker_remote.d.ts +0 -74
- package/node_modules/remote-pi/dist/session/broker_remote.js +0 -583
- package/node_modules/remote-pi/dist/session/broker_remote.js.map +0 -1
- package/node_modules/remote-pi/dist/session/cwd_lock.d.ts +0 -33
- package/node_modules/remote-pi/dist/session/cwd_lock.js +0 -126
- package/node_modules/remote-pi/dist/session/cwd_lock.js.map +0 -1
- package/node_modules/remote-pi/dist/session/envelope.d.ts +0 -33
- package/node_modules/remote-pi/dist/session/envelope.js +0 -117
- package/node_modules/remote-pi/dist/session/envelope.js.map +0 -1
- package/node_modules/remote-pi/dist/session/global_config.d.ts +0 -33
- package/node_modules/remote-pi/dist/session/global_config.js +0 -73
- package/node_modules/remote-pi/dist/session/global_config.js.map +0 -1
- package/node_modules/remote-pi/dist/session/ipc.d.ts +0 -27
- package/node_modules/remote-pi/dist/session/ipc.js +0 -22
- package/node_modules/remote-pi/dist/session/ipc.js.map +0 -1
- package/node_modules/remote-pi/dist/session/leader_election.d.ts +0 -32
- package/node_modules/remote-pi/dist/session/leader_election.js +0 -106
- package/node_modules/remote-pi/dist/session/leader_election.js.map +0 -1
- package/node_modules/remote-pi/dist/session/local_config.d.ts +0 -55
- package/node_modules/remote-pi/dist/session/local_config.js +0 -157
- package/node_modules/remote-pi/dist/session/local_config.js.map +0 -1
- package/node_modules/remote-pi/dist/session/mesh_message.d.ts +0 -20
- package/node_modules/remote-pi/dist/session/mesh_message.js +0 -28
- package/node_modules/remote-pi/dist/session/mesh_message.js.map +0 -1
- package/node_modules/remote-pi/dist/session/mesh_node.d.ts +0 -116
- package/node_modules/remote-pi/dist/session/mesh_node.js +0 -573
- package/node_modules/remote-pi/dist/session/mesh_node.js.map +0 -1
- package/node_modules/remote-pi/dist/session/peer.d.ts +0 -139
- package/node_modules/remote-pi/dist/session/peer.js +0 -451
- package/node_modules/remote-pi/dist/session/peer.js.map +0 -1
- package/node_modules/remote-pi/dist/session/peer_inventory.d.ts +0 -13
- package/node_modules/remote-pi/dist/session/peer_inventory.js +0 -48
- package/node_modules/remote-pi/dist/session/peer_inventory.js.map +0 -1
- package/node_modules/remote-pi/dist/session/peer_limits.d.ts +0 -9
- package/node_modules/remote-pi/dist/session/peer_limits.js +0 -21
- package/node_modules/remote-pi/dist/session/peer_limits.js.map +0 -1
- package/node_modules/remote-pi/dist/session/setup_wizard.d.ts +0 -39
- package/node_modules/remote-pi/dist/session/setup_wizard.js +0 -63
- package/node_modules/remote-pi/dist/session/setup_wizard.js.map +0 -1
- package/node_modules/remote-pi/dist/session/tool_gate.d.ts +0 -5
- package/node_modules/remote-pi/dist/session/tool_gate.js +0 -11
- package/node_modules/remote-pi/dist/session/tool_gate.js.map +0 -1
- package/node_modules/remote-pi/dist/session/tools.d.ts +0 -24
- package/node_modules/remote-pi/dist/session/tools.js +0 -252
- package/node_modules/remote-pi/dist/session/tools.js.map +0 -1
- package/node_modules/remote-pi/dist/session/wizard.d.ts +0 -13
- package/node_modules/remote-pi/dist/session/wizard.js +0 -20
- package/node_modules/remote-pi/dist/session/wizard.js.map +0 -1
- package/node_modules/remote-pi/dist/settings.d.ts +0 -15
- package/node_modules/remote-pi/dist/settings.js +0 -52
- package/node_modules/remote-pi/dist/settings.js.map +0 -1
- package/node_modules/remote-pi/dist/transport/peer_channel.d.ts +0 -37
- package/node_modules/remote-pi/dist/transport/peer_channel.js +0 -98
- package/node_modules/remote-pi/dist/transport/peer_channel.js.map +0 -1
- package/node_modules/remote-pi/dist/transport/pi_forward_client.d.ts +0 -29
- package/node_modules/remote-pi/dist/transport/pi_forward_client.js +0 -62
- package/node_modules/remote-pi/dist/transport/pi_forward_client.js.map +0 -1
- package/node_modules/remote-pi/dist/transport/relay_client.d.ts +0 -91
- package/node_modules/remote-pi/dist/transport/relay_client.js +0 -206
- package/node_modules/remote-pi/dist/transport/relay_client.js.map +0 -1
- package/node_modules/remote-pi/dist/ui/footer.d.ts +0 -32
- package/node_modules/remote-pi/dist/ui/footer.js +0 -34
- package/node_modules/remote-pi/dist/ui/footer.js.map +0 -1
- package/node_modules/remote-pi/docs/daemon.md +0 -289
- package/node_modules/remote-pi/package.json +0 -92
- package/node_modules/remote-pi/service-templates/launchd.plist.template +0 -35
- package/node_modules/remote-pi/service-templates/systemd.service.template +0 -19
- package/node_modules/remote-pi/service-templates/task-launcher.vbs.template +0 -10
- package/node_modules/remote-pi/service-templates/task-scheduler.xml.template +0 -38
- package/node_modules/remote-pi/skills/agent-network/SKILL.md +0 -310
|
@@ -1,596 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, unlinkSync } from "node:fs";
|
|
2
|
-
import { createConnection, createServer } from "node:net";
|
|
3
|
-
import { homedir } from "node:os";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
|
-
import { addDaemon, listDaemons, migrateRegistryNames, removeDaemon } from "./registry.js";
|
|
6
|
-
import { daemonIdForCwd } from "./id.js";
|
|
7
|
-
import { defaultAgentName } from "../session/local_config.js";
|
|
8
|
-
import { ipcAddress, usesNamedPipe } from "../session/ipc.js";
|
|
9
|
-
import { EXIT_DAEMON_FRESH_SESSION, RpcChild } from "./rpc_child.js";
|
|
10
|
-
import { encodeReply, parseRequest, } from "./control_protocol.js";
|
|
11
|
-
import { Cron } from "croner";
|
|
12
|
-
import { addJob as addCronJob, getJob as getCronJob, listJobs as listCronJobs, nextRunFor, recordRun, removeJob as removeCronJob, setJobEnabled, validateSchedule, } from "./cron_registry.js";
|
|
13
|
-
import { appendCronLog, readCronLog } from "./cron_log.js";
|
|
14
|
-
/**
|
|
15
|
-
* Central process that owns the daemon fleet (plan/26).
|
|
16
|
-
*
|
|
17
|
-
* Responsibilities:
|
|
18
|
-
* - Spawn one `pi --mode rpc` child per registry entry. Track them in
|
|
19
|
-
* `_children: Map<id, RpcChild>`.
|
|
20
|
-
* - Auto-restart crashed children with exponential backoff
|
|
21
|
-
* (1s, 5s, 30s, 5min). Give up after 4 attempts to avoid log spam
|
|
22
|
-
* when the agent is misconfigured.
|
|
23
|
-
* - Listen on `~/.pi/remote/supervisor.sock` for `ControlRequest`s from
|
|
24
|
-
* the `remote-pi` CLI. Each connection: 1 request → 1 reply → close.
|
|
25
|
-
* - Graceful shutdown on SIGTERM/SIGINT: stop all children + unlink
|
|
26
|
-
* the UDS file so a next supervisor can bind cleanly.
|
|
27
|
-
*
|
|
28
|
-
* The supervisor itself is the only long-running process the user
|
|
29
|
-
* installs as a system service (plan/26 W3 will generate the unit/plist).
|
|
30
|
-
* If it crashes, systemd/launchd restarts it; on restart it re-reads
|
|
31
|
-
* the registry and re-spawns everything.
|
|
32
|
-
*/
|
|
33
|
-
const SUPERVISOR_SOCK_NAME = "supervisor.sock";
|
|
34
|
-
/** Backoff schedule for auto-restart after a crash. After exhausting, the
|
|
35
|
-
* child stays in `crashed` state until manual `restart_all` or fresh
|
|
36
|
-
* registry add. Keeps logs sane when the agent dies on every boot. */
|
|
37
|
-
const RESTART_BACKOFFS_MS = [1_000, 5_000, 30_000, 5 * 60_000];
|
|
38
|
-
function supervisorSockPath() {
|
|
39
|
-
const root = process.env["REMOTE_PI_HOME"] || homedir();
|
|
40
|
-
// POSIX → ~/.pi/remote/supervisor.sock; Windows → per-user named pipe (plan/40).
|
|
41
|
-
return ipcAddress("supervisor", join(root, ".pi", "remote", SUPERVISOR_SOCK_NAME));
|
|
42
|
-
}
|
|
43
|
-
/** Thrown by `start()` when another live supervisor already holds the UDS.
|
|
44
|
-
* Prevents a second supervisor from orphaning the first's children. */
|
|
45
|
-
export class SupervisorAlreadyRunningError extends Error {
|
|
46
|
-
sockPath;
|
|
47
|
-
constructor(sockPath) {
|
|
48
|
-
super(`Another pi-supervisord is already running (UDS held at ${sockPath}). ` +
|
|
49
|
-
"Refusing to start a second instance. Use `remote-pi daemon …` to control it, " +
|
|
50
|
-
"or stop the running one first.");
|
|
51
|
-
this.sockPath = sockPath;
|
|
52
|
-
this.name = "SupervisorAlreadyRunningError";
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/** Probes whether a live supervisor is accepting connections on `path`.
|
|
56
|
-
* Resolves true if the connect succeeds (a listener is there), false on
|
|
57
|
-
* ECONNREFUSED / ENOENT (stale socket file from a crashed supervisor). */
|
|
58
|
-
function _probeSupervisor(path) {
|
|
59
|
-
return new Promise((resolve) => {
|
|
60
|
-
const sock = createConnection({ path });
|
|
61
|
-
const done = (alive) => {
|
|
62
|
-
sock.removeAllListeners();
|
|
63
|
-
sock.destroy();
|
|
64
|
-
resolve(alive);
|
|
65
|
-
};
|
|
66
|
-
const timer = setTimeout(() => done(false), 1_000);
|
|
67
|
-
sock.once("connect", () => { clearTimeout(timer); done(true); });
|
|
68
|
-
sock.once("error", () => { clearTimeout(timer); done(false); });
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
export function decideFireAction(o) {
|
|
72
|
-
if (!o.running)
|
|
73
|
-
return o.wake ? "wake_and_send" : "skip_down";
|
|
74
|
-
if (o.skipIfBusy && o.busy)
|
|
75
|
-
return "skip_busy";
|
|
76
|
-
return "send";
|
|
77
|
-
}
|
|
78
|
-
export class Supervisor {
|
|
79
|
-
opts;
|
|
80
|
-
server = null;
|
|
81
|
-
children = new Map();
|
|
82
|
-
/** Live croner schedules, keyed by cron job id (plan/39). */
|
|
83
|
-
cronJobs = new Map();
|
|
84
|
-
shuttingDown = false;
|
|
85
|
-
constructor(opts) {
|
|
86
|
-
this.opts = opts;
|
|
87
|
-
}
|
|
88
|
-
/** Bind the control UDS + spawn all registered daemons. */
|
|
89
|
-
async start() {
|
|
90
|
-
this._mkdirParent();
|
|
91
|
-
// Backfill folder-derived names into legacy registry entries (pre-name
|
|
92
|
-
// field) so every daemon has a stable name to inject via env.
|
|
93
|
-
migrateRegistryNames();
|
|
94
|
-
await this._bindUds();
|
|
95
|
-
this._spawnAllFromRegistry();
|
|
96
|
-
// Cron (plan/39): schedule all enabled jobs, then run any missed catchup.
|
|
97
|
-
this._reconcileCron();
|
|
98
|
-
this._runCatchup();
|
|
99
|
-
}
|
|
100
|
-
/** Graceful shutdown: stop all children, close UDS. */
|
|
101
|
-
async stop() {
|
|
102
|
-
this.shuttingDown = true;
|
|
103
|
-
// Stop all cron schedules (plan/39) so no fire races with teardown.
|
|
104
|
-
for (const c of this.cronJobs.values())
|
|
105
|
-
c.stop();
|
|
106
|
-
this.cronJobs.clear();
|
|
107
|
-
// Cancel pending restart timers first so they don't race with stop().
|
|
108
|
-
for (const slot of this.children.values()) {
|
|
109
|
-
if (slot.restartTimer !== null) {
|
|
110
|
-
clearTimeout(slot.restartTimer);
|
|
111
|
-
slot.restartTimer = null;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
await Promise.all([...this.children.values()].map((s) => s.child.stop()));
|
|
115
|
-
this.children.clear();
|
|
116
|
-
await new Promise((resolve) => {
|
|
117
|
-
if (!this.server)
|
|
118
|
-
return resolve();
|
|
119
|
-
this.server.close(() => resolve());
|
|
120
|
-
});
|
|
121
|
-
this.server = null;
|
|
122
|
-
// Best-effort: clear the socket file so a next supervisor bind succeeds.
|
|
123
|
-
// Windows named pipes have no file (auto-removed on exit) → nothing to do.
|
|
124
|
-
if (!usesNamedPipe()) {
|
|
125
|
-
try {
|
|
126
|
-
unlinkSync(supervisorSockPath());
|
|
127
|
-
}
|
|
128
|
-
catch { /* ignored */ }
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
// ── UDS binding ──────────────────────────────────────────────────────────
|
|
132
|
-
_mkdirParent() {
|
|
133
|
-
// A named pipe has no parent directory to create (the addr is `\\.\pipe\…`).
|
|
134
|
-
if (usesNamedPipe())
|
|
135
|
-
return;
|
|
136
|
-
mkdirSync(dirname(supervisorSockPath()), { recursive: true });
|
|
137
|
-
}
|
|
138
|
-
async _bindUds() {
|
|
139
|
-
const path = supervisorSockPath();
|
|
140
|
-
const pipe = usesNamedPipe();
|
|
141
|
-
// Single-instance guard. PROBE first: a live supervisor answering the
|
|
142
|
-
// connect means we must NOT start a second one. Stealing the socket
|
|
143
|
-
// (unlink + bind) would orphan the running supervisor's children — they'd
|
|
144
|
-
// keep running, unreachable by the CLI. Only on POSIX, when the probe
|
|
145
|
-
// fails (stale socket from a crash), do we unlink + bind. On Windows there
|
|
146
|
-
// is no file: always probe, never unlink (the pipe self-cleans on exit).
|
|
147
|
-
if (pipe || existsSync(path)) {
|
|
148
|
-
const alive = await _probeSupervisor(path);
|
|
149
|
-
if (alive) {
|
|
150
|
-
throw new SupervisorAlreadyRunningError(path);
|
|
151
|
-
}
|
|
152
|
-
if (!pipe) {
|
|
153
|
-
try {
|
|
154
|
-
unlinkSync(path);
|
|
155
|
-
}
|
|
156
|
-
catch { /* will throw on bind if still held */ }
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
const server = createServer((socket) => this._onConnection(socket));
|
|
160
|
-
await new Promise((resolve, reject) => {
|
|
161
|
-
server.once("error", reject);
|
|
162
|
-
server.listen(path, () => resolve());
|
|
163
|
-
});
|
|
164
|
-
this.server = server;
|
|
165
|
-
}
|
|
166
|
-
_onConnection(socket) {
|
|
167
|
-
let buf = "";
|
|
168
|
-
socket.setEncoding("utf8");
|
|
169
|
-
socket.on("data", (chunk) => {
|
|
170
|
-
buf += chunk;
|
|
171
|
-
const nl = buf.indexOf("\n");
|
|
172
|
-
if (nl < 0)
|
|
173
|
-
return;
|
|
174
|
-
const line = buf.slice(0, nl);
|
|
175
|
-
// Single request per connection; ignore anything past the newline.
|
|
176
|
-
void this._handleRequest(line)
|
|
177
|
-
.then((reply) => socket.end(encodeReply(reply)))
|
|
178
|
-
.catch((err) => socket.end(encodeReply({ ok: false, error: String(err) })));
|
|
179
|
-
});
|
|
180
|
-
socket.on("error", () => { });
|
|
181
|
-
}
|
|
182
|
-
// ── Request dispatch ─────────────────────────────────────────────────────
|
|
183
|
-
async _handleRequest(line) {
|
|
184
|
-
let req;
|
|
185
|
-
try {
|
|
186
|
-
req = parseRequest(line);
|
|
187
|
-
}
|
|
188
|
-
catch (e) {
|
|
189
|
-
return { ok: false, error: e.message };
|
|
190
|
-
}
|
|
191
|
-
switch (req.op) {
|
|
192
|
-
case "list": return { ok: true, data: { daemons: this._listInfo() } };
|
|
193
|
-
case "status": return { ok: true, data: { daemons: this._listInfo() } };
|
|
194
|
-
case "start_all": return this._opStartAll();
|
|
195
|
-
case "start": return this._opStart(req.id);
|
|
196
|
-
case "stop_all": return this._opStopAll();
|
|
197
|
-
case "stop": return this._opStop(req.id);
|
|
198
|
-
case "restart_all": return this._opRestartAll();
|
|
199
|
-
case "restart": return this._opRestart(req.id);
|
|
200
|
-
case "send": return this._opSend(req.id, req.text);
|
|
201
|
-
case "register": return this._opRegister(req.cwd);
|
|
202
|
-
case "unregister": return this._opUnregister(req.id);
|
|
203
|
-
case "cron_add": return this._opCronAdd(req);
|
|
204
|
-
case "cron_list": return this._opCronList();
|
|
205
|
-
case "cron_remove": return this._opCronRemove(req.job_id);
|
|
206
|
-
case "cron_enable": return this._opCronEnable(req.job_id, req.enabled);
|
|
207
|
-
case "cron_run": return this._opCronRun(req.job_id);
|
|
208
|
-
case "cron_log": return this._opCronLog(req.job_id, req.tail);
|
|
209
|
-
default: {
|
|
210
|
-
const unknown = req.op;
|
|
211
|
-
return { ok: false, error: `unknown op: ${unknown}` };
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
// ── Op handlers ──────────────────────────────────────────────────────────
|
|
216
|
-
_listInfo() {
|
|
217
|
-
const registry = listDaemons();
|
|
218
|
-
return registry.map((entry) => {
|
|
219
|
-
const slot = this.children.get(entry.id);
|
|
220
|
-
const name = entry.name ?? defaultAgentName(entry.cwd);
|
|
221
|
-
const info = {
|
|
222
|
-
id: entry.id,
|
|
223
|
-
cwd: entry.cwd,
|
|
224
|
-
name,
|
|
225
|
-
state: slot?.child.state ?? "stopped",
|
|
226
|
-
};
|
|
227
|
-
if (slot) {
|
|
228
|
-
if (slot.child.pid !== undefined)
|
|
229
|
-
info.pid = slot.child.pid;
|
|
230
|
-
if (slot.child.uptimeMs !== undefined)
|
|
231
|
-
info.uptime_s = Math.floor(slot.child.uptimeMs / 1000);
|
|
232
|
-
info.restart_count = slot.child.restartCount;
|
|
233
|
-
}
|
|
234
|
-
return info;
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
_opStartAll() {
|
|
238
|
-
const started = [];
|
|
239
|
-
const already = [];
|
|
240
|
-
for (const entry of listDaemons()) {
|
|
241
|
-
const slot = this.children.get(entry.id);
|
|
242
|
-
if (slot && slot.child.state === "running") {
|
|
243
|
-
already.push(entry.id);
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
this._spawnEntry(entry.id, entry.cwd);
|
|
247
|
-
started.push(entry.id);
|
|
248
|
-
}
|
|
249
|
-
return { ok: true, data: { started, already_running: already } };
|
|
250
|
-
}
|
|
251
|
-
/** Spawn a single registered daemon by id. Idempotent: a daemon already
|
|
252
|
-
* running returns `started: false`. Unknown id → ok:false. This is what
|
|
253
|
-
* `/remote-pi create` calls so a freshly-registered folder boots its Pi
|
|
254
|
-
* immediately instead of waiting for the next supervisor restart. */
|
|
255
|
-
_opStart(id) {
|
|
256
|
-
const entry = listDaemons().find((d) => d.id === id);
|
|
257
|
-
if (!entry)
|
|
258
|
-
return { ok: false, error: `no daemon with id ${id}` };
|
|
259
|
-
const slot = this.children.get(id);
|
|
260
|
-
if (slot && slot.child.state === "running") {
|
|
261
|
-
return { ok: true, data: { id, state: slot.child.state, started: false } };
|
|
262
|
-
}
|
|
263
|
-
this._spawnEntry(entry.id, entry.cwd, entry.name);
|
|
264
|
-
const state = this.children.get(id)?.child.state ?? "starting";
|
|
265
|
-
return { ok: true, data: { id, state, started: true } };
|
|
266
|
-
}
|
|
267
|
-
async _opStopAll() {
|
|
268
|
-
const stopped = [];
|
|
269
|
-
const already = [];
|
|
270
|
-
for (const [id, slot] of this.children) {
|
|
271
|
-
if (slot.child.state !== "running") {
|
|
272
|
-
already.push(id);
|
|
273
|
-
continue;
|
|
274
|
-
}
|
|
275
|
-
if (slot.restartTimer !== null) {
|
|
276
|
-
clearTimeout(slot.restartTimer);
|
|
277
|
-
slot.restartTimer = null;
|
|
278
|
-
}
|
|
279
|
-
await slot.child.stop();
|
|
280
|
-
stopped.push(id);
|
|
281
|
-
}
|
|
282
|
-
return { ok: true, data: { stopped, already_stopped: already } };
|
|
283
|
-
}
|
|
284
|
-
/** Stop a single registered daemon by id. Idempotent: a daemon that isn't
|
|
285
|
-
* running returns `stopped: false`. Unknown id → ok:false. Mirrors the
|
|
286
|
-
* per-id semantics of `_opStart`. Cancels any pending restart backoff so a
|
|
287
|
-
* deliberate stop stays stopped. */
|
|
288
|
-
async _opStop(id) {
|
|
289
|
-
const entry = listDaemons().find((d) => d.id === id);
|
|
290
|
-
if (!entry)
|
|
291
|
-
return { ok: false, error: `no daemon with id ${id}` };
|
|
292
|
-
const slot = this.children.get(id);
|
|
293
|
-
if (!slot || slot.child.state !== "running") {
|
|
294
|
-
return { ok: true, data: { id, state: slot?.child.state ?? "stopped", stopped: false } };
|
|
295
|
-
}
|
|
296
|
-
if (slot.restartTimer !== null) {
|
|
297
|
-
clearTimeout(slot.restartTimer);
|
|
298
|
-
slot.restartTimer = null;
|
|
299
|
-
}
|
|
300
|
-
await slot.child.stop();
|
|
301
|
-
return { ok: true, data: { id, state: slot.child.state, stopped: true } };
|
|
302
|
-
}
|
|
303
|
-
/** Restart a single registered daemon by id (stop-if-running, then spawn).
|
|
304
|
-
* Unknown id → ok:false. Resets the crash backoff. */
|
|
305
|
-
async _opRestart(id) {
|
|
306
|
-
const entry = listDaemons().find((d) => d.id === id);
|
|
307
|
-
if (!entry)
|
|
308
|
-
return { ok: false, error: `no daemon with id ${id}` };
|
|
309
|
-
const slot = this.children.get(id);
|
|
310
|
-
if (slot && slot.child.state === "running") {
|
|
311
|
-
if (slot.restartTimer !== null) {
|
|
312
|
-
clearTimeout(slot.restartTimer);
|
|
313
|
-
slot.restartTimer = null;
|
|
314
|
-
}
|
|
315
|
-
await slot.child.stop();
|
|
316
|
-
}
|
|
317
|
-
this._spawnEntry(entry.id, entry.cwd, entry.name);
|
|
318
|
-
const state = this.children.get(id)?.child.state ?? "starting";
|
|
319
|
-
return { ok: true, data: { id, state, restarted: true } };
|
|
320
|
-
}
|
|
321
|
-
async _opRestartAll() {
|
|
322
|
-
const stopReply = await this._opStopAll();
|
|
323
|
-
if (!stopReply.ok)
|
|
324
|
-
return stopReply;
|
|
325
|
-
const startReply = this._opStartAll();
|
|
326
|
-
if (!startReply.ok)
|
|
327
|
-
return startReply;
|
|
328
|
-
const restarted = startReply.data.started;
|
|
329
|
-
return { ok: true, data: { restarted } };
|
|
330
|
-
}
|
|
331
|
-
_opSend(id, text) {
|
|
332
|
-
const slot = this.children.get(id);
|
|
333
|
-
if (!slot)
|
|
334
|
-
return { ok: false, error: `daemon ${id} not running` };
|
|
335
|
-
if (slot.child.state !== "running") {
|
|
336
|
-
return { ok: false, error: `daemon ${id} state is ${slot.child.state}` };
|
|
337
|
-
}
|
|
338
|
-
const ok = slot.child.sendPrompt(text);
|
|
339
|
-
return { ok: true, data: { id, delivered: ok } };
|
|
340
|
-
}
|
|
341
|
-
_opRegister(rawCwd) {
|
|
342
|
-
try {
|
|
343
|
-
const { id, cwd } = addDaemon(rawCwd);
|
|
344
|
-
return { ok: true, data: { id, cwd } };
|
|
345
|
-
}
|
|
346
|
-
catch (e) {
|
|
347
|
-
return { ok: false, error: e.message };
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
async _opUnregister(id) {
|
|
351
|
-
// Stop the child first so we don't leave an orphan when the registry
|
|
352
|
-
// entry is gone.
|
|
353
|
-
const slot = this.children.get(id);
|
|
354
|
-
if (slot) {
|
|
355
|
-
if (slot.restartTimer !== null) {
|
|
356
|
-
clearTimeout(slot.restartTimer);
|
|
357
|
-
slot.restartTimer = null;
|
|
358
|
-
}
|
|
359
|
-
await slot.child.stop();
|
|
360
|
-
this.children.delete(id);
|
|
361
|
-
}
|
|
362
|
-
try {
|
|
363
|
-
const result = removeDaemon(id);
|
|
364
|
-
return { ok: true, data: result };
|
|
365
|
-
}
|
|
366
|
-
catch (e) {
|
|
367
|
-
return { ok: false, error: e.message };
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
// ── Cron ops + engine (plan/39) ────────────────────────────────────────────
|
|
371
|
-
_opCronAdd(req) {
|
|
372
|
-
const v = validateSchedule(req.schedule, req.tz);
|
|
373
|
-
if (!v.ok)
|
|
374
|
-
return { ok: false, error: v.error ?? "invalid schedule" };
|
|
375
|
-
const input = { daemon_id: req.daemon_id, schedule: req.schedule, prompt: req.prompt };
|
|
376
|
-
if (req.tz !== undefined)
|
|
377
|
-
input.tz = req.tz;
|
|
378
|
-
if (req.skip_if_busy !== undefined)
|
|
379
|
-
input.skip_if_busy = req.skip_if_busy;
|
|
380
|
-
if (req.wake !== undefined)
|
|
381
|
-
input.wake = req.wake;
|
|
382
|
-
if (req.catchup !== undefined)
|
|
383
|
-
input.catchup = req.catchup;
|
|
384
|
-
const job = addCronJob(input);
|
|
385
|
-
this._scheduleCron(job);
|
|
386
|
-
return { ok: true, data: { job: this._jobView(job) } };
|
|
387
|
-
}
|
|
388
|
-
_opCronList() {
|
|
389
|
-
const jobs = listCronJobs().map((j) => this._jobView(j));
|
|
390
|
-
return { ok: true, data: { jobs } };
|
|
391
|
-
}
|
|
392
|
-
_opCronRemove(jobId) {
|
|
393
|
-
const removed = removeCronJob(jobId);
|
|
394
|
-
this._stopCron(jobId);
|
|
395
|
-
return { ok: true, data: { removed } };
|
|
396
|
-
}
|
|
397
|
-
_opCronEnable(jobId, enabled) {
|
|
398
|
-
const updated = setJobEnabled(jobId, enabled);
|
|
399
|
-
if (updated) {
|
|
400
|
-
this._stopCron(jobId);
|
|
401
|
-
const job = getCronJob(jobId);
|
|
402
|
-
if (enabled && job)
|
|
403
|
-
this._scheduleCron(job);
|
|
404
|
-
}
|
|
405
|
-
return { ok: true, data: { job_id: jobId, enabled, updated } };
|
|
406
|
-
}
|
|
407
|
-
async _opCronRun(jobId) {
|
|
408
|
-
if (!getCronJob(jobId))
|
|
409
|
-
return { ok: false, error: `no cron job with id ${jobId}` };
|
|
410
|
-
const result = await this.fireJob(jobId, { manual: true });
|
|
411
|
-
return { ok: true, data: { job_id: jobId, result } };
|
|
412
|
-
}
|
|
413
|
-
_opCronLog(jobId, tail) {
|
|
414
|
-
const opts = {};
|
|
415
|
-
if (jobId !== undefined)
|
|
416
|
-
opts.jobId = jobId;
|
|
417
|
-
if (tail !== undefined)
|
|
418
|
-
opts.tail = tail;
|
|
419
|
-
return { ok: true, data: { entries: readCronLog(opts) } };
|
|
420
|
-
}
|
|
421
|
-
_jobView(job) {
|
|
422
|
-
const next = nextRunFor(job);
|
|
423
|
-
return { ...job, next_run: next ? next.toISOString() : null };
|
|
424
|
-
}
|
|
425
|
-
/** Rebuild all live `Cron` schedules from the registry (enabled jobs only).
|
|
426
|
-
* Called on start; mutations reconcile incrementally via _scheduleCron/_stopCron. */
|
|
427
|
-
_reconcileCron() {
|
|
428
|
-
for (const c of this.cronJobs.values())
|
|
429
|
-
c.stop();
|
|
430
|
-
this.cronJobs.clear();
|
|
431
|
-
for (const job of listCronJobs()) {
|
|
432
|
-
if (job.enabled)
|
|
433
|
-
this._scheduleCron(job);
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
_scheduleCron(job) {
|
|
437
|
-
this._stopCron(job.id);
|
|
438
|
-
try {
|
|
439
|
-
const opts = job.tz ? { timezone: job.tz, name: job.id } : { name: job.id };
|
|
440
|
-
const cron = new Cron(job.schedule, opts, () => { void this.fireJob(job.id); });
|
|
441
|
-
this.cronJobs.set(job.id, cron);
|
|
442
|
-
}
|
|
443
|
-
catch (e) {
|
|
444
|
-
process.stderr.write(`[remote-pi-supervisord] cron schedule failed for ${job.id}: ${String(e)}\n`);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
_stopCron(jobId) {
|
|
448
|
-
const c = this.cronJobs.get(jobId);
|
|
449
|
-
if (c) {
|
|
450
|
-
c.stop();
|
|
451
|
-
this.cronJobs.delete(jobId);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
/** Detail 2: on start, run a catchup job once if its previous scheduled run
|
|
455
|
-
* was missed while the supervisor was down. Opt-in (`catchup`), at most 1×. */
|
|
456
|
-
_runCatchup() {
|
|
457
|
-
for (const job of listCronJobs()) {
|
|
458
|
-
if (!job.enabled || !job.catchup)
|
|
459
|
-
continue;
|
|
460
|
-
try {
|
|
461
|
-
const cron = new Cron(job.schedule, job.tz ? { timezone: job.tz } : {});
|
|
462
|
-
const prev = cron.previousRun();
|
|
463
|
-
cron.stop();
|
|
464
|
-
if (!prev)
|
|
465
|
-
continue;
|
|
466
|
-
const lastRunMs = job.last_run ? Date.parse(job.last_run) : 0;
|
|
467
|
-
if (prev.getTime() > lastRunMs)
|
|
468
|
-
void this.fireJob(job.id, { manual: true });
|
|
469
|
-
}
|
|
470
|
-
catch { /* skip a malformed schedule */ }
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Fires a cron job: resolves the daemon, decides the action (decideFireAction),
|
|
475
|
-
* acts, and records the outcome — ALWAYS one `last_status` update + one JSONL
|
|
476
|
-
* line, for both fires and skips. Returns the result. `manual` bypasses the
|
|
477
|
-
* disabled-skip (used by `cron run` + catchup).
|
|
478
|
-
*/
|
|
479
|
-
async fireJob(jobId, opts = {}) {
|
|
480
|
-
const job = getCronJob(jobId);
|
|
481
|
-
if (!job)
|
|
482
|
-
return "missing";
|
|
483
|
-
let result;
|
|
484
|
-
if (!job.enabled && !opts.manual) {
|
|
485
|
-
result = "skipped_disabled";
|
|
486
|
-
}
|
|
487
|
-
else {
|
|
488
|
-
const slot = this.children.get(job.daemon_id);
|
|
489
|
-
const running = !!slot && slot.child.state === "running";
|
|
490
|
-
let busy = false;
|
|
491
|
-
if (running && job.skip_if_busy)
|
|
492
|
-
busy = await slot.child.refreshBusy();
|
|
493
|
-
const action = decideFireAction({ running, busy, wake: job.wake, skipIfBusy: job.skip_if_busy });
|
|
494
|
-
if (action === "skip_down") {
|
|
495
|
-
result = "skipped_down";
|
|
496
|
-
}
|
|
497
|
-
else if (action === "skip_busy") {
|
|
498
|
-
result = "skipped_busy";
|
|
499
|
-
}
|
|
500
|
-
else if (action === "wake_and_send") {
|
|
501
|
-
const entry = listDaemons().find((d) => d.id === job.daemon_id);
|
|
502
|
-
if (!entry) {
|
|
503
|
-
result = "skipped_down";
|
|
504
|
-
}
|
|
505
|
-
else {
|
|
506
|
-
this._spawnEntry(entry.id, entry.cwd, entry.name);
|
|
507
|
-
const woke = this.children.get(job.daemon_id);
|
|
508
|
-
result = woke && woke.child.sendPrompt(job.prompt) ? "woke_and_delivered" : "deliver_failed";
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
else {
|
|
512
|
-
result = slot.child.sendPrompt(job.prompt) ? "delivered" : "deliver_failed";
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
const at = new Date().toISOString();
|
|
516
|
-
recordRun(job.id, at, result);
|
|
517
|
-
appendCronLog({ job_id: job.id, daemon_id: job.daemon_id, schedule: job.schedule, result, prompt: job.prompt });
|
|
518
|
-
return result;
|
|
519
|
-
}
|
|
520
|
-
// ── Child lifecycle ──────────────────────────────────────────────────────
|
|
521
|
-
_spawnAllFromRegistry() {
|
|
522
|
-
for (const entry of listDaemons()) {
|
|
523
|
-
this._spawnEntry(entry.id, entry.cwd, entry.name);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
_spawnEntry(id, cwd, name) {
|
|
527
|
-
// Clean up any prior slot (e.g. crashed + waiting for backoff).
|
|
528
|
-
const existing = this.children.get(id);
|
|
529
|
-
if (existing) {
|
|
530
|
-
if (existing.restartTimer !== null)
|
|
531
|
-
clearTimeout(existing.restartTimer);
|
|
532
|
-
// If somehow the child is still alive, stop it first so we don't
|
|
533
|
-
// leak. Fire-and-forget — caller doesn't await.
|
|
534
|
-
if (existing.child.state === "running")
|
|
535
|
-
void existing.child.stop();
|
|
536
|
-
}
|
|
537
|
-
// Build the daemon's config and inject it via REMOTE_PI_DIRECT_CONFIG —
|
|
538
|
-
// no per-cwd config file needed. The daemon scopes by (cwd, name) like any
|
|
539
|
-
// agent (plan/38); relay on.
|
|
540
|
-
const config = {
|
|
541
|
-
agent_name: name ?? defaultAgentName(cwd),
|
|
542
|
-
auto_start_relay: true,
|
|
543
|
-
};
|
|
544
|
-
const childOpts = {
|
|
545
|
-
extensionPath: this.opts.extensionPath,
|
|
546
|
-
cwd,
|
|
547
|
-
config,
|
|
548
|
-
};
|
|
549
|
-
if (this.opts.piBin !== undefined)
|
|
550
|
-
childOpts.piBin = this.opts.piBin;
|
|
551
|
-
const child = new RpcChild(childOpts);
|
|
552
|
-
const slot = { id, cwd, child, restartTimer: null, restartAttempt: 0 };
|
|
553
|
-
this.children.set(id, slot);
|
|
554
|
-
child.on("exit", (evt) => this._onChildExit(id, evt));
|
|
555
|
-
child.spawn();
|
|
556
|
-
}
|
|
557
|
-
_onChildExit(id, evt) {
|
|
558
|
-
if (this.shuttingDown)
|
|
559
|
-
return;
|
|
560
|
-
const slot = this.children.get(id);
|
|
561
|
-
if (!slot)
|
|
562
|
-
return;
|
|
563
|
-
if (!evt.isCrash) {
|
|
564
|
-
// Clean shutdown (e.g. via `stop_all`). Don't auto-restart.
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
if (evt.code === EXIT_DAEMON_FRESH_SESSION) {
|
|
568
|
-
// App-triggered daemon `/new`: this is an intentional recycle, not a
|
|
569
|
-
// crash. Restart immediately and don't burn the crash backoff budget.
|
|
570
|
-
slot.restartAttempt = 0;
|
|
571
|
-
slot.child.noteRestart();
|
|
572
|
-
slot.child.spawn();
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
// Crash: schedule restart with backoff. After exhausting the schedule
|
|
576
|
-
// we give up and stay in `crashed`.
|
|
577
|
-
if (slot.restartAttempt >= RESTART_BACKOFFS_MS.length) {
|
|
578
|
-
process.stderr.write(`[remote-pi-supervisord] giving up restart for ${id} after ${slot.restartAttempt} attempts\n`);
|
|
579
|
-
return;
|
|
580
|
-
}
|
|
581
|
-
const delay = RESTART_BACKOFFS_MS[slot.restartAttempt];
|
|
582
|
-
process.stderr.write(`[remote-pi-supervisord] scheduling restart of ${id} in ${delay}ms (attempt ${slot.restartAttempt + 1})\n`);
|
|
583
|
-
slot.restartTimer = setTimeout(() => {
|
|
584
|
-
slot.restartTimer = null;
|
|
585
|
-
slot.restartAttempt += 1;
|
|
586
|
-
slot.child.noteRestart();
|
|
587
|
-
slot.child.spawn();
|
|
588
|
-
}, delay);
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
/** Test helper: derive id from cwd without going through the registry. */
|
|
592
|
-
export function _idForCwdForTest(cwd) { return daemonIdForCwd(cwd); }
|
|
593
|
-
/** Exported for the bin/supervisord entry + tests to know where the
|
|
594
|
-
* supervisor will bind. */
|
|
595
|
-
export function getSupervisorSockPath() { return supervisorSockPath(); }
|
|
596
|
-
//# sourceMappingURL=supervisor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.js","sourceRoot":"","sources":["../../src/daemon/supervisor.ts"],"names":[],"mappings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CAClB,iDAAiD,EAAE,OAAO,KAAK,eAAe,IAAI,CAAC,cAAc,GAAG,CAAC,KAAK,CAC3G,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,EAAE;YAClC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC,EAAE,KAAK,CAAC,CAAC;IACZ,CAAC;CACF;AAED,0EAA0E;AAC1E,MAAM,UAAU,gBAAgB,CAAC,GAAW,IAAY,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAErF;4BAC4B;AAC5B,MAAM,UAAU,qBAAqB,KAAa,OAAO,kBAAkB,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import type { AskResponseEnrichmentWire, ExtensionUiResponseWire, ServerMessage } from "./protocol/types.js";
|
|
3
|
-
export interface ExtensionUiBridge {
|
|
4
|
-
/** Route an inbound `extension_ui_response` from a peer back to pi-ask. */
|
|
5
|
-
respond(msg: ExtensionUiResponseWire): void;
|
|
6
|
-
/**
|
|
7
|
-
* Requests for flows still awaiting an answer, for `session_sync` to replay.
|
|
8
|
-
*
|
|
9
|
-
* The `started` broadcast fires exactly once. A peer that connects *after*
|
|
10
|
-
* a flow opened never saw it: history replayed, but the interactive frame
|
|
11
|
-
* did not, so the phone showed the ask_user tool call as plain text while
|
|
12
|
-
* the desktop sat blocked on the TUI dialog. Replaying on sync closes that
|
|
13
|
-
* hole — the common real-world case is the agent asking while the app is
|
|
14
|
-
* closed.
|
|
15
|
-
*/
|
|
16
|
-
pendingRequests(): ServerMessage[];
|
|
17
|
-
/** Drop all subscriptions + state (best-effort teardown). */
|
|
18
|
-
dispose(): void;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Wire pi-ask's event contract to the relay's extension_ui_request/response
|
|
22
|
-
* frames. Returns `null` only if the SDK exposes no usable `events` bus (defensive
|
|
23
|
-
* — modern Pi always has one); callers stay null-safe.
|
|
24
|
-
*/
|
|
25
|
-
export declare function createExtensionUiBridge(pi: ExtensionAPI, broadcast: (msg: ServerMessage) => void): ExtensionUiBridge | null;
|
|
26
|
-
export type { AskResponseEnrichmentWire, ExtensionUiResponseWire };
|