askii-cli 0.2.0 → 0.2.1

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 (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -424,7 +424,7 @@ export async function generate(ctl: GeneratorController) {
424
424
  the LMStudioClient constructor:
425
425
 
426
426
  ${"const client = new LMStudioClient({ baseUrl: 'ws://<host_name>:<port>' });"}
427
- `);this.logger=new H("LMStudioClient",t),this.clientIdentifier=o??(0,Xe.generateRandomBase64)(18),this.clientPasskey=a??(0,Xe.generateRandomBase64)(18);let b=A(1);l?this.resolvingBaseUrl=new Promise(()=>{}):n===void 0?this.resolvingBaseUrl=this.guessBaseUrl(i?b:void 0):(this.validateBaseUrlOrThrow(n),this.resolvingBaseUrl=n),this.verboseErrorMessages=i??!0,this.llmPort=c??this.createPort("llm","LLM",xD()),this.embeddingPort=u??this.createPort("embedding","Embedding",_D()),this.systemPort=h??this.createPort("system","System",PD()),this.diagnosticsPort=f??this.createPort("diagnostics","Diagnostics",CD()),this.filesPort=p??this.createPort("files","Files",ED()),this.repositoryPort=m??this.createPort("repository","Repository",FD()),this.pluginsPort=g??this.createPort("plugins","Plugins",kD());let y=new Qe;this.llm=new ka(this,this.llmPort,new H("LLM",this.logger),y),this.embedding=new ba(this,this.embeddingPort,new H("Embedding",this.logger),y),this.system=new Va(this.systemPort,y,this.logger),this.diagnostics=new ga(this.diagnosticsPort,y,this.logger),this.files=new va(this.filesPort,y,this.logger),this.repository=new qa(this.repositoryPort,y,this.logger),this.plugins=new Na(this.pluginsPort,this,y,this.logger,t)}async[Symbol.asyncDispose](){await Promise.all([this.llmPort[Symbol.asyncDispose](),this.embeddingPort[Symbol.asyncDispose](),this.systemPort[Symbol.asyncDispose](),this.diagnosticsPort[Symbol.asyncDispose](),this.filesPort[Symbol.asyncDispose](),this.repositoryPort[Symbol.asyncDispose](),this.pluginsPort[Symbol.asyncDispose]()])}};async function xh(r,e,t,n,i){return(await new tn({host:e}).generate({model:t,system:n,prompt:r,stream:!1,images:i})).response||"No response"}async function kh(r,e,t,n,i){try{let a=await new cs({baseUrl:e}).llm.model(t),l=i?[{type:"imageUrl",url:`data:image/png;base64,${i}`},{type:"text",text:r}]:r,c=n?[{role:"system",content:n},{role:"user",content:l}]:[{role:"user",content:l}];return(await a.respond(c)).content||"No response"}catch(o){let a=o instanceof Error?o.message:"Unknown error";throw new Error(`LM Studio error: ${a}`)}}var ge=require("@nut-tree-fork/nut-js"),Fh=Pe(require("screenshot-desktop")),Ph=`You are a computer control assistant. You will receive a screenshot and must determine the next single action to take to complete the given instruction.
427
+ `);this.logger=new H("LMStudioClient",t),this.clientIdentifier=o??(0,Xe.generateRandomBase64)(18),this.clientPasskey=a??(0,Xe.generateRandomBase64)(18);let b=A(1);l?this.resolvingBaseUrl=new Promise(()=>{}):n===void 0?this.resolvingBaseUrl=this.guessBaseUrl(i?b:void 0):(this.validateBaseUrlOrThrow(n),this.resolvingBaseUrl=n),this.verboseErrorMessages=i??!0,this.llmPort=c??this.createPort("llm","LLM",xD()),this.embeddingPort=u??this.createPort("embedding","Embedding",_D()),this.systemPort=h??this.createPort("system","System",PD()),this.diagnosticsPort=f??this.createPort("diagnostics","Diagnostics",CD()),this.filesPort=p??this.createPort("files","Files",ED()),this.repositoryPort=m??this.createPort("repository","Repository",FD()),this.pluginsPort=g??this.createPort("plugins","Plugins",kD());let y=new Qe;this.llm=new ka(this,this.llmPort,new H("LLM",this.logger),y),this.embedding=new ba(this,this.embeddingPort,new H("Embedding",this.logger),y),this.system=new Va(this.systemPort,y,this.logger),this.diagnostics=new ga(this.diagnosticsPort,y,this.logger),this.files=new va(this.filesPort,y,this.logger),this.repository=new qa(this.repositoryPort,y,this.logger),this.plugins=new Na(this.pluginsPort,this,y,this.logger,t)}async[Symbol.asyncDispose](){await Promise.all([this.llmPort[Symbol.asyncDispose](),this.embeddingPort[Symbol.asyncDispose](),this.systemPort[Symbol.asyncDispose](),this.diagnosticsPort[Symbol.asyncDispose](),this.filesPort[Symbol.asyncDispose](),this.repositoryPort[Symbol.asyncDispose](),this.pluginsPort[Symbol.asyncDispose]()])}};async function xh(r,e,t,n,i){return(await new tn({host:e}).generate({model:t,system:n,prompt:r,stream:!1,images:i})).response||"No response"}async function kh(r,e,t,n,i){try{let o=new cs({baseUrl:e}),a=await o.llm.model(t),l={role:"user",content:r};if(i){let h=await o.files.prepareImageBase64("screenshot.png",i);l.images=[h]}let c=n?[{role:"system",content:n},l]:[l];return(await a.respond(c)).content||"No response"}catch(o){let a=o instanceof Error?o.message:"Unknown error";throw new Error(`LM Studio error: ${a}`)}}var ge=require("@nut-tree-fork/nut-js"),Fh=Pe(require("screenshot-desktop")),Ph=`You are a computer control assistant. You will receive a screenshot and must determine the next single action to take to complete the given instruction.
428
428
 
429
429
  Respond with ONLY a valid JSON object (no markdown, no extra text) in one of these formats:
430
430
  {"action": "mouse_move", "x": number, "y": number, "reasoning": "explanation"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askii-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "ASKII CLI - AI code assistant with style ( •_•)>⌐■-■ (⌐■_■)",
5
5
  "bin": {
6
6
  "askii": "./dist/index.js"
@@ -13,7 +13,7 @@
13
13
  "build": "node build.js",
14
14
  "build:prod": "node build.js --production",
15
15
  "dev": "node build.js --watch",
16
- "publish": "node build.js --production && npm publish"
16
+ "release": "node build.js --production && npm publish"
17
17
  },
18
18
  "engines": {
19
19
  "node": ">=18.0.0"