@leviyuan/lodestar 0.21.5 → 0.21.6

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 CHANGED
@@ -40,7 +40,7 @@ lodestar-setup
40
40
 
41
41
  ## 附加能力
42
42
 
43
- - [多模型协作](docs/usage.md#多模型任务):将任务交给一个或多个模型执行,支持并发协作与后续追问。
43
+ - [多模型协作](docs/usage.md#多模型任务):Lodestar Agent 支持多模型并发与后续追问;不支持 Claude 订阅,遵守 Claude 用户协议,中转站等第三方 Claude 模型仍可调用。
44
44
  - [飞书任务清单](docs/usage.md#飞书任务清单):在项目群创建、绑定和删除任务清单。
45
45
  - [脚本通知](docs/usage.md#本机通知):让本机脚本向群里推送通知,支持图片、交互按钮和文字回复。
46
46
 
@@ -124,6 +124,6 @@ try {
124
124
  `}function t1(A,Q){process.stdout.write(Q?`${JSON.stringify(A,null,2)}
125
125
  `:Uf(A))}function Uf(A){let Q=`lodestar-agent${A.binding==="project"?` --project ${kE(String(A.project))}`:""}`,B=[`# Lodestar agent ${A.run_id??"MISS"}`,"",`- Status: ${A.status??"MISS"}`,...A.binding==="project"?[`- Project: ${A.project}`]:[],`- Description: ${A.description??"MISS"}`,`- Work directory: ${A.work_dir??"MISS"}`,...A.parent_run_id?[`- Parent: ${A.parent_run_id} (${A.parent_kind??"delegate"})`]:[]];if(A.error)B.push(`- Error: ${A.error}`);for(let I of A.workers??[]){if(B.push("",`## ${I.identity_name??I.identity_id}`,"",`Status: ${I.status}`),I.session_id)B.push(`Session: ${I.session_id}`);if(I.error)B.push("",`Error: ${I.error}`);if(I.pending_input){B.push("",`Input request: ${I.pending_input.request_id}`);for(let C of I.pending_input.questions??[])if(B.push(`- [${C.id}] ${C.question}`),C.options?.length)B.push(` Options: ${C.options.map((g)=>g.label).join(" / ")}`);B.push("","Answer with:",`${Q} answer ${kE(A.run_id)} --identity ${kE(I.identity_id)} --request ${kE(I.pending_input.request_id)} --stdin`)}if(I.output)B.push("",I.output);if(I.session_id&&I.identity_id&&["completed","failed","cancelled"].includes(A.status))B.push("","Continue with:",`${Q} run --session ${kE(I.session_id)} --identity ${kE(I.identity_id)} --description '<brief next step>' --stdin`)}if(A.presentation_errors?.length)B.push("","Presentation errors:",...A.presentation_errors.map((I)=>`- ${I}`));return`${B.join(`
126
126
  `)}
127
- `}function kE(A){return`'${A.replace(/'/g,"'\\''")}'`}async function e1(){if(process.stdin.isTTY)return"";let A=[];for await(let Q of process.stdin)A.push(Buffer.isBuffer(Q)?Q:Buffer.from(Q));return Buffer.concat(A).toString("utf8")}function NC(A,Q){if(!A?.trim())throw Error(Q);return A.trim()}function n1(){return["Usage:"," lodestar-agent --project <project-or-worktree> <command> [options]"," lodestar-agent identities [--json]"," lodestar-agent run --identity <id> [--identity <id>...] --description <summary> [--workdir <path>] [--effort <level>] [--json] --stdin"," lodestar-agent run --session <session_id> [--identity <id>] --description <summary> [--workdir <path>] [--effort <level>] [--json] --stdin"," lodestar-agent follow-up <run_id> [--identity <id>] --description <summary> [--workdir <path>] [--effort <level>] [--json] --stdin"," lodestar-agent answer <run_id> [--identity <id>] --request <id> (--answer key=value | --stdin)"," lodestar-agent status <run_id> [--json]"," lodestar-agent cancel <run_id>","","Use --prompt <text> instead of --stdin for inline input. --no-wait returns the started run as JSON.","Agent task calls must use the managed-session context. --project is only for independent services and applications.","Without --project, the existing managed-session context is required; invalid contexts never switch modes.","Project run/follow-up: --request-id <unique-key> deduplicates retries; --requester <open_id> records the requester only.","Project calls are non-interactive and never wait for answers. The answer command is only for session-bound delegation.","Agent results and local artifact paths return to the caller. File-delivery markers are not executed.","--session resumes the unique native conversation id only within its registered project and group.","Unknown ownership and cross-project/group resumes are rejected, even with an explicit identity.","--identity may change the model/source within the original backend; effort and project-local workdir may be overridden.","The new run belongs to the current caller; the previous run keeps its original owner and cancellation scope.","--workdir defaults to the managed-session or explicit-project directory; relative paths are resolved from it.","New conversations and resumes stay within that project root. Resumes otherwise reuse the recorded directory.","session_id is the stable conversation identity; run_id identifies only one invocation, not a second session.","--description is required for every run/follow-up: one short line, at most 60 characters, shown on the collapsed card.","Each turn has a new run_id; workers[].session_id identifies the native conversation."].join(`
127
+ `}function kE(A){return`'${A.replace(/'/g,"'\\''")}'`}async function e1(){if(process.stdin.isTTY)return"";let A=[];for await(let Q of process.stdin)A.push(Buffer.isBuffer(Q)?Q:Buffer.from(Q));return Buffer.concat(A).toString("utf8")}function NC(A,Q){if(!A?.trim())throw Error(Q);return A.trim()}function n1(){return["Usage:"," lodestar-agent --project <project-or-worktree> <command> [options]"," lodestar-agent identities [--json]"," lodestar-agent run --identity <id> [--identity <id>...] --description <summary> [--workdir <path>] [--effort <level>] [--json] --stdin"," lodestar-agent run --session <session_id> [--identity <id>] --description <summary> [--workdir <path>] [--effort <level>] [--json] --stdin"," lodestar-agent follow-up <run_id> [--identity <id>] --description <summary> [--workdir <path>] [--effort <level>] [--json] --stdin"," lodestar-agent answer <run_id> [--identity <id>] --request <id> (--answer key=value | --stdin)"," lodestar-agent status <run_id> [--json]"," lodestar-agent cancel <run_id>","","Lodestar Agent does not support Claude subscription calls; comply with Claude's user agreement. Third-party Claude sources remain supported.","Use --prompt <text> instead of --stdin for inline input. --no-wait returns the started run as JSON.","Agent task calls must use the managed-session context. --project is only for independent services and applications.","Without --project, the existing managed-session context is required; invalid contexts never switch modes.","Project run/follow-up: --request-id <unique-key> deduplicates retries; --requester <open_id> records the requester only.","Project calls are non-interactive and never wait for answers. The answer command is only for session-bound delegation.","Agent results and local artifact paths return to the caller. File-delivery markers are not executed.","--session resumes the unique native session ID only within its registered project and conversation ID (chat_id).","Unknown ownership and resumes across projects or conversation IDs are rejected, even with an explicit identity.","--identity may change the model/source within the original backend; effort and project-local workdir may be overridden.","The new run belongs to the current caller; the previous run keeps its original owner and cancellation scope.","--workdir defaults to the managed-session or explicit-project directory; relative paths are resolved from it.","New conversations and resumes stay within that project root. Resumes otherwise reuse the recorded directory.","session_id is the stable native session ID, distinct from the binding conversation ID (chat_id); run_id identifies one invocation.","--description is required for every run/follow-up: one short line, at most 60 characters, shown on the collapsed card.","Each turn has a new run_id; workers[].session_id identifies the native Agent session."].join(`
128
128
  `)}function A8(A){return A instanceof Error?A.message:String(A)}if(process.argv[1]&&i1(process.argv[1])===i1(Bf(import.meta.url)))If().catch((A)=>{process.stderr.write(`lodestar-agent: ${A8(A)}
129
129
  `),process.exitCode=1});export{a1 as parsePromptArgs,If as main,Ff as extractProjectOption};