@agimon-ai/po-runner 0.0.0-alpha.3 → 0.0.0-alpha.31
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/LICENSE +149 -21
- package/README.md +59 -26
- package/dist/apiContracts.cjs +8 -1
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts.map +1 -1
- package/dist/apiContracts.mjs +8 -1
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/{bashResult-DNgtahGR.cjs → bashResult-CxttmwR5.cjs} +12 -11
- package/dist/bashResult-CxttmwR5.cjs.map +1 -0
- package/dist/{bashResult-bIVSzoj-.mjs → bashResult-sEZrlBz3.mjs} +12 -11
- package/dist/bashResult-sEZrlBz3.mjs.map +1 -0
- package/dist/{bashRunService-Ci0cGdYO.d.mts → bashRunService-CmdDhaTn.d.mts} +14 -1
- package/dist/bashRunService-CmdDhaTn.d.mts.map +1 -0
- package/dist/{bashRunService-DyqxOSlx.cjs → bashRunService-DGZZGWLL.cjs} +19 -10
- package/dist/bashRunService-DGZZGWLL.cjs.map +1 -0
- package/dist/{bashRunService-CJ02XaAq.mjs → bashRunService-DQeetQzV.mjs} +19 -10
- package/dist/bashRunService-DQeetQzV.mjs.map +1 -0
- package/dist/bashRunService.cjs +1 -1
- package/dist/bashRunService.d.mts +4 -4
- package/dist/bashRunService.d.mts.map +1 -1
- package/dist/bashRunService.mjs +1 -1
- package/dist/bashSchema.cjs +1 -1
- package/dist/bashSchema.d.mts +1 -1
- package/dist/bashSchema.mjs +1 -1
- package/dist/{bashTool-CdgtqVFD.cjs → bashTool-Bahf40vt.cjs} +12 -4
- package/dist/bashTool-Bahf40vt.cjs.map +1 -0
- package/dist/{bashTool-B1EwZLo_.d.mts → bashTool-DAhPY4ID.d.mts} +2 -2
- package/dist/bashTool-DAhPY4ID.d.mts.map +1 -0
- package/dist/{bashTool-C-k7fmyh.mjs → bashTool-gjIKvJQ-.mjs} +12 -4
- package/dist/bashTool-gjIKvJQ-.mjs.map +1 -0
- package/dist/bashTool.cjs +3 -3
- package/dist/bashTool.d.mts +2 -2
- package/dist/bashTool.mjs +3 -3
- package/dist/bin/cli.cjs +17 -7
- package/dist/bin/cli.cjs.map +1 -1
- package/dist/bin/cli.d.mts.map +1 -1
- package/dist/bin/cli.mjs +17 -7
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/logSink.cjs +7 -7
- package/dist/bin/logSink.cjs.map +1 -1
- package/dist/bin/logSink.mjs +7 -7
- package/dist/bin/logSink.mjs.map +1 -1
- package/dist/bin/runnerHost.cjs +36 -5
- package/dist/bin/runnerHost.cjs.map +1 -1
- package/dist/bin/runnerHost.d.mts.map +1 -1
- package/dist/bin/runnerHost.mjs +37 -6
- package/dist/bin/runnerHost.mjs.map +1 -1
- package/dist/{cliApp-v8Z3rMCi.mjs → cliApp-BDJl6JPc.mjs} +71 -19
- package/dist/cliApp-BDJl6JPc.mjs.map +1 -0
- package/dist/{cliApp-Dj9nwaOv.cjs → cliApp-DonQNLT8.cjs} +76 -18
- package/dist/cliApp-DonQNLT8.cjs.map +1 -0
- package/dist/cliApp.cjs +2 -1
- package/dist/cliApp.d.mts +4 -1
- package/dist/cliApp.d.mts.map +1 -1
- package/dist/cliApp.mjs +1 -1
- package/dist/{compaction-4QSUsBxq.cjs → compaction-Cduebib_.cjs} +3 -3
- package/dist/compaction-Cduebib_.cjs.map +1 -0
- package/dist/{compaction-DCw80VZj.mjs → compaction-nNlE6e5I.mjs} +3 -3
- package/dist/compaction-nNlE6e5I.mjs.map +1 -0
- package/dist/compaction.cjs +1 -1
- package/dist/compaction.d.mts +1 -1
- package/dist/compaction.mjs +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/extensions/mcp-ui.mjs.map +1 -1
- package/dist/extensions/mcp.cjs +26 -16
- package/dist/extensions/mcp.cjs.map +1 -1
- package/dist/extensions/mcp.d.mts +1 -1
- package/dist/extensions/mcp.mjs +26 -16
- package/dist/extensions/mcp.mjs.map +1 -1
- package/dist/extensions/native.mjs +553 -261
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/server.cjs +835 -144
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts +2 -2
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +836 -145
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +580 -568
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/{headless-BGYfIlNk.mjs → headless-VzfNzuEv.mjs} +51 -12
- package/dist/headless-VzfNzuEv.mjs.map +1 -0
- package/dist/{headless-CHUsBGhg.cjs → headless-as3Q6ucs.cjs} +51 -12
- package/dist/headless-as3Q6ucs.cjs.map +1 -0
- package/dist/{index-BZL7keVW.d.mts → index-BCCF1sGD.d.mts} +2 -2
- package/dist/{index-BZL7keVW.d.mts.map → index-BCCF1sGD.d.mts.map} +1 -1
- package/dist/{index-DBz0DxnL.d.mts → index-Bb6212Kv.d.mts} +3 -4
- package/dist/index-Bb6212Kv.d.mts.map +1 -0
- package/dist/{index-Dhi8asLH.d.mts → index-COFsd7Mb.d.mts} +4 -4
- package/dist/{index-Dhi8asLH.d.mts.map → index-COFsd7Mb.d.mts.map} +1 -1
- package/dist/index-CpeSnckG.d.mts +45 -0
- package/dist/index-CpeSnckG.d.mts.map +1 -0
- package/dist/index-Df58fJ3b.d.mts +59 -0
- package/dist/index-Df58fJ3b.d.mts.map +1 -0
- package/dist/{index-D9-IXax4.d.mts → index-X9dQdqIu.d.mts} +2 -2
- package/dist/{index-D9-IXax4.d.mts.map → index-X9dQdqIu.d.mts.map} +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +5 -5
- package/dist/{launcher-BDm6-DiQ.mjs → launcher-CCYsFBM9.mjs} +3 -3
- package/dist/{launcher-BDm6-DiQ.mjs.map → launcher-CCYsFBM9.mjs.map} +1 -1
- package/dist/{launcher-SlyE8R3b.cjs → launcher-ZgDdyXpq.cjs} +8 -2
- package/dist/{launcher-SlyE8R3b.cjs.map → launcher-ZgDdyXpq.cjs.map} +1 -1
- package/dist/launcher.cjs +1 -1
- package/dist/launcher.d.mts +2 -2
- package/dist/launcher.mjs +1 -1
- package/dist/{lifeline-eJdZV0nN.d.mts → lifeline-Cg6ywKTy.d.mts} +3 -1
- package/dist/lifeline-Cg6ywKTy.d.mts.map +1 -0
- package/dist/lifeline-DVV46YyP.cjs +155 -0
- package/dist/lifeline-DVV46YyP.cjs.map +1 -0
- package/dist/lifeline-f3r5gJ2S.mjs +146 -0
- package/dist/lifeline-f3r5gJ2S.mjs.map +1 -0
- package/dist/lifeline.cjs +2 -1
- package/dist/lifeline.d.mts +11 -7
- package/dist/lifeline.d.mts.map +1 -1
- package/dist/lifeline.mjs +3 -3
- package/dist/logFile-B7q1w9PP.cjs +46 -0
- package/dist/logFile-B7q1w9PP.cjs.map +1 -0
- package/dist/logFile-pU7zywVI.mjs +39 -0
- package/dist/logFile-pU7zywVI.mjs.map +1 -0
- package/dist/logFile.cjs +1 -1
- package/dist/logFile.d.mts +1 -1
- package/dist/logFile.d.mts.map +1 -1
- package/dist/logFile.mjs +1 -1
- package/dist/{logReader-B6J7L7Ua.cjs → logReader-BEneVvSC.cjs} +4 -4
- package/dist/{logReader-B6J7L7Ua.cjs.map → logReader-BEneVvSC.cjs.map} +1 -1
- package/dist/{logReader-UfbDbwQl.mjs → logReader-D1xSM6uE.mjs} +4 -4
- package/dist/{logReader-UfbDbwQl.mjs.map → logReader-D1xSM6uE.mjs.map} +1 -1
- package/dist/logReader.cjs +1 -1
- package/dist/logReader.mjs +1 -1
- package/dist/{ptyHost-DlQtTB8F.mjs → ptyHost-CwbLLr90.mjs} +2 -2
- package/dist/{ptyHost-DlQtTB8F.mjs.map → ptyHost-CwbLLr90.mjs.map} +1 -1
- package/dist/{ptyHost-MI2Z6WTG.cjs → ptyHost-D35hNmtd.cjs} +2 -2
- package/dist/{ptyHost-MI2Z6WTG.cjs.map → ptyHost-D35hNmtd.cjs.map} +1 -1
- package/dist/ptyHost.cjs +1 -1
- package/dist/ptyHost.mjs +1 -1
- package/dist/{ptySpawner-DEi1KOnd.mjs → ptySpawner-C375NJnj.mjs} +2 -2
- package/dist/ptySpawner-C375NJnj.mjs.map +1 -0
- package/dist/{ptySpawner-ijw0g5_T.cjs → ptySpawner-C39IzbRo.cjs} +2 -2
- package/dist/ptySpawner-C39IzbRo.cjs.map +1 -0
- package/dist/ptySpawner.cjs +1 -1
- package/dist/ptySpawner.d.mts +1 -1
- package/dist/ptySpawner.mjs +1 -1
- package/dist/{reconcile-DMeNSxwn.mjs → reconcile-5cZ11jSD.cjs} +12 -42
- package/dist/reconcile-5cZ11jSD.cjs.map +1 -0
- package/dist/{reconcile-BugwYFbV.cjs → reconcile-wNYQJZF-.mjs} +2 -62
- package/dist/reconcile-wNYQJZF-.mjs.map +1 -0
- package/dist/reconcile.cjs +1 -2
- package/dist/reconcile.d.mts +1 -9
- package/dist/reconcile.d.mts.map +1 -1
- package/dist/reconcile.mjs +1 -1
- package/dist/responseEnvelope.cjs +2 -2
- package/dist/responseEnvelope.d.mts +5 -5
- package/dist/responseEnvelope.d.mts.map +1 -1
- package/dist/responseEnvelope.mjs +2 -2
- package/dist/{rmuxBackend-DlxgqRZ1.cjs → rmuxBackend-Cod2H85V.cjs} +4 -4
- package/dist/rmuxBackend-Cod2H85V.cjs.map +1 -0
- package/dist/{rmuxBackend-DfyQwJrc.mjs → rmuxBackend-rjrVTG6K.mjs} +4 -4
- package/dist/rmuxBackend-rjrVTG6K.mjs.map +1 -0
- package/dist/rmuxBackend.cjs +1 -1
- package/dist/rmuxBackend.d.mts +1 -1
- package/dist/rmuxBackend.mjs +1 -1
- package/dist/{rtkProcessor-B9KPdyzr.mjs → rtkProcessor-Iw9gP5Xp.mjs} +3 -3
- package/dist/rtkProcessor-Iw9gP5Xp.mjs.map +1 -0
- package/dist/{rtkProcessor-Bc4L4o_8.cjs → rtkProcessor-xwARIxhe.cjs} +3 -3
- package/dist/rtkProcessor-xwARIxhe.cjs.map +1 -0
- package/dist/rtkProcessor.cjs +1 -1
- package/dist/rtkProcessor.d.mts +1 -1
- package/dist/rtkProcessor.mjs +1 -1
- package/dist/{runnerConfig-D2tGq5ZM.cjs → runnerConfig-BoLMinlx.cjs} +11 -11
- package/dist/runnerConfig-BoLMinlx.cjs.map +1 -0
- package/dist/{runnerConfig-BjtulXBI.d.mts → runnerConfig-DuWL6TJx.d.mts} +10 -10
- package/dist/{runnerConfig-BjtulXBI.d.mts.map → runnerConfig-DuWL6TJx.d.mts.map} +1 -1
- package/dist/{runnerConfig-BQBlVAXn.mjs → runnerConfig-XXMq4VQA.mjs} +11 -11
- package/dist/runnerConfig-XXMq4VQA.mjs.map +1 -0
- package/dist/{runnerDependencies-KMZigIxB.cjs → runnerDependencies-D7v_k-sz.cjs} +18 -18
- package/dist/runnerDependencies-D7v_k-sz.cjs.map +1 -0
- package/dist/{runnerDependencies-DruByBGS.mjs → runnerDependencies-DRtNq2hj.mjs} +18 -18
- package/dist/runnerDependencies-DRtNq2hj.mjs.map +1 -0
- package/dist/runnerDependencies.cjs +1 -1
- package/dist/runnerDependencies.d.mts +1 -1
- package/dist/runnerDependencies.mjs +1 -1
- package/dist/runnerHost-3zwFVIOh.mjs +149 -0
- package/dist/runnerHost-3zwFVIOh.mjs.map +1 -0
- package/dist/runnerHost-S8lQEowM.cjs +163 -0
- package/dist/runnerHost-S8lQEowM.cjs.map +1 -0
- package/dist/runnerNamer.d.mts +1 -1
- package/dist/{runnerPaths-BTEuzxw0.cjs → runnerPaths-BtrLdLKi.cjs} +58 -55
- package/dist/runnerPaths-BtrLdLKi.cjs.map +1 -0
- package/dist/{runnerPaths-B_dAAeco.mjs → runnerPaths-CycApnrA.mjs} +58 -55
- package/dist/runnerPaths-CycApnrA.mjs.map +1 -0
- package/dist/runnerPaths.cjs +1 -1
- package/dist/runnerPaths.d.mts +8 -8
- package/dist/runnerPaths.d.mts.map +1 -1
- package/dist/runnerPaths.mjs +1 -1
- package/dist/{runnerRegistry-CeOHEjBv.mjs → runnerRegistry-1dueuCLq.mjs} +12 -11
- package/dist/runnerRegistry-1dueuCLq.mjs.map +1 -0
- package/dist/{runnerRegistry-BmkZTJHi.cjs → runnerRegistry-DadJ3IeQ.cjs} +35 -10
- package/dist/runnerRegistry-DadJ3IeQ.cjs.map +1 -0
- package/dist/{runnerRegistry-CtJiD02R.d.mts → runnerRegistry-V-Ocaf4N.d.mts} +1 -3
- package/dist/{runnerRegistry-CtJiD02R.d.mts.map → runnerRegistry-V-Ocaf4N.d.mts.map} +1 -1
- package/dist/runnerRegistry.cjs +1 -1
- package/dist/runnerRegistry.d.mts +2 -2
- package/dist/runnerRegistry.mjs +1 -1
- package/dist/runnerSequence-ZTYgZ_2W.cjs +32 -0
- package/dist/runnerSequence-ZTYgZ_2W.cjs.map +1 -0
- package/dist/runnerSequence-k-_Fd77y.mjs +9 -0
- package/dist/runnerSequence-k-_Fd77y.mjs.map +1 -0
- package/dist/runnerSequenceStore-BtwVilKx.cjs +89 -0
- package/dist/runnerSequenceStore-BtwVilKx.cjs.map +1 -0
- package/dist/runnerSequenceStore-CaY7S_Sd.mjs +76 -0
- package/dist/runnerSequenceStore-CaY7S_Sd.mjs.map +1 -0
- package/dist/services/lifeline/client.cjs +16 -3
- package/dist/services/lifeline/client.cjs.map +1 -1
- package/dist/services/lifeline/client.d.mts +4 -1
- package/dist/services/lifeline/client.d.mts.map +1 -1
- package/dist/services/lifeline/client.mjs +16 -4
- package/dist/services/lifeline/client.mjs.map +1 -1
- package/dist/{session-Chsb_Nh2.mjs → session-BKYnH4R6.mjs} +2 -2
- package/dist/{session-Chsb_Nh2.mjs.map → session-BKYnH4R6.mjs.map} +1 -1
- package/dist/{session-BC43uEyG.cjs → session-BvqzhXZY.cjs} +2 -2
- package/dist/{session-BC43uEyG.cjs.map → session-BvqzhXZY.cjs.map} +1 -1
- package/dist/session.cjs +1 -1
- package/dist/session.mjs +1 -1
- package/dist/{type-C31e1gla.d.mts → type-BrjS0_wq.d.mts} +6 -6
- package/dist/{type-C31e1gla.d.mts.map → type-BrjS0_wq.d.mts.map} +1 -1
- package/dist/{type-BXM03qSw.d.mts → type-aBbDgomk.d.mts} +10 -8
- package/dist/{type-BXM03qSw.d.mts.map → type-aBbDgomk.d.mts.map} +1 -1
- package/dist/types.d.mts +1 -1
- package/llms.txt +2 -1
- package/package.json +29 -33
- package/skills/po-runner/SKILL.md +96 -0
- package/src/prompts/codemode-how-to-runner/SKILL.md +69 -0
- package/src/prompts/help-how-to-runner/SKILL.md +50 -0
- package/dist/bashResult-DNgtahGR.cjs.map +0 -1
- package/dist/bashResult-bIVSzoj-.mjs.map +0 -1
- package/dist/bashRunService-CJ02XaAq.mjs.map +0 -1
- package/dist/bashRunService-Ci0cGdYO.d.mts.map +0 -1
- package/dist/bashRunService-DyqxOSlx.cjs.map +0 -1
- package/dist/bashTool-B1EwZLo_.d.mts.map +0 -1
- package/dist/bashTool-C-k7fmyh.mjs.map +0 -1
- package/dist/bashTool-CdgtqVFD.cjs.map +0 -1
- package/dist/cliApp-Dj9nwaOv.cjs.map +0 -1
- package/dist/cliApp-v8Z3rMCi.mjs.map +0 -1
- package/dist/compaction-4QSUsBxq.cjs.map +0 -1
- package/dist/compaction-DCw80VZj.mjs.map +0 -1
- package/dist/headless-BGYfIlNk.mjs.map +0 -1
- package/dist/headless-CHUsBGhg.cjs.map +0 -1
- package/dist/index-BwB_jTI9.d.mts +0 -12
- package/dist/index-BwB_jTI9.d.mts.map +0 -1
- package/dist/index-DBz0DxnL.d.mts.map +0 -1
- package/dist/lifeline-BZaQA0rm.mjs +0 -88
- package/dist/lifeline-BZaQA0rm.mjs.map +0 -1
- package/dist/lifeline-BuV_erib.cjs +0 -98
- package/dist/lifeline-BuV_erib.cjs.map +0 -1
- package/dist/lifeline-eJdZV0nN.d.mts.map +0 -1
- package/dist/logFile-CNvepZh0.cjs +0 -67
- package/dist/logFile-CNvepZh0.cjs.map +0 -1
- package/dist/logFile-KKPbkC-a.mjs +0 -60
- package/dist/logFile-KKPbkC-a.mjs.map +0 -1
- package/dist/ptySpawner-DEi1KOnd.mjs.map +0 -1
- package/dist/ptySpawner-ijw0g5_T.cjs.map +0 -1
- package/dist/reconcile-BugwYFbV.cjs.map +0 -1
- package/dist/reconcile-DMeNSxwn.mjs.map +0 -1
- package/dist/rmuxBackend-DfyQwJrc.mjs.map +0 -1
- package/dist/rmuxBackend-DlxgqRZ1.cjs.map +0 -1
- package/dist/rtkProcessor-B9KPdyzr.mjs.map +0 -1
- package/dist/rtkProcessor-Bc4L4o_8.cjs.map +0 -1
- package/dist/runnerConfig-BQBlVAXn.mjs.map +0 -1
- package/dist/runnerConfig-D2tGq5ZM.cjs.map +0 -1
- package/dist/runnerDependencies-DruByBGS.mjs.map +0 -1
- package/dist/runnerDependencies-KMZigIxB.cjs.map +0 -1
- package/dist/runnerPaths-BTEuzxw0.cjs.map +0 -1
- package/dist/runnerPaths-B_dAAeco.mjs.map +0 -1
- package/dist/runnerRegistry-BmkZTJHi.cjs.map +0 -1
- package/dist/runnerRegistry-CeOHEjBv.mjs.map +0 -1
- package/skills/doom-runner/SKILL.md +0 -78
- package/src/prompts/po-use-runner/SKILL.md +0 -47
package/LICENSE
CHANGED
|
@@ -1,21 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
2
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
3
|
+
|
|
4
|
+
Parameters
|
|
5
|
+
|
|
6
|
+
Licensor: Agimon Pty Ltd
|
|
7
|
+
Licensed Work: Po, the software in the Po source repository and the
|
|
8
|
+
packages released from it, in each version released by
|
|
9
|
+
the Licensor.
|
|
10
|
+
The Licensed Work is (c) 2026 Agimon Pty Ltd.
|
|
11
|
+
Material identified as third-party in the "Third-party
|
|
12
|
+
components" section at the end of this file or in a
|
|
13
|
+
NOTICE file, and any package or directory whose own
|
|
14
|
+
license file grants a different license, is not part of
|
|
15
|
+
the Licensed Work and remains under its own license.
|
|
16
|
+
Additional Use Grant: You may make production use of the Licensed Work if
|
|
17
|
+
your use is Eligible Use. "Eligible Use" is production use that falls
|
|
18
|
+
within at least one of the following:
|
|
19
|
+
|
|
20
|
+
(a) Personal Use. Use by an individual for their own personal purposes,
|
|
21
|
+
and not on behalf of, or for the benefit of, an employer, client, or
|
|
22
|
+
other Organization. Use by an individual in the course of employment
|
|
23
|
+
or engagement by an Organization is use by that Organization.
|
|
24
|
+
|
|
25
|
+
(b) Small Organization Use. Use by or on behalf of an Organization whose
|
|
26
|
+
Annual Revenue is less than USD 1,000,000.
|
|
27
|
+
|
|
28
|
+
(c) Non-profit, Education and Research Use. Use, regardless of Annual
|
|
29
|
+
Revenue, by (i) an Organization registered or recognized as a
|
|
30
|
+
non-profit or charitable organization under the laws of its
|
|
31
|
+
jurisdiction, for its non-profit purposes; (ii) an accredited school,
|
|
32
|
+
college, or university, for teaching, learning, or academic research;
|
|
33
|
+
or (iii) a publicly funded research institution, for its research.
|
|
34
|
+
|
|
35
|
+
(d) Service Provider Use. Use by a consultant, contractor, agency, or other
|
|
36
|
+
service provider, regardless of its own Annual Revenue, solely to
|
|
37
|
+
build, deploy, host, operate, or support the Licensed Work for a client
|
|
38
|
+
whose own use would be Eligible Use under (a), (b), or (c). A service
|
|
39
|
+
provider's use for its own purposes is Eligible Use only if the service
|
|
40
|
+
provider itself qualifies under (b) or (c).
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Hosted services. Offering the Licensed Work to third parties as a hosted
|
|
44
|
+
or managed service whose primary value is the Licensed Work is Eligible
|
|
45
|
+
Use only if each such third party's own use would be Eligible Use.
|
|
46
|
+
|
|
47
|
+
Definitions. "Organization" means any company, partnership, sole
|
|
48
|
+
proprietorship, trust, association, government body, or other entity, and
|
|
49
|
+
includes an individual acting in a business or professional capacity.
|
|
50
|
+
"Affiliate" means any entity that directly or indirectly controls, is
|
|
51
|
+
controlled by, or is under common control with an Organization, where
|
|
52
|
+
"control" means ownership of more than 50% of the voting interests of an
|
|
53
|
+
entity or the power to direct its management and policies by contract or
|
|
54
|
+
otherwise. "Annual Revenue" means the total gross revenue of an
|
|
55
|
+
Organization and all of its Affiliates combined, from all sources and
|
|
56
|
+
whether or not related to the Licensed Work, for its most recently
|
|
57
|
+
completed fiscal year, or, if it has not completed a fiscal year, for the
|
|
58
|
+
twelve months before the use (or since its formation, if shorter),
|
|
59
|
+
converted into US dollars at the average exchange rate for that period.
|
|
60
|
+
Proceeds of equity or debt financing are not revenue.
|
|
61
|
+
|
|
62
|
+
Threshold. If an Organization stops qualifying under (b), its existing
|
|
63
|
+
production use remains Eligible Use for 90 days after it stops
|
|
64
|
+
qualifying, after which it must obtain a commercial license or stop
|
|
65
|
+
production use. Use that was Eligible Use when it occurred never requires
|
|
66
|
+
a commercial license after the fact.
|
|
67
|
+
Change Date: Four years from the date a version of the Licensed Work
|
|
68
|
+
is first publicly released by the Licensor.
|
|
69
|
+
Change License: Apache License, Version 2.0
|
|
70
|
+
|
|
71
|
+
For information about alternative licensing arrangements for the Licensed
|
|
72
|
+
Work, please visit: https://agimon.ai/licensing
|
|
73
|
+
|
|
74
|
+
Notice
|
|
75
|
+
|
|
76
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
77
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
78
|
+
under an Open Source License, as stated in this License.
|
|
79
|
+
|
|
80
|
+
-----------------------------------------------------------------------------
|
|
81
|
+
|
|
82
|
+
Business Source License 1.1
|
|
83
|
+
|
|
84
|
+
Terms
|
|
85
|
+
|
|
86
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
87
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
88
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
89
|
+
production use.
|
|
90
|
+
|
|
91
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
92
|
+
available distribution of a specific version of the Licensed Work under this
|
|
93
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
94
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
95
|
+
above terminate.
|
|
96
|
+
|
|
97
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
98
|
+
currently in effect as described in this License, you must purchase a
|
|
99
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
100
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
101
|
+
|
|
102
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
103
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
104
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
105
|
+
for each version of the Licensed Work released by Licensor.
|
|
106
|
+
|
|
107
|
+
You must conspicuously display this License on each original or modified copy
|
|
108
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
109
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
110
|
+
License apply to your use of that work.
|
|
111
|
+
|
|
112
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
113
|
+
terminate your rights under this License for the current and all other
|
|
114
|
+
versions of the Licensed Work.
|
|
115
|
+
|
|
116
|
+
This License does not grant you any right in any trademark or logo of
|
|
117
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
118
|
+
Licensor as expressly required by this License).
|
|
119
|
+
|
|
120
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
121
|
+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
122
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
123
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
124
|
+
TITLE.
|
|
125
|
+
|
|
126
|
+
MariaDB hereby grants you permission to use this License’s text to license
|
|
127
|
+
your works, and to refer to it using the trademark “Business Source License”,
|
|
128
|
+
as long as you comply with the Covenants of Licensor below.
|
|
129
|
+
|
|
130
|
+
Covenants of Licensor
|
|
131
|
+
|
|
132
|
+
In consideration of the right to use this License’s text and the “Business
|
|
133
|
+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
|
134
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
135
|
+
|
|
136
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
137
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
138
|
+
where “compatible” means that software provided under the Change License can
|
|
139
|
+
be included in a program with software provided under GPL Version 2.0 or a
|
|
140
|
+
later version. Licensor may specify additional Change Licenses without
|
|
141
|
+
limitation.
|
|
142
|
+
|
|
143
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
144
|
+
impose any additional restriction on the right granted in this License, as
|
|
145
|
+
the Additional Use Grant; or (b) insert the text “None”.
|
|
146
|
+
|
|
147
|
+
3. To specify a Change Date.
|
|
148
|
+
|
|
149
|
+
4. Not to modify this License in any other way.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @agimon-ai/po-runner
|
|
2
2
|
|
|
3
|
-
Supervised shell execution, background process control,
|
|
3
|
+
Supervised shell execution, sequential checks, background process control, complete session-temp logs.
|
|
4
4
|
|
|
5
5
|
Part of the [Po distribution](https://www.npmjs.com/package/@agimon-ai/po).
|
|
6
6
|
|
|
@@ -29,11 +29,11 @@ Panes come from the first backend that answers: bundled RMUX, then `rmux` on PAT
|
|
|
29
29
|
PATH. Only when none is available does a non-interactive command fall back to a supervised
|
|
30
30
|
subprocess, and interactive commands need one of them. A tmux-backed run is supervised by the same
|
|
31
31
|
host process as an RMUX one, so exit metadata and logs behave the same; its session names carry a
|
|
32
|
-
`
|
|
32
|
+
`po-tmux-` prefix rather than `po-runner-`.
|
|
33
33
|
|
|
34
34
|
## Install
|
|
35
35
|
|
|
36
|
-
`po init`
|
|
36
|
+
`po init` include Runner in `default.packages` in `.po/modes.yaml`. Move
|
|
37
37
|
it to a named layer to enable it only in selected major modes.
|
|
38
38
|
|
|
39
39
|
## Use the `bash` tool
|
|
@@ -49,8 +49,24 @@ Commands crossing the promotion threshold move to a supervised runner. The defau
|
|
|
49
49
|
seconds. Set `background: true` to detach immediately, or `interactive: true` only when a command
|
|
50
50
|
needs terminal input.
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
Pass an array to run dependent commands in separate fresh shells, sequentially and fail-fast:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"command": ["pnpm build", "pnpm typecheck", "pnpm lint", "pnpm test"],
|
|
57
|
+
"name": "verification",
|
|
58
|
+
"timeout": 120
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Arrays are noninteractive. Each command gets its own timeout and complete log. The result lists all
|
|
63
|
+
attempted log paths and only the last executed command's trimmed output. Shell state such as `cd` and
|
|
64
|
+
`export` does not carry between entries. Keep repository mutations separate from verification.
|
|
65
|
+
A promoted array remains one supervised sequence, and its next command waits for the current process
|
|
66
|
+
to actually exit. Native sessions receive one aggregate completion; remote MCP callers poll.
|
|
67
|
+
|
|
68
|
+
Runner requires a session identity and host-admitted `PO_SESSION_TEMP_DIR`. Processes, controls, and
|
|
69
|
+
logs remain addressable after transcript compaction because identity is outside model context.
|
|
54
70
|
|
|
55
71
|
### RTK result processing
|
|
56
72
|
|
|
@@ -63,15 +79,30 @@ also returns bounded raw output with a warning and does not change the command e
|
|
|
63
79
|
|
|
64
80
|
## Inspect and control runs
|
|
65
81
|
|
|
66
|
-
|
|
82
|
+
When code mode is available, use its typed `runner` namespace rather than shelling out to the CLI:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
// discover({ namespace: 'runner' }) shows current signatures.
|
|
86
|
+
return await runner.list();
|
|
87
|
+
return await runner.status({ id: 'returned-id' });
|
|
88
|
+
return await runner.logs({ id: 'returned-id', lines: 100 });
|
|
89
|
+
return await runner.stop({ id: 'unused-id', reason: 'finished' });
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`runner.input` sends interactive input, and `runner.stopAll` stops this session's active work. Reads
|
|
93
|
+
return bounded snapshots, not live streams. Sequence IDs report ordered stages and the guarded final
|
|
94
|
+
result; stage IDs address the actual process logs. Check status before retrying, and distinguish a
|
|
95
|
+
requested cancellation from confirmed termination.
|
|
96
|
+
|
|
97
|
+
Without code mode, the `po-runner` CLI supports:
|
|
67
98
|
|
|
68
99
|
```bash
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
100
|
+
po-runner list
|
|
101
|
+
po-runner status <runner-id>
|
|
102
|
+
po-runner logs <runner-id>
|
|
103
|
+
po-runner input <runner-id> --text "y" --enter
|
|
104
|
+
po-runner stop <runner-id>
|
|
105
|
+
po-runner stop-all
|
|
75
106
|
```
|
|
76
107
|
|
|
77
108
|
The `input` command requires a running interactive process backed by RMUX or tmux.
|
|
@@ -80,15 +111,17 @@ Stop runs that are no longer required.
|
|
|
80
111
|
|
|
81
112
|
## Storage and limits
|
|
82
113
|
|
|
83
|
-
|
|
114
|
+
All runner files live beneath the session's host-admitted temporary directory: command logs, process
|
|
115
|
+
metadata, sequence manifests, cancellation files, and supervision transport files. Runner does not
|
|
116
|
+
use the artifact folder or a durable agent-directory fallback for session-owned files.
|
|
84
117
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
118
|
+
Session removal, restart, or termination stops its runner processes and removes its runner subtree
|
|
119
|
+
and registry entries. An external observer handles owner hard-kill cleanup. Compaction and ordinary
|
|
120
|
+
activity changes do not remove evidence. Save important deliverables to the session artifact folder.
|
|
88
121
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
122
|
+
Runner automatically saves complete command output, so do not add redirects just to preserve it.
|
|
123
|
+
Inspect saved logs when an excerpt is truncated instead of rerunning the command. Result limits and
|
|
124
|
+
the promotion threshold remain environment-configurable.
|
|
92
125
|
|
|
93
126
|
### Result excerpts
|
|
94
127
|
|
|
@@ -109,7 +142,7 @@ Compiling 1200 modules...
|
|
|
109
142
|
compiled src/module-599.ts
|
|
110
143
|
Build succeeded in 12.4s
|
|
111
144
|
exit status 0
|
|
112
|
-
Full log: /path/to/run.log (17.0 KB, 604 lines); inspect with
|
|
145
|
+
Full log: /path/to/run.log (17.0 KB, 604 lines); inspect with po-runner logs run-a
|
|
113
146
|
```
|
|
114
147
|
|
|
115
148
|
Three ceilings apply and whichever binds first wins: bytes, lines, and tokens. Tokens are there
|
|
@@ -123,8 +156,8 @@ estimator models how BPE behaves, with punctuation forcing boundaries, natural w
|
|
|
123
156
|
letter-digit runs expensive. Its worst error against `gpt-tokenizer` is a factor of about 1.46
|
|
124
157
|
either way, which is why the byte ceiling stays behind it as the hard bound.
|
|
125
158
|
|
|
126
|
-
`
|
|
127
|
-
`
|
|
159
|
+
`PO_RUNNER_RESULT_MAX_BYTES`, `PO_RUNNER_RESULT_MAX_TOKENS`, and their
|
|
160
|
+
`PO_RUNNER_SUCCESS_*` counterparts move these for one invocation. A pragma overrides all of
|
|
128
161
|
them, which is how one noisy successful command can still ask for the wider result. Raising only
|
|
129
162
|
`maxResultBytes` will not help when the token ceiling is the one binding.
|
|
130
163
|
|
|
@@ -151,7 +184,7 @@ One command that needs a wider result can say so on its first line. The pragma i
|
|
|
151
184
|
so it stays harmless to the command itself:
|
|
152
185
|
|
|
153
186
|
```bash
|
|
154
|
-
# @
|
|
187
|
+
# @po: {"maxResultBytes": 32768, "maxResultTokens": 8192, "maxResultLines": 300}
|
|
155
188
|
pnpm build
|
|
156
189
|
```
|
|
157
190
|
|
|
@@ -186,7 +219,7 @@ retention accordingly.
|
|
|
186
219
|
|
|
187
220
|
The headless Po server shares one heavy-job queue across its sessions. Known
|
|
188
221
|
noninteractive build, test, lint, and typecheck commands acquire a slot before
|
|
189
|
-
launching. The default is two concurrent jobs; set `
|
|
222
|
+
launching. The default is two concurrent jobs; set `PO_RUNNER_MAX_HEAVY_JOBS`
|
|
190
223
|
to a positive integer in the server's environment to change it. The waiting queue
|
|
191
224
|
is bounded to 128 jobs. Cancellation removes queued work without launching it.
|
|
192
225
|
|
|
@@ -246,7 +279,7 @@ Maintained by [Agimon](https://agimon.ai/about).
|
|
|
246
279
|
|
|
247
280
|
## License
|
|
248
281
|
|
|
249
|
-
|
|
282
|
+
Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
|
|
250
283
|
|
|
251
284
|
## Extension lifecycle and source layout
|
|
252
285
|
|
|
@@ -254,4 +287,4 @@ Public capabilities use flat kebab-case subpaths such as `runner-dependencies`,
|
|
|
254
287
|
|
|
255
288
|
### Native session ownership
|
|
256
289
|
|
|
257
|
-
The Po server
|
|
290
|
+
The Po server plugin owns runner startup, history retention, background completion notifications, and successful-compaction recovery. The standalone `po-runner` command remains available. Runner project settings retain the existing headless bridge's trusted-project assumption, validation, and environment-over-project precedence. Optional runner activity toggles do not restart the retained supervisor.
|
package/dist/apiContracts.cjs
CHANGED
|
@@ -50,7 +50,14 @@ const Run = typebox.Type.Object({
|
|
|
50
50
|
finishedAt: S
|
|
51
51
|
}))
|
|
52
52
|
});
|
|
53
|
-
const RunnerPayloadSchema = typebox.Type.Object({
|
|
53
|
+
const RunnerPayloadSchema = typebox.Type.Object({
|
|
54
|
+
runs: typebox.Type.Array(Run),
|
|
55
|
+
sessionDirectory: O(S),
|
|
56
|
+
startFailure: O(typebox.Type.Object({
|
|
57
|
+
id: S,
|
|
58
|
+
message: S
|
|
59
|
+
}))
|
|
60
|
+
});
|
|
54
61
|
const RunnerLogSchema = typebox.Type.Object({
|
|
55
62
|
runId: S,
|
|
56
63
|
running: B,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract","jsonApiResponses"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nconst Run = Type.Object({\n id: S,\n name: S,\n pid: N,\n command: S,\n cwd: S,\n interactive: B,\n backend: literals(['rmux', 'tmux', 'native']),\n state: literals(['running', 'completed']),\n promoted: B,\n startedAt: S,\n logPath: S,\n exit: O(\n Type.Object({\n reason: literals(['completed', 'failed', 'signaled', 'stopped', 'timed_out', 'launcher_error', 'backend_lost']),\n code: Type.Union([N, Type.Null()]),\n signal: Type.Union([S, Type.Null()]),\n terminationReason: O(\n literals([\n 'timeout',\n 'user_stop',\n 'request_cancelled',\n 'parent_session_cleanup',\n 'owner_lost',\n 'external_signal',\n ]),\n ),\n stopReason: O(S),\n finishedAt: S,\n }),\n ),\n});\nexport const RunnerPayloadSchema = Type.Object({
|
|
1
|
+
{"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract","jsonApiResponses"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nconst Run = Type.Object({\n id: S,\n name: S,\n pid: N,\n command: S,\n cwd: S,\n interactive: B,\n backend: literals(['rmux', 'tmux', 'native']),\n state: literals(['running', 'completed']),\n promoted: B,\n startedAt: S,\n logPath: S,\n exit: O(\n Type.Object({\n reason: literals(['completed', 'failed', 'signaled', 'stopped', 'timed_out', 'launcher_error', 'backend_lost']),\n code: Type.Union([N, Type.Null()]),\n signal: Type.Union([S, Type.Null()]),\n terminationReason: O(\n literals([\n 'timeout',\n 'user_stop',\n 'request_cancelled',\n 'parent_session_cleanup',\n 'owner_lost',\n 'external_signal',\n ]),\n ),\n stopReason: O(S),\n finishedAt: S,\n }),\n ),\n});\nexport const RunnerPayloadSchema = Type.Object({\n runs: Type.Array(Run),\n sessionDirectory: O(S),\n startFailure: O(Type.Object({ id: S, message: S })),\n});\nexport const RunnerLogSchema = Type.Object({\n runId: S,\n running: B,\n text: S,\n lineCount: N,\n totalLines: N,\n fileSize: N,\n completeBytes: N,\n path: S,\n exists: B,\n lineNumbers: O(Type.Array(N)),\n});\nexport const RunnerAppendSchema = Type.Object({ lines: Type.Array(S), offset: O(N), ended: O(B) });\nexport const RunnerScreenSchema = Type.Object({ chunk: S, offset: O(N), ended: O(B) });\nexport const apiContracts = defineApiContract({\n version: 1,\n dynamic: [],\n http: [\n {\n id: 'runner.log',\n scope: 'session',\n basePath: 'runner',\n path: '/runners/{runId}/log',\n method: 'GET',\n authentication: 'owner',\n description: 'Read a runner log tail or literal substring search.',\n parameters: ['lines', 'grep', 'ignoreCase', 'contextLines'].map((name) => ({\n name,\n in: 'query',\n required: false,\n schema: S,\n })),\n responses: jsonApiResponses(RunnerLogSchema),\n },\n ...(['log', 'screen'] as const).map((kind) => ({\n id: `runner.${kind}.stream`,\n scope: 'session' as const,\n basePath: 'runner',\n path: `/runners/{runId}/${kind}/stream`,\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: `Follow runner ${kind}. SSE data is JSON; ping events carry empty data.`,\n parameters: [{ name: 'from', in: 'query' as const, required: false, schema: N }],\n responses: {\n '200': {\n description: 'Event stream.',\n contentType: 'text/event-stream',\n schema: S,\n events: {\n [kind === 'log' ? 'append' : 'screen']: kind === 'log' ? RunnerAppendSchema : RunnerScreenSchema,\n ping: Type.Literal(''),\n },\n },\n '404': { description: 'Runner unavailable.', schema: Type.Object({ error: S }) },\n },\n })),\n {\n id: 'runner.input',\n scope: 'session',\n basePath: 'runner',\n path: '/runners/{runId}/screen/input',\n method: 'POST',\n authentication: 'owner',\n description: 'Send text to an interactive runner.',\n body: {\n required: true,\n contentType: 'application/json',\n schema: Type.Object({ text: Type.String({ minLength: 1 }) }),\n },\n responses: jsonApiResponses(Type.Object({ delivered: Type.Literal(true) })),\n },\n ],\n sockets: (['global', 'workspace'] as const).map((scope) => ({\n id: 'runner.channel',\n scope,\n service: 'po.hub',\n member: 'runner_runs',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Runner channel payload in the hub frame payload property.',\n input: RunnerPayloadSchema,\n })),\n});\nexport default apiContracts;\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";;qBA2Da"}
|
package/dist/apiContracts.mjs
CHANGED
|
@@ -46,7 +46,14 @@ const Run = Type.Object({
|
|
|
46
46
|
finishedAt: S
|
|
47
47
|
}))
|
|
48
48
|
});
|
|
49
|
-
const RunnerPayloadSchema = Type.Object({
|
|
49
|
+
const RunnerPayloadSchema = Type.Object({
|
|
50
|
+
runs: Type.Array(Run),
|
|
51
|
+
sessionDirectory: O(S),
|
|
52
|
+
startFailure: O(Type.Object({
|
|
53
|
+
id: S,
|
|
54
|
+
message: S
|
|
55
|
+
}))
|
|
56
|
+
});
|
|
50
57
|
const RunnerLogSchema = Type.Object({
|
|
51
58
|
runId: S,
|
|
52
59
|
running: B,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nconst Run = Type.Object({\n id: S,\n name: S,\n pid: N,\n command: S,\n cwd: S,\n interactive: B,\n backend: literals(['rmux', 'tmux', 'native']),\n state: literals(['running', 'completed']),\n promoted: B,\n startedAt: S,\n logPath: S,\n exit: O(\n Type.Object({\n reason: literals(['completed', 'failed', 'signaled', 'stopped', 'timed_out', 'launcher_error', 'backend_lost']),\n code: Type.Union([N, Type.Null()]),\n signal: Type.Union([S, Type.Null()]),\n terminationReason: O(\n literals([\n 'timeout',\n 'user_stop',\n 'request_cancelled',\n 'parent_session_cleanup',\n 'owner_lost',\n 'external_signal',\n ]),\n ),\n stopReason: O(S),\n finishedAt: S,\n }),\n ),\n});\nexport const RunnerPayloadSchema = Type.Object({
|
|
1
|
+
{"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nconst Run = Type.Object({\n id: S,\n name: S,\n pid: N,\n command: S,\n cwd: S,\n interactive: B,\n backend: literals(['rmux', 'tmux', 'native']),\n state: literals(['running', 'completed']),\n promoted: B,\n startedAt: S,\n logPath: S,\n exit: O(\n Type.Object({\n reason: literals(['completed', 'failed', 'signaled', 'stopped', 'timed_out', 'launcher_error', 'backend_lost']),\n code: Type.Union([N, Type.Null()]),\n signal: Type.Union([S, Type.Null()]),\n terminationReason: O(\n literals([\n 'timeout',\n 'user_stop',\n 'request_cancelled',\n 'parent_session_cleanup',\n 'owner_lost',\n 'external_signal',\n ]),\n ),\n stopReason: O(S),\n finishedAt: S,\n }),\n ),\n});\nexport const RunnerPayloadSchema = Type.Object({\n runs: Type.Array(Run),\n sessionDirectory: O(S),\n startFailure: O(Type.Object({ id: S, message: S })),\n});\nexport const RunnerLogSchema = Type.Object({\n runId: S,\n running: B,\n text: S,\n lineCount: N,\n totalLines: N,\n fileSize: N,\n completeBytes: N,\n path: S,\n exists: B,\n lineNumbers: O(Type.Array(N)),\n});\nexport const RunnerAppendSchema = Type.Object({ lines: Type.Array(S), offset: O(N), ended: O(B) });\nexport const RunnerScreenSchema = Type.Object({ chunk: S, offset: O(N), ended: O(B) });\nexport const apiContracts = defineApiContract({\n version: 1,\n dynamic: [],\n http: [\n {\n id: 'runner.log',\n scope: 'session',\n basePath: 'runner',\n path: '/runners/{runId}/log',\n method: 'GET',\n authentication: 'owner',\n description: 'Read a runner log tail or literal substring search.',\n parameters: ['lines', 'grep', 'ignoreCase', 'contextLines'].map((name) => ({\n name,\n in: 'query',\n required: false,\n schema: S,\n })),\n responses: jsonApiResponses(RunnerLogSchema),\n },\n ...(['log', 'screen'] as const).map((kind) => ({\n id: `runner.${kind}.stream`,\n scope: 'session' as const,\n basePath: 'runner',\n path: `/runners/{runId}/${kind}/stream`,\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: `Follow runner ${kind}. SSE data is JSON; ping events carry empty data.`,\n parameters: [{ name: 'from', in: 'query' as const, required: false, schema: N }],\n responses: {\n '200': {\n description: 'Event stream.',\n contentType: 'text/event-stream',\n schema: S,\n events: {\n [kind === 'log' ? 'append' : 'screen']: kind === 'log' ? RunnerAppendSchema : RunnerScreenSchema,\n ping: Type.Literal(''),\n },\n },\n '404': { description: 'Runner unavailable.', schema: Type.Object({ error: S }) },\n },\n })),\n {\n id: 'runner.input',\n scope: 'session',\n basePath: 'runner',\n path: '/runners/{runId}/screen/input',\n method: 'POST',\n authentication: 'owner',\n description: 'Send text to an interactive runner.',\n body: {\n required: true,\n contentType: 'application/json',\n schema: Type.Object({ text: Type.String({ minLength: 1 }) }),\n },\n responses: jsonApiResponses(Type.Object({ delivered: Type.Literal(true) })),\n },\n ],\n sockets: (['global', 'workspace'] as const).map((scope) => ({\n id: 'runner.channel',\n scope,\n service: 'po.hub',\n member: 'runner_runs',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Runner channel payload in the hub frame payload property.',\n input: RunnerPayloadSchema,\n })),\n});\nexport default apiContracts;\n"],"mappings":"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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_ansiScrub = require("./ansiScrub-D5gpHDch.cjs");
|
|
2
|
-
const require_runnerConfig = require("./runnerConfig-
|
|
2
|
+
const require_runnerConfig = require("./runnerConfig-BoLMinlx.cjs");
|
|
3
3
|
//#region src/constants/bashResult.ts
|
|
4
4
|
const BYTES_PER_KB = 1024;
|
|
5
5
|
const BYTES_PER_MB = 1048576;
|
|
6
|
-
const PRAGMA_PATTERN = /^\s*(?:#|\/\/)\s*@
|
|
6
|
+
const PRAGMA_PATTERN = /^\s*(?:#|\/\/)\s*@po:\s*(\{.*\})\s*$/u;
|
|
7
7
|
const PRAGMA_BYTES_CEILING = 262144;
|
|
8
8
|
const PRAGMA_LINES_CEILING = 5e3;
|
|
9
9
|
const PRAGMA_TOKENS_CEILING = 1e5;
|
|
@@ -134,7 +134,7 @@ function positiveInteger(value) {
|
|
|
134
134
|
return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : void 0;
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
|
-
* Reads `# @
|
|
137
|
+
* Reads `# @po: {"maxResultBytes": 32768}` from the command's first line.
|
|
138
138
|
*
|
|
139
139
|
* The pragma is a shell comment, so it stays harmless if this parse is ever
|
|
140
140
|
* skipped, and it survives verbatim into the log where a wider result can be
|
|
@@ -405,7 +405,7 @@ function composeExcerpt(headSource, tailSource, totalLines, maxLines = require_r
|
|
|
405
405
|
const salvaged = errorBytes > 0 ? renderSalvaged(errors, errorBytes, settings) : [];
|
|
406
406
|
return assembleSides(head, tail, Math.max(0, totalLines - head.count - tail.count), trailingNewline, limitBytes, salvaged);
|
|
407
407
|
}
|
|
408
|
-
/** Applies
|
|
408
|
+
/** Applies Po's line and byte ceilings to text already held in memory. */
|
|
409
409
|
function summarizeText(text, maxLines = require_runnerConfig.getResultMaxLines(), maxBytes = require_runnerConfig.getResultMaxBytes()) {
|
|
410
410
|
const excerpt = boundExcerpt(text, maxLines, maxBytes);
|
|
411
411
|
return {
|
|
@@ -446,7 +446,7 @@ function formatUptime(startedAt, now) {
|
|
|
446
446
|
}
|
|
447
447
|
const PROMOTION_REASONS = {
|
|
448
448
|
requested: "Started in the background",
|
|
449
|
-
threshold: "
|
|
449
|
+
threshold: "Over the background threshold",
|
|
450
450
|
interactive: "Started interactively"
|
|
451
451
|
};
|
|
452
452
|
function completionFailed(result) {
|
|
@@ -464,12 +464,13 @@ const emptyLogSummary = () => ({
|
|
|
464
464
|
lines: 0,
|
|
465
465
|
tailLines: 0
|
|
466
466
|
});
|
|
467
|
-
function formatRunResult(result, budget = {}, summarizeLog = emptyLogSummary, settings, environment = process.env) {
|
|
467
|
+
function formatRunResult(result, budget = {}, summarizeLog = emptyLogSummary, settings, environment = process.env, throwOnFailure = true) {
|
|
468
468
|
if (result.kind === "failed") throw new Error([`Could not start runner "${result.name}": ${result.error}`, "Next: correct the reported launch or supervision problem. Retry only after changing the command or environment."].join("\n"));
|
|
469
469
|
if (result.kind === "promoted") return textResult([
|
|
470
|
-
`${PROMOTION_REASONS[result.reason]}: runner "${result.name}" (${result.id}).`,
|
|
470
|
+
`${PROMOTION_REASONS[result.reason]}: runner "${result.name}" (${result.id}) is running in the background.`,
|
|
471
|
+
"Its exit is reported here when it finishes; no need to poll.",
|
|
471
472
|
`Streaming log: ${result.logPath}`,
|
|
472
|
-
`
|
|
473
|
+
`Status: po-runner logs ${result.id}`
|
|
473
474
|
].join("\n"), {
|
|
474
475
|
id: result.id,
|
|
475
476
|
runner: result.name,
|
|
@@ -516,7 +517,7 @@ function formatRunResult(result, budget = {}, summarizeLog = emptyLogSummary, se
|
|
|
516
517
|
if (result.rtkWarning) textLines.push(result.rtkWarning);
|
|
517
518
|
if (truncated) {
|
|
518
519
|
const label = result.rtkOutput ? "Complete raw log" : "Full log";
|
|
519
|
-
textLines.push(`${label}: ${result.logPath} (${formatSize(log.bytes)}, ${log.lines.toLocaleString("en-US")} lines); inspect with
|
|
520
|
+
textLines.push(`${label}: ${result.logPath} (${formatSize(log.bytes)}, ${log.lines.toLocaleString("en-US")} lines); inspect with po-runner logs ${result.id}`);
|
|
520
521
|
} else if (failed && plainTail.length === 0) textLines.push(`Log: ${result.logPath}`, "Next: run one read-only diagnostic; retry only after correcting the cause.");
|
|
521
522
|
const text = boundResultText(textLines.join("\n"), maxBytes, settings, settings === void 0 ? void 0 : maxTokens);
|
|
522
523
|
const details = {
|
|
@@ -537,7 +538,7 @@ function formatRunResult(result, budget = {}, summarizeLog = emptyLogSummary, se
|
|
|
537
538
|
...result.rtkWarning ? { rtkWarning: result.rtkWarning } : {},
|
|
538
539
|
...result.timedOut ? { timedOut: true } : {}
|
|
539
540
|
};
|
|
540
|
-
if (failed) throw new Error(text);
|
|
541
|
+
if (failed && throwOnFailure) throw new Error(text);
|
|
541
542
|
return textResult(text, details);
|
|
542
543
|
}
|
|
543
544
|
//#endregion
|
|
@@ -626,4 +627,4 @@ Object.defineProperty(exports, "textResult", {
|
|
|
626
627
|
}
|
|
627
628
|
});
|
|
628
629
|
|
|
629
|
-
//# sourceMappingURL=bashResult-
|
|
630
|
+
//# sourceMappingURL=bashResult-CxttmwR5.cjs.map
|