@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
|
@@ -38,11 +38,15 @@ export declare const executionTargetBindingSchema: z.ZodObject<{
|
|
|
38
38
|
agentPreset: z.ZodOptional<z.ZodString>;
|
|
39
39
|
roleId: z.ZodOptional<z.ZodString>;
|
|
40
40
|
skillRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
skillPolicy: z.ZodOptional<z.ZodLiteral<"network_pinned">>;
|
|
41
42
|
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
43
|
allowedPresets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
44
|
flowId: z.ZodOptional<z.ZodString>;
|
|
44
45
|
flowVersion: z.ZodOptional<z.ZodString>;
|
|
45
46
|
driver: z.ZodOptional<z.ZodLiteral<"ppt_delivery">>;
|
|
47
|
+
agentFile: z.ZodOptional<z.ZodString>;
|
|
48
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
49
|
+
model: z.ZodOptional<z.ZodString>;
|
|
46
50
|
}, z.core.$strict>;
|
|
47
51
|
export declare const executionTargetConfigSchema: z.ZodObject<{
|
|
48
52
|
targetId: z.ZodString;
|
|
@@ -69,11 +73,15 @@ export declare const executionTargetConfigSchema: z.ZodObject<{
|
|
|
69
73
|
agentPreset: z.ZodOptional<z.ZodString>;
|
|
70
74
|
roleId: z.ZodOptional<z.ZodString>;
|
|
71
75
|
skillRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
76
|
+
skillPolicy: z.ZodOptional<z.ZodLiteral<"network_pinned">>;
|
|
72
77
|
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
78
|
allowedPresets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
79
|
flowId: z.ZodOptional<z.ZodString>;
|
|
75
80
|
flowVersion: z.ZodOptional<z.ZodString>;
|
|
76
81
|
driver: z.ZodOptional<z.ZodLiteral<"ppt_delivery">>;
|
|
82
|
+
agentFile: z.ZodOptional<z.ZodString>;
|
|
83
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
84
|
+
model: z.ZodOptional<z.ZodString>;
|
|
77
85
|
}, z.core.$strict>>;
|
|
78
86
|
}, z.core.$strict>;
|
|
79
87
|
export declare const executionTargetSchema: z.ZodObject<{
|
|
@@ -101,11 +109,15 @@ export declare const executionTargetSchema: z.ZodObject<{
|
|
|
101
109
|
agentPreset: z.ZodOptional<z.ZodString>;
|
|
102
110
|
roleId: z.ZodOptional<z.ZodString>;
|
|
103
111
|
skillRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
112
|
+
skillPolicy: z.ZodOptional<z.ZodLiteral<"network_pinned">>;
|
|
104
113
|
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
105
114
|
allowedPresets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
115
|
flowId: z.ZodOptional<z.ZodString>;
|
|
107
116
|
flowVersion: z.ZodOptional<z.ZodString>;
|
|
108
117
|
driver: z.ZodOptional<z.ZodLiteral<"ppt_delivery">>;
|
|
118
|
+
agentFile: z.ZodOptional<z.ZodString>;
|
|
119
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
120
|
+
model: z.ZodOptional<z.ZodString>;
|
|
109
121
|
}, z.core.$strict>>;
|
|
110
122
|
configVersion: z.ZodNumber;
|
|
111
123
|
createdAt: z.ZodString;
|
|
@@ -236,11 +248,15 @@ export declare const TARGET_METHODS: {
|
|
|
236
248
|
agentPreset: z.ZodOptional<z.ZodString>;
|
|
237
249
|
roleId: z.ZodOptional<z.ZodString>;
|
|
238
250
|
skillRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
251
|
+
skillPolicy: z.ZodOptional<z.ZodLiteral<"network_pinned">>;
|
|
239
252
|
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
240
253
|
allowedPresets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
241
254
|
flowId: z.ZodOptional<z.ZodString>;
|
|
242
255
|
flowVersion: z.ZodOptional<z.ZodString>;
|
|
243
256
|
driver: z.ZodOptional<z.ZodLiteral<"ppt_delivery">>;
|
|
257
|
+
agentFile: z.ZodOptional<z.ZodString>;
|
|
258
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
259
|
+
model: z.ZodOptional<z.ZodString>;
|
|
244
260
|
}, z.core.$strict>>;
|
|
245
261
|
}, z.core.$strict>>;
|
|
246
262
|
};
|
|
@@ -273,11 +289,15 @@ export declare const TARGET_METHODS: {
|
|
|
273
289
|
agentPreset: z.ZodOptional<z.ZodString>;
|
|
274
290
|
roleId: z.ZodOptional<z.ZodString>;
|
|
275
291
|
skillRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
292
|
+
skillPolicy: z.ZodOptional<z.ZodLiteral<"network_pinned">>;
|
|
276
293
|
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
277
294
|
allowedPresets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
278
295
|
flowId: z.ZodOptional<z.ZodString>;
|
|
279
296
|
flowVersion: z.ZodOptional<z.ZodString>;
|
|
280
297
|
driver: z.ZodOptional<z.ZodLiteral<"ppt_delivery">>;
|
|
298
|
+
agentFile: z.ZodOptional<z.ZodString>;
|
|
299
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
300
|
+
model: z.ZodOptional<z.ZodString>;
|
|
281
301
|
}, z.core.$strict>>;
|
|
282
302
|
}, z.core.$strict>;
|
|
283
303
|
}, z.core.$strict>>;
|
|
@@ -26,9 +26,14 @@ export const executionConnectionSchema = executionConnectionConfigSchema.extend(
|
|
|
26
26
|
export const executionTargetBindingSchema = z.object({
|
|
27
27
|
remote: id.optional(), cwd: absolutePath.optional(), agentPreset: id.optional(),
|
|
28
28
|
roleId: id.optional(), skillRefs: z.array(text).max(100).optional(),
|
|
29
|
+
skillPolicy: z.literal('network_pinned').optional(),
|
|
29
30
|
allowedDirectories: z.array(absolutePath).min(1).max(100).optional(),
|
|
30
31
|
allowedPresets: z.array(id).min(1).max(100).optional(),
|
|
31
32
|
flowId: id.optional(), flowVersion: text.optional(), driver: z.literal('ppt_delivery').optional(),
|
|
33
|
+
// A path agent: an agent_host fixed to cwd and preset whose role is this agents/*.md file inside cwd.
|
|
34
|
+
agentFile: absolutePath.optional(),
|
|
35
|
+
// A path agent on a DSH-native preset may fix its model; both are passed together and checked against the host catalog.
|
|
36
|
+
provider: id.optional(), model: text.optional(),
|
|
32
37
|
}).strict();
|
|
33
38
|
export const executionTargetConfigSchema = z.object({
|
|
34
39
|
targetId: id, kind: z.enum(['agent_host', 'resident_agent', 'workflow']), name: text,
|
|
@@ -245,7 +250,20 @@ export class TargetDirectory {
|
|
|
245
250
|
throw new Error('Agent targets cannot bind a workflow');
|
|
246
251
|
if (target.kind === 'resident_agent' && (!binding.cwd || !binding.agentPreset || !binding.roleId))
|
|
247
252
|
throw new Error('resident_agent requires fixed cwd, agentPreset and roleId');
|
|
248
|
-
if (
|
|
253
|
+
if (binding.agentFile) {
|
|
254
|
+
if (target.kind !== 'agent_host' || !binding.cwd || !binding.agentPreset || binding.roleId || binding.driver)
|
|
255
|
+
throw new Error('A path agent is an agent_host with fixed cwd and agentPreset and no roleId or driver');
|
|
256
|
+
const relative = path.posix.relative(path.posix.normalize(binding.cwd), path.posix.normalize(binding.agentFile));
|
|
257
|
+
if (!relative || relative.startsWith('../') || relative === '..' || path.posix.isAbsolute(relative) || !relative.endsWith('.md'))
|
|
258
|
+
throw new Error('agentFile must be a .md file inside cwd');
|
|
259
|
+
if ((binding.provider === undefined) !== (binding.model === undefined))
|
|
260
|
+
throw new Error('provider and model must be fixed together');
|
|
261
|
+
if (binding.provider && binding.agentPreset.startsWith('oneagents-acp-'))
|
|
262
|
+
throw new Error('provider and model apply only to DSH-native presets');
|
|
263
|
+
}
|
|
264
|
+
else if (binding.provider || binding.model)
|
|
265
|
+
throw new Error('Only a path agent can fix provider and model');
|
|
266
|
+
else if (target.kind === 'agent_host' && (binding.cwd || binding.agentPreset || binding.roleId || binding.driver))
|
|
249
267
|
throw new Error('agent_host takes cwd and preset per task, not a fixed role binding');
|
|
250
268
|
if (binding.cwd && binding.allowedDirectories)
|
|
251
269
|
this.checkDirectory(binding.cwd, binding.allowedDirectories);
|
|
@@ -278,10 +296,12 @@ export class TargetDirectory {
|
|
|
278
296
|
if (resolvedInput.remote !== undefined || resolvedInput.connectionId !== undefined || resolvedInput.targetId !== undefined)
|
|
279
297
|
throw new Error('Input cannot override target or connection binding');
|
|
280
298
|
let cwd, agentPreset;
|
|
281
|
-
if (target.kind === 'resident_agent') {
|
|
299
|
+
if (target.kind === 'resident_agent' || target.binding.agentFile) {
|
|
282
300
|
// Even an identical value is not an allowed caller override; the binding is authoritative.
|
|
283
301
|
if (resolvedInput.cwd !== undefined || resolvedInput.agentPreset !== undefined || resolvedInput.roleId !== undefined || resolvedInput.driver !== undefined)
|
|
284
|
-
throw new Error('resident_agent input cannot override its fixed cwd, preset, role or driver
|
|
302
|
+
throw new Error(`${target.binding.agentFile ? 'A path agent' : 'resident_agent'} input cannot override its fixed cwd, preset, role or driver`);
|
|
303
|
+
if (target.binding.provider && (resolvedInput.provider !== undefined || resolvedInput.model !== undefined))
|
|
304
|
+
throw new Error('A path agent input cannot override its fixed provider and model');
|
|
285
305
|
cwd = target.binding.cwd;
|
|
286
306
|
agentPreset = target.binding.agentPreset;
|
|
287
307
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The executor's three ticket operations and the text the agent reads back, shared by the three ways an executor
|
|
3
|
+
* reaches its ticket: DSH's native tools, the MCP server DSH offers ACP agents (Grok, Codex), and the
|
|
4
|
+
* `acp-service ticket` CLI in the executor's own shell. Each caller says which it is; the gateway records it.
|
|
5
|
+
*/
|
|
6
|
+
export type ExecutorTicketTool = 'ticket_show' | 'ticket_mark' | 'ticket_submit';
|
|
7
|
+
export type ExecutorTicketChannel = 'dsh' | 'mcp' | 'cli';
|
|
8
|
+
/** The tools name the running attempt and session; the CLI names only the job. */
|
|
9
|
+
export type ExecutorTicketScope = {
|
|
10
|
+
jobId: string;
|
|
11
|
+
attemptId: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
} | {
|
|
14
|
+
jobId: string;
|
|
15
|
+
};
|
|
16
|
+
export interface ExecutorTicketArgs {
|
|
17
|
+
id?: string;
|
|
18
|
+
state?: string;
|
|
19
|
+
note?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Runs one operation; a rule the gateway enforces comes back as text for the agent, marked refused. */
|
|
22
|
+
export declare function runExecutorTicket(invoke: (method: string, params: Record<string, unknown>) => Promise<unknown>, scope: ExecutorTicketScope, via: ExecutorTicketChannel, tool: ExecutorTicketTool, args?: ExecutorTicketArgs): Promise<{
|
|
23
|
+
text: string;
|
|
24
|
+
refused?: true;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const pending = (ticket) => ticket.items.filter(item => item.state === 'open' || item.state === 'reopened');
|
|
2
|
+
function pendingText(ticket) {
|
|
3
|
+
const lines = pending(ticket).flatMap(item => {
|
|
4
|
+
const last = item.state === 'reopened' ? item.log.filter(entry => entry.note).at(-1) : undefined;
|
|
5
|
+
return [`${item.id} [${item.severity === 'must' ? '必须改' : '建议改'}] ${item.where}:${item.problem}`,
|
|
6
|
+
...(item.suggestion ? [` 建议:${item.suggestion}`] : []),
|
|
7
|
+
...(item.evidence?.length ? [` 证据:${JSON.stringify(item.evidence)}`] : []),
|
|
8
|
+
...(last ? [` 上一次:${last.by} ${last.action}:${last.note}`] : [])];
|
|
9
|
+
});
|
|
10
|
+
return [...lines, `待处理 ${pending(ticket).length} 条,任务单状态 ${ticket.status},第 ${ticket.round} 轮`].join('\n');
|
|
11
|
+
}
|
|
12
|
+
/** Runs one operation; a rule the gateway enforces comes back as text for the agent, marked refused. */
|
|
13
|
+
export async function runExecutorTicket(invoke, scope, via, tool, args = {}) {
|
|
14
|
+
const params = { ...scope, via, ...(tool === 'ticket_mark' ? { itemId: args.id, state: args.state, note: args.note } : {}) };
|
|
15
|
+
let ticket;
|
|
16
|
+
try {
|
|
17
|
+
ticket = await invoke(tool, params);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
return { text: `任务单操作被拒绝:${error instanceof Error ? error.message : String(error)}`, refused: true };
|
|
21
|
+
}
|
|
22
|
+
if (tool === 'ticket_show')
|
|
23
|
+
return { text: pendingText(ticket) };
|
|
24
|
+
if (tool === 'ticket_mark')
|
|
25
|
+
return { text: `${args.id} 已标为 ${args.state},还剩 ${pending(ticket).length} 条待处理。` };
|
|
26
|
+
return { text: `任务单已提交(第 ${ticket.round} 轮),等待宿主检查。` };
|
|
27
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { JobLedger } from './ledger.js';
|
|
3
|
+
export declare const checkResultSchema: z.ZodObject<{
|
|
4
|
+
itemId: z.ZodString;
|
|
5
|
+
pass: z.ZodBoolean;
|
|
6
|
+
evidence: z.ZodArray<z.ZodUnknown>;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const qualityReviewSchema: z.ZodObject<{
|
|
9
|
+
verdict: z.ZodEnum<{
|
|
10
|
+
pass: "pass";
|
|
11
|
+
revise: "revise";
|
|
12
|
+
}>;
|
|
13
|
+
summary: z.ZodString;
|
|
14
|
+
scores: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
15
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
16
|
+
where: z.ZodString;
|
|
17
|
+
problem: z.ZodString;
|
|
18
|
+
suggestion: z.ZodString;
|
|
19
|
+
severity: z.ZodEnum<{
|
|
20
|
+
must: "must";
|
|
21
|
+
should: "should";
|
|
22
|
+
}>;
|
|
23
|
+
}, z.core.$strict>>;
|
|
24
|
+
previous: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
status: z.ZodEnum<{
|
|
27
|
+
fixed: "fixed";
|
|
28
|
+
partly: "partly";
|
|
29
|
+
not_fixed: "not_fixed";
|
|
30
|
+
withdrawn: "withdrawn";
|
|
31
|
+
}>;
|
|
32
|
+
note: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strict>>>;
|
|
34
|
+
proposals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
+
kind: z.ZodEnum<{
|
|
36
|
+
check: "check";
|
|
37
|
+
role: "role";
|
|
38
|
+
qa: "qa";
|
|
39
|
+
locked: "locked";
|
|
40
|
+
}>;
|
|
41
|
+
text: z.ZodString;
|
|
42
|
+
}, z.core.$strict>>>;
|
|
43
|
+
}, z.core.$loose>;
|
|
44
|
+
export type CheckResult = z.infer<typeof checkResultSchema>;
|
|
45
|
+
export type QualityReview = z.infer<typeof qualityReviewSchema>;
|
|
46
|
+
export type TicketActor = 'executor' | 'qa' | 'host' | 'person' | 'coach';
|
|
47
|
+
/** Who settled a proposal: a person, or a coach agent identified by the harness session it runs in. */
|
|
48
|
+
export interface ProposalSettler {
|
|
49
|
+
kind: 'person' | 'coach';
|
|
50
|
+
agent?: string;
|
|
51
|
+
sessionId?: string;
|
|
52
|
+
}
|
|
53
|
+
export type ItemState = 'open' | 'done' | 'disputed' | 'verified' | 'reopened' | 'withdrawn';
|
|
54
|
+
export type TicketStatus = 'drafting' | 'in_revision' | 'ready_for_review' | 'in_review' | 'closed' | 'stopped';
|
|
55
|
+
export interface TicketLog {
|
|
56
|
+
round: number;
|
|
57
|
+
by: TicketActor;
|
|
58
|
+
action: string;
|
|
59
|
+
note?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface TicketItem {
|
|
62
|
+
id: string;
|
|
63
|
+
source: 'qa' | 'program';
|
|
64
|
+
raisedInRound: number;
|
|
65
|
+
severity: 'must' | 'should';
|
|
66
|
+
where: string;
|
|
67
|
+
problem: string;
|
|
68
|
+
suggestion?: string;
|
|
69
|
+
checkId?: string;
|
|
70
|
+
evidence?: unknown[];
|
|
71
|
+
state: ItemState;
|
|
72
|
+
log: TicketLog[];
|
|
73
|
+
}
|
|
74
|
+
export interface TicketProposal {
|
|
75
|
+
id: string;
|
|
76
|
+
kind: NonNullable<QualityReview['proposals']>[number]['kind'];
|
|
77
|
+
text: string;
|
|
78
|
+
raisedInRound: number;
|
|
79
|
+
state: 'open' | 'accepted' | 'rejected' | 'done';
|
|
80
|
+
note?: string;
|
|
81
|
+
by?: ProposalSettler;
|
|
82
|
+
}
|
|
83
|
+
export interface Ticket {
|
|
84
|
+
schemaVersion: 1;
|
|
85
|
+
roleId: string;
|
|
86
|
+
caseId: string;
|
|
87
|
+
outline: 'outline.json';
|
|
88
|
+
status: TicketStatus;
|
|
89
|
+
/** The executor round now under way; executor log entries carry it. */
|
|
90
|
+
round: number;
|
|
91
|
+
stopReason?: string;
|
|
92
|
+
/** Where a stopped ticket stood, so a run that goes on picks it up there. */
|
|
93
|
+
stoppedFrom?: TicketStatus;
|
|
94
|
+
/** The read-only copy rewritten on every change, usually <work>/ticket.json. */
|
|
95
|
+
exportPath?: string;
|
|
96
|
+
items: TicketItem[];
|
|
97
|
+
proposals: TicketProposal[];
|
|
98
|
+
history: {
|
|
99
|
+
round: number;
|
|
100
|
+
by: TicketActor;
|
|
101
|
+
action: string;
|
|
102
|
+
verdict?: string;
|
|
103
|
+
scores?: Record<string, number>;
|
|
104
|
+
summary?: string;
|
|
105
|
+
note?: string;
|
|
106
|
+
}[];
|
|
107
|
+
}
|
|
108
|
+
/** One change, appended to the ledger as an event of this type. */
|
|
109
|
+
export interface TicketChange {
|
|
110
|
+
type: `ticket.${string}`;
|
|
111
|
+
data: {
|
|
112
|
+
actor: TicketActor;
|
|
113
|
+
round: number;
|
|
114
|
+
itemId?: string;
|
|
115
|
+
note?: string;
|
|
116
|
+
[key: string]: unknown;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/** An operation the ticket's rules do not allow; the message is for the agent or person who asked. */
|
|
120
|
+
export declare class TicketError extends Error {
|
|
121
|
+
}
|
|
122
|
+
export declare const pendingItems: (ticket: Ticket) => TicketItem[];
|
|
123
|
+
/** Must-fix items nobody has confirmed as settled. */
|
|
124
|
+
export declare const unsettledMust: (ticket: Ticket) => TicketItem[];
|
|
125
|
+
export declare function openTicket(roleId: string, caseId: string, exportPath?: string): {
|
|
126
|
+
ticket: Ticket;
|
|
127
|
+
changes: TicketChange[];
|
|
128
|
+
};
|
|
129
|
+
/** Host: failed checks become or reopen program items, items whose check now passes are verified; all passing moves the ticket to review. */
|
|
130
|
+
export declare function applyChecks(ticket: Ticket, results: CheckResult[]): TicketChange[];
|
|
131
|
+
/** Host, on QA's behalf: QA's verdicts on handled items, its new issues and its proposals, merged into the ticket. */
|
|
132
|
+
export declare function applyReview(ticket: Ticket, review: QualityReview, qaJobId?: string): TicketChange[];
|
|
133
|
+
/** Host: the ticket goes back to the executor for the next round. */
|
|
134
|
+
export declare function startRevision(ticket: Ticket, note?: string): TicketChange[];
|
|
135
|
+
/** Executor: a pending item is done or disputed, with a note, in the current round. */
|
|
136
|
+
export declare function markItem(ticket: Ticket, itemId: string, state: string, note: string): TicketChange[];
|
|
137
|
+
/** Executor: everything is handled; the ticket is ready for the host's checks. */
|
|
138
|
+
export declare function submitTicket(ticket: Ticket): TicketChange[];
|
|
139
|
+
/** Person or coach: what became of a proposal. Allowed after the run ends, which is when the coach reads them. */
|
|
140
|
+
export declare function setProposal(ticket: Ticket, proposalId: string, state: 'accepted' | 'rejected' | 'done', note?: string, by?: ProposalSettler): TicketChange[];
|
|
141
|
+
/** Host: the run is over, passed (closed) or not (stopped). */
|
|
142
|
+
export declare function closeTicket(ticket: Ticket, status: 'closed' | 'stopped', stopReason?: string): TicketChange[];
|
|
143
|
+
/** Host: a stopped run goes on, so the ticket returns to where it stood; work going back to the executor enters a revision if it had left the executor's hands. */
|
|
144
|
+
export declare function reopenTicket(ticket: Ticket, note?: string, forExecutor?: boolean): TicketChange[];
|
|
145
|
+
export declare const TICKET_METHODS: {
|
|
146
|
+
ticket_get: {
|
|
147
|
+
description: string;
|
|
148
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
149
|
+
originSessionId: z.ZodString;
|
|
150
|
+
jobId: z.ZodString;
|
|
151
|
+
}, z.core.$strict>>;
|
|
152
|
+
};
|
|
153
|
+
ticket_open: {
|
|
154
|
+
description: string;
|
|
155
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
156
|
+
originSessionId: z.ZodString;
|
|
157
|
+
jobId: z.ZodString;
|
|
158
|
+
roleId: z.ZodString;
|
|
159
|
+
caseId: z.ZodString;
|
|
160
|
+
exportPath: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
};
|
|
163
|
+
ticket_checks: {
|
|
164
|
+
description: string;
|
|
165
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
166
|
+
originSessionId: z.ZodString;
|
|
167
|
+
jobId: z.ZodString;
|
|
168
|
+
results: z.ZodArray<z.ZodObject<{
|
|
169
|
+
itemId: z.ZodString;
|
|
170
|
+
pass: z.ZodBoolean;
|
|
171
|
+
evidence: z.ZodArray<z.ZodUnknown>;
|
|
172
|
+
}, z.core.$strict>>;
|
|
173
|
+
}, z.core.$strict>>;
|
|
174
|
+
};
|
|
175
|
+
ticket_review: {
|
|
176
|
+
description: string;
|
|
177
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
178
|
+
originSessionId: z.ZodString;
|
|
179
|
+
jobId: z.ZodString;
|
|
180
|
+
review: z.ZodObject<{
|
|
181
|
+
verdict: z.ZodEnum<{
|
|
182
|
+
pass: "pass";
|
|
183
|
+
revise: "revise";
|
|
184
|
+
}>;
|
|
185
|
+
summary: z.ZodString;
|
|
186
|
+
scores: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
187
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
188
|
+
where: z.ZodString;
|
|
189
|
+
problem: z.ZodString;
|
|
190
|
+
suggestion: z.ZodString;
|
|
191
|
+
severity: z.ZodEnum<{
|
|
192
|
+
must: "must";
|
|
193
|
+
should: "should";
|
|
194
|
+
}>;
|
|
195
|
+
}, z.core.$strict>>;
|
|
196
|
+
previous: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
status: z.ZodEnum<{
|
|
199
|
+
fixed: "fixed";
|
|
200
|
+
partly: "partly";
|
|
201
|
+
not_fixed: "not_fixed";
|
|
202
|
+
withdrawn: "withdrawn";
|
|
203
|
+
}>;
|
|
204
|
+
note: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$strict>>>;
|
|
206
|
+
proposals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
207
|
+
kind: z.ZodEnum<{
|
|
208
|
+
check: "check";
|
|
209
|
+
role: "role";
|
|
210
|
+
qa: "qa";
|
|
211
|
+
locked: "locked";
|
|
212
|
+
}>;
|
|
213
|
+
text: z.ZodString;
|
|
214
|
+
}, z.core.$strict>>>;
|
|
215
|
+
}, z.core.$loose>;
|
|
216
|
+
qaJobId: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.core.$strict>>;
|
|
218
|
+
};
|
|
219
|
+
ticket_revise: {
|
|
220
|
+
description: string;
|
|
221
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
222
|
+
originSessionId: z.ZodString;
|
|
223
|
+
jobId: z.ZodString;
|
|
224
|
+
note: z.ZodOptional<z.ZodString>;
|
|
225
|
+
}, z.core.$strict>>;
|
|
226
|
+
};
|
|
227
|
+
ticket_show: {
|
|
228
|
+
description: string;
|
|
229
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
230
|
+
jobId: z.ZodString;
|
|
231
|
+
attemptId: z.ZodOptional<z.ZodString>;
|
|
232
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
233
|
+
via: z.ZodOptional<z.ZodEnum<{
|
|
234
|
+
cli: "cli";
|
|
235
|
+
dsh: "dsh";
|
|
236
|
+
mcp: "mcp";
|
|
237
|
+
}>>;
|
|
238
|
+
}, z.core.$strict>>;
|
|
239
|
+
};
|
|
240
|
+
ticket_mark: {
|
|
241
|
+
description: string;
|
|
242
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
243
|
+
jobId: z.ZodString;
|
|
244
|
+
attemptId: z.ZodOptional<z.ZodString>;
|
|
245
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
246
|
+
via: z.ZodOptional<z.ZodEnum<{
|
|
247
|
+
cli: "cli";
|
|
248
|
+
dsh: "dsh";
|
|
249
|
+
mcp: "mcp";
|
|
250
|
+
}>>;
|
|
251
|
+
itemId: z.ZodString;
|
|
252
|
+
state: z.ZodEnum<{
|
|
253
|
+
done: "done";
|
|
254
|
+
disputed: "disputed";
|
|
255
|
+
}>;
|
|
256
|
+
note: z.ZodString;
|
|
257
|
+
}, z.core.$strict>>;
|
|
258
|
+
};
|
|
259
|
+
ticket_submit: {
|
|
260
|
+
description: string;
|
|
261
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
262
|
+
jobId: z.ZodString;
|
|
263
|
+
attemptId: z.ZodOptional<z.ZodString>;
|
|
264
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
265
|
+
via: z.ZodOptional<z.ZodEnum<{
|
|
266
|
+
cli: "cli";
|
|
267
|
+
dsh: "dsh";
|
|
268
|
+
mcp: "mcp";
|
|
269
|
+
}>>;
|
|
270
|
+
}, z.core.$strict>>;
|
|
271
|
+
};
|
|
272
|
+
ticket_proposal: {
|
|
273
|
+
description: string;
|
|
274
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
275
|
+
originSessionId: z.ZodString;
|
|
276
|
+
jobId: z.ZodString;
|
|
277
|
+
proposalId: z.ZodString;
|
|
278
|
+
state: z.ZodEnum<{
|
|
279
|
+
done: "done";
|
|
280
|
+
accepted: "accepted";
|
|
281
|
+
rejected: "rejected";
|
|
282
|
+
}>;
|
|
283
|
+
note: z.ZodOptional<z.ZodString>;
|
|
284
|
+
by: z.ZodOptional<z.ZodObject<{
|
|
285
|
+
kind: z.ZodEnum<{
|
|
286
|
+
person: "person";
|
|
287
|
+
coach: "coach";
|
|
288
|
+
}>;
|
|
289
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
290
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
291
|
+
}, z.core.$strict>>;
|
|
292
|
+
}, z.core.$strict>>;
|
|
293
|
+
};
|
|
294
|
+
ticket_close: {
|
|
295
|
+
description: string;
|
|
296
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
297
|
+
originSessionId: z.ZodString;
|
|
298
|
+
jobId: z.ZodString;
|
|
299
|
+
status: z.ZodEnum<{
|
|
300
|
+
stopped: "stopped";
|
|
301
|
+
closed: "closed";
|
|
302
|
+
}>;
|
|
303
|
+
stopReason: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, z.core.$strict>>;
|
|
305
|
+
};
|
|
306
|
+
ticket_reopen: {
|
|
307
|
+
description: string;
|
|
308
|
+
parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
309
|
+
originSessionId: z.ZodString;
|
|
310
|
+
jobId: z.ZodString;
|
|
311
|
+
note: z.ZodOptional<z.ZodString>;
|
|
312
|
+
}, z.core.$strict>>;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
/** An explicit continue gives the executor another go, so a stopped ticket opens with it; a job without a ticket has nothing to do. */
|
|
316
|
+
export declare function reopenForContinue(ledger: JobLedger, originSessionId: string, jobId: string): void;
|
|
317
|
+
/**
|
|
318
|
+
* The gateway's ticket methods. The method decides the actor: the host opens, merges checks and reviews, sends back
|
|
319
|
+
* and closes; a person settles proposals; the executor shows, marks and submits. The executor's call names its
|
|
320
|
+
* running attempt and session, and the ledger checks that the attempt is the job's current, unfinished one and,
|
|
321
|
+
* once the host has reported which session runs it, that the session matches; a CLI call names only the job and acts
|
|
322
|
+
* for its current attempt. Nothing here proves the call came from that session's agent: the DSH tools and the MCP
|
|
323
|
+
* server resolve the session themselves, the CLI is trusted to run in the executor's shell, and this MVP does not
|
|
324
|
+
* defend against a local caller that bypasses them with the right IDs.
|
|
325
|
+
*/
|
|
326
|
+
export declare function invokeTicket(ledger: JobLedger, method: string, params: unknown): Ticket;
|