@uzooai/anime-ai-cli 0.5.0 → 0.6.0

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.
Files changed (56) hide show
  1. package/.agents/skills/uzoo-anime-cli/SKILL.md +10 -4
  2. package/.agents/skills/uzoo-anime-cli/references/agreement-workflow.md +0 -10
  3. package/.agents/skills/uzoo-anime-cli/references/commands.md +8 -16
  4. package/.agents/skills/uzoo-anime-cli/references/generation-workflow.md +3 -13
  5. package/.agents/skills/uzoo-anime-cli/references/image-tools-workflow.md +5 -27
  6. package/.agents/skills/uzoo-anime-cli/references/interaction-workflow.md +1 -1
  7. package/.agents/skills/uzoo-anime-cli/references/material-graph-workflow.md +7 -17
  8. package/.agents/skills/uzoo-anime-cli/references/node-capabilities.md +19 -50
  9. package/.agents/skills/uzoo-anime-cli/references/node-workflow.md +3 -7
  10. package/.agents/skills/uzoo-anime-cli/references/remake-workflow.md +1 -1
  11. package/.agents/skills/uzoo-anime-cli/references/repaint-workflow.md +7 -294
  12. package/.agents/skills/uzoo-anime-cli/references/seedance-review-workflow.md +1 -5
  13. package/.agents/skills/uzoo-anime-cli/references/video-tools-workflow.md +3 -7
  14. package/CHANGELOG.md +8 -87
  15. package/README.md +26 -222
  16. package/docs/Agent/346/216/245/345/205/245/344/270/216/347/211/210/346/234/254/346/233/264/346/226/260.md +43 -0
  17. package/package.json +9 -12
  18. package/src/cli.js +5 -0
  19. package/src/group-membership.js +0 -1
  20. package/src/install.js +237 -0
  21. package/assets/README.md +0 -4
  22. package/docs/CLI/345/275/223/345/211/215/350/214/203/345/233/264/344/270/216/346/234/254/345/234/260/346/211/223/345/214/205-20261103.md +0 -134
  23. package/docs/CLI/346/216/210/346/235/203/346/216/245/345/217/243/344/270/216/344/273/244/347/211/214/350/207/252/345/212/250/345/210/267/346/226/260/350/256/276/350/256/241.md +0 -540
  24. package/docs/CLI/347/274/272/345/217/243/346/240/270/345/257/271/344/270/216/346/224/266/345/260/276-20261105.md +0 -65
  25. package/docs/CLI/347/275/221/351/241/265/344/277/235/345/255/230/350/212/202/347/202/271/347/274/272/345/244/261/344/272/244/346/216/245.md +0 -52
  26. package/docs/M0-M5/345/256/236/346/226/275/344/270/216/351/252/214/346/224/266.md +0 -89
  27. package/docs/npm/347/272/277/344/270/212/345/217/221/345/270/203/344/270/216/345/256/211/350/243/205/344/275/277/347/224/250.md +0 -151
  28. package/docs//344/270/213/350/275/275/346/216/245/345/217/243/351/200/202/351/205/215/344/270/216/351/252/214/346/224/266.md +0 -107
  29. package/docs//344/270/232/345/212/241/350/203/275/345/212/233/350/241/245/345/205/250/344/270/216Skill/347/273/223/346/236/204/350/247/204/345/210/222.md +0 -311
  30. package/docs//345/205/250/345/261/200/351/231/204/344/273/266/350/265/204/346/272/220/345/234/260/345/235/200/344/270/216/346/250/241/345/236/213/350/257/273/345/217/226/345/267/256/345/274/202.md +0 -47
  31. package/docs//345/206/205/351/203/250Windows/345/256/211/350/243/205/344/270/216/345/215/207/347/272/247/351/252/214/346/224/266/346/270/205/345/215/225.md +0 -34
  32. package/docs//345/233/276/347/211/207/346/212/240/345/233/276/346/216/245/345/205/245/344/270/216/351/252/214/346/224/266-20261104.md +0 -110
  33. package/docs//345/274/200/345/217/221/350/256/241/345/210/222.md +0 -127
  34. package/docs//345/274/202/346/255/245/346/212/240/345/233/276CLI/346/235/203/351/231/220/344/272/244/346/216/245-20261105.md +0 -50
  35. package/docs//345/274/202/346/255/245/346/212/240/345/233/276/347/234/237/345/256/236/351/252/214/346/224/266-20261105.md +0 -44
  36. package/docs//346/226/260/344/274/232/350/257/235/344/273/273/345/212/241/344/272/244/344/273/243-/351/230/266/346/256/2652A.md +0 -79
  37. package/docs//346/226/260/351/203/250/347/275/262/347/224/273/345/270/203/345/206/262/347/252/201/351/252/214/346/224/266-20261102.md +0 -61
  38. package/docs//346/231/256/351/200/232/346/265/217/350/247/210/345/231/250/347/231/273/345/275/225.md +0 -53
  39. package/docs//346/255/243/345/274/217/347/253/231/345/210/207/346/215/242/344/270/216/351/252/214/346/224/266-20261104.md +0 -90
  40. package/docs//347/224/273/345/270/203CLI/344/270/213/344/270/200/351/230/266/346/256/265/345/274/200/345/217/221/350/256/241/345/210/222.md +0 -136
  41. package/docs//347/224/273/345/270/203CLI/351/235/236/350/275/254/347/273/230/345/256/214/345/226/204/350/256/241/345/210/222.md +0 -183
  42. package/docs//347/224/273/345/270/203/350/203/275/345/212/233/345/245/221/347/272/246/346/240/270/345/257/271.md +0 -59
  43. package/docs//347/234/237/345/256/236/344/270/232/345/212/241/346/216/245/345/205/245/344/270/216/346/265/213/350/257/225.md +0 -1004
  44. package/docs//347/264/240/346/235/220/345/205/245/345/272/223/344/270/216/347/224/273/345/270/203/344/277/235/345/255/230/351/227/256/351/242/230/345/256/232/344/275/215.md +0 -52
  45. package/docs//351/230/266/346/256/2653B/351/252/214/346/224/266/344/272/244/346/216/245.md +0 -44
  46. package/docs//351/230/266/346/256/265/344/270/200/351/252/214/346/224/266.md +0 -60
  47. package/docs//351/235/236/350/275/254/347/273/230/346/214/201/347/273/255/345/256/214/345/226/204/344/270/216/351/252/214/346/224/266-20261103.md +0 -76
  48. package/docs//351/235/236/350/275/254/347/273/230/347/254/254/344/272/214/346/211/271/345/256/236/346/226/275/344/270/216/351/252/214/346/224/266.md +0 -39
  49. package/docs//351/235/236/350/275/254/347/273/230/350/241/245/345/205/205/346/235/241/344/273/266/351/252/214/346/224/266-20261103.md +0 -113
  50. package/docs//351/235/236/350/275/254/347/273/230/351/246/226/346/211/271/345/256/236/346/226/275/344/270/216/351/252/214/346/224/266.md +0 -71
  51. package/examples/real-business/image-request.template.json +0 -7
  52. package/examples/real-business/node-patch.template.json +0 -11
  53. package/scripts/check-package-resources.mjs +0 -56
  54. package/scripts/check-release.mjs +0 -19
  55. package/scripts/pack-local.mjs +0 -33
  56. package/scripts/release-policy.mjs +0 -22
@@ -1,56 +0,0 @@
1
- import assert from 'node:assert/strict'
2
- import fs from 'node:fs/promises'
3
- import path from 'node:path'
4
- import { fileURLToPath } from 'node:url'
5
- import { spawn } from 'node:child_process'
6
- import {releasePolicy} from './release-policy.mjs'
7
- const repository = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
8
- assert(process.env.npm_execpath, '通过 npm run check:resources 执行')
9
- const output = await new Promise((resolve, reject) => {
10
- const child = spawn(process.execPath, [process.env.npm_execpath, 'pack', '--dry-run', '--json', '--offline', '--ignore-scripts'],
11
- { cwd: repository, windowsHide: true, stdio: ['ignore','pipe','pipe'] })
12
- let out = '', err = ''
13
- child.stdout.on('data', b => { out += b }); child.stderr.on('data', b => { err += b })
14
- child.on('error', reject)
15
- child.on('close', code => code === 0 ? resolve(out) : reject(new Error('资源清单检查失败:' + err.slice(-1000))))
16
- })
17
- const [packed] = JSON.parse(output), names = new Set(packed.files.map(f => f.path))
18
- const metadata = JSON.parse(await fs.readFile(path.join(repository, 'package.json'), 'utf8'))
19
- const release=releasePolicy(metadata)
20
- const lock=JSON.parse(await fs.readFile(path.join(repository,'package-lock.json'),'utf8'))
21
- assert.equal(metadata.name,lock.name);assert.equal(metadata.version,lock.version)
22
- assert.equal(metadata.name,lock.packages[''].name);assert.equal(metadata.version,lock.packages[''].version)
23
- assert.equal(metadata.license,'MIT')
24
- assert((await fs.readFile(path.join(repository,'CHANGELOG.md'),'utf8')).includes(metadata.version),'更新记录缺少当前版本')
25
- assert(names.has('LICENSE')&&names.has('CHANGELOG.md')&&names.has('src/package-info.js'),'版本/许可证资源缺失')
26
- assert(Array.isArray(metadata.files) && metadata.files.includes('src/') && metadata.files.includes('.agents/skills/uzoo-anime-cli/'), '缺少显式运行资源白名单')
27
- for (const file of ['scripts/release-policy.mjs','scripts/check-release.mjs','src/download-name.js','src/cli.js','src/draft-finalize.js','src/media-copy.js','src/group-edit.js','src/group-layout.js',
28
- 'src/agreement-page.js','src/callback-page.js','assets/logo-uzoo.svg','assets/favicon-uzoo.png','.agents/skills/uzoo-anime-cli/SKILL.md'])
29
- assert(names.has(file), '包内缺少运行资源:' + file)
30
- let imports = 0
31
- for (const file of [...names].filter(f => /^(?:src\/.*\.js|scripts\/.*\.mjs)$/.test(f))) {
32
- const source = await fs.readFile(path.join(repository, file), 'utf8')
33
- for (const match of source.matchAll(/(?:from\s*|import\s*\(|new URL\(\s*)['"](\.[^'"]+)['"]/g)) {
34
- const target = path.posix.normalize(path.posix.join(path.posix.dirname(file), match[1]))
35
- assert(names.has(target), '运行模块相对资源遗漏:' + file + ' → ' + target); imports++
36
- }
37
- }
38
- let links=0,externalWorkspaceReferences=0
39
- for(const file of [...names].filter(f=>f.endsWith('.md'))){
40
- const source=await fs.readFile(path.join(repository,file),'utf8')
41
- for(const match of source.matchAll(/\]\(([^\s)]+)\)/g)){
42
- const value=match[1].split('#')[0].replace(/^<|>$/g,'')
43
- if(!value || /^[a-z][a-z0-9+.-]*:/i.test(value))continue
44
- const target=path.posix.normalize(path.posix.join(path.posix.dirname(file),decodeURIComponent(value)))
45
- // Historical maintainer documents may cite sibling repositories. Those links
46
- // are evidence pointers, never installed runtime or skill dependencies.
47
- if(file.startsWith('docs/')&&target.startsWith('../')){externalWorkspaceReferences++;continue}
48
- assert(names.has(target)||[...names].some(n=>n.startsWith(target+'/')),'包内文档引用遗漏:'+file+' → '+target);links++
49
- }
50
- }
51
- const references = [...names].filter(f => f.startsWith('.agents/skills/uzoo-anime-cli/references/'))
52
- assert.equal(references.length, 13)
53
- assert(![...names].some(f => /(^|\/)(\.local|outputs|node_modules|\.git)(\/|$)|\.dpapi$|(^|\/)(credentials[^/]*\.json|\.env[^/]*)$/.test(f)), '包内包含本地产物或敏感配置')
54
- assert(![...names].some(f=>/^test\//.test(f)||f==='AGENTS.md'||f==='scripts/verify-package.mjs'||f==='docs/阶段3B远程后端联调记录.md'||/\.tgz$/.test(f)), '包内包含测试、宿主规则、内部联调记录、安装专项或历史归档')
55
- console.log(JSON.stringify({ files: names.size, relative_runtime_resources: imports, package_document_links:links, external_workspace_references:externalWorkspaceReferences, skill_references: references.length,...release,
56
- install_performed: false, upgrade_tested: false, published: false }))
@@ -1,19 +0,0 @@
1
- import assert from 'node:assert/strict'
2
- import fs from 'node:fs/promises'
3
- import path from 'node:path'
4
- import {fileURLToPath} from 'node:url'
5
- import {releasePolicy} from './release-policy.mjs'
6
-
7
- const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..')
8
- const read=name=>fs.readFile(path.join(root,name),'utf8')
9
- const metadata=JSON.parse(await read('package.json')),lock=JSON.parse(await read('package-lock.json'))
10
- const policy=releasePolicy(metadata,{requirePublic:true})
11
- assert.equal(metadata.version,lock.version);assert.equal(metadata.name,lock.name)
12
- assert.equal(metadata.version,lock.packages[''].version);assert.equal(metadata.name,lock.packages[''].name)
13
- const heading='## '+metadata.version
14
- assert((await read('CHANGELOG.md')).split(/\r?\n/).some(line=>line===heading||line.startsWith(heading+' ')),'缺少本版本独立更新记录')
15
- assert((await read('LICENSE')).startsWith('MIT License'),'MIT授权文件缺失')
16
- assert((await read('README.md')).includes('npm install --global @uzooai/anime-ai-cli@latest'),'缺少安装用户入口')
17
- console.log(JSON.stringify({name:metadata.name,version:metadata.version,...policy,local_release_check:'passed',
18
- registry_account_checked:false,two_factor_checked:false,publication_authorized:false,published:false,
19
- next:'本命令仅检查本地产物;发布前另核对scope权限、2FA及当次明确授权'}))
@@ -1,33 +0,0 @@
1
- import fs from 'node:fs/promises'
2
- import path from 'node:path'
3
- import crypto from 'node:crypto'
4
- import assert from 'node:assert/strict'
5
- import {fileURLToPath} from 'node:url'
6
- import {spawn} from 'node:child_process'
7
- import {releasePolicy} from './release-policy.mjs'
8
-
9
- const repository=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..')
10
- assert(process.env.npm_execpath,'通过 npm run pack:local 执行')
11
- async function npm(args,capture=false){
12
- return new Promise((resolve,reject)=>{
13
- const child=spawn(process.execPath,[process.env.npm_execpath,...args],{cwd:repository,windowsHide:true,stdio:capture?['ignore','pipe','pipe']:'inherit'})
14
- let out='',err=''
15
- if(capture){child.stdout.on('data',b=>out+=b);child.stderr.on('data',b=>err+=b)}
16
- child.on('error',reject)
17
- child.on('close',code=>code===0?resolve(out):reject(Error('本地打包检查失败(exit '+code+')'+(capture?': '+err.slice(-1500):''))))
18
- })
19
- }
20
- // Build validates native ESM and package resources; there is no transpilation.
21
- await npm(['run','build'])
22
- const destination=path.join(repository,'outputs','npm',new Date().toISOString().replace(/[:.]/g,'-')+'-'+crypto.randomUUID().slice(0,8))
23
- await fs.mkdir(destination,{recursive:true})
24
- // prepack's build has just run. Suppress it here to keep the manifest pure JSON.
25
- const [packed]=JSON.parse(await npm(['pack','--offline','--ignore-scripts','--json','--pack-destination',destination],true))
26
- assert(packed && packed.filename===path.basename(packed.filename),'打包未返回安全产物文件名')
27
- const archive=path.join(destination,packed.filename),bytes=await fs.readFile(archive)
28
- assert.equal(crypto.createHash('sha1').update(bytes).digest('hex'),packed.shasum,'归档摘要不匹配')
29
- assert.equal('sha512-'+crypto.createHash('sha512').update(bytes).digest('base64'),packed.integrity,'归档integrity不匹配')
30
- assert.equal(bytes.length,packed.size,'归档长度不匹配')
31
- await fs.writeFile(path.join(destination,'manifest.json'),JSON.stringify(packed,null,2)+'\n',{flag:'wx'})
32
- const metadata=JSON.parse(await fs.readFile(path.join(repository,'package.json'),'utf8'))
33
- console.log(JSON.stringify({archive,manifest:path.join(destination,'manifest.json'),bytes:bytes.length,files:packed.files.length,integrity:packed.integrity,...releasePolicy(metadata),publication_authorized:false,installed:false,published:false},null,2))
@@ -1,22 +0,0 @@
1
- import assert from 'node:assert/strict'
2
-
3
- // This product's explicit release policy. Validation never logs in, changes
4
- // access, or publishes; the registry account and action authorization are separate.
5
- export function releasePolicy(metadata,{requirePublic=false}={}){
6
- assert.equal(metadata.name,'@uzooai/anime-ai-cli','正式包名不匹配')
7
- assert.equal(typeof metadata.private,'boolean','必须显式声明private,不能意外开放发布')
8
- if(metadata.private){
9
- assert(!requirePublic,'当前为private内部包,不能作为公开发布产物')
10
- return {private:true,public_package:false,registry:null,tag:null}
11
- }
12
- assert.equal(metadata.license,'MIT','发布许可证须保持已确认的MIT')
13
- assert.equal(metadata.bin?.['uzoo-anime'],'src/cli.js','发布命令入口不匹配')
14
- assert.match(metadata.version,/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-rc\.(0|[1-9]\d*))?$/,'发布版本须为x.y.z或x.y.z-rc.N')
15
- const config=metadata.publishConfig
16
- assert(config&&typeof config==='object'&&!Array.isArray(config),'公开包缺少publishConfig')
17
- assert.equal(config.access,'public','scoped公开包必须明确access=public')
18
- assert.equal(config.registry,'https://registry.npmjs.org/','发布registry必须明确为npm官方HTTPS地址')
19
- const tag=metadata.version.includes('-')?'next':'latest'
20
- assert.equal(config.tag,tag,'稳定版须latest,RC须next,不能串用通道')
21
- return {private:false,public_package:true,registry:config.registry,tag}
22
- }