@yuandc/aica 0.1.65 → 0.1.67

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.
@@ -1 +1 @@
1
- import{Command as c}from"commander";import p from"node:fs";import i from"node:path";import{acaServerRequest as n}from"../core/aca-server-client.js";import{applyRuntimePathOptions as m}from"../core/runtime-options.js";import{loadAcaConfig as d,upsertLocalProject as h}from"../core/aca-config.js";function u(){return new c("project").description("Manage remote projects without local SQLite").addCommand(new c("add").description("Register a local project on ACA Server").argument("<root>","Project root path").option("--aica-home <path>","Runtime home directory (defaults to ~/.aica)").option("--aica-config <path>","Config file path").option("--aca-home <path>","Deprecated alias for --aica-home").option("--aca-config <path>","Deprecated alias for --aica-config").option("--name <name>","Project name").option("--workspace <id>","ACA workspace ID").option("--type <project|chat-room>","Project type","project").action(async(t,o)=>{if(m(o),o.type!=="project"&&o.type!=="chat-room")throw new Error("Project type must be 'project' or 'chat-room'.");const r=d(),e=p.realpathSync.native(i.resolve(t));if(!p.statSync(e).isDirectory())throw new Error("项目根目录必须是目录。");const s=o.name?.trim()||i.basename(e),a=(await n("POST","/api/projects",{workspaceId:o.workspace||r.defaultWorkspaceId,name:s,rootPath:e,source:"aica",projectType:o.type==="chat-room"?"chat_room":"project"})).item;h({projectId:a.project_id,workspaceId:a.workspace_id,name:a.name,rootPath:a.root_path}),console.log(`${a.project_id} ${a.name} ${a.root_path}`)})).addCommand(new c("list").description("List projects from ACA Server").option("--aica-home <path>","Runtime home directory (defaults to ~/.aica)").option("--aica-config <path>","Config file path").option("--aca-home <path>","Deprecated alias for --aica-home").option("--aca-config <path>","Deprecated alias for --aica-config").option("--workspace <id>","ACA workspace ID").action(async t=>{m(t);const o=t.workspace?`?workspaceId=${encodeURIComponent(t.workspace)}`:"",r=await n("GET",`/api/projects${o}`);for(const e of r.items)console.log(`${e.project_id} workspace=${e.workspace_id} name=${e.name} root=${e.root_path}`)}))}export{u as createWorkerProjectCommand};
1
+ import{Command as c}from"commander";import p from"node:fs";import i from"node:path";import{acaServerRequest as n}from"../core/aca-server-client.js";import{applyRuntimePathOptions as m}from"../core/runtime-options.js";import{upsertLocalProject as s}from"../core/aca-config.js";function u(){return new c("project").description("Manage remote projects without local SQLite").addCommand(new c("add").description("Register a local project on ACA Server").argument("<root>","Project root path").option("--aica-home <path>","Runtime home directory (defaults to ~/.aica)").option("--aica-config <path>","Config file path").option("--aca-home <path>","Deprecated alias for --aica-home").option("--aca-config <path>","Deprecated alias for --aica-config").option("--name <name>","Project name").option("--workspace <id>","Deprecated for add; use the web UI to move projects").option("--type <project|chat-room>","Project type","project").action(async(a,o)=>{if(m(o),o.type!=="project"&&o.type!=="chat-room")throw new Error("Project type must be 'project' or 'chat-room'.");o.workspace&&console.warn("--workspace 不再用于新建项目;项目统一添加到自己的默认工作组,请在网页中调整归属。");const r=p.realpathSync.native(i.resolve(a));if(!p.statSync(r).isDirectory())throw new Error("项目根目录必须是目录。");const t=o.name?.trim()||i.basename(r),e=(await n("POST","/api/projects",{workspaceId:"default",name:t,rootPath:r,source:"aica",projectType:o.type==="chat-room"?"chat_room":"project"})).item;s({projectId:e.project_id,workspaceId:e.workspace_id,name:e.name,rootPath:e.root_path}),console.log(`${e.project_id} workspace=${e.workspace_id} ${e.name} ${e.root_path}`)})).addCommand(new c("list").description("List projects from ACA Server").option("--aica-home <path>","Runtime home directory (defaults to ~/.aica)").option("--aica-config <path>","Config file path").option("--aca-home <path>","Deprecated alias for --aica-home").option("--aca-config <path>","Deprecated alias for --aica-config").option("--workspace <id>","ACA workspace ID").action(async a=>{m(a);const o=a.workspace?`?workspaceId=${encodeURIComponent(a.workspace)}`:"",r=await n("GET",`/api/projects${o}`);for(const t of r.items)console.log(`${t.project_id} workspace=${t.workspace_id} name=${t.name} root=${t.root_path}`)}))}export{u as createWorkerProjectCommand};
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- const o="0.1.65";export{o as AICA_VERSION};
1
+ const o="0.1.67";export{o as AICA_VERSION};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuandc/aica",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "description": "AICA remote Agent worker",
5
5
  "author": "yuandc",
6
6
  "type": "module",