@agimon-ai/po-runner 0.0.0-alpha.4 → 0.0.0-alpha.41
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 +49 -14
- package/dist/apiContracts.cjs +44 -1
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts.map +1 -1
- package/dist/apiContracts.mjs +44 -1
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/{bashResult-BVaoDLYO.cjs → bashResult-CxttmwR5.cjs} +7 -6
- package/dist/{bashResult-BVaoDLYO.cjs.map → bashResult-CxttmwR5.cjs.map} +1 -1
- package/dist/{bashResult-DrN6GPsl.mjs → bashResult-sEZrlBz3.mjs} +7 -6
- package/dist/{bashResult-DrN6GPsl.mjs.map → bashResult-sEZrlBz3.mjs.map} +1 -1
- package/dist/{bashRunService-Ci0cGdYO.d.mts → bashRunService-CmdDhaTn.d.mts} +14 -1
- package/dist/bashRunService-CmdDhaTn.d.mts.map +1 -0
- package/dist/{bashRunService-Cl3pYccr.mjs → bashRunService-CmjnipLE.mjs} +19 -10
- package/dist/bashRunService-CmjnipLE.mjs.map +1 -0
- package/dist/{bashRunService-DjOH5kye.cjs → bashRunService-DLpFoP81.cjs} +19 -10
- package/dist/bashRunService-DLpFoP81.cjs.map +1 -0
- package/dist/bashRunService.cjs +1 -1
- package/dist/bashRunService.d.mts +1 -1
- 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-CfNNdq62.cjs +43 -0
- package/dist/bashTool-CfNNdq62.cjs.map +1 -0
- package/dist/bashTool-DRW3lseL.mjs +26 -0
- package/dist/bashTool-DRW3lseL.mjs.map +1 -0
- package/dist/{bashTool-B1EwZLo_.d.mts → bashTool-Dc1ld2E3.d.mts} +3 -9
- package/dist/bashTool-Dc1ld2E3.d.mts.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 +14 -4
- package/dist/bin/cli.cjs.map +1 -1
- package/dist/bin/cli.d.mts.map +1 -1
- package/dist/bin/cli.mjs +13 -3
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/logSink.cjs +2 -2
- package/dist/bin/logSink.cjs.map +1 -1
- package/dist/bin/logSink.mjs +1 -1
- package/dist/bin/logSink.mjs.map +1 -1
- package/dist/bin/runnerHost.cjs +33 -2
- package/dist/bin/runnerHost.cjs.map +1 -1
- package/dist/bin/runnerHost.d.mts.map +1 -1
- package/dist/bin/runnerHost.mjs +33 -2
- package/dist/bin/runnerHost.mjs.map +1 -1
- package/dist/{cliApp-FxCkgDPm.mjs → cliApp-BDJl6JPc.mjs} +67 -15
- package/dist/cliApp-BDJl6JPc.mjs.map +1 -0
- package/dist/{cliApp-BKWS1-Xb.cjs → cliApp-DonQNLT8.cjs} +72 -14
- 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/extensions/mcp.cjs +24 -14
- package/dist/extensions/mcp.cjs.map +1 -1
- package/dist/extensions/mcp.mjs +24 -14
- package/dist/extensions/mcp.mjs.map +1 -1
- package/dist/extensions/native.mjs +679 -302
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/server.cjs +829 -129
- 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 +827 -127
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +551 -539
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/{headless-DowRVi87.cjs → headless-BlgjJiv0.cjs} +51 -29
- package/dist/headless-BlgjJiv0.cjs.map +1 -0
- package/dist/{headless-_n23Auek.mjs → headless-kp9-KBp3.mjs} +51 -29
- package/dist/headless-kp9-KBp3.mjs.map +1 -0
- package/dist/{index-DH2c3JK7.d.mts → index-Bb6212Kv.d.mts} +2 -2
- package/dist/{index-DH2c3JK7.d.mts.map → index-Bb6212Kv.d.mts.map} +1 -1
- package/dist/index-BhS6r6Eq.d.mts +57 -0
- package/dist/index-BhS6r6Eq.d.mts.map +1 -0
- package/dist/index-CpeSnckG.d.mts +45 -0
- package/dist/index-CpeSnckG.d.mts.map +1 -0
- package/dist/{index-DM7yJpMs.d.mts → index-DBQPUAC3.d.mts} +2 -2
- package/dist/index-DBQPUAC3.d.mts.map +1 -0
- package/dist/{index-D-uGNN6u.d.mts → index-W2PLbgCR.d.mts} +2 -2
- package/dist/{index-D-uGNN6u.d.mts.map → index-W2PLbgCR.d.mts.map} +1 -1
- package/dist/{index-7LWoLLQ0.d.mts → index-X9dQdqIu.d.mts} +2 -2
- package/dist/{index-7LWoLLQ0.d.mts.map → index-X9dQdqIu.d.mts.map} +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{launcher-DMNpxB3O.mjs → launcher-CCYsFBM9.mjs} +2 -2
- package/dist/{launcher-DMNpxB3O.mjs.map → launcher-CCYsFBM9.mjs.map} +1 -1
- package/dist/{launcher-CWgRDu1f.cjs → launcher-ZgDdyXpq.cjs} +7 -1
- package/dist/{launcher-CWgRDu1f.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-CHhZ2G_6.cjs → logReader-3RzQjCs4.cjs} +77 -30
- package/dist/logReader-3RzQjCs4.cjs.map +1 -0
- package/dist/{logReader-DVZdmt1X.mjs → logReader-DpO_fcDj.mjs} +77 -30
- package/dist/logReader-DpO_fcDj.mjs.map +1 -0
- package/dist/{logReader-MdW9ffvV.d.mts → logReader-wZC8OH3h.d.mts} +3 -1
- package/dist/{logReader-MdW9ffvV.d.mts.map → logReader-wZC8OH3h.d.mts.map} +1 -1
- package/dist/logReader.cjs +1 -1
- package/dist/logReader.d.mts +2 -2
- package/dist/logReader.mjs +1 -1
- package/dist/responseEnvelope.cjs +2 -2
- package/dist/responseEnvelope.d.mts +3 -3
- package/dist/responseEnvelope.d.mts.map +1 -1
- package/dist/responseEnvelope.mjs +2 -2
- package/dist/{rmuxBackend-Dh0CYVAL.cjs → rmuxBackend-Cod2H85V.cjs} +2 -2
- package/dist/{rmuxBackend-Dh0CYVAL.cjs.map → rmuxBackend-Cod2H85V.cjs.map} +1 -1
- package/dist/rmuxBackend.cjs +1 -1
- package/dist/rmuxBackend.d.mts +1 -1
- package/dist/{rtkProcessor-DSGbM-Cm.cjs → rtkProcessor-xwARIxhe.cjs} +2 -2
- package/dist/{rtkProcessor-DSGbM-Cm.cjs.map → rtkProcessor-xwARIxhe.cjs.map} +1 -1
- package/dist/rtkProcessor.cjs +1 -1
- package/dist/{runnerDependencies-B5fA3aS0.mjs → runnerDependencies-C6K2P-ID.mjs} +9 -9
- package/dist/{runnerDependencies-B5fA3aS0.mjs.map → runnerDependencies-C6K2P-ID.mjs.map} +1 -1
- package/dist/{runnerDependencies-3F8-XTVw.cjs → runnerDependencies-DOY30X-w.cjs} +11 -11
- package/dist/{runnerDependencies-3F8-XTVw.cjs.map → runnerDependencies-DOY30X-w.cjs.map} +1 -1
- 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/{runnerPaths-CuxCXh8X.cjs → runnerPaths-BtrLdLKi.cjs} +53 -32
- package/dist/runnerPaths-BtrLdLKi.cjs.map +1 -0
- package/dist/{runnerPaths-WyPrndMg.mjs → runnerPaths-CycApnrA.mjs} +54 -33
- package/dist/runnerPaths-CycApnrA.mjs.map +1 -0
- package/dist/runnerPaths.cjs +1 -1
- package/dist/runnerPaths.d.mts +8 -6
- package/dist/runnerPaths.d.mts.map +1 -1
- package/dist/runnerPaths.mjs +1 -1
- package/dist/{runnerRegistry-BMowLIXs.mjs → runnerRegistry-1dueuCLq.mjs} +9 -2
- package/dist/{runnerRegistry-BMowLIXs.mjs.map → runnerRegistry-1dueuCLq.mjs.map} +1 -1
- package/dist/{runnerRegistry-CxCY_zOv.cjs → runnerRegistry-DadJ3IeQ.cjs} +32 -1
- package/dist/{runnerRegistry-CxCY_zOv.cjs.map → runnerRegistry-DadJ3IeQ.cjs.map} +1 -1
- package/dist/runnerRegistry.cjs +1 -1
- package/dist/runnerRegistry.d.mts +1 -1
- 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 +14 -1
- package/dist/services/lifeline/client.cjs.map +1 -1
- package/dist/services/lifeline/client.d.mts +3 -0
- package/dist/services/lifeline/client.d.mts.map +1 -1
- package/dist/services/lifeline/client.mjs +14 -2
- package/dist/services/lifeline/client.mjs.map +1 -1
- package/dist/{type-BE-93zfj.d.mts → type-DmfWxPZQ.d.mts} +6 -6
- package/dist/{type-BE-93zfj.d.mts.map → type-DmfWxPZQ.d.mts.map} +1 -1
- package/dist/{type-BJgHBrQK.d.mts → type-aBbDgomk.d.mts} +10 -4
- package/dist/{type-BJgHBrQK.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 +26 -27
- package/skills/po-runner/SKILL.md +32 -14
- package/src/prompts/codemode-how-to-runner/SKILL.md +71 -0
- package/src/prompts/help-how-to-runner/SKILL.md +51 -0
- package/dist/bashRunService-Ci0cGdYO.d.mts.map +0 -1
- package/dist/bashRunService-Cl3pYccr.mjs.map +0 -1
- package/dist/bashRunService-DjOH5kye.cjs.map +0 -1
- package/dist/bashTool-B1EwZLo_.d.mts.map +0 -1
- package/dist/bashTool-BvC3YOgG.mjs +0 -24
- package/dist/bashTool-BvC3YOgG.mjs.map +0 -1
- package/dist/bashTool-euL6zMDl.cjs +0 -41
- package/dist/bashTool-euL6zMDl.cjs.map +0 -1
- package/dist/cliApp-BKWS1-Xb.cjs.map +0 -1
- package/dist/cliApp-FxCkgDPm.mjs.map +0 -1
- package/dist/headless-DowRVi87.cjs.map +0 -1
- package/dist/headless-_n23Auek.mjs.map +0 -1
- package/dist/index-CAHL3DOF.d.mts +0 -12
- package/dist/index-CAHL3DOF.d.mts.map +0 -1
- package/dist/index-DM7yJpMs.d.mts.map +0 -1
- package/dist/lifeline-Bm-bHIjS.mjs +0 -88
- package/dist/lifeline-Bm-bHIjS.mjs.map +0 -1
- package/dist/lifeline-eJdZV0nN.d.mts.map +0 -1
- package/dist/lifeline-m7laIzIP.cjs +0 -98
- package/dist/lifeline-m7laIzIP.cjs.map +0 -1
- package/dist/logFile-CnPKtxPy.cjs +0 -67
- package/dist/logFile-CnPKtxPy.cjs.map +0 -1
- package/dist/logFile-XcDHBwu1.mjs +0 -60
- package/dist/logFile-XcDHBwu1.mjs.map +0 -1
- package/dist/logReader-CHhZ2G_6.cjs.map +0 -1
- package/dist/logReader-DVZdmt1X.mjs.map +0 -1
- package/dist/runnerPaths-CuxCXh8X.cjs.map +0 -1
- package/dist/runnerPaths-WyPrndMg.mjs.map +0 -1
- 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
|
|
|
@@ -40,7 +40,7 @@ it to a named layer to enable it only in selected major modes.
|
|
|
40
40
|
|
|
41
41
|
```json
|
|
42
42
|
{
|
|
43
|
-
"command": "pnpm test",
|
|
43
|
+
"command": ["pnpm test"],
|
|
44
44
|
"timeout": 60
|
|
45
45
|
}
|
|
46
46
|
```
|
|
@@ -49,8 +49,26 @@ 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
|
+
Always pass `command` as an array, including for one command. Dependent commands run 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
|
+
With `interactive: true`, only the last command gets a pseudo terminal. Runner returns control when
|
|
63
|
+
that stage starts; inspect its stage runner ID and logs, then use that ID for input, not the sequence ID.
|
|
64
|
+
Each command gets its own timeout and complete log. The result lists all attempted log paths and only
|
|
65
|
+
the last executed command's trimmed output. Shell state such as `cd` and `export` does not carry
|
|
66
|
+
between entries. Keep repository mutations separate from verification.
|
|
67
|
+
A promoted array remains one supervised sequence, and its next command waits for the current process
|
|
68
|
+
to actually exit. Native sessions receive one aggregate completion; remote MCP callers poll.
|
|
69
|
+
|
|
70
|
+
Runner requires a session identity and host-admitted `PO_SESSION_TEMP_DIR`. Processes, controls, and
|
|
71
|
+
logs remain addressable after transcript compaction because identity is outside model context.
|
|
54
72
|
|
|
55
73
|
### RTK result processing
|
|
56
74
|
|
|
@@ -63,7 +81,22 @@ also returns bounded raw output with a warning and does not change the command e
|
|
|
63
81
|
|
|
64
82
|
## Inspect and control runs
|
|
65
83
|
|
|
66
|
-
|
|
84
|
+
When code mode is available, use its typed `runner` namespace rather than shelling out to the CLI:
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
// discover({ namespace: 'runner' }) shows current signatures.
|
|
88
|
+
return await runner.list();
|
|
89
|
+
return await runner.status({ id: 'returned-id' });
|
|
90
|
+
return await runner.logs({ id: 'returned-id', lines: 100 });
|
|
91
|
+
return await runner.stop({ id: 'unused-id', reason: 'finished' });
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`runner.input` sends interactive input, and `runner.stopAll` stops this session's active work. Reads
|
|
95
|
+
return bounded snapshots, not live streams. Sequence IDs report ordered stages and the guarded final
|
|
96
|
+
result; stage IDs address the actual process logs. Check status before retrying, and distinguish a
|
|
97
|
+
requested cancellation from confirmed termination.
|
|
98
|
+
|
|
99
|
+
Without code mode, the `po-runner` CLI supports:
|
|
67
100
|
|
|
68
101
|
```bash
|
|
69
102
|
po-runner list
|
|
@@ -80,15 +113,17 @@ Stop runs that are no longer required.
|
|
|
80
113
|
|
|
81
114
|
## Storage and limits
|
|
82
115
|
|
|
83
|
-
|
|
116
|
+
All runner files live beneath the session's host-admitted temporary directory: command logs, process
|
|
117
|
+
metadata, sequence manifests, cancellation files, and supervision transport files. Runner does not
|
|
118
|
+
use the artifact folder or a durable agent-directory fallback for session-owned files.
|
|
84
119
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
120
|
+
Session removal, restart, or termination stops its runner processes and removes its runner subtree
|
|
121
|
+
and registry entries. An external observer handles owner hard-kill cleanup. Compaction and ordinary
|
|
122
|
+
activity changes do not remove evidence. Save important deliverables to the session artifact folder.
|
|
88
123
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
124
|
+
Do not pipe or redirect command output to a file, `head`, or `tail`. Runner automatically saves full
|
|
125
|
+
logs and bounds returned output. Inspect saved logs when an excerpt is truncated instead of rerunning
|
|
126
|
+
the command. Result limits and the promotion threshold remain environment-configurable.
|
|
92
127
|
|
|
93
128
|
### Result excerpts
|
|
94
129
|
|
|
@@ -246,7 +281,7 @@ Maintained by [Agimon](https://agimon.ai/about).
|
|
|
246
281
|
|
|
247
282
|
## License
|
|
248
283
|
|
|
249
|
-
|
|
284
|
+
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
285
|
|
|
251
286
|
## Extension lifecycle and source layout
|
|
252
287
|
|
|
@@ -254,4 +289,4 @@ Public capabilities use flat kebab-case subpaths such as `runner-dependencies`,
|
|
|
254
289
|
|
|
255
290
|
### Native session ownership
|
|
256
291
|
|
|
257
|
-
The Po server
|
|
292
|
+
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,
|
|
@@ -73,6 +80,18 @@ const RunnerScreenSchema = typebox.Type.Object({
|
|
|
73
80
|
offset: O(N),
|
|
74
81
|
ended: O(B)
|
|
75
82
|
});
|
|
83
|
+
const RunnerOutputSchema = typebox.Type.Object({
|
|
84
|
+
chunk: typebox.Type.String({ contentEncoding: "base64" }),
|
|
85
|
+
offset: typebox.Type.Integer({
|
|
86
|
+
minimum: 0,
|
|
87
|
+
maximum: Number.MAX_SAFE_INTEGER
|
|
88
|
+
}),
|
|
89
|
+
reset: B,
|
|
90
|
+
generation: O(S),
|
|
91
|
+
exists: B,
|
|
92
|
+
hasMore: B,
|
|
93
|
+
ended: B
|
|
94
|
+
});
|
|
76
95
|
const apiContracts = (0, _agimon_ai_po_core_apiContracts.defineApiContract)({
|
|
77
96
|
version: 1,
|
|
78
97
|
dynamic: [],
|
|
@@ -98,6 +117,30 @@ const apiContracts = (0, _agimon_ai_po_core_apiContracts.defineApiContract)({
|
|
|
98
117
|
})),
|
|
99
118
|
responses: (0, _agimon_ai_po_core_apiContracts.jsonApiResponses)(RunnerLogSchema)
|
|
100
119
|
},
|
|
120
|
+
...["log", "screen"].map((kind) => ({
|
|
121
|
+
id: `runner.${kind}.read`,
|
|
122
|
+
scope: "session",
|
|
123
|
+
basePath: "runner",
|
|
124
|
+
path: `/runners/{runId}/${kind}/read`,
|
|
125
|
+
method: "GET",
|
|
126
|
+
authentication: "owner",
|
|
127
|
+
description: `Read at most 64 KiB of session-owned runner ${kind} bytes as base64. A completed runner remains readable; screen reads require an owned interactive multiplexer pane.`,
|
|
128
|
+
parameters: [{
|
|
129
|
+
name: "from",
|
|
130
|
+
in: "query",
|
|
131
|
+
required: false,
|
|
132
|
+
schema: typebox.Type.Integer({
|
|
133
|
+
minimum: 0,
|
|
134
|
+
maximum: Number.MAX_SAFE_INTEGER
|
|
135
|
+
})
|
|
136
|
+
}, ...kind === "screen" ? [{
|
|
137
|
+
name: "generation",
|
|
138
|
+
in: "query",
|
|
139
|
+
required: false,
|
|
140
|
+
schema: S
|
|
141
|
+
}] : []],
|
|
142
|
+
responses: (0, _agimon_ai_po_core_apiContracts.jsonApiResponses)(RunnerOutputSchema)
|
|
143
|
+
})),
|
|
101
144
|
...["log", "screen"].map((kind) => ({
|
|
102
145
|
id: `runner.${kind}.stream`,
|
|
103
146
|
scope: "session",
|
|
@@ -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 RunnerOutputSchema = Type.Object({\n chunk: Type.String({ contentEncoding: 'base64' }),\n offset: Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }),\n reset: B,\n generation: O(S),\n exists: B,\n hasMore: B,\n ended: B,\n});\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}.read`,\n scope: 'session' as const,\n basePath: 'runner',\n path: `/runners/{runId}/${kind}/read`,\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: `Read at most 64 KiB of session-owned runner ${kind} bytes as base64. A completed runner remains readable; screen reads require an owned interactive multiplexer pane.`,\n parameters: [\n {\n name: 'from',\n in: 'query' as const,\n required: false,\n schema: Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }),\n },\n ...(kind === 'screen' ? [{ name: 'generation', in: 'query' as const, required: false, schema: S }] : []),\n ],\n responses: jsonApiResponses(RunnerOutputSchema),\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":";;;;;;;AAGA,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,QAAQ;AACvB,MAAM,IAAIA,QAAAA,KAAK;AACf,MAAM,YAA8B,WAAgBA,QAAAA,KAAK,MAAM,OAAO,KAAK,UAAUA,QAAAA,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAM,MAAMA,QAAAA,KAAK,OAAO;CACtB,IAAI;CACJ,MAAM;CACN,KAAK;CACL,SAAS;CACT,KAAK;CACL,aAAa;CACb,SAAS,SAAS;EAAC;EAAQ;EAAQ;CAAQ,CAAC;CAC5C,OAAO,SAAS,CAAC,WAAW,WAAW,CAAC;CACxC,UAAU;CACV,WAAW;CACX,SAAS;CACT,MAAM,EACJA,QAAAA,KAAK,OAAO;EACV,QAAQ,SAA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QAAQ,qBAAqB;MAC9E,MAAMF,QAAAA,KAAK,QAAQ,EAAE;KACvB;IACF;IACA,OAAO;KAAE,aAAa;KAAuB,QAAQA,QAAAA,KAAK,OAAO,EAAE,OAAO,EAAE,CAAC;IAAE;GACjF;EACF,EAAE;EACF;GACE,IAAI;GACJ,OAAO;GACP,UAAU;GACV,MAAM;GACN,QAAQ;GACR,gBAAgB;GAChB,aAAa;GACb,MAAM;IACJ,UAAU;IACV,aAAa;IACb,QAAQA,QAAAA,KAAK,OAAO,EAAE,MAAMA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;GAC7D;GACA,YAAA,GAAWE,gCAAAA,iBAAAA,CAAiBF,QAAAA,KAAK,OAAO,EAAE,WAAWA,QAAAA,KAAK,QAAQ,IAAI,EAAE,CAAC,CAAC;EAC5E;CACF;CACA,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,KAAK,WAAW;EAC1D,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;AACJ,CAAC"}
|
|
@@ -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":";;qBAoEa"}
|
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,
|
|
@@ -69,6 +76,18 @@ const RunnerScreenSchema = Type.Object({
|
|
|
69
76
|
offset: O(N),
|
|
70
77
|
ended: O(B)
|
|
71
78
|
});
|
|
79
|
+
const RunnerOutputSchema = Type.Object({
|
|
80
|
+
chunk: Type.String({ contentEncoding: "base64" }),
|
|
81
|
+
offset: Type.Integer({
|
|
82
|
+
minimum: 0,
|
|
83
|
+
maximum: Number.MAX_SAFE_INTEGER
|
|
84
|
+
}),
|
|
85
|
+
reset: B,
|
|
86
|
+
generation: O(S),
|
|
87
|
+
exists: B,
|
|
88
|
+
hasMore: B,
|
|
89
|
+
ended: B
|
|
90
|
+
});
|
|
72
91
|
const apiContracts = defineApiContract({
|
|
73
92
|
version: 1,
|
|
74
93
|
dynamic: [],
|
|
@@ -94,6 +113,30 @@ const apiContracts = defineApiContract({
|
|
|
94
113
|
})),
|
|
95
114
|
responses: jsonApiResponses(RunnerLogSchema)
|
|
96
115
|
},
|
|
116
|
+
...["log", "screen"].map((kind) => ({
|
|
117
|
+
id: `runner.${kind}.read`,
|
|
118
|
+
scope: "session",
|
|
119
|
+
basePath: "runner",
|
|
120
|
+
path: `/runners/{runId}/${kind}/read`,
|
|
121
|
+
method: "GET",
|
|
122
|
+
authentication: "owner",
|
|
123
|
+
description: `Read at most 64 KiB of session-owned runner ${kind} bytes as base64. A completed runner remains readable; screen reads require an owned interactive multiplexer pane.`,
|
|
124
|
+
parameters: [{
|
|
125
|
+
name: "from",
|
|
126
|
+
in: "query",
|
|
127
|
+
required: false,
|
|
128
|
+
schema: Type.Integer({
|
|
129
|
+
minimum: 0,
|
|
130
|
+
maximum: Number.MAX_SAFE_INTEGER
|
|
131
|
+
})
|
|
132
|
+
}, ...kind === "screen" ? [{
|
|
133
|
+
name: "generation",
|
|
134
|
+
in: "query",
|
|
135
|
+
required: false,
|
|
136
|
+
schema: S
|
|
137
|
+
}] : []],
|
|
138
|
+
responses: jsonApiResponses(RunnerOutputSchema)
|
|
139
|
+
})),
|
|
97
140
|
...["log", "screen"].map((kind) => ({
|
|
98
141
|
id: `runner.${kind}.stream`,
|
|
99
142
|
scope: "session",
|
|
@@ -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 RunnerOutputSchema = Type.Object({\n chunk: Type.String({ contentEncoding: 'base64' }),\n offset: Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }),\n reset: B,\n generation: O(S),\n exists: B,\n hasMore: B,\n ended: B,\n});\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}.read`,\n scope: 'session' as const,\n basePath: 'runner',\n path: `/runners/{runId}/${kind}/read`,\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: `Read at most 64 KiB of session-owned runner ${kind} bytes as base64. A completed runner remains readable; screen reads require an owned interactive multiplexer pane.`,\n parameters: [\n {\n name: 'from',\n in: 'query' as const,\n required: false,\n schema: Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }),\n },\n ...(kind === 'screen' ? [{ name: 'generation', in: 'query' as const, required: false, schema: S }] : []),\n ],\n responses: jsonApiResponses(RunnerOutputSchema),\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":";;;AAGA,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,QAAQ;AACvB,MAAM,IAAI,KAAK;AACf,MAAM,YAA8B,WAAgB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IAAO,QAAQ;GAAE,CAAC;GAC/E,WAAW;IACT,OAAO;KACL,aAAa;KACb,aAAa;KACb,QAAQ;KACR,QAAQ;OACL,SAAS,QAAQ,WAAW,WAAW,SAAS,QAAQ,qBAAqB;MAC9E,MAAM,KAAK,QAAQ,EAAE;KACvB;IACF;IACA,OAAO;KAAE,aAAa;KAAuB,QAAQ,KAAK,OAAO,EAAE,OAAO,EAAE,CAAC;IAAE;GACjF;EACF,EAAE;EACF;GACE,IAAI;GACJ,OAAO;GACP,UAAU;GACV,MAAM;GACN,QAAQ;GACR,gBAAgB;GAChB,aAAa;GACb,MAAM;IACJ,UAAU;IACV,aAAa;IACb,QAAQ,KAAK,OAAO,EAAE,MAAM,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;GAC7D;GACA,WAAW,iBAAiB,KAAK,OAAO,EAAE,WAAW,KAAK,QAAQ,IAAI,EAAE,CAAC,CAAC;EAC5E;CACF;CACA,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,KAAK,WAAW;EAC1D,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,EAAE;AACJ,CAAC"}
|
|
@@ -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,
|
|
@@ -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
|