Lines 116-160javascript
116`};delete t.items,Object.assign(t,{type:n,source:e,end:[s]});break}default:{let r="indent"in t?t.indent:-1,s="end"in t&&Array.isArray(t.end)?t.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(t))i!=="type"&&i!=="offset"&&delete t[i];Object.assign(t,{type:n,indent:r,source:e,end:s})}}}Or.createScalarToken=Bh;Or.resolveAsScalar=Fh;Or.setScalarValue=Kh});var Il=w(Ll=>{"use strict";var Wh=t=>"type"in t?Tr(t):Nr(t);function Tr(t){switch(t.type){case"block-scalar":{let e="";for(let n of t.props)e+=Tr(n);return e+t.source}case"block-map":case"block-s ...
118`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}z.createScalarToken=qi.createScalarToken;z.resolveAsSca ...
119`:case"\r":case" ":return!0;default:return!1}}var Dl=new Set("0123456789ABCDEFabcdef"),Xh=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Cr=new Set(",[]{}"),Zh=new Set(` ,[]{}
120\r `),Fi=t=>!t||Zh.has(t),Bi=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
121`?!0:n==="\r"?this.buffer[e+1]===`
122`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){let s=this.buffer[r+e+1];if(s===`
123`||!s&&!this.atEnd)return e+r+1}return n===`
124`||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&oe(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
125`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yi ...
126`,this.pos);if(s!==-1){for(;s!==-1;){let i=this.continueScalar(s+1);if(i===-1)break;s=r.indexOf(`
127`,i)}s!==-1&&(n=s-(r[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.
128`:e=i,n=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar"
129`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?
130`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1
131`;)r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&
132`&&i>=this.pos&&i+1+n>a)e=i;else break}while(!0);return yield dn.SCALAR,yield*this.pushToIndex(e
134`,i=this.buffer[r+1]):n=r),i==="#"||e&&Cr.has(i))break;if(s===`
135`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&Cr.has(s))break;n
136`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
137`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");let s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};Ml.Lexer=Bi});var Wi=w(Fl=>{"use strict";var Ui=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){let i=n+r>>1;this.lineStarts[i]<e?n=i+1:r=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0) ...
138`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
139`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];
140`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
141`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start ...
142
HighChild Process
Package source references child process execution.
dist/install/runtime.mjsView on unpkg · L140 143... [truncated ${n.length-e} chars] ...
145${n.slice(-r)}`}async function G(t,e,n={}){let{cwd:r=process.cwd(),input:s="",
146${t}`,b=yn(e.loopType)||(/closed loop|目标完成后.*结束|完成后自动结束|达成.*停止/i.test(y)?"closed":"open");return{purpose:Hi(c,260),outcome:Hi(h,260),loopType:b==="closed"?"closed":"open",owner:yn(e.owner)||"project-owner",inputs:f.slice(0,8),outputs:u.slice(0,8),steps:g,safety:d,currentUnderstanding:Hi(Yi(r),300),maturity:yn(e.maturity)||(g.length>=3?"sop":"exploration")}}function su(t,e){let r=new RegExp(`^##\\s+${lu(e)}\\s*$`,"mi").exec(t);if(!r)return"";let s=r.index+r[0].length,i=t.slice(s),o=i.search(/^##\s+/m);return(o>=0?i.slice(0,o):i).trim()}function $r(t,e){for(let n of e){let s=new RegExp(`^###\\s+ ...
147`).map(e=>/^\s*[-*+]\s+(.+)$/.exec(e)?.[1]).filter(Boolean).map(Ze)}function zi(t){return String(t||"").split(`
148`).map(e=>/^\s*\d+[.)]\s+(.+)$/.exec(e)?.[1]).filter(Boolean).map(Ze)}function ou(t){return/扫描|读取|收集|写入|写回|更新|同步|归档|执行命令|生成/.test(t)?"script":/(?:由|交给|等待)(?:用户|人工).*(?:审批|拍板|确认|决策|选择|补充)|(?:用户|人工).*(?:审批|拍板|确认|决策|选择|补充)|人工介入/.test(t)?"human":/验证|测试|校验|检查|证明|复核/.test(t)?"verify":"agent"}function cu(t){if(t&&typeof t=="object"&&!Array.isArray(t)){let n=Ze(t.label||t.name||"");if(!n)return null;let r=["script","agent","human","verify"].includes(t.role)?t.role:ou(n);return{label:n,role:r}}let e=Ze(t);return e?{label:e,role:ou(e)}:null}function Ze(t){return String(t||"").replace(/`([^`]+)`/g,"$1"). ...
HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/install/runtime.mjsView on unpkg · L136 HighTrigger Reachable Command Output Exfiltration
A manifest entrypoint or package-local install chain reaches command-output exfiltration behavior.
dist/install/runtime.mjsView on unpkg · L136 149`)})}async function Ug(t,e=eo[t],n={}){if(!e)return null;let r=n.platform||process.platform,s={...process.env,...n.env||{}},i=n.pathModule||(r==="win32"?bn.win32:bn),o=i.delimiter,a=i.join(Zi,"node_modules",".bin"),c={...s,PATH:[a,s.PATH].filter(Boolean).join(o)},l=process.env[`ASTRAWORKS_ACP_${String(t||"").toUpperCase()}_BIN`],f=l&&await Gg(l)?l:await Ot(Jg(t,e.command,{platform:r,env:s,pathModule:i}),{platform:r,env:c,pathModule:i,pathDelimiter:o});return f?{command:f,args:mu(e.args)}:null}function mu(t){return Array.isArray(t)?t.map(String):[]}async function Wg(t,e){let n=await F(Dr,{});n[ ...
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/install/runtime.mjsView on unpkg · L140 150${n.stderr||""}`;return n.code===0&&/(?:-p,\s*--print|--print\b)/.test(r)}async function Qg(t,e=[["--version"],["-v"]]){for(let n of e){let r=await
151`),s=null;for(let i of r){let o=/^(\w[\w-]*)\s*:\s*(.*)$/.exec(i);if(o&&!i.startsWith(" ")&&!i.startsWith(" ")){s=o[1];let a=o[2].trim().replace(/^["']|["']$/g,"");a&&(e[s]=a)}else if(s&&/^\s+(\w[\w-]*)\s*:\s*(.*)$/.test(i)){let a=/^\s+(\w[\w-]*)\s*:\s*(.*)$/.exec(i);if(a){(!e[s]||typeof e[s]=="string")&&(e[s]={});let c=a[2].trim().replace(/^["']|["']$/g,"");c&&(e[s][a[1]]=c)}}}return e}function Zg(t){if(t===!0||t==="true")return!0;if(t===!1||t==="false")return!1}async function ey(t,e={}){let n=X(e.projectRoot),r=xr(n),s=await V(r.contentReadme(t));if(!s)throw new Error(`Loop
153## AstraWorks \u5DE5\u4F5C\u5F15\u64CE
155\u5F53\u524D\u76EE\u5F55\u662F\u4E00\u4E2A\u7531 AstraWorks \u7BA1\u7406\u7684\u4E1A\u52A1\u95ED\u73AF\u3002\u5728\u672C\u9879\u76EE\u5185\u5904\u7406\u4EFB\u4F55\u8BF7\u6C42\u65F6\uFF0C\u5FC5\u987B\u5148\u8FDB\u5165 AstraWorks \u9879\u76EE\u4E0A\u4E0B\u6587\uFF0C\u5E76\u9075\u5FAA\u672C\u8282\u5DE5\u4F5C\u534F\u8BAE\uFF1B\u4E0D\u80FD\u628A\u5DE5\u4F5C\u5F15\u64CE\u5F53\u4F5C\u53EF\u9009\u7684\u8BB0\u5F55\u5DE5\u5177\u3002
157### \u6BCF\u6B21\u5F00\u59CB\u5DE5\u4F5C
1591. \u5B9A\u4F4D\u5305\u542B \`.astraworks/project.yaml\` \u7684\u9879\u76EE\u6839\u76EE\u5F55\uFF1B\u540E\u7EED Engine \u547D\u4EE4\u59CB\u7EC8\u663E\u5F0F\u4F20\u5165 \`--project <root>\`\u3002
1602. \u8BFB\u53D6 \`.astraworks/project.yaml\` \u548C \`.astraworks/capabilities.json\`\uFF0C\u786E\u8BA4\u9879\u76EE\u8EAB\u4EFD\u3001\u5DF2\u542F\u7528 Agent\u3001Skill\u3001Loop \u4E0E\u80FD\u529B\u8FB9\u754C\u3002
Long lines were clipped for display.