@aipt/cli 0.1.13 → 0.1.15

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.
@@ -2,12 +2,12 @@
2
2
  "schemaVersion": 1,
3
3
  "capabilityId": "foundation.application-config-binding",
4
4
  "version": "1.0.0",
5
- "integrity": "sha256:7ac10b8d2a8425cdcb810b9efb9767c7b509ea2809c1a2bd67fc8aa69b75c99e",
5
+ "integrity": "sha256:4cf5ad5836fd3d6c2a6273e2acbad320b7b9bb068d2340bb41733077fb10b999",
6
6
  "consumerProfile": "any-project",
7
7
  "kind": "engineering-feature",
8
8
  "dependencies": {
9
9
  "profiles": ["nextjs-full-stack-application", "workspace-node-application", "workspace-web-application"],
10
- "capabilities": [{ "capabilityId": "foundation.environment-schema", "version": "2.0.0" }]
10
+ "capabilities": ["foundation.environment-schema"]
11
11
  },
12
12
  "compatibility": { "node": ">=24.18.0 <25", "pnpm": "11.21.0", "typescript": "6.0.3" },
13
13
  "integration": {
package/dist/chunk.js CHANGED
@@ -1,9 +1,13 @@
1
- var h=Object.create;var y=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var I=(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 C(n))!v.call(e,o)&&o!==t&&y(e,o,{get:()=>n[o],enumerable:!(r=w(n,o))||r.enumerable});return e};var R=(e,n,t)=>(t=e!=null?h(E(e)):{},b(n||!e||!e.__esModule?y(t,"default",{value:e,enumerable:!0}):t,e));var F="0.1.13",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 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 _=`Dyyto Engineering Platform CLI
1
+ var h=Object.create;var y=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var R=(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&&y(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?y(t,"default",{value:e,enumerable:!0}):t,e));var F="0.1.15",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 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]?D({code:n.code,message:n.message,...n.nextStep===void 0?{}:{nextStep:n.nextStep}}):void 0}};var _=`Dyyto Engineering Platform CLI
2
2
 
3
3
  Usage:
4
4
  dyyto <command> [options]
5
5
 
6
6
  Commands:
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
9
+ dyyto agents sync --project DIR [--apply] \u540C\u6B65\u591A\u7F16\u7801Agent\u9002\u914D\u5668
10
+ dyyto docs show --id ID \u8BFB\u53D6npm\u5305\u5185\u7A33\u5B9A\u6587\u6863
7
11
  dyyto create Initialize a project manifest and plan
8
12
  dyyto scaffold example Plan or apply a Catalog-driven example under .examples
9
13
  dyyto retrofit Safely initialize a manifest in an existing pnpm workspace
@@ -46,4 +50,4 @@ Options:
46
50
  --json Emit one machine-readable JSON object
47
51
  --help Show help
48
52
  --version Show version
49
- `;import{lstat as x,readFile as A,readdir as N}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 D(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 u(e,n,t){for(let r of await N(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 O(e,n){return await u(e,"apps",n)||await u(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=D(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 u(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 O(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{I as a,R as b,F as c,T as d,l as e,_ as f,D as g,P as h,u as i,O as j,B as k};
53
+ `;import{lstat as x,readFile as I,readdir as O}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 u(e,n,t){for(let r of await O(p.join(e,n),{withFileTypes:!0}).catch(()=>[]))if(!(!r.isDirectory()||r.isSymbolicLink()))try{if(JSON.parse(await I(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 A(e,n){return await u(e,"apps",n)||await u(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 u(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 A(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{R as a,N as b,F as c,T as d,l as e,_ as f,j as g,P as h,u as i,A as j,B as k};
@@ -0,0 +1,29 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "PackageRelease",
4
+ "packageName": "@aipt/cli",
5
+ "version": "0.1.14",
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:b6af81f197223d292c5401818c36cdd8f3f3d8220713eedc1c32e98d35802cc0"
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:166fcead1f96c5f7732a08cb7131972e66b2c06e82eef6b96bcc23c28b6ac28b"
29
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "PackageRelease",
4
+ "packageName": "@aipt/cli",
5
+ "version": "0.1.15",
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:067dd429b79f19293d07d4403b81c55bf9b89cbda27e72b1787f3f8e762443de"
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:f61ba6c9e499df63bf5a278bd49fb9e55df334dd7bebc9102f537a65277e1633"
29
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "PackageRelease",
4
+ "packageName": "@aipt/platform-kernel",
5
+ "version": "0.1.6",
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:8c019c1671922477a27d72fe81b81906625ccfd2ab84487e3df33a00b6e88813"
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:9a0f9658068c0a1a6e1927d06339793f05f977a4be38b3e6297020dc0b7c675c"
33
+ }
@@ -0,0 +1,3 @@
1
+ # Vibe Coding Agent 集成
2
+
3
+ Bootstrap 从同一 Agent Policy 派生 Codex `AGENTS.md`、Claude Code `CLAUDE.md`、Cursor Rule、Antigravity Rule 和 Skill 入口。项目只保存薄入口与精确 Lock,完整说明随 npm 包发行,禁止复制平台长文档。
@@ -0,0 +1,3 @@
1
+ # Bootstrap
2
+
3
+ 使用 `corepack pnpm dlx @aipt/cli@latest bootstrap --project <绝对目录> --apply` 完成首次引导。Bootstrap 先安装精确兼容的 `dyyto`、`idp` 与 `idpctl` 工具链,成功后才 Apply 项目资产。`latest` 只用于发现入口;Apply 后 `.dyyto/toolchain.lock.json` 锁定精确版本。受控离线环境可使用 `--skip-tool-install`,但必须预先提供锁定版本工具。
@@ -0,0 +1,3 @@
1
+ # Dyyto 工程开发工作流
2
+
3
+ 业务项目以 `dyyto` 为唯一开发入口。首次运行 `dyyto bootstrap --project <绝对目录> --apply`,随后在编码前运行 `dyyto context` 与 `dyyto doctor`。工程资产变更通过 Catalog、Plan、Apply、Verify;配置、密钥与证书只存在于仓库外 Config Dir。
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "package": "@aipt/cli",
4
+ "version": "0.1.15",
5
+ "documents": [
6
+ { "id": "bootstrap", "path": "docs/bootstrap.md", "digest": "sha256:1e1ac4cbcabab7e6ae7a5a34337ea638951c16d5a66a33ab9218a9f441d6f3b4" },
7
+ { "id": "agent-integration", "path": "docs/agent-integration.md", "digest": "sha256:6b3e9425bd5caf233971bc27dc2ef765bd1e9b92a049d3a394e075ed80c0863f" },
8
+ { "id": "engineering-workflow", "path": "docs/engineering-workflow.md", "digest": "sha256:646cbc82bb53f542ca3ad799a93d29c789a966d3d27d617c46b1544033e0fff9" }
9
+ ]
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aipt/cli",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Dyyto 无服务工程能力目录、规划、应用与验证 CLI。",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,7 +19,9 @@
19
19
  "dist/package-releases",
20
20
  "dist/contracts",
21
21
  "dist/recipes",
22
- "dist/templates"
22
+ "dist/templates",
23
+ "docs",
24
+ "documentation-manifest.json"
23
25
  ],
24
26
  "engines": {
25
27
  "node": ">=24.18.0 <25"
@@ -29,7 +31,7 @@
29
31
  "@aipt/object-store": "0.1.0",
30
32
  "@aipt/page-host-gateway": "0.1.0",
31
33
  "@aipt/page-definition": "0.1.0",
32
- "@aipt/platform-kernel": "0.1.5"
34
+ "@aipt/platform-kernel": "0.1.6"
33
35
  },
34
36
  "idpPackageRelease": {
35
37
  "title": "Dyyto CLI",