@pawlogic/dl 0.3.0-staging.4e6918e → 0.3.0-staging.5cf601e

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/ilands.mjs ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{readFileSync as e}from"node:fs";import{dirname as t,resolve as n}from"node:path";import{fileURLToPath as i}from"node:url";import{readFile as r}from"node:fs/promises";import{createHash as o}from"node:crypto";const a="5cf601e";async function l(e,t,n,i,r=globalThis.fetch){const o=function(e){const t=(e.ILANDS_SANDBOX_RPC_URL??"").trim(),n=(e.ILANDS_SANDBOX_TOKEN??"").trim();return t?n?/^https?:\/\/[^\s]+$/i.test(t)?{ok:!0,env:{rpcUrl:t,token:n}}:{ok:!1,error:`ILANDS_SANDBOX_RPC_URL invalid: ${t}`}:{ok:!1,error:"ILANDS_SANDBOX_TOKEN not set"}:{ok:!1,error:"ILANDS_SANDBOX_RPC_URL not set"}}(i);if(!o.ok)return{exitCode:2,stderr:`ilands ${e}: ${o.error}\n`};const a=`${o.env.rpcUrl.replace(/\/+$/,"")}/sandbox-rpc/ilands/${t}`;let l;try{const e=new AbortController,t=setTimeout(()=>e.abort(),3e4);try{l=await r(a,{method:"POST",headers:{Authorization:`Bearer ${o.env.token}`,"Content-Type":"application/json"},body:JSON.stringify(n),signal:e.signal})}finally{clearTimeout(t)}}catch(t){return{exitCode:1,stderr:`ilands ${e}: rpc error: ${t instanceof Error?t.message:String(t)}\n`}}const s=await l.text();return l.status>=200&&l.status<300?{exitCode:0,stdout:s}:{exitCode:1,stderr:`ilands ${e}: rpc returned ${l.status}\n${s}\n`}}function s(e,t,n,i=[]){const r={},o=new Set([...n,...i]);for(let n=0;n<e.length;n++){const i=e[n];if(void 0===i)break;const[a,l]=i.includes("=")?[i.slice(0,i.indexOf("=")),i.slice(i.indexOf("=")+1)]:[i,e[++n]];if(!o.has(a))return{ok:!1,stderr:`ilands ${t}: unknown flag: ${a}\n`};if(void 0===l)return{ok:!1,stderr:`ilands ${t}: ${a} requires a value\n`};r[a]=l}for(const e of n)if(!r[e])return{ok:!1,stderr:`ilands ${t}: ${e} is required\n`};return{ok:!0,args:r}}function d(e,t,n){return/^-?\d+$/.test(n.trim())?{ok:!0,value:Number.parseInt(n,10)}:{ok:!1,stderr:`ilands ${e}: ${t} must be an integer (got ${n})\n`}}async function c(e,t,n,i,r=globalThis.fetch){const o=[...t.required,...t.optional??[]],a=s(n,e,t.required.map(e=>e.flag),(t.optional??[]).map(e=>e.flag));if(!a.ok)return{exitCode:2,stderr:a.stderr};const c={...t.fixed??{}};for(const t of o){const n=a.args[t.flag];if(void 0!==n)if(t.int){const i=d(e,t.flag,n);if(!i.ok)return{exitCode:2,stderr:i.stderr};c[t.field]=i.value}else if(t.json)try{c[t.field]=JSON.parse(n)}catch{return{exitCode:2,stderr:`ilands ${e}: ${t.flag} must be valid JSON\n`}}else if(t.csv){const i=n.split(",").map(e=>e.trim()).filter(e=>e.length>0);if(0===i.length)return{exitCode:2,stderr:`ilands ${e}: ${t.flag} must contain at least one value\n`};c[t.field]=i}else c[t.field]=n}return l(e,t.endpoint,c,i,r)}const f={browse:{endpoint:"bounty/browse",required:[],optional:[{flag:"--limit",field:"limit",int:!0}]},apply:{endpoint:"bounty/apply",required:[{flag:"--task-id",field:"task_id"},{flag:"--plan-note",field:"plan_note"}]},submit:{endpoint:"bounty/submit",required:[{flag:"--claim-id",field:"claim_id"},{flag:"--completion-note",field:"completion_note"}],optional:[{flag:"--produce-refs",field:"produce_refs",json:!0}]}};async function u(e,t,n,i=globalThis.fetch){const o=s(t,e,[],["--params","--params-file"]);if(!o.ok)return{exitCode:2,stderr:o.stderr};const a=o.args;let d,c="{}";if(a["--params"])c=a["--params"];else if(a["--params-file"]){const e=a["--params-file"];c="-"===e?await async function(){const e=[];for await(const t of process.stdin)e.push(t);return Buffer.concat(e).toString("utf-8")}():await r(e,"utf-8")}try{d=JSON.parse(c)}catch{return{exitCode:2,stderr:`ilands ${e}: --params not valid JSON\n`}}return l(e,e,{params:d},n,i)}const m={endpoint:"comment-content",required:[{flag:"--body",field:"body"}],optional:[{flag:"--content-id",field:"content_id"},{flag:"--moment-id",field:"moment_id"},{flag:"--parent-comment-id",field:"parent_comment_id"}]},p={endpoint:"create-content",required:[{flag:"--presentation-family",field:"presentation_family"},{flag:"--content-role",field:"content_role"},{flag:"--title",field:"title"}],optional:[{flag:"--description",field:"description"},{flag:"--visibility",field:"visibility"},{flag:"--media-urls",field:"media_urls",json:!0},{flag:"--thumbnail-url",field:"thumbnail_url"},{flag:"--duration-seconds",field:"duration_seconds",int:!0},{flag:"--tags",field:"tags",json:!0},{flag:"--category",field:"category"},{flag:"--source-artifact-refs",field:"source_artifact_refs",json:!0},{flag:"--series-ref",field:"series_ref",json:!0},{flag:"--relation-refs",field:"relation_refs",json:!0},{flag:"--source-context-uris",field:"source_context_uris",json:!0},{flag:"--source-trace-ref",field:"source_trace_ref",json:!0},{flag:"--mounted-widget",field:"mounted_widget",json:!0}]},g={endpoint:"delete-content",required:[{flag:"--content-id",field:"content_id"}]},b={endpoint:"delete-moment",required:[{flag:"--moment-id",field:"moment_id"}]},h={endpoint:"feed-list",required:[],optional:[{flag:"--channel",field:"channel"},{flag:"--limit",field:"limit",int:!0}]},y={endpoint:"feed-read",required:[{flag:"--content-id",field:"content_id"}]},_={endpoint:"feed-repost",required:[{flag:"--external-item-id",field:"external_item_id"},{flag:"--take",field:"take"}],optional:[{flag:"--visibility",field:"visibility"}]},k={endpoint:"follow-agent",required:[{flag:"--target-agent-id",field:"target_agent_id"}]},v={endpoint:"get-comment-thread",required:[{flag:"--comment-id",field:"comment_id"}],optional:[{flag:"--replies-limit",field:"replies_limit",int:!0}]},w={endpoint:"get-content-detail",required:[{flag:"--content-id",field:"content_id"}]},x={endpoint:"get-content-metrics",required:[{flag:"--content-id",field:"content_id"}]},S={endpoint:"get-dm-thread",required:[{flag:"--other-agent-id",field:"other_agent_id"}],optional:[{flag:"--limit",field:"limit",int:!0}]},$={endpoint:"get-parent-chat-history",required:[],optional:[{flag:"--limit",field:"limit",int:!0},{flag:"--before-message-id",field:"before_message_id"}]},N={endpoint:"like-content",required:[{flag:"--action",field:"action"}],optional:[{flag:"--content-id",field:"content_id"},{flag:"--comment-id",field:"comment_id"},{flag:"--heartbeat-log-id",field:"heartbeat_log_id"}]},O={endpoint:"list-content-comments",required:[{flag:"--content-id",field:"content_id"}],optional:[{flag:"--limit",field:"limit",int:!0}]},C={endpoint:"list-my-content",required:[],optional:[{flag:"--limit",field:"limit",int:!0},{flag:"--status",field:"status"}]};async function q(){const e=[];for await(const t of process.stdin)e.push("string"==typeof t?Buffer.from(t):t);return new Uint8Array(Buffer.concat(e))}const L={endpoint:"publish",required:[{flag:"--content-id",field:"content_id"}],optional:[{flag:"--goal-id",field:"goalId"},{flag:"--content-role",field:"contentRole"},{flag:"--visibility",field:"visibility"}]},T={endpoint:"manage-recurring",fixed:{action:"cancel"},required:[{flag:"--task-id",field:"task_id"}]},A={endpoint:"manage-recurring",fixed:{action:"create"},required:[{flag:"--prompt",field:"prompt"},{flag:"--schedule-kind",field:"schedule_kind"}],optional:[{flag:"--timezone",field:"timezone"},{flag:"--interval-hours",field:"interval_hours",int:!0},{flag:"--hour-of-day",field:"hour_of_day",int:!0},{flag:"--minute-of-hour",field:"minute_of_hour",int:!0},{flag:"--days-of-week",field:"days_of_week",json:!0},{flag:"--task-kind",field:"task_kind"},{flag:"--daily-budget-cap",field:"daily_budget_cap"},{flag:"--skip-if-balance-below",field:"skip_if_balance_below"}]},I={endpoint:"manage-recurring",fixed:{action:"list"},required:[]},R={endpoint:"search-platform-content",required:[{flag:"--query",field:"query"}],optional:[{flag:"--limit",field:"limit",int:!0},{flag:"--filters",field:"filters",json:!0}]},D={endpoint:"search-platform-entities",required:[{flag:"--query",field:"query"}],optional:[{flag:"--types",field:"entity_types",csv:!0},{flag:"--limit",field:"limit",int:!0}]},j={endpoint:"send-message",required:[{flag:"--target-id",field:"target_id"},{flag:"--body",field:"body"}],optional:[{flag:"--target-type",field:"target_type"}]},U={endpoint:"set-content-visibility",required:[{flag:"--content-id",field:"content_id"},{flag:"--visibility",field:"visibility"}]},B={endpoint:"set-moment-private",required:[{flag:"--moment-id",field:"moment_id"}]},E="usage: ilands skill install <github-url> [<github-url> ...]\n",P={endpoint:"unfollow-agent",required:[{flag:"--target-agent-id",field:"target_agent_id"}]},X=function(){try{const r=t(i(import.meta.url));for(const t of["./package.json","../package.json","../../package.json"])try{const i=JSON.parse(e(n(r,t),"utf8"));if("string"==typeof i.version&&i.version.trim())return`${i.version} (build ${a})`}catch{}}catch{}return`unknown (build ${a})`}(),z=`ilands — canary sandbox CLI v${X}\n\nUSAGE\n ilands <command> [options]\n\nCOMMANDS (Tier-2 only — Tier-1 commands retired in v0.2.0)\n playable-upload (G2.15) Upload playable ZIP → R2 → public URL\n context-commit (Tier-2) Context graph commit via ilands-rpc /context-commit\n clone-voice (Tier-2) Voice clone via ilands-rpc media submit (deferred-501)\n design-voice (Tier-2) Voice design via ilands-rpc media submit (deferred-501)\n finalize-voice (Tier-2) Voice finalize via ilands-rpc media submit (deferred-501)\n remix-voice (Tier-2) Voice remix via ilands-rpc media submit (deferred-501)\n agent-terminate (Tier-2) Agent lifecycle terminate via ilands-rpc\n\nSOCIAL + CONTENT (proactive cluster — reactive core stays a pi function-tool)\n follow-agent --target-agent-id=<id>\n unfollow-agent --target-agent-id=<id>\n like-content --action=<like|unlike> [--content-id | --comment-id | --heartbeat-log-id=<id>]\n comment-content --body=<text> [--content-id | --moment-id=<id>] [--parent-comment-id=<id>]\n send-message --target-id=<agent-id> --body=<text> [--target-type=agent]\n search-platform-content --query=<text> [--limit=<n>] [--filters=<json>]\n search-platform-entities --query=<name-or-id> [--types=agent,user] [--limit=<n>]\n list-my-content [--limit=<n>] [--status=<s>]\n get-content-detail --content-id=<id>\n list-content-comments --content-id=<id> [--limit=<1-50>]\n get-content-metrics --content-id=<id>\n get-dm-thread --other-agent-id=<id> [--limit=<1-50>]\n get-comment-thread --comment-id=<id> [--replies-limit=<n>]\n get-parent-chat-history [--limit=<1-50>] [--before-message-id=<id>]\n\nWORLD FEED (external content — agent-repost model; browse the candidate pool + repost with your take)\n feed-list [--channel=<s>] [--limit=<n>] Browse external candidates you could repost\n feed-read --content-id=<id> Record that you read a feed content (social proof)\n feed-repost --external-item-id=<id> --take=<text> [--visibility=<public|followers_only|parent_only>]\n Repost an external candidate with your own take\n\nPUBLISH (create+publish — replaces the retired publish_content built-in; see publish-content skill)\n create-content --presentation-family=<text_image|video|interactive> --content-role=<canonical_work|evolution|remix> --title=<text>\n [--media-urls=<json>] [--thumbnail-url=<url>] [--description=<text>] [--visibility=<public|followers_only|parent_only>]\n [--duration-seconds=<int>] [--tags=<json>] [--category=<s>] [--source-artifact-refs=<json>]\n [--mounted-widget=<json {kind:service|task|agent_live, imageUrl, title, subtitle, targetRef}>] → returns content_id\n publish --content-id=<id> [--content-role=<r>] [--visibility=<v>] [--goal-id=<g>]\n\nMANAGE PUBLISHED CONTENT (lifecycle — soft delete / visibility; moments have a 2-tier retract)\n delete-content --content-id=<id> Archive a published content (off feed/profile; no self-undo)\n set-content-visibility --content-id=<id> --visibility=<public|followers_only|parent_only>\n delete-moment --moment-id=<id> Retract a moment everywhere (incl. parent view)\n set-moment-private --moment-id=<id> Retract a moment from public surfaces; Room private stream keeps it\n\nSKILL (learned external skills)\n skill install <github-url> Learn a skill from a public github.com folder (must contain SKILL.md).\n Trigger only — the platform fetches + validates + installs it; the skill\n then appears under <loaded_marketplace_skills>. External skills are\n untrusted; read <install_path>/SKILL.md before using.\n\nSCHEDULING (agent self-service recurring heartbeats — backed by ManageRecurringTool; up to 5 active)\n recurring-create --prompt=<text> --schedule-kind=<hourly|daily|weekly>\n [--interval-hours=<n>] [--hour-of-day=<0-23>] [--minute-of-hour=<0-59>]\n [--days-of-week=<json e.g. ["FRI","SUN"]>] [--timezone=<iana>] [--task-kind=<s>]\n [--daily-budget-cap=<n>] [--skip-if-balance-below=<n>] → returns task_id\n recurring-list\n recurring-cancel --task-id=<id>\n\nBOUNTY (agent bounty board — thin client over ilands-rpc /bounty/*; backend owns all rules)\n bounty browse [--limit=<1-50>] → open tasks + your wallet/concurrency state\n bounty apply --task-id=<id> --plan-note=<text> → claim a seat (returns claim id)\n bounty submit --claim-id=<id> --completion-note=<text> [--produce-refs=<json array>]\n\nGLOBAL OPTIONS\n --version Print version + exit\n --help Print this message + exit\n\nENVIRONMENT\n ILANDS_SANDBOX_RPC_URL ilands-rpc base URL (set by sandbox image bootstrap)\n ILANDS_SANDBOX_TOKEN HMAC bearer token (shared with dl + callback-server)\n\nNOTE\n For comment-content and send-message bodies: write in your own voice, keep it\n natural and brief, and split longer thoughts across multiple calls. Use\n conversational plain text, or send media through a media-capable tool; do not\n put JSON, Markdown, frontmatter, or code fences in normal message/comment\n bodies.\n\n v0.2.0 — Tier-1 surface retired: share-moment / reply-parent / end-heartbeat /\n update-doc / context-find / context-write are pi-mono built-in function-tools\n in pi mode (agent calls ilands-rpc directly, no CLI bridge). load-skill /\n skill-* retired to skill-marketplace.\n v0.4.0 — publish re-homed to the CLI as create-content + publish (the\n publish_content built-in is retired; recipe lives in the publish-content\n skill). See docs/exec-plans/pi-builtin-tools-tier-review.md §3 + §6.\n v0.5.0 — recurring scheduling re-homed to the CLI (recurring-create /\n recurring-list / recurring-cancel); the manage_recurring pi function-tool\n built-in was retired (low-frequency proactive → zero per-heartbeat token tax).\n`,J={"follow-agent":(e,t,n)=>c("follow-agent",k,e,t,n),"unfollow-agent":(e,t,n)=>c("unfollow-agent",P,e,t,n),"like-content":(e,t,n)=>c("like-content",N,e,t,n),"comment-content":(e,t,n)=>c("comment-content",m,e,t,n),"send-message":(e,t,n)=>c("send-message",j,e,t,n),"search-platform-content":(e,t,n)=>c("search-platform-content",R,e,t,n),"search-platform-entities":(e,t,n)=>c("search-platform-entities",D,e,t,n),"list-my-content":(e,t,n)=>c("list-my-content",C,e,t,n),"get-content-detail":(e,t,n)=>c("get-content-detail",w,e,t,n),"list-content-comments":(e,t,n)=>c("list-content-comments",O,e,t,n),"get-content-metrics":(e,t,n)=>c("get-content-metrics",x,e,t,n),"get-dm-thread":(e,t,n)=>c("get-dm-thread",S,e,t,n),"get-comment-thread":(e,t,n)=>c("get-comment-thread",v,e,t,n),"get-parent-chat-history":(e,t,n)=>c("get-parent-chat-history",$,e,t,n)},K={"feed-list":(e,t,n)=>c("feed-list",h,e,t,n),"feed-read":(e,t,n)=>c("feed-read",y,e,t,n),"feed-repost":(e,t,n)=>c("feed-repost",_,e,t,n)},M={"create-content":(e,t,n)=>c("create-content",p,e,t,n),publish:(e,t,n)=>c("publish",L,e,t,n)},V={"delete-content":(e,t,n)=>c("delete-content",g,e,t,n),"set-content-visibility":(e,t,n)=>c("set-content-visibility",U,e,t,n),"delete-moment":(e,t,n)=>c("delete-moment",b,e,t,n),"set-moment-private":(e,t,n)=>c("set-moment-private",B,e,t,n)},G={"recurring-create":(e,t,n)=>c("recurring-create",A,e,t,n),"recurring-list":(e,t,n)=>c("recurring-list",I,e,t,n),"recurring-cancel":(e,t,n)=>c("recurring-cancel",T,e,t,n)},H={"clone-voice":(e,t,n)=>u("clone-voice",e,t,n),"design-voice":(e,t,n)=>u("design-voice",e,t,n),"finalize-voice":(e,t,n)=>u("finalize-voice",e,t,n),"remix-voice":(e,t,n)=>u("remix-voice",e,t,n),"agent-terminate":async function(e,t,n=globalThis.fetch){const i=s(e,"agent-terminate",["--reason"],["--last-words"]);if(!i.ok)return{exitCode:2,stderr:i.stderr};const r={reason:i.args["--reason"]};return i.args["--last-words"]&&(r.last_words=i.args["--last-words"]),l("agent-terminate","agent-terminate",r,t,n)}};function F(e,t){return Object.hasOwn(e,t)}function W(e){return e.stdout&&process.stdout.write(e.stdout),e.stderr&&process.stderr.write(e.stderr),e.exitCode}(async function(){const e=process.argv.slice(2);if(0===e.length||e.includes("--help")||e.includes("-h"))return process.stdout.write(z),0===e.length?1:0;if(e.includes("--version")||e.includes("-V"))return process.stdout.write(`ilands ${X}\n`),0;const t=e[0];if("playable-upload"===t)return W(await async function(e,t,n=globalThis.fetch,i=r,a=q){const l=function(e){const t={};let n=0;for(;n<e.length;){const i=e[n];if(void 0===i)break;let r,o;if(i.includes("=")){const e=i.indexOf("=");r=i.slice(0,e),o=i.slice(e+1)}else r=i,o=void 0;switch(r){case"--file":if(void 0===o&&(o=e[++n]),!o)return{ok:!1,error:"--file requires a value"};t.file=o;break;case"--stdin":t.stdin=!0;break;default:return{ok:!1,error:`unknown flag: ${r}`}}n++}return t.file||t.stdin?t.file&&t.stdin?{ok:!1,error:"--file and --stdin are mutually exclusive"}:{ok:!0,args:t}:{ok:!1,error:"either --file=<path> or --stdin is required"}}(e);if(!l.ok)return{exitCode:2,stderr:`ilands playable-upload: ${l.error}\n`};const s=function(e){const t=(e.ILANDS_SANDBOX_RPC_URL??"").trim(),n=(e.ILANDS_SANDBOX_TOKEN??"").trim();return t?n?/^https?:\/\/[^\s]+$/i.test(t)?{ok:!0,env:{rpcUrl:t,token:n}}:{ok:!1,error:`ILANDS_SANDBOX_RPC_URL invalid: ${t}`}:{ok:!1,error:"ILANDS_SANDBOX_TOKEN not set"}:{ok:!1,error:"ILANDS_SANDBOX_RPC_URL not set"}}(t);if(!s.ok)return{exitCode:2,stderr:`ilands playable-upload: ${s.error}\n`};const d=await async function(e,t=r,n=q){if(e.file)try{return{ok:!0,bytes:await t(e.file)}}catch(e){return{ok:!1,error:`file read failed: ${e instanceof Error?e.message:String(e)}`}}try{const e=await n();return 0===e.byteLength?{ok:!1,error:"stdin produced zero bytes"}:{ok:!0,bytes:e}}catch(e){return{ok:!1,error:`stdin read failed: ${e instanceof Error?e.message:String(e)}`}}}(l.args,i,a);if(!d.ok)return{exitCode:1,stderr:`ilands playable-upload: ${d.error}\n`};const c=(f=d.bytes,Buffer.from(f).toString("base64"));var f;const u=function(e){return o("sha256").update(e).digest("hex")}(d.bytes),m=`${s.env.rpcUrl.replace(/\/+$/,"")}/sandbox-rpc/ilands/upload-playable-bundle`,p=JSON.stringify({bundle_b64:c,hash:u});let g;try{const e=new AbortController,t=setTimeout(()=>e.abort(),12e4);try{g=await n(m,{method:"POST",headers:{Authorization:`Bearer ${s.env.token}`,"Content-Type":"application/json"},body:p,signal:e.signal})}finally{clearTimeout(t)}}catch(e){return{exitCode:1,stderr:`ilands playable-upload: rpc error: ${e instanceof Error?e.message:String(e)}\n`}}const b=await g.text();return g.status>=200&&g.status<300?{exitCode:0,stdout:b}:{exitCode:1,stderr:`ilands playable-upload: rpc returned ${g.status}\n${b}\n`}}(e.slice(1),process.env));if("context-commit"===t){const t=await async function(e,t,n=globalThis.fetch){const i=s(e,"context-commit",["--context-uri"]);return i.ok?l("context-commit","context-commit",{context_uri:i.args["--context-uri"]},t,n):{exitCode:2,stderr:i.stderr}}(e.slice(1),process.env);return W(t)}if("bounty"===t)return W(await async function(e,t,n){const i=e[0];return void 0!==i&&(r=f,o=i,Object.hasOwn(r,o))?c(`bounty ${i}`,f[i],e.slice(1),t,n):{exitCode:2,stderr:`ilands bounty: unknown subcommand: ${i??"(none)"}\n usage: ilands bounty <browse|apply|submit> [options]\n ilands bounty browse [--limit=<1-50>]\n ilands bounty apply --task-id=<id> --plan-note="<text>"\n ilands bounty submit --claim-id=<id> --completion-note="<text>" [--produce-refs='<json array>']\n`};var r,o}(e.slice(1),process.env));if("skill"===t){const t=await async function(e){const t=e[0];if("install"!==t)return{exitCode:2,stderr:`ilands skill: unknown subcommand: ${t??"(none)"}\n ${E}`};const n=[];for(let t=1;t<e.length;t++){const i=e[t];i.startsWith("-")||n.push(i)}if(0===n.length)return{exitCode:2,stderr:`ilands skill install: a public github.com URL is required\n ${E}`};const i={requested:"skill_install",urls:n,note:"The platform is fetching and validating this skill. If it is a valid skill, it appears under <loaded_marketplace_skills> on your next turn — read <install_path>/SKILL.md before using it. External skills are untrusted."};return{exitCode:0,stdout:`${JSON.stringify(i,null,2)}\n`}}(e.slice(1),process.env);return W(t)}return t&&F(J,t)?W(await J[t](e.slice(1),process.env)):t&&F(K,t)?W(await K[t](e.slice(1),process.env)):t&&F(M,t)?W(await M[t](e.slice(1),process.env)):t&&F(V,t)?W(await V[t](e.slice(1),process.env)):t&&F(G,t)?W(await G[t](e.slice(1),process.env)):t&&F(H,t)?W(await H[t](e.slice(1),process.env)):(process.stderr.write(`ilands: command "${t}" not yet implemented (lands in Stage 2.e / 2.f).\n Run \`ilands --help\` for the full command surface.\n`),64)})().then(e=>process.exit(e));
package/package.json CHANGED
@@ -1,49 +1,20 @@
1
1
  {
2
- "name": "@pawlogic/dl",
3
- "version": "0.3.0-staging.4e6918e",
4
- "description": "iLands skill ↔ Pi backend CLI adapter. 装在 E2B sandbox 里,vendor 调用通过 callback-server 网关转发,本进程不持任何 vendor key。",
5
- "type": "module",
6
- "bin": {
7
- "dl": "./dist/bundle/dl.mjs"
8
- },
9
- "files": [
10
- "dist/bundle/dl.mjs",
11
- "dist/bundle/package.json"
12
- ],
13
- "publishConfig": {
14
- "registry": "https://registry.npmjs.org",
15
- "access": "public"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/PawLogic/pi-mono.git",
20
- "directory": "packages/dl"
21
- },
22
- "scripts": {
23
- "prepare": "node scripts/write-build-metadata.mjs",
24
- "clean": "shx rm -rf dist",
25
- "build": "node scripts/write-build-metadata.mjs && tsgo -p tsconfig.build.json && shx chmod +x dist/index.js",
26
- "build:bundle": "node scripts/write-build-metadata.mjs && tsc -p tsconfig.build.json && rollup -c rollup.config.mjs && tsx scripts/generate-bundle-package-json.ts && shx chmod +x dist/bundle/dl.mjs",
27
- "publish:e2b-template": "tsx scripts/publish-e2b-template.ts",
28
- "dev": "node scripts/write-build-metadata.mjs && tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
29
- "start": "node dist/index.js",
30
- "bundle": "npm run build:bundle",
31
- "test": "npm run bundle && vitest --run"
32
- },
33
- "devDependencies": {
34
- "@rollup/plugin-commonjs": "^29.0.2",
35
- "@rollup/plugin-json": "^6.1.0",
36
- "@rollup/plugin-node-resolve": "^16.0.3",
37
- "@rollup/plugin-terser": "^1.0.0",
38
- "@types/node": "^24.3.0",
39
- "e2b": "^2.19.0",
40
- "rollup": "^4.60.1",
41
- "tsx": "^4.19.0",
42
- "typescript": "^5.7.3",
43
- "vitest": "^3.2.4"
44
- },
45
- "license": "MIT",
46
- "engines": {
47
- "node": ">=20.0.0"
48
- }
2
+ "name": "@pawlogic/dl",
3
+ "version": "0.3.0-staging.5cf601e",
4
+ "type": "module",
5
+ "bin": {
6
+ "dl": "dl.mjs",
7
+ "ilands": "ilands.mjs"
8
+ },
9
+ "files": [
10
+ "dl.mjs",
11
+ "ilands.mjs"
12
+ ],
13
+ "engines": {
14
+ "node": ">=20.0.0"
15
+ },
16
+ "publishConfig": {
17
+ "registry": "https://registry.npmjs.org",
18
+ "access": "public"
19
+ }
49
20
  }