@ownclaw/own-prose 0.1.3 → 0.1.5

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 CHANGED
@@ -27,9 +27,9 @@ openclaw gateway restart
27
27
  ```
28
28
 
29
29
  After installation, OpenClaw will load the plugin and expose the
30
- `own_prose_start`, `own_prose_status`, and `own_prose_drive` tools to agent
31
- sessions. The `own_prose_background_run` tool is internal and should not be
32
- called directly by normal users.
30
+ `own_prose_start`, `own_prose_status`, `own_prose_reply`, and
31
+ `own_prose_drive` tools to agent sessions. The `own_prose_background_run` tool
32
+ is internal and should not be called directly by normal users.
33
33
 
34
34
  If your OpenClaw setup uses a restrictive tool policy, also add the own-prose
35
35
  tools to `tools.alsoAllow` in `~/.openclaw/openclaw.json`:
@@ -42,6 +42,7 @@ tools to `tools.alsoAllow` in `~/.openclaw/openclaw.json`:
42
42
  "own_prose_start",
43
43
  "own_prose_drive",
44
44
  "own_prose_status",
45
+ "own_prose_reply",
45
46
  "own_prose_background_run"
46
47
  ]
47
48
  }
@@ -55,6 +56,8 @@ tools to `tools.alsoAllow` in `~/.openclaw/openclaw.json`:
55
56
  returns a `runId`.
56
57
  - `own_prose_status(runId | programPath)`
57
58
  Poll an existing run or inspect whether a workflow file parses correctly.
59
+ - `own_prose_reply(runId, answer, runDir?)`
60
+ Resume a workflow that is currently waiting in a `blocked` ask/reply state.
58
61
  - `own_prose_drive(programPath, input)`
59
62
  Use only when the caller explicitly wants a blocking, end-to-end result.
60
63
 
@@ -63,6 +66,7 @@ tools to `tools.alsoAllow` in `~/.openclaw/openclaw.json`:
63
66
  - `openclaw own-prose inspect <program>`
64
67
  - `openclaw own-prose compile <program>`
65
68
  - `openclaw own-prose drive <program>`
69
+ - `openclaw own-prose reply <run-id>`
66
70
  - `openclaw own-prose start <program>`
67
71
  - `openclaw own-prose status <run-id>`
68
72
 
@@ -136,11 +140,20 @@ For manual debugging or polling, use:
136
140
  openclaw own-prose status <run-id>
137
141
  ```
138
142
 
143
+ If the workflow enters a `blocked` clarification step, resume it with:
144
+
145
+ ```bash
146
+ openclaw own-prose reply <run-id> --answer "Use the Saturday 02:00-03:00 UTC maintenance window."
147
+ ```
148
+
139
149
  ## Notes
140
150
 
141
151
  - This package is intended for OpenClaw environments.
142
152
  - Prefer `own_prose_start` for normal agent usage so the main conversation does
143
153
  not block.
154
+ - Use `own_prose_reply` only when you explicitly want to continue a blocked run;
155
+ ordinary user follow-up messages should still be treated as new tasks unless
156
+ the caller intentionally resumes the old run.
144
157
  - Use `own_prose_drive` only when the caller explicitly wants a blocking
145
158
  workflow run.
146
159
  - More detailed user and repository documentation is available in the project
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var _0x7c303f=_0x2b88;(function(_0x3f2ba9,_0x283eab){var _0xfba56c=_0x2b88,_0x24512b=_0x3f2ba9();while(!![]){try{var _0x1e9c4c=parseInt(_0xfba56c(0x18b))/0x1+parseInt(_0xfba56c(0x17c))/0x2*(parseInt(_0xfba56c(0x184))/0x3)+parseInt(_0xfba56c(0x189))/0x4*(parseInt(_0xfba56c(0x187))/0x5)+-parseInt(_0xfba56c(0x17f))/0x6*(-parseInt(_0xfba56c(0x18c))/0x7)+parseInt(_0xfba56c(0x182))/0x8*(-parseInt(_0xfba56c(0x180))/0x9)+-parseInt(_0xfba56c(0x17d))/0xa+-parseInt(_0xfba56c(0x18a))/0xb;if(_0x1e9c4c===_0x283eab)break;else _0x24512b['push'](_0x24512b['shift']());}catch(_0x24b708){_0x24512b['push'](_0x24512b['shift']());}}}(_0x238d,0x3e729));import _0x2ca325 from'./openclaw.plugin.json'with{type:'json'};function _0x2b88(_0x240d93,_0x3a1b3e){_0x240d93=_0x240d93-0x17c;var _0x238d71=_0x238d();var _0x2b8889=_0x238d71[_0x240d93];return _0x2b8889;}import{registerOwnProseCli}from'./src/cli.js';import{createOwnProseBackgroundRunTool,createOwnProseDriveTool,createOwnProseStartTool,createOwnProseStatusTool}from'./src/tool.js';export default{'id':_0x7c303f(0x181),'name':_0x7c303f(0x183),'description':_0x7c303f(0x188),'configSchema':_0x2ca325[_0x7c303f(0x17e)],'register'(_0x3eb70e){var _0x4f32be=_0x7c303f;_0x3eb70e[_0x4f32be(0x185)](_0x5c2c91=>createOwnProseStartTool(_0x3eb70e,_0x5c2c91),{'optional':!![]}),_0x3eb70e[_0x4f32be(0x185)](_0x5464d9=>createOwnProseDriveTool(_0x3eb70e,_0x5464d9),{'optional':!![]}),_0x3eb70e['registerTool'](_0x4a9ca4=>createOwnProseStatusTool(_0x3eb70e,_0x4a9ca4),{'optional':!![]}),_0x3eb70e[_0x4f32be(0x185)](_0x5ad0d6=>createOwnProseBackgroundRunTool(_0x3eb70e,_0x5ad0d6)),_0x3eb70e[_0x4f32be(0x186)](({program:_0x1536bd})=>{registerOwnProseCli(_0x1536bd,_0x3eb70e);},{'descriptors':[{'name':_0x4f32be(0x181),'description':'Compile\x20and\x20execute\x20natural-language\x20workflows','hasSubcommands':!![]}]});}};function _0x238d(){var _0x2a1ca8=['10989517cDnAbx','264952CaKeyt','973exxbbF','918354mORFPA','86820Wcaled','configSchema','18036CyHDLH','9SoCGCO','own-prose','2014352lvbEhZ','OwnProse','3TWGBXr','registerTool','registerCli','175LzJaeo','Natural-language\x20workflow\x20compiler\x20and\x20executor\x20for\x20OpenClaw.','42668dkjKfO'];_0x238d=function(){return _0x2a1ca8;};return _0x238d();}
1
+ var _0x2f8750=_0xc0dd;(function(_0x5a43ba,_0x5ad432){var _0x2606f4=_0xc0dd,_0x54e348=_0x5a43ba();while(!![]){try{var _0x1779f1=parseInt(_0x2606f4(0x126))/0x1+-parseInt(_0x2606f4(0x127))/0x2+parseInt(_0x2606f4(0x12c))/0x3*(parseInt(_0x2606f4(0x123))/0x4)+-parseInt(_0x2606f4(0x12d))/0x5*(-parseInt(_0x2606f4(0x12b))/0x6)+-parseInt(_0x2606f4(0x121))/0x7*(parseInt(_0x2606f4(0x125))/0x8)+-parseInt(_0x2606f4(0x12a))/0x9*(-parseInt(_0x2606f4(0x12e))/0xa)+parseInt(_0x2606f4(0x122))/0xb*(parseInt(_0x2606f4(0x129))/0xc);if(_0x1779f1===_0x5ad432)break;else _0x54e348['push'](_0x54e348['shift']());}catch(_0x4f7232){_0x54e348['push'](_0x54e348['shift']());}}}(_0x127d,0x51914));import _0x1aae42 from'./openclaw.plugin.json'with{type:'json'};import{registerOwnProseCli}from'./src/cli.js';import{createOwnProseBackgroundRunTool,createOwnProseDriveTool,createOwnProseReplyTool,createOwnProseStartTool,createOwnProseStatusTool}from'./src/tool.js';function _0xc0dd(_0x27b40d,_0x4df7c4){_0x27b40d=_0x27b40d-0x121;var _0x127de8=_0x127d();var _0xc0dd16=_0x127de8[_0x27b40d];return _0xc0dd16;}function _0x127d(){var _0x3b5b51=['4150ySBJGf','4210SZitWo','registerTool','7SYklbf','970486NKgMHY','4496kTimhz','own-prose','3961112VLUFRF','413841wdUcKU','1106700VNgsxf','configSchema','36OrSaCH','2358UehIDv','2976fhWBhJ','486GnpsTE'];_0x127d=function(){return _0x3b5b51;};return _0x127d();}export default{'id':_0x2f8750(0x124),'name':'OwnProse','description':'Natural-language\x20workflow\x20compiler\x20and\x20executor\x20for\x20OpenClaw.','configSchema':_0x1aae42[_0x2f8750(0x128)],'register'(_0x450b3b){var _0x2b8413=_0x2f8750;_0x450b3b[_0x2b8413(0x12f)](_0x3e68fe=>createOwnProseStartTool(_0x450b3b,_0x3e68fe),{'optional':!![]}),_0x450b3b['registerTool'](_0x252e4a=>createOwnProseDriveTool(_0x450b3b,_0x252e4a),{'optional':!![]}),_0x450b3b[_0x2b8413(0x12f)](_0x510c56=>createOwnProseStatusTool(_0x450b3b,_0x510c56),{'optional':!![]}),_0x450b3b[_0x2b8413(0x12f)](_0x4c0f9b=>createOwnProseReplyTool(_0x450b3b,_0x4c0f9b),{'optional':!![]}),_0x450b3b[_0x2b8413(0x12f)](_0x13d458=>createOwnProseBackgroundRunTool(_0x450b3b,_0x13d458)),_0x450b3b['registerCli'](({program:_0x37a971})=>{registerOwnProseCli(_0x37a971,_0x450b3b);},{'descriptors':[{'name':'own-prose','description':'Compile\x20and\x20execute\x20natural-language\x20workflows','hasSubcommands':!![]}]});}};
@@ -1 +1 @@
1
- (function(_0x44b840,_0x59ac66){var _0x3b3154=_0x2d9b,_0x3755db=_0x44b840();while(!![]){try{var _0x31b720=-parseInt(_0x3b3154(0x165))/0x1+parseInt(_0x3b3154(0x166))/0x2*(-parseInt(_0x3b3154(0x167))/0x3)+parseInt(_0x3b3154(0x160))/0x4+parseInt(_0x3b3154(0x162))/0x5*(-parseInt(_0x3b3154(0x15c))/0x6)+parseInt(_0x3b3154(0x163))/0x7*(parseInt(_0x3b3154(0x15e))/0x8)+-parseInt(_0x3b3154(0x15f))/0x9*(parseInt(_0x3b3154(0x164))/0xa)+parseInt(_0x3b3154(0x15d))/0xb*(parseInt(_0x3b3154(0x161))/0xc);if(_0x31b720===_0x59ac66)break;else _0x3755db['push'](_0x3755db['shift']());}catch(_0x6e1a4d){_0x3755db['push'](_0x3755db['shift']());}}}(_0x5745,0x378a5));function _0x2d9b(_0x5811c6,_0x55b6d5){_0x5811c6=_0x5811c6-0x15c;var _0x5745ba=_0x5745();var _0x2d9bcf=_0x5745ba[_0x5811c6];return _0x2d9bcf;}export{definePluginEntry}from'openclaw/plugin-sdk/core';function _0x5745(){var _0xa033f=['527456pyVfFE','12VUNsNy','5TUFrjP','112dElrEI','5630sHrzOm','122459vPtUss','228066DuiHlD','6HURvcv','2318826RBfjrK','6388833LGiani','181648fvdeZb','1782wFfGvX'];_0x5745=function(){return _0xa033f;};return _0x5745();}
1
+ (function(_0x5aedc2,_0x371b9c){var _0xe240b0=_0x33e6,_0x5c0ed7=_0x5aedc2();while(!![]){try{var _0x3bfd83=parseInt(_0xe240b0(0xbb))/0x1+-parseInt(_0xe240b0(0xbc))/0x2*(parseInt(_0xe240b0(0xba))/0x3)+-parseInt(_0xe240b0(0xc1))/0x4+parseInt(_0xe240b0(0xb9))/0x5*(-parseInt(_0xe240b0(0xbf))/0x6)+-parseInt(_0xe240b0(0xc2))/0x7+-parseInt(_0xe240b0(0xbd))/0x8*(parseInt(_0xe240b0(0xc0))/0x9)+parseInt(_0xe240b0(0xbe))/0xa;if(_0x3bfd83===_0x371b9c)break;else _0x5c0ed7['push'](_0x5c0ed7['shift']());}catch(_0x47b2b0){_0x5c0ed7['push'](_0x5c0ed7['shift']());}}}(_0xc598,0x4bc1c));function _0x33e6(_0x1172f2,_0x565a16){_0x1172f2=_0x1172f2-0xb9;var _0xc59893=_0xc598();var _0x33e636=_0xc59893[_0x1172f2];return _0x33e636;}function _0xc598(){var _0x223127=['9XTvFek','242541hMyOYX','57034ToLZMD','8KLhbYu','10057110qQNXgm','414168OBfJml','1025127rvqYpb','1930784nwhWnq','1307418rKtucW','5YiLwVc'];_0xc598=function(){return _0x223127;};return _0xc598();}export{definePluginEntry}from'openclaw/plugin-sdk/core';
@@ -1 +1 @@
1
- (function(_0x49ca67,_0x4b70ea){const _0x40cd0f=_0x457c,_0x490d53=_0x49ca67();while(!![]){try{const _0x1b97cf=parseInt(_0x40cd0f(0xdc))/0x1+parseInt(_0x40cd0f(0xd0))/0x2+-parseInt(_0x40cd0f(0xc6))/0x3+-parseInt(_0x40cd0f(0xd8))/0x4+-parseInt(_0x40cd0f(0xdb))/0x5*(-parseInt(_0x40cd0f(0xc5))/0x6)+-parseInt(_0x40cd0f(0xcf))/0x7*(parseInt(_0x40cd0f(0xcc))/0x8)+parseInt(_0x40cd0f(0xc9))/0x9;if(_0x1b97cf===_0x4b70ea)break;else _0x490d53['push'](_0x490d53['shift']());}catch(_0x12356e){_0x490d53['push'](_0x490d53['shift']());}}}(_0x5128,0xe59f2));import{randomUUID}from'node:crypto';import{callGatewayTool}from'openclaw/plugin-sdk/browser-support';export async function queueAgentSessionRun(_0x450ade){const _0x52e20f=_0x457c,_0x36f2eb=await callGatewayTool(_0x52e20f(0xc8),{'timeoutMs':_0x450ade[_0x52e20f(0xd4)]??0x2710},{'message':_0x450ade[_0x52e20f(0xce)],'sessionKey':_0x450ade[_0x52e20f(0xda)],..._0x450ade[_0x52e20f(0xc7)]?{'agentId':_0x450ade[_0x52e20f(0xc7)]}:{},..._0x450ade[_0x52e20f(0xdd)]?{'extraSystemPrompt':_0x450ade['extraSystemPrompt']}:{},..._0x450ade[_0x52e20f(0xd2)]?{'label':_0x450ade['label']}:{},'idempotencyKey':_0x450ade[_0x52e20f(0xcb)]??randomUUID(),'deliver':_0x450ade[_0x52e20f(0xd5)]??![]}),_0x190e43=_0x36f2eb?.[_0x52e20f(0xd1)]?.[_0x52e20f(0xd6)]();if(!_0x190e43)throw new Error('Agent\x20session\x20notification\x20did\x20not\x20return\x20a\x20runId');return{'runId':_0x190e43};}export async function waitForAgentSessionRun(_0x220c90){const _0x3b392d=_0x457c;return await callGatewayTool('agent.wait',{'timeoutMs':_0x220c90[_0x3b392d(0xd4)]+0x7d0},{'runId':_0x220c90['runId'],'timeoutMs':_0x220c90[_0x3b392d(0xd4)]});}function _0x5128(){const _0x36a450=['extraSystemPrompt','sessions.delete','5649738LHNGzM','3600021PvYlSO','agentId','agent','13935753uPtznK','key','idempotencyKey','8XUIvoj','sessions','message','12842508aCRExv','160108nCYxyI','runId','label','chat.history','timeoutMs','deliver','trim','sessions.list','780736gKqfie','limit','sessionKey','5ZJxTDy','1600271RfsMcj'];_0x5128=function(){return _0x36a450;};return _0x5128();}export async function getAgentSessionMessages(_0x4aedd2){const _0x37b386=_0x457c;return await callGatewayTool(_0x37b386(0xd3),{'timeoutMs':0x2710},{'sessionKey':_0x4aedd2[_0x37b386(0xda)],'limit':_0x4aedd2[_0x37b386(0xd9)]??0xc8});}export async function deleteAgentSession(_0x171800){const _0x8fac1c=_0x457c;await callGatewayTool(_0x8fac1c(0xc4),{'timeoutMs':0x2710},{'key':_0x171800[_0x8fac1c(0xda)],'deleteTranscript':_0x171800['deleteTranscript']??!![]});}function _0x457c(_0x2cd541,_0x3ca859){_0x2cd541=_0x2cd541-0xc4;const _0x5128c2=_0x5128();let _0x457ccf=_0x5128c2[_0x2cd541];return _0x457ccf;}export async function hasAgentSession(_0x3633fc){const _0x5ccda1=_0x457c,_0x1a7563=await callGatewayTool(_0x5ccda1(0xd7),{'timeoutMs':0x2710},{'search':_0x3633fc[_0x5ccda1(0xda)],'limit':0x14,'includeGlobal':![],'includeUnknown':!![]});return(_0x1a7563[_0x5ccda1(0xcd)]??[])['some'](_0x25da45=>_0x25da45[_0x5ccda1(0xca)]===_0x3633fc[_0x5ccda1(0xda)]);}export async function notifyAgentSession(_0x5e37db){return queueAgentSessionRun(_0x5e37db);}
1
+ (function(_0x508f72,_0x7057b2){const _0x2e0502=_0x1a87,_0x59caa7=_0x508f72();while(!![]){try{const _0x1d2d41=parseInt(_0x2e0502(0x18b))/0x1*(-parseInt(_0x2e0502(0x191))/0x2)+-parseInt(_0x2e0502(0x192))/0x3+-parseInt(_0x2e0502(0x18c))/0x4*(parseInt(_0x2e0502(0x181))/0x5)+-parseInt(_0x2e0502(0x196))/0x6*(parseInt(_0x2e0502(0x19c))/0x7)+-parseInt(_0x2e0502(0x194))/0x8+-parseInt(_0x2e0502(0x189))/0x9+parseInt(_0x2e0502(0x183))/0xa;if(_0x1d2d41===_0x7057b2)break;else _0x59caa7['push'](_0x59caa7['shift']());}catch(_0x2c48b2){_0x59caa7['push'](_0x59caa7['shift']());}}}(_0xe759,0x2ad9e));import{randomUUID}from'node:crypto';function _0x1a87(_0x14125b,_0xdd0b4){_0x14125b=_0x14125b-0x181;const _0xe759ec=_0xe759();let _0x1a8717=_0xe759ec[_0x14125b];return _0x1a8717;}function _0xe759(){const _0x18e6fe=['116676ntpcHS','806409CjwPrI','sessionKey','279624cwHAKv','some','6NDeREN','key','message','timeoutMs','agent','label','1752835CkxWus','sessions.list','extraSystemPrompt','365plMheG','Agent\x20session\x20notification\x20did\x20not\x20return\x20a\x20runId','12449470AKqTkx','idempotencyKey','deleteTranscript','runId','agentId','chat.history','527022nnGXqM','deliver','2yAdcLs','18632tJMoDd','agent.wait','trim','sessions.delete','sessions'];_0xe759=function(){return _0x18e6fe;};return _0xe759();}import{callGatewayTool}from'openclaw/plugin-sdk/browser-support';export async function queueAgentSessionRun(_0x15c247){const _0x36b377=_0x1a87,_0x38dc8e=await callGatewayTool(_0x36b377(0x19a),{'timeoutMs':_0x15c247[_0x36b377(0x199)]??0x2710},{'message':_0x15c247[_0x36b377(0x198)],'sessionKey':_0x15c247[_0x36b377(0x193)],..._0x15c247[_0x36b377(0x187)]?{'agentId':_0x15c247['agentId']}:{},..._0x15c247[_0x36b377(0x19e)]?{'extraSystemPrompt':_0x15c247[_0x36b377(0x19e)]}:{},..._0x15c247[_0x36b377(0x19b)]?{'label':_0x15c247[_0x36b377(0x19b)]}:{},'idempotencyKey':_0x15c247[_0x36b377(0x184)]??randomUUID(),'deliver':_0x15c247[_0x36b377(0x18a)]??![]}),_0x46cd86=_0x38dc8e?.[_0x36b377(0x186)]?.[_0x36b377(0x18e)]();if(!_0x46cd86)throw new Error(_0x36b377(0x182));return{'runId':_0x46cd86};}export async function waitForAgentSessionRun(_0x38409b){const _0x34078b=_0x1a87;return await callGatewayTool(_0x34078b(0x18d),{'timeoutMs':_0x38409b[_0x34078b(0x199)]+0x7d0},{'runId':_0x38409b['runId'],'timeoutMs':_0x38409b[_0x34078b(0x199)]});}export async function getAgentSessionMessages(_0x257a8e){const _0x3e5722=_0x1a87;return await callGatewayTool(_0x3e5722(0x188),{'timeoutMs':0x2710},{'sessionKey':_0x257a8e[_0x3e5722(0x193)],'limit':_0x257a8e['limit']??0xc8});}export async function deleteAgentSession(_0x3ea793){const _0x153667=_0x1a87;await callGatewayTool(_0x153667(0x18f),{'timeoutMs':0x2710},{'key':_0x3ea793[_0x153667(0x193)],'deleteTranscript':_0x3ea793[_0x153667(0x185)]??!![]});}export async function hasAgentSession(_0x2fbb57){const _0x28a190=_0x1a87,_0x55bcd7=await callGatewayTool(_0x28a190(0x19d),{'timeoutMs':0x2710},{'search':_0x2fbb57[_0x28a190(0x193)],'limit':0x14,'includeGlobal':![],'includeUnknown':!![]});return(_0x55bcd7[_0x28a190(0x190)]??[])[_0x28a190(0x195)](_0x2e27a0=>_0x2e27a0[_0x28a190(0x197)]===_0x2fbb57[_0x28a190(0x193)]);}export async function notifyAgentSession(_0x53f80f){return queueAgentSessionRun(_0x53f80f);}
@@ -1 +1 @@
1
- (function(_0x10ed61,_0x1ae542){const _0x4cfd1e=_0x4967,_0x2329dc=_0x10ed61();while(!![]){try{const _0x1d9ae2=parseInt(_0x4cfd1e(0x170))/0x1*(-parseInt(_0x4cfd1e(0x173))/0x2)+-parseInt(_0x4cfd1e(0x158))/0x3*(parseInt(_0x4cfd1e(0x159))/0x4)+parseInt(_0x4cfd1e(0x165))/0x5*(parseInt(_0x4cfd1e(0x155))/0x6)+parseInt(_0x4cfd1e(0x150))/0x7+parseInt(_0x4cfd1e(0x14f))/0x8*(-parseInt(_0x4cfd1e(0x16e))/0x9)+parseInt(_0x4cfd1e(0x180))/0xa+parseInt(_0x4cfd1e(0x16a))/0xb;if(_0x1d9ae2===_0x1ae542)break;else _0x2329dc['push'](_0x2329dc['shift']());}catch(_0x8c6e61){_0x2329dc['push'](_0x2329dc['shift']());}}}(_0x5d4f,0xc7868));import _0x53054d from'node:fs/promises';import _0x59caf9 from'node:path';import{parse as _0x3b9bb5}from'yaml';export async function parseAgentFile(_0x323e51){const _0x3389b8=_0x4967,_0x8173a3=_0x59caf9[_0x3389b8(0x17a)](_0x323e51),_0x52a201=await _0x53054d[_0x3389b8(0x153)](_0x8173a3,'utf8');return parseAgentMarkdown(_0x52a201,_0x8173a3);}export async function loadAgents(_0x1fb752,_0x1e3319){const _0xb8d0b8=_0x4967,_0x299b61=await Promise[_0xb8d0b8(0x157)](_0x1fb752[_0xb8d0b8(0x17c)](async _0x298be0=>[_0x298be0,await parseAgentFile(_0x59caf9[_0xb8d0b8(0x162)](_0x1e3319,_0xb8d0b8(0x179),_0x298be0+_0xb8d0b8(0x168)))]));return Object[_0xb8d0b8(0x16c)](_0x299b61);}export function parseAgentMarkdown(_0x1d5881,_0x169f37){const _0x1e8640=_0x4967,{frontmatter:_0x5eb100,body:_0x43cc82}=splitFrontmatter(_0x1d5881),_0x3fa099=normalizeFrontmatter(_0x5eb100),_0x4aa95b=parseSections(_0x43cc82),_0x2f3af5=_0x59caf9[_0x1e8640(0x17e)](_0x169f37,_0x59caf9[_0x1e8640(0x14e)](_0x169f37)),_0x72fc41=optionalString(_0x3fa099[_0x1e8640(0x16f)])??_0x2f3af5;return{'id':_0x2f3af5,'name':_0x72fc41,'description':optionalString(_0x3fa099[_0x1e8640(0x176)]),'sourcePath':_0x169f37,'provider':optionalString(_0x3fa099[_0x1e8640(0x164)]),'model':optionalString(_0x3fa099[_0x1e8640(0x16d)]),'timeoutMs':normalizeTimeoutMs(_0x3fa099[_0x1e8640(0x16b)]),'permissions':normalizePermissions({'allowMutatingTools':_0x3fa099[_0x1e8640(0x152)],'executionTarget':_0x3fa099['executionTarget']}),'role':requireSection(_0x4aa95b,_0x1e8640(0x174)),'instructions':requireSection(_0x4aa95b,_0x1e8640(0x163)),'doneWhen':parseDoneWhen(_0x4aa95b[_0x1e8640(0x15e)])};}function splitFrontmatter(_0x23c5ce){const _0x4f2905=_0x4967,_0x2c1377=_0x23c5ce[_0x4f2905(0x15d)](/\r\n/g,'\x0a');if(!_0x2c1377['startsWith'](_0x4f2905(0x177)))throw new Error(_0x4f2905(0x171));const _0x536ca4=_0x2c1377[_0x4f2905(0x154)](_0x4f2905(0x169),0x4);if(_0x536ca4<0x0)throw new Error('own-prose\x20agent\x20frontmatter\x20is\x20missing\x20a\x20closing\x20---\x20line');return{'frontmatter':_0x3b9bb5(_0x2c1377[_0x4f2905(0x15b)](0x4,_0x536ca4)),'body':_0x2c1377[_0x4f2905(0x15b)](_0x536ca4+0x5)[_0x4f2905(0x167)]()};}function _0x4967(_0x4645b3,_0x163ba5){_0x4645b3=_0x4645b3-0x14d;const _0x5d4f6d=_0x5d4f();let _0x49670f=_0x5d4f6d[_0x4645b3];return _0x49670f;}function normalizeFrontmatter(_0xb67cf7){const _0x516be5=_0x4967;if(!_0xb67cf7||typeof _0xb67cf7!==_0x516be5(0x175)||Array[_0x516be5(0x15f)](_0xb67cf7))throw new Error('own-prose\x20agent\x20frontmatter\x20must\x20be\x20a\x20YAML\x20object');return _0xb67cf7;}function parseSections(_0x27c9b2){const _0x5c7939=_0x4967,_0x27fd6f={},_0x37598b=_0x27c9b2[_0x5c7939(0x178)]('\x0a');let _0x8fe20a=_0x5c7939(0x151),_0x21b284=[];for(const _0x5e25ee of _0x37598b){const _0x4388ce=/^##\s+(.+?)\s*$/[_0x5c7939(0x15a)](_0x5e25ee);if(_0x4388ce){_0x27fd6f[_0x8fe20a]=_0x21b284[_0x5c7939(0x162)]('\x0a')[_0x5c7939(0x167)](),_0x8fe20a=_0x4388ce[0x1][_0x5c7939(0x167)]()[_0x5c7939(0x17f)]()[_0x5c7939(0x15d)](/[^a-z0-9]+/g,'_')[_0x5c7939(0x15d)](/^_+|_+$/g,''),_0x21b284=[];continue;}_0x21b284[_0x5c7939(0x166)](_0x5e25ee);}return _0x27fd6f[_0x8fe20a]=_0x21b284[_0x5c7939(0x162)]('\x0a')['trim'](),_0x27fd6f;}function normalizePermissions(_0x31efe4){const _0x77fc33=_0x4967,_0x30ad91=_0x31efe4[_0x77fc33(0x17d)]===_0x77fc33(0x172)||_0x31efe4[_0x77fc33(0x17d)]===_0x77fc33(0x14d)?_0x31efe4[_0x77fc33(0x17d)]:'subagent';return{'allowMutatingTools':_0x31efe4[_0x77fc33(0x152)]===!![],'executionTarget':_0x30ad91};}function normalizeTimeoutMs(_0x3659ed){const _0x3eb8c8=_0x4967;return typeof _0x3659ed==='number'&&Number[_0x3eb8c8(0x156)](_0x3659ed)&&_0x3659ed>=0x1?_0x3659ed:undefined;}function parseDoneWhen(_0x818f3c){const _0x28f3a5=_0x4967;if(!_0x818f3c?.[_0x28f3a5(0x167)]())return[];return _0x818f3c[_0x28f3a5(0x178)]('\x0a')[_0x28f3a5(0x17c)](_0x22658f=>/^\s*-\s+(.*\S)\s*$/[_0x28f3a5(0x15a)](_0x22658f)?.[0x1]?.[_0x28f3a5(0x167)]())[_0x28f3a5(0x17b)](_0xc83a86=>Boolean(_0xc83a86));}function requireSection(_0x212ae1,_0x3275df){const _0x433097=_0x4967,_0x397eaf=_0x212ae1[_0x3275df];if(!_0x397eaf?.[_0x433097(0x167)]())throw new Error(_0x433097(0x160)+humanizeSectionId(_0x3275df)+_0x433097(0x161));return _0x397eaf[_0x433097(0x167)]();}function humanizeSectionId(_0x43c4ef){const _0x4b1f8f=_0x4967;return _0x43c4ef[_0x4b1f8f(0x178)]('_')[_0x4b1f8f(0x17c)](_0x5140b6=>_0x5140b6[_0x4b1f8f(0x15b)](0x0,0x1)['toUpperCase']()+_0x5140b6['slice'](0x1))['join']('\x20');}function _0x5d4f(){const _0x4f76ed=['extname','8OLFskP','5411294fKFSNY','overview','allowMutatingTools','readFile','indexOf','6MrcOFG','isFinite','all','186IhmgMX','93080BfSJBx','exec','slice','string','replace','done_when','isArray','own-prose\x20agent\x20must\x20include\x20a\x20\x22##\x20','\x22\x20section','join','instructions','provider','1737695eMcTrY','push','trim','.md','\x0a---\x0a','29568924NicsfG','timeoutMs','fromEntries','model','14058216SRRDMh','name','335123sjJcMd','own-prose\x20agent\x20must\x20start\x20with\x20YAML\x20frontmatter','self','4rWpyne','role','object','description','---\x0a','split','agents','resolve','filter','map','executionTarget','basename','toLowerCase','6836010bdOrOU','subagent'];_0x5d4f=function(){return _0x4f76ed;};return _0x5d4f();}function optionalString(_0x4765e0){const _0x151a0c=_0x4967;return typeof _0x4765e0===_0x151a0c(0x15c)&&_0x4765e0[_0x151a0c(0x167)]()?_0x4765e0[_0x151a0c(0x167)]():undefined;}
1
+ (function(_0x38a9e2,_0x394957){const _0x2a3964=_0xedad,_0x5e4f70=_0x38a9e2();while(!![]){try{const _0x16498f=-parseInt(_0x2a3964(0xc7))/0x1+parseInt(_0x2a3964(0xb3))/0x2+-parseInt(_0x2a3964(0xa5))/0x3*(parseInt(_0x2a3964(0xad))/0x4)+-parseInt(_0x2a3964(0xa9))/0x5*(-parseInt(_0x2a3964(0xb2))/0x6)+-parseInt(_0x2a3964(0xb8))/0x7+parseInt(_0x2a3964(0xba))/0x8*(parseInt(_0x2a3964(0xcb))/0x9)+parseInt(_0x2a3964(0xc4))/0xa;if(_0x16498f===_0x394957)break;else _0x5e4f70['push'](_0x5e4f70['shift']());}catch(_0x551452){_0x5e4f70['push'](_0x5e4f70['shift']());}}}(_0x3f68,0x1ab07));import _0x2d453f from'node:fs/promises';import _0x36c09b from'node:path';function _0xedad(_0x5cc4f2,_0x18e641){_0x5cc4f2=_0x5cc4f2-0xa2;const _0x3f6813=_0x3f68();let _0xedad44=_0x3f6813[_0x5cc4f2];return _0xedad44;}import{parse as _0x1f837b}from'yaml';export async function parseAgentFile(_0x282196){const _0x4c5287=_0xedad,_0x51251e=_0x36c09b[_0x4c5287(0xac)](_0x282196),_0x55f4b6=await _0x2d453f[_0x4c5287(0xae)](_0x51251e,_0x4c5287(0xa2));return parseAgentMarkdown(_0x55f4b6,_0x51251e);}export async function loadAgents(_0x32adf3,_0x4231c5){const _0x5a4e86=_0xedad,_0x5ae50d=await Promise['all'](_0x32adf3['map'](async _0x2a5748=>[_0x2a5748,await parseAgentFile(_0x36c09b[_0x5a4e86(0xa3)](_0x4231c5,_0x5a4e86(0xb6),_0x2a5748+'.md'))]));return Object['fromEntries'](_0x5ae50d);}export function parseAgentMarkdown(_0x41efa8,_0x116200){const _0x2f2558=_0xedad,{frontmatter:_0x566e20,body:_0x16a73d}=splitFrontmatter(_0x41efa8),_0x1b4081=normalizeFrontmatter(_0x566e20),_0xa25e94=parseSections(_0x16a73d),_0x17054c=_0x36c09b[_0x2f2558(0xc6)](_0x116200,_0x36c09b['extname'](_0x116200)),_0x4579f2=optionalString(_0x1b4081[_0x2f2558(0xaa)])??_0x17054c;return{'id':_0x17054c,'name':_0x4579f2,'description':optionalString(_0x1b4081[_0x2f2558(0xc5)]),'sourcePath':_0x116200,'provider':optionalString(_0x1b4081[_0x2f2558(0xc3)]),'model':optionalString(_0x1b4081['model']),'timeoutMs':normalizeTimeoutMs(_0x1b4081['timeoutMs']),'permissions':normalizePermissions({'allowMutatingTools':_0x1b4081[_0x2f2558(0xaf)],'executionTarget':_0x1b4081[_0x2f2558(0xbe)]}),'role':requireSection(_0xa25e94,_0x2f2558(0xc1)),'instructions':requireSection(_0xa25e94,_0x2f2558(0xca)),'doneWhen':parseDoneWhen(_0xa25e94['done_when'])};}function splitFrontmatter(_0x4c6aeb){const _0x596db5=_0xedad,_0x2a6930=_0x4c6aeb[_0x596db5(0xb7)](/\r\n/g,'\x0a');if(!_0x2a6930[_0x596db5(0xbd)]('---\x0a'))throw new Error(_0x596db5(0xa8));const _0x354d7d=_0x2a6930['indexOf']('\x0a---\x0a',0x4);if(_0x354d7d<0x0)throw new Error(_0x596db5(0xbc));return{'frontmatter':_0x1f837b(_0x2a6930[_0x596db5(0xc0)](0x4,_0x354d7d)),'body':_0x2a6930['slice'](_0x354d7d+0x5)[_0x596db5(0xcc)]()};}function normalizeFrontmatter(_0xbc873b){const _0xa0257a=_0xedad;if(!_0xbc873b||typeof _0xbc873b!=='object'||Array[_0xa0257a(0xc2)](_0xbc873b))throw new Error(_0xa0257a(0xbb));return _0xbc873b;}function parseSections(_0x1d5f06){const _0x44ca15=_0xedad,_0x58713c={},_0x54f962=_0x1d5f06[_0x44ca15(0xab)]('\x0a');let _0x2f01ad='overview',_0x44492b=[];for(const _0x406adc of _0x54f962){const _0x26eff1=/^##\s+(.+?)\s*$/['exec'](_0x406adc);if(_0x26eff1){_0x58713c[_0x2f01ad]=_0x44492b[_0x44ca15(0xa3)]('\x0a')['trim'](),_0x2f01ad=_0x26eff1[0x1]['trim']()[_0x44ca15(0xa6)]()['replace'](/[^a-z0-9]+/g,'_')['replace'](/^_+|_+$/g,''),_0x44492b=[];continue;}_0x44492b['push'](_0x406adc);}return _0x58713c[_0x2f01ad]=_0x44492b[_0x44ca15(0xa3)]('\x0a')[_0x44ca15(0xcc)](),_0x58713c;}function normalizePermissions(_0x56e0e5){const _0x40cc98=_0xedad,_0x37b1e1=_0x56e0e5[_0x40cc98(0xbe)]===_0x40cc98(0xb5)||_0x56e0e5['executionTarget']===_0x40cc98(0xc8)?_0x56e0e5[_0x40cc98(0xbe)]:_0x40cc98(0xc8);return{'allowMutatingTools':_0x56e0e5[_0x40cc98(0xaf)]===!![],'executionTarget':_0x37b1e1};}function _0x3f68(){const _0x179b09=['\x22\x20section','own-prose\x20agent\x20must\x20start\x20with\x20YAML\x20frontmatter','305170GSIZnl','name','split','resolve','4gXnlvW','readFile','allowMutatingTools','exec','toUpperCase','12oEXkzD','287246qTLisn','own-prose\x20agent\x20must\x20include\x20a\x20\x22##\x20','self','agents','replace','535346NVSbGb','map','8YgmYFx','own-prose\x20agent\x20frontmatter\x20must\x20be\x20a\x20YAML\x20object','own-prose\x20agent\x20frontmatter\x20is\x20missing\x20a\x20closing\x20---\x20line','startsWith','executionTarget','isFinite','slice','role','isArray','provider','2017350RApYbH','description','basename','158811IvgObj','subagent','filter','instructions','137007wTzaES','trim','utf8','join','string','414123QavdoF','toLowerCase'];_0x3f68=function(){return _0x179b09;};return _0x3f68();}function normalizeTimeoutMs(_0x1a2d49){const _0x37b354=_0xedad;return typeof _0x1a2d49==='number'&&Number[_0x37b354(0xbf)](_0x1a2d49)&&_0x1a2d49>=0x1?_0x1a2d49:undefined;}function parseDoneWhen(_0xf573fb){const _0x2d1ad5=_0xedad;if(!_0xf573fb?.[_0x2d1ad5(0xcc)]())return[];return _0xf573fb[_0x2d1ad5(0xab)]('\x0a')[_0x2d1ad5(0xb9)](_0x3ec4bf=>/^\s*-\s+(.*\S)\s*$/[_0x2d1ad5(0xb0)](_0x3ec4bf)?.[0x1]?.['trim']())[_0x2d1ad5(0xc9)](_0x35144b=>Boolean(_0x35144b));}function requireSection(_0x31cd10,_0x167629){const _0xe6d476=_0xedad,_0x59b8d8=_0x31cd10[_0x167629];if(!_0x59b8d8?.[_0xe6d476(0xcc)]())throw new Error(_0xe6d476(0xb4)+humanizeSectionId(_0x167629)+_0xe6d476(0xa7));return _0x59b8d8['trim']();}function humanizeSectionId(_0xebb83f){const _0x40df16=_0xedad;return _0xebb83f['split']('_')['map'](_0x329b6e=>_0x329b6e['slice'](0x0,0x1)[_0x40df16(0xb1)]()+_0x329b6e['slice'](0x1))['join']('\x20');}function optionalString(_0x31ced6){const _0x3bf538=_0xedad;return typeof _0x31ced6===_0x3bf538(0xa4)&&_0x31ced6['trim']()?_0x31ced6[_0x3bf538(0xcc)]():undefined;}
@@ -1 +1 @@
1
- function _0x7619(){const _0x3509d0=['766537sIOFIg','3Lyvoln','5856004iXYIMW','107320UnSSbG','1899994gTGkDD','cwd','ignore','408aBViPW','5900510HxGfEY','6JfQPps','--run-dir','55820fxgNoV','4391670pumLPi','459sZhoVX','unref','execPath'];_0x7619=function(){return _0x3509d0;};return _0x7619();}function _0x4d29(_0xb1be65,_0x302689){_0xb1be65=_0xb1be65-0x158;const _0x761952=_0x7619();let _0x4d293a=_0x761952[_0xb1be65];return _0x4d293a;}(function(_0x1fe5b6,_0x1b4d76){const _0x2e1765=_0x4d29,_0x52029a=_0x1fe5b6();while(!![]){try{const _0x2be8da=parseInt(_0x2e1765(0x15c))/0x1+-parseInt(_0x2e1765(0x160))/0x2*(-parseInt(_0x2e1765(0x15d))/0x3)+parseInt(_0x2e1765(0x163))/0x4*(-parseInt(_0x2e1765(0x167))/0x5)+-parseInt(_0x2e1765(0x165))/0x6*(-parseInt(_0x2e1765(0x164))/0x7)+parseInt(_0x2e1765(0x15f))/0x8*(-parseInt(_0x2e1765(0x159))/0x9)+-parseInt(_0x2e1765(0x158))/0xa+parseInt(_0x2e1765(0x15e))/0xb;if(_0x2be8da===_0x1b4d76)break;else _0x52029a['push'](_0x52029a['shift']());}catch(_0x21ac79){_0x52029a['push'](_0x52029a['shift']());}}}(_0x7619,0xca948));import{spawn}from'node:child_process';import{fileURLToPath}from'node:url';export function spawnOwnProseCleanupProcess(_0x6130db){const _0x36accd=_0x4d29,_0x361587=fileURLToPath(new URL('./background-cleanup-worker.js',import.meta.url)),_0x32a3da=spawn(process[_0x36accd(0x15b)],[_0x361587,_0x36accd(0x166),_0x6130db],{'cwd':process[_0x36accd(0x161)](),'detached':!![],'stdio':_0x36accd(0x162),'env':process.env});return _0x32a3da[_0x36accd(0x15a)](),!![];}
1
+ function _0x5b6b(){const _0x4d28f2=['cwd','562014zjZbqI','1701628BcZZUM','./background-cleanup-worker.js','99454RkEFjL','1426736CXquUY','469625QqAoNL','416382TdVuDg','1ueEKdR','execPath','7DyBwZl','2559558nBnCMz','ignore'];_0x5b6b=function(){return _0x4d28f2;};return _0x5b6b();}(function(_0x7bf2c3,_0x11aee6){const _0x366215=_0x4e94,_0x112175=_0x7bf2c3();while(!![]){try{const _0x1eed6b=-parseInt(_0x366215(0x17c))/0x1*(parseInt(_0x366215(0x185))/0x2)+parseInt(_0x366215(0x17b))/0x3+-parseInt(_0x366215(0x183))/0x4+-parseInt(_0x366215(0x17a))/0x5+parseInt(_0x366215(0x17f))/0x6+parseInt(_0x366215(0x17e))/0x7*(parseInt(_0x366215(0x186))/0x8)+parseInt(_0x366215(0x182))/0x9;if(_0x1eed6b===_0x11aee6)break;else _0x112175['push'](_0x112175['shift']());}catch(_0x52c1a6){_0x112175['push'](_0x112175['shift']());}}}(_0x5b6b,0x39e3c));function _0x4e94(_0xe8c24c,_0x3b1c2e){_0xe8c24c=_0xe8c24c-0x17a;const _0x5b6b04=_0x5b6b();let _0x4e9458=_0x5b6b04[_0xe8c24c];return _0x4e9458;}import{spawn}from'node:child_process';import{fileURLToPath}from'node:url';export function spawnOwnProseCleanupProcess(_0x117c00){const _0x23b091=_0x4e94,_0x2aee9c=fileURLToPath(new URL(_0x23b091(0x184),import.meta.url)),_0x517faa=spawn(process[_0x23b091(0x17d)],[_0x2aee9c,'--run-dir',_0x117c00],{'cwd':process[_0x23b091(0x181)](),'detached':!![],'stdio':_0x23b091(0x180),'env':process.env});return _0x517faa['unref'](),!![];}
@@ -1 +1 @@
1
- (function(_0x102ed5,_0xbec79f){const _0xbd0376=_0xc46e,_0x53f83a=_0x102ed5();while(!![]){try{const _0x7ca78b=-parseInt(_0xbd0376(0x203))/0x1+-parseInt(_0xbd0376(0x1f8))/0x2*(-parseInt(_0xbd0376(0x1f5))/0x3)+-parseInt(_0xbd0376(0x1ff))/0x4*(-parseInt(_0xbd0376(0x1fe))/0x5)+-parseInt(_0xbd0376(0x1fa))/0x6*(-parseInt(_0xbd0376(0x202))/0x7)+parseInt(_0xbd0376(0x1f4))/0x8*(-parseInt(_0xbd0376(0x1f6))/0x9)+parseInt(_0xbd0376(0x205))/0xa+parseInt(_0xbd0376(0x1fb))/0xb*(parseInt(_0xbd0376(0x1f9))/0xc);if(_0x7ca78b===_0xbec79f)break;else _0x53f83a['push'](_0x53f83a['shift']());}catch(_0x48ea8a){_0x53f83a['push'](_0x53f83a['shift']());}}}(_0xdb8a,0x22d61));function _0xdb8a(){const _0x3cc062=['6492XFliTG','catch','sessionKey','413IkbSxo','223675HJZcXN','status','814720yJNNVb','exitCode','running','661208eyVcou','33897YJAmey','9kTvBhq','slice','2fTtosD','312864JgAvJe','8250oIQcLT','88CwEsio','trim','argv','205rNeqIX'];_0xdb8a=function(){return _0x3cc062;};return _0xdb8a();}import{deleteAgentSession,hasAgentSession}from'./agent-notify.js';function _0xc46e(_0x57eaad,_0x311a01){_0x57eaad=_0x57eaad-0x1f3;const _0xdb8aa1=_0xdb8a();let _0xc46e93=_0xdb8aa1[_0x57eaad];return _0xc46e93;}import{readRunState}from'./state-store.js';const SESSION_CLEANUP_RECHECK_DELAYS_MS=[0x32,0x64,0xc8],BACKGROUND_STATE_SETTLE_RETRY_DELAY_MS=0xc8,BACKGROUND_STATE_SETTLE_RETRY_COUNT=0x19;async function main(){const _0x421aeb=_0xc46e,_0x18ded5=parseRunDir(process[_0x421aeb(0x1fd)][_0x421aeb(0x1f7)](0x2)),_0x3a64fb=await waitForBackgroundRunToSettle(_0x18ded5);if(!_0x3a64fb||_0x3a64fb[_0x421aeb(0x204)]===_0x421aeb(0x1f3))return;const _0x2fc82e=_0x3a64fb['background']?.['supervisor']?.[_0x421aeb(0x201)]?.[_0x421aeb(0x1fc)]();if(!_0x2fc82e)return;await cleanupSession(_0x2fc82e);}function parseRunDir(_0x543634){const _0x277621=_0xc46e,_0x534806=_0x543634['indexOf']('--run-dir'),_0xbc6d69=_0x534806>=0x0?_0x543634[_0x534806+0x1]:undefined;if(!_0xbc6d69?.[_0x277621(0x1fc)]())throw new Error('--run-dir\x20required');return _0xbc6d69[_0x277621(0x1fc)]();}async function waitForBackgroundRunToSettle(_0x230687){const _0x48b453=_0xc46e;let _0x5eebbf=await readRunState(_0x230687)[_0x48b453(0x200)](()=>undefined);for(let _0x38ba8f=0x0;_0x38ba8f<BACKGROUND_STATE_SETTLE_RETRY_COUNT;_0x38ba8f+=0x1){if(!_0x5eebbf||_0x5eebbf['status']!=='running')return _0x5eebbf;await sleep(BACKGROUND_STATE_SETTLE_RETRY_DELAY_MS),_0x5eebbf=await readRunState(_0x230687)['catch'](()=>_0x5eebbf);}return _0x5eebbf;}async function cleanupSession(_0x40de73){await deleteSession(_0x40de73);let _0x2fd17d=0x0;for(const _0x240e40 of SESSION_CLEANUP_RECHECK_DELAYS_MS){await sleep(_0x240e40);const _0x5c8da0=await probeSession(_0x40de73);if(_0x5c8da0!==!![]){_0x2fd17d+=0x1;if(_0x2fd17d>=0x2)return;continue;}_0x2fd17d=0x0,await deleteSession(_0x40de73);}}async function deleteSession(_0x1feb36){try{await deleteAgentSession({'sessionKey':_0x1feb36,'deleteTranscript':!![]});}catch{}}async function probeSession(_0x39365f){try{return await hasAgentSession({'sessionKey':_0x39365f});}catch{return undefined;}}function sleep(_0x4a3c3e){return new Promise(_0x2be9b1=>setTimeout(_0x2be9b1,_0x4a3c3e));}await main()['catch'](()=>{const _0x4fb7fe=_0xc46e;process[_0x4fb7fe(0x206)]=0x1;});
1
+ function _0x427b(){const _0x5c8178=['175660bKYlfy','catch','--run-dir\x20required','exitCode','supervisor','615792cWnBbS','background','620109PfWDwu','2445864YFNPZM','571543EFcFgW','indexOf','running','8hglRic','45nqPYTf','473PgEmDa','status','979476NXrguH','slice','5232438FQgpeA','trim','56iyrxEM','--run-dir'];_0x427b=function(){return _0x5c8178;};return _0x427b();}const _0xb1b4b9=_0x43a1;function _0x43a1(_0x339ae8,_0x58cb84){_0x339ae8=_0x339ae8-0xe0;const _0x427b28=_0x427b();let _0x43a15f=_0x427b28[_0x339ae8];return _0x43a15f;}(function(_0x231186,_0x4cd968){const _0x3ccc68=_0x43a1,_0x379a7d=_0x231186();while(!![]){try{const _0x438fcb=parseInt(_0x3ccc68(0xf2))/0x1+-parseInt(_0x3ccc68(0xf5))/0x2*(parseInt(_0x3ccc68(0xf0))/0x3)+parseInt(_0x3ccc68(0xee))/0x4*(-parseInt(_0x3ccc68(0xe0))/0x5)+parseInt(_0x3ccc68(0xe3))/0x6*(parseInt(_0x3ccc68(0xe7))/0x7)+-parseInt(_0x3ccc68(0xf1))/0x8+parseInt(_0x3ccc68(0xe5))/0x9+-parseInt(_0x3ccc68(0xe9))/0xa*(-parseInt(_0x3ccc68(0xe1))/0xb);if(_0x438fcb===_0x4cd968)break;else _0x379a7d['push'](_0x379a7d['shift']());}catch(_0x476d8e){_0x379a7d['push'](_0x379a7d['shift']());}}}(_0x427b,0xa9f5a));import{deleteAgentSession,hasAgentSession}from'./agent-notify.js';import{readRunState}from'./state-store.js';const SESSION_CLEANUP_RECHECK_DELAYS_MS=[0x32,0x64,0xc8],BACKGROUND_STATE_SETTLE_RETRY_DELAY_MS=0xc8,BACKGROUND_STATE_SETTLE_RETRY_COUNT=0x19;async function main(){const _0x365e8d=_0x43a1,_0x32334e=parseRunDir(process['argv'][_0x365e8d(0xe4)](0x2)),_0x1b27bc=await waitForBackgroundRunToSettle(_0x32334e);if(!_0x1b27bc||_0x1b27bc[_0x365e8d(0xe2)]==='running')return;const _0x453a8c=_0x1b27bc[_0x365e8d(0xef)]?.[_0x365e8d(0xed)]?.['sessionKey']?.[_0x365e8d(0xe6)]();if(!_0x453a8c)return;await cleanupSession(_0x453a8c);}function parseRunDir(_0x21523d){const _0x5b9beb=_0x43a1,_0x51e533=_0x21523d[_0x5b9beb(0xf3)](_0x5b9beb(0xe8)),_0xeb92b4=_0x51e533>=0x0?_0x21523d[_0x51e533+0x1]:undefined;if(!_0xeb92b4?.[_0x5b9beb(0xe6)]())throw new Error(_0x5b9beb(0xeb));return _0xeb92b4['trim']();}async function waitForBackgroundRunToSettle(_0x5e5263){const _0x2c03e9=_0x43a1;let _0x5bcf9d=await readRunState(_0x5e5263)[_0x2c03e9(0xea)](()=>undefined);for(let _0x248bbb=0x0;_0x248bbb<BACKGROUND_STATE_SETTLE_RETRY_COUNT;_0x248bbb+=0x1){if(!_0x5bcf9d||_0x5bcf9d['status']!==_0x2c03e9(0xf4))return _0x5bcf9d;await sleep(BACKGROUND_STATE_SETTLE_RETRY_DELAY_MS),_0x5bcf9d=await readRunState(_0x5e5263)[_0x2c03e9(0xea)](()=>_0x5bcf9d);}return _0x5bcf9d;}async function cleanupSession(_0x2ee474){await deleteSession(_0x2ee474);let _0x504e7d=0x0;for(const _0xe19f2a of SESSION_CLEANUP_RECHECK_DELAYS_MS){await sleep(_0xe19f2a);const _0x3c4795=await probeSession(_0x2ee474);if(_0x3c4795!==!![]){_0x504e7d+=0x1;if(_0x504e7d>=0x2)return;continue;}_0x504e7d=0x0,await deleteSession(_0x2ee474);}}async function deleteSession(_0x2f09de){try{await deleteAgentSession({'sessionKey':_0x2f09de,'deleteTranscript':!![]});}catch{}}async function probeSession(_0x115dca){try{return await hasAgentSession({'sessionKey':_0x115dca});}catch{return undefined;}}function sleep(_0x5221cc){return new Promise(_0x21b20a=>setTimeout(_0x21b20a,_0x5221cc));}await main()[_0xb1b4b9(0xea)](()=>{const _0x203110=_0xb1b4b9;process[_0x203110(0xec)]=0x1;});
package/dist/src/cli.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4ba442,_0x55b423){const _0x59ba1f=_0x6032,_0x2b0158=_0x4ba442();while(!![]){try{const _0x58317e=parseInt(_0x59ba1f(0xba))/0x1*(parseInt(_0x59ba1f(0xc7))/0x2)+parseInt(_0x59ba1f(0xbd))/0x3+parseInt(_0x59ba1f(0xaf))/0x4+parseInt(_0x59ba1f(0xb1))/0x5*(-parseInt(_0x59ba1f(0x8c))/0x6)+parseInt(_0x59ba1f(0xc8))/0x7+-parseInt(_0x59ba1f(0xa4))/0x8*(parseInt(_0x59ba1f(0xd0))/0x9)+-parseInt(_0x59ba1f(0x87))/0xa;if(_0x58317e===_0x55b423)break;else _0x2b0158['push'](_0x2b0158['shift']());}catch(_0x1f722e){_0x2b0158['push'](_0x2b0158['shift']());}}}(_0x8728,0x9ae73));import{spawn}from'node:child_process';import{compileOwnProseProgram,driveOwnProseProgram,inspectOwnProseProgramFile,loadOwnProseRunState,renderOwnProseStatus,resumeOwnProseBackgroundRun,startOwnProseProgram}from'./execution.js';function _0x6032(_0x54cf3b,_0x118c49){_0x54cf3b=_0x54cf3b-0x80;const _0x8728c7=_0x8728();let _0x603288=_0x8728c7[_0x54cf3b];return _0x603288;}function _0x8728(){const _0x78b34e=['own-prose','Agents:\x20','push','option','5315430zFHGQd','start','join','Override\x20model','program','2307666qRtxvG','--input\x20<key=value>','caller_session','Path\x20to\x20the\x20Markdown\x20program','--run-dir\x20<path>','Explicit\x20run\x20directory','isArray','Parse\x20a\x20workflow\x20definition\x20without\x20compiling\x20or\x20running\x20it','Print\x20raw\x20JSON','stdout','jsonInput','model','Invalid\x20--input\x20value\x20\x22','Full\x20input\x20object\x20as\x20JSON','Repeatable\x20input\x20value','input','--run-dir','cwd','argument','fromEntries','action','--json-input\x20must\x20decode\x20to\x20an\x20object','compile','provider','8IQgfpj','Override\x20model\x20provider','command','Compile\x20a\x20workflow\x20into\x20a\x20structured\x20execution\x20plan','slice','goal','json','Run\x20id','--model\x20<model>','Workflow:\x20','--provider\x20<provider>','2294828KGpnSU','Compile\x20and\x20execute\x20natural-language\x20own-prose\x20workflows','5RRkkGW','argv','Compile\x20and\x20start\x20a\x20workflow\x20in\x20the\x20background','runId','background','workflow','write','none','<runId>','48293ukDfAp','parse','Compile\x20and\x20execute\x20a\x20workflow\x20end-to-end','43665LDPtkK','runDir','ignore','queued','map','stringify','state','--json','execPath','drive','26LMhPIU','7856443WTwgJG','inspect','description','--json-input\x20<json>','status','resume','\x22.\x20Expected\x20key=value','Program:\x20','7090047TTgBEf','Resume\x20a\x20queued\x20own-prose\x20background\x20run','name','Goal:\x20','plan','<program>'];_0x8728=function(){return _0x78b34e;};return _0x8728();}export function registerOwnProseCli(_0x4d0858,_0x444b1e){const _0x16a975=_0x6032,_0x2a595f=_0x4d0858[_0x16a975(0xa6)](_0x16a975(0x83))['description'](_0x16a975(0xb0));_0x2a595f[_0x16a975(0xa6)](_0x16a975(0x88))[_0x16a975(0xca)](_0x16a975(0xb3))['argument'](_0x16a975(0x82),_0x16a975(0x8f))['option']('--input\x20<key=value>',_0x16a975(0x9a),collectOption,[])[_0x16a975(0x86)](_0x16a975(0xcb),_0x16a975(0x99))[_0x16a975(0x86)](_0x16a975(0xae),_0x16a975(0xa5))['option'](_0x16a975(0xac),_0x16a975(0x8a))[_0x16a975(0x86)](_0x16a975(0xc4),'Print\x20raw\x20JSON',![])[_0x16a975(0xa0)](async(_0x4c093f,_0x5371c8)=>{const _0xb26f1d=_0x16a975,_0x517867=resolveInputOptions(_0x5371c8),_0x417c36=await startOwnProseProgram({'api':_0x444b1e,'workspaceDir':process[_0xb26f1d(0x9d)](),'programPath':_0x4c093f,'inputs':_0x517867,'callerProvider':_0x5371c8[_0xb26f1d(0xa3)],'callerModel':_0x5371c8[_0xb26f1d(0x97)],'callerModelSource':_0x5371c8[_0xb26f1d(0xa3)]||_0x5371c8[_0xb26f1d(0x97)]?'caller_session':undefined});_0x417c36['state'][_0xb26f1d(0xb5)]?.[_0xb26f1d(0xcc)]===_0xb26f1d(0xc0)&&spawnOwnProseResumeProcess(_0x417c36[_0xb26f1d(0xb4)],_0x417c36[_0xb26f1d(0xbe)]);if(_0x5371c8['json']){process[_0xb26f1d(0x95)][_0xb26f1d(0xb7)](JSON[_0xb26f1d(0xc2)](_0x417c36,null,0x2)+'\x0a');return;}process['stdout']['write'](renderOwnProseStatus(_0x417c36['state'])+'\x0a');}),_0x2a595f[_0x16a975(0xa6)](_0x16a975(0xc6))[_0x16a975(0xca)](_0x16a975(0xbc))[_0x16a975(0x9e)](_0x16a975(0x82),'Path\x20to\x20the\x20Markdown\x20program')[_0x16a975(0x86)](_0x16a975(0x8d),_0x16a975(0x9a),collectOption,[])['option'](_0x16a975(0xcb),_0x16a975(0x99))[_0x16a975(0x86)]('--provider\x20<provider>',_0x16a975(0xa5))['option'](_0x16a975(0xac),_0x16a975(0x8a))[_0x16a975(0x86)](_0x16a975(0xc4),_0x16a975(0x94),![])[_0x16a975(0xa0)](async(_0x234106,_0x29b7f2)=>{const _0x54ac23=_0x16a975,_0x350ff0=resolveInputOptions(_0x29b7f2),_0xda0074=await driveOwnProseProgram({'api':_0x444b1e,'workspaceDir':process[_0x54ac23(0x9d)](),'programPath':_0x234106,'inputs':_0x350ff0,'callerProvider':_0x29b7f2[_0x54ac23(0xa3)],'callerModel':_0x29b7f2[_0x54ac23(0x97)],'callerModelSource':_0x29b7f2[_0x54ac23(0xa3)]||_0x29b7f2[_0x54ac23(0x97)]?_0x54ac23(0x8e):undefined});if(_0x29b7f2[_0x54ac23(0xaa)]){process[_0x54ac23(0x95)][_0x54ac23(0xb7)](JSON['stringify'](_0xda0074,null,0x2)+'\x0a');return;}process['stdout'][_0x54ac23(0xb7)](renderOwnProseStatus(_0xda0074['state'])+'\x0a');}),_0x2a595f[_0x16a975(0xa6)](_0x16a975(0xa2))[_0x16a975(0xca)](_0x16a975(0xa7))['argument'](_0x16a975(0x82),_0x16a975(0x8f))['option'](_0x16a975(0xae),'Override\x20model\x20provider')[_0x16a975(0x86)]('--model\x20<model>',_0x16a975(0x8a))[_0x16a975(0x86)](_0x16a975(0xc4),_0x16a975(0x94),![])[_0x16a975(0xa0)](async(_0x24407b,_0x4dae0f)=>{const _0x5763b0=_0x16a975,_0x502d91=await compileOwnProseProgram({'api':_0x444b1e,'workspaceDir':process[_0x5763b0(0x9d)](),'programPath':_0x24407b,'callerProvider':_0x4dae0f['provider'],'callerModel':_0x4dae0f['model']});if(_0x4dae0f[_0x5763b0(0xaa)]){process['stdout'][_0x5763b0(0xb7)](JSON['stringify'](_0x502d91,null,0x2)+'\x0a');return;}process['stdout'][_0x5763b0(0xb7)](JSON[_0x5763b0(0xc2)](_0x502d91[_0x5763b0(0x81)],null,0x2)+'\x0a');}),_0x2a595f[_0x16a975(0xa6)](_0x16a975(0xcd))['description'](_0x16a975(0xd1))['argument']('<runId>',_0x16a975(0xab))[_0x16a975(0x86)](_0x16a975(0x90),_0x16a975(0x91))['option'](_0x16a975(0xc4),'Print\x20raw\x20JSON',![])['action'](async(_0x124270,_0x5329a4)=>{const _0x5a7706=_0x16a975,_0x5447c2=await resumeOwnProseBackgroundRun({'api':_0x444b1e,'workspaceDir':process[_0x5a7706(0x9d)](),'runId':_0x124270,'runDir':_0x5329a4[_0x5a7706(0xbe)]});if(_0x5329a4[_0x5a7706(0xaa)]){process[_0x5a7706(0x95)]['write'](JSON['stringify'](_0x5447c2,null,0x2)+'\x0a');return;}process[_0x5a7706(0x95)][_0x5a7706(0xb7)](renderOwnProseStatus(_0x5447c2[_0x5a7706(0xc3)])+'\x0a');}),_0x2a595f[_0x16a975(0xa6)](_0x16a975(0xcc))[_0x16a975(0xca)]('Show\x20the\x20current\x20state\x20of\x20an\x20own-prose\x20run')[_0x16a975(0x9e)](_0x16a975(0xb9),'Run\x20id')[_0x16a975(0x86)](_0x16a975(0xc4),_0x16a975(0x94),![])[_0x16a975(0xa0)](async(_0x1740b1,_0xab9931)=>{const _0xf07aad=_0x16a975,{state:_0x286607,plan:_0x25ee47}=await loadOwnProseRunState(process['cwd'](),_0x444b1e['pluginConfig'],_0x1740b1);if(_0xab9931[_0xf07aad(0xaa)]){process[_0xf07aad(0x95)][_0xf07aad(0xb7)](JSON[_0xf07aad(0xc2)]({'state':_0x286607,'plan':_0x25ee47},null,0x2)+'\x0a');return;}process['stdout'][_0xf07aad(0xb7)](renderOwnProseStatus(_0x286607)+'\x0a');}),_0x2a595f[_0x16a975(0xa6)](_0x16a975(0xc9))[_0x16a975(0xca)](_0x16a975(0x93))['argument'](_0x16a975(0x82),_0x16a975(0x8f))['option'](_0x16a975(0xc4),_0x16a975(0x94),![])[_0x16a975(0xa0)](async(_0x983364,_0x53ab8e)=>{const _0x32bf64=_0x16a975,_0x357c65=_0x983364,_0x405c57=await inspectOwnProseProgramFile(_0x357c65);if(_0x53ab8e[_0x32bf64(0xaa)]){process[_0x32bf64(0x95)][_0x32bf64(0xb7)](JSON['stringify'](_0x405c57,null,0x2)+'\x0a');return;}process['stdout'][_0x32bf64(0xb7)]([_0x32bf64(0xcf)+_0x405c57[_0x32bf64(0x8b)][_0x32bf64(0xd2)],_0x32bf64(0x84)+(_0x405c57[_0x32bf64(0x8b)]['agentIds']['join'](',\x20')||_0x32bf64(0xb8)),_0x32bf64(0x80)+_0x405c57['program'][_0x32bf64(0xa9)],_0x32bf64(0xad)+_0x405c57[_0x32bf64(0x8b)][_0x32bf64(0xb6)]][_0x32bf64(0x89)]('\x0a')+'\x0a');});}function spawnOwnProseResumeProcess(_0x251477,_0x230c3b){const _0x47aeb2=_0x6032,_0x2b102e=process[_0x47aeb2(0xb2)][0x1];if(!_0x2b102e)return;const _0x287b6e=spawn(process[_0x47aeb2(0xc5)],[_0x2b102e,_0x47aeb2(0x83),_0x47aeb2(0xcd),_0x251477,_0x47aeb2(0x9c),_0x230c3b,_0x47aeb2(0xc4)],{'cwd':process[_0x47aeb2(0x9d)](),'detached':!![],'stdio':_0x47aeb2(0xbf),'env':process.env});_0x287b6e['unref']();}function collectOption(_0x5b84c6,_0x25e889){const _0x3b17c0=_0x6032;return _0x25e889[_0x3b17c0(0x85)](_0x5b84c6),_0x25e889;}function resolveInputOptions(_0x31c57c){const _0x2d539e=_0x6032,_0x21ea9a=Object[_0x2d539e(0x9f)]((_0x31c57c[_0x2d539e(0x9b)]??[])[_0x2d539e(0xc1)](_0x4391a6=>{const _0x3ac08b=_0x2d539e,_0x567714=_0x4391a6['indexOf']('=');if(_0x567714<=0x0)throw new Error(_0x3ac08b(0x98)+_0x4391a6+_0x3ac08b(0xce));return[_0x4391a6[_0x3ac08b(0xa8)](0x0,_0x567714),_0x4391a6[_0x3ac08b(0xa8)](_0x567714+0x1)];}));if(!_0x31c57c[_0x2d539e(0x96)])return _0x21ea9a;const _0x5ea7e0=JSON[_0x2d539e(0xbb)](_0x31c57c['jsonInput']);if(!_0x5ea7e0||typeof _0x5ea7e0!=='object'||Array[_0x2d539e(0x92)](_0x5ea7e0))throw new Error(_0x2d539e(0xa1));return{..._0x21ea9a,..._0x5ea7e0};}
1
+ (function(_0x1fb8ec,_0x1f151b){const _0x25f35e=_0x2bac,_0x585e54=_0x1fb8ec();while(!![]){try{const _0x1ddbf6=parseInt(_0x25f35e(0x220))/0x1+parseInt(_0x25f35e(0x1f9))/0x2*(-parseInt(_0x25f35e(0x20c))/0x3)+-parseInt(_0x25f35e(0x224))/0x4+-parseInt(_0x25f35e(0x221))/0x5+-parseInt(_0x25f35e(0x204))/0x6*(-parseInt(_0x25f35e(0x1fb))/0x7)+parseInt(_0x25f35e(0x226))/0x8*(-parseInt(_0x25f35e(0x225))/0x9)+-parseInt(_0x25f35e(0x1fe))/0xa*(-parseInt(_0x25f35e(0x209))/0xb);if(_0x1ddbf6===_0x1f151b)break;else _0x585e54['push'](_0x585e54['shift']());}catch(_0x2fb07b){_0x585e54['push'](_0x585e54['shift']());}}}(_0x52b3,0x75616));import{spawn}from'node:child_process';import{compileOwnProseProgram,driveOwnProseProgram,inspectOwnProseProgramFile,loadOwnProseRunState,replyOwnProseRun,renderOwnProseStatus,resumeOwnProseBackgroundRun,startOwnProseProgram}from'./execution.js';export function registerOwnProseCli(_0x426662,_0x4a320b){const _0x3a7f02=_0x2bac,_0x59f3ce=_0x426662[_0x3a7f02(0x210)](_0x3a7f02(0x229))[_0x3a7f02(0x22b)](_0x3a7f02(0x205));_0x59f3ce[_0x3a7f02(0x210)](_0x3a7f02(0x239))[_0x3a7f02(0x22b)]('Compile\x20and\x20start\x20a\x20workflow\x20in\x20the\x20background')[_0x3a7f02(0x230)](_0x3a7f02(0x219),_0x3a7f02(0x1fa))[_0x3a7f02(0x238)](_0x3a7f02(0x22f),_0x3a7f02(0x21e),collectOption,[])[_0x3a7f02(0x238)](_0x3a7f02(0x214),_0x3a7f02(0x206))[_0x3a7f02(0x238)]('--json',_0x3a7f02(0x236),![])['action'](async(_0x18a9bf,_0x4923fb)=>{const _0x3b74da=_0x3a7f02,_0x4b24d6=resolveInputOptions(_0x4923fb),_0x54a0f2=await startOwnProseProgram({'api':_0x4a320b,'workspaceDir':process[_0x3b74da(0x232)](),'programPath':_0x18a9bf,'inputs':_0x4b24d6});_0x54a0f2['state'][_0x3b74da(0x20a)]?.[_0x3b74da(0x22c)]===_0x3b74da(0x208)&&spawnOwnProseResumeProcess(_0x54a0f2['runId'],_0x54a0f2['runDir']);if(_0x4923fb['json']){process['stdout'][_0x3b74da(0x223)](JSON['stringify'](_0x54a0f2,null,0x2)+'\x0a');return;}process[_0x3b74da(0x207)]['write'](renderOwnProseStatus(_0x54a0f2[_0x3b74da(0x227)])+'\x0a');}),_0x59f3ce['command']('drive')[_0x3a7f02(0x22b)]('Compile\x20and\x20execute\x20a\x20workflow\x20end-to-end')[_0x3a7f02(0x230)](_0x3a7f02(0x219),_0x3a7f02(0x1fa))[_0x3a7f02(0x238)](_0x3a7f02(0x22f),_0x3a7f02(0x21e),collectOption,[])[_0x3a7f02(0x238)](_0x3a7f02(0x214),_0x3a7f02(0x206))['option'](_0x3a7f02(0x235),'Print\x20raw\x20JSON',![])['action'](async(_0x4c22c6,_0x3e657d)=>{const _0x314aa8=_0x3a7f02,_0x4d2408=resolveInputOptions(_0x3e657d),_0x346d00=await driveOwnProseProgram({'api':_0x4a320b,'workspaceDir':process[_0x314aa8(0x232)](),'programPath':_0x4c22c6,'inputs':_0x4d2408});if(_0x3e657d['json']){process[_0x314aa8(0x207)][_0x314aa8(0x223)](JSON[_0x314aa8(0x228)](_0x346d00,null,0x2)+'\x0a');return;}process[_0x314aa8(0x207)]['write'](renderOwnProseStatus(_0x346d00[_0x314aa8(0x227)])+'\x0a');}),_0x59f3ce[_0x3a7f02(0x210)](_0x3a7f02(0x21f))[_0x3a7f02(0x22b)]('Compile\x20a\x20workflow\x20into\x20a\x20structured\x20execution\x20plan')[_0x3a7f02(0x230)](_0x3a7f02(0x219),_0x3a7f02(0x1fa))[_0x3a7f02(0x238)]('--json',_0x3a7f02(0x236),![])[_0x3a7f02(0x1ff)](async(_0x2d446a,_0x4c33dd)=>{const _0x2ebba9=_0x3a7f02,_0x48954e=await compileOwnProseProgram({'api':_0x4a320b,'workspaceDir':process[_0x2ebba9(0x232)](),'programPath':_0x2d446a});if(_0x4c33dd[_0x2ebba9(0x21d)]){process[_0x2ebba9(0x207)]['write'](JSON[_0x2ebba9(0x228)](_0x48954e,null,0x2)+'\x0a');return;}process[_0x2ebba9(0x207)][_0x2ebba9(0x223)](JSON[_0x2ebba9(0x228)](_0x48954e['plan'],null,0x2)+'\x0a');}),_0x59f3ce['command'](_0x3a7f02(0x233))[_0x3a7f02(0x22b)](_0x3a7f02(0x200))[_0x3a7f02(0x230)](_0x3a7f02(0x222),_0x3a7f02(0x20f))[_0x3a7f02(0x238)](_0x3a7f02(0x1f6),'Explicit\x20run\x20directory')[_0x3a7f02(0x238)](_0x3a7f02(0x235),'Print\x20raw\x20JSON',![])['action'](async(_0x37e539,_0x326396)=>{const _0x1e264c=_0x3a7f02,_0x1f6891=await resumeOwnProseBackgroundRun({'api':_0x4a320b,'workspaceDir':process['cwd'](),'runId':_0x37e539,'runDir':_0x326396[_0x1e264c(0x201)]});if(_0x326396[_0x1e264c(0x21d)]){process[_0x1e264c(0x207)][_0x1e264c(0x223)](JSON[_0x1e264c(0x228)](_0x1f6891,null,0x2)+'\x0a');return;}process['stdout']['write'](renderOwnProseStatus(_0x1f6891[_0x1e264c(0x227)])+'\x0a');}),_0x59f3ce['command'](_0x3a7f02(0x218))[_0x3a7f02(0x22b)](_0x3a7f02(0x22e))[_0x3a7f02(0x230)]('<runId>',_0x3a7f02(0x20f))[_0x3a7f02(0x211)]('--answer\x20<text>',_0x3a7f02(0x21b))[_0x3a7f02(0x238)](_0x3a7f02(0x1f6),_0x3a7f02(0x202))[_0x3a7f02(0x238)](_0x3a7f02(0x235),_0x3a7f02(0x236),![])[_0x3a7f02(0x1ff)](async(_0x58799b,_0x55bdb8)=>{const _0x3c6dc6=_0x3a7f02,_0x7ebbcd=await replyOwnProseRun({'api':_0x4a320b,'workspaceDir':process['cwd'](),'runId':_0x58799b,'answer':_0x55bdb8['answer']??'','runDir':_0x55bdb8['runDir']});if(_0x55bdb8[_0x3c6dc6(0x21d)]){process[_0x3c6dc6(0x207)][_0x3c6dc6(0x223)](JSON[_0x3c6dc6(0x228)](_0x7ebbcd,null,0x2)+'\x0a');return;}process[_0x3c6dc6(0x207)][_0x3c6dc6(0x223)](renderOwnProseStatus(_0x7ebbcd[_0x3c6dc6(0x227)])+'\x0a');}),_0x59f3ce[_0x3a7f02(0x210)](_0x3a7f02(0x22c))[_0x3a7f02(0x22b)](_0x3a7f02(0x234))[_0x3a7f02(0x230)](_0x3a7f02(0x222),'Run\x20id')[_0x3a7f02(0x238)]('--json',_0x3a7f02(0x236),![])[_0x3a7f02(0x1ff)](async(_0x2f3c84,_0x23b785)=>{const _0x1d8e39=_0x3a7f02,{state:_0x2429da,plan:_0x8a0620}=await loadOwnProseRunState(process[_0x1d8e39(0x232)](),_0x4a320b[_0x1d8e39(0x203)],_0x2f3c84);if(_0x23b785[_0x1d8e39(0x21d)]){process[_0x1d8e39(0x207)][_0x1d8e39(0x223)](JSON['stringify']({'state':_0x2429da,'plan':_0x8a0620},null,0x2)+'\x0a');return;}process[_0x1d8e39(0x207)][_0x1d8e39(0x223)](renderOwnProseStatus(_0x2429da)+'\x0a');}),_0x59f3ce[_0x3a7f02(0x210)](_0x3a7f02(0x215))[_0x3a7f02(0x22b)](_0x3a7f02(0x23a))['argument']('<program>',_0x3a7f02(0x1fa))[_0x3a7f02(0x238)](_0x3a7f02(0x235),_0x3a7f02(0x236),![])[_0x3a7f02(0x1ff)](async(_0x105348,_0x2afa3c)=>{const _0x388e77=_0x3a7f02,_0x429bce=_0x105348,_0x4586ae=await inspectOwnProseProgramFile(_0x429bce);if(_0x2afa3c[_0x388e77(0x21d)]){process[_0x388e77(0x207)][_0x388e77(0x223)](JSON[_0x388e77(0x228)](_0x4586ae,null,0x2)+'\x0a');return;}process['stdout'][_0x388e77(0x223)]([_0x388e77(0x212)+_0x4586ae[_0x388e77(0x1f5)][_0x388e77(0x216)],_0x388e77(0x231)+(_0x4586ae[_0x388e77(0x1f5)][_0x388e77(0x1f7)][_0x388e77(0x21c)](',\x20')||_0x388e77(0x1fc)),_0x388e77(0x22d)+_0x4586ae[_0x388e77(0x1f5)]['goal'],_0x388e77(0x20b)+_0x4586ae[_0x388e77(0x1f5)]['workflow']][_0x388e77(0x21c)]('\x0a')+'\x0a');});}function _0x52b3(){const _0x4660a1=['parse','--json-input\x20<json>','inspect','name','--run-dir','reply','<program>','jsonInput','Reply\x20text','join','json','Repeatable\x20input\x20value','compile','290769ozLlBE','2957170pEXwWO','<runId>','write','2446624YPrUEt','1813842gMgxkb','24EKIWcs','state','stringify','own-prose','indexOf','description','status','Goal:\x20','Resume\x20a\x20blocked\x20own-prose\x20run\x20with\x20user-provided\x20input','--input\x20<key=value>','argument','Agents:\x20','cwd','resume','Show\x20the\x20current\x20state\x20of\x20an\x20own-prose\x20run','--json','Print\x20raw\x20JSON','ignore','option','start','Parse\x20a\x20workflow\x20definition\x20without\x20compiling\x20or\x20running\x20it','input','slice','program','--run-dir\x20<path>','agentIds','\x22.\x20Expected\x20key=value','58YNfyUa','Path\x20to\x20the\x20Markdown\x20program','7dVgbLA','none','Invalid\x20--input\x20value\x20\x22','19627070oNFfQN','action','Resume\x20a\x20queued\x20own-prose\x20background\x20run','runDir','Explicit\x20run\x20directory','pluginConfig','2369274tixGLU','Compile\x20and\x20execute\x20natural-language\x20own-prose\x20workflows','Full\x20input\x20object\x20as\x20JSON','stdout','queued','11MoEWSI','background','Workflow:\x20','37227SLlfyg','fromEntries','object','Run\x20id','command','requiredOption','Program:\x20'];_0x52b3=function(){return _0x4660a1;};return _0x52b3();}function _0x2bac(_0x4f6289,_0x53f6d1){_0x4f6289=_0x4f6289-0x1f4;const _0x52b322=_0x52b3();let _0x2bac56=_0x52b322[_0x4f6289];return _0x2bac56;}function spawnOwnProseResumeProcess(_0x1632eb,_0x3841fe){const _0x1a86f4=_0x2bac,_0x294aff=process['argv'][0x1];if(!_0x294aff)return;const _0x423842=spawn(process['execPath'],[_0x294aff,'own-prose',_0x1a86f4(0x233),_0x1632eb,_0x1a86f4(0x217),_0x3841fe,'--json'],{'cwd':process[_0x1a86f4(0x232)](),'detached':!![],'stdio':_0x1a86f4(0x237),'env':process.env});_0x423842['unref']();}function collectOption(_0x4a99d6,_0xc39e21){return _0xc39e21['push'](_0x4a99d6),_0xc39e21;}function resolveInputOptions(_0xaa82de){const _0x20ac0a=_0x2bac,_0x232044=Object[_0x20ac0a(0x20d)]((_0xaa82de[_0x20ac0a(0x23b)]??[])['map'](_0x1b4178=>{const _0x186844=_0x20ac0a,_0x3a212b=_0x1b4178[_0x186844(0x22a)]('=');if(_0x3a212b<=0x0)throw new Error(_0x186844(0x1fd)+_0x1b4178+_0x186844(0x1f8));return[_0x1b4178['slice'](0x0,_0x3a212b),_0x1b4178[_0x186844(0x1f4)](_0x3a212b+0x1)];}));if(!_0xaa82de[_0x20ac0a(0x21a)])return _0x232044;const _0x3393fd=JSON[_0x20ac0a(0x213)](_0xaa82de['jsonInput']);if(!_0x3393fd||typeof _0x3393fd!==_0x20ac0a(0x20e)||Array['isArray'](_0x3393fd))throw new Error('--json-input\x20must\x20decode\x20to\x20an\x20object');return{..._0x232044,..._0x3393fd};}
@@ -1 +1 @@
1
- function _0x3b2d(_0x44a862,_0x2a74e2){_0x44a862=_0x44a862-0x8f;const _0x57a8bb=_0x57a8();let _0x3b2d5e=_0x57a8bb[_0x44a862];return _0x3b2d5e;}(function(_0x3a53a9,_0x41dcb9){const _0x63a6e1=_0x3b2d,_0x328fab=_0x3a53a9();while(!![]){try{const _0x1e0e17=parseInt(_0x63a6e1(0x99))/0x1*(-parseInt(_0x63a6e1(0x9e))/0x2)+parseInt(_0x63a6e1(0xa3))/0x3*(-parseInt(_0x63a6e1(0x90))/0x4)+-parseInt(_0x63a6e1(0xa1))/0x5*(-parseInt(_0x63a6e1(0x98))/0x6)+-parseInt(_0x63a6e1(0x9f))/0x7+parseInt(_0x63a6e1(0x9c))/0x8+-parseInt(_0x63a6e1(0x9d))/0x9*(parseInt(_0x63a6e1(0x93))/0xa)+parseInt(_0x63a6e1(0x8f))/0xb*(parseInt(_0x63a6e1(0x95))/0xc);if(_0x1e0e17===_0x41dcb9)break;else _0x328fab['push'](_0x328fab['shift']());}catch(_0x182cc6){_0x328fab['push'](_0x328fab['shift']());}}}(_0x57a8,0x4f9ce));import _0x1d162a from'node:path';export const OWN_PROSE_DEFAULT_TIMEOUT_MS=0x927c0;export const OWN_PROSE_DEFAULT_CLEANUP_SESSIONS=!![];export function resolveOwnProseConfig(_0x32d34,_0x4f049b){const _0x24a444=_0x3b2d,_0x3f1a2f=_0x4f049b??{},_0x47fe06=typeof _0x3f1a2f[_0x24a444(0x9a)]===_0x24a444(0x96)&&_0x3f1a2f['stateRoot']['trim']()?_0x3f1a2f[_0x24a444(0x9a)][_0x24a444(0x9b)]():_0x24a444(0xa2),_0x53e0b4=typeof _0x3f1a2f[_0x24a444(0x94)]===_0x24a444(0x96)&&_0x3f1a2f[_0x24a444(0x94)][_0x24a444(0x9b)]()?_0x3f1a2f[_0x24a444(0x94)][_0x24a444(0x9b)]():undefined,_0xa2e9fc=typeof _0x3f1a2f[_0x24a444(0x91)]===_0x24a444(0x96)&&_0x3f1a2f['defaultModel'][_0x24a444(0x9b)]()?_0x3f1a2f[_0x24a444(0x91)][_0x24a444(0x9b)]():undefined,_0x548856=typeof _0x3f1a2f[_0x24a444(0x92)]==='number'&&Number[_0x24a444(0x97)](_0x3f1a2f[_0x24a444(0x92)])&&_0x3f1a2f[_0x24a444(0x92)]>=0x3e8?_0x3f1a2f[_0x24a444(0x92)]:OWN_PROSE_DEFAULT_TIMEOUT_MS,_0x656f75=typeof _0x3f1a2f['cleanupSessions']===_0x24a444(0xa0)?_0x3f1a2f['cleanupSessions']:OWN_PROSE_DEFAULT_CLEANUP_SESSIONS;return{'stateRoot':_0x1d162a['resolve'](_0x32d34,_0x47fe06),'defaultProvider':_0x53e0b4,'defaultModel':_0xa2e9fc,'timeoutMs':_0x548856,'cleanupSessions':_0x656f75};}function _0x57a8(){const _0x47ffee=['5725GQvoAg','.own-prose','6tUdhsr','44NMNvWI','1216356ysSmjp','defaultModel','timeoutMs','769690SXsSRh','defaultProvider','4675344isyYkg','string','isFinite','1650tIbaTW','127201jFytBH','stateRoot','trim','3043600bqunAj','18QnVVVK','10WwNNTB','3706906WYpIgD','boolean'];_0x57a8=function(){return _0x47ffee;};return _0x57a8();}
1
+ (function(_0x3c2d9a,_0x3972dd){const _0x2affe6=_0x359a,_0x11a0af=_0x3c2d9a();while(!![]){try{const _0x344060=-parseInt(_0x2affe6(0x93))/0x1+-parseInt(_0x2affe6(0x92))/0x2+parseInt(_0x2affe6(0x94))/0x3+parseInt(_0x2affe6(0x88))/0x4+-parseInt(_0x2affe6(0x8a))/0x5*(-parseInt(_0x2affe6(0x8f))/0x6)+parseInt(_0x2affe6(0x86))/0x7+-parseInt(_0x2affe6(0x8d))/0x8*(-parseInt(_0x2affe6(0x96))/0x9);if(_0x344060===_0x3972dd)break;else _0x11a0af['push'](_0x11a0af['shift']());}catch(_0x498809){_0x11a0af['push'](_0x11a0af['shift']());}}}(_0x1154,0xef14f));function _0x1154(){const _0x538dc3=['trim','8AIaAJw','defaultProvider','6lUkMfK','defaultModel','boolean','3185096kGtMBo','1608515rZzJgd','1394814oNswYe','stateRoot','11764521pfEIdi','cleanupSessions','string','resolve','9849707RhjZAY','timeoutMs','3465840rAxsqm','isFinite','673370NgdHzN','.own-prose'];_0x1154=function(){return _0x538dc3;};return _0x1154();}import _0x1f7d01 from'node:path';export const OWN_PROSE_DEFAULT_TIMEOUT_MS=0x927c0;function _0x359a(_0x22f794,_0x92e457){_0x22f794=_0x22f794-0x85;const _0x115481=_0x1154();let _0x359a18=_0x115481[_0x22f794];return _0x359a18;}export const OWN_PROSE_DEFAULT_CLEANUP_SESSIONS=!![];export function resolveOwnProseConfig(_0x3b71a3,_0x246769){const _0x291a2d=_0x359a,_0x1ae6f5=_0x246769??{},_0x5ce172=typeof _0x1ae6f5[_0x291a2d(0x95)]===_0x291a2d(0x98)&&_0x1ae6f5[_0x291a2d(0x95)][_0x291a2d(0x8c)]()?_0x1ae6f5[_0x291a2d(0x95)]['trim']():_0x291a2d(0x8b),_0x234428=typeof _0x1ae6f5['defaultProvider']===_0x291a2d(0x98)&&_0x1ae6f5[_0x291a2d(0x8e)][_0x291a2d(0x8c)]()?_0x1ae6f5[_0x291a2d(0x8e)][_0x291a2d(0x8c)]():undefined,_0x37148d=typeof _0x1ae6f5['defaultModel']===_0x291a2d(0x98)&&_0x1ae6f5[_0x291a2d(0x90)][_0x291a2d(0x8c)]()?_0x1ae6f5[_0x291a2d(0x90)]['trim']():undefined,_0x1cb970=typeof _0x1ae6f5[_0x291a2d(0x87)]==='number'&&Number[_0x291a2d(0x89)](_0x1ae6f5['timeoutMs'])&&_0x1ae6f5['timeoutMs']>=0x3e8?_0x1ae6f5['timeoutMs']:OWN_PROSE_DEFAULT_TIMEOUT_MS,_0x561b64=typeof _0x1ae6f5[_0x291a2d(0x97)]===_0x291a2d(0x91)?_0x1ae6f5['cleanupSessions']:OWN_PROSE_DEFAULT_CLEANUP_SESSIONS;return{'stateRoot':_0x1f7d01[_0x291a2d(0x85)](_0x3b71a3,_0x5ce172),'defaultProvider':_0x234428,'defaultModel':_0x37148d,'timeoutMs':_0x1cb970,'cleanupSessions':_0x561b64};}
@@ -7,9 +7,6 @@ type DriveParams = {
7
7
  inputs?: Record<string, unknown>;
8
8
  sessionKey?: string;
9
9
  agentId?: string;
10
- callerProvider?: string;
11
- callerModel?: string;
12
- callerModelSource?: "caller_session" | "agent_default" | "plugin_default";
13
10
  };
14
11
  type StartParams = DriveParams & {
15
12
  sessionKey?: string;
@@ -23,6 +20,13 @@ export declare function resumeOwnProseBackgroundRun(params: {
23
20
  runId: string;
24
21
  runDir?: string;
25
22
  }): Promise<OwnProseRunResult>;
23
+ export declare function replyOwnProseRun(params: {
24
+ api: OpenClawPluginApi;
25
+ workspaceDir: string;
26
+ runId: string;
27
+ answer: string;
28
+ runDir?: string;
29
+ }): Promise<OwnProseRunResult>;
26
30
  export declare function waitForOwnProseBackgroundRun(runId: string, options: {
27
31
  workspaceDir: string;
28
32
  pluginConfig?: Record<string, unknown>;
@@ -35,8 +39,6 @@ export declare function compileOwnProseProgram(params: {
35
39
  api: OpenClawPluginApi;
36
40
  workspaceDir: string;
37
41
  programPath: string;
38
- callerProvider?: string;
39
- callerModel?: string;
40
42
  }): Promise<{
41
43
  program: ProgramBundle["program"];
42
44
  agents: ProgramBundle["agents"];