@1agents/acp-service 0.8.3 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -13
- package/dist/bin/a2a.js +16 -4
- package/dist/bin/acp-service.js +30 -0
- package/dist/bin/process.d.ts +4 -0
- package/dist/bin/process.js +57 -0
- package/dist/bin/roles.d.ts +1 -0
- package/dist/bin/roles.js +24 -0
- package/dist/bin/rsi.d.ts +3 -0
- package/dist/bin/rsi.js +114 -0
- package/dist/bin/ticket.d.ts +13 -0
- package/dist/bin/ticket.js +97 -0
- package/dist/bin/trail.d.ts +4 -0
- package/dist/bin/trail.js +62 -0
- package/dist/src/a2a/artifact-content.d.ts +9 -0
- package/dist/src/a2a/artifact-content.js +45 -0
- package/dist/src/a2a/desktop-notify.d.ts +1 -0
- package/dist/src/a2a/desktop-notify.js +12 -0
- package/dist/src/a2a/execution-binding.d.ts +9 -0
- package/dist/src/a2a/execution-binding.js +19 -0
- package/dist/src/a2a/executor.d.ts +22 -1
- package/dist/src/a2a/executor.js +308 -22
- package/dist/src/a2a/gateway.d.ts +613 -1
- package/dist/src/a2a/gateway.js +1337 -88
- package/dist/src/a2a/index.d.ts +14 -1
- package/dist/src/a2a/index.js +8 -0
- package/dist/src/a2a/job-directory.d.ts +6 -0
- package/dist/src/a2a/job-directory.js +19 -0
- package/dist/src/a2a/preflight.js +16 -1
- package/dist/src/a2a/resubmit.d.ts +46 -0
- package/dist/src/a2a/resubmit.js +82 -0
- package/dist/src/a2a/result-metadata.d.ts +6 -0
- package/dist/src/a2a/result-metadata.js +25 -6
- package/dist/src/a2a/server.d.ts +10 -0
- package/dist/src/a2a/server.js +127 -2
- package/dist/src/a2a/session-lifecycle.d.ts +40 -0
- package/dist/src/a2a/session-lifecycle.js +54 -0
- package/dist/src/a2a/store.d.ts +4 -0
- package/dist/src/a2a/store.js +76 -1
- package/dist/src/a2a/types.d.ts +77 -1
- package/dist/src/a2a/types.js +11 -1
- package/dist/src/a2a/workbench-ui.d.ts +28 -0
- package/dist/src/a2a/workbench-ui.js +182 -0
- package/dist/src/acp-connection.js +119 -14
- package/dist/src/bridge.d.ts +1 -0
- package/dist/src/bridge.js +312 -37
- package/dist/src/capacity-lifecycle.d.ts +5 -0
- package/dist/src/capacity-lifecycle.js +57 -0
- package/dist/src/capacity-queue.d.ts +58 -0
- package/dist/src/capacity-queue.js +388 -0
- package/dist/src/capacity.d.ts +101 -0
- package/dist/src/capacity.js +416 -0
- package/dist/src/dsh.js +1 -1
- package/dist/src/execution/agent-files.d.ts +25 -0
- package/dist/src/execution/agent-files.js +90 -0
- package/dist/src/execution/agent-registry.d.ts +164 -0
- package/dist/src/execution/agent-registry.js +275 -0
- package/dist/src/execution/human-review.d.ts +105 -0
- package/dist/src/execution/human-review.js +89 -0
- package/dist/src/execution/ledger.d.ts +57 -0
- package/dist/src/execution/ledger.js +122 -13
- package/dist/src/execution/ppt-delivery.d.ts +36 -3
- package/dist/src/execution/ppt-delivery.js +243 -53
- package/dist/src/execution/process-request.d.ts +151 -0
- package/dist/src/execution/process-request.js +177 -0
- package/dist/src/execution/project-discovery.d.ts +56 -0
- package/dist/src/execution/project-discovery.js +429 -0
- package/dist/src/execution/report-review.d.ts +60 -0
- package/dist/src/execution/report-review.js +173 -0
- package/dist/src/execution/targets.d.ts +20 -0
- package/dist/src/execution/targets.js +23 -3
- package/dist/src/execution/ticket-executor.d.ts +25 -0
- package/dist/src/execution/ticket-executor.js +27 -0
- package/dist/src/execution/ticket.d.ts +326 -0
- package/dist/src/execution/ticket.js +301 -0
- package/dist/src/execution/workbench-chat.d.ts +25 -0
- package/dist/src/execution/workbench-chat.js +54 -0
- package/dist/src/execution/workbench.d.ts +162 -0
- package/dist/src/execution/workbench.js +356 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +3 -0
- package/dist/src/roles/index.d.ts +1 -0
- package/dist/src/roles/index.js +1 -0
- package/dist/src/roles/skills.d.ts +71 -0
- package/dist/src/roles/skills.js +427 -0
- package/dist/src/rsi/gate.d.ts +25 -0
- package/dist/src/rsi/gate.js +59 -0
- package/dist/src/rsi/outline-run.d.ts +107 -0
- package/dist/src/rsi/outline-run.js +443 -0
- package/dist/workbench-ui/app.css +453 -0
- package/dist/workbench-ui/app.js +13 -0
- package/dist/workbench-ui/chunk-23JHGYT3.js +1 -0
- package/dist/workbench-ui/chunk-3H6STGPV.js +1 -0
- package/dist/workbench-ui/chunk-3SNBBMGH.js +1 -0
- package/dist/workbench-ui/chunk-3XJZ6DIE.js +1 -0
- package/dist/workbench-ui/chunk-44KDLLKJ.js +1 -0
- package/dist/workbench-ui/chunk-46H7FU5Y.js +7 -0
- package/dist/workbench-ui/chunk-4N44QPL7.js +1 -0
- package/dist/workbench-ui/chunk-4YN4BS7I.js +1 -0
- package/dist/workbench-ui/chunk-53EG4IVQ.js +96 -0
- package/dist/workbench-ui/chunk-5FIPUNR4.js +1 -0
- package/dist/workbench-ui/chunk-6DWWYA6G.js +2 -0
- package/dist/workbench-ui/chunk-6FU3T633.js +99 -0
- package/dist/workbench-ui/chunk-6XKIHRA4.js +1 -0
- package/dist/workbench-ui/chunk-7GIX43Y5.js +1 -0
- package/dist/workbench-ui/chunk-7Q4WBGX6.js +4 -0
- package/dist/workbench-ui/chunk-A3BQM7HR.js +1 -0
- package/dist/workbench-ui/chunk-AFCFDDOP.js +24 -0
- package/dist/workbench-ui/chunk-AG67EUYD.js +89 -0
- package/dist/workbench-ui/chunk-AGJHMMTN.js +1 -0
- package/dist/workbench-ui/chunk-AO6JUBV6.js +41 -0
- package/dist/workbench-ui/chunk-AUSLTP43.js +72 -0
- package/dist/workbench-ui/chunk-AVZL46TT.js +1 -0
- package/dist/workbench-ui/chunk-AZRIGIV2.js +168 -0
- package/dist/workbench-ui/chunk-B2LIVH37.js +1 -0
- package/dist/workbench-ui/chunk-B7YX5TR5.js +1 -0
- package/dist/workbench-ui/chunk-BCB4X4XX.js +1 -0
- package/dist/workbench-ui/chunk-BCRQUL2A.js +88 -0
- package/dist/workbench-ui/chunk-BI6UHHQP.js +1 -0
- package/dist/workbench-ui/chunk-BLSLQ4AQ.js +120 -0
- package/dist/workbench-ui/chunk-C3QSRS6E.js +1 -0
- package/dist/workbench-ui/chunk-CK7M2PJ3.js +62 -0
- package/dist/workbench-ui/chunk-CM6LZ7TU.js +1 -0
- package/dist/workbench-ui/chunk-CP63H27F.js +36 -0
- package/dist/workbench-ui/chunk-CPUMMIS2.js +70 -0
- package/dist/workbench-ui/chunk-CSEIBI5U.js +2 -0
- package/dist/workbench-ui/chunk-CUS65DKZ.js +161 -0
- package/dist/workbench-ui/chunk-CVQY7TNC.js +1 -0
- package/dist/workbench-ui/chunk-D6S3XBIX.js +106 -0
- package/dist/workbench-ui/chunk-E253Y562.js +1 -0
- package/dist/workbench-ui/chunk-EADDJUDC.js +1 -0
- package/dist/workbench-ui/chunk-EBGJ3YXG.js +206 -0
- package/dist/workbench-ui/chunk-EKPVZ3WY.js +8 -0
- package/dist/workbench-ui/chunk-EQDCEAFY.js +1 -0
- package/dist/workbench-ui/chunk-ES3SSDJY.js +40 -0
- package/dist/workbench-ui/chunk-ESFD2H7N.js +231 -0
- package/dist/workbench-ui/chunk-FVOHPMS6.js +1 -0
- package/dist/workbench-ui/chunk-FXMQAGVT.js +1 -0
- package/dist/workbench-ui/chunk-GGTADRXD.js +24 -0
- package/dist/workbench-ui/chunk-GHIVPGNQ.js +1 -0
- package/dist/workbench-ui/chunk-GLU2YQV2.js +1 -0
- package/dist/workbench-ui/chunk-GOCKBYSM.js +1 -0
- package/dist/workbench-ui/chunk-H2KMMTJB.js +1 -0
- package/dist/workbench-ui/chunk-HGVLDNPP.js +39 -0
- package/dist/workbench-ui/chunk-HSAVC5GY.js +1 -0
- package/dist/workbench-ui/chunk-HSEAD2JH.js +1 -0
- package/dist/workbench-ui/chunk-HSIHOBTY.js +1 -0
- package/dist/workbench-ui/chunk-IZXOKUGG.js +67 -0
- package/dist/workbench-ui/chunk-JFT2LC2T.js +1 -0
- package/dist/workbench-ui/chunk-JHL3ZDYK.js +3 -0
- package/dist/workbench-ui/chunk-JMORLCZG.js +257 -0
- package/dist/workbench-ui/chunk-JR4SIX7A.js +1 -0
- package/dist/workbench-ui/chunk-K23HAGEH.js +30 -0
- package/dist/workbench-ui/chunk-K43JDCBH.js +1 -0
- package/dist/workbench-ui/chunk-KINKFJY7.js +1 -0
- package/dist/workbench-ui/chunk-KKQSA4LI.js +2 -0
- package/dist/workbench-ui/chunk-KOUZX3UX.js +1 -0
- package/dist/workbench-ui/chunk-KR4DRHW2.js +78 -0
- package/dist/workbench-ui/chunk-KT4DJNOR.js +1 -0
- package/dist/workbench-ui/chunk-KTPNKRRZ.js +292 -0
- package/dist/workbench-ui/chunk-LFHIPGSU.js +7 -0
- package/dist/workbench-ui/chunk-LWDL4HZB.js +125 -0
- package/dist/workbench-ui/chunk-MVYC3CY4.js +1 -0
- package/dist/workbench-ui/chunk-NWUPALCY.js +129 -0
- package/dist/workbench-ui/chunk-NY7C662Z.js +1 -0
- package/dist/workbench-ui/chunk-O76WTHWP.js +1 -0
- package/dist/workbench-ui/chunk-OTF7YHRE.js +162 -0
- package/dist/workbench-ui/chunk-P6TKKRKP.js +1 -0
- package/dist/workbench-ui/chunk-PFHOOWV3.js +1 -0
- package/dist/workbench-ui/chunk-PUQLANIM.js +1 -0
- package/dist/workbench-ui/chunk-PZCGBYVO.js +1 -0
- package/dist/workbench-ui/chunk-QOHUZGP4.js +1 -0
- package/dist/workbench-ui/chunk-QSEG3OFF.js +1 -0
- package/dist/workbench-ui/chunk-QYPOXZIA.js +84 -0
- package/dist/workbench-ui/chunk-R6SOF3JC.js +1 -0
- package/dist/workbench-ui/chunk-RCLOYU5F.js +1 -0
- package/dist/workbench-ui/chunk-RSRUP64S.js +1 -0
- package/dist/workbench-ui/chunk-RVAIT6JW.js +1 -0
- package/dist/workbench-ui/chunk-S2CCN3II.js +1 -0
- package/dist/workbench-ui/chunk-S2Q52W46.js +1 -0
- package/dist/workbench-ui/chunk-S2W5THJ5.js +1 -0
- package/dist/workbench-ui/chunk-S6ZQZNOX.js +1 -0
- package/dist/workbench-ui/chunk-S74PLMMS.js +1 -0
- package/dist/workbench-ui/chunk-S7C4HKEY.js +1 -0
- package/dist/workbench-ui/chunk-SDTB3Q65.js +1 -0
- package/dist/workbench-ui/chunk-SLPRGYUV.js +32 -0
- package/dist/workbench-ui/chunk-SQE76S5B.js +1 -0
- package/dist/workbench-ui/chunk-SSDZPVPW.js +1 -0
- package/dist/workbench-ui/chunk-SVI7DGIE.js +1 -0
- package/dist/workbench-ui/chunk-T6QKLZ4H.js +62 -0
- package/dist/workbench-ui/chunk-TJNRPTFL.js +1 -0
- package/dist/workbench-ui/chunk-TP6U4EDH.js +2 -0
- package/dist/workbench-ui/chunk-TYAAT3GQ.js +1 -0
- package/dist/workbench-ui/chunk-U6OCY4ZH.js +1 -0
- package/dist/workbench-ui/chunk-UAN3NLRF.js +1 -0
- package/dist/workbench-ui/chunk-UMLU3FIX.js +1 -0
- package/dist/workbench-ui/chunk-URIY2OTM.js +1 -0
- package/dist/workbench-ui/chunk-V2NUKAA7.js +38 -0
- package/dist/workbench-ui/chunk-V4QLL4TE.js +139 -0
- package/dist/workbench-ui/chunk-VASHXUK4.js +2 -0
- package/dist/workbench-ui/chunk-VJLIWNIU.js +1 -0
- package/dist/workbench-ui/chunk-VQNQFBID.js +1 -0
- package/dist/workbench-ui/chunk-VSIWU7XA.js +3 -0
- package/dist/workbench-ui/chunk-VSJASPUZ.js +321 -0
- package/dist/workbench-ui/chunk-VXPNUNUX.js +3 -0
- package/dist/workbench-ui/chunk-WBKLDCV6.js +1 -0
- package/dist/workbench-ui/chunk-WOKJM3FY.js +1 -0
- package/dist/workbench-ui/chunk-X3U3NA3X.js +34 -0
- package/dist/workbench-ui/chunk-XBYU7M4J.js +1 -0
- package/dist/workbench-ui/chunk-XBZAO4ID.js +10 -0
- package/dist/workbench-ui/chunk-XLLPZ2WO.js +1 -0
- package/dist/workbench-ui/chunk-YFVL4NJL.js +1 -0
- package/dist/workbench-ui/chunk-YRFQENM4.js +1 -0
- package/dist/workbench-ui/chunk-YUADQVB2.js +1 -0
- package/dist/workbench-ui/chunk-Z3TCAKM5.js +1 -0
- package/dist/workbench-ui/chunk-Z6QR6FRE.js +10 -0
- package/dist/workbench-ui/chunk-ZJPSORPP.js +3 -0
- package/dist/workbench-ui/chunk-ZLGCSTR2.js +15 -0
- package/dist/workbench-ui/chunk-ZLR4SG5X.js +1 -0
- package/dist/workbench-ui/chunk-ZND3TTGF.js +1 -0
- package/dist/workbench-ui/chunk-ZOP3ZYH7.js +2 -0
- package/dist/workbench-ui/index.html +14 -0
- package/package.json +23 -8
- package/skills/acp-service/SKILL.md +24 -8
- package/skills/acp-service/references/a2a.md +24 -8
- package/skills/acp-service/references/async-caller.md +48 -0
- package/skills/acp-service/references/dsh.md +2 -0
- package/skills/acp-service/references/roles-and-tasks.md +120 -0
- package/skills/acp-service/scripts/a2a-caller.py +242 -0
- package/skills/rsi-coach/SKILL.md +134 -0
- package/vendor/dsh/README.md +11 -5
- package/vendor/dsh/a2a-executor.d.ts +60 -3
- package/vendor/dsh/a2a-executor.js +208 -18
- package/vendor/dsh/a2a.d.ts +12 -2
- package/vendor/dsh/a2a.js +9 -2
- package/vendor/dsh/adapter.d.ts +61 -2
- package/vendor/dsh/adapter.js +354 -23
- package/vendor/dsh/client.js +67 -11
- package/vendor/dsh/index.js +57 -4
- package/vendor/dsh/native-approvals.d.ts +4 -0
- package/vendor/dsh/native-approvals.js +44 -0
- package/vendor/dsh/preset-route.d.ts +49 -0
- package/vendor/dsh/preset-route.js +51 -0
- package/vendor/dsh/preset.js +10 -3
- package/vendor/dsh/process-admission.d.ts +25 -0
- package/vendor/dsh/process-admission.js +87 -0
- package/vendor/dsh/process-requests.d.ts +57 -0
- package/vendor/dsh/process-requests.js +49 -0
- package/vendor/dsh/review-mcp.d.ts +1 -0
- package/vendor/dsh/review-mcp.js +56 -0
- package/vendor/dsh/review.d.ts +30 -0
- package/vendor/dsh/review.js +149 -0
- package/vendor/dsh/session-settings.d.ts +34 -0
- package/vendor/dsh/session-settings.js +114 -0
- package/vendor/dsh/ticket-spec.d.ts +30 -0
- package/vendor/dsh/ticket-spec.js +10 -0
- package/vendor/dsh/ticket-tools.d.ts +21 -0
- package/vendor/dsh/ticket-tools.js +43 -0
- package/vendor/dsh/workbench.d.ts +18 -0
- package/vendor/dsh/workbench.js +91 -0
- package/vendor/runtime/README.md +6 -4
- package/vendor/runtime/dist/{cli-DeOpE2Xz.js → cli-DXmYwv3U.js} +4 -4
- package/vendor/runtime/dist/{cli-DeOpE2Xz.js.map → cli-DXmYwv3U.js.map} +1 -1
- package/vendor/runtime/dist/cli.js +7 -7
- package/vendor/runtime/dist/client-VQsqcIOJ.d.ts.map +1 -1
- package/vendor/runtime/dist/docs-site/CLI.html +2 -2
- package/vendor/runtime/dist/docs-site/VISION.html +2 -2
- package/vendor/runtime/dist/docs-site/agents.html +2 -2
- package/vendor/runtime/dist/docs-site/compare.html +2 -2
- package/vendor/runtime/dist/docs-site/config.html +2 -2
- package/vendor/runtime/dist/docs-site/custom-agents.html +2 -2
- package/vendor/runtime/dist/docs-site/exit-codes.html +2 -2
- package/vendor/runtime/dist/docs-site/flows.html +2 -2
- package/vendor/runtime/dist/docs-site/index.html +1 -1
- package/vendor/runtime/dist/docs-site/install.html +2 -2
- package/vendor/runtime/dist/docs-site/llms.txt +1 -1
- package/vendor/runtime/dist/docs-site/output-formats.html +2 -2
- package/vendor/runtime/dist/docs-site/permissions.html +2 -2
- package/vendor/runtime/dist/docs-site/prompting.html +2 -2
- package/vendor/runtime/dist/docs-site/quickstart.html +2 -2
- package/vendor/runtime/dist/docs-site/releasing.html +2 -2
- package/vendor/runtime/dist/docs-site/runtime-environment.html +2 -2
- package/vendor/runtime/dist/docs-site/runtime-process-lifecycle.html +3 -2
- package/vendor/runtime/dist/docs-site/safe-errors.html +2 -2
- package/vendor/runtime/dist/docs-site/session-control.html +2 -2
- package/vendor/runtime/dist/docs-site/session-watch.html +2 -2
- package/vendor/runtime/dist/docs-site/sessions.html +2 -2
- package/vendor/runtime/dist/docs-site/shared-sessions.html +2 -2
- package/vendor/runtime/dist/{flows-oaBGn31w.js → flows-DJ17ajbw.js} +3 -3
- package/vendor/runtime/dist/{flows-oaBGn31w.js.map → flows-DJ17ajbw.js.map} +1 -1
- package/vendor/runtime/dist/flows.js +1 -1
- package/vendor/runtime/dist/{invocation-options-CUDEE8vW.js → invocation-options-PBfCgrdi.js} +3 -3
- package/vendor/runtime/dist/{invocation-options-CUDEE8vW.js.map → invocation-options-PBfCgrdi.js.map} +1 -1
- package/vendor/runtime/dist/{output-CFv3jcOQ.js → output-B3MDn7kv.js} +2 -2
- package/vendor/runtime/dist/{output-CFv3jcOQ.js.map → output-B3MDn7kv.js.map} +1 -1
- package/vendor/runtime/dist/{queue-owner-runtime-DvMJiGbP.js → queue-owner-runtime-DXCVngwU.js} +15 -8
- package/vendor/runtime/dist/queue-owner-runtime-DXCVngwU.js.map +1 -0
- package/vendor/runtime/dist/runtime.js +1 -1
- package/vendor/runtime/dist/{session-watch-Di-wIdCH.js → session-watch-DURyCw31.js} +2 -2
- package/vendor/runtime/dist/{session-watch-Di-wIdCH.js.map → session-watch-DURyCw31.js.map} +1 -1
- package/vendor/runtime/package.json +6 -4
- package/vendor/runtime/skills/acpx/SKILL.md +2 -0
- package/vendor/runtime/dist/queue-owner-runtime-DvMJiGbP.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { rt as permissionModeSatisfies } from "./queue-owner-runtime-
|
|
2
|
-
import { C as resolvePermissionMode, S as resolveOutputPolicy, b as resolveAgentInvocation, l as hasExplicitPermissionModeFlag, r as sessionOptionsFromGlobalFlags, t as resolvePermissionPolicyFromFlags, x as resolveGlobalFlags } from "./invocation-options-
|
|
3
|
-
import { c as validateFlowDefinition, h as isDefinedFlow, o as FlowRunner } from "./flows-
|
|
1
|
+
import { rt as permissionModeSatisfies } from "./queue-owner-runtime-DXCVngwU.js";
|
|
2
|
+
import { C as resolvePermissionMode, S as resolveOutputPolicy, b as resolveAgentInvocation, l as hasExplicitPermissionModeFlag, r as sessionOptionsFromGlobalFlags, t as resolvePermissionPolicyFromFlags, x as resolveGlobalFlags } from "./invocation-options-PBfCgrdi.js";
|
|
3
|
+
import { c as validateFlowDefinition, h as isDefinedFlow, o as FlowRunner } from "./flows-DJ17ajbw.js";
|
|
4
4
|
import Module, { register } from "node:module";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import path from "node:path";
|
|
@@ -179,4 +179,4 @@ function printFlowRunResult(result, globalFlags) {
|
|
|
179
179
|
//#endregion
|
|
180
180
|
export { handleFlowRun };
|
|
181
181
|
|
|
182
|
-
//# sourceMappingURL=cli-
|
|
182
|
+
//# sourceMappingURL=cli-DXmYwv3U.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-DeOpE2Xz.js","names":[],"sources":["../src/flows/module-resolution.ts","../src/flows/cli.ts"],"sourcesContent":["import Module, { register } from \"node:module\";\nimport { fileURLToPath } from \"node:url\";\n\ntype ResolveFilename = (\n specifier: string,\n parent: unknown,\n isMain?: boolean,\n options?: unknown,\n) => string;\n\nconst moduleResolver = Module as unknown as { _resolveFilename: ResolveFilename };\nconst resolveFilenameKey = \"_resolveFilename\";\nlet installed = false;\n\n/** Resolve the public flow entrypoint in both ESM and CommonJS dependency graphs. */\nexport function installFlowRuntimeResolution(runtimeUrl: string): void {\n if (installed) {\n return;\n }\n const hook = `\n let runtimeUrl;\n const flowSpecifiers = new Set([\"acpx/flows\", \"@scottzx/1acp/flows\"]);\n export function initialize(data) { runtimeUrl = data.runtimeUrl; }\n export function resolve(specifier, context, nextResolve) {\n return nextResolve(flowSpecifiers.has(specifier) ? runtimeUrl : specifier, context);\n }\n `;\n register(`data:text/javascript,${encodeURIComponent(hook)}`, { data: { runtimeUrl } });\n // Node 22.13 supports ESM hooks but predates synchronous CommonJS hooks.\n const resolve = moduleResolver[resolveFilenameKey];\n const runtimePath = fileURLToPath(runtimeUrl);\n const flowSpecifiers = new Set([\"acpx/flows\", \"@scottzx/1acp/flows\"]);\n moduleResolver[resolveFilenameKey] = function (specifier, parent, isMain, options) {\n return resolve.call(\n this,\n flowSpecifiers.has(specifier) ? runtimePath : specifier,\n parent,\n isMain,\n options,\n );\n };\n installed = true;\n}\n","import { randomUUID } from \"node:crypto\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { InvalidArgumentError, type Command } from \"commander\";\nimport type { ResolvedAcpxConfig } from \"../cli/config.js\";\nimport {\n hasExplicitPermissionModeFlag,\n resolveAgentInvocation,\n resolveGlobalFlags,\n resolveOutputPolicy,\n resolvePermissionMode,\n type GlobalFlags,\n} from \"../cli/flags.js\";\nimport {\n resolvePermissionPolicyFromFlags,\n sessionOptionsFromGlobalFlags,\n} from \"../cli/invocation-options.js\";\nimport { type FlowDefinition, FlowRunner } from \"../flows.js\";\nimport { permissionModeSatisfies } from \"../permissions.js\";\nimport type { PermissionMode } from \"../types.js\";\nimport { isDefinedFlow } from \"./authoring.js\";\nimport { validateFlowDefinition } from \"./graph.js\";\nimport { installFlowRuntimeResolution } from \"./module-resolution.js\";\n\ntype FlowRunFlags = {\n inputJson?: string;\n inputFile?: string;\n defaultAgent?: string;\n};\n\nexport async function handleFlowRun(\n flowFile: string,\n flags: FlowRunFlags,\n command: Command,\n config: ResolvedAcpxConfig,\n): Promise<void> {\n const globalFlags = resolveGlobalFlags(command, config);\n const permissionMode = resolvePermissionMode(globalFlags, config.defaultPermissions);\n const permissionPolicy = await resolvePermissionPolicyFromFlags(globalFlags);\n const outputPolicy = resolveOutputPolicy(globalFlags.format, globalFlags.jsonStrict === true);\n const input = await readFlowInput(flags);\n const flowPath = path.resolve(flowFile);\n const flow = await loadFlowModule(flowPath);\n assertFlowPermissionRequirements(flow, permissionMode, globalFlags);\n\n const runner = new FlowRunner({\n resolveAgent: (profile?: string) => {\n return resolveAgentInvocation(profile ?? flags.defaultAgent, globalFlags, config);\n },\n permissionMode,\n mcpServers: config.mcpServers,\n nonInteractivePermissions: globalFlags.nonInteractivePermissions,\n permissionPolicy,\n authCredentials: config.auth,\n authPolicy: globalFlags.authPolicy,\n fs: globalFlags.fs,\n timeoutMs: globalFlags.timeout,\n ttlMs: globalFlags.ttl,\n verbose: globalFlags.verbose,\n suppressSdkConsoleErrors: outputPolicy.suppressSdkConsoleErrors,\n sessionOptions: sessionOptionsFromGlobalFlags(globalFlags),\n });\n\n const result = await runner.run(flow, input, {\n flowPath,\n });\n\n printFlowRunResult(result, globalFlags);\n}\n\nfunction assertFlowPermissionRequirements(\n flow: FlowDefinition,\n permissionMode: PermissionMode,\n globalFlags: GlobalFlags,\n): void {\n const permissions = flow.permissions;\n if (!permissions) {\n return;\n }\n\n if (permissions.requireExplicitGrant && !hasExplicitPermissionModeFlag(globalFlags)) {\n throw new InvalidArgumentError(\n buildFlowPermissionFailureMessage(flow, permissions.requiredMode, permissions.reason, true),\n );\n }\n\n if (!permissionModeSatisfies(permissionMode, permissions.requiredMode)) {\n throw new InvalidArgumentError(\n buildFlowPermissionFailureMessage(flow, permissions.requiredMode, permissions.reason, false),\n );\n }\n}\n\nfunction buildFlowPermissionFailureMessage(\n flow: FlowDefinition,\n requiredMode: PermissionMode,\n reason?: string,\n explicit = false,\n): string {\n return [\n explicit\n ? `Flow \"${flow.name}\" requires an explicit ${requiredMode} grant.`\n : `Flow \"${flow.name}\" requires permission mode ${requiredMode}.`,\n `Rerun with --${requiredMode}.`,\n ...(reason ? [`Reason: ${reason}`] : []),\n ].join(\" \");\n}\n\nasync function readFlowInput(flags: FlowRunFlags): Promise<unknown> {\n if (flags.inputJson && flags.inputFile) {\n throw new InvalidArgumentError(\"Use only one of --input-json or --input-file\");\n }\n\n if (flags.inputJson) {\n return parseJsonInput(flags.inputJson, \"--input-json\");\n }\n\n if (flags.inputFile) {\n const inputPath = path.resolve(flags.inputFile);\n const payload = await fs.readFile(inputPath, \"utf8\");\n return parseJsonInput(payload, \"--input-file\");\n }\n\n return {};\n}\n\nasync function loadFlowModule(flowPath: string): Promise<FlowDefinition> {\n const extension = path.extname(flowPath).toLowerCase();\n installFlowRuntimeResolution(pathToFileURL(resolveFlowRuntimeImportSpecifier()).href);\n const module = await loadFlowRuntimeModule(pathToFileURL(flowPath).href, extension);\n const candidate = findFlowDefinition(module);\n if (!candidate) {\n throw new Error(\n `Flow module must export default defineFlow({...}) from \"acpx/flows\" (or \"@scottzx/1acp/flows\"): ${flowPath}`,\n );\n }\n validateFlowDefinition(candidate);\n return candidate;\n}\n\nfunction resolveFlowRuntimeImportSpecifier(): string {\n const selfPath = fileURLToPath(import.meta.url);\n let runtimePath: string;\n\n if (selfPath.endsWith(`${path.sep}src${path.sep}flows${path.sep}cli.ts`)) {\n runtimePath = fileURLToPath(new URL(\"../flows.ts\", import.meta.url));\n } else if (selfPath.endsWith(`${path.sep}src${path.sep}flows${path.sep}cli.js`)) {\n runtimePath = fileURLToPath(new URL(\"../flows.js\", import.meta.url));\n } else {\n runtimePath = fileURLToPath(new URL(\"./flows.js\", import.meta.url));\n }\n return runtimePath.replaceAll(path.sep, \"/\");\n}\n\ntype FlowModule = {\n default?: unknown;\n \"module.exports\"?: unknown;\n};\n\nasync function loadFlowRuntimeModule(flowUrl: string, extension: string): Promise<FlowModule> {\n if (extension === \".ts\" || extension === \".tsx\" || extension === \".cts\") {\n const { register } = await import(\"tsx/cjs/api\");\n const loader = register({ namespace: randomUUID() });\n try {\n return loader.require(flowUrl, import.meta.url) as FlowModule;\n } finally {\n loader.unregister();\n }\n }\n\n if (extension === \".mts\") {\n const { register } = await import(\"tsx/esm/api\");\n const loader = register({ namespace: randomUUID() });\n try {\n return (await loader.import(flowUrl, import.meta.url)) as FlowModule;\n } finally {\n await loader.unregister();\n }\n }\n\n return (await import(flowUrl)) as FlowModule;\n}\n\nfunction findFlowDefinition(module: FlowModule): FlowDefinition | null {\n const candidates = [\n module,\n module.default,\n module[\"module.exports\"],\n getNestedDefault(module.default),\n getNestedDefault(module[\"module.exports\"]),\n ];\n\n for (const candidate of candidates) {\n if (isDefinedFlow(candidate)) {\n return candidate;\n }\n }\n\n return null;\n}\n\nfunction getNestedDefault(value: unknown): unknown {\n if (!value || typeof value !== \"object\" || !(\"default\" in value)) {\n return null;\n }\n return (value as { default?: unknown }).default ?? null;\n}\n\nfunction parseJsonInput(raw: string, label: string): unknown {\n try {\n return JSON.parse(raw);\n } catch (error) {\n throw new InvalidArgumentError(\n `${label} must contain valid JSON: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n}\n\nfunction printFlowRunResult(\n result: Awaited<ReturnType<FlowRunner[\"run\"]>>,\n globalFlags: GlobalFlags,\n): void {\n const payload = {\n action: \"flow_run_result\",\n runId: result.state.runId,\n flowName: result.state.flowName,\n runTitle: result.state.runTitle,\n flowPath: result.state.flowPath,\n status: result.state.status,\n currentNode: result.state.currentNode,\n currentNodeType: result.state.currentNodeType,\n currentNodeStartedAt: result.state.currentNodeStartedAt,\n lastHeartbeatAt: result.state.lastHeartbeatAt,\n statusDetail: result.state.statusDetail,\n waitingOn: result.state.waitingOn,\n runDir: result.runDir,\n outputs: result.state.outputs,\n sessionBindings: result.state.sessionBindings,\n };\n\n if (globalFlags.format === \"json\") {\n process.stdout.write(`${JSON.stringify(payload)}\\n`);\n return;\n }\n\n if (globalFlags.format === \"quiet\") {\n process.stdout.write(`${result.state.runId}\\n`);\n return;\n }\n\n process.stdout.write(`runId: ${payload.runId}\\n`);\n process.stdout.write(`flow: ${payload.flowName}\\n`);\n if (payload.runTitle) {\n process.stdout.write(`title: ${payload.runTitle}\\n`);\n }\n process.stdout.write(`status: ${payload.status}\\n`);\n process.stdout.write(`runDir: ${payload.runDir}\\n`);\n if (payload.currentNode) {\n process.stdout.write(`currentNode: ${payload.currentNode}\\n`);\n }\n if (payload.statusDetail) {\n process.stdout.write(`statusDetail: ${payload.statusDetail}\\n`);\n }\n if (payload.waitingOn) {\n process.stdout.write(`waitingOn: ${payload.waitingOn}\\n`);\n }\n process.stdout.write(`${JSON.stringify(payload.outputs, null, 2)}\\n`);\n}\n"],"mappings":";;;;;;;;;;AAUA,MAAM,iBAAiB;AACvB,MAAM,qBAAqB;AAC3B,IAAI,YAAY;;AAGhB,SAAgB,6BAA6B,YAA0B;CACrE,IAAI,WACF;CAUF,SAAS,wBAAwB,mBAAmB;;;;;;;GAAI,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;CAErF,MAAM,UAAU,eAAe;CAC/B,MAAM,cAAc,cAAc,UAAU;CAC5C,MAAM,iCAAiB,IAAI,IAAI,CAAC,cAAc,qBAAqB,CAAC;CACpE,eAAe,sBAAsB,SAAU,WAAW,QAAQ,QAAQ,SAAS;EACjF,OAAO,QAAQ,KACb,MACA,eAAe,IAAI,SAAS,IAAI,cAAc,WAC9C,QACA,QACA,OACF;CACF;CACA,YAAY;AACd;;;ACXA,eAAsB,cACpB,UACA,OACA,SACA,QACe;CACf,MAAM,cAAc,mBAAmB,SAAS,MAAM;CACtD,MAAM,iBAAiB,sBAAsB,aAAa,OAAO,kBAAkB;CACnF,MAAM,mBAAmB,MAAM,iCAAiC,WAAW;CAC3E,MAAM,eAAe,oBAAoB,YAAY,QAAQ,YAAY,eAAe,IAAI;CAC5F,MAAM,QAAQ,MAAM,cAAc,KAAK;CACvC,MAAM,WAAW,KAAK,QAAQ,QAAQ;CACtC,MAAM,OAAO,MAAM,eAAe,QAAQ;CAC1C,iCAAiC,MAAM,gBAAgB,WAAW;CAwBlE,mBAAmB,MAJE,IAlBF,WAAW;EAC5B,eAAe,YAAqB;GAClC,OAAO,uBAAuB,WAAW,MAAM,cAAc,aAAa,MAAM;EAClF;EACA;EACA,YAAY,OAAO;EACnB,2BAA2B,YAAY;EACvC;EACA,iBAAiB,OAAO;EACxB,YAAY,YA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AQ,OAAO,MAAM,WAAW,QAAQ,OAAO,GAAG;CAClD,QAAQ,OAAO,MAAM,WAAW,QAAQ,OAAO,GAAG;CAClD,IAAI,QAAQ,aACV,QAAQ,OAAO,MAAM,gBAAgB,QAAQ,YAAY,GAAG;CAE9D,IAAI,QAAQ,cACV,QAAQ,OAAO,MAAM,iBAAiB,QAAQ,aAAa,GAAG;CAEhE,IAAI,QAAQ,WACV,QAAQ,OAAO,MAAM,cAAc,QAAQ,UAAU,GAAG;CAE1D,QAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,QAAQ,SAAS,MAAM,CAAC,EAAE,GAAG;AACtE"}
|
|
1
|
+
{"version":3,"file":"cli-DXmYwv3U.js","names":[],"sources":["../src/flows/module-resolution.ts","../src/flows/cli.ts"],"sourcesContent":["import Module, { register } from \"node:module\";\nimport { fileURLToPath } from \"node:url\";\n\ntype ResolveFilename = (\n specifier: string,\n parent: unknown,\n isMain?: boolean,\n options?: unknown,\n) => string;\n\nconst moduleResolver = Module as unknown as { _resolveFilename: ResolveFilename };\nconst resolveFilenameKey = \"_resolveFilename\";\nlet installed = false;\n\n/** Resolve the public flow entrypoint in both ESM and CommonJS dependency graphs. */\nexport function installFlowRuntimeResolution(runtimeUrl: string): void {\n if (installed) {\n return;\n }\n const hook = `\n let runtimeUrl;\n const flowSpecifiers = new Set([\"acpx/flows\", \"@scottzx/1acp/flows\"]);\n export function initialize(data) { runtimeUrl = data.runtimeUrl; }\n export function resolve(specifier, context, nextResolve) {\n return nextResolve(flowSpecifiers.has(specifier) ? runtimeUrl : specifier, context);\n }\n `;\n register(`data:text/javascript,${encodeURIComponent(hook)}`, { data: { runtimeUrl } });\n // Node 22.13 supports ESM hooks but predates synchronous CommonJS hooks.\n const resolve = moduleResolver[resolveFilenameKey];\n const runtimePath = fileURLToPath(runtimeUrl);\n const flowSpecifiers = new Set([\"acpx/flows\", \"@scottzx/1acp/flows\"]);\n moduleResolver[resolveFilenameKey] = function (specifier, parent, isMain, options) {\n return resolve.call(\n this,\n flowSpecifiers.has(specifier) ? runtimePath : specifier,\n parent,\n isMain,\n options,\n );\n };\n installed = true;\n}\n","import { randomUUID } from \"node:crypto\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { InvalidArgumentError, type Command } from \"commander\";\nimport type { ResolvedAcpxConfig } from \"../cli/config.js\";\nimport {\n hasExplicitPermissionModeFlag,\n resolveAgentInvocation,\n resolveGlobalFlags,\n resolveOutputPolicy,\n resolvePermissionMode,\n type GlobalFlags,\n} from \"../cli/flags.js\";\nimport {\n resolvePermissionPolicyFromFlags,\n sessionOptionsFromGlobalFlags,\n} from \"../cli/invocation-options.js\";\nimport { type FlowDefinition, FlowRunner } from \"../flows.js\";\nimport { permissionModeSatisfies } from \"../permissions.js\";\nimport type { PermissionMode } from \"../types.js\";\nimport { isDefinedFlow } from \"./authoring.js\";\nimport { validateFlowDefinition } from \"./graph.js\";\nimport { installFlowRuntimeResolution } from \"./module-resolution.js\";\n\ntype FlowRunFlags = {\n inputJson?: string;\n inputFile?: string;\n defaultAgent?: string;\n};\n\nexport async function handleFlowRun(\n flowFile: string,\n flags: FlowRunFlags,\n command: Command,\n config: ResolvedAcpxConfig,\n): Promise<void> {\n const globalFlags = resolveGlobalFlags(command, config);\n const permissionMode = resolvePermissionMode(globalFlags, config.defaultPermissions);\n const permissionPolicy = await resolvePermissionPolicyFromFlags(globalFlags);\n const outputPolicy = resolveOutputPolicy(globalFlags.format, globalFlags.jsonStrict === true);\n const input = await readFlowInput(flags);\n const flowPath = path.resolve(flowFile);\n const flow = await loadFlowModule(flowPath);\n assertFlowPermissionRequirements(flow, permissionMode, globalFlags);\n\n const runner = new FlowRunner({\n resolveAgent: (profile?: string) => {\n return resolveAgentInvocation(profile ?? flags.defaultAgent, globalFlags, config);\n },\n permissionMode,\n mcpServers: config.mcpServers,\n nonInteractivePermissions: globalFlags.nonInteractivePermissions,\n permissionPolicy,\n authCredentials: config.auth,\n authPolicy: globalFlags.authPolicy,\n fs: globalFlags.fs,\n timeoutMs: globalFlags.timeout,\n ttlMs: globalFlags.ttl,\n verbose: globalFlags.verbose,\n suppressSdkConsoleErrors: outputPolicy.suppressSdkConsoleErrors,\n sessionOptions: sessionOptionsFromGlobalFlags(globalFlags),\n });\n\n const result = await runner.run(flow, input, {\n flowPath,\n });\n\n printFlowRunResult(result, globalFlags);\n}\n\nfunction assertFlowPermissionRequirements(\n flow: FlowDefinition,\n permissionMode: PermissionMode,\n globalFlags: GlobalFlags,\n): void {\n const permissions = flow.permissions;\n if (!permissions) {\n return;\n }\n\n if (permissions.requireExplicitGrant && !hasExplicitPermissionModeFlag(globalFlags)) {\n throw new InvalidArgumentError(\n buildFlowPermissionFailureMessage(flow, permissions.requiredMode, permissions.reason, true),\n );\n }\n\n if (!permissionModeSatisfies(permissionMode, permissions.requiredMode)) {\n throw new InvalidArgumentError(\n buildFlowPermissionFailureMessage(flow, permissions.requiredMode, permissions.reason, false),\n );\n }\n}\n\nfunction buildFlowPermissionFailureMessage(\n flow: FlowDefinition,\n requiredMode: PermissionMode,\n reason?: string,\n explicit = false,\n): string {\n return [\n explicit\n ? `Flow \"${flow.name}\" requires an explicit ${requiredMode} grant.`\n : `Flow \"${flow.name}\" requires permission mode ${requiredMode}.`,\n `Rerun with --${requiredMode}.`,\n ...(reason ? [`Reason: ${reason}`] : []),\n ].join(\" \");\n}\n\nasync function readFlowInput(flags: FlowRunFlags): Promise<unknown> {\n if (flags.inputJson && flags.inputFile) {\n throw new InvalidArgumentError(\"Use only one of --input-json or --input-file\");\n }\n\n if (flags.inputJson) {\n return parseJsonInput(flags.inputJson, \"--input-json\");\n }\n\n if (flags.inputFile) {\n const inputPath = path.resolve(flags.inputFile);\n const payload = await fs.readFile(inputPath, \"utf8\");\n return parseJsonInput(payload, \"--input-file\");\n }\n\n return {};\n}\n\nasync function loadFlowModule(flowPath: string): Promise<FlowDefinition> {\n const extension = path.extname(flowPath).toLowerCase();\n installFlowRuntimeResolution(pathToFileURL(resolveFlowRuntimeImportSpecifier()).href);\n const module = await loadFlowRuntimeModule(pathToFileURL(flowPath).href, extension);\n const candidate = findFlowDefinition(module);\n if (!candidate) {\n throw new Error(\n `Flow module must export default defineFlow({...}) from \"acpx/flows\" (or \"@scottzx/1acp/flows\"): ${flowPath}`,\n );\n }\n validateFlowDefinition(candidate);\n return candidate;\n}\n\nfunction resolveFlowRuntimeImportSpecifier(): string {\n const selfPath = fileURLToPath(import.meta.url);\n let runtimePath: string;\n\n if (selfPath.endsWith(`${path.sep}src${path.sep}flows${path.sep}cli.ts`)) {\n runtimePath = fileURLToPath(new URL(\"../flows.ts\", import.meta.url));\n } else if (selfPath.endsWith(`${path.sep}src${path.sep}flows${path.sep}cli.js`)) {\n runtimePath = fileURLToPath(new URL(\"../flows.js\", import.meta.url));\n } else {\n runtimePath = fileURLToPath(new URL(\"./flows.js\", import.meta.url));\n }\n return runtimePath.replaceAll(path.sep, \"/\");\n}\n\ntype FlowModule = {\n default?: unknown;\n \"module.exports\"?: unknown;\n};\n\nasync function loadFlowRuntimeModule(flowUrl: string, extension: string): Promise<FlowModule> {\n if (extension === \".ts\" || extension === \".tsx\" || extension === \".cts\") {\n const { register } = await import(\"tsx/cjs/api\");\n const loader = register({ namespace: randomUUID() });\n try {\n return loader.require(flowUrl, import.meta.url) as FlowModule;\n } finally {\n loader.unregister();\n }\n }\n\n if (extension === \".mts\") {\n const { register } = await import(\"tsx/esm/api\");\n const loader = register({ namespace: randomUUID() });\n try {\n return (await loader.import(flowUrl, import.meta.url)) as FlowModule;\n } finally {\n await loader.unregister();\n }\n }\n\n return (await import(flowUrl)) as FlowModule;\n}\n\nfunction findFlowDefinition(module: FlowModule): FlowDefinition | null {\n const candidates = [\n module,\n module.default,\n module[\"module.exports\"],\n getNestedDefault(module.default),\n getNestedDefault(module[\"module.exports\"]),\n ];\n\n for (const candidate of candidates) {\n if (isDefinedFlow(candidate)) {\n return candidate;\n }\n }\n\n return null;\n}\n\nfunction getNestedDefault(value: unknown): unknown {\n if (!value || typeof value !== \"object\" || !(\"default\" in value)) {\n return null;\n }\n return (value as { default?: unknown }).default ?? null;\n}\n\nfunction parseJsonInput(raw: string, label: string): unknown {\n try {\n return JSON.parse(raw);\n } catch (error) {\n throw new InvalidArgumentError(\n `${label} must contain valid JSON: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n}\n\nfunction printFlowRunResult(\n result: Awaited<ReturnType<FlowRunner[\"run\"]>>,\n globalFlags: GlobalFlags,\n): void {\n const payload = {\n action: \"flow_run_result\",\n runId: result.state.runId,\n flowName: result.state.flowName,\n runTitle: result.state.runTitle,\n flowPath: result.state.flowPath,\n status: result.state.status,\n currentNode: result.state.currentNode,\n currentNodeType: result.state.currentNodeType,\n currentNodeStartedAt: result.state.currentNodeStartedAt,\n lastHeartbeatAt: result.state.lastHeartbeatAt,\n statusDetail: result.state.statusDetail,\n waitingOn: result.state.waitingOn,\n runDir: result.runDir,\n outputs: result.state.outputs,\n sessionBindings: result.state.sessionBindings,\n };\n\n if (globalFlags.format === \"json\") {\n process.stdout.write(`${JSON.stringify(payload)}\\n`);\n return;\n }\n\n if (globalFlags.format === \"quiet\") {\n process.stdout.write(`${result.state.runId}\\n`);\n return;\n }\n\n process.stdout.write(`runId: ${payload.runId}\\n`);\n process.stdout.write(`flow: ${payload.flowName}\\n`);\n if (payload.runTitle) {\n process.stdout.write(`title: ${payload.runTitle}\\n`);\n }\n process.stdout.write(`status: ${payload.status}\\n`);\n process.stdout.write(`runDir: ${payload.runDir}\\n`);\n if (payload.currentNode) {\n process.stdout.write(`currentNode: ${payload.currentNode}\\n`);\n }\n if (payload.statusDetail) {\n process.stdout.write(`statusDetail: ${payload.statusDetail}\\n`);\n }\n if (payload.waitingOn) {\n process.stdout.write(`waitingOn: ${payload.waitingOn}\\n`);\n }\n process.stdout.write(`${JSON.stringify(payload.outputs, null, 2)}\\n`);\n}\n"],"mappings":";;;;;;;;;;AAUA,MA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M,iBAAiB,QAAQ,aAAa,GAAG;CAEhE,IAAI,QAAQ,WACV,QAAQ,OAAO,MAAM,cAAc,QAAQ,UAAU,GAAG;CAE1D,QAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,QAAQ,SAAS,MAAM,CAAC,EAAE,GAAG;AACtE"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as __exportAll, n as getTextErrorRemediationHints, o as toTimerMilliseconds, t as createOutputFormatter } from "./output-
|
|
2
|
+
import { c as __exportAll, n as getTextErrorRemediationHints, o as toTimerMilliseconds, t as createOutputFormatter } from "./output-B3MDn7kv.js";
|
|
3
3
|
import { A as findSession, C as textPrompt, Ct as exitCodeForOutputErrorCode, Dt as normalizeOutputError, F as normalizeName, Ft as OUTPUT_FORMATS, G as normalizeAgentSessionId, N as listSessions, Nt as EXIT_CODES, O as absolutePath, St as isProcessAlive, U as serializeSessionRecordForDisk, Ut as AgentSpawnError, V as parseSessionRecord, Vt as AcpxOperationalError, _t as sessionEventLockPath, b as mergePromptSourceWithText, c as probeQueueOwnerHealth, dt as boundedEventMaxSegments, ft as defaultSessionEventLog, gt as sessionEventActivePath, j as findSessionByDirectoryWalk, k as findGitRepositoryRoot, v as PromptInputValidationError, x as parsePromptSource, xt as _usingCtx, yt as writePrivateFile, z as writeSessionRecord } from "./ipc-BQQpcEdP.js";
|
|
4
4
|
import { A as renderArgvIdentity, i as DEFAULT_AGENT_NAME, l as normalizeAgentName$1, s as listBuiltInAgents } from "./agent-registry-R7A3MSpr.js";
|
|
5
|
-
import { ct as listSessionEvents, d as flushPerfMetricsCapture, dt as TimeoutError, f as installPerfMetricsCapture, i as runOnce, lt as isLegacyZedCodexAcpInvocation, n as runSessionQueueOwner, nt as getAcpxVersion, ot as acquireSessionImport, s as DISCARD_OUTPUT_FORMATTER, st as acquireSessionScope, u as buildQueueOwnerArgOverride, ut as InterruptedError } from "./queue-owner-runtime-
|
|
6
|
-
import { C as resolvePermissionMode, E as resolveSessionsListFlags, S as resolveOutputPolicy, T as resolveSessionNameFromFlags, _ as parseSessionName, a as addGlobalFlags, b as resolveAgentInvocation, c as addSessionOption, d as parseDaysOlderThan, f as parseHistoryLimit, g as parsePruneBeforeDate, h as parseOutputFormat$1, i as addExecConfigOption, m as parseNonEmptyValue, n as sessionConnectionOptions, o as addPromptInputOption, p as parseMaxTurns, r as sessionOptionsFromGlobalFlags, s as addSessionNameOption, t as resolvePermissionPolicyFromFlags, u as parseAllowedTools, v as parseTimeoutSeconds, w as resolvePromptFlags, x as resolveGlobalFlags, y as parseTtlSeconds } from "./invocation-options-
|
|
5
|
+
import { ct as listSessionEvents, d as flushPerfMetricsCapture, dt as TimeoutError, f as installPerfMetricsCapture, i as runOnce, lt as isLegacyZedCodexAcpInvocation, n as runSessionQueueOwner, nt as getAcpxVersion, ot as acquireSessionImport, s as DISCARD_OUTPUT_FORMATTER, st as acquireSessionScope, u as buildQueueOwnerArgOverride, ut as InterruptedError } from "./queue-owner-runtime-DXCVngwU.js";
|
|
6
|
+
import { C as resolvePermissionMode, E as resolveSessionsListFlags, S as resolveOutputPolicy, T as resolveSessionNameFromFlags, _ as parseSessionName, a as addGlobalFlags, b as resolveAgentInvocation, c as addSessionOption, d as parseDaysOlderThan, f as parseHistoryLimit, g as parsePruneBeforeDate, h as parseOutputFormat$1, i as addExecConfigOption, m as parseNonEmptyValue, n as sessionConnectionOptions, o as addPromptInputOption, p as parseMaxTurns, r as sessionOptionsFromGlobalFlags, s as addSessionNameOption, t as resolvePermissionPolicyFromFlags, u as parseAllowedTools, v as parseTimeoutSeconds, w as resolvePromptFlags, x as resolveGlobalFlags, y as parseTtlSeconds } from "./invocation-options-PBfCgrdi.js";
|
|
7
7
|
import { realpathSync } from "node:fs";
|
|
8
8
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
9
9
|
import path from "node:path";
|
|
@@ -416,11 +416,11 @@ let sessionModulePromise;
|
|
|
416
416
|
let outputModulePromise;
|
|
417
417
|
let outputRenderModulePromise;
|
|
418
418
|
function loadSessionModule() {
|
|
419
|
-
sessionModulePromise ??= import("./output-
|
|
419
|
+
sessionModulePromise ??= import("./output-B3MDn7kv.js").then((n) => n.s);
|
|
420
420
|
return sessionModulePromise;
|
|
421
421
|
}
|
|
422
422
|
function loadOutputModule() {
|
|
423
|
-
outputModulePromise ??= import("./output-
|
|
423
|
+
outputModulePromise ??= import("./output-B3MDn7kv.js").then((n) => n.r);
|
|
424
424
|
return outputModulePromise;
|
|
425
425
|
}
|
|
426
426
|
function loadOutputRenderModule() {
|
|
@@ -902,7 +902,7 @@ async function handleSessionsWatch(explicitAgentName, flags, command, config) {
|
|
|
902
902
|
includeClosed: true
|
|
903
903
|
});
|
|
904
904
|
if (!record) throw new Error(missingScopedSessionMessage(agent, sessionName));
|
|
905
|
-
const { runSessionWatch } = await import("./session-watch-
|
|
905
|
+
const { runSessionWatch } = await import("./session-watch-DURyCw31.js");
|
|
906
906
|
await runSessionWatch(record, {
|
|
907
907
|
cursor: flags.cursor,
|
|
908
908
|
policy: resolveRequestedOutputPolicy(globalFlags)
|
|
@@ -2149,7 +2149,7 @@ function registerAgentCommand(program, agentName, config) {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
function registerFlowCommand(program, config) {
|
|
2151
2151
|
program.command("flow").description("Run multi-step ACP workflows from flow files").command("run").description("Run a flow file").argument("<file>", "Flow module path").option("--input-json <json>", "Flow input as JSON").option("--input-file <path>", "Read flow input JSON from file").option("--default-agent <name>", "Default agent profile for ACP nodes without profile", (value) => parseNonEmptyValue("Default agent", value)).action(async function(file, flags) {
|
|
2152
|
-
const { handleFlowRun } = await import("./cli-
|
|
2152
|
+
const { handleFlowRun } = await import("./cli-DXmYwv3U.js");
|
|
2153
2153
|
await handleFlowRun(file, flags, this, config);
|
|
2154
2154
|
});
|
|
2155
2155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-VQsqcIOJ.d.ts","names":[],"sources":["../src/async-control.ts","../src/acp/model-config-state.ts","../src/acp/client.ts"],"mappings":";;;KAcY;EACV,SAAS;EACT;;;;KChBU;EACV;EACA;EACA,iBAAiB;IACf;IACA;;;;;KCsVC;EACH,YAAY;EACZ;EACA;EACA;;KAGU;EACV;EACA;EACA,gBAAgB;EAChB,SAAS;EACT;EACA;;KAGU;EACV;EACA,gBAAgB;EAChB,SAAS;EACT;EACA;;KAGU,sBAAsB;KA4C7B;KAwFO;EACV;EACA,QAAQ,OAAO;EACf;EACA,QAAQ;EACR;;KAGU;EACV;EACA;EACA;EACA,WAAW;;cAoBA;UACH;UACA;UACA;mBACS;mBACA;mBACA;UACT;UACA;UACA;mBAQS;mBAMA;mBACA;UACT;UACA;UACA;UACA;UAMA;0BACgB;UAChB;UACA;mBACS;mBACA;mBACA;UACT;UACA;UAEA;UACA;UACA;UACA;mBACS;mBACA;mBACA;mBACA;mBACA;mBACA;EAEL,YAAA,SAAS;MAsEjB,oBAAoB;EAIxB;EAIA,sBAAsB;EAItB,6BAA6B;EAW7B;EAIA;EAIA;EAIA;EAIA;EAIA;EAIA;EAIA,iBACE,UAAU,KACR;EA0BJ;UAIQ;EAUR,qBAAqB;IACnB,iBAAiB;IACjB,4BAA4B;IAC5B,mBAAmB;IACnB;IACA;IACA;IACA;;UAuBM;UASA;UAcA;EAUR,mBAAmB;EAInB,gBAAgB;EAUhB;UAIQ;EAWF,MACJ,YAAY,qBACZ,UAAU,KAAK,sCACd;UA0FW;UAWA;UAgEN;UAiBM;UAyBN;UAwBA;UAIM;
|
|
1
|
+
{"version":3,"file":"client-VQsqcIOJ.d.ts","names":[],"sources":["../src/async-control.ts","../src/acp/model-config-state.ts","../src/acp/client.ts"],"mappings":";;;KAcY;EACV,SAAS;EACT;;;;KChBU;EACV;EACA;EACA,iBAAiB;IACf;IACA;;;;;KCsVC;EACH,YAAY;EACZ;EACA;EACA;;KAGU;EACV;EACA;EACA,gBAAgB;EAChB,SAAS;EACT;EACA;;KAGU;EACV;EAC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AuBL,gBACJ,mBACA,iBACA,QAAQ,+BACR,YAAY,sBACX,QAAQ;UAmBH;UAUM;UAoBA;UAqBN;UAoBA;UAeA;EAOF,OAAO,oBAAoB;EA8B3B,aAAa,oBAAoB;EAkBjC,aAAa,SAAQ,sBAA2B,QAAQ;EAOxD,cAAc,oBAAoB;EAclC,YAAY;IAAS;IAAmB;MAAiB,QAAQ;EA+BjE,UAAU;EAKV,aAAa,kBAAkB,cAAc,yBAAyB;EAatE,6BAA6B;EAS7B,mBAAmB,kBAAiB,QAAQ;EAyClD,SAAS;UAgBK;UAqCA;UAyCA;UAeN;UAIA;UAIM;UAON;UAcM;UA8BN;UAYM;UAyBN;UAkBA;UAOA;UAOA;UAcA;UASA;UAqEM;UA0BN;UA2CA;UAOA;UAUA;UAIA;UAcA;UAYM;UA+BA;UA8BA;UA4CA;;;;;;;UAoDN;UAqBM;UA8BN;UAiBA;UAUA;UAQM;UAuCN;UAuBA;UAqBA;UAIA;UAwBA;UASM;UA8BN;UAoBA;UAiBM;UAwBN;UAqBA;UAQA;UAQA;UA6BA;UAmBA;UAmBA;UAmBA;UAyBA;UAKA;UAwBA;UASA;UAUM;UAqDN;UAYM;UAmBA;UASA;UASA;UAoBN;UASA;UAMA;UAaA;UAWM;;UAkBN;UAiBA;UAWM;EAgCR,0BAA0B;IAC9B;IACA;MACE"}
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>acpx CLI Reference</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/CLI.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Vision</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/VISION.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Agents</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/agents.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Compare Command</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/compare.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Config</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/config.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Custom agents</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/custom-agents.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Exit codes</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/exit-codes.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Flows</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/flows.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,7 +245,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<p class="lede">acpx is a headless CLI client for the Agent Client Protocol (ACP) — talk to coding agents from the command line, not the PTY.</p>
|
|
246
246
|
<div class="home-cta">
|
|
247
247
|
<a class="btn btn-primary" href="quickstart.html">Quickstart</a>
|
|
248
|
-
<a class="btn btn-ghost" href="https://github.com/scottzx/
|
|
248
|
+
<a class="btn btn-ghost" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
249
|
<div class="home-install" aria-label="Install with npm">
|
|
250
250
|
<span class="prompt" aria-hidden="true">$</span>
|
|
251
251
|
<code>npm install -g acpx</code>
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Install</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/install.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -29,7 +29,7 @@ Canonical documentation:
|
|
|
29
29
|
Install:
|
|
30
30
|
- npm install -g acpx
|
|
31
31
|
|
|
32
|
-
Source: https://github.com/scottzx/
|
|
32
|
+
Source: https://github.com/scottzx/agent-workflow
|
|
33
33
|
|
|
34
34
|
Guidance for agents:
|
|
35
35
|
- Prefer the canonical documentation URLs above over README excerpts or package metadata.
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Output formats</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/output-formats.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Permissions</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/permissions.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Prompting</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/prompting.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Quickstart</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/quickstart.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Releasing acpx</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/releasing.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Transient runtime environment</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/runtime-environment.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Runtime process lifecycle</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/runtime-process-lifecycle.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -255,6 +255,7 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
255
255
|
<p>Compatibility and startup-diagnostic invocations of the selected adapter also use these hooks. One session or runtime probe can create several processes: correlate events by <code>launchId</code>, not only by scope. Each invocation reports its actual command and arguments, including version/help checks before the ACP startup arguments have been selected. Denied compatibility admission prevents startup; a denied optional diagnostic omits version enrichment and preserves the original startup failure. Short POSIX checks own separate process groups; the ACP bridge keeps its inherited process group.</p>
|
|
256
256
|
<p>Compatibility commands retain their execution deadline after spawning. Their owned cleanup can extend settlement beyond that deadline; host admission waits remain under host control. Probe completion does not settle a pending host admission callback or permit a later launch after the client has closed.</p>
|
|
257
257
|
<p><code>onBeforeSpawn</code> and <code>onSpawned</code> are awaited admission boundaries. Rejecting before spawn prevents launch. Rejecting after spawn terminates the child before startup returns that error. An exit during admission is delivered after the admission callback settles, so a late successful write cannot overwrite an earlier exit observation.</p>
|
|
258
|
+
<p><code>onSpawnFailed</code> also reports admission rejection and cancellation before spawn, including authority revoked after <code>onBeforeSpawn</code> successfully reserved capacity. The observation retains the original error so hosts can release a reservation even when no child PID was created. A client closed during held compatibility probe admission reports the same failure without launching that probe.</p>
|
|
258
259
|
<p>For embedded runtime session creation, a positive <code>timeoutMs</code> bounds ACP initialization. If the agent never completes the handshake, <code>ensureSession()</code> rejects with <code>ACP_SESSION_INIT_FAILED</code> after closing the client and cleaning up its observed processes. Cleanup can extend beyond the initialization deadline. Omitting the timeout preserves unlimited initialization. This deadline does not bound the later <code>session/new</code> or <code>session/load</code> request.</p>
|
|
259
260
|
<p>The host owns admission timeouts, cancellation and recovery. A callback that never settles can hold startup indefinitely; <code>close()</code> is not an admission-cancellation mechanism. Hosts should bound their own storage or policy operations and settle or reject admission when abandoning a launch.</p>
|
|
260
261
|
<p>If a launch finishes admission after the client was closed, acpx stops that child without adopting it or disturbing a replacement connection. The admitted child still produces spawn and exit observations.</p>
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Safe execution errors</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/safe-errors.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Session control</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/session-control.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Watching sessions</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/session-watch.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Sessions</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/sessions.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -245,8 +245,8 @@ body:not(.home) .doc>h1:first-child{display:none}
|
|
|
245
245
|
<h1>Shared sessions</h1>
|
|
246
246
|
</div>
|
|
247
247
|
<div class="hero-meta">
|
|
248
|
-
<a class="repo" href="https://github.com/scottzx/
|
|
249
|
-
<a class="edit" href="https://github.com/scottzx/
|
|
248
|
+
<a class="repo" href="https://github.com/scottzx/agent-workflow" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/scottzx/agent-workflow/edit/main/packages/runtime/docs/shared-sessions.md" rel="noopener">Edit page</a>
|
|
250
250
|
</div>
|
|
251
251
|
</header>
|
|
252
252
|
<div class="doc-grid">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as MAX_TIMER_DELAY_MS, t as createOutputFormatter } from "./output-
|
|
1
|
+
import { a as MAX_TIMER_DELAY_MS, t as createOutputFormatter } from "./output-B3MDn7kv.js";
|
|
2
2
|
import { C as textPrompt, It as PERMISSION_MODES, R as resolveSessionRecord, Rt as SESSION_RECORD_SCHEMA, S as promptToDisplayText, bt as writePrivateJsonFile, ft as defaultSessionEventLog, yt as writePrivateFile } from "./ipc-BQQpcEdP.js";
|
|
3
3
|
import { P as runTimedExecFile } from "./agent-registry-R7A3MSpr.js";
|
|
4
|
-
import { G as recordSessionUpdate, H as createSessionConversation, U as recordClientOperation, W as recordPromptSubmission, dt as TimeoutError, i as runOnce, m as createSessionWithClient, mt as withTimeout, o as sendSessionDirect, pt as withInterrupt, q as cloneSessionAcpxState, ut as InterruptedError } from "./queue-owner-runtime-
|
|
4
|
+
import { G as recordSessionUpdate, H as createSessionConversation, U as recordClientOperation, W as recordPromptSubmission, dt as TimeoutError, i as runOnce, m as createSessionWithClient, mt as withTimeout, o as sendSessionDirect, pt as withInterrupt, q as cloneSessionAcpxState, ut as InterruptedError } from "./queue-owner-runtime-DXCVngwU.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -2471,4 +2471,4 @@ function formatDecisionPrompt(question, choices, field) {
|
|
|
2471
2471
|
//#endregion
|
|
2472
2472
|
export { parseStrictJsonObject as a, validateFlowDefinition as c, checkpoint as d, compute as f, isDefinedFlow as h, parseJsonObject as i, acp as l, shell as m, decisionEdge as n, FlowRunner as o, defineFlow as p, extractJsonObject as r, flowRunsBaseDir as s, decision as t, action as u };
|
|
2473
2473
|
|
|
2474
|
-
//# sourceMappingURL=flows-
|
|
2474
|
+
//# sourceMappingURL=flows-DJ17ajbw.js.map
|