@aipt/cli 0.1.26 → 0.1.30

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/dist/chunk.js CHANGED
@@ -1,11 +1,12 @@
1
- var h=Object.create;var u=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var O=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}};var v=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of w(n))!b.call(e,o)&&o!==t&&u(e,o,{get:()=>n[o],enumerable:!(r=C(n,o))||r.enumerable});return e};var N=(e,n,t)=>(t=e!=null?h(E(e)):{},v(n||!e||!e.__esModule?u(t,"default",{value:e,enumerable:!0}):t,e));var F="0.1.26",c={DEPENDENCIES_NOT_INSTALLED:4,VERIFIER_RUNTIME_INVALID:4},D=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/u;function f(e,n){return typeof e=="string"&&e.length>0&&e.length<=n&&!D.test(e)}function S(e){let n={schemaVersion:1,kind:"dyyto-cli-domain-error",code:e.code,message:e.message,exitCode:c[e.code],...e.nextStep===void 0?{}:{nextStep:e.nextStep}},t=m(n);if(t===null)throw new TypeError("CLI domain error input is invalid");return t}function m(e){try{if(typeof e!="object"||e===null||Object.getPrototypeOf(e)!==Object.prototype)return null;let n=Object.getOwnPropertyDescriptors(e);if(Reflect.ownKeys(n).some(i=>typeof i=="symbol"))return null;let t=Object.keys(n).sort(),r="nextStep"in n?["code","exitCode","kind","message","nextStep","schemaVersion"]:["code","exitCode","kind","message","schemaVersion"];if(t.length!==r.length||t.some((i,k)=>i!==r[k])||Object.values(n).some(i=>!("value"in i)))return null;let o=i=>n[i]?.value,a=o("code");if(o("schemaVersion")!==1||o("kind")!=="dyyto-cli-domain-error"||typeof a!="string"||!(a in c)||o("exitCode")!==c[a]||!f(o("message"),500))return null;let d=o("nextStep");return d!==void 0&&!f(d,500)?null:Object.freeze({schemaVersion:1,kind:"dyyto-cli-domain-error",code:a,message:o("message"),exitCode:4,...d===void 0?{}:{nextStep:d}})}catch{return null}}function T(e){if(e instanceof l&&e.domainError!==void 0)return e.domainError;try{if(typeof e!="object"||e===null)return null;let n=Object.getOwnPropertyDescriptor(e,"domainError");return n!==void 0&&"value"in n?m(n.value):null}catch{return null}}var l=class extends Error{code;exitCode;nextStep;domainError;constructor(n){super(n.message),this.name="CliError",this.code=n.code,this.exitCode=n.exitCode,this.nextStep=n.nextStep,this.domainError=n.code in c&&n.exitCode===c[n.code]?S({code:n.code,message:n.message,...n.nextStep===void 0?{}:{nextStep:n.nextStep}}):void 0}};var z=`Dyyto Engineering Platform CLI
1
+ var h=Object.create;var u=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var O=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}};var v=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of C(n))!b.call(e,o)&&o!==t&&u(e,o,{get:()=>n[o],enumerable:!(r=w(n,o))||r.enumerable});return e};var N=(e,n,t)=>(t=e!=null?h(E(e)):{},v(n||!e||!e.__esModule?u(t,"default",{value:e,enumerable:!0}):t,e));var F="0.1.30",c={DEPENDENCIES_NOT_INSTALLED:4,VERIFIER_RUNTIME_INVALID:4},D=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/u;function f(e,n){return typeof e=="string"&&e.length>0&&e.length<=n&&!D.test(e)}function j(e){let n={schemaVersion:1,kind:"dyyto-cli-domain-error",code:e.code,message:e.message,exitCode:c[e.code],...e.nextStep===void 0?{}:{nextStep:e.nextStep}},t=m(n);if(t===null)throw new TypeError("CLI domain error input is invalid");return t}function m(e){try{if(typeof e!="object"||e===null||Object.getPrototypeOf(e)!==Object.prototype)return null;let n=Object.getOwnPropertyDescriptors(e);if(Reflect.ownKeys(n).some(i=>typeof i=="symbol"))return null;let t=Object.keys(n).sort(),r="nextStep"in n?["code","exitCode","kind","message","nextStep","schemaVersion"]:["code","exitCode","kind","message","schemaVersion"];if(t.length!==r.length||t.some((i,k)=>i!==r[k])||Object.values(n).some(i=>!("value"in i)))return null;let o=i=>n[i]?.value,a=o("code");if(o("schemaVersion")!==1||o("kind")!=="dyyto-cli-domain-error"||typeof a!="string"||!(a in c)||o("exitCode")!==c[a]||!f(o("message"),500))return null;let d=o("nextStep");return d!==void 0&&!f(d,500)?null:Object.freeze({schemaVersion:1,kind:"dyyto-cli-domain-error",code:a,message:o("message"),exitCode:4,...d===void 0?{}:{nextStep:d}})}catch{return null}}function T(e){if(e instanceof l&&e.domainError!==void 0)return e.domainError;try{if(typeof e!="object"||e===null)return null;let n=Object.getOwnPropertyDescriptor(e,"domainError");return n!==void 0&&"value"in n?m(n.value):null}catch{return null}}var l=class extends Error{code;exitCode;nextStep;domainError;constructor(n){super(n.message),this.name="CliError",this.code=n.code,this.exitCode=n.exitCode,this.nextStep=n.nextStep,this.domainError=n.code in c&&n.exitCode===c[n.code]?j({code:n.code,message:n.message,...n.nextStep===void 0?{}:{nextStep:n.nextStep}}):void 0}};var z=`Dyyto Engineering Platform CLI
2
2
 
3
3
  Usage:
4
4
  dyyto <command> [options]
5
5
 
6
6
  Commands:
7
7
  dyyto bootstrap --project DIR [--apply] \u521D\u59CB\u5316\u5E76\u9501\u5B9AVibe Coding\u5DE5\u7A0B\u4E0A\u4E0B\u6587
8
- dyyto context --project DIR \u8F93\u51FA\u9762\u5411Agent\u7684\u7CBE\u7B80\u5DE5\u7A0B\u4E0A\u4E0B\u6587
8
+ dyyto context resolve --project DIR \u89E3\u6790\u5F53\u524D\u5206\u652F\u7684\u5185\u5BB9\u5BFB\u5740\u5DE5\u7A0B\u4E0A\u4E0B\u6587
9
+ dyyto ready --project DIR \u68C0\u67E5\u4E0A\u4E0B\u6587\u3001\u914D\u7F6E\u4E0E\u5DE5\u7A0B\u5F00\u53D1\u5C31\u7EEA\u72B6\u6001
9
10
  dyyto agents sync --project DIR [--apply] \u540C\u6B65\u591A\u7F16\u7801Agent\u9002\u914D\u5668
10
11
  dyyto agents remove --project DIR [--apply] \u5B89\u5168\u79FB\u9664\u53D7\u7BA1Agent\u9002\u914D\u5668
11
12
  dyyto docs show --id ID \u8BFB\u53D6npm\u5305\u5185\u7A33\u5B9A\u6587\u6863
@@ -17,8 +18,10 @@ Commands:
17
18
  dyyto build Run the template's supported build command
18
19
  dyyto test Run the template's supported test command
19
20
  dyyto package Build a local package artifact without publishing
20
- dyyto package publish \u5C06\u901A\u7528\u80FD\u529BPackage\u6253\u5305\u5E76\u53D1\u5E03\u81F3\u79C1\u6709\u6216\u516C\u5F00Registry
21
- dyyto publish (\u522B\u540D) \u5C06\u901A\u7528\u80FD\u529BPackage\u53D1\u5E03\u81F3Registry
21
+ dyyto package publish plan \u751F\u6210\u79C1\u6709/\u516C\u5F00Registry\u5171\u7528\u7684\u4E0D\u53EF\u53D8\u53D1\u5E03Plan
22
+ dyyto package publish apply \u4F7F\u7528--approve\u5E94\u7528\u5DF2\u6279\u51C6Plan
23
+ dyyto package publish inspect \u590D\u9A8C\u8FDC\u7A0B\u7248\u672C\u3001integrity\u4E0E\u53D1\u5E03\u72B6\u6001
24
+ dyyto publish package publish\u7684\u517C\u5BB9\u522B\u540D\uFF0C\u540C\u6837\u5FC5\u987B\u4F7F\u7528plan/apply/inspect
22
25
  dyyto artifacts Build, inspect, serve, or remove a development artifact bundle
23
26
  dyyto catalog search \u641C\u7D22\u5DF2\u6821\u9A8C\u7684 Capability \u4E0E PackageRelease
24
27
  dyyto catalog show \u6309\u4E0D\u53EF\u53D8 ref \u5C55\u793A\u5B8C\u6574\u53D1\u884C\u4E8B\u5B9E
@@ -29,6 +32,7 @@ Commands:
29
32
  dyyto integrations Audit packages, imports, code assets, evidence, and drift
30
33
  dyyto maintenance Inspect standard commands, environment readiness, and validation modes
31
34
  dyyto config inspect \u4ECEApplicationConfigBinding\u5B89\u5168\u6295\u5F71\u72EC\u7ACBAPP_CONFIG_DIR
35
+ dyyto config readiness \u68C0\u67E5\u5355\u4E2A\u5E94\u7528\u6216\u5DE5\u4F5C\u533A\uFF1A--project DIR | --workspace DIR [--check]
32
36
  dyyto operations Query change, quality, or delivery operation history
33
37
  dyyto add package Add a managed npm package to a workspace
34
38
  dyyto add application Add a managed Node, Web, Next.js, or Expo application to a workspace
@@ -53,4 +57,4 @@ Options:
53
57
  --json Emit one machine-readable JSON object
54
58
  --help Show help
55
59
  --version Show version
56
- `;import{lstat as x,readFile as A,readdir as I}from"node:fs/promises";import p from"node:path";var g={"workspace-node-application":"foundation.workspace-node-application@1.1.0","workspace-web-application":"foundation.workspace-web-application@1.1.0","workspace-expo-application":"foundation.workspace-expo-application@1.0.0","nextjs-full-stack-application":"foundation.nextjs-full-stack-application@1.0.0"};function j(e,n="package"){let t=n==="fixture"?"fixtures":"packages";return new RegExp(`^${t}/[a-z0-9][a-z0-9._-]*$`).test(e)?void 0:`Package path must be exactly ${t}/<lowercase-slug>.`}function P(e,n,t){if(!(n in g))return"Add application requires a supported --profile.";let r=g[n];if(t!==r)return`Add application with profile ${n} requires --capability ${r}.`;if(!/^apps\/[a-z0-9][a-z0-9._-]*$/.test(e))return/^services\/[a-z0-9][a-z0-9._-]*$/.test(e)?n==="workspace-node-application"?void 0:"Service applications require profile workspace-node-application.":"Application path must be exactly apps/<lowercase-slug> or services/<lowercase-slug>."}function s(e,n){let t=e.indexOf(n);return t<0?void 0:e[t+1]}async function y(e,n,t){for(let r of await I(p.join(e,n),{withFileTypes:!0}).catch(()=>[]))if(!(!r.isDirectory()||r.isSymbolicLink()))try{if(JSON.parse(await A(p.join(e,n,r.name,"project-capabilities.json"),"utf8")).profile?.parameters?.name===t)return!0}catch(o){if(o.code!=="ENOENT")throw o}return!1}async function R(e,n){return await y(e,"apps",n)||await y(e,"services",n)}async function B(e){if(e[0]!=="add")return;let n=s(e,"--path");if(n===void 0)return;let t=s(e,"--workspace"),r=s(e,"--name");if(e[1]==="package"){let a=s(e,"--kind")==="fixture"?"fixture":"package",d=j(n,a);return d!==void 0||t===void 0||r===void 0?d:await x(p.join(t,"package.json")).then(i=>i.isFile()).catch(()=>!1)?await y(t,a==="fixture"?"fixtures":"packages",r)?"A workspace package already uses this npm name.":void 0:"Workspace root must be applied and free of drift before adding a package."}if(e[1]!=="application")return;let o=P(n,s(e,"--profile")??"workspace-node-application",s(e,"--capability"));return o!==void 0||t===void 0||r===void 0?o:await x(p.join(t,"package.json")).then(a=>a.isFile()).catch(()=>!1)?await R(t,r)?"A workspace application already uses this name.":void 0:"Workspace root must be applied and free of drift before adding an application."}export{O as a,N as b,F as c,T as d,l as e,z as f,j as g,P as h,y as i,R as j,B as k};
60
+ `;import{lstat as x,readFile as R,readdir as A}from"node:fs/promises";import p from"node:path";var g={"workspace-node-application":"foundation.workspace-node-application@1.1.0","workspace-web-application":"foundation.workspace-web-application@1.1.0","workspace-expo-application":"foundation.workspace-expo-application@1.0.0","nextjs-full-stack-application":"foundation.nextjs-full-stack-application@1.0.0"};function S(e,n="package"){let t=n==="fixture"?"fixtures":"packages";return new RegExp(`^${t}/[a-z0-9][a-z0-9._-]*$`).test(e)?void 0:`Package path must be exactly ${t}/<lowercase-slug>.`}function P(e,n,t){if(!(n in g))return"Add application requires a supported --profile.";let r=g[n];if(t!==r)return`Add application with profile ${n} requires --capability ${r}.`;if(!/^apps\/[a-z0-9][a-z0-9._-]*$/.test(e))return/^services\/[a-z0-9][a-z0-9._-]*$/.test(e)?n==="workspace-node-application"?void 0:"Service applications require profile workspace-node-application.":"Application path must be exactly apps/<lowercase-slug> or services/<lowercase-slug>."}function s(e,n){let t=e.indexOf(n);return t<0?void 0:e[t+1]}async function y(e,n,t){for(let r of await A(p.join(e,n),{withFileTypes:!0}).catch(()=>[]))if(!(!r.isDirectory()||r.isSymbolicLink()))try{if(JSON.parse(await R(p.join(e,n,r.name,"project-capabilities.json"),"utf8")).profile?.parameters?.name===t)return!0}catch(o){if(o.code!=="ENOENT")throw o}return!1}async function I(e,n){return await y(e,"apps",n)||await y(e,"services",n)}async function B(e){if(e[0]!=="add")return;let n=s(e,"--path");if(n===void 0)return;let t=s(e,"--workspace"),r=s(e,"--name");if(e[1]==="package"){let a=s(e,"--kind")==="fixture"?"fixture":"package",d=S(n,a);return d!==void 0||t===void 0||r===void 0?d:await x(p.join(t,"package.json")).then(i=>i.isFile()).catch(()=>!1)?await y(t,a==="fixture"?"fixtures":"packages",r)?"A workspace package already uses this npm name.":void 0:"Workspace root must be applied and free of drift before adding a package."}if(e[1]!=="application")return;let o=P(n,s(e,"--profile")??"workspace-node-application",s(e,"--capability"));return o!==void 0||t===void 0||r===void 0?o:await x(p.join(t,"package.json")).then(a=>a.isFile()).catch(()=>!1)?await I(t,r)?"A workspace application already uses this name.":void 0:"Workspace root must be applied and free of drift before adding an application."}export{O as a,N as b,F as c,T as d,l as e,z as f,S as g,P as h,y as i,I as j,B as k};