@robota-sdk/agent-cli 3.0.0-beta.81 → 3.0.0-beta.82
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/dist/node/bin.js +1 -1
- package/dist/node/{cli-core-Bah38oug.js → cli-core-DWG6gqoq.js} +304 -301
- package/dist/node/{command-executor-DV-H2oD6-iQAXtTLY.cjs → command-executor-DV-H2oD6-BAvcn7Tf.cjs} +1 -1
- package/dist/node/headless.js +1 -1
- package/dist/node/{http-executor-cWzI2svn-C7F17ZGz.cjs → http-executor-cWzI2svn-Nn7UFLl8.cjs} +1 -1
- package/dist/node/index.cjs +302 -299
- package/dist/node/index.d.cts +27 -3
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.ts +27 -3
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +306 -303
- package/dist/node/index.js.map +1 -1
- package/dist/node/{node-C-hnFnOP.js → node-Bs1jlR4B.js} +1 -1
- package/dist/node/node-CQqDd5KI.js +14 -0
- package/dist/node/node-CQqDd5KI.js.map +1 -0
- package/dist/node/{node-tf433Aey.cjs → node-D8uo8Kzf.cjs} +1 -1
- package/dist/node/{node-DDl02brx.cjs → node-DE_LpiDk.cjs} +1 -1
- package/dist/node/node-Du_7g6qW.js +14 -0
- package/dist/node/{node-ChG9Tg1I.js → node-cmTHiSYe.js} +1 -1
- package/dist/node/{node-DIRGC_1P.js → node-hHzxDyjn.js} +2 -2
- package/dist/node/{node-DIRGC_1P.js.map → node-hHzxDyjn.js.map} +1 -1
- package/package.json +38 -35
- package/dist/node/node-CJnrbkAS.js +0 -14
- package/dist/node/node-CJnrbkAS.js.map +0 -1
- package/dist/node/node-uwhEt6sT.js +0 -14
package/dist/node/{command-executor-DV-H2oD6-iQAXtTLY.cjs → command-executor-DV-H2oD6-BAvcn7Tf.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./node-
|
|
1
|
+
const e=require("./node-D8uo8Kzf.cjs"),t=require("./bounded-output-DpjpS98g-yPybHprY.cjs"),n=require("./rolldown-runtime-DK3Fl9T5-BIInC43l.cjs");let r=require("node:child_process");var i=e.Lt({n:()=>a,t:()=>l}),a=n.t({CommandExecutor:()=>l});const o=1e6;function s(e,n){let r=t.a({maxBytes:o}),i=t.a({maxBytes:o,retain:`tail`});return e.stdout?.on(`data`,e=>r.append(e)),e.stderr?.on(`data`,e=>i.append(e)),e.stdin?.on(`error`,()=>{}),e.stdin?.write(n),e.stdin?.end(),{stdoutOutput:r,stderrOutput:i}}function c(e,t,n,r){if(e===0)return{outcome:`allow`,source:`command`,stdout:n};if(e===2)return{outcome:`deny`,source:`command`,reason:r.trim()||`Blocked by hook`};let i=r.trim()?`: ${r.trim()}`:``;return{outcome:`error`,source:`command`,kind:`nonzero-exit`,reason:e===null?`Hook terminated by signal ${t??`unknown`}${i}`:`Hook exited ${e}${i}`}}var l=class{shellExecutable;type=`command`;constructor(e){this.shellExecutable=e}execute(e,n,i){let a=e.timeout??600,o=a*1e3,l=JSON.stringify(n);return new Promise(u=>{let d=!1,f=t.n({executable:this.shellExecutable}),p=(0,r.spawn)(f.command,f.commandArgs(e.command),{cwd:n.cwd,env:t.s(process.env,i,n.env)}),{stdoutOutput:m,stderrOutput:h}=s(p,l),g=setTimeout(()=>{d||(d=!0,p.kill(`SIGTERM`),u({outcome:`error`,source:`command`,kind:`timeout`,reason:`Hook timed out after ${a}s`}))},o);p.on(`close`,(e,t)=>{d||(d=!0,clearTimeout(g),u(c(e,t,m.toString(),h.toString())))}),p.on(`error`,e=>{d||(d=!0,clearTimeout(g),u({outcome:`error`,source:`command`,kind:`spawn-failure`,reason:e.message}))})})}};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
package/dist/node/headless.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
;(function(){var v=parseInt(process.versions.node.split('.')[0],10);if(v<22){process.stderr.write('\n✗ Node.js 22+ is required (current: '+process.version+')\n\nUpgrade:\n nvm: nvm install 22 && nvm use 22\n Volta: volta install node@22\n Download: https://nodejs.org/en/download\n\n');process.exit(1);}})();
|
|
3
|
-
import{D as e,E as t,b as n,o as r,s as i,t as a,x as o}from"./cli-core-
|
|
3
|
+
import{D as e,E as t,b as n,o as r,s as i,t as a,x as o}from"./cli-core-DWG6gqoq.js";if(e(),n(process.argv))o(r());else try{let e=i();!e.serve||e.printMode||e.goal!==void 0||e.positional.length>0||e.reset||e.configure||e.configureProvider!==void 0||e.checkUpdate||e.help||e.version?(process.stderr.write(`This headless runtime accepts only --serve.
|
|
4
4
|
`),process.exitCode=2):a({},t).catch(e=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}\n`),process.exitCode=1})}catch(e){process.stderr.write(`${e instanceof Error?e.message:String(e)}\n`),process.exitCode=2}export{};
|
package/dist/node/{http-executor-cWzI2svn-C7F17ZGz.cjs → http-executor-cWzI2svn-Nn7UFLl8.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./node-
|
|
1
|
+
const e=require("./node-D8uo8Kzf.cjs"),t=require("./verdict-decoder-Dk_w2NG9-DNTeVdQ8.cjs"),n=require("./rolldown-runtime-DK3Fl9T5-BIInC43l.cjs");var r=e.Lt({n:()=>i,t:()=>o}),i=n.t({HttpExecutor:()=>o});function a(e){return e.replace(/\$([A-Za-z_][A-Za-z0-9_]*)/g,(e,t)=>{let n=process.env[t];return n===void 0?e:n})}var o=class{type=`http`;async execute(e,n){let r=(e.timeout??10)*1e3,i={"Content-Type":`application/json`};if(e.headers)for(let[t,n]of Object.entries(e.headers))i[t]=a(n);try{let a=await fetch(e.url,{method:`POST`,headers:i,body:JSON.stringify(n),signal:AbortSignal.timeout(r)});return a.ok?t.r(await a.text(),`http`,n.hook_event_name):{outcome:`error`,source:`http`,kind:`http-status`,reason:`HTTP ${a.status} ${a.statusText}`}}catch(e){return s(e)}}};function s(e){return{outcome:`error`,source:`http`,kind:e instanceof Error&&e.name===`TimeoutError`?`timeout`:`transport-failure`,reason:e instanceof Error?e.message:String(e)}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|