@aura3d/cli 1.3.3 → 1.4.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 (91) hide show
  1. package/dist/asset-constants.d.ts +5 -0
  2. package/dist/asset-constants.d.ts.map +1 -0
  3. package/dist/asset-constants.js +5 -0
  4. package/dist/asset-constants.js.map +1 -0
  5. package/dist/asset-core-types.d.ts +206 -0
  6. package/dist/asset-core-types.d.ts.map +1 -0
  7. package/dist/asset-core-types.js +2 -0
  8. package/dist/asset-core-types.js.map +1 -0
  9. package/dist/asset-inspection-types.d.ts +131 -0
  10. package/dist/asset-inspection-types.d.ts.map +1 -0
  11. package/dist/asset-inspection-types.js +2 -0
  12. package/dist/asset-inspection-types.js.map +1 -0
  13. package/dist/asset-manifest.d.ts +8 -0
  14. package/dist/asset-manifest.d.ts.map +1 -0
  15. package/dist/asset-manifest.js +116 -0
  16. package/dist/asset-manifest.js.map +1 -0
  17. package/dist/asset-readiness-types.d.ts +164 -0
  18. package/dist/asset-readiness-types.d.ts.map +1 -0
  19. package/dist/asset-readiness-types.js +2 -0
  20. package/dist/asset-readiness-types.js.map +1 -0
  21. package/dist/asset-source-ast.d.ts +8 -0
  22. package/dist/asset-source-ast.d.ts.map +1 -0
  23. package/dist/asset-source-ast.js +241 -0
  24. package/dist/asset-source-ast.js.map +1 -0
  25. package/dist/asset-source-roles.d.ts +4 -0
  26. package/dist/asset-source-roles.d.ts.map +1 -0
  27. package/dist/asset-source-roles.js +79 -0
  28. package/dist/asset-source-roles.js.map +1 -0
  29. package/dist/asset-source-validation.d.ts +4 -0
  30. package/dist/asset-source-validation.d.ts.map +1 -0
  31. package/dist/asset-source-validation.js +200 -0
  32. package/dist/asset-source-validation.js.map +1 -0
  33. package/dist/character-assembly-types.d.ts +39 -0
  34. package/dist/character-assembly-types.d.ts.map +1 -0
  35. package/dist/character-assembly-types.js +2 -0
  36. package/dist/character-assembly-types.js.map +1 -0
  37. package/dist/cli-help.d.ts +4 -0
  38. package/dist/cli-help.d.ts.map +1 -0
  39. package/dist/cli-help.js +48 -0
  40. package/dist/cli-help.js.map +1 -0
  41. package/dist/cli-options.d.ts +66 -0
  42. package/dist/cli-options.d.ts.map +1 -0
  43. package/dist/cli-options.js +234 -0
  44. package/dist/cli-options.js.map +1 -0
  45. package/dist/cli.js +20 -177
  46. package/dist/cli.js.map +1 -1
  47. package/dist/index.d.ts +12 -402
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +948 -90
  50. package/dist/index.js.map +1 -1
  51. package/dist/pull-bridge/adapters.d.ts +4 -0
  52. package/dist/pull-bridge/adapters.d.ts.map +1 -0
  53. package/dist/pull-bridge/adapters.js +38 -0
  54. package/dist/pull-bridge/adapters.js.map +1 -0
  55. package/dist/pull-bridge/download.d.ts +6 -0
  56. package/dist/pull-bridge/download.d.ts.map +1 -0
  57. package/dist/pull-bridge/download.js +208 -0
  58. package/dist/pull-bridge/download.js.map +1 -0
  59. package/dist/pull-bridge/profiles.d.ts +14 -0
  60. package/dist/pull-bridge/profiles.d.ts.map +1 -0
  61. package/dist/pull-bridge/profiles.js +63 -0
  62. package/dist/pull-bridge/profiles.js.map +1 -0
  63. package/dist/pull-bridge/provenance.d.ts +9 -0
  64. package/dist/pull-bridge/provenance.d.ts.map +1 -0
  65. package/dist/pull-bridge/provenance.js +99 -0
  66. package/dist/pull-bridge/provenance.js.map +1 -0
  67. package/dist/pull-bridge/pullable.d.ts +14 -0
  68. package/dist/pull-bridge/pullable.d.ts.map +1 -0
  69. package/dist/pull-bridge/pullable.js +58 -0
  70. package/dist/pull-bridge/pullable.js.map +1 -0
  71. package/dist/pull-bridge/scoring.d.ts +21 -0
  72. package/dist/pull-bridge/scoring.d.ts.map +1 -0
  73. package/dist/pull-bridge/scoring.js +177 -0
  74. package/dist/pull-bridge/scoring.js.map +1 -0
  75. package/dist/pull-bridge/search.d.ts +39 -0
  76. package/dist/pull-bridge/search.d.ts.map +1 -0
  77. package/dist/pull-bridge/search.js +114 -0
  78. package/dist/pull-bridge/search.js.map +1 -0
  79. package/dist/pull-bridge/types.d.ts +9 -0
  80. package/dist/pull-bridge/types.d.ts.map +1 -0
  81. package/dist/pull-bridge/types.js +2 -0
  82. package/dist/pull-bridge/types.js.map +1 -0
  83. package/dist/pull-bridge/vector3.d.ts +2 -0
  84. package/dist/pull-bridge/vector3.d.ts.map +1 -0
  85. package/dist/pull-bridge/vector3.js +4 -0
  86. package/dist/pull-bridge/vector3.js.map +1 -0
  87. package/dist/pull-bridge.d.ts +18 -100
  88. package/dist/pull-bridge.d.ts.map +1 -1
  89. package/dist/pull-bridge.js +59 -526
  90. package/dist/pull-bridge.js.map +1 -1
  91. package/package.json +3 -2
@@ -0,0 +1,200 @@
1
+ import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
2
+ import { relative, resolve } from "node:path";
3
+ import { DEFAULT_AURA_ASSET_MANIFEST, DEFAULT_AURA_ASSET_TYPEGEN, } from "./asset-constants.js";
4
+ import { scanAssetSourceAst } from "./asset-source-ast.js";
5
+ export function shouldScanSource(options) {
6
+ return options.source !== undefined || options.release === true;
7
+ }
8
+ export function validateAssetSource(projectDir, sourceOption, manifest) {
9
+ const roots = resolveSourceValidationRoots(projectDir, sourceOption);
10
+ const files = roots.flatMap((root) => collectSourceValidationFiles(projectDir, root));
11
+ const failures = [];
12
+ const warnings = [];
13
+ const usageCounts = new Map();
14
+ const assetIds = new Set(manifest.assets.map((asset) => asset.id));
15
+ for (const file of files) {
16
+ const relativeFile = normalizeRelativePath(relative(projectDir, file));
17
+ const source = readFileSync(file, "utf8");
18
+ const scanText = stripSourceComments(source);
19
+ const pushFailure = (message) => {
20
+ pushUnique(failures, `${relativeFile}: ${message}`);
21
+ };
22
+ const pushWarning = (message) => {
23
+ pushUnique(warnings, `${relativeFile}: ${message}`);
24
+ };
25
+ const astScan = scanAssetSourceAst(relativeFile, source);
26
+ for (const failure of astScan.failures)
27
+ pushFailure(failure);
28
+ for (const warning of astScan.warnings)
29
+ pushWarning(warning);
30
+ for (const match of scanText.matchAll(/\bmodel\s*\(\s*(["'`])([^"'`]*?)\1/g)) {
31
+ pushFailure(`raw model string id "${match[2]}" passed to model(). Use generated typed assets, for example model(assets.${sanitizeAssetId(match[2] ?? "asset")}).`);
32
+ }
33
+ for (const url of findRawGlbUrls(scanText)) {
34
+ pushFailure(`raw GLB/glTF URL or path "${url}" found in source. Add it with assets add/resolve and use model(assets.x).`);
35
+ }
36
+ if (/\bunsafeModelUrl\b/.test(scanText)) {
37
+ pushFailure("unsafeModelUrl is not allowed in public examples. Preserve typed asset safety with generated assets from ./src/aura-assets.");
38
+ }
39
+ if (/\bGLTFLoader\b/.test(scanText)) {
40
+ pushFailure("GLTFLoader is not allowed in public examples. Use model(assets.x) from @aura3d/engine.");
41
+ }
42
+ if (/(?:from\s*["']three(?:\/examples[^"']*)?["']|import\s*["']three(?:\/examples[^"']*)?["']|require\s*\(\s*["']three(?:\/examples[^"']*)?["']\s*\))/.test(scanText)) {
43
+ pushFailure("direct three imports are not allowed in public examples. Use @aura3d/engine public APIs.");
44
+ }
45
+ if (hasPrimitiveOnlyPrimaryRoleIndicator(scanText)) {
46
+ pushWarning("primary-role scene appears primitive-only: source mentions character/world/vehicle/product/environment roles and uses primitives.* without typed model(assets.x).");
47
+ }
48
+ for (const warning of findPrimitivePrimaryRoleWarnings(scanText)) {
49
+ pushWarning(warning);
50
+ }
51
+ for (const usage of astScan.typedAssetUsages) {
52
+ const key = `${usage.assetId}\0${usage.typedAsset}\0${relativeFile}`;
53
+ const current = usageCounts.get(key);
54
+ usageCounts.set(key, {
55
+ ...usage,
56
+ file: relativeFile,
57
+ occurrences: (current?.occurrences ?? 0) + 1,
58
+ });
59
+ }
60
+ }
61
+ const typedAssetUsages = [...usageCounts.values()].sort((a, b) => a.assetId.localeCompare(b.assetId) ||
62
+ a.file.localeCompare(b.file) ||
63
+ a.typedAsset.localeCompare(b.typedAsset));
64
+ const filesByAsset = typedAssetUsages.reduce((acc, usage) => {
65
+ acc[usage.assetId] ??= [];
66
+ if (!acc[usage.assetId].includes(usage.file))
67
+ acc[usage.assetId].push(usage.file);
68
+ return acc;
69
+ }, {});
70
+ for (const filesForAsset of Object.values(filesByAsset)) {
71
+ filesForAsset.sort((a, b) => a.localeCompare(b));
72
+ }
73
+ for (const usage of typedAssetUsages) {
74
+ if (!assetIds.has(usage.assetId)) {
75
+ failures.push(`${usage.file}: typed asset ${usage.typedAsset} is not present in ${DEFAULT_AURA_ASSET_MANIFEST}. Add it with aura3d assets add/resolve and regenerate ${DEFAULT_AURA_ASSET_TYPEGEN}.`);
76
+ }
77
+ }
78
+ return {
79
+ enabled: true,
80
+ roots: roots.map((root) => normalizeRelativePath(relative(projectDir, root))),
81
+ files: files.map((file) => normalizeRelativePath(relative(projectDir, file))),
82
+ typedAssetUsages,
83
+ filesByAsset,
84
+ failures,
85
+ warnings,
86
+ };
87
+ }
88
+ function resolveSourceValidationRoots(projectDir, sourceOption) {
89
+ if (typeof sourceOption === "string" && sourceOption.trim()) {
90
+ return [resolve(projectDir, sourceOption)];
91
+ }
92
+ const defaultRoots = ["src", "app", "apps", "examples", "templates"]
93
+ .map((entry) => resolve(projectDir, entry))
94
+ .filter((entry) => existsSync(entry));
95
+ return defaultRoots.length > 0 ? defaultRoots : [projectDir];
96
+ }
97
+ function collectSourceValidationFiles(projectDir, root) {
98
+ if (!existsSync(root))
99
+ return [];
100
+ if (statSync(root).isFile())
101
+ return isSourceValidationFile(projectDir, root) ? [root] : [];
102
+ const files = [];
103
+ const visit = (directory) => {
104
+ for (const entry of readdirSync(directory, { withFileTypes: true })) {
105
+ const path = resolve(directory, entry.name);
106
+ if (entry.isDirectory()) {
107
+ if (isSkippedSourceValidationDirectory(entry.name))
108
+ continue;
109
+ visit(path);
110
+ }
111
+ else if (entry.isFile() && isSourceValidationFile(projectDir, path)) {
112
+ files.push(path);
113
+ }
114
+ }
115
+ };
116
+ visit(root);
117
+ return files.sort((a, b) => a.localeCompare(b));
118
+ }
119
+ function isSkippedSourceValidationDirectory(name) {
120
+ return [
121
+ "node_modules",
122
+ "dist",
123
+ "build",
124
+ "coverage",
125
+ ".git",
126
+ ".next",
127
+ ".vite",
128
+ "public",
129
+ "assets",
130
+ "artifacts",
131
+ ].includes(name);
132
+ }
133
+ function isSourceValidationFile(projectDir, path) {
134
+ const relativePath = normalizeRelativePath(relative(projectDir, path));
135
+ if (/(^|\/)aura-assets\.ts$/.test(relativePath))
136
+ return false;
137
+ if (/(^|\/)(?:dist|build|coverage|node_modules|public|assets|artifacts)\//.test(relativePath))
138
+ return false;
139
+ return /\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(path);
140
+ }
141
+ function stripSourceComments(source) {
142
+ return source
143
+ .replace(/\/\*[\s\S]*?\*\//g, (value) => value.replace(/[^\n]/g, " "))
144
+ .replace(/(^|[^:])\/\/.*$/gm, "$1");
145
+ }
146
+ function findRawGlbUrls(source) {
147
+ const matches = new Set();
148
+ for (const match of source.matchAll(/(["'`])([^"'`]*?(?:https?:\/\/|\/)[^"'`]*?\.gl(?:b|tf)(?:\?[^"'`]*)?)\1/gi)) {
149
+ matches.add(match[2] ?? "");
150
+ }
151
+ for (const match of source.matchAll(/(["'`])([^"'`]*?\.gl(?:b|tf)(?:\?[^"'`]*)?)\1/gi)) {
152
+ const value = match[2] ?? "";
153
+ if (/^(?:\.{0,2}\/|https?:\/\/|\/|[a-z]:[\\/])/i.test(value))
154
+ matches.add(value);
155
+ }
156
+ return [...matches].filter(Boolean).sort();
157
+ }
158
+ function hasPrimitiveOnlyPrimaryRoleIndicator(source) {
159
+ if (!/\bprimitives\.[a-zA-Z_][\w]*/.test(source))
160
+ return false;
161
+ if (/\bmodel\s*\(/.test(source) || /\bassets\.[a-zA-Z_][\w]*/.test(source))
162
+ return false;
163
+ if (hasProceduralGamePrimitiveContract(source))
164
+ return false;
165
+ const searchable = source
166
+ .replace(/([a-z0-9])([A-Z])/g, "$1 $2")
167
+ .replace(/[_-]+/g, " ");
168
+ return /\b(character|fighter|player|avatar|vehicle|car|kart|ship|world|level|stage|environment|terrain|hero\s+product|product|creature|weapon|primary)\b/i.test(searchable);
169
+ }
170
+ function hasProceduralGamePrimitiveContract(source) {
171
+ return /\bgame\.fallingBlocks\s*\(/.test(source) &&
172
+ /\bprocedural(?:\s+Aura3D)?\s+falling-block\b/i.test(source);
173
+ }
174
+ function findPrimitivePrimaryRoleWarnings(source) {
175
+ if (!/\bprimitives\.[a-zA-Z_][\w]*/.test(source))
176
+ return [];
177
+ const warnings = new Set();
178
+ const primaryIdentifier = /\b(?:character|fighter|player|avatar|vehicle|car|kart|ship|world|level|stage|environment|terrain|hero|product|creature|weapon|track)\b/i;
179
+ for (const match of source.matchAll(/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*primitives\.[a-zA-Z_][\w]*/g)) {
180
+ const name = match[1] ?? "";
181
+ const readable = name
182
+ .replace(/([a-z0-9])([A-Z])/g, "$1 $2")
183
+ .replace(/[_-]+/g, " ");
184
+ if (primaryIdentifier.test(readable)) {
185
+ warnings.add(`primitive "${name}" appears assigned to a primary-role object. Primary characters, vehicles, worlds, tracks, products, and weapons must use typed model(assets.x) assets or be marked abstract/prototype.`);
186
+ }
187
+ }
188
+ return [...warnings].sort();
189
+ }
190
+ function pushUnique(target, value) {
191
+ if (!target.includes(value))
192
+ target.push(value);
193
+ }
194
+ function normalizeRelativePath(path) {
195
+ return path.split("\\").join("/");
196
+ }
197
+ function sanitizeAssetId(value) {
198
+ return value.replace(/[^a-zA-Z0-9_]/g, "_").replace(/^(\d)/, "_$1");
199
+ }
200
+ //# sourceMappingURL=asset-source-validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-source-validation.js","sourceRoot":"","sources":["../../../../packages/aura3d-cli/src/asset-source-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC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AAC,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAG,IAAI;aAClB,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;aACtC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC1B,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrC,QAAQ,CAAC,GAAG,CAAC,cAAc,IAAI,yLAAyL,CAAC,CAAC;QAC5N,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,UAAU,CAAC,MAAgB,EAAE,KAAa;IACjD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACtE,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { AuraCliAssetType } from "./asset-core-types.js";
2
+ import type { AuraCliHumanoidInspection } from "./asset-inspection-types.js";
3
+ export interface CharacterAssemblyPlanOptions {
4
+ readonly projectDir?: string;
5
+ readonly name: string;
6
+ readonly body: string;
7
+ readonly parts?: readonly CharacterAssemblyPartInput[];
8
+ readonly scale?: number;
9
+ readonly output?: string;
10
+ }
11
+ export interface CharacterAssemblyPartInput {
12
+ readonly slot: string;
13
+ readonly asset: string;
14
+ readonly attachTo?: string;
15
+ }
16
+ export interface CharacterAssemblyPlanResult {
17
+ readonly ok: boolean;
18
+ readonly schema: "aura3d.character-assembly/1.0";
19
+ readonly name: string;
20
+ readonly output: string;
21
+ readonly body: CharacterAssemblyResolvedPart;
22
+ readonly parts: readonly CharacterAssemblyResolvedPart[];
23
+ readonly validation: {
24
+ readonly failures: readonly string[];
25
+ readonly warnings: readonly string[];
26
+ };
27
+ readonly messages: readonly string[];
28
+ }
29
+ export interface CharacterAssemblyResolvedPart {
30
+ readonly slot: string;
31
+ readonly asset: string;
32
+ readonly url: string;
33
+ readonly type: AuraCliAssetType;
34
+ readonly format: string;
35
+ readonly animations: readonly string[];
36
+ readonly humanoid?: AuraCliHumanoidInspection;
37
+ readonly attachTo: string;
38
+ }
39
+ //# sourceMappingURL=character-assembly-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character-assembly-types.d.ts","sourceRoot":"","sources":["../../../../packages/aura3d-cli/src/character-assembly-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAE7E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACvD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,+BAA+B,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,6BAA6B,EAAE,CAAC;IACzD,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;QACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;KACtC,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=character-assembly-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character-assembly-types.js","sourceRoot":"","sources":["../../../../packages/aura3d-cli/src/character-assembly-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare const assetRoleUsage = "character|vehicle|world|environment|track|product|weapon|prop|set-dressing|debug|abstract|unknown";
2
+ export declare function assetsAddHelp(): string;
3
+ export declare function mainHelp(profileUsage: string): string;
4
+ //# sourceMappingURL=cli-help.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-help.d.ts","sourceRoot":"","sources":["../../../../packages/aura3d-cli/src/cli-help.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,sGAC0E,CAAC;AAEtG,wBAAgB,aAAa,IAAI,MAAM,CAsBtC;AAED,wBAAgB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAsBrD"}
@@ -0,0 +1,48 @@
1
+ export const assetRoleUsage = "character|vehicle|world|environment|track|product|weapon|prop|set-dressing|debug|abstract|unknown";
2
+ export function assetsAddHelp() {
3
+ return `Usage: aura3d assets add ./model.glb --name robot [options]
4
+
5
+ Options:
6
+ --type model|texture|environment|audio
7
+ --license CC0-1.0
8
+ --license-name "CC0 1.0 Universal"
9
+ --license-url URL
10
+ --license-raw TEXT
11
+ --source-page URL
12
+ --download-url URL
13
+ --source-url URL
14
+ --author NAME
15
+ --source-family NAME
16
+ --attribution TEXT
17
+ --quality ungraded|blocked|prototype|candidate|release
18
+ --role ${assetRoleUsage}
19
+ --suitability TEXT
20
+ --rendered-probe-json tests/reports/asset.probe.json
21
+ --rendered-probe /aura-assets/probe.png
22
+ --public-path /aura-assets/name.glb
23
+ --output public/aura-assets`;
24
+ }
25
+ export function mainHelp(profileUsage) {
26
+ return `Aura3D CLI
27
+
28
+ Commands:
29
+ aura3d assets add ./model.glb --name robot [--type model|texture|environment|audio] [--license CC0-1.0] [--license-url URL] [--source-page URL] [--download-url URL] [--source-url URL] [--author NAME] [--quality ungraded|blocked|prototype|candidate|release] [--role ${assetRoleUsage}] [--suitability TEXT] [--rendered-probe-json tests/reports/asset.probe.json] [--rendered-probe /aura-assets/probe.png]
30
+ aura3d assets scan ./assets
31
+ aura3d assets inspect ./model.glb [--animation] [--humanoid] [--skeleton] [--morphs] [--license]
32
+ aura3d assets validate [--asset assetId|--no-assets] [--source [src]] [--release] [--no-placeholders] [--require-license] [--provenance evidence.json]
33
+ aura3d assets validate-game [--profile fighting-character] [--asset fighter] [--output artifacts/aura3d/game-assets.json] [--no-placeholders] [--require-license] [--provenance evidence.json]
34
+ aura3d assets validate-animation-studio [--episode] [--asset character] [--output artifacts/aura3d/animation-studio-assets.json] [--no-placeholders] [--require-license] [--provenance evidence.json]
35
+ aura3d assets validate-animation --clips Idle_Loop,Walk_Loop,Sprint_Loop --map idle=Idle_Loop,walk=Walk_Loop,run=Sprint_Loop [--require idle,walk,run] [--require-rig]
36
+ aura3d assets assemble-character --name hero --body bodyAsset --part hair=hairAsset
37
+ aura3d assets list
38
+ aura3d assets typegen
39
+ aura3d assets thumbnail
40
+ aura3d assets search <query> [--profile ${profileUsage}] [--license cc0|cc-by] [--max-tris N] [--animated] [--json]
41
+ aura3d assets resolve <query> --name <name> [--profile ${profileUsage}] [--license cc0|cc-by] [--max-tris N] [--animated]
42
+ aura3d animation plan|preview|render|package|review|verify [--dry-run]
43
+ aura3d animation scene <new|show|cast add|prop add|set|block|camera|shot|dialogue|render|...> (agent-native Scene-Tool CLI)
44
+ aura3d doctor
45
+ aura3d check-deploy --dist dist [--release] [--source [src]] [--asset assetId|--no-assets]
46
+ aura3d init --agent all`;
47
+ }
48
+ //# sourceMappingURL=cli-help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-help.js","sourceRoot":"","sources":["../../../../packages/aura3d-cli/src/cli-help.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GACzB,mGAAmG,CAAC;AAEtG,MAAM,UAAU,aAAa;IAC3B,OAAO;;;;;;;;;;;;;;;WAeE,cAAc;;;;;8BAKK,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,YAAoB;IAC3C,OAAO;;;6QAGoQ,cAAc;;;;;;;;;;;4CAW/O,YAAY;2DACG,YAAY;;;;;0BAK7C,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { type AuraAssetQuality, type AuraCliAssetRole, type AuraCliRenderedProbe } from "./index.js";
2
+ import type { CliAssetSearchProfile, CliResolveConstraints } from "./pull-bridge.js";
3
+ export declare function createCliOptionReaders(args: readonly string[]): {
4
+ hasFlag: (name: string) => boolean;
5
+ readAssetQuality: () => AuraAssetQuality | undefined;
6
+ readAssetRole: () => AuraCliAssetRole | undefined;
7
+ readAssetType: () => "model" | "texture" | "environment" | "audio" | undefined;
8
+ readAssetValidationOptions: () => {
9
+ readonly episode?: boolean;
10
+ readonly noPlaceholders?: boolean;
11
+ readonly requireLicense?: boolean;
12
+ readonly provenanceFile?: string;
13
+ readonly assetIds?: readonly string[];
14
+ readonly source?: boolean | string;
15
+ readonly release?: boolean;
16
+ };
17
+ readCliAssetProfile: () => CliAssetSearchProfile;
18
+ readEvidenceOutput: () => string | undefined;
19
+ readInspectFile: () => string | undefined;
20
+ readOption: (name: string) => string | undefined;
21
+ readParts: (name: string) => readonly {
22
+ readonly slot: string;
23
+ readonly asset: string;
24
+ }[];
25
+ readRenderedProbe: () => AuraCliRenderedProbe | undefined;
26
+ readResolveConstraints: () => CliResolveConstraints;
27
+ };
28
+ export declare function profileUsage(): string;
29
+ export declare function printSearchReport(report: {
30
+ readonly query: string;
31
+ readonly profile: CliAssetSearchProfile;
32
+ readonly candidates: readonly {
33
+ readonly id: string;
34
+ readonly source: string;
35
+ readonly title: string;
36
+ readonly license: string;
37
+ readonly autoPullable: boolean;
38
+ readonly sourcePage?: string;
39
+ readonly profile?: {
40
+ readonly suitable: boolean;
41
+ readonly rejectionReasons: readonly string[];
42
+ readonly warnings: readonly string[];
43
+ };
44
+ }[];
45
+ readonly rejectedCandidates?: readonly {
46
+ readonly id: string;
47
+ readonly source: string;
48
+ readonly title: string;
49
+ readonly license: string;
50
+ readonly autoPullable: boolean;
51
+ readonly sourcePage?: string;
52
+ readonly profile?: {
53
+ readonly suitable: boolean;
54
+ readonly rejectionReasons: readonly string[];
55
+ readonly warnings: readonly string[];
56
+ };
57
+ }[];
58
+ readonly deepLinks: readonly {
59
+ readonly id: string;
60
+ readonly title: string;
61
+ readonly sourcePage?: string;
62
+ }[];
63
+ readonly warnings: readonly string[];
64
+ readonly messages: readonly string[];
65
+ }): void;
66
+ //# sourceMappingURL=cli-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-options.d.ts","sourceRoot":"","sources":["../../../../packages/aura3d-cli/src/cli-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE;oBAarC,MAAM,KAAG,OAAO;4BAwEV,gBAAgB,GAAG,SAAS;yBAO/B,gBAAgB,GAAG,SAAS;yBAd5B,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,OAAO,GAAG,SAAS;sCA3C5C;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE;+BAkHpP,qBAAqB;8BAhItB,MAAM,GAAG,SAAS;2BAJrB,MAAM,GAAG,SAAS;uBAhBpB,MAAM,KAAG,MAAM,GAAG,SAAS;sBAgE5B,MAAM,KAAG,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE;6BA+ChE,oBAAoB,GAAG,SAAS;kCAiB3B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A;KAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,SAAS;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CA4Bx8B"}
@@ -0,0 +1,234 @@
1
+ import { readRenderedProbeMetadata, } from "./index.js";
2
+ export function createCliOptionReaders(args) {
3
+ function readOption(name) {
4
+ const index = args.indexOf(name);
5
+ return index >= 0 ? args[index + 1] : undefined;
6
+ }
7
+ function readOptionalOption(name) {
8
+ const index = args.indexOf(name);
9
+ if (index < 0)
10
+ return undefined;
11
+ const value = args[index + 1];
12
+ return value && !value.startsWith("--") ? value : undefined;
13
+ }
14
+ function hasFlag(name) {
15
+ return args.includes(name);
16
+ }
17
+ function readInspectFile() {
18
+ return args.slice(2).find((value) => !value.startsWith("--"));
19
+ }
20
+ function readEvidenceOutput() {
21
+ if (hasFlag("--output")) {
22
+ const output = readOption("--output");
23
+ if (!output || output.startsWith("--"))
24
+ throw new Error("Expected --output <path>.");
25
+ return output;
26
+ }
27
+ if (hasFlag("--evidence")) {
28
+ const evidence = readOption("--evidence");
29
+ if (!evidence || evidence.startsWith("--"))
30
+ throw new Error("Expected --evidence <path>.");
31
+ return evidence;
32
+ }
33
+ return undefined;
34
+ }
35
+ function readAssetValidationOptions() {
36
+ const options = {};
37
+ if (hasFlag("--episode"))
38
+ options.episode = true;
39
+ if (hasFlag("--no-placeholders"))
40
+ options.noPlaceholders = true;
41
+ if (hasFlag("--require-license"))
42
+ options.requireLicense = true;
43
+ if (hasFlag("--release"))
44
+ options.release = true;
45
+ if (hasFlag("--source"))
46
+ options.source = readOptionalOption("--source") ?? true;
47
+ const assetIds = readRepeatedOptions("--asset").flatMap((value) => value.split(",").map((entry) => entry.trim()).filter(Boolean));
48
+ if (hasFlag("--no-assets") && assetIds.length > 0)
49
+ throw new Error("Use either --asset <id> or --no-assets, not both.");
50
+ if (hasFlag("--no-assets"))
51
+ options.assetIds = [];
52
+ else if (assetIds.length > 0)
53
+ options.assetIds = assetIds;
54
+ if (hasFlag("--provenance")) {
55
+ const provenanceFile = readOption("--provenance");
56
+ if (!provenanceFile || provenanceFile.startsWith("--"))
57
+ throw new Error("Expected --provenance <path>.");
58
+ options.provenanceFile = provenanceFile;
59
+ }
60
+ return options;
61
+ }
62
+ function readRepeatedOptions(name) {
63
+ const values = [];
64
+ for (let index = 0; index < args.length; index += 1) {
65
+ if (args[index] !== name)
66
+ continue;
67
+ const value = args[index + 1];
68
+ if (!value || value.startsWith("--"))
69
+ throw new Error(`Expected ${name} <value>.`);
70
+ values.push(value);
71
+ }
72
+ return values;
73
+ }
74
+ function readParts(name) {
75
+ const parts = [];
76
+ for (let index = 0; index < args.length; index += 1) {
77
+ if (args[index] !== name)
78
+ continue;
79
+ const value = args[index + 1];
80
+ if (!value || value.startsWith("--"))
81
+ throw new Error(`Expected ${name} slot=asset`);
82
+ const [slot, asset] = value.split("=");
83
+ if (!slot || !asset)
84
+ throw new Error(`Expected ${name} slot=asset, got "${value}"`);
85
+ parts.push({ slot, asset });
86
+ }
87
+ return parts;
88
+ }
89
+ function readAssetType() {
90
+ const value = readOption("--type");
91
+ if (!value)
92
+ return undefined;
93
+ if (value === "model" || value === "texture" || value === "environment" || value === "audio")
94
+ return value;
95
+ throw new Error(`Unsupported --type value "${value}". Use model, texture, environment, or audio.`);
96
+ }
97
+ function readAssetQuality() {
98
+ const value = readOption("--quality");
99
+ if (!value)
100
+ return undefined;
101
+ if (value === "ungraded" || value === "blocked" || value === "prototype" || value === "candidate" || value === "release")
102
+ return value;
103
+ throw new Error(`Unsupported --quality value "${value}". Use ungraded, blocked, prototype, candidate, or release.`);
104
+ }
105
+ function readAssetRole() {
106
+ const value = readOption("--role");
107
+ if (!value)
108
+ return undefined;
109
+ if (value === "character" ||
110
+ value === "vehicle" ||
111
+ value === "world" ||
112
+ value === "environment" ||
113
+ value === "track" ||
114
+ value === "product" ||
115
+ value === "weapon" ||
116
+ value === "prop" ||
117
+ value === "set-dressing" ||
118
+ value === "debug" ||
119
+ value === "abstract" ||
120
+ value === "unknown")
121
+ return value;
122
+ throw new Error(`Unsupported --role value "${value}". Use character, vehicle, world, environment, track, product, weapon, prop, set-dressing, debug, abstract, or unknown.`);
123
+ }
124
+ function readRenderedProbe() {
125
+ const metadataFile = readOption("--rendered-probe-json");
126
+ const url = readOption("--rendered-probe");
127
+ if (metadataFile && url)
128
+ throw new Error("Use either --rendered-probe-json or --rendered-probe, not both.");
129
+ if (metadataFile) {
130
+ if (metadataFile.startsWith("--"))
131
+ throw new Error("Expected --rendered-probe-json <metadata.json>.");
132
+ return readRenderedProbeMetadata({ file: metadataFile });
133
+ }
134
+ if (!url)
135
+ return undefined;
136
+ if (url.startsWith("--"))
137
+ throw new Error("Expected --rendered-probe <url-or-public-path>.");
138
+ return {
139
+ url,
140
+ kind: "browser-screenshot",
141
+ checkedAt: new Date().toISOString(),
142
+ };
143
+ }
144
+ function readResolveConstraints() {
145
+ const constraints = {};
146
+ const license = readOption("--license");
147
+ if (license) {
148
+ const normalized = license.toLowerCase();
149
+ if (normalized === "cc0")
150
+ constraints.license = ["CC0"];
151
+ else if (normalized === "cc-by" || normalized === "ccby")
152
+ constraints.license = ["CC-BY"];
153
+ else
154
+ throw new Error(`Unsupported --license value "${license}". Use cc0 or cc-by.`);
155
+ }
156
+ const maxTris = readOption("--max-tris");
157
+ if (maxTris) {
158
+ const parsed = Number.parseInt(maxTris, 10);
159
+ if (!Number.isFinite(parsed) || parsed <= 0)
160
+ throw new Error(`--max-tris must be a positive integer (got "${maxTris}").`);
161
+ constraints.maxTriangles = parsed;
162
+ }
163
+ if (hasFlag("--animated"))
164
+ constraints.animated = true;
165
+ const profile = readCliAssetProfile();
166
+ return profile === "general" ? constraints : { ...constraints, profile };
167
+ }
168
+ function readCliAssetProfile() {
169
+ const value = readOption("--profile");
170
+ if (!value)
171
+ return "general";
172
+ if (isSupportedAssetProfile(value))
173
+ return value;
174
+ throw new Error(`Unsupported --profile value "${value}". Use ${profileUsage()}.`);
175
+ }
176
+ return {
177
+ hasFlag,
178
+ readAssetQuality,
179
+ readAssetRole,
180
+ readAssetType,
181
+ readAssetValidationOptions,
182
+ readCliAssetProfile,
183
+ readEvidenceOutput,
184
+ readInspectFile,
185
+ readOption,
186
+ readParts,
187
+ readRenderedProbe,
188
+ readResolveConstraints,
189
+ };
190
+ }
191
+ function isSupportedAssetProfile(value) {
192
+ return (value === "fighting-character" ||
193
+ value === "animation-character" ||
194
+ value === "animation-prop" ||
195
+ value === "animation-set" ||
196
+ value === "animation-environment");
197
+ }
198
+ export function profileUsage() {
199
+ return "fighting-character|animation-character|animation-prop|animation-set|animation-environment";
200
+ }
201
+ export function printSearchReport(report) {
202
+ for (const message of report.messages)
203
+ console.log(message);
204
+ for (const candidate of report.candidates) {
205
+ const profileTag = candidate.profile
206
+ ? candidate.profile.suitable
207
+ ? ", profile-ready"
208
+ : ", profile-rejected"
209
+ : "";
210
+ const tag = candidate.autoPullable ? `auto-pullable${profileTag}` : `manual license check required${profileTag}`;
211
+ console.log(` [${candidate.source}] ${candidate.id} "${candidate.title}" ${candidate.license} (${tag})`);
212
+ if (candidate.profile && !candidate.profile.suitable) {
213
+ for (const reason of candidate.profile.rejectionReasons)
214
+ console.log(` rejects: ${reason}`);
215
+ }
216
+ }
217
+ if (report.rejectedCandidates && report.rejectedCandidates.length > 0) {
218
+ console.log("Rejected by profile:");
219
+ for (const candidate of report.rejectedCandidates) {
220
+ console.log(` [${candidate.source}] ${candidate.id} "${candidate.title}" ${candidate.license}`);
221
+ for (const reason of candidate.profile?.rejectionReasons ?? [])
222
+ console.log(` rejects: ${reason}`);
223
+ }
224
+ }
225
+ if (report.deepLinks.length > 0) {
226
+ console.log("Marketplace deep-links (manual download, license check required):");
227
+ for (const link of report.deepLinks) {
228
+ console.log(` ${link.id} "${link.title}" ${link.sourcePage ?? ""}`.trimEnd());
229
+ }
230
+ }
231
+ for (const warning of report.warnings)
232
+ console.error(`warning: ${warning}`);
233
+ }
234
+ //# sourceMappingURL=cli-options.js.map