@aipt/cli 0.1.38 → 0.1.40

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,4 +1,4 @@
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.38",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 s=o("nextStep");return s!==void 0&&!f(s,500)?null:Object.freeze({schemaVersion:1,kind:"dyyto-cli-domain-error",code:a,message:o("message"),exitCode:4,...s===void 0?{}:{nextStep:s}})}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
1
+ var h=Object.create;var u=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var O=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}};var b=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of v(n))!E.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(C(e)):{},b(n||!e||!e.__esModule?u(t,"default",{value:e,enumerable:!0}):t,e));var F="0.1.40",c={DEPENDENCIES_NOT_INSTALLED:4,VERIFIER_RUNTIME_INVALID:4},S=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/u;function f(e,n){return typeof e=="string"&&e.length>0&&e.length<=n&&!S.test(e)}function D(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 s=o("nextStep");return s!==void 0&&!f(s,500)?null:Object.freeze({schemaVersion:1,kind:"dyyto-cli-domain-error",code:a,message:o("message"),exitCode:4,...s===void 0?{}:{nextStep:s}})}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]?D({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]
@@ -8,6 +8,9 @@ Commands:
8
8
  dyyto context resolve --project DIR \u89E3\u6790\u5F53\u524D\u5206\u652F\u7684\u5185\u5BB9\u5BFB\u5740\u5DE5\u7A0B\u4E0A\u4E0B\u6587
9
9
  dyyto ready --project DIR \u68C0\u67E5\u4E0A\u4E0B\u6587\u3001\u914D\u7F6E\u4E0E\u5DE5\u7A0B\u5F00\u53D1\u5C31\u7EEA\u72B6\u6001
10
10
  dyyto dev session start|show|finish \u7BA1\u7406\u76F4\u63A5\u5F00\u53D1\u4E0E\u9700\u6C42\u4EFB\u52A1\u5171\u7528\u7684\u5F00\u53D1 Session
11
+ dyyto dev specify --input FILE \u751F\u6210\u5E76\u5E94\u7528 Spec\u3001Plan \u4E0E TaskSet
12
+ dyyto dev knowledge release \u53D1\u5E03\u5F53\u524D revision \u7684\u9886\u57DF\u4E0E\u4EA7\u54C1\u77E5\u8BC6
13
+ dyyto dev verify \u9A8C\u8BC1 Session\u3001\u89C4\u683C\u3001\u77E5\u8BC6\u4E0E Agent \u4E0A\u4E0B\u6587
11
14
  dyyto agents sync --project DIR [--apply] \u540C\u6B65\u591A\u7F16\u7801Agent\u9002\u914D\u5668
12
15
  dyyto agents remove --project DIR [--apply] \u5B89\u5168\u79FB\u9664\u53D7\u7BA1Agent\u9002\u914D\u5668
13
16
  dyyto docs show --id ID \u8BFB\u53D6npm\u5305\u5185\u7A33\u5B9A\u6587\u6863
@@ -58,4 +61,4 @@ Options:
58
61
  --json Emit one machine-readable JSON object
59
62
  --help Show help
60
63
  --version Show version
61
- `;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 d(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=d(e,"--path");if(n===void 0)return;let t=d(e,"--workspace"),r=d(e,"--name");if(e[1]==="package"){let a=d(e,"--kind")==="fixture"?"fixture":"package",s=S(n,a);return s!==void 0||t===void 0||r===void 0?s: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,d(e,"--profile")??"workspace-node-application",d(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};
64
+ `;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 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 d(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 $(e){if(e[0]!=="add")return;let n=d(e,"--path");if(n===void 0)return;let t=d(e,"--workspace"),r=d(e,"--name");if(e[1]==="package"){let a=d(e,"--kind")==="fixture"?"fixture":"package",s=j(n,a);return s!==void 0||t===void 0||r===void 0?s: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,d(e,"--profile")??"workspace-node-application",d(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,j as g,P as h,y as i,I as j,$ as k};
@@ -0,0 +1,29 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "PackageRelease",
4
+ "packageName": "@aipt/cli",
5
+ "version": "0.1.39",
6
+ "title": "Dyyto CLI",
7
+ "summary": "Dyyto 无服务工程能力目录、规划、应用与验证 CLI。",
8
+ "maturity": "candidate",
9
+ "source": {
10
+ "repository": "urn:idp:repository:dyyto",
11
+ "path": "apps/cli",
12
+ "revision": "working-tree",
13
+ "treeDigest": "sha256:533697ab14314b4ebce33735889cf2f58a12df45b8892b8400faef07b87e61ab"
14
+ },
15
+ "artifact": null,
16
+ "compatibility": {
17
+ "node": ">=24.18.0 <25",
18
+ "packageManager": "pnpm@11.21.0"
19
+ },
20
+ "exports": [],
21
+ "documentation": {
22
+ "readme": "apps/cli/README.md",
23
+ "knowledgeRef": "tech://engineering-capabilities/dyyto/cli"
24
+ },
25
+ "consumerEvidence": [
26
+ "apps/cli/src/distribution.test.ts"
27
+ ],
28
+ "releaseDigest": "sha256:6934f6bc4bc7d82ba8a2309bc6e55e69d10209303071d1f2116377a9b3717bf0"
29
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "PackageRelease",
4
+ "packageName": "@aipt/idp-setup",
5
+ "version": "0.1.12",
6
+ "title": "IDP Sources Setup CLI",
7
+ "summary": "IDP Sources 本地工程环境与外部 Config Dir 初始化 CLI。",
8
+ "maturity": "candidate",
9
+ "source": {
10
+ "repository": "urn:idp:repository:dyyto",
11
+ "path": "apps/idp-setup",
12
+ "revision": "working-tree",
13
+ "treeDigest": "sha256:ccfad858319236f33fb28ac1608876a80fd667a218406dcf65b948b390669b92"
14
+ },
15
+ "artifact": null,
16
+ "compatibility": {
17
+ "node": ">=22.14.0",
18
+ "packageManager": "pnpm@11.21.0"
19
+ },
20
+ "exports": [],
21
+ "documentation": {
22
+ "readme": "apps/idp-setup/README.md",
23
+ "knowledgeRef": "tech://engineering-capabilities/idp/setup"
24
+ },
25
+ "consumerEvidence": [
26
+ "apps/idp-setup/test/distribution.test.mjs",
27
+ "apps/idp-setup/test/idp-setup.test.mjs",
28
+ "tooling/idp-setup.test.mjs"
29
+ ],
30
+ "releaseDigest": "sha256:edfd50114eafb73a8249ea1fb15ce13fdb76372ef3a992423bc239750bccf85d"
31
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "PackageRelease",
4
+ "packageName": "@aipt/platform-kernel",
5
+ "version": "0.1.13",
6
+ "title": "Dyyto 工程能力内核",
7
+ "summary": "Dyyto 工程能力采用内核与不可变事实契约。",
8
+ "maturity": "candidate",
9
+ "source": {
10
+ "repository": "urn:idp:repository:dyyto",
11
+ "path": "packages/kernel",
12
+ "revision": "working-tree",
13
+ "treeDigest": "sha256:7340914e10d4f161c7f210bcfdab87fce5ec155f9784f3ac0f6da81e4732f601"
14
+ },
15
+ "artifact": null,
16
+ "compatibility": {
17
+ "node": ">=24.18.0 <25",
18
+ "packageManager": "pnpm@11.21.0"
19
+ },
20
+ "exports": [
21
+ ".",
22
+ "./testing"
23
+ ],
24
+ "documentation": {
25
+ "readme": "packages/kernel/README.md",
26
+ "knowledgeRef": "tech://engineering-capabilities/dyyto/kernel"
27
+ },
28
+ "consumerEvidence": [
29
+ "apps/cli/src",
30
+ "fixtures"
31
+ ],
32
+ "releaseDigest": "sha256:5877e509c6ed498d769c65deb41ce0fce96436e825967f62c505a61712fc2b4a"
33
+ }
package/docs/bootstrap.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # Bootstrap
2
2
 
3
- 每台机器先执行一次 `corepack pnpm dlx @aipt/idp-setup@0.1.11 init --root <Sources绝对目录>`,由它生成并持久化 `sources.env`、建立稳定 `PNPM_HOME`、安装精确工具链。每个工作区或独立项目执行一次 `idp-setup bootstrap --project <绝对目录>`,统一完成 Dyyto 工程纳管、`apps/*`、`services/*` 可部署 Application Config Dir 初始化以及 Development Readiness 检查。直接使用 `dyyto bootstrap` 是高级入口,要求环境已有绝对 `PNPM_HOME`;离线环境可使用 `--skip-tool-install`。
3
+ 每台机器先执行一次 `corepack pnpm dlx @aipt/idp-setup@0.1.13 init --root <Sources绝对目录>`,由它生成并持久化 `sources.env`、建立稳定 `PNPM_HOME`、安装精确工具链。每个工作区或独立项目执行一次 `idp-setup bootstrap --project <绝对目录>`,统一完成 Dyyto 工程纳管、`apps/*`、`services/*` 可部署 Application Config Dir 初始化以及 Development Readiness 检查。直接使用 `dyyto bootstrap` 是高级入口,要求环境已有绝对 `PNPM_HOME`;离线环境可使用 `--skip-tool-install`。
@@ -3,7 +3,7 @@
3
3
  业务项目只保留短入口规则,不复制平台规范全文。首次接入执行:
4
4
 
5
5
  ```bash
6
- corepack pnpm dlx @aipt/idp-setup@0.1.11 init --root /absolute/sources
6
+ corepack pnpm dlx @aipt/idp-setup@0.1.13 init --root /absolute/sources
7
7
  source /absolute/sources/config/idp/generated/sources.env
8
8
  idp-setup bootstrap --project "$PWD"
9
9
  ```
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@aipt/cli",
4
- "version": "0.1.38",
4
+ "version": "0.1.40",
5
5
  "documents": [
6
- { "id": "bootstrap", "path": "docs/bootstrap.md", "digest": "sha256:86256af339ea00dd0a6a93ba96b134dd929453e36c096a86e8a445e9aa30eb46" },
6
+ { "id": "bootstrap", "path": "docs/bootstrap.md", "digest": "sha256:6c8c79fd71bca67003c439c3ce78db9a5ee884c5f973fbd1027d9628d20b98fd" },
7
7
  { "id": "agent-integration", "path": "docs/agent-integration.md", "digest": "sha256:6b3e9425bd5caf233971bc27dc2ef765bd1e9b92a049d3a394e075ed80c0863f" },
8
8
  { "id": "engineering-workflow", "path": "docs/engineering-workflow.md", "digest": "sha256:2f3072966d33b97b69c528b9db8ecb0dee0b6d1a36e2841f15b535ec2c802abb" },
9
- { "id": "vibe-coding-guide", "path": "docs/vibe-coding-guide.md", "digest": "sha256:82f660ef96c3f53f5436ab41faffc60f2f93fbba8d8e1269cde83431cf77e2c1" },
9
+ { "id": "vibe-coding-guide", "path": "docs/vibe-coding-guide.md", "digest": "sha256:e2f5831b53b3afc3c7a9ecd6cbccb83494d0992acbd2666ecb50257ec405dbb7" },
10
10
  { "id": "dyyto-command-reference", "path": "docs/command-reference.md", "digest": "sha256:6b2ab66dd71e2c2528529314e1f2bee24633ba4455af629e505742add31a1f88" },
11
11
  { "id": "toolchain-troubleshooting", "path": "docs/troubleshooting.md", "digest": "sha256:2040de770d2c2bd81eea709185e913afd6d6cf4c78f1e30c82e6bcb42b066de9" }
12
12
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipt/cli",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Dyyto 无服务工程能力目录、规划、应用与验证 CLI。",
5
5
  "type": "module",
6
6
  "bin": {