@easbot/agent 0.2.24 → 0.2.26

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.
Files changed (102) hide show
  1. package/dist/chunks/{acp-D5I5IUMI.mjs → acp-MXBWTEWQ.mjs} +2 -2
  2. package/dist/chunks/adapter-loader-3EN56P7R.mjs +1 -0
  3. package/dist/chunks/{agent-TM2AYB67.mjs → agent-OH7OBL37.mjs} +1 -1
  4. package/dist/chunks/{agent-R3VIV25Y.mjs → agent-OTRULLOV.mjs} +1 -1
  5. package/dist/chunks/app-4O5CFCEA.mjs +1 -0
  6. package/dist/chunks/{auth-2I7U24YF.mjs → auth-DHIUZUBT.mjs} +1 -1
  7. package/dist/chunks/bootstrap-2VLPO562.mjs +1 -0
  8. package/dist/chunks/{build-program-KUCF2N7D.mjs → build-program-6IX5ZB7E.mjs} +1 -1
  9. package/dist/chunks/bus-4LDPSAHL.mjs +1 -0
  10. package/dist/chunks/{chunk-LGMOIUYA.mjs → chunk-3SWLJTIF.mjs} +1 -1
  11. package/dist/chunks/chunk-5Z4ZZTNB.mjs +2 -0
  12. package/dist/chunks/{chunk-AD7K5VE2.mjs → chunk-77AU67VS.mjs} +1 -1
  13. package/dist/chunks/{chunk-MHY26EXB.mjs → chunk-JL7MUUWI.mjs} +8 -8
  14. package/dist/chunks/{chunk-TSX5PZSW.mjs → chunk-KCJQKAMU.mjs} +1 -1
  15. package/dist/chunks/chunk-KFKXAXPS.mjs +2 -0
  16. package/dist/chunks/{chunk-EEWP2VV6.mjs → chunk-NQDXG75V.mjs} +4 -4
  17. package/dist/chunks/{chunk-MMU3Z6V2.mjs → chunk-OWD2RLZG.mjs} +1 -1
  18. package/dist/chunks/{chunk-3AJJMHKA.mjs → chunk-PPTUNIYA.mjs} +1 -1
  19. package/dist/chunks/{chunk-PKBPWDSV.mjs → chunk-RWJKYXLR.mjs} +242 -224
  20. package/dist/chunks/chunk-UHGU3KUN.mjs +2 -0
  21. package/dist/chunks/{chunk-5QKMSVQL.mjs → chunk-Y63CDMY3.mjs} +1 -1
  22. package/dist/chunks/{command-5JVJ7SVL.mjs → command-SJGOCWCR.mjs} +1 -1
  23. package/dist/chunks/compaction-XRW2CSDJ.mjs +1 -0
  24. package/dist/chunks/config-UX7KSX2Y.mjs +1 -0
  25. package/dist/chunks/{confirm-dialog-AGHMTHWU.mjs → confirm-dialog-XBLCGOEC.mjs} +1 -1
  26. package/dist/chunks/{debug-MW53KD7T.mjs → debug-KPPALGWN.mjs} +3 -3
  27. package/dist/chunks/{export-BGH24SO2.mjs → export-I4GL3OUG.mjs} +1 -1
  28. package/dist/chunks/file-QLEZZKRK.mjs +1 -0
  29. package/dist/chunks/gateway-XPOSOE2L.mjs +16 -0
  30. package/dist/chunks/{generate-NXGIMILE.mjs → generate-SXE5ACCV.mjs} +1 -1
  31. package/dist/chunks/github-6I6QNGSD.mjs +33 -0
  32. package/dist/chunks/global-E7NJBJBC.mjs +1 -0
  33. package/dist/chunks/{import-JYLIHQCA.mjs → import-V5U5WAWX.mjs} +1 -1
  34. package/dist/chunks/installation-HXWUC3GX.mjs +1 -0
  35. package/dist/chunks/instance-SYMW2VFW.mjs +1 -0
  36. package/dist/chunks/loader-OIXMXUWE.mjs +1 -0
  37. package/dist/chunks/loader-ULZVW25Y.mjs +1 -0
  38. package/dist/chunks/lsp-TF3HQGNE.mjs +1 -0
  39. package/dist/chunks/{mcp-AHMVQDPC.mjs → mcp-6G3LUTNY.mjs} +1 -1
  40. package/dist/chunks/mcp-7RT2JOII.mjs +1 -0
  41. package/dist/chunks/models-OCEOQAFH.mjs +1 -0
  42. package/dist/chunks/{pr-4WGOFODT.mjs → pr-6A5VSN2G.mjs} +1 -1
  43. package/dist/chunks/preferences-F7U2O3MO.mjs +1 -0
  44. package/dist/chunks/project-45YWGAQQ.mjs +1 -0
  45. package/dist/chunks/prompt-4DIHVG7F.mjs +1 -0
  46. package/dist/chunks/provider-ZPPQNKD4.mjs +1 -0
  47. package/dist/chunks/registry-RFQPWEYD.mjs +1 -0
  48. package/dist/chunks/revert-OM7I67AX.mjs +1 -0
  49. package/dist/chunks/ripgrep-IAHE6PUP.mjs +1 -0
  50. package/dist/chunks/{run-HRRJXIVI.mjs → run-HRFFN5E7.mjs} +2 -2
  51. package/dist/chunks/scheduler-44WS6TIN.mjs +1 -0
  52. package/dist/chunks/server-W2DYO5CI.mjs +1 -0
  53. package/dist/chunks/{session-HO5727MY.mjs → session-2I5LMK3F.mjs} +1 -1
  54. package/dist/chunks/session-BVNXNVIE.mjs +1 -0
  55. package/dist/chunks/session-XS2QUVSO.mjs +1 -0
  56. package/dist/chunks/{settings-panel-BWCVKC4G.mjs → settings-panel-4GBMKF7S.mjs} +1 -1
  57. package/dist/chunks/share-WRGG4KM3.mjs +1 -0
  58. package/dist/chunks/snapshot-WLCB7V7M.mjs +1 -0
  59. package/dist/chunks/{stats-MILDLIZD.mjs → stats-KXJDFVQY.mjs} +1 -1
  60. package/dist/chunks/storage-DLKF23OL.mjs +1 -0
  61. package/dist/chunks/{tui-UTCI4ERG.mjs → tui-2YD6S76J.mjs} +1 -1
  62. package/dist/chunks/tui-XJTR3NKP.mjs +1 -0
  63. package/dist/chunks/types-6TN4BPE3.mjs +1 -0
  64. package/dist/chunks/update-KPY5MGY5.mjs +2 -0
  65. package/dist/cli.mjs +5 -5
  66. package/package.json +13 -13
  67. package/dist/chunks/adapter-loader-OQIF5F24.mjs +0 -1
  68. package/dist/chunks/app-BQOCNLYW.mjs +0 -1
  69. package/dist/chunks/bootstrap-FETK53UT.mjs +0 -1
  70. package/dist/chunks/bus-CWP3DYEO.mjs +0 -1
  71. package/dist/chunks/chunk-E6P3STWN.mjs +0 -2
  72. package/dist/chunks/chunk-NCHKGEE3.mjs +0 -2
  73. package/dist/chunks/chunk-SLZ3HAH6.mjs +0 -2
  74. package/dist/chunks/compaction-BD7Q4GQO.mjs +0 -1
  75. package/dist/chunks/config-OZOLTE2Y.mjs +0 -1
  76. package/dist/chunks/file-N5R4HKSU.mjs +0 -1
  77. package/dist/chunks/gateway-3QKRAMO2.mjs +0 -16
  78. package/dist/chunks/github-L3XIDEEQ.mjs +0 -33
  79. package/dist/chunks/global-QYCQXNCR.mjs +0 -1
  80. package/dist/chunks/installation-HRFNXAKB.mjs +0 -1
  81. package/dist/chunks/instance-6RDAH4IX.mjs +0 -1
  82. package/dist/chunks/loader-7UB7WQFK.mjs +0 -1
  83. package/dist/chunks/loader-DRTQXYLN.mjs +0 -1
  84. package/dist/chunks/lsp-U7VGUPLT.mjs +0 -1
  85. package/dist/chunks/models-G2QBJX43.mjs +0 -1
  86. package/dist/chunks/preferences-354RYR2J.mjs +0 -1
  87. package/dist/chunks/project-NIXIQTRB.mjs +0 -1
  88. package/dist/chunks/prompt-F3Z2QBDR.mjs +0 -1
  89. package/dist/chunks/provider-LO2XXG33.mjs +0 -1
  90. package/dist/chunks/registry-MDPD3RHV.mjs +0 -1
  91. package/dist/chunks/revert-GE5BMDGN.mjs +0 -1
  92. package/dist/chunks/ripgrep-G73RIQ5F.mjs +0 -1
  93. package/dist/chunks/scheduler-2CD7LGEJ.mjs +0 -1
  94. package/dist/chunks/server-CHTYZF5W.mjs +0 -1
  95. package/dist/chunks/session-2W7DKSRJ.mjs +0 -1
  96. package/dist/chunks/session-V4RGFQKO.mjs +0 -1
  97. package/dist/chunks/share-OCIAAEUC.mjs +0 -1
  98. package/dist/chunks/snapshot-V556Q4I5.mjs +0 -1
  99. package/dist/chunks/storage-P6DUW44Y.mjs +0 -1
  100. package/dist/chunks/tui-2FSZJGP2.mjs +0 -1
  101. package/dist/chunks/types-KIFC2C2M.mjs +0 -1
  102. package/dist/chunks/update-IEZVD4U7.mjs +0 -2
@@ -0,0 +1 @@
1
+ export{a as CustomEditor,h as createTuiApp,d as editorTheme,c as selectListTheme,b as theme}from'./chunk-JL7MUUWI.mjs';import'./chunk-CQVEAYYW.mjs';import'./chunk-RWJKYXLR.mjs';import'./chunk-UHGU3KUN.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-PPTUNIYA.mjs';import'./chunk-KCJQKAMU.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-NQDXG75V.mjs';import'./chunk-5Z4ZZTNB.mjs';import'./chunk-KFKXAXPS.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-3SWLJTIF.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-77AU67VS.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -0,0 +1 @@
1
+ export{R as Acp,db as Agent,_ as Codebase,bb as Command,K as Compaction,ia as Context,jb as Info,eb as Keybinds,hb as Layout,Ya as Mcp,Va as McpLocal,Wa as McpOAuth,Xa as McpRemote,$ as Memory,Ua as ModelId,aa as Note,ab as Permission,Za as PermissionAction,_a as PermissionObject,$a as PermissionRule,ib as Provider,gb as Server,cb as Skills,Qa as SubAgent,Ra as SubAgentConfigSchema,Pa as SubAgentModel,Na as SubAgentRunMode,Oa as SubAgentTransportType,fb as TUI}from'./chunk-RWJKYXLR.mjs';import'./chunk-UHGU3KUN.mjs';export{a as Gateway}from'./chunk-ZBRXNYEM.mjs';import'./chunk-PPTUNIYA.mjs';import'./chunk-KCJQKAMU.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-NQDXG75V.mjs';import'./chunk-5Z4ZZTNB.mjs';import'./chunk-KFKXAXPS.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-3SWLJTIF.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-77AU67VS.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -0,0 +1,2 @@
1
+ import {a as a$2}from'./chunk-Y63CDMY3.mjs';import {h,g,e,d}from'./chunk-M3K32WJV.mjs';import'./chunk-RWJKYXLR.mjs';import'./chunk-UHGU3KUN.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-PPTUNIYA.mjs';import'./chunk-KCJQKAMU.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import {a as a$1}from'./chunk-NQDXG75V.mjs';import'./chunk-5Z4ZZTNB.mjs';import'./chunk-KFKXAXPS.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-3SWLJTIF.mjs';import {a}from'./chunk-LFYBZHOI.mjs';import'./chunk-77AU67VS.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';import {Semver,Shell,Fetch,PKG}from'@easbot/utils';var m=a.create({service:"cli-command-update"});function H(t,i){t.command("update [target]").description(a$1("update.command.description")).option("--method <method>",a$1("update.option.method")).action(async(e$1,n)=>{m.debug("Update command started",{target:e$1,method:n.method});try{console.log(h(a$1("update.starting")));let{Global:s}=await import('./global-E7NJBJBC.mjs'),a=s.getVersion()||"unknown";console.log(g(a$1("update.current_version",{vars:{version:a}})));let o=e$1||"latest";o==="latest"&&(o=await f(),o==="latest"&&(console.error(e(a$1("update.latest_fetch_failed"))),process.exit(1))),console.log(g(a$1("update.target_version",{vars:{version:o}})));let p=o.replace(/^v/,"");Semver.isValid(p)||(console.error(e(a$1("update.invalid_version",{vars:{version:o}}))),process.exit(1));let v=Semver.compare(a,p);v===0&&(console.log(d(a$1("update.already_latest",{vars:{version:a}}))),process.exit(0)),v>0&&console.warn(g(a$1("update.downgrade_warning",{vars:{from:a,to:p}}))),console.log(g(a$1("update.downloading")));let l=await a$2(i.config.directory,()=>x(o,n.method));l.success?(console.log(d(a$1("update.success",{vars:{version:l.version||o}}))),process.exit(0)):(console.error(e(a$1("update.failed",{vars:{error:l.error||"Unknown error"}}))),process.exit(1));}catch(s){m.error("Update failed",{error:s instanceof Error?s.message:String(s)}),console.error(e(a$1("update.error",{vars:{error:s instanceof Error?s.message:String(s)}}))),process.exit(1);}});}async function x(t,i){try{let e=t;t==="latest"?e=await f():(e=t.replace(/^v/,""),Semver.isValid(e)||(e=await f(),m.debug("Invalid version provided, using latest",{target:t,version:e})));let n=i||await E();m.debug("Updating to version",{version:e,method:n});let s=process.platform==="win32"?"cmd":void 0,a=V(n,e);m.info(`Using ${n} to update`,{version:e,shell:s,command:a});let o=await Shell.run(s,a,{windowsHide:!0,timeout:600*1e3,env:{npm_config_loglevel:"error",PNPM_LOGLEVEL:"error",BUN_LOG_LEVEL:"error"}});return o.code===0?{success:!0,version:e}:{success:!1,error:o.stderr||o.stdout||`Exit code: ${o.code}`||"Update failed"}}catch(e){return {success:false,error:e instanceof Error?e.message:String(e)}}}function V(t,i){let n=`@easbot/agent@${i}`;switch(t){case "pnpm":return `pnpm add -g ${n} --loglevel error`;case "bun":return `bun add -g ${n}`;default:return `npm install -g ${n} --loglevel error`}}async function f(){try{return (await Fetch.get("https://registry.npmjs.org/@easbot/agent/latest")).data?.version||"latest"}catch{return "latest"}}async function E(){let t=await PKG.packageManager();return t?t.name:"npm"}
2
+ export{H as registerUpdateCommand};
package/dist/cli.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import {e,h}from'./chunks/chunk-M3K32WJV.mjs';import {a as a$1}from'./chunks/chunk-EEWP2VV6.mjs';import {a}from'./chunks/chunk-LFYBZHOI.mjs';import'./chunks/chunk-X6ISXWBN.mjs';import {loadEnv}from'@easbot/utils';process.noDeprecation=true;async function w(){loadEnv();let{Global:r}=await import('./chunks/global-QYCQXNCR.mjs'),{bootstrapProgram:t}=await import('./chunks/bootstrap-FETK53UT.mjs'),{Installation:o}=await import('./chunks/installation-HRFNXAKB.mjs'),{isTuiMode:d}=await import('./chunks/is-tui-mode-TFK352KK.mjs');await r.init();let f=process.argv.includes("acp")||process.argv.includes("serve"),a$2;try{a$2=(await import('./chunks/app-BQOCNLYW.mjs')).getGlobalErrorHandler;}catch{}process.on("unhandledRejection",e=>{let c=d(),n=a$2?.(),l=e instanceof Error?e.message:String(e),i=e instanceof Error?e.stack:"";if(c){if(n){n(e,"unhandledRejection");return}try{process.stderr.write(`[TUI unhandledRejection] ${l}
2
+ import {e,h}from'./chunks/chunk-M3K32WJV.mjs';import {a as a$1}from'./chunks/chunk-NQDXG75V.mjs';import {a}from'./chunks/chunk-LFYBZHOI.mjs';import'./chunks/chunk-X6ISXWBN.mjs';import {loadEnv}from'@easbot/utils';process.noDeprecation=true;async function w(){loadEnv();let{Global:r}=await import('./chunks/global-E7NJBJBC.mjs'),{bootstrapProgram:t}=await import('./chunks/bootstrap-2VLPO562.mjs'),{Installation:o}=await import('./chunks/installation-HXWUC3GX.mjs'),{isTuiMode:d}=await import('./chunks/is-tui-mode-TFK352KK.mjs');await r.init();let f=process.argv.includes("acp")||process.argv.includes("serve")||process.argv.includes("gateway"),p;try{p=(await import('./chunks/app-4O5CFCEA.mjs')).getGlobalErrorHandler;}catch{}process.on("unhandledRejection",e=>{let c=d(),n=p?.(),a=e instanceof Error?e.message:String(e),i=e instanceof Error?e.stack:"";if(c){if(n){n(e,"unhandledRejection");return}try{process.stderr.write(`[TUI unhandledRejection] ${a}
3
3
  `),i&&process.stderr.write(`${i}
4
- `);}catch{}return}try{process.stderr.write(`[unhandledRejection] ${l}
4
+ `);}catch{}return}try{process.stderr.write(`[unhandledRejection] ${a}
5
5
  `),i&&process.stderr.write(`${i}
6
- `);}catch{}f||process.exit(1);}),process.on("uncaughtException",e=>{let c=d(),n=a$2?.(),l=e instanceof Error?e.message:String(e),i=e instanceof Error?e.stack:"";if(c){if(n){n(e,"uncaughtException");return}try{process.stderr.write(`[TUI uncaughtException] ${l}
6
+ `);}catch{}f||process.exit(1);}),process.on("uncaughtException",e=>{let c=d(),n=p?.(),a=e instanceof Error?e.message:String(e),i=e instanceof Error?e.stack:"";if(c){if(n){n(e,"uncaughtException");return}try{process.stderr.write(`[TUI uncaughtException] ${a}
7
7
  `),i&&process.stderr.write(`${i}
8
- `);}catch{}return}try{process.stderr.write(`[uncaughtException] ${l}
8
+ `);}catch{}return}try{process.stderr.write(`[uncaughtException] ${a}
9
9
  `),i&&process.stderr.write(`${i}
10
- `);}catch{}f||process.exit(1);});let h$1=a.create({service:"cli"});try{let e=E(),c=()=>e.log_level?e.log_level:o.isLocal()?"DEBUG":"INFO";await a.init({logDir:r.Path.log,print:e.print_logs??!1,dev:e.debug??!1,level:c()});let{initModelsRefresh:n}=await import('./chunks/models-G2QBJX43.mjs');n(),await(await t(e)).parseAsync(process.argv);}catch(e$1){h$1.error("CLI failed to execute",{error:e$1});let c=e$1 instanceof Error?e$1.message:String(e$1),n=e$1 instanceof Error?e$1.stack:"";console.error(e(a$1("cli.error.execution_failed"))),c&&console.error(h(a$1("cli.error.detail"))),n&&console.error(n),process.exit(1);}}function E(){let s={directory:process.cwd(),print_logs:false,log_level:"INFO",debug:false};for(let r=0;r<process.argv.length;r++){let t=process.argv[r];if(t)if(t==="--cwd"&&r+1<process.argv.length){let o=process.argv[r+1];o&&!o.startsWith("-")&&(s.directory=o,r++);}else if(t.startsWith("--cwd="))s.directory=t.slice(6);else if(t==="--config"&&r+1<process.argv.length){let o=process.argv[r+1];o&&!o.startsWith("-")&&(s.config_path=o,r++);}else if(t.startsWith("--config="))s.config_path=t.slice(9);else if(t==="--print-logs")s.print_logs=true;else if(t==="--log-level"&&r+1<process.argv.length){let o=process.argv[r+1];o&&!o.startsWith("-")&&(s.log_level=o.toUpperCase(),r++);}else t.startsWith("--log-level=")?s.log_level=t.slice(12).toUpperCase():t==="--debug"&&(s.debug=true);}return s}w();
10
+ `);}catch{}f||process.exit(1);});let h$1=a.create({service:"cli"});try{let e=E(),c=()=>e.log_level?e.log_level:o.isLocal()?"DEBUG":"INFO";await a.init({logDir:r.Path.log,print:e.print_logs??!1,dev:e.debug??!1,level:c()});let{initModelsRefresh:n}=await import('./chunks/models-OCEOQAFH.mjs');n(),await(await t(e)).parseAsync(process.argv);}catch(e$1){h$1.error("CLI failed to execute",{error:e$1});let c=e$1 instanceof Error?e$1.message:String(e$1),n=e$1 instanceof Error?e$1.stack:"";console.error(e(a$1("cli.error.execution_failed"))),c&&console.error(h(a$1("cli.error.detail"))),n&&console.error(n),process.exit(1);}finally{await a.close();}}function E(){let s={directory:process.cwd(),print_logs:false,log_level:"INFO",debug:false};for(let r=0;r<process.argv.length;r++){let t=process.argv[r];if(t)if(t==="--cwd"&&r+1<process.argv.length){let o=process.argv[r+1];o&&!o.startsWith("-")&&(s.directory=o,r++);}else if(t.startsWith("--cwd="))s.directory=t.slice(6);else if(t==="--config"&&r+1<process.argv.length){let o=process.argv[r+1];o&&!o.startsWith("-")&&(s.config_path=o,r++);}else if(t.startsWith("--config="))s.config_path=t.slice(9);else if(t==="--print-logs")s.print_logs=true;else if(t==="--log-level"&&r+1<process.argv.length){let o=process.argv[r+1];o&&!o.startsWith("-")&&(s.log_level=o.toUpperCase(),r++);}else t.startsWith("--log-level=")?s.log_level=t.slice(12).toUpperCase():t==="--debug"&&(s.debug=true);}return s}w();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easbot/agent",
3
- "version": "0.2.24",
3
+ "version": "0.2.26",
4
4
  "description": "Core Agent for the easbot monorepo ecosystem",
5
5
  "type": "module",
6
6
  "bin": {
@@ -112,18 +112,18 @@
112
112
  "xdg-basedir": "5.1.0",
113
113
  "zod": "^4.4.3",
114
114
  "zod-to-json-schema": "^3.25.2",
115
- "@easbot/codebase": "0.2.24",
116
- "@easbot/gateway": "0.2.24",
117
- "@easbot/local-model-sdk": "0.2.24",
118
- "@easbot/memory": "0.2.24",
119
- "@easbot/mcp": "0.2.24",
120
- "@easbot/note": "0.2.24",
121
- "@easbot/ollama-sdk": "0.2.24",
122
- "@easbot/plugin": "0.2.24",
123
- "@easbot/sdk": "0.2.24",
124
- "@easbot/tui": "0.2.24",
125
- "@easbot/types": "0.2.24",
126
- "@easbot/utils": "0.2.24"
115
+ "@easbot/codebase": "0.2.26",
116
+ "@easbot/gateway": "0.2.26",
117
+ "@easbot/memory": "0.2.26",
118
+ "@easbot/local-model-sdk": "0.2.26",
119
+ "@easbot/mcp": "0.2.26",
120
+ "@easbot/plugin": "0.2.26",
121
+ "@easbot/note": "0.2.26",
122
+ "@easbot/ollama-sdk": "0.2.26",
123
+ "@easbot/types": "0.2.26",
124
+ "@easbot/sdk": "0.2.26",
125
+ "@easbot/tui": "0.2.26",
126
+ "@easbot/utils": "0.2.26"
127
127
  },
128
128
  "devDependencies": {
129
129
  "@actions/core": "^3.0.1",
@@ -1 +0,0 @@
1
- export{T as getACPClientsConfig,S as getACPServerConfig,W as getAcpAgentName,U as getAcpAgentRuntimeConfig,V as getAcpModelConfig,R as loadACPConfig}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{h as createTuiApp,g as getGlobalErrorHandler,e as registerGlobalErrorHandler,f as unregisterGlobalErrorHandler}from'./chunk-MHY26EXB.mjs';import'./chunk-CQVEAYYW.mjs';import'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{a as bootstrap,b as bootstrapProgram}from'./chunk-5QKMSVQL.mjs';import'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{a as Bus}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1,2 +0,0 @@
1
- import {a}from'./chunk-LFYBZHOI.mjs';import {a as a$1}from'./chunk-AD7K5VE2.mjs';import E from'path';import j from'fs/promises';import t from'zod';import {NamedError,lazy,PKG,Filesystem,Shell}from'@easbot/utils';import {ZipReader,BlobReader,BlobWriter}from'@zip.js/zip.js';var F;(c=>{let $=a.create({service:"ripgrep"}),A=t.object({elapsed:t.object({secs:t.number(),nanos:t.number(),human:t.string()}),searches:t.number(),searches_with_match:t.number(),bytes_searched:t.number(),bytes_printed:t.number(),matched_lines:t.number(),matches:t.number()}),S=t.object({type:t.literal("begin"),data:t.object({path:t.object({text:t.string()})})});c.Match=t.object({type:t.literal("match"),data:t.object({path:t.object({text:t.string()}),lines:t.object({text:t.string()}),line_number:t.number(),absolute_offset:t.number(),submatches:t.array(t.object({match:t.object({text:t.string()}),start:t.number(),end:t.number()}))})});let M=t.object({type:t.literal("end"),data:t.object({path:t.object({text:t.string()}),binary_offset:t.number().nullable(),stats:A})}),D=t.object({type:t.literal("summary"),data:t.object({elapsed_total:t.object({human:t.string(),nanos:t.number(),secs:t.number()}),stats:A})}),O=t.union([S,c.Match,M,D]),W={"arm64-darwin":{platform:"aarch64-apple-darwin",extension:"tar.gz"},"arm64-linux":{platform:"aarch64-unknown-linux-gnu",extension:"tar.gz"},"x64-darwin":{platform:"x86_64-apple-darwin",extension:"tar.gz"},"x64-linux":{platform:"x86_64-unknown-linux-musl",extension:"tar.gz"},"x64-win32":{platform:"x86_64-pc-windows-msvc",extension:"zip"}};c.ExtractionFailedError=NamedError.create("RipgrepExtractionFailedError",t.object({filepath:t.string(),stderr:t.string()})),c.UnsupportedPlatformError=NamedError.create("RipgrepUnsupportedPlatformError",t.object({platform:t.string()})),c.DownloadFailedError=NamedError.create("RipgrepDownloadFailedError",t.object({url:t.string(),status:t.number()}));let T=lazy(async()=>{let e=await PKG.which("rg");if(e){if((await j.stat(e).catch(()=>{}))?.isFile())return {filepath:Filesystem.resolve(e)};$.warn("bun.which returned invalid rg path",{filepath:e});}let l=Filesystem.resolve(E.join(a$1.Path.bin,"rg"+(process.platform==="win32"?".exe":"")));if(!await PKG.file(l).exists()){let i=`${process.arch}-${process.platform}`,f=W[i];if(!f)throw new c.UnsupportedPlatformError({platform:i});let r="14.1.1",b=`ripgrep-${r}-${f.platform}.${f.extension}`,u=`https://github.com/BurntSushi/ripgrep/releases/download/${r}/${b}`,m=await fetch(u);if(!m.ok)throw new c.DownloadFailedError({url:u,status:m.status});let p=await m.arrayBuffer(),n=E.join(a$1.Path.bin,b);if(await PKG.write(n,new Uint8Array(p)),f.extension==="tar.gz"){let o=["tar","-xzf",n,"--strip-components=1"];i.endsWith("-darwin")&&o.push("--include=*/rg"),i.endsWith("-linux")&&o.push("--wildcards","*/rg");let a=await Shell.run(void 0,o.join(" "),{cwd:a$1.Path.bin});if(a.code!==0)throw new c.ExtractionFailedError({filepath:l,stderr:a.stderr})}if(f.extension==="zip"){let a=await PKG.file(n).arrayBuffer(),d=new ZipReader(new BlobReader(new Blob([a]))),g=await d.getEntries(),w;for(let v of g)if(v.filename.endsWith("rg.exe")){w=v;break}if(!w)throw new c.ExtractionFailedError({filepath:n,stderr:"rg.exe not found in zip archive"});let x=await w.getData(new BlobWriter);if(!x)throw new c.ExtractionFailedError({filepath:n,stderr:"Failed to extract rg.exe from zip archive"});let C=await x.arrayBuffer();await PKG.write(l,new Uint8Array(C)),await d.close();}await j.unlink(n),i.endsWith("-win32")||await j.chmod(l,493);}return {filepath:l}});async function N(){let{filepath:e}=await T();return e}c.filepath=N;async function*Z(e){e.signal?.throwIfAborted();let l=await N(),s=["--files","--glob=!.git/*"];if(e.follow&&s.push("--follow"),e.hidden!==false&&s.push("--hidden"),e.maxDepth!==void 0&&s.push(`--max-depth=${e.maxDepth}`),e.glob)for(let r of e.glob)s.push(`--glob=${r}`);if(!(await j.stat(e.cwd).catch(()=>{}))?.isDirectory())throw Object.assign(new Error(`No such file or directory: '${e.cwd}'`),{code:"ENOENT",errno:-2,path:e.cwd});let f=(await PKG.run([l,...s],{cwd:e.cwd})).stdout.trim().split(/\r?\n/).filter(Boolean);for(let r of f)e.signal?.throwIfAborted(),r&&(yield r);}c.files=Z;async function H(e){$.info("tree",e);let l=await Array.fromAsync(c.files({cwd:e.cwd,signal:e.signal}));function s(n,o){let a=n.children.get(o);if(a)return a;let d={name:o,children:new Map};return n.children.set(o,d),d}let i={children:new Map};for(let n of l){if(n.includes(".easbot"))continue;let o=n.split(E.sep);if(o.length<2)continue;let a=i;for(let d of o.slice(0,-1))a=s(a,d);}function f(n){let o=0;for(let a of n.children.values())o+=1+f(a);return o}let r=f(i),b=e.limit??r,u=[],m=[];for(let n of Array.from(i.children.values()).sort((o,a)=>o.name.localeCompare(a.name)))m.push({node:n,path:n.name});let p=0;for(let n=0;n<m.length&&p<b;n++){let o=m[n];if(!o)continue;let{node:a,path:d}=o;u.push(d),p++;for(let g of Array.from(a.children.values()).sort((w,x)=>w.name.localeCompare(x.name)))m.push({node:g,path:`${d}/${g.name}`});}return r>p&&u.push(`[${r-p} truncated]`),u.join(`
2
- `)}c.tree=H;async function Q(e){let l=await N(),s=["--json","--hidden","--glob=!.git/*"];if(e.follow&&s.push("--follow"),e.glob)for(let r of e.glob)s.push(`--glob=${r}`);e.limit&&s.push(`--max-count=${e.limit}`),s.push("--"),s.push(e.pattern);let i=await PKG.run([l,...s],{cwd:e.cwd});return i.code!==0?[]:i.stdout.trim().split(/\r?\n/).filter(Boolean).map(r=>JSON.parse(r)).map(r=>O.parse(r)).filter(r=>r.type==="match").map(r=>r.data)}c.search=Q;})(F||(F={}));export{F as a};
@@ -1,2 +0,0 @@
1
- import {a as a$3,b}from'./chunk-SLZ3HAH6.mjs';import {a as a$1}from'./chunk-LFYBZHOI.mjs';import {a as a$2}from'./chunk-AD7K5VE2.mjs';import _ from'path';import d from'fs/promises';import t from'zod';import {lazy}from'@easbot/utils';var a;(o=>{let f=a$1.create({service:"models.dev"}),s=_.join(a$2.Path.cache,"models.json");o.Model=t.object({id:t.string(),name:t.string(),family:t.string().optional(),release_date:t.string(),attachment:t.boolean(),reasoning:t.boolean(),temperature:t.boolean(),tool_call:t.boolean(),interleaved:t.union([t.literal(true),t.object({field:t.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:t.object({input:t.number(),output:t.number(),cache_read:t.number().optional(),cache_write:t.number().optional(),context_over_200k:t.object({input:t.number(),output:t.number(),cache_read:t.number().optional(),cache_write:t.number().optional()}).optional()}).optional(),limit:t.object({context:t.number(),input:t.number().optional(),output:t.number()}),modalities:t.object({input:t.array(t.enum(["text","audio","image","video","pdf"])),output:t.array(t.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:t.boolean().optional(),status:t.enum(["alpha","beta","deprecated"]).optional(),options:t.record(t.string(),t.any()),headers:t.record(t.string(),t.string()).optional(),provider:t.object({npm:t.string()}).optional(),variants:t.record(t.string(),t.record(t.string(),t.any())).optional()}),o.Provider=t.object({api:t.string().optional(),name:t.string(),env:t.array(t.string()),id:t.string(),npm:t.string().optional(),models:t.record(t.string(),o.Model)});function i(){return a$3.EASBOT_MODELS_URL||"https://models.dev"}o.Data=lazy(async()=>{let e=a$3.EASBOT_MODELS_PATH??s,p=await d.readFile(e,"utf-8").then(r=>JSON.parse(r)).catch(()=>{});if(p)return p;let c=await import('./models-snapshot-XTWYGG3T.mjs').then(r=>r.snapshot).catch(()=>{});if(c)return c;if(a$3.EASBOT_DISABLE_MODELS_FETCH)return {};let b=await fetch(`${i()}/api.json`).then(r=>r.text());return JSON.parse(b)});async function E(){return await(0, o.Data)()}o.get=E;async function j(){try{let e=await fetch(`${i()}/api.json`,{headers:{"User-Agent":`EasBot/${b.getVersion()}`}});e?.ok&&(await d.writeFile(s,await e.text()),o.Data.reset());}catch(e){f.warn("Failed to refresh models from models.dev, using cached or snapshot data",{error:e instanceof Error?e.message:String(e),url:i()});}}o.refresh=j;})(a||(a={}));function z(){a$3.EASBOT_DISABLE_MODELS_FETCH||(a.refresh(),setInterval(async()=>{await a.refresh();},60*1e3*60).unref());}
2
- export{a,z as b};
@@ -1,2 +0,0 @@
1
- import {a as a$1}from'./chunk-CJTCCLW4.mjs';import {a}from'./chunk-LFYBZHOI.mjs';import {a as a$2}from'./chunk-AD7K5VE2.mjs';import D from'path';import {NamedError,$,iife}from'@easbot/utils';import _ from'zod';function o(i){let T=process.env[i]?.toLowerCase();return T==="true"||T==="1"}function C(i,T){let u=process.env[i];if(u===void 0)return T;let B=Number(u);return Number.isNaN(B)?T:B}var A;(t=>{t.EASBOT_CONFIG=process.env.EASBOT_CONFIG,t.EASBOT_CONFIG_CONTENT=process.env.EASBOT_CONFIG_CONTENT,t.EASBOT_AUTO_SHARE=o("EASBOT_AUTO_SHARE"),t.EASBOT_DISABLE_AUTOUPDATE=o("EASBOT_DISABLE_AUTOUPDATE"),t.EASBOT_DISABLE_PRUNE=o("EASBOT_DISABLE_PRUNE"),t.EASBOT_DISABLE_TERMINAL_TITLE=o("EASBOT_DISABLE_TERMINAL_TITLE"),t.EASBOT_DISABLE_DEFAULT_PLUGINS=o("EASBOT_DISABLE_DEFAULT_PLUGINS"),t.EASBOT_DISABLE_LSP_DOWNLOAD=o("EASBOT_DISABLE_LSP_DOWNLOAD"),t.EASBOT_DISABLE_AUTOCOMPACT=o("EASBOT_DISABLE_AUTOCOMPACT"),t.EASBOT_DISABLE_MODELS_FETCH=o("EASBOT_DISABLE_MODELS_FETCH"),t.EASBOT_DISABLE_FILETIME_CHECK=o("EASBOT_DISABLE_FILETIME_CHECK"),t.EASBOT_ENABLE_EXPERIMENTAL_MODELS=o("EASBOT_ENABLE_EXPERIMENTAL_MODELS"),t.EASBOT_ENABLE_QUESTION_TOOL=o("EASBOT_ENABLE_QUESTION_TOOL"),t.EASBOT_DISABLE_EXTERNAL_SKILLS=o("EASBOT_DISABLE_EXTERNAL_SKILLS"),t.EASBOT_GIT_BASH_PATH=process.env.EASBOT_GIT_BASH_PATH,t.EASBOT_MODELS_URL=process.env.EASBOT_MODELS_URL,t.EASBOT_MODELS_PATH=process.env.EASBOT_MODELS_PATH,t.EASBOT_PERMISSION=process.env.EASBOT_PERMISSION,t.EASBOT_SERVER_USERNAME=process.env.EASBOT_SERVER_USERNAME,t.EASBOT_SERVER_PASSWORD=process.env.EASBOT_SERVER_PASSWORD,t.EASBOT_FAKE_VCS=process.env.EASBOT_FAKE_VCS,t.EASBOT_FILEWATCHER=o("EASBOT_FILEWATCHER"),t.EASBOT_ICON_DISCOVERY=o("EASBOT_ICON_DISCOVERY"),t.EASBOT_ENABLE_EXA=o("EASBOT_ENABLE_EXA"),t.EASBOT_BASH_DEFAULT_TIMEOUT_MS=O("EASBOT_BASH_DEFAULT_TIMEOUT_MS"),t.EASBOT_OUTPUT_TOKEN_MAX=O("EASBOT_OUTPUT_TOKEN_MAX"),t.EASBOT_OXFMT=o("EASBOT_OXFMT"),t.EASBOT_LSP_TY=o("EASBOT_LSP_TY"),t.EASBOT_LSP_TOOL=o("EASBOT_LSP_TOOL"),t.EASBOT_LSP_INIT_TIMEOUT=C("EASBOT_LSP_INIT_TIMEOUT",3e5),t.EASBOT_LSP_DIAGNOSTICS_TIMEOUT=C("EASBOT_LSP_DIAGNOSTICS_TIMEOUT",6e4),t.EASBOT_PLAN_MODE=o("EASBOT_PLAN_MODE"),t.EASBOT_MARKDOWN=o("EASBOT_MARKDOWN"),t.EASBOT_DISABLE_COMPACT=o("EASBOT_DISABLE_COMPACT"),t.EASBOT_DISABLE_AUTO_COMPACT=o("EASBOT_DISABLE_AUTO_COMPACT"),t.EASBOT_AUTOCOMPACT_PCT_OVERRIDE=O("EASBOT_AUTOCOMPACT_PCT_OVERRIDE"),t.EASBOT_AUTO_COMPACT_WINDOW=O("EASBOT_AUTO_COMPACT_WINDOW"),t.EASBOT_BLOCKING_LIMIT_OVERRIDE=O("EASBOT_BLOCKING_LIMIT_OVERRIDE"),t.EASBOT_MAX_CONTEXT_TOKENS=O("EASBOT_MAX_CONTEXT_TOKENS"),t.EASBOT_MAX_TOOL_USE_CONCURRENCY=O("EASBOT_MAX_TOOL_USE_CONCURRENCY");function O(v){let h=process.env[v];if(!h)return;let L=Number(h);return Number.isInteger(L)&&L>0?L:void 0}})(A||(A={}));Object.defineProperty(A,"EASBOT_DISABLE_PROJECT_CONFIG",{get(){return o("EASBOT_DISABLE_PROJECT_CONFIG")},enumerable:true,configurable:false});Object.defineProperty(A,"EASBOT_CONFIG_DIR",{get(){return process.env.EASBOT_CONFIG_DIR},enumerable:true,configurable:false});Object.defineProperty(A,"EASBOT_CLIENT",{get(){return process.env.EASBOT_CLIENT??"cli"},enumerable:true,configurable:false});var w;(S=>{let i=a.create({service:"installation"});S.Event={Updated:a$1.define("installation.updated",_.object({version:_.string()})),UpdateAvailable:a$1.define("installation.update-available",_.object({version:_.string()}))},S.Info=_.object({version:_.string(),latest:_.string()}).meta({ref:"InstallationInfo"});async function B(){return {version:m(),latest:await x()}}S.info=B;function M(){return a$2.isPreview()}S.isPreview=M;function P(){return a$2.isLocal()}S.isLocal=P;async function d(){if(process.execPath.includes(D.join(".easbot","bin"))||process.execPath.includes(D.join(".local","bin")))return "curl";let c=process.execPath.toLowerCase(),r=[{name:"npm",command:()=>$`npm list -g --depth=0`.throws(false).quiet().text()},{name:"yarn",command:()=>$`yarn global list`.throws(false).quiet().text()},{name:"pnpm",command:()=>$`pnpm list -g --depth=0`.throws(false).quiet().text()},{name:"bun",command:()=>$`bun pm ls -g`.throws(false).quiet().text()},{name:"brew",command:()=>$`brew list --formula easbot`.throws(false).quiet().text()},{name:"scoop",command:()=>$`scoop list easbot`.throws(false).quiet().text()},{name:"choco",command:()=>$`choco list --limit-output easbot`.throws(false).quiet().text()}];r.sort((e,s)=>{let E=c.includes(e.name),a=c.includes(s.name);return E&&!a?-1:!E&&a?1:0});for(let e of r){let s=await e.command(),E=(e.name==="brew"||e.name==="choco"||e.name==="scoop","easbot");if(s.includes(E))return e.name}return "unknown"}S.method=d,S.UpgradeFailedError=NamedError.create("UpgradeFailedError",_.object({stderr:_.string()}));async function f(){return (await $`brew list --formula anomalyco/tap/easbot`.throws(false).quiet().text()).includes("easbot")?"anomalyco/tap/easbot":((await $`brew list --formula easbot`.throws(false).quiet().text()).includes("easbot"),"easbot")}async function R(c,r){let e;switch(c){case "curl":e=$`curl -fsSL https://easbot.cn/install | bash`.env({...process.env,VERSION:r});break;case "npm":e=$`npm install -g easbot@${r}`;break;case "pnpm":e=$`pnpm install -g easbot@${r}`;break;case "bun":e=$`bun install -g easbot@${r}`;break;case "brew":{let E=await f();if(E.includes("/")){e=$`brew tap anomalyco/tap && cd "$(brew --repo anomalyco/tap)" && git pull --ff-only && brew upgrade ${E}`.env({HOMEBREW_NO_AUTO_UPDATE:"1",...process.env});break}e=$`brew upgrade ${E}`.env({HOMEBREW_NO_AUTO_UPDATE:"1",...process.env});break}case "choco":e=$`echo Y | choco upgrade easbot --version=${r}`;break;case "scoop":e=$`scoop install easbot@${r}`;break;default:throw new Error(`Unknown method: ${c}`)}let s=await e.quiet().throws(false);if(s.exitCode!==0){let E=c==="choco"?"not running from an elevated command shell":s.stderr.toString("utf8");throw new S.UpgradeFailedError({stderr:E})}i.info("upgraded",{method:c,target:r,stdout:s.stdout.toString(),stderr:s.stderr.toString()}),await $`${process.execPath} --version`.nothrow().quiet().text();}S.upgrade=R;function m(){return a$2.getVersion()}S.getVersion=m;function I(){return a$2.getChannel()}S.getChannel=I;function U(){return `easbot/${I()}/${m()}/${A.EASBOT_CLIENT}`}S.getUserAgent=U;async function x(c){let r=c||await d();if(r==="brew"){let e=await f();if(e.includes("/")){let s=await $`brew info --json=v2 ${e}`.quiet().text(),a=JSON.parse(s).formulae?.[0]?.versions?.stable;if(!a)throw new Error(`Could not detect version for tap formula: ${e}`);return a}return fetch("https://formulae.brew.sh/api/formula/easbot.json").then(s=>{if(!s.ok)throw new Error(s.statusText);return s.json()}).then(s=>s.versions.stable)}if(r==="npm"||r==="bun"||r==="pnpm"){let e=await iife(async()=>{let a=(await $`npm config get registry`.quiet().nothrow().text()).trim()||"https://registry.npmjs.org";return a.endsWith("/")?a.slice(0,-1):a}),s=I();return fetch(`${e}/easbot/${s}`).then(E=>{if(!E.ok)throw new Error(E.statusText);return E.json()}).then(E=>E.version)}return r==="choco"?fetch("https://community.chocolatey.org/api/v2/Packages?$filter=Id%20eq%20%27easbot%27%20and%20IsLatestVersion&$select=Version",{headers:{Accept:"application/json;odata=verbose"}}).then(e=>{if(!e.ok)throw new Error(e.statusText);return e.json()}).then(e=>e.d.results[0].Version):r==="scoop"?fetch("https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/easbot.json",{headers:{Accept:"application/json"}}).then(e=>{if(!e.ok)throw new Error(e.statusText);return e.json()}).then(e=>e.version):fetch("https://api.github.com/repos/houjallen/easbot/releases/latest").then(e=>{if(!e.ok)throw new Error(e.statusText);return e.json()}).then(e=>e.tag_name.replace(/^v/,""))}S.latest=x;})(w||(w={}));
2
- export{A as a,w as b};
@@ -1 +0,0 @@
1
- export{O as Compaction,o as CompactionCache,n as DEFAULT_CACHE_CONFIG,p as createCompactionCache,q as subscribeCacheEvents}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{bb as Agent,$a as Command,lb as Config,kb as ConfigDirectoryTypoError,hb as Info,v as InvalidError,u as JsonError,cb as Keybinds,fb as Layout,Wa as Mcp,Ta as McpLocal,Ua as McpOAuth,Va as McpRemote,Sa as ModelId,_a as Permission,Xa as PermissionAction,Ya as PermissionObject,Za as PermissionRule,gb as Provider,eb as Server,ab as Skills,Oa as SubAgent,Pa as SubAgentConfigSchema,Na as SubAgentModel,La as SubAgentRunMode,Ma as SubAgentTransportType,db as TUI,D as deduplicatePlugins,H as directories,G as get,T as getACPClientsConfig,S as getACPServerConfig,W as getAcpAgentName,U as getAcpAgentRuntimeConfig,V as getAcpModelConfig,ia as getFileCacheConfig,J as getGlobal,C as getPluginName,Ra as getSubAgentConfig,ja as getTokenEstimationConfig,I as global,t as installDependencies,L as isAutoCompactEnabled,N as isBackupEnabled,M as isPruneEnabled,x as load,R as loadACPConfig,z as loadAgent,ba as loadCodebase,A as loadCommand,ka as loadContextConfig,w as loadFile,da as loadKnowledge,ca as loadMemory,aa as loadNote,B as loadPlugin,Qa as loadSubAgentConfig,r as mergeConfigConcatArrays,s as needsInstall,y as parseConfig,E as state,ib as update,jb as updateGlobal,F as waitForDependencies}from'./chunk-PKBPWDSV.mjs';export{h as getAgentRegistryConfig,m as getAgentSyncConfig,k as getAuthConfig,d as getChannelConfig,e as getConnectionPoolConfig,l as getGatewayClusterConfig,c as getGatewayServerConfig,j as getHTTPSConfig,f as getMessageQueueConfig,i as getSessionConfig,b as loadGatewayConfig}from'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{Y as File}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1,16 +0,0 @@
1
- import {a as a$2}from'./chunk-LAHYVX5K.mjs';import {a as a$3}from'./chunk-5QKMSVQL.mjs';import'./chunk-VII7JKGB.mjs';import {g,f,e,d,h,k,a as a$4,c as c$1,b,i}from'./chunk-M3K32WJV.mjs';import {Ka}from'./chunk-PKBPWDSV.mjs';import {c}from'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import {a as a$1}from'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import {a}from'./chunk-LFYBZHOI.mjs';import {a as a$5}from'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';import'commander';import {Gateway}from'@easbot/gateway';var n=a.create({service:"cli-command-gateway"});function I(c,r,o){let t=b();console.log(""),console.log(d(a$1("gateway.server.started"))),console.log(k(60)),o?.directory&&console.log(i(a$1("gateway.field.directory"),o.directory,15));let a={stopped:a$4.muted,starting:a$4.info,running:a$4.success,stopping:a$4.info,error:a$4.error},s=c$1(t,a[c]||a$4.muted,c.toUpperCase());if(console.log(i(a$1("gateway.field.status"),s,15)),c==="running"){let m=r.https?.enabled?"wss":"ws",u=r.path||"/",g=`${m}://${r.hostname}:${r.port}${u}`;console.log(i(a$1("gateway.field.ws_url"),g,15)),console.log(i(a$1("gateway.field.port"),String(r.port),15)),console.log(i(a$1("gateway.field.hostname"),r.hostname,15)),console.log(i(a$1("gateway.field.tls"),r.https?.enabled?a$1("common.enabled"):a$1("common.disabled"),15));}o?.debug!==void 0&&console.log(i(a$1("gateway.field.debug"),o.debug?c$1(t,a$4.success,a$1("common.enabled")):c$1(t,a$4.muted,a$1("common.disabled")),15)),o?.error&&console.log(i(a$1("gateway.field.error"),o.error,15)),console.log(k(60)),console.log("");}function H(){let c=async r=>{n.debug(`Received ${r}, shutting down gracefully...`),console.log(`
2
- ${a$1("gateway.shutdown.received",{vars:{signal:r}})}`);try{await Gateway.stop(),n.debug("Gateway state destroyed"),console.log(d(a$1("gateway.shutdown.completed")));}catch(o){n.error("Error during shutdown",{error:o instanceof Error?o.message:String(o)});}process.exit(0);};process.on("SIGINT",()=>{c("SIGINT").catch(console.error);}),process.on("SIGTERM",()=>{c("SIGTERM").catch(console.error);});}async function R(c){n.debug("createAgentAdapter: starting",{directory:c}),n.debug("createAgentAdapter: calling Instance.provide");let r=await Ka.provide({directory:c,fn:async()=>{n.debug("createAgentAdapter: Instance.provide fn called");let{Project:g}=await import('./project-NIXIQTRB.mjs');n.debug("createAgentAdapter: Project imported, calling fromDirectory");let{project:p,sandbox:d}=await g.fromDirectory(c);n.debug("createAgentAdapter: fromDirectory completed",{projectId:p.id});let _={directory:c,worktree:d,project:p};return n.debug("createAgentAdapter: fn returning",{directory:c,projectId:p.id}),_}});n.debug("createAgentAdapter: Instance.provide completed",{directory:r.directory,projectId:r.project.id});let o={Path:{home:a$5.Path.home,data:a$5.Path.data,cache:a$5.Path.cache,config:a$5.Path.config,state:a$5.Path.state,log:a$5.Path.log,bin:a$5.Path.bin}},t={directory:r.directory,worktree:r.worktree},a=new Map,s={on(g,p){a.has(g)||a.set(g,new Set),a.get(g).add(p);},off(g,p){a.get(g)?.delete(p);},async emit(g){let p=a.get(g.name);if(p)for(let d of p)await d(g);}},m={async run(g){return n.warn("SubAgent runner not implemented in CLI mode"),{success:false,error:"SubAgent runner not available in CLI mode"}}};return {subAgentRunner:m,hookRegistry:s,global:o,instance:t,setMessageStorage(g){}}}async function T(c$1,r,o){n.debug("Gateway start command executed",{options:r});try{let t=o.config.directory;n.debug("Working directory resolved",{directory:t});let a=a$2(t);if(!a.valid)throw n.error("Working directory validation failed",{directory:t,error:a.error}),new Error(`Invalid working directory: ${a.error}`);let s=a.normalizedPath;n.debug("Working directory validated",{validatedDirectory:s}),console.log(g(a$1("gateway.directory.resolved",{vars:{cwd:s}}))),await a$3(s,async()=>{let{initLog:m,setAgentAdapter:u}=await import('@easbot/gateway');await m({logDir:process.env.EASBOT_LOG_PATH??process.cwd(),print:o.config.print_logs??!1,dev:o.config.debug??!1,level:o.config.log_level??"INFO"});let p=await R(s);n.debug("executeGatewayStart: createAgentAdapter completed"),u(p),n.debug("Agent adapter injected into Gateway");let d=await c();if(n.debug("Gateway server configuration",{port:d.port,hostname:d.hostname,path:d.path,tls:d.https?.enabled,enabled:d.enabled}),!d.enabled){n.warn("Gateway server is disabled by configuration"),console.log(f(a$1("gateway.disabled")));return}await Gateway.start(d),n.info("Gateway server started successfully"),I("running",d,{directory:s,debug:o.config.debug}),H(),await new Promise(()=>{});});}catch(t){n.error("Failed to start Gateway server",{error:t instanceof Error?t.message:String(t)}),console.error(e(a$1("gateway.error.start_failed",{vars:{error:t instanceof Error?t.message:String(t)}}))),process.exit(1);}}async function O(c$1,r){n.debug("Gateway stop command executed",{options:c$1});try{let o=r.config.directory;await a$3(o,async()=>{if(Gateway.getStatus()==="stopped"){console.log(g(a$1("gateway.status.already_stopped")));return}await Gateway.stop(),console.log(d(a$1("gateway.stopped")));let a=await c();I("stopped",a,{directory:o});});}catch(o){n.error("Failed to stop Gateway server",{error:o instanceof Error?o.message:String(o)}),console.error(e(a$1("gateway.error.stop_failed",{vars:{error:o instanceof Error?o.message:String(o)}}))),process.exit(1);}}async function D(c$1,r,o){n.debug("Gateway restart command executed",{options:r});try{let t=o.config.directory;await a$3(t,async()=>{let a=await c();if(!a.enabled){n.warn("Gateway server is disabled by configuration"),console.log(f(a$1("gateway.disabled")));return}console.log(g(a$1("gateway.restarting"))),await Gateway.restart(a),console.log(d(a$1("gateway.restarted"))),I("running",a,{directory:t,debug:o.config.debug}),H(),await new Promise(()=>{});});}catch(t){n.error("Failed to restart Gateway server",{error:t instanceof Error?t.message:String(t)}),console.error(e(a$1("gateway.error.restart_failed",{vars:{error:t instanceof Error?t.message:String(t)}}))),process.exit(1);}}async function j(c$2,r){n.debug("Gateway status command executed",{options:c$2});try{let o=r.config.directory;await a$3(o,async()=>{let t=Gateway.getStatus(),s=(await Gateway.get())?.getStatus(),m=await c();console.log(""),console.log(h(a$1("gateway.status.title"))),console.log(k(60));let u={stopped:a$4.muted,starting:a$4.info,running:a$4.success,stopping:a$4.info,error:a$4.error},g=c$1(b(),u[t]||a$4.muted,t.toUpperCase());if(console.log(i(a$1("gateway.field.status"),g,15)),s){console.log(i(a$1("gateway.field.port"),String(s.port),15)),console.log(i(a$1("gateway.field.hostname"),s.hostname||m.hostname,15)),console.log(i(a$1("gateway.field.connections"),String(s.connections||0),15));let d=`${m.https?.enabled?"wss":"ws"}://${s.hostname||m.hostname}:${s.port}`;console.log(i(a$1("gateway.field.ws_url"),d,15));}console.log(k(60)),console.log("");});}catch(o){n.error("Failed to get Gateway status",{error:o instanceof Error?o.message:String(o)}),console.error(e(a$1("gateway.error.status_failed",{vars:{error:o instanceof Error?o.message:String(o)}}))),process.exit(1);}}async function W(c,r){n.debug("Gateway config show command executed",{options:c});try{let o=r.config.directory;await a$3(o,async()=>{let t=await Gateway.config();if(!t){console.log(f(a$1("gateway.config.not_found")));return}if(console.log(""),console.log(h(a$1("gateway.config.heading"))),console.log(k(60)),t.server&&(console.log(h(a$1("gateway.config.server"))),console.log(i(" enabled",String(t.server.enabled??!0),12)),console.log(i(" port",String(t.server.port??3001),12)),console.log(i(" hostname",t.server.hostname??"0.0.0.0",12)),console.log(i(" tls",String(t.server.https?.enabled??!1),12)),console.log(i(" cors",String(t.server.cors??!0),12))),t.channels){console.log(""),console.log(h(a$1("gateway.config.channels")));let a=Object.keys(t.channels);if(a.length===0)console.log(g(" "+a$1("gateway.config.no_channels")));else for(let s of a){let m=t.channels[s];m&&console.log(i(` ${s}`,m.enabled?a$1("common.enabled"):a$1("common.disabled"),12));}}t.connectionPool&&(console.log(""),console.log(h(a$1("gateway.config.connection_pool"))),console.log(i(" maxConnectionsPerChannel",String(t.connectionPool.maxConnectionsPerChannel??100),25)),console.log(i(" idleTimeout",`${t.connectionPool.idleTimeout??3e5}ms`,25)),console.log(i(" reuseStrategy",t.connectionPool.reuseStrategy??"lru",25))),t.agentRegistry&&(console.log(""),console.log(h(a$1("gateway.config.agent_registry"))),console.log(i(" heartbeatInterval",`${t.agentRegistry.heartbeatInterval??3e4}ms`,20)),console.log(i(" heartbeatTimeout",`${t.agentRegistry.heartbeatTimeout??9e4}ms`,20))),console.log(k(60)),console.log("");});}catch(o){n.error("Failed to show Gateway config",{error:o instanceof Error?o.message:String(o)}),console.error(e(a$1("gateway.error.config_failed",{vars:{error:o instanceof Error?o.message:String(o)}}))),process.exit(1);}}function Z(c,r){let o=c.command("gateway").description(a$1("gateway.command.description")).helpOption("-h, --help",a$1("gateway.help.option")).addHelpText("after",`
3
-
4
- ${a$1("gateway.help.examples")}
5
- easbot gateway start # ${a$1("gateway.help.example.default")}
6
- easbot gateway start --port 8080 # ${a$1("gateway.help.example.port")}
7
- easbot gateway start --hostname 127.0.0.1 # ${a$1("gateway.help.example.hostname")}
8
- easbot gateway stop # ${a$1("gateway.help.example.stop")}
9
- easbot gateway restart # ${a$1("gateway.help.example.restart")}
10
- easbot gateway config show # ${a$1("gateway.help.example.config")}
11
-
12
- ${a$1("gateway.help.env")}
13
- GATEWAY_PORT ${a$1("gateway.help.env.port")}
14
- GATEWAY_HOSTNAME ${a$1("gateway.help.env.hostname")}
15
- GATEWAY_TLS ${a$1("gateway.help.env.tls")}
16
- `);o.option("-D, --directory <path>",a$1("gateway.option.directory")).option("-p, --port <number>",a$1("gateway.option.port"),a=>parseInt(a,10)).option("-H, --hostname <address>",a$1("gateway.option.hostname")).option("--tls",a$1("gateway.option.tls")).option("--tls-cert <path>",a$1("gateway.option.tls_cert")).option("--tls-key <path>",a$1("gateway.option.tls_key")).option("-d, --debug",a$1("gateway.option.debug"),false),o.command("start").description(a$1("gateway.command.start")).addHelpText("after",a$1("gateway.help.subcommand.start.after")).action(async()=>{if(process.argv.includes("--help")||process.argv.includes("-h")){o.commands.find(s=>s.name()==="start")?.outputHelp(),process.exit(0);return}let a=o.opts();await T(o,a,r);}),o.command("stop").description(a$1("gateway.command.stop")).action(async()=>{if(process.argv.includes("--help")||process.argv.includes("-h")){o.commands.find(s=>s.name()==="stop")?.outputHelp(),process.exit(0);return}let a=o.opts();await O(a,r);}),o.command("restart").description(a$1("gateway.command.restart")).action(async()=>{if(process.argv.includes("--help")||process.argv.includes("-h")){o.commands.find(s=>s.name()==="restart")?.outputHelp(),process.exit(0);return}let a=o.opts();await D(o,a,r);}),o.command("status").description(a$1("gateway.command.status")).action(async()=>{if(process.argv.includes("--help")||process.argv.includes("-h")){o.commands.find(s=>s.name()==="status")?.outputHelp(),process.exit(0);return}let a=o.opts();await j(a,r);});let t=o.command("config").description(a$1("gateway.command.config"));t.command("show").description(a$1("gateway.command.config_show")).action(async()=>{if(process.argv.includes("--help")||process.argv.includes("-h")){t.commands.find(s=>s.name()==="show")?.outputHelp(),process.exit(0);return}let a=o.opts();await W(a,r);});}export{Z as registerGatewayCommand};
@@ -1,33 +0,0 @@
1
- import {a as a$2}from'./chunk-TYD2M4SP.mjs';import'./chunk-FXOUIXIL.mjs';import'./chunk-CQVEAYYW.mjs';import {g as g$1,e,h,i,k,d}from'./chunk-M3K32WJV.mjs';import {Ka}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import {a as a$1}from'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import {a}from'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';import {Shell,PKG}from'@easbot/utils';var g=a.create({service:"cli-command-github"}),R=".github/workflows/opencode.yml",j="https://github.com/apps/opencode-agent";function X(e,t){let r=e.command("github").description(a$1("github.command.description"));r.command("install").description(a$1("github.command.install.description")).option("--provider <provider>",a$1("github.option.provider")).option("--model <model>",a$1("github.option.model")).action(async a=>{g.debug("Installing GitHub app"),await G(t,a);}),r.command("run").description(a$1("github.command.run.description")).option("--event <json>",a$1("github.option.event")).option("--token <token>",a$1("github.option.token")).action(async a=>{g.debug("Running GitHub agent",{options:a}),console.log(g$1(a$1("github.run.info")));});}async function G(e$1,t){try{Ka.project.vcs!=="git"&&(console.error(e(a$1("github.error.not_git_repo"))),process.exit(1)),console.log(h(a$1("github.install.starting")));let a=await S(),n=W(a);n||(console.error(e(a$1("github.error.parse_remote"))),process.exit(1)),console.log(i(a$1("github.field.owner"),n.owner)),console.log(i(a$1("github.field.repo"),n.repo)),console.log(k(60)),console.log(g$1(a$1("github.install.step1")));let i$1=`${j}?target=${n.owner}/${n.repo}`;console.log(g$1(a$1("github.install.open_url",{vars:{url:i$1}}))),await E(i$1),console.log(g$1(a$1("github.install.waiting")));let s=0,d$1=60;for(;s<d$1;){if(await H(n.owner,n.repo)){console.log(d(a$1("github.install.installed")));break}s++,await A(1e3);}s>=d$1&&(console.error(e(a$1("github.install.timeout"))),process.exit(1));let c=t.provider||await F(e$1),v=t.model||await L(e$1,c);console.log(k(60)),console.log(g$1(a$1("github.install.generating_workflow"))),await T(e$1,n.owner,n.repo,c,v),console.log(d(a$1("github.install.workflow_created",{vars:{file:R}}))),console.log(""),console.log(h(a$1("github.install.next_steps"))),console.log(g$1("1. "+a$1("github.install.step1_hint"))),console.log(g$1("2. "+a$1("github.install.step2_hint",{vars:{owner:n.owner,repo:n.repo}}))),console.log(g$1("3. "+a$1("github.install.step3_hint"))),g.debug("GitHub app installation complete",{owner:n.owner,repo:n.repo});}catch(r){g.error("Failed to install GitHub app",{error:r instanceof Error?r.message:String(r)}),console.error(e(a$1("github.install.error",{vars:{error:r instanceof Error?r.message:String(r)}}))),process.exit(1);}}async function S(){let e=process.platform==="win32"?"cmd":void 0,t=Shell.spawn(e,"git remote get-url origin");if(await t.exited!==0)throw new Error("Failed to get git remote");return await PKG.nodeReadableStreamToText(t.stdout)}function W(e){let t=e.match(/^(?:(?:https?|ssh):\/\/)?(?:git@)?github\.com[:/]([^/]+)\/([^/]+?)(?:\.git)?$/);return t?{owner:t[1],repo:t[2]}:null}async function E(e){let t=process.platform==="darwin"?`open ${e}`:process.platform==="win32"?`start ${e}`:`xdg-open ${e}`;try{let r=process.platform==="win32"?"cmd":void 0;await Shell.spawn(r,t).exited;}catch{g.debug("Could not open browser automatically");}}async function H(e,t){try{return !!(await(await fetch(`https://api.opencode.ai/get_github_app_installation?owner=${e}&repo=${t}`)).json()).installation}catch{return false}}async function F(e){let{data:t}=await e.sdk.config.providers({}),r=t?.providers||[],a={easbot:0,anthropic:1,openai:2,google:3},n=r.sort((i,s)=>(a[i.id]??99)-(a[s.id]??99));return console.log(""),console.log(g$1(a$1("github.install.select_provider"))),console.log(a$2({columns:[{key:"index",header:"#",minWidth:4},{key:"id",header:a$1("github.table.header.id"),minWidth:15},{key:"name",header:a$1("github.table.header.name"),flex:true},{key:"hint",header:"",minWidth:15}],rows:n.map((i,s)=>({index:`${s+1}`,id:i.id,name:i.name||i.id,hint:i.id==="easbot"?"recommended":""})),width:process.stdout.columns||80,border:"unicode"})),console.log(""),n[0]?.id||"easbot"}async function L(e,t){let{data:r}=await e.sdk.config.providers({}),n=(r?.providers||[]).find(s=>s.id===t);if(!n?.models)return "default";let i=Object.entries(n.models);if(i.length===0)return "default";console.log(""),console.log(g$1(a$1("github.install.select_model")));for(let s=0;s<i.length;s++){let[d,c]=i[s];console.log(` ${s+1}. ${c.name||d}`);}return console.log(""),i[0]?.[0]||"default"}async function T(e,t,r,a,n){let{data:i}=await e.sdk.config.providers({}),c=(i?.providers||[]).find(p=>p.id===a)?.env||[],y=`name: opencode
2
-
3
- on:
4
- issue_comment:
5
- types: [created]
6
- pull_request_review_comment:
7
- types: [created]
8
-
9
- jobs:
10
- opencode:
11
- if: |
12
- contains(github.event.comment.body, ' /oc') ||
13
- startsWith(github.event.comment.body, '/oc') ||
14
- contains(github.event.comment.body, ' /opencode') ||
15
- startsWith(github.event.comment.body, '/opencode')
16
- runs-on: ubuntu-latest
17
- permissions:
18
- id-token: write
19
- contents: read
20
- pull-requests: read
21
- issues: read
22
- steps:
23
- - name: Checkout repository
24
- uses: actions/checkout@v6
25
- with:
26
- persist-credentials: false
27
-
28
- - name: Run opencode
29
- uses: anomalyco/opencode/github@latest${c.length>0?c.map(p=>`
30
- ${p}: \${{ secrets.${p} }}`).join(""):""}
31
- with:
32
- model: ${a}/${n}
33
- `,k=await import('fs/promises'),P=await import('path'),_=P.join(Ka.worktree,R);await k.mkdir(P.dirname(_),{recursive:true}),await k.writeFile(_,y,"utf-8");}function A(e){return new Promise(t=>setTimeout(t,e))}export{X as registerGithubCommand};
@@ -1 +0,0 @@
1
- export{a as Global}from'./chunk-AD7K5VE2.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{b as Installation}from'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{Ka as Instance}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{H as directories,G as get,J as getGlobal,I as global,E as state,F as waitForDependencies}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{a as PluginLoader,b as createPluginLoader}from'./chunk-MMU3Z6V2.mjs';import'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{b as LSP}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{a as ModelsDev,b as initModelsRefresh}from'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{a as loadTuiState,b as saveTuiStateToStorage}from'./chunk-TSX5PZSW.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{Ja as Project}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{xa as SessionPrompt}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{j as Provider}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{ea as ToolRegistry}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{l as SessionRevert}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{a as Ripgrep}from'./chunk-E6P3STWN.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{ya as DEFAULT_HEARTBEAT_TEMPLATE,za as DEFAULT_SCHEDULED_TEMPLATE,Ea as HookEvent,Aa as PromptTemplate,Da as Scheduler,Ba as TaskHistory,c as TaskStorage,d as TaskStore,i as describeCron,h as formatCronExpression,g as getNextFireTime,f as isValidCron,e as parseCronExpression,Ca as recordTaskExecution}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{ta as Server}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{Ia as Session}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{Ia as Session,ga as Task}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{Ha as Share}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{Fa as Snapshot}from'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{a as Storage}from'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{a as CustomEditor,h as createTuiApp,d as editorTheme,c as selectListTheme,b as theme}from'./chunk-MHY26EXB.mjs';import'./chunk-CQVEAYYW.mjs';import'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1 +0,0 @@
1
- export{Q as Acp,bb as Agent,Z as Codebase,$a as Command,K as Compaction,ha as Context,hb as Info,cb as Keybinds,fb as Layout,Wa as Mcp,Ta as McpLocal,Ua as McpOAuth,Va as McpRemote,_ as Memory,Sa as ModelId,$ as Note,_a as Permission,Xa as PermissionAction,Ya as PermissionObject,Za as PermissionRule,gb as Provider,eb as Server,ab as Skills,Oa as SubAgent,Pa as SubAgentConfigSchema,Na as SubAgentModel,La as SubAgentRunMode,Ma as SubAgentTransportType,db as TUI}from'./chunk-PKBPWDSV.mjs';export{a as Gateway}from'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';
@@ -1,2 +0,0 @@
1
- import {a as a$2}from'./chunk-5QKMSVQL.mjs';import {h,g,e,d}from'./chunk-M3K32WJV.mjs';import'./chunk-PKBPWDSV.mjs';import'./chunk-ZBRXNYEM.mjs';import'./chunk-3AJJMHKA.mjs';import'./chunk-TSX5PZSW.mjs';import'./chunk-DEZT7DOH.mjs';import'./chunk-AAJAKVQY.mjs';import'./chunk-E6P3STWN.mjs';import {a as a$1}from'./chunk-EEWP2VV6.mjs';import'./chunk-NCHKGEE3.mjs';import'./chunk-SLZ3HAH6.mjs';import'./chunk-CJTCCLW4.mjs';import'./chunk-LGMOIUYA.mjs';import {a}from'./chunk-LFYBZHOI.mjs';import'./chunk-AD7K5VE2.mjs';import'./chunk-2RSIOAZV.mjs';import'./chunk-X6ISXWBN.mjs';import {Semver,Shell,PKG}from'@easbot/utils';var m=a.create({service:"cli-command-update"});function G(t,i){t.command("update [target]").description(a$1("update.command.description")).option("--method <method>",a$1("update.option.method")).action(async(e$1,n)=>{m.debug("Update command started",{target:e$1,method:n.method});try{console.log(h(a$1("update.starting")));let{Global:s}=await import('./global-QYCQXNCR.mjs'),a=s.getVersion()||"unknown";console.log(g(a$1("update.current_version",{vars:{version:a}})));let o=e$1||"latest";o==="latest"&&(o=await f(),o==="latest"&&(console.error(e(a$1("update.latest_fetch_failed"))),process.exit(1))),console.log(g(a$1("update.target_version",{vars:{version:o}})));let p=o.replace(/^v/,"");Semver.isValid(p)||(console.error(e(a$1("update.invalid_version",{vars:{version:o}}))),process.exit(1));let v=Semver.compare(a,p);v===0&&(console.log(d(a$1("update.already_latest",{vars:{version:a}}))),process.exit(0)),v>0&&console.warn(g(a$1("update.downgrade_warning",{vars:{from:a,to:p}}))),console.log(g(a$1("update.downloading")));let l=await a$2(i.config.directory,()=>U(o,n.method));l.success?(console.log(d(a$1("update.success",{vars:{version:l.version||o}}))),process.exit(0)):(console.error(e(a$1("update.failed",{vars:{error:l.error||"Unknown error"}}))),process.exit(1));}catch(s){m.error("Update failed",{error:s instanceof Error?s.message:String(s)}),console.error(e(a$1("update.error",{vars:{error:s instanceof Error?s.message:String(s)}}))),process.exit(1);}});}async function U(t,i){try{let e=t;t==="latest"?e=await f():(e=t.replace(/^v/,""),Semver.isValid(e)||(e=await f(),m.debug("Invalid version provided, using latest",{target:t,version:e})));let n=i||await V();m.debug("Updating to version",{version:e,method:n});let s=process.platform==="win32"?"cmd":void 0,a=x(n,e);m.info(`Using ${n} to update`,{version:e,shell:s,command:a});let o=await Shell.run(s,a,{windowsHide:!0,timeout:600*1e3,env:{npm_config_loglevel:"error",PNPM_LOGLEVEL:"error",BUN_LOG_LEVEL:"error"}});return o.code===0?{success:!0,version:e}:{success:!1,error:o.stderr||o.stdout||`Exit code: ${o.code}`||"Update failed"}}catch(e){return {success:false,error:e instanceof Error?e.message:String(e)}}}function x(t,i){let n=`@easbot/agent@${i}`;switch(t){case "pnpm":return `pnpm add -g ${n} --loglevel error`;case "bun":return `bun add -g ${n}`;default:return `npm install -g ${n} --loglevel error`}}async function f(){try{return (await(await fetch("https://registry.npmjs.org/@easbot/agent/latest")).json()).version||"latest"}catch{return "latest"}}async function V(){let t=await PKG.packageManager();return t?t.name:"npm"}
2
- export{G as registerUpdateCommand};