agentix-cli 0.172.0 → 0.173.0
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 +2 -2
- package/dist/{App-56QIEQGH.js → App-2LXSOVIN.js} +2 -2
- package/dist/{ChatApp-JNWIXMDN.js → ChatApp-4TRWF5SI.js} +2 -2
- package/dist/{absorb-eval-BYYFZJCC.js → absorb-eval-TF3OMPHG.js} +2 -2
- package/dist/{adapter-YQ37MDPV.js → adapter-WSN6XAKV.js} +2 -2
- package/dist/{agent-4637FJMD.js → agent-IQUF5TDP.js} +2 -2
- package/dist/{board-dashboard-DJKRLABN.js → board-dashboard-6VWNYJZ7.js} +469 -347
- package/dist/board-dashboard-6VWNYJZ7.js.map +1 -0
- package/dist/{chunk-SP7VFTXO.js → chunk-22SO5H73.js} +2 -2
- package/dist/{chunk-NR5IZJYS.js → chunk-5EI44WB7.js} +2 -2
- package/dist/{chunk-YLQZFV6Y.js → chunk-6W5262KN.js} +2 -2
- package/dist/chunk-AJ5HMDRW.js +11 -0
- package/dist/chunk-AJ5HMDRW.js.map +1 -0
- package/dist/{chunk-PD5BZYBO.js → chunk-B6JE7TKU.js} +2 -2
- package/dist/{chunk-AQGQLVCD.js → chunk-E6BIV3EM.js} +2 -2
- package/dist/{chunk-NGGEGY5K.js → chunk-EJQHTD5U.js} +16 -16
- package/dist/chunk-EJQHTD5U.js.map +1 -0
- package/dist/{chunk-VD2P4GWU.js → chunk-FRR6DRLY.js} +2 -2
- package/dist/{chunk-35I76HQS.js → chunk-GIPEXI3C.js} +2 -2
- package/dist/{chunk-FOTAGQEL.js → chunk-HXINT6DB.js} +2 -2
- package/dist/{chunk-KE3KLMMK.js → chunk-IC5CL2DW.js} +2 -2
- package/dist/{chunk-7FGJOVML.js → chunk-KAVZPYK4.js} +2 -2
- package/dist/{chunk-XCYGF4RB.js → chunk-KN2IZ6C3.js} +2 -2
- package/dist/{chunk-GALI5ANI.js → chunk-KUMCHMGE.js} +3 -3
- package/dist/{chunk-5KVTIFRY.js → chunk-NWKTI6AZ.js} +2 -2
- package/dist/{chunk-MH55YCUS.js → chunk-O2ZDYZXI.js} +97 -97
- package/dist/chunk-O2ZDYZXI.js.map +1 -0
- package/dist/{chunk-I7EO2WXC.js → chunk-QJPLPN3G.js} +2 -2
- package/dist/{chunk-HZXLZIB4.js → chunk-RY2YN3WA.js} +2 -2
- package/dist/{chunk-IPHFWU2F.js → chunk-SP2JS67T.js} +2 -2
- package/dist/{chunk-ES236GV6.js → chunk-T3V4CUOO.js} +2 -2
- package/dist/{chunk-2BJ7NIGG.js → chunk-TB752ZN4.js} +2 -2
- package/dist/{chunk-35R7Y7BT.js → chunk-UG6S2QED.js} +2 -2
- package/dist/{chunk-WO4XKOMM.js → chunk-VAH526K6.js} +2 -2
- package/dist/{chunk-MY7C6E4Y.js → chunk-VNOTN6N5.js} +2 -2
- package/dist/chunk-VQRY4IDI.js +4 -0
- package/dist/chunk-VQRY4IDI.js.map +1 -0
- package/dist/{chunk-LB55Q3K4.js → chunk-WMQBY45T.js} +2 -2
- package/dist/{chunk-TB3ZEMTC.js → chunk-WS2F726P.js} +2 -2
- package/dist/{chunk-WVPFWUR2.js → chunk-Z37662LA.js} +2 -2
- package/dist/{chunk-7NA5VSQE.js → chunk-Z73KECFS.js} +277 -273
- package/dist/chunk-Z73KECFS.js.map +1 -0
- package/dist/{chunk-XUT4RBU6.js → chunk-ZRHDAJS5.js} +2 -2
- package/dist/{chunk-TAUXWIYB.js → chunk-ZZR34W4V.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/client-Y63KZEDJ.js +2 -0
- package/dist/{config-IBOY7BGF.js → config-GPCTV4AD.js} +2 -2
- package/dist/config-mutate-S56W3EGU.js +2 -0
- package/dist/config-mutator-G2MEPNGH.js +2 -0
- package/dist/{contributions-NQ3OQ4O4.js → contributions-LK72ZY6S.js} +2 -2
- package/dist/{doctor-AMX2GRRN.js → doctor-DL7MBZXQ.js} +2 -2
- package/dist/{follow-up-tool-3XSPNZKM.js → follow-up-tool-CTP5XACV.js} +2 -2
- package/dist/{grants-4O2VF2YX.js → grants-Z332LOTO.js} +2 -2
- package/dist/hub-WRXWDBUZ.js +2 -0
- package/dist/index.d.ts +107 -55
- package/dist/index.js +1 -1
- package/dist/{note-tool-EZWSB3J3.js → note-tool-ANQWBBZE.js} +2 -2
- package/dist/{program-XKQTHEQ3.js → program-5CHM6EPW.js} +98 -98
- package/dist/program-5CHM6EPW.js.map +1 -0
- package/dist/{promote-4F2H3WEB.js → promote-B2QIPGIF.js} +2 -2
- package/dist/{query-25FU55U6.js → query-KMRMTYL6.js} +2 -2
- package/dist/{query-settings-5BLTPQQQ.js → query-settings-M3HVXUMQ.js} +2 -2
- package/dist/{registry-GROEORK6.js → registry-VQCSFMIJ.js} +2 -2
- package/dist/{request-planner-7JLFVL6Y.js → request-planner-HGGCC3VR.js} +2 -2
- package/dist/{review-candidates-MHIKLDT7.js → review-candidates-OR3GP2SU.js} +2 -2
- package/dist/routing-47DKYUQW.js +2 -0
- package/dist/schedule-tool-LENFAYB6.js +2 -0
- package/dist/scheduler-KL4R5UPC.js +2 -0
- package/dist/{seat-WUEQNCSG.js → seat-FFDCUGCG.js} +2 -2
- package/dist/{select-ASFYQYDU.js → select-BDZ44G5B.js} +2 -2
- package/dist/{set-enabled-6NIDVEZF.js → set-enabled-CX7AOZAU.js} +2 -2
- package/dist/{sprint-tool-APMWCQF3.js → sprint-tool-25JPVUH2.js} +2 -2
- package/dist/{tool-MKUGBNSW.js → tool-CMFZK2HQ.js} +2 -2
- package/dist/{tool-2CKQKDU5.js → tool-CZCY6ZBQ.js} +2 -2
- package/dist/{tool-JPSOIPZZ.js → tool-VMTEK3DF.js} +2 -2
- package/dist/wiki-LMVIRMSR.js +2 -0
- package/dist/wiki-enrich-JS6WC6ER.js +2 -0
- package/package.json +1 -1
- package/dist/board-dashboard-DJKRLABN.js.map +0 -1
- package/dist/chunk-7NA5VSQE.js.map +0 -1
- package/dist/chunk-GZIHLADX.js +0 -4
- package/dist/chunk-GZIHLADX.js.map +0 -1
- package/dist/chunk-MH55YCUS.js.map +0 -1
- package/dist/chunk-NGGEGY5K.js.map +0 -1
- package/dist/chunk-PYHR4HXO.js +0 -11
- package/dist/chunk-PYHR4HXO.js.map +0 -1
- package/dist/client-LP4PURY2.js +0 -2
- package/dist/config-mutate-PETOQADF.js +0 -2
- package/dist/config-mutator-2NLZ37LL.js +0 -2
- package/dist/hub-DRCMPJMQ.js +0 -2
- package/dist/program-XKQTHEQ3.js.map +0 -1
- package/dist/routing-ZSGWR6ID.js +0 -2
- package/dist/schedule-tool-2VI5IWZD.js +0 -2
- package/dist/scheduler-J6BGTTMH.js +0 -2
- package/dist/wiki-JR6U5PSV.js +0 -2
- package/dist/wiki-enrich-KFVPA2JG.js +0 -2
- /package/dist/{App-56QIEQGH.js.map → App-2LXSOVIN.js.map} +0 -0
- /package/dist/{ChatApp-JNWIXMDN.js.map → ChatApp-4TRWF5SI.js.map} +0 -0
- /package/dist/{absorb-eval-BYYFZJCC.js.map → absorb-eval-TF3OMPHG.js.map} +0 -0
- /package/dist/{adapter-YQ37MDPV.js.map → adapter-WSN6XAKV.js.map} +0 -0
- /package/dist/{agent-4637FJMD.js.map → agent-IQUF5TDP.js.map} +0 -0
- /package/dist/{chunk-SP7VFTXO.js.map → chunk-22SO5H73.js.map} +0 -0
- /package/dist/{chunk-NR5IZJYS.js.map → chunk-5EI44WB7.js.map} +0 -0
- /package/dist/{chunk-YLQZFV6Y.js.map → chunk-6W5262KN.js.map} +0 -0
- /package/dist/{chunk-PD5BZYBO.js.map → chunk-B6JE7TKU.js.map} +0 -0
- /package/dist/{chunk-AQGQLVCD.js.map → chunk-E6BIV3EM.js.map} +0 -0
- /package/dist/{chunk-VD2P4GWU.js.map → chunk-FRR6DRLY.js.map} +0 -0
- /package/dist/{chunk-35I76HQS.js.map → chunk-GIPEXI3C.js.map} +0 -0
- /package/dist/{chunk-FOTAGQEL.js.map → chunk-HXINT6DB.js.map} +0 -0
- /package/dist/{chunk-KE3KLMMK.js.map → chunk-IC5CL2DW.js.map} +0 -0
- /package/dist/{chunk-7FGJOVML.js.map → chunk-KAVZPYK4.js.map} +0 -0
- /package/dist/{chunk-XCYGF4RB.js.map → chunk-KN2IZ6C3.js.map} +0 -0
- /package/dist/{chunk-GALI5ANI.js.map → chunk-KUMCHMGE.js.map} +0 -0
- /package/dist/{chunk-5KVTIFRY.js.map → chunk-NWKTI6AZ.js.map} +0 -0
- /package/dist/{chunk-I7EO2WXC.js.map → chunk-QJPLPN3G.js.map} +0 -0
- /package/dist/{chunk-HZXLZIB4.js.map → chunk-RY2YN3WA.js.map} +0 -0
- /package/dist/{chunk-IPHFWU2F.js.map → chunk-SP2JS67T.js.map} +0 -0
- /package/dist/{chunk-ES236GV6.js.map → chunk-T3V4CUOO.js.map} +0 -0
- /package/dist/{chunk-2BJ7NIGG.js.map → chunk-TB752ZN4.js.map} +0 -0
- /package/dist/{chunk-35R7Y7BT.js.map → chunk-UG6S2QED.js.map} +0 -0
- /package/dist/{chunk-WO4XKOMM.js.map → chunk-VAH526K6.js.map} +0 -0
- /package/dist/{chunk-MY7C6E4Y.js.map → chunk-VNOTN6N5.js.map} +0 -0
- /package/dist/{chunk-LB55Q3K4.js.map → chunk-WMQBY45T.js.map} +0 -0
- /package/dist/{chunk-TB3ZEMTC.js.map → chunk-WS2F726P.js.map} +0 -0
- /package/dist/{chunk-WVPFWUR2.js.map → chunk-Z37662LA.js.map} +0 -0
- /package/dist/{chunk-XUT4RBU6.js.map → chunk-ZRHDAJS5.js.map} +0 -0
- /package/dist/{chunk-TAUXWIYB.js.map → chunk-ZZR34W4V.js.map} +0 -0
- /package/dist/{client-LP4PURY2.js.map → client-Y63KZEDJ.js.map} +0 -0
- /package/dist/{config-IBOY7BGF.js.map → config-GPCTV4AD.js.map} +0 -0
- /package/dist/{config-mutate-PETOQADF.js.map → config-mutate-S56W3EGU.js.map} +0 -0
- /package/dist/{config-mutator-2NLZ37LL.js.map → config-mutator-G2MEPNGH.js.map} +0 -0
- /package/dist/{contributions-NQ3OQ4O4.js.map → contributions-LK72ZY6S.js.map} +0 -0
- /package/dist/{doctor-AMX2GRRN.js.map → doctor-DL7MBZXQ.js.map} +0 -0
- /package/dist/{follow-up-tool-3XSPNZKM.js.map → follow-up-tool-CTP5XACV.js.map} +0 -0
- /package/dist/{grants-4O2VF2YX.js.map → grants-Z332LOTO.js.map} +0 -0
- /package/dist/{hub-DRCMPJMQ.js.map → hub-WRXWDBUZ.js.map} +0 -0
- /package/dist/{note-tool-EZWSB3J3.js.map → note-tool-ANQWBBZE.js.map} +0 -0
- /package/dist/{promote-4F2H3WEB.js.map → promote-B2QIPGIF.js.map} +0 -0
- /package/dist/{query-25FU55U6.js.map → query-KMRMTYL6.js.map} +0 -0
- /package/dist/{query-settings-5BLTPQQQ.js.map → query-settings-M3HVXUMQ.js.map} +0 -0
- /package/dist/{registry-GROEORK6.js.map → registry-VQCSFMIJ.js.map} +0 -0
- /package/dist/{request-planner-7JLFVL6Y.js.map → request-planner-HGGCC3VR.js.map} +0 -0
- /package/dist/{review-candidates-MHIKLDT7.js.map → review-candidates-OR3GP2SU.js.map} +0 -0
- /package/dist/{routing-ZSGWR6ID.js.map → routing-47DKYUQW.js.map} +0 -0
- /package/dist/{schedule-tool-2VI5IWZD.js.map → schedule-tool-LENFAYB6.js.map} +0 -0
- /package/dist/{scheduler-J6BGTTMH.js.map → scheduler-KL4R5UPC.js.map} +0 -0
- /package/dist/{seat-WUEQNCSG.js.map → seat-FFDCUGCG.js.map} +0 -0
- /package/dist/{select-ASFYQYDU.js.map → select-BDZ44G5B.js.map} +0 -0
- /package/dist/{set-enabled-6NIDVEZF.js.map → set-enabled-CX7AOZAU.js.map} +0 -0
- /package/dist/{sprint-tool-APMWCQF3.js.map → sprint-tool-25JPVUH2.js.map} +0 -0
- /package/dist/{tool-MKUGBNSW.js.map → tool-CMFZK2HQ.js.map} +0 -0
- /package/dist/{tool-2CKQKDU5.js.map → tool-CZCY6ZBQ.js.map} +0 -0
- /package/dist/{tool-JPSOIPZZ.js.map → tool-VMTEK3DF.js.map} +0 -0
- /package/dist/{wiki-JR6U5PSV.js.map → wiki-LMVIRMSR.js.map} +0 -0
- /package/dist/{wiki-enrich-KFVPA2JG.js.map → wiki-enrich-JS6WC6ER.js.map} +0 -0
package/dist/chunk-GZIHLADX.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as w}from"./chunk-QIJLFPWE.js";import{z as v}from"zod";function U(e){return e==="report"||e==="propose"}function $(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).filter(Boolean).map(t=>t.toLowerCase())}function u(e){return $(e).slice(2).join(" ").replace(/\b(merge|pull)\s+requests?\b/g,"mergerequest").split(" ").filter(Boolean)}function h(e){let t=e.replace(/<<-?\s*(['"]?)([A-Za-z_][A-Za-z0-9_]*)\1([\s\S]*?)^\s*\2\s*$/gm,(s,o,i,l)=>!o&&/\$\(|`/.test(l)?s:s.split(`
|
|
2
|
-
`)[0]+`
|
|
3
|
-
`),n="",r=0;for(;r<t.length;){let s=t[r];if(s==="\\"){n+=t.slice(r,r+2),r+=2;continue}if(s==="'"){let o=t.indexOf("'",r+1);if(o<0)return null;n+="''",r=o+1;continue}if(s==='"'){let o=r+1;for(;o<t.length&&t[o]!=='"';)o+=t[o]==="\\"?2:1;if(o>=t.length)return null;let i=t.slice(r+1,o);n+=/\$\(|`/.test(i)?` ${i} `:'""',r=o+1;continue}n+=s,r++}return n}function g(e){return e.split(/\|\||&&|[;|&\n`()]|\$\(|<\(|>\(/).map(t=>t.trim().split(/\s+/).filter(Boolean)).filter(t=>t.length>0)}function m(e){let t=0;for(;t<e.length;){let n=e[t];if(T.has(n))return[];if(k.has(n)||/^[A-Za-z_][A-Za-z0-9_]*=/.test(n)){t++;continue}break}return e.slice(t)}function b(e){let t=0;for(;t<e.length&&e[t].startsWith("-");)t+=/^-(C|c)$|^--(git-dir|work-tree|namespace)$/.test(e[t])?2:1;return{sub:e[t],rest:e.slice(t+1)}}function L(e){let[t,...n]=e,r=t.replace(/^.*\//,"");if(!x.has(r))return`\`${r}\` is not a read-only command`;let s=o=>n.some(i=>o.test(i));switch(r){case"find":return s(/^-(exec|execdir|ok|okdir|delete|fprint|fprint0|fprintf|fls)$/)?"find with -exec/-delete":null;case"sort":return s(/^(-o|--output)/)?"sort -o writes a file":null;case"git":{if(s(/^(-c|--exec-path|--output)/))return"git option that can execute or write";let{sub:o,rest:i}=b(n);return!o||!_.has(o)?`git ${o??""} is not read-only`.trim():o==="branch"&&i.some(l=>/^-(d|D|m|M|c|C|f|u)$|^--(delete|move|copy|force|set-upstream|unset-upstream|edit-description)/.test(l)||!l.startsWith("-"))?"git branch that changes branches":o==="tag"&&i.some(l=>!/^(-l|--list|-n\d*|--contains|--points-at|--sort=.*|--merged|--no-merged)$/.test(l))?"git tag that creates or deletes tags":o==="remote"&&i.length>0&&!/^(-v|--verbose|show|get-url)$/.test(i[0])?"git remote that changes remotes":o==="config"&&!i.some(l=>/^(--get|--get-all|--get-regexp|--list|-l)$/.test(l))?"git config write":o==="reflog"&&i.length>0&&!/^(show|-)/.test(i[0])?"git reflog that expires or deletes":null}case"gh":case"glab":{let[o,i]=n.filter(l=>!l.startsWith("-"));if(o==="search")return null;if(o==="api"){let l=n.findIndex(y=>/^(-X|--method)$/.test(y));return l>=0&&!/^GET$/i.test(n[l+1]??"")?`${r} api with a non-GET method`:s(/^-X(?!GET$)\w+|^--method=(?!GET$)/i)?`${r} api with a non-GET method`:s(/^(-f|-F|--field|--raw-field|--input)/)?`${r} api with a request body`:null}return!i||!D.has(i)?`${r} ${o??""} ${i??""} is not read-only`.replace(/\s+/g," ").trim():null}case"agentx":{let[o,i]=n.filter(l=>!l.startsWith("-"));return o==="sales"&&i&&R.has(i)?null:`agentx ${o??""} ${i??""} is not read-only`.replace(/\s+/g," ").trim()}case"curl":{let o=n.findIndex(i=>/^(-X|--request)$/.test(i));return o>=0&&!/^(GET|HEAD|OPTIONS)$/i.test(n[o+1]??"")||s(/^-X(?!GET$|HEAD$)\w+|^--request=(?!GET$|HEAD$)/i)?"curl with a non-GET method":s(/^(-d|--data|--data-\w+|--json|-F|--form|-T|--upload-file|-o|--output|-O|--remote-name|-K|--config)/)?"curl that sends a body or writes a file":null}default:return null}}function W(e){let t=e.replace(/\d*>>?\s*\/dev\/null/g," ").replace(/&>>?\s*\/dev\/null/g," ").replace(/\d*>&\s*\d+/g," ");return/[>]/.test(t)}function O(e){let t=h(e);if(t===null)return a("report","shell","command too irregular to verify as read-only");if(W(t))return a("report","shell","output redirection writes a file");for(let n of g(t)){let r=m(n);if(r.length===0)continue;let s=L(r);if(s)return a("report","shell",s)}return c}function I(e){if(S.has(e.tool))return a("report","write",`${e.tool} modifies files`);if(e.tool==="Bash")return O(e.command??"");if(E.has(e.tool))return c;if(e.tool.startsWith("mcp__")){let t=u(e.tool),n=t.find(r=>A.has(r));return n?a("report","outward",`tool "${e.tool}" can change state (${n})`):t.some(r=>p.has(r))?c:a("report","outward",`tool "${e.tool}" is not recognisably read-only`)}return a("report","tool",`tool "${e.tool}" is not on the read-only list`)}function H(e){let t=[];for(let r=0;r<e.length;r++){let s=e[r];if(q.test(s)){r++;continue}if(/^(--force.*|-d|--delete|--mirror|--all|--tags|--prune)$/.test(s)||/^-[a-zA-Z]*f/.test(s))return a("propose","push","force, delete, mirror and tag pushes are act-level actions");s.startsWith("-")||t.push(s)}let n=t.slice(1);if(n.length===0)return a("propose","push","name the feature branch explicitly: git push <remote> <branch>");for(let r of n){if(r.startsWith("+")||r.startsWith(":"))return a("propose","push",`refspec "${r}" force-pushes or deletes`);let s=(r.includes(":")?r.slice(r.indexOf(":")+1):r).replace(/^refs\/heads\//,"");if(B.test(s))return a("propose","push",`pushing to "${s}" is an act-level action; push a feature branch and open a merge request`)}return null}function M(e){for(let n of G)if(n.re.test(e))return a("propose",n.id,n.reason);let t=h(e);if(t===null)return a("propose","shell","command too irregular to verify");for(let n of g(t)){let r=m(n);if(r.length===0)continue;let s=[d(r[0]),...r.slice(1)].join(" ");for(let o of P)if(o.re.test(s))return a("propose",o.id,o.reason);if(d(r[0])==="git"){let{sub:o,rest:i}=b(r.slice(1));if(o==="push"){let l=H(i);if(l)return l}}}return c}function z(e){if(e.tool==="Bash")return M(e.command??"");if(e.tool.startsWith("mcp__")){let t=u(e.tool).find(n=>f.has(n));if(t)return a("propose","outward",`tool "${e.tool}" performs an act-level action (${t})`);if(N(u(e.tool)))return a("propose","delegate",`tool "${e.tool}" hands work to another agent, which would run at its own full autonomy`)}return c}function N(e){return e.includes("delegate")||e.includes("handoff")||e.includes("agent")&&e.some(t=>t==="send"||t==="ask"||t==="message"||t==="task")?!0:e.includes("task")&&!e.some(t=>p.has(t))}function V(e,t){return e==="report"?I(t):e==="propose"?z(t):c}function X(e){return e==="report"?"[Autonomy: report] This routine runs read-only. Investigate and report; do not modify files, run mutating commands, or post anywhere. Your final answer is the deliverable. Blocked actions are enforced and logged; if something needs doing, describe it in the report instead.":e==="propose"?"[Autonomy: propose] You may edit files, commit, push a named feature branch, and open a merge request or draft. You may not merge, deploy, delete, force-push, push to protected branches, or operate hosts. These limits are enforced and logged; leave act-level steps as clear recommendations.":""}var j,c,a,S,E,p,f,A,k,T,d,x,R,_,D,G,P,B,q,C=w(()=>{"use strict";j=v.enum(["report","propose","act"]);c={allowed:!0,ruleId:null,reason:null},a=(e,t,n)=>({allowed:!1,ruleId:`autonomy.${e}.${t}`,reason:n}),S=new Set(["Write","Edit","MultiEdit","NotebookEdit"]),E=new Set(["Read","Glob","Grep","LS","NotebookRead","WebFetch","WebSearch","TodoWrite","TodoRead","Task","Agent","Skill","ToolSearch","BashOutput","KillShell","ExitPlanMode","EnterPlanMode","ListMcpResourcesTool","ReadMcpResourceTool"]);p=new Set(["get","list","search","read","view","fetch","query","find","show","describe","status","diff","inspect","lookup","count","stats","browse","whoami","download"]),f=new Set(["merge","delete","remove","destroy","drop","deploy","publish","release","approve","archive","revoke","purge","close","transfer","force","rollback","restart","erase","unprotect","truncate","wipe","kill","terminate","unpublish","promote"]),A=new Set([...f,"create","update","post","send","write","edit","add","set","comment","reply","push","run","execute","exec","trigger","upload","move","rename","cancel","retry","assign","label","react","invite","notify","schedule","start","stop","submit","save","patch","put","insert","upsert","apply","install","import","mark","toggle","enable","disable","open","commit","sync","reset","store","remember","forget","broadcast","message","call","dispatch","enqueue","resolve","unassign","lock","unlock","pin"]);k=new Set(["then","do","else","elif","if","while","until","!","{","}","time"]),T=new Set(["done","fi","esac","for","case","select","in",";;"]);d=e=>e.replace(/^.*\//,""),x=new Set(["ls","pwd","cd","cat","head","tail","wc","grep","egrep","fgrep","rg","fd","tree","stat","file","du","df","date","whoami","id","hostname","uname","which","type","sort","uniq","cut","tr","diff","cmp","comm","basename","dirname","realpath","readlink","jq","column","nl","seq","true","false","test","[","sleep","ps","uptime","echo","printf","base64","md5","md5sum","shasum","sha256sum","less","more","printenv","dig","nslookup","host","find","git","gh","glab","curl","agentx"]),R=new Set(["leads","changes","check","watch"]),_=new Set(["status","log","diff","show","rev-parse","ls-files","ls-tree","blame","shortlog","describe","cat-file","grep","branch","tag","remote","config","reflog","rev-list","merge-base","name-rev","show-ref","for-each-ref","whatchanged"]),D=new Set(["view","list","diff","status","checks","ls"]);G=[{id:"merge",re:/merge_when_pipeline_succeeds|\bauto[_-]merge\b/i,reason:"auto-merging is an act-level action"},{id:"merge",re:/\b(curl|wget|http|gh\s+api|glab\s+api)\b[^\n]*\/merges?\b/i,reason:"calling a merge endpoint is an act-level action"},{id:"delete",re:/(?:^|\W)(drop|truncate)\s+(table|database|schema|index|collection)\b|(?:^|\W)delete\s+from\b|\bflushall\b|\bflushdb\b/i,reason:"destroying data is an act-level action"},{id:"delete",re:/(-X|--request)[\s=]*['"]?DELETE\b/i,reason:"HTTP DELETE is an act-level action"},{id:"delegate",re:/\b(curl|wget|http)\b[^\n]*(localhost|127\.0\.0\.1|\[::1\])[^\n]*\/(ask|task|send|chat|mesh|workflows?|crons?|reload|config)\b/i,reason:"calling the local daemon to dispatch work escapes this routine's limit"}],P=[{id:"merge",re:/^(gh\s+pr\s+merge|glab\s+mr\s+merge)\b/i,reason:"merging is an act-level action"},{id:"delete",re:/^rm\s+(.*\s)?(-\w*[rR]\w*|--recursive)\b|^(shred|dropdb)\b|^find\b.*\s-delete\b/i,reason:"deleting is an act-level action"},{id:"delete",re:/^git\s+(clean\s+-\w*f|reset\s+--hard|branch\s+(-\w*[dD]\w*|--delete)|tag\s+(-d|--delete)|stash\s+(drop|clear)|remote\s+(remove|rm))\b/i,reason:"deleting is an act-level action"},{id:"delete",re:/^(gh|glab)\s+\S+\s+delete\b|^docker\s+(rm|rmi|volume\s+rm|system\s+prune)\b|^(kubectl\s+delete|aws\s+s3\s+(rm|rb)|gsutil\s+rm)\b|^doctl\s+.*\sdelete\b/i,reason:"deleting is an act-level action"},{id:"deploy",re:/^(kubectl\s+(apply|rollout|scale|set|patch|replace|create|edit)|helm\s+(install|upgrade|rollback|uninstall|delete)|terraform\s+(apply|destroy|import|taint)|pulumi\s+(up|destroy)|docker\s+push|netlify\s+deploy|fly(ctl)?\s+deploy|serverless\s+deploy|vercel\b.*--prod)\b/i,reason:"deploying is an act-level action"},{id:"deploy",re:/^((npm|pnpm|yarn|bun)(\s+run)?|make|just|task|rake)\s+(\S+:)?deploy\b|^((ba|z)?sh|node|python3?)\s+\S*deploy[^\s/]*$|^\S*\/deploy(\.\w+)?\b|^deploy(\.\w+)?\b/i,reason:"deploying is an act-level action"},{id:"deploy",re:/^((npm|pnpm|yarn|bun)\s+publish|cargo\s+publish|twine\s+upload|(gh|glab)\s+release\s+(create|upload|edit)|(npx\s+)?prisma\s+(migrate\s+(deploy|reset)|db\s+push))\b/i,reason:"publishing or migrating is an act-level action"},{id:"prod",re:/^(ssh|scp|sudo|doas|systemctl|launchctl|service|kill|pkill|killall|reboot|shutdown)\b|^rsync\b.*\s\S+:\S*/i,reason:"operating hosts and services is an act-level action"},{id:"delegate",re:/^(agentx|agentix)\s+(ask|send|task|exec|run|chat|mesh|cron|workflow|daemon|config)\b/i,reason:"handing work to another agent or reconfiguring the daemon escapes this routine's limit"}],B=/^(main|master|trunk|develop|development|prod|production|staging|stable|release([/-].*)?|HEAD|@)$/i,q=/^(-o|--push-option|--repo|--receive-pack|--exec)$/});export{j as a,U as b,V as c,X as d,C as e};
|
|
4
|
-
//# sourceMappingURL=chunk-GZIHLADX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/guard/autonomy.ts"],"sourcesContent":["import { z } from \"zod\"\n\n// --- Routine autonomy levels: the rule sets ---\n//\n// A routine (cron job or workflow agent step) may run below its agent's full\n// power:\n//\n// report — read-only. No file writes, no mutating shell, no outward-posting\n// tools. The only output is the final answer, which the scheduler\n// delivers.\n// propose — may edit files, commit, push a feature branch, open an MR/PR or\n// a draft. Never merge, deploy, delete, force-push, or touch\n// production.\n// act — unchanged: whatever the agent may normally do.\n//\n// This module is PURE: (level, tool call) -> allow | block. It is evaluated\n// by the daemon for every tool call of a restricted task (see\n// autonomy-enforce.ts for the wiring). Deterministic by construction, like\n// the rest of the guard.\n//\n// Shape of the two restricted levels differs on purpose:\n// - report is an ALLOWLIST. A read-only posture cannot be expressed as\n// \"everything except the dangerous things\" — `python -c`, `node x.js`\n// or a `curl -d` are all writes nobody would list. Unknown => blocked.\n// - propose is a DENYLIST over a working agent. Its job is to stop the\n// irreversible, outward steps (merge/deploy/delete/force-push), not to\n// make the agent useless. A determined agent can evade a denylist by\n// indirection (write a script, then run it); propose is a guardrail for\n// honest routines, report is the hard boundary.\n\nexport const autonomyLevelSchema = z.enum([\"report\", \"propose\", \"act\"])\nexport type AutonomyLevel = z.infer<typeof autonomyLevelSchema>\n\n/** True for the levels that need per-task enforcement. */\nexport function isRestricted(level: AutonomyLevel | undefined | null): level is \"report\" | \"propose\" {\n return level === \"report\" || level === \"propose\"\n}\n\nexport interface AutonomyInput {\n tool: string\n command?: string\n filePath?: string\n}\n\nexport interface AutonomyDecision {\n allowed: boolean\n /** Stable id, e.g. \"autonomy.report.write\". Null when allowed. */\n ruleId: string | null\n reason: string | null\n}\n\nconst ALLOW: AutonomyDecision = { allowed: true, ruleId: null, reason: null }\nconst block = (level: string, id: string, reason: string): AutonomyDecision => ({\n allowed: false,\n ruleId: `autonomy.${level}.${id}`,\n reason,\n})\n\n// ---------------------------------------------------------------- tools\n\nconst WRITE_TOOLS = new Set([\"Write\", \"Edit\", \"MultiEdit\", \"NotebookEdit\"])\n\n/** Native tools that never change anything outside the conversation. */\nconst REPORT_SAFE_TOOLS = new Set([\n \"Read\", \"Glob\", \"Grep\", \"LS\", \"NotebookRead\", \"WebFetch\", \"WebSearch\",\n \"TodoWrite\", \"TodoRead\", \"Task\", \"Agent\", \"Skill\", \"ToolSearch\",\n \"BashOutput\", \"KillShell\", \"ExitPlanMode\", \"EnterPlanMode\",\n \"ListMcpResourcesTool\", \"ReadMcpResourceTool\",\n])\n\n/** Split a tool name into lowercase words: `mcp__gitlab__create_merge_request`\n * -> [mcp, gitlab, create, merge, request]; camelCase splits too. */\nexport function toolWords(name: string): string[] {\n return name\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .split(/[^A-Za-z0-9]+/)\n .filter(Boolean)\n .map((w) => w.toLowerCase())\n}\n\n/** The action words of an MCP tool name (server prefix dropped), with the\n * nouns \"merge request\" / \"pull request\" folded so `create_merge_request`\n * reads as create-an-MR, not as a merge. */\nexport function mcpActionWords(name: string): string[] {\n return toolWords(name)\n .slice(2)\n .join(\" \")\n .replace(/\\b(merge|pull)\\s+requests?\\b/g, \"mergerequest\")\n .split(\" \")\n .filter(Boolean)\n}\n\nconst READ_VERBS = new Set([\n \"get\", \"list\", \"search\", \"read\", \"view\", \"fetch\", \"query\", \"find\", \"show\", \"describe\",\n \"status\", \"diff\", \"inspect\", \"lookup\", \"count\", \"stats\", \"browse\", \"whoami\", \"download\",\n])\n/** Irreversible or outward-facing verbs. Blocked in propose, and in report. */\nconst DESTRUCTIVE_VERBS = new Set([\n \"merge\", \"delete\", \"remove\", \"destroy\", \"drop\", \"deploy\", \"publish\", \"release\", \"approve\",\n \"archive\", \"revoke\", \"purge\", \"close\", \"transfer\", \"force\", \"rollback\", \"restart\", \"erase\",\n \"unprotect\", \"truncate\", \"wipe\", \"kill\", \"terminate\", \"unpublish\", \"promote\",\n])\n/** Any state change at all. Blocked in report. */\nconst MUTATING_VERBS = new Set([\n ...DESTRUCTIVE_VERBS,\n \"create\", \"update\", \"post\", \"send\", \"write\", \"edit\", \"add\", \"set\", \"comment\", \"reply\",\n \"push\", \"run\", \"execute\", \"exec\", \"trigger\", \"upload\", \"move\", \"rename\", \"cancel\", \"retry\",\n \"assign\", \"label\", \"react\", \"invite\", \"notify\", \"schedule\", \"start\", \"stop\", \"submit\", \"save\",\n \"patch\", \"put\", \"insert\", \"upsert\", \"apply\", \"install\", \"import\", \"mark\", \"toggle\", \"enable\",\n \"disable\", \"open\", \"commit\", \"sync\", \"reset\", \"store\", \"remember\", \"forget\", \"broadcast\",\n \"message\", \"call\", \"dispatch\", \"enqueue\", \"resolve\", \"unassign\", \"lock\", \"unlock\", \"pin\",\n])\n\n// ---------------------------------------------------------------- shell view\n\n/**\n * The part of a shell command the shell will actually EXECUTE, flattened so\n * every command position can be inspected:\n * - single-quoted text is blanked (truly literal),\n * - double-quoted text is blanked unless it contains `$(`/backticks, in\n * which case the substitution is executed and must stay visible,\n * - heredoc bodies are blanked unless the delimiter is unquoted and the\n * body substitutes commands.\n * Returns `null` for input too irregular to judge (unbalanced quotes), which\n * callers treat as \"block\" in report mode.\n */\nexport function shellView(command: string): string | null {\n // Heredocs: blank the body unless the delimiter is unquoted AND the body\n // substitutes commands (then the shell executes it — keep it visible).\n const text = command.replace(/<<-?\\s*(['\"]?)([A-Za-z_][A-Za-z0-9_]*)\\1([\\s\\S]*?)^\\s*\\2\\s*$/gm,\n (m, quote: string, _d: string, body: string) =>\n !quote && /\\$\\(|`/.test(body) ? m : m.split(\"\\n\")[0] + \"\\n\")\n let out = \"\"\n let i = 0\n while (i < text.length) {\n const c = text[i]\n if (c === \"\\\\\") { out += text.slice(i, i + 2); i += 2; continue }\n if (c === \"'\") {\n const end = text.indexOf(\"'\", i + 1)\n if (end < 0) return null\n out += \"''\"\n i = end + 1\n continue\n }\n if (c === '\"') {\n let j = i + 1\n while (j < text.length && text[j] !== '\"') j += text[j] === \"\\\\\" ? 2 : 1\n if (j >= text.length) return null\n const inner = text.slice(i + 1, j)\n out += /\\$\\(|`/.test(inner) ? ` ${inner} ` : '\"\"'\n i = j + 1\n continue\n }\n out += c\n i++\n }\n return out\n}\n\n/** Split a shell view into simple-command segments (words arrays). */\nexport function shellSegments(view: string): string[][] {\n return view\n .split(/\\|\\||&&|[;|&\\n`()]|\\$\\(|<\\(|>\\(/)\n .map((s) => s.trim().split(/\\s+/).filter(Boolean))\n .filter((w) => w.length > 0)\n}\n\nconst SHELL_KEYWORDS_STRIP = new Set([\"then\", \"do\", \"else\", \"elif\", \"if\", \"while\", \"until\", \"!\", \"{\", \"}\", \"time\"])\nconst SHELL_KEYWORDS_SKIP = new Set([\"done\", \"fi\", \"esac\", \"for\", \"case\", \"select\", \"in\", \";;\"])\n\n/** Drop leading keywords and `VAR=value` assignments; return the command words. */\nfunction commandWords(words: string[]): string[] {\n let i = 0\n while (i < words.length) {\n const w = words[i]\n if (SHELL_KEYWORDS_SKIP.has(w)) return []\n if (SHELL_KEYWORDS_STRIP.has(w) || /^[A-Za-z_][A-Za-z0-9_]*=/.test(w)) { i++; continue }\n break\n }\n return words.slice(i)\n}\n\n/** `git [-C dir] [--flags] <sub> <rest...>` -> { sub, rest }. */\nfunction gitSubcommand(args: string[]): { sub: string | undefined; rest: string[] } {\n let i = 0\n while (i < args.length && args[i].startsWith(\"-\")) i += /^-(C|c)$|^--(git-dir|work-tree|namespace)$/.test(args[i]) ? 2 : 1\n return { sub: args[i], rest: args.slice(i + 1) }\n}\n\n/** Command name without its path: `/usr/bin/git` -> `git`. */\nconst baseName = (w: string) => w.replace(/^.*\\//, \"\")\n\n// ---------------------------------------------------------------- report\n\nconst REPORT_SHELL_COMMANDS = new Set([\n \"ls\", \"pwd\", \"cd\", \"cat\", \"head\", \"tail\", \"wc\", \"grep\", \"egrep\", \"fgrep\", \"rg\", \"fd\", \"tree\",\n \"stat\", \"file\", \"du\", \"df\", \"date\", \"whoami\", \"id\", \"hostname\", \"uname\", \"which\", \"type\",\n \"sort\", \"uniq\", \"cut\", \"tr\", \"diff\", \"cmp\", \"comm\", \"basename\", \"dirname\", \"realpath\",\n \"readlink\", \"jq\", \"column\", \"nl\", \"seq\", \"true\", \"false\", \"test\", \"[\", \"sleep\", \"ps\",\n \"uptime\", \"echo\", \"printf\", \"base64\", \"md5\", \"md5sum\", \"shasum\", \"sha256sum\", \"less\", \"more\",\n \"printenv\", \"dig\", \"nslookup\", \"host\", \"find\", \"git\", \"gh\", \"glab\", \"curl\", \"agentx\",\n])\n\n/** `agentx sales` subcommands a report routine may run (#1288). They read\n * leads.md and opt-outs.md and print; `watch` also fetches the pages in\n * competitors.md (GET only, like curl here) and keeps its snapshots in the\n * workspace's .agentx-sales/, which is what lets a read-only brief report\n * only what changed. `opt-out` changes who may be contacted: not here. */\nconst AGENTX_SALES_READ = new Set([\"leads\", \"changes\", \"check\", \"watch\"])\n\nconst GIT_READ = new Set([\n \"status\", \"log\", \"diff\", \"show\", \"rev-parse\", \"ls-files\", \"ls-tree\", \"blame\", \"shortlog\",\n \"describe\", \"cat-file\", \"grep\", \"branch\", \"tag\", \"remote\", \"config\", \"reflog\", \"rev-list\",\n \"merge-base\", \"name-rev\", \"show-ref\", \"for-each-ref\", \"whatchanged\",\n])\nconst GH_READ_ACTIONS = new Set([\"view\", \"list\", \"diff\", \"status\", \"checks\", \"ls\"])\n\nfunction reportShellWord(words: string[]): string | null {\n const [cmd, ...args] = words\n const base = cmd.replace(/^.*\\//, \"\")\n if (!REPORT_SHELL_COMMANDS.has(base)) return `\\`${base}\\` is not a read-only command`\n const has = (re: RegExp) => args.some((a) => re.test(a))\n switch (base) {\n case \"find\":\n if (has(/^-(exec|execdir|ok|okdir|delete|fprint|fprint0|fprintf|fls)$/)) return \"find with -exec/-delete\"\n return null\n case \"sort\":\n if (has(/^(-o|--output)/)) return \"sort -o writes a file\"\n return null\n case \"git\": {\n if (has(/^(-c|--exec-path|--output)/)) return \"git option that can execute or write\"\n const { sub, rest } = gitSubcommand(args)\n if (!sub || !GIT_READ.has(sub)) return `git ${sub ?? \"\"} is not read-only`.trim()\n if (sub === \"branch\" && rest.some((a) => /^-(d|D|m|M|c|C|f|u)$|^--(delete|move|copy|force|set-upstream|unset-upstream|edit-description)/.test(a) || !a.startsWith(\"-\"))) {\n return \"git branch that changes branches\"\n }\n if (sub === \"tag\" && rest.some((a) => !/^(-l|--list|-n\\d*|--contains|--points-at|--sort=.*|--merged|--no-merged)$/.test(a))) {\n return \"git tag that creates or deletes tags\"\n }\n if (sub === \"remote\" && rest.length > 0 && !/^(-v|--verbose|show|get-url)$/.test(rest[0])) return \"git remote that changes remotes\"\n if (sub === \"config\" && !rest.some((a) => /^(--get|--get-all|--get-regexp|--list|-l)$/.test(a))) return \"git config write\"\n if (sub === \"reflog\" && rest.length > 0 && !/^(show|-)/.test(rest[0])) return \"git reflog that expires or deletes\"\n return null\n }\n case \"gh\":\n case \"glab\": {\n const [group, action] = args.filter((a) => !a.startsWith(\"-\"))\n if (group === \"search\") return null\n if (group === \"api\") {\n const method = args.findIndex((a) => /^(-X|--method)$/.test(a))\n if (method >= 0 && !/^GET$/i.test(args[method + 1] ?? \"\")) return `${base} api with a non-GET method`\n if (has(/^-X(?!GET$)\\w+|^--method=(?!GET$)/i)) return `${base} api with a non-GET method`\n if (has(/^(-f|-F|--field|--raw-field|--input)/)) return `${base} api with a request body`\n return null\n }\n if (!action || !GH_READ_ACTIONS.has(action)) return `${base} ${group ?? \"\"} ${action ?? \"\"} is not read-only`.replace(/\\s+/g, \" \").trim()\n return null\n }\n case \"agentx\": {\n const [group, action] = args.filter((a) => !a.startsWith(\"-\"))\n if (group === \"sales\" && action && AGENTX_SALES_READ.has(action)) return null\n return `agentx ${group ?? \"\"} ${action ?? \"\"} is not read-only`.replace(/\\s+/g, \" \").trim()\n }\n case \"curl\": {\n const m = args.findIndex((a) => /^(-X|--request)$/.test(a))\n if (m >= 0 && !/^(GET|HEAD|OPTIONS)$/i.test(args[m + 1] ?? \"\")) return \"curl with a non-GET method\"\n if (has(/^-X(?!GET$|HEAD$)\\w+|^--request=(?!GET$|HEAD$)/i)) return \"curl with a non-GET method\"\n if (has(/^(-d|--data|--data-\\w+|--json|-F|--form|-T|--upload-file|-o|--output|-O|--remote-name|-K|--config)/)) {\n return \"curl that sends a body or writes a file\"\n }\n return null\n }\n default:\n return null\n }\n}\n\n/** Redirects that write somewhere other than /dev/null or another fd. */\nfunction hasWritingRedirect(view: string): boolean {\n const cleaned = view\n .replace(/\\d*>>?\\s*\\/dev\\/null/g, \" \")\n .replace(/&>>?\\s*\\/dev\\/null/g, \" \")\n .replace(/\\d*>&\\s*\\d+/g, \" \")\n return /[>]/.test(cleaned)\n}\n\nfunction reportBash(command: string): AutonomyDecision {\n const view = shellView(command)\n if (view === null) return block(\"report\", \"shell\", \"command too irregular to verify as read-only\")\n if (hasWritingRedirect(view)) return block(\"report\", \"shell\", \"output redirection writes a file\")\n for (const seg of shellSegments(view)) {\n const words = commandWords(seg)\n if (words.length === 0) continue\n const why = reportShellWord(words)\n if (why) return block(\"report\", \"shell\", why)\n }\n return ALLOW\n}\n\nfunction reportTool(input: AutonomyInput): AutonomyDecision {\n if (WRITE_TOOLS.has(input.tool)) return block(\"report\", \"write\", `${input.tool} modifies files`)\n if (input.tool === \"Bash\") return reportBash(input.command ?? \"\")\n if (REPORT_SAFE_TOOLS.has(input.tool)) return ALLOW\n if (input.tool.startsWith(\"mcp__\")) {\n const words = mcpActionWords(input.tool)\n const mutating = words.find((w) => MUTATING_VERBS.has(w))\n if (mutating) return block(\"report\", \"outward\", `tool \"${input.tool}\" can change state (${mutating})`)\n if (words.some((w) => READ_VERBS.has(w))) return ALLOW\n return block(\"report\", \"outward\", `tool \"${input.tool}\" is not recognisably read-only`)\n }\n return block(\"report\", \"tool\", `tool \"${input.tool}\" is not on the read-only list`)\n}\n\n// ---------------------------------------------------------------- propose\n\ninterface ShellRule { id: string; re: RegExp; reason: string }\n\n/** Content rules, matched against the RAW command: quoting is how these\n * payloads are delivered (`psql -c 'DROP TABLE x'`), not a disclaimer. */\nconst PROPOSE_RAW_RULES: ShellRule[] = [\n { id: \"merge\", re: /merge_when_pipeline_succeeds|\\bauto[_-]merge\\b/i, reason: \"auto-merging is an act-level action\" },\n { id: \"merge\", re: /\\b(curl|wget|http|gh\\s+api|glab\\s+api)\\b[^\\n]*\\/merges?\\b/i, reason: \"calling a merge endpoint is an act-level action\" },\n { id: \"delete\", re: /(?:^|\\W)(drop|truncate)\\s+(table|database|schema|index|collection)\\b|(?:^|\\W)delete\\s+from\\b|\\bflushall\\b|\\bflushdb\\b/i, reason: \"destroying data is an act-level action\" },\n { id: \"delete\", re: /(-X|--request)[\\s=]*['\"]?DELETE\\b/i, reason: \"HTTP DELETE is an act-level action\" },\n { id: \"delegate\", re: /\\b(curl|wget|http)\\b[^\\n]*(localhost|127\\.0\\.0\\.1|\\[::1\\])[^\\n]*\\/(ask|task|send|chat|mesh|workflows?|crons?|reload|config)\\b/i, reason: \"calling the local daemon to dispatch work escapes this routine's limit\" },\n]\n\n/** Command rules, matched against one simple command (quoted text blanked). */\nconst PROPOSE_COMMAND_RULES: ShellRule[] = [\n { id: \"merge\", re: /^(gh\\s+pr\\s+merge|glab\\s+mr\\s+merge)\\b/i, reason: \"merging is an act-level action\" },\n { id: \"delete\", re: /^rm\\s+(.*\\s)?(-\\w*[rR]\\w*|--recursive)\\b|^(shred|dropdb)\\b|^find\\b.*\\s-delete\\b/i, reason: \"deleting is an act-level action\" },\n { id: \"delete\", re: /^git\\s+(clean\\s+-\\w*f|reset\\s+--hard|branch\\s+(-\\w*[dD]\\w*|--delete)|tag\\s+(-d|--delete)|stash\\s+(drop|clear)|remote\\s+(remove|rm))\\b/i, reason: \"deleting is an act-level action\" },\n { id: \"delete\", re: /^(gh|glab)\\s+\\S+\\s+delete\\b|^docker\\s+(rm|rmi|volume\\s+rm|system\\s+prune)\\b|^(kubectl\\s+delete|aws\\s+s3\\s+(rm|rb)|gsutil\\s+rm)\\b|^doctl\\s+.*\\sdelete\\b/i, reason: \"deleting is an act-level action\" },\n { id: \"deploy\", re: /^(kubectl\\s+(apply|rollout|scale|set|patch|replace|create|edit)|helm\\s+(install|upgrade|rollback|uninstall|delete)|terraform\\s+(apply|destroy|import|taint)|pulumi\\s+(up|destroy)|docker\\s+push|netlify\\s+deploy|fly(ctl)?\\s+deploy|serverless\\s+deploy|vercel\\b.*--prod)\\b/i, reason: \"deploying is an act-level action\" },\n { id: \"deploy\", re: /^((npm|pnpm|yarn|bun)(\\s+run)?|make|just|task|rake)\\s+(\\S+:)?deploy\\b|^((ba|z)?sh|node|python3?)\\s+\\S*deploy[^\\s/]*$|^\\S*\\/deploy(\\.\\w+)?\\b|^deploy(\\.\\w+)?\\b/i, reason: \"deploying is an act-level action\" },\n { id: \"deploy\", re: /^((npm|pnpm|yarn|bun)\\s+publish|cargo\\s+publish|twine\\s+upload|(gh|glab)\\s+release\\s+(create|upload|edit)|(npx\\s+)?prisma\\s+(migrate\\s+(deploy|reset)|db\\s+push))\\b/i, reason: \"publishing or migrating is an act-level action\" },\n { id: \"prod\", re: /^(ssh|scp|sudo|doas|systemctl|launchctl|service|kill|pkill|killall|reboot|shutdown)\\b|^rsync\\b.*\\s\\S+:\\S*/i, reason: \"operating hosts and services is an act-level action\" },\n { id: \"delegate\", re: /^(agentx|agentix)\\s+(ask|send|task|exec|run|chat|mesh|cron|workflow|daemon|config)\\b/i, reason: \"handing work to another agent or reconfiguring the daemon escapes this routine's limit\" },\n]\n\nconst PROTECTED_BRANCH = /^(main|master|trunk|develop|development|prod|production|staging|stable|release([/-].*)?|HEAD|@)$/i\n/** `git push` options that consume the next word. */\nconst PUSH_VALUE_OPTS = /^(-o|--push-option|--repo|--receive-pack|--exec)$/\n\n/** A push may only name feature branches explicitly — no force, no delete,\n * no mirror/tags, no protected destinations, no implicit \"current branch\". */\nfunction proposeGitPush(rest: string[]): AutonomyDecision | null {\n const positional: string[] = []\n for (let i = 0; i < rest.length; i++) {\n const a = rest[i]\n if (PUSH_VALUE_OPTS.test(a)) { i++; continue }\n if (/^(--force.*|-d|--delete|--mirror|--all|--tags|--prune)$/.test(a) || /^-[a-zA-Z]*f/.test(a)) {\n return block(\"propose\", \"push\", \"force, delete, mirror and tag pushes are act-level actions\")\n }\n if (!a.startsWith(\"-\")) positional.push(a)\n }\n const refspecs = positional.slice(1)\n if (refspecs.length === 0) return block(\"propose\", \"push\", \"name the feature branch explicitly: git push <remote> <branch>\")\n for (const ref of refspecs) {\n if (ref.startsWith(\"+\") || ref.startsWith(\":\")) return block(\"propose\", \"push\", `refspec \"${ref}\" force-pushes or deletes`)\n const name = (ref.includes(\":\") ? ref.slice(ref.indexOf(\":\") + 1) : ref).replace(/^refs\\/heads\\//, \"\")\n if (PROTECTED_BRANCH.test(name)) return block(\"propose\", \"push\", `pushing to \"${name}\" is an act-level action; push a feature branch and open a merge request`)\n }\n return null\n}\n\nfunction proposeBash(command: string): AutonomyDecision {\n for (const rule of PROPOSE_RAW_RULES) {\n if (rule.re.test(command)) return block(\"propose\", rule.id, rule.reason)\n }\n const view = shellView(command)\n if (view === null) return block(\"propose\", \"shell\", \"command too irregular to verify\")\n for (const seg of shellSegments(view)) {\n const words = commandWords(seg)\n if (words.length === 0) continue\n const line = [baseName(words[0]), ...words.slice(1)].join(\" \")\n for (const rule of PROPOSE_COMMAND_RULES) {\n if (rule.re.test(line)) return block(\"propose\", rule.id, rule.reason)\n }\n if (baseName(words[0]) === \"git\") {\n const { sub, rest } = gitSubcommand(words.slice(1))\n if (sub === \"push\") {\n const hit = proposeGitPush(rest)\n if (hit) return hit\n }\n }\n }\n return ALLOW\n}\n\nfunction proposeTool(input: AutonomyInput): AutonomyDecision {\n if (input.tool === \"Bash\") return proposeBash(input.command ?? \"\")\n if (input.tool.startsWith(\"mcp__\")) {\n const hit = mcpActionWords(input.tool).find((w) => DESTRUCTIVE_VERBS.has(w))\n if (hit) return block(\"propose\", \"outward\", `tool \"${input.tool}\" performs an act-level action (${hit})`)\n if (isDelegation(mcpActionWords(input.tool))) {\n return block(\"propose\", \"delegate\", `tool \"${input.tool}\" hands work to another agent, which would run at its own full autonomy`)\n }\n }\n return ALLOW\n}\n\n/** Handing the task to another agent escapes the limit: that agent's run\n * is not restricted. */\nfunction isDelegation(words: string[]): boolean {\n if (words.includes(\"delegate\") || words.includes(\"handoff\")) return true\n if (words.includes(\"agent\") && words.some((w) => w === \"send\" || w === \"ask\" || w === \"message\" || w === \"task\")) return true\n return words.includes(\"task\") && !words.some((w) => READ_VERBS.has(w))\n}\n\n// ---------------------------------------------------------------- entry\n\n/** Judge one tool call against an autonomy level. `act` allows everything. */\nexport function evaluateAutonomy(level: AutonomyLevel, input: AutonomyInput): AutonomyDecision {\n if (level === \"report\") return reportTool(input)\n if (level === \"propose\") return proposeTool(input)\n return ALLOW\n}\n\n/** One-paragraph brief prepended to a restricted task, so the model knows\n * the boundary up front instead of discovering it by being blocked. The\n * enforcement does not depend on it. */\nexport function autonomyBrief(level: AutonomyLevel): string {\n if (level === \"report\") {\n return \"[Autonomy: report] This routine runs read-only. Investigate and report; do not modify files, run mutating commands, or post anywhere. Your final answer is the deliverable. Blocked actions are enforced and logged; if something needs doing, describe it in the report instead.\"\n }\n if (level === \"propose\") {\n return \"[Autonomy: propose] You may edit files, commit, push a named feature branch, and open a merge request or draft. You may not merge, deploy, delete, force-push, push to protected branches, or operate hosts. These limits are enforced and logged; leave act-level steps as clear recommendations.\"\n }\n return \"\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D,EACrP,CAAE,GAAI,OAAQ,GAAI,6GAA8G,OAAQ,qDAAsD,EAC9L,CAAE,GAAI,WAAY,GAAI,wFAAyF,OAAQ,wFAAyF,CAClN,EAEMN,EAAmB,oGAEnBH,EAAkB","names":["z","isRestricted","level","toolWords","name","w","mcpActionWords","shellView","command","text","m","quote","_d","body","out","i","c","end","j","inner","shellSegments","view","s","commandWords","words","SHELL_KEYWORDS_SKIP","SHELL_KEYWORDS_STRIP","gitSubcommand","args","reportShellWord","cmd","base","REPORT_SHELL_COMMANDS","has","re","a","sub","rest","GIT_READ","group","action","method","GH_READ_ACTIONS","AGENTX_SALES_READ","hasWritingRedirect","cleaned","reportBash","block","seg","why","ALLOW","reportTool","input","WRITE_TOOLS","REPORT_SAFE_TOOLS","mutating","MUTATING_VERBS","READ_VERBS","proposeGitPush","positional","PUSH_VALUE_OPTS","refspecs","ref","PROTECTED_BRANCH","proposeBash","rule","PROPOSE_RAW_RULES","line","baseName","PROPOSE_COMMAND_RULES","hit","proposeTool","DESTRUCTIVE_VERBS","isDelegation","evaluateAutonomy","autonomyBrief","autonomyLevelSchema","init_autonomy","__esmMin","id","reason"]}
|