@ownclaw/own-prose 0.1.4 → 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 _0xfabd0c=_0x1740;(function(_0x4e34cb,_0x4a468d){var _0x46e071=_0x1740,_0x4fadb5=_0x4e34cb();while(!![]){try{var _0x38cef1=-parseInt(_0x46e071(0x1a9))/0x1*(-parseInt(_0x46e071(0x1a7))/0x2)+-parseInt(_0x46e071(0x1ab))/0x3+parseInt(_0x46e071(0x1b1))/0x4+parseInt(_0x46e071(0x1ad))/0x5+-parseInt(_0x46e071(0x1a8))/0x6*(-parseInt(_0x46e071(0x1a6))/0x7)+-parseInt(_0x46e071(0x1b0))/0x8*(-parseInt(_0x46e071(0x1ac))/0x9)+-parseInt(_0x46e071(0x1a5))/0xa;if(_0x38cef1===_0x4a468d)break;else _0x4fadb5['push'](_0x4fadb5['shift']());}catch(_0xa8d564){_0x4fadb5['push'](_0x4fadb5['shift']());}}}(_0x50d3,0x7d205));import _0x5bca80 from'./openclaw.plugin.json'with{type:'json'};import{registerOwnProseCli}from'./src/cli.js';import{createOwnProseBackgroundRunTool,createOwnProseDriveTool,createOwnProseStartTool,createOwnProseStatusTool}from'./src/tool.js';export default{'id':'own-prose','name':'OwnProse','description':_0xfabd0c(0x1a4),'configSchema':_0x5bca80[_0xfabd0c(0x1a3)],'register'(_0x1fa4f0){var _0x27b873=_0xfabd0c;_0x1fa4f0['registerTool'](_0x20d4b0=>createOwnProseStartTool(_0x1fa4f0,_0x20d4b0),{'optional':!![]}),_0x1fa4f0[_0x27b873(0x1aa)](_0x4ee0bf=>createOwnProseDriveTool(_0x1fa4f0,_0x4ee0bf),{'optional':!![]}),_0x1fa4f0[_0x27b873(0x1aa)](_0x18936f=>createOwnProseStatusTool(_0x1fa4f0,_0x18936f),{'optional':!![]}),_0x1fa4f0['registerTool'](_0x1c0c9a=>createOwnProseBackgroundRunTool(_0x1fa4f0,_0x1c0c9a)),_0x1fa4f0[_0x27b873(0x1ae)](({program:_0x2b1c5f})=>{registerOwnProseCli(_0x2b1c5f,_0x1fa4f0);},{'descriptors':[{'name':_0x27b873(0x1af),'description':'Compile\x20and\x20execute\x20natural-language\x20workflows','hasSubcommands':!![]}]});}};function _0x1740(_0x26c6e4,_0x2fc3f6){_0x26c6e4=_0x26c6e4-0x1a3;var _0x50d32f=_0x50d3();var _0x174024=_0x50d32f[_0x26c6e4];return _0x174024;}function _0x50d3(){var _0x3ce06d=['1414125NMvMUq','registerCli','own-prose','31560bHXfLz','1636840OxEadE','configSchema','Natural-language\x20workflow\x20compiler\x20and\x20executor\x20for\x20OpenClaw.','19111230PyzQPM','39263pHNYIT','1505986sEVfwU','954CNeJgo','1EfsMpP','registerTool','1574082ElpkZg','1395QIqYHu'];_0x50d3=function(){return _0x3ce06d;};return _0x50d3();}
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 _0x18f6(){var _0x29290a=['1763795FVArSx','24meRtGx','7579605clNjpF','4874okfzKC','885VKCUii','6nwtaTD','10flOBwH','1944819DxPRvN','1268802JoUpdQ','5369119cUokJo','6219564nUFiRn'];_0x18f6=function(){return _0x29290a;};return _0x18f6();}function _0x3149(_0x51f418,_0x4543f0){_0x51f418=_0x51f418-0x14b;var _0x18f641=_0x18f6();var _0x3149f9=_0x18f641[_0x51f418];return _0x3149f9;}(function(_0x4509e5,_0x43d85f){var _0x4ceffa=_0x3149,_0x37e1c8=_0x4509e5();while(!![]){try{var _0x216bb9=-parseInt(_0x4ceffa(0x14e))/0x1+-parseInt(_0x4ceffa(0x154))/0x2*(parseInt(_0x4ceffa(0x155))/0x3)+parseInt(_0x4ceffa(0x150))/0x4+parseInt(_0x4ceffa(0x153))/0x5+parseInt(_0x4ceffa(0x14b))/0x6*(-parseInt(_0x4ceffa(0x14f))/0x7)+-parseInt(_0x4ceffa(0x152))/0x8*(-parseInt(_0x4ceffa(0x14d))/0x9)+parseInt(_0x4ceffa(0x14c))/0xa*(-parseInt(_0x4ceffa(0x151))/0xb);if(_0x216bb9===_0x43d85f)break;else _0x37e1c8['push'](_0x37e1c8['shift']());}catch(_0x371ed4){_0x37e1c8['push'](_0x37e1c8['shift']());}}}(_0x18f6,0xc44a6));export{definePluginEntry}from'openclaw/plugin-sdk/core';
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 _0x3686(){const _0x18dd3c=['trim','310596hLnllG','1448584WGcgMD','agent.wait','15922RQXmAi','label','812536ZmpFno','Agent\x20session\x20notification\x20did\x20not\x20return\x20a\x20runId','runId','message','extraSystemPrompt','650HdvaDe','sessions.delete','61UWRsZU','sessions.list','timeoutMs','agentId','1939FMOwdB','1771340mjGbwH','chat.history','17022NHWPdT','sessionKey','113949tNGzAx','idempotencyKey','some','key','deliver'];_0x3686=function(){return _0x18dd3c;};return _0x3686();}(function(_0x5070e8,_0x4e5ee9){const _0x3201d8=_0x35ab,_0x3b0908=_0x5070e8();while(!![]){try{const _0x3a39cf=parseInt(_0x3201d8(0x9f))/0x1*(parseInt(_0x3201d8(0xb1))/0x2)+parseInt(_0x3201d8(0xae))/0x3+parseInt(_0x3201d8(0xaf))/0x4+-parseInt(_0x3201d8(0xa4))/0x5+-parseInt(_0x3201d8(0xa6))/0x6*(-parseInt(_0x3201d8(0xa3))/0x7)+-parseInt(_0x3201d8(0xb3))/0x8+parseInt(_0x3201d8(0xa8))/0x9*(-parseInt(_0x3201d8(0x9d))/0xa);if(_0x3a39cf===_0x4e5ee9)break;else _0x3b0908['push'](_0x3b0908['shift']());}catch(_0x4c18df){_0x3b0908['push'](_0x3b0908['shift']());}}}(_0x3686,0x6fe6c));import{randomUUID}from'node:crypto';import{callGatewayTool}from'openclaw/plugin-sdk/browser-support';export async function queueAgentSessionRun(_0x39b15c){const _0x677d66=_0x35ab,_0xa586a4=await callGatewayTool('agent',{'timeoutMs':_0x39b15c['timeoutMs']??0x2710},{'message':_0x39b15c[_0x677d66(0x9b)],'sessionKey':_0x39b15c[_0x677d66(0xa7)],..._0x39b15c[_0x677d66(0xa2)]?{'agentId':_0x39b15c[_0x677d66(0xa2)]}:{},..._0x39b15c[_0x677d66(0x9c)]?{'extraSystemPrompt':_0x39b15c[_0x677d66(0x9c)]}:{},..._0x39b15c[_0x677d66(0xb2)]?{'label':_0x39b15c[_0x677d66(0xb2)]}:{},'idempotencyKey':_0x39b15c[_0x677d66(0xa9)]??randomUUID(),'deliver':_0x39b15c[_0x677d66(0xac)]??![]}),_0x2d06de=_0xa586a4?.[_0x677d66(0xb5)]?.[_0x677d66(0xad)]();if(!_0x2d06de)throw new Error(_0x677d66(0xb4));return{'runId':_0x2d06de};}export async function waitForAgentSessionRun(_0x2e36cc){const _0x109afa=_0x35ab;return await callGatewayTool(_0x109afa(0xb0),{'timeoutMs':_0x2e36cc[_0x109afa(0xa1)]+0x7d0},{'runId':_0x2e36cc['runId'],'timeoutMs':_0x2e36cc[_0x109afa(0xa1)]});}export async function getAgentSessionMessages(_0x161dda){const _0x3f9997=_0x35ab;return await callGatewayTool(_0x3f9997(0xa5),{'timeoutMs':0x2710},{'sessionKey':_0x161dda[_0x3f9997(0xa7)],'limit':_0x161dda['limit']??0xc8});}export async function deleteAgentSession(_0x4ef5dc){const _0x64c89e=_0x35ab;await callGatewayTool(_0x64c89e(0x9e),{'timeoutMs':0x2710},{'key':_0x4ef5dc['sessionKey'],'deleteTranscript':_0x4ef5dc['deleteTranscript']??!![]});}function _0x35ab(_0x5c4e3a,_0x4e3def){_0x5c4e3a=_0x5c4e3a-0x9b;const _0x36865a=_0x3686();let _0x35ab17=_0x36865a[_0x5c4e3a];return _0x35ab17;}export async function hasAgentSession(_0x1d2bc2){const _0x37ab35=_0x35ab,_0x1b8b9b=await callGatewayTool(_0x37ab35(0xa0),{'timeoutMs':0x2710},{'search':_0x1d2bc2['sessionKey'],'limit':0x14,'includeGlobal':![],'includeUnknown':!![]});return(_0x1b8b9b['sessions']??[])[_0x37ab35(0xaa)](_0x109e2e=>_0x109e2e[_0x37ab35(0xab)]===_0x1d2bc2[_0x37ab35(0xa7)]);}export async function notifyAgentSession(_0xd647b9){return queueAgentSessionRun(_0xd647b9);}
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(_0x5091ec,_0x2b55ce){const _0x579659=_0x3e14,_0x3bc8aa=_0x5091ec();while(!![]){try{const _0x375433=-parseInt(_0x579659(0x99))/0x1+-parseInt(_0x579659(0x9c))/0x2*(parseInt(_0x579659(0xa4))/0x3)+-parseInt(_0x579659(0xa7))/0x4+-parseInt(_0x579659(0x8a))/0x5*(-parseInt(_0x579659(0x8f))/0x6)+parseInt(_0x579659(0x9f))/0x7+-parseInt(_0x579659(0x7f))/0x8+parseInt(_0x579659(0xa0))/0x9;if(_0x375433===_0x2b55ce)break;else _0x3bc8aa['push'](_0x3bc8aa['shift']());}catch(_0xf60081){_0x3bc8aa['push'](_0x3bc8aa['shift']());}}}(_0x4d4c,0x8561a));import _0x28ea16 from'node:fs/promises';import _0x37e503 from'node:path';import{parse as _0x76fd16}from'yaml';export async function parseAgentFile(_0x32f23e){const _0x997338=_0x3e14,_0xe58286=_0x37e503[_0x997338(0x95)](_0x32f23e),_0x22b428=await _0x28ea16[_0x997338(0x92)](_0xe58286,_0x997338(0x91));return parseAgentMarkdown(_0x22b428,_0xe58286);}export async function loadAgents(_0x14071d,_0x5f4fd2){const _0x5617b9=_0x3e14,_0x29fd49=await Promise['all'](_0x14071d[_0x5617b9(0xa1)](async _0x5027ac=>[_0x5027ac,await parseAgentFile(_0x37e503['join'](_0x5f4fd2,_0x5617b9(0x97),_0x5027ac+'.md'))]));return Object[_0x5617b9(0x82)](_0x29fd49);}export function parseAgentMarkdown(_0x2e57ff,_0x32a7d8){const _0x395f74=_0x3e14,{frontmatter:_0x224354,body:_0x6fd450}=splitFrontmatter(_0x2e57ff),_0x413026=normalizeFrontmatter(_0x224354),_0x2f24ff=parseSections(_0x6fd450),_0x2a7a82=_0x37e503['basename'](_0x32a7d8,_0x37e503[_0x395f74(0x8d)](_0x32a7d8)),_0x505d85=optionalString(_0x413026[_0x395f74(0x80)])??_0x2a7a82;return{'id':_0x2a7a82,'name':_0x505d85,'description':optionalString(_0x413026[_0x395f74(0x88)]),'sourcePath':_0x32a7d8,'provider':optionalString(_0x413026['provider']),'model':optionalString(_0x413026['model']),'timeoutMs':normalizeTimeoutMs(_0x413026[_0x395f74(0x81)]),'permissions':normalizePermissions({'allowMutatingTools':_0x413026[_0x395f74(0x85)],'executionTarget':_0x413026[_0x395f74(0xa3)]}),'role':requireSection(_0x2f24ff,'role'),'instructions':requireSection(_0x2f24ff,'instructions'),'doneWhen':parseDoneWhen(_0x2f24ff[_0x395f74(0x84)])};}function _0x4d4c(){const _0x368db0=['agents','string','704860HGJbjR','exec','replace','106FyxsSx','trim','number','6834793IRCaqf','27646083lLfChh','map','\x22\x20section','executionTarget','38298YmGqZs','overview','self','4366932HYbGTA','toUpperCase','indexOf','join','own-prose\x20agent\x20frontmatter\x20must\x20be\x20a\x20YAML\x20object','8502400eFNxKh','name','timeoutMs','fromEntries','isFinite','done_when','allowMutatingTools','split','own-prose\x20agent\x20must\x20include\x20a\x20\x22##\x20','description','own-prose\x20agent\x20must\x20start\x20with\x20YAML\x20frontmatter','5UaFVHX','toLowerCase','object','extname','isArray','204810cUkmyO','push','utf8','readFile','subagent','\x0a---\x0a','resolve','slice'];_0x4d4c=function(){return _0x368db0;};return _0x4d4c();}function splitFrontmatter(_0x3ae3c2){const _0x5dd6c7=_0x3e14,_0xa4b79=_0x3ae3c2[_0x5dd6c7(0x9b)](/\r\n/g,'\x0a');if(!_0xa4b79['startsWith']('---\x0a'))throw new Error(_0x5dd6c7(0x89));const _0x22d3ca=_0xa4b79[_0x5dd6c7(0xa9)](_0x5dd6c7(0x94),0x4);if(_0x22d3ca<0x0)throw new Error('own-prose\x20agent\x20frontmatter\x20is\x20missing\x20a\x20closing\x20---\x20line');return{'frontmatter':_0x76fd16(_0xa4b79[_0x5dd6c7(0x96)](0x4,_0x22d3ca)),'body':_0xa4b79[_0x5dd6c7(0x96)](_0x22d3ca+0x5)[_0x5dd6c7(0x9d)]()};}function normalizeFrontmatter(_0x1c3c73){const _0x3940bc=_0x3e14;if(!_0x1c3c73||typeof _0x1c3c73!==_0x3940bc(0x8c)||Array[_0x3940bc(0x8e)](_0x1c3c73))throw new Error(_0x3940bc(0xab));return _0x1c3c73;}function parseSections(_0x2b9305){const _0x220f2c=_0x3e14,_0x5597ee={},_0xcb1690=_0x2b9305['split']('\x0a');let _0x6f49fe=_0x220f2c(0xa5),_0x6cadff=[];for(const _0x25dee5 of _0xcb1690){const _0x26b65e=/^##\s+(.+?)\s*$/[_0x220f2c(0x9a)](_0x25dee5);if(_0x26b65e){_0x5597ee[_0x6f49fe]=_0x6cadff['join']('\x0a')[_0x220f2c(0x9d)](),_0x6f49fe=_0x26b65e[0x1][_0x220f2c(0x9d)]()[_0x220f2c(0x8b)]()['replace'](/[^a-z0-9]+/g,'_')[_0x220f2c(0x9b)](/^_+|_+$/g,''),_0x6cadff=[];continue;}_0x6cadff[_0x220f2c(0x90)](_0x25dee5);}return _0x5597ee[_0x6f49fe]=_0x6cadff['join']('\x0a')[_0x220f2c(0x9d)](),_0x5597ee;}function normalizePermissions(_0x414757){const _0x1b0b0e=_0x3e14,_0xa1ccb8=_0x414757[_0x1b0b0e(0xa3)]===_0x1b0b0e(0xa6)||_0x414757[_0x1b0b0e(0xa3)]===_0x1b0b0e(0x93)?_0x414757['executionTarget']:_0x1b0b0e(0x93);return{'allowMutatingTools':_0x414757[_0x1b0b0e(0x85)]===!![],'executionTarget':_0xa1ccb8};}function _0x3e14(_0x1eccac,_0x57b66d){_0x1eccac=_0x1eccac-0x7f;const _0x4d4cac=_0x4d4c();let _0x3e14bb=_0x4d4cac[_0x1eccac];return _0x3e14bb;}function normalizeTimeoutMs(_0x3daac6){const _0x43bdad=_0x3e14;return typeof _0x3daac6===_0x43bdad(0x9e)&&Number[_0x43bdad(0x83)](_0x3daac6)&&_0x3daac6>=0x1?_0x3daac6:undefined;}function parseDoneWhen(_0xdc925c){const _0x54fd1d=_0x3e14;if(!_0xdc925c?.[_0x54fd1d(0x9d)]())return[];return _0xdc925c[_0x54fd1d(0x86)]('\x0a')[_0x54fd1d(0xa1)](_0x45623b=>/^\s*-\s+(.*\S)\s*$/['exec'](_0x45623b)?.[0x1]?.[_0x54fd1d(0x9d)]())['filter'](_0x2d6940=>Boolean(_0x2d6940));}function requireSection(_0x2c84bd,_0x2d452d){const _0xd31076=_0x3e14,_0x495348=_0x2c84bd[_0x2d452d];if(!_0x495348?.[_0xd31076(0x9d)]())throw new Error(_0xd31076(0x87)+humanizeSectionId(_0x2d452d)+_0xd31076(0xa2));return _0x495348['trim']();}function humanizeSectionId(_0x3222fd){const _0x885850=_0x3e14;return _0x3222fd[_0x885850(0x86)]('_')[_0x885850(0xa1)](_0x2faaeb=>_0x2faaeb[_0x885850(0x96)](0x0,0x1)[_0x885850(0xa8)]()+_0x2faaeb[_0x885850(0x96)](0x1))[_0x885850(0xaa)]('\x20');}function optionalString(_0x109dd4){const _0x466f71=_0x3e14;return typeof _0x109dd4===_0x466f71(0x98)&&_0x109dd4[_0x466f71(0x9d)]()?_0x109dd4[_0x466f71(0x9d)]():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(_0x21f4e0,_0x45d4a6){const _0x482966=_0xa33c,_0x42fbb6=_0x21f4e0();while(!![]){try{const _0x4998bc=-parseInt(_0x482966(0x82))/0x1+-parseInt(_0x482966(0x89))/0x2*(parseInt(_0x482966(0x8e))/0x3)+-parseInt(_0x482966(0x8f))/0x4+parseInt(_0x482966(0x85))/0x5+parseInt(_0x482966(0x87))/0x6+-parseInt(_0x482966(0x86))/0x7+parseInt(_0x482966(0x8b))/0x8;if(_0x4998bc===_0x45d4a6)break;else _0x42fbb6['push'](_0x42fbb6['shift']());}catch(_0x279d3a){_0x42fbb6['push'](_0x42fbb6['shift']());}}}(_0x3826,0x4cdb2));import{spawn}from'node:child_process';import{fileURLToPath}from'node:url';function _0x3826(){const _0x177c8b=['221494JrwJlo','1502952ODFLDz','ignore','5852ovThFP','unref','3140352XusGFN','--run-dir','./background-cleanup-worker.js','333zjoiwe','254144ODcMXF','138870tvtMJX','cwd','execPath','1153000lXGEJK'];_0x3826=function(){return _0x177c8b;};return _0x3826();}function _0xa33c(_0x2839ee,_0x5b0985){_0x2839ee=_0x2839ee-0x82;const _0x3826de=_0x3826();let _0xa33cd4=_0x3826de[_0x2839ee];return _0xa33cd4;}export function spawnOwnProseCleanupProcess(_0x1f91e7){const _0x29f7b1=_0xa33c,_0x565444=fileURLToPath(new URL(_0x29f7b1(0x8d),import.meta.url)),_0x4a8867=spawn(process[_0x29f7b1(0x84)],[_0x565444,_0x29f7b1(0x8c),_0x1f91e7],{'cwd':process[_0x29f7b1(0x83)](),'detached':!![],'stdio':_0x29f7b1(0x88),'env':process.env});return _0x4a8867[_0x29f7b1(0x8a)](),!![];}
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(_0x3b8dfc,_0x273730){const _0x4be4f2=_0x256c,_0x7a6757=_0x3b8dfc();while(!![]){try{const _0x5431af=parseInt(_0x4be4f2(0x1da))/0x1+parseInt(_0x4be4f2(0x1e2))/0x2*(parseInt(_0x4be4f2(0x1d4))/0x3)+-parseInt(_0x4be4f2(0x1d3))/0x4+parseInt(_0x4be4f2(0x1d6))/0x5*(parseInt(_0x4be4f2(0x1e0))/0x6)+-parseInt(_0x4be4f2(0x1e1))/0x7+parseInt(_0x4be4f2(0x1e4))/0x8*(-parseInt(_0x4be4f2(0x1d2))/0x9)+-parseInt(_0x4be4f2(0x1dd))/0xa;if(_0x5431af===_0x273730)break;else _0x7a6757['push'](_0x7a6757['shift']());}catch(_0x23bacd){_0x7a6757['push'](_0x7a6757['shift']());}}}(_0x5679,0xd5580));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 _0x3f3e0f=_0x256c,_0x5e23d4=parseRunDir(process[_0x3f3e0f(0x1db)][_0x3f3e0f(0x1d9)](0x2)),_0x149bfc=await waitForBackgroundRunToSettle(_0x5e23d4);if(!_0x149bfc||_0x149bfc[_0x3f3e0f(0x1df)]===_0x3f3e0f(0x1d1))return;const _0x1793b4=_0x149bfc[_0x3f3e0f(0x1d5)]?.[_0x3f3e0f(0x1de)]?.['sessionKey']?.[_0x3f3e0f(0x1e3)]();if(!_0x1793b4)return;await cleanupSession(_0x1793b4);}function _0x5679(){const _0x51fb35=['36622kmpmkB','trim','8JNomgx','running','4274226GWmPqZ','2670708paRWPx','237Bzqjtc','background','565dOmSZM','exitCode','--run-dir\x20required','slice','1466300BgQJdh','argv','--run-dir','18986910XsrFsG','supervisor','status','83394eOiNTC','3978226HOxLNj'];_0x5679=function(){return _0x51fb35;};return _0x5679();}function parseRunDir(_0x297f39){const _0x1177c5=_0x256c,_0x580f41=_0x297f39['indexOf'](_0x1177c5(0x1dc)),_0x13a07d=_0x580f41>=0x0?_0x297f39[_0x580f41+0x1]:undefined;if(!_0x13a07d?.[_0x1177c5(0x1e3)]())throw new Error(_0x1177c5(0x1d8));return _0x13a07d['trim']();}async function waitForBackgroundRunToSettle(_0x137797){const _0x492381=_0x256c;let _0x1d6b7f=await readRunState(_0x137797)['catch'](()=>undefined);for(let _0x417b50=0x0;_0x417b50<BACKGROUND_STATE_SETTLE_RETRY_COUNT;_0x417b50+=0x1){if(!_0x1d6b7f||_0x1d6b7f[_0x492381(0x1df)]!==_0x492381(0x1d1))return _0x1d6b7f;await sleep(BACKGROUND_STATE_SETTLE_RETRY_DELAY_MS),_0x1d6b7f=await readRunState(_0x137797)['catch'](()=>_0x1d6b7f);}return _0x1d6b7f;}function _0x256c(_0x1e79df,_0x3a2b5e){_0x1e79df=_0x1e79df-0x1d1;const _0x567924=_0x5679();let _0x256c05=_0x567924[_0x1e79df];return _0x256c05;}async function cleanupSession(_0x5d59ca){await deleteSession(_0x5d59ca);let _0x16e0f4=0x0;for(const _0x2d87d6 of SESSION_CLEANUP_RECHECK_DELAYS_MS){await sleep(_0x2d87d6);const _0x59ed94=await probeSession(_0x5d59ca);if(_0x59ed94!==!![]){_0x16e0f4+=0x1;if(_0x16e0f4>=0x2)return;continue;}_0x16e0f4=0x0,await deleteSession(_0x5d59ca);}}async function deleteSession(_0x41b802){try{await deleteAgentSession({'sessionKey':_0x41b802,'deleteTranscript':!![]});}catch{}}async function probeSession(_0x4af8f8){try{return await hasAgentSession({'sessionKey':_0x4af8f8});}catch{return undefined;}}function sleep(_0x41e2a2){return new Promise(_0x17d9ad=>setTimeout(_0x17d9ad,_0x41e2a2));}await main()['catch'](()=>{const _0x2264eb=_0x256c;process[_0x2264eb(0x1d7)]=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(_0x15bf77,_0x2f23dc){const _0x3c28d7=_0x43e9,_0x5d6f1f=_0x15bf77();while(!![]){try{const _0x4779ef=parseInt(_0x3c28d7(0x7d))/0x1+parseInt(_0x3c28d7(0xa8))/0x2+-parseInt(_0x3c28d7(0x80))/0x3*(parseInt(_0x3c28d7(0xae))/0x4)+parseInt(_0x3c28d7(0xa0))/0x5+parseInt(_0x3c28d7(0x87))/0x6+parseInt(_0x3c28d7(0x9d))/0x7*(parseInt(_0x3c28d7(0x98))/0x8)+-parseInt(_0x3c28d7(0x84))/0x9;if(_0x4779ef===_0x2f23dc)break;else _0x5d6f1f['push'](_0x5d6f1f['shift']());}catch(_0x1db50a){_0x5d6f1f['push'](_0x5d6f1f['shift']());}}}(_0x1c43,0x31e78));import{spawn}from'node:child_process';import{compileOwnProseProgram,driveOwnProseProgram,inspectOwnProseProgramFile,loadOwnProseRunState,renderOwnProseStatus,resumeOwnProseBackgroundRun,startOwnProseProgram}from'./execution.js';export function registerOwnProseCli(_0x187dea,_0x15c090){const _0x97473d=_0x43e9,_0xb8616b=_0x187dea['command'](_0x97473d(0x6f))[_0x97473d(0xb1)](_0x97473d(0x8a));_0xb8616b[_0x97473d(0x81)](_0x97473d(0x9a))[_0x97473d(0xb1)](_0x97473d(0x8c))[_0x97473d(0xa2)](_0x97473d(0x7c),_0x97473d(0x74))['option']('--input\x20<key=value>',_0x97473d(0x71),collectOption,[])['option']('--json-input\x20<json>','Full\x20input\x20object\x20as\x20JSON')[_0x97473d(0x86)](_0x97473d(0xa3),'Print\x20raw\x20JSON',![])[_0x97473d(0x6e)](async(_0x582c49,_0x2e2197)=>{const _0x46fac0=_0x97473d,_0x28fb36=resolveInputOptions(_0x2e2197),_0x4c9fba=await startOwnProseProgram({'api':_0x15c090,'workspaceDir':process[_0x46fac0(0x89)](),'programPath':_0x582c49,'inputs':_0x28fb36});_0x4c9fba['state'][_0x46fac0(0xa1)]?.[_0x46fac0(0xb0)]==='queued'&&spawnOwnProseResumeProcess(_0x4c9fba[_0x46fac0(0xad)],_0x4c9fba[_0x46fac0(0x95)]);if(_0x2e2197[_0x46fac0(0xb5)]){process['stdout'][_0x46fac0(0x90)](JSON[_0x46fac0(0x73)](_0x4c9fba,null,0x2)+'\x0a');return;}process['stdout'][_0x46fac0(0x90)](renderOwnProseStatus(_0x4c9fba[_0x46fac0(0xa6)])+'\x0a');}),_0xb8616b[_0x97473d(0x81)](_0x97473d(0x94))[_0x97473d(0xb1)](_0x97473d(0x99))[_0x97473d(0xa2)]('<program>',_0x97473d(0x74))[_0x97473d(0x86)]('--input\x20<key=value>',_0x97473d(0x71),collectOption,[])[_0x97473d(0x86)]('--json-input\x20<json>',_0x97473d(0xa7))[_0x97473d(0x86)](_0x97473d(0xa3),_0x97473d(0xac),![])['action'](async(_0x5433bc,_0x12e7e0)=>{const _0x1e9f5c=_0x97473d,_0x1127a0=resolveInputOptions(_0x12e7e0),_0x5825ea=await driveOwnProseProgram({'api':_0x15c090,'workspaceDir':process[_0x1e9f5c(0x89)](),'programPath':_0x5433bc,'inputs':_0x1127a0});if(_0x12e7e0[_0x1e9f5c(0xb5)]){process['stdout'][_0x1e9f5c(0x90)](JSON['stringify'](_0x5825ea,null,0x2)+'\x0a');return;}process['stdout'][_0x1e9f5c(0x90)](renderOwnProseStatus(_0x5825ea[_0x1e9f5c(0xa6)])+'\x0a');}),_0xb8616b[_0x97473d(0x81)](_0x97473d(0x93))['description'](_0x97473d(0x9c))[_0x97473d(0xa2)]('<program>',_0x97473d(0x74))[_0x97473d(0x86)](_0x97473d(0xa3),_0x97473d(0xac),![])['action'](async(_0x19548b,_0x3702b0)=>{const _0xeac9f9=_0x97473d,_0x2a073f=await compileOwnProseProgram({'api':_0x15c090,'workspaceDir':process[_0xeac9f9(0x89)](),'programPath':_0x19548b});if(_0x3702b0[_0xeac9f9(0xb5)]){process[_0xeac9f9(0x8b)][_0xeac9f9(0x90)](JSON['stringify'](_0x2a073f,null,0x2)+'\x0a');return;}process['stdout'][_0xeac9f9(0x90)](JSON[_0xeac9f9(0x73)](_0x2a073f[_0xeac9f9(0x7a)],null,0x2)+'\x0a');}),_0xb8616b[_0x97473d(0x81)](_0x97473d(0xa4))[_0x97473d(0xb1)](_0x97473d(0x82))[_0x97473d(0xa2)](_0x97473d(0x96),_0x97473d(0xb4))[_0x97473d(0x86)](_0x97473d(0x78),_0x97473d(0x8d))[_0x97473d(0x86)](_0x97473d(0xa3),'Print\x20raw\x20JSON',![])['action'](async(_0x102d31,_0x28620f)=>{const _0x416eca=_0x97473d,_0x2f1663=await resumeOwnProseBackgroundRun({'api':_0x15c090,'workspaceDir':process[_0x416eca(0x89)](),'runId':_0x102d31,'runDir':_0x28620f['runDir']});if(_0x28620f[_0x416eca(0xb5)]){process[_0x416eca(0x8b)][_0x416eca(0x90)](JSON[_0x416eca(0x73)](_0x2f1663,null,0x2)+'\x0a');return;}process[_0x416eca(0x8b)][_0x416eca(0x90)](renderOwnProseStatus(_0x2f1663['state'])+'\x0a');}),_0xb8616b['command'](_0x97473d(0xb0))[_0x97473d(0xb1)](_0x97473d(0x85))[_0x97473d(0xa2)]('<runId>',_0x97473d(0xb4))[_0x97473d(0x86)](_0x97473d(0xa3),_0x97473d(0xac),![])[_0x97473d(0x6e)](async(_0x2b9d6f,_0x1f340a)=>{const _0x4a8de7=_0x97473d,{state:_0x4bc829,plan:_0x2fc5d3}=await loadOwnProseRunState(process[_0x4a8de7(0x89)](),_0x15c090[_0x4a8de7(0x8f)],_0x2b9d6f);if(_0x1f340a['json']){process['stdout'][_0x4a8de7(0x90)](JSON['stringify']({'state':_0x4bc829,'plan':_0x2fc5d3},null,0x2)+'\x0a');return;}process[_0x4a8de7(0x8b)][_0x4a8de7(0x90)](renderOwnProseStatus(_0x4bc829)+'\x0a');}),_0xb8616b[_0x97473d(0x81)](_0x97473d(0x9b))[_0x97473d(0xb1)](_0x97473d(0x7f))[_0x97473d(0xa2)](_0x97473d(0x7c),_0x97473d(0x74))[_0x97473d(0x86)](_0x97473d(0xa3),_0x97473d(0xac),![])[_0x97473d(0x6e)](async(_0x459420,_0x15cdc0)=>{const _0x44fe20=_0x97473d,_0x1f4ae8=_0x459420,_0x14b5a4=await inspectOwnProseProgramFile(_0x1f4ae8);if(_0x15cdc0['json']){process[_0x44fe20(0x8b)][_0x44fe20(0x90)](JSON[_0x44fe20(0x73)](_0x14b5a4,null,0x2)+'\x0a');return;}process[_0x44fe20(0x8b)][_0x44fe20(0x90)]([_0x44fe20(0x70)+_0x14b5a4[_0x44fe20(0x83)]['name'],_0x44fe20(0x9f)+(_0x14b5a4['program'][_0x44fe20(0x76)][_0x44fe20(0x75)](',\x20')||_0x44fe20(0xa5)),_0x44fe20(0xaa)+_0x14b5a4[_0x44fe20(0x83)][_0x44fe20(0xb6)],_0x44fe20(0x7e)+_0x14b5a4[_0x44fe20(0x83)][_0x44fe20(0x79)]][_0x44fe20(0x75)]('\x0a')+'\x0a');});}function spawnOwnProseResumeProcess(_0x1d0bc5,_0x3542e9){const _0x481fe0=_0x43e9,_0x56c5db=process['argv'][0x1];if(!_0x56c5db)return;const _0x4c81b5=spawn(process[_0x481fe0(0xb2)],[_0x56c5db,_0x481fe0(0x6f),_0x481fe0(0xa4),_0x1d0bc5,_0x481fe0(0x88),_0x3542e9,'--json'],{'cwd':process['cwd'](),'detached':!![],'stdio':_0x481fe0(0x72),'env':process.env});_0x4c81b5['unref']();}function collectOption(_0x32e67f,_0x482f15){const _0x80ca16=_0x43e9;return _0x482f15[_0x80ca16(0x8e)](_0x32e67f),_0x482f15;}function _0x43e9(_0x78d58f,_0x267cad){_0x78d58f=_0x78d58f-0x6e;const _0x1c430c=_0x1c43();let _0x43e9a4=_0x1c430c[_0x78d58f];return _0x43e9a4;}function resolveInputOptions(_0xcfb76c){const _0x101097=_0x43e9,_0x3f4ae2=Object[_0x101097(0x77)]((_0xcfb76c[_0x101097(0xaf)]??[])['map'](_0x498653=>{const _0x588f8e=_0x101097,_0x296bb9=_0x498653[_0x588f8e(0x97)]('=');if(_0x296bb9<=0x0)throw new Error('Invalid\x20--input\x20value\x20\x22'+_0x498653+_0x588f8e(0x92));return[_0x498653[_0x588f8e(0xab)](0x0,_0x296bb9),_0x498653[_0x588f8e(0xab)](_0x296bb9+0x1)];}));if(!_0xcfb76c['jsonInput'])return _0x3f4ae2;const _0x56d219=JSON[_0x101097(0x9e)](_0xcfb76c[_0x101097(0xb3)]);if(!_0x56d219||typeof _0x56d219!==_0x101097(0x91)||Array[_0x101097(0xa9)](_0x56d219))throw new Error(_0x101097(0x7b));return{..._0x3f4ae2,..._0x56d219};}function _0x1c43(){const _0x30cdb0=['Goal:\x20','slice','Print\x20raw\x20JSON','runId','905820GUwdXg','input','status','description','execPath','jsonInput','Run\x20id','json','goal','action','own-prose','Program:\x20','Repeatable\x20input\x20value','ignore','stringify','Path\x20to\x20the\x20Markdown\x20program','join','agentIds','fromEntries','--run-dir\x20<path>','workflow','plan','--json-input\x20must\x20decode\x20to\x20an\x20object','<program>','307445RDLCFl','Workflow:\x20','Parse\x20a\x20workflow\x20definition\x20without\x20compiling\x20or\x20running\x20it','3DwVYhb','command','Resume\x20a\x20queued\x20own-prose\x20background\x20run','program','7056729naBMHh','Show\x20the\x20current\x20state\x20of\x20an\x20own-prose\x20run','option','90048RHGwLK','--run-dir','cwd','Compile\x20and\x20execute\x20natural-language\x20own-prose\x20workflows','stdout','Compile\x20and\x20start\x20a\x20workflow\x20in\x20the\x20background','Explicit\x20run\x20directory','push','pluginConfig','write','object','\x22.\x20Expected\x20key=value','compile','drive','runDir','<runId>','indexOf','17936mXXfNC','Compile\x20and\x20execute\x20a\x20workflow\x20end-to-end','start','inspect','Compile\x20a\x20workflow\x20into\x20a\x20structured\x20execution\x20plan','1120MpetBo','parse','Agents:\x20','1544160MMFZMn','background','argument','--json','resume','none','state','Full\x20input\x20object\x20as\x20JSON','449878PklOWC','isArray'];_0x1c43=function(){return _0x30cdb0;};return _0x1c43();}
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 _0x39f8(){const _0x224098=['3826361rneXdQ','defaultProvider','1819355kweBqY','stateRoot','cleanupSessions','boolean','isFinite','defaultModel','3848352NqnBRU','trim','1419378fLbVjU','4WrtVFS','5914896KCKEWx','325809tTENIe','.own-prose','1429548vdSjtY','resolve','string','timeoutMs'];_0x39f8=function(){return _0x224098;};return _0x39f8();}(function(_0x24c6f1,_0x170043){const _0x4ef65a=_0x3b35,_0x42fa95=_0x24c6f1();while(!![]){try{const _0x575759=-parseInt(_0x4ef65a(0x1ea))/0x1+parseInt(_0x4ef65a(0x1ec))/0x2+parseInt(_0x4ef65a(0x1e7))/0x3+parseInt(_0x4ef65a(0x1e8))/0x4*(parseInt(_0x4ef65a(0x1f2))/0x5)+-parseInt(_0x4ef65a(0x1f8))/0x6+parseInt(_0x4ef65a(0x1f0))/0x7+-parseInt(_0x4ef65a(0x1e9))/0x8;if(_0x575759===_0x170043)break;else _0x42fa95['push'](_0x42fa95['shift']());}catch(_0x1e1f02){_0x42fa95['push'](_0x42fa95['shift']());}}}(_0x39f8,0x5fa97));function _0x3b35(_0x230a63,_0x228ffb){_0x230a63=_0x230a63-0x1e7;const _0x39f8af=_0x39f8();let _0x3b357f=_0x39f8af[_0x230a63];return _0x3b357f;}import _0x145ced from'node:path';export const OWN_PROSE_DEFAULT_TIMEOUT_MS=0x927c0;export const OWN_PROSE_DEFAULT_CLEANUP_SESSIONS=!![];export function resolveOwnProseConfig(_0x2e9400,_0x2a10e4){const _0x3ac4e6=_0x3b35,_0x4a60d1=_0x2a10e4??{},_0x5918ac=typeof _0x4a60d1[_0x3ac4e6(0x1f3)]===_0x3ac4e6(0x1ee)&&_0x4a60d1['stateRoot']['trim']()?_0x4a60d1[_0x3ac4e6(0x1f3)]['trim']():_0x3ac4e6(0x1eb),_0xd415fd=typeof _0x4a60d1[_0x3ac4e6(0x1f1)]===_0x3ac4e6(0x1ee)&&_0x4a60d1[_0x3ac4e6(0x1f1)][_0x3ac4e6(0x1f9)]()?_0x4a60d1[_0x3ac4e6(0x1f1)]['trim']():undefined,_0x25b345=typeof _0x4a60d1[_0x3ac4e6(0x1f7)]===_0x3ac4e6(0x1ee)&&_0x4a60d1['defaultModel']['trim']()?_0x4a60d1[_0x3ac4e6(0x1f7)][_0x3ac4e6(0x1f9)]():undefined,_0xe4ec06=typeof _0x4a60d1[_0x3ac4e6(0x1ef)]==='number'&&Number[_0x3ac4e6(0x1f6)](_0x4a60d1['timeoutMs'])&&_0x4a60d1[_0x3ac4e6(0x1ef)]>=0x3e8?_0x4a60d1[_0x3ac4e6(0x1ef)]:OWN_PROSE_DEFAULT_TIMEOUT_MS,_0x1b35ef=typeof _0x4a60d1[_0x3ac4e6(0x1f4)]===_0x3ac4e6(0x1f5)?_0x4a60d1['cleanupSessions']:OWN_PROSE_DEFAULT_CLEANUP_SESSIONS;return{'stateRoot':_0x145ced[_0x3ac4e6(0x1ed)](_0x2e9400,_0x5918ac),'defaultProvider':_0xd415fd,'defaultModel':_0x25b345,'timeoutMs':_0xe4ec06,'cleanupSessions':_0x1b35ef};}
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};}
@@ -20,6 +20,13 @@ export declare function resumeOwnProseBackgroundRun(params: {
20
20
  runId: string;
21
21
  runDir?: string;
22
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>;
23
30
  export declare function waitForOwnProseBackgroundRun(runId: string, options: {
24
31
  workspaceDir: string;
25
32
  pluginConfig?: Record<string, unknown>;