@drawcall/market 0.1.28 → 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/README.md +135 -0
- package/dist/asset-implementation.d.ts +6 -1
- package/dist/asset-implementation.d.ts.map +1 -1
- package/dist/cli.js +3 -4
- package/dist/cli.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +2 -1
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/preview.d.ts +1 -1
- package/dist/commands/preview.d.ts.map +1 -1
- package/dist/commands/preview.js +18 -28
- package/dist/commands/preview.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -1
- package/dist/contract.d.ts +7 -4
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +1 -1
- package/dist/contract.js.map +1 -1
- package/dist/install.d.ts +1 -0
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +1 -0
- package/dist/install.js.map +1 -1
- package/dist/output.d.ts +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +29 -2
- package/dist/output.js.map +1 -1
- package/dist/resolve.d.ts +1 -0
- package/dist/resolve.d.ts.map +1 -1
- package/dist/resolve.js +1 -0
- package/dist/resolve.js.map +1 -1
- package/dist/schemas.d.ts +6 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +1 -0
- package/dist/schemas.js.map +1 -1
- package/dist/skill.d.ts +1 -1
- package/dist/skill.d.ts.map +1 -1
- package/dist/skill.js +2 -2
- package/package.json +1 -1
- package/src/asset-implementation.ts +6 -1
- package/src/cli.ts +8 -15
- package/src/commands/install.ts +3 -1
- package/src/commands/preview.ts +18 -37
- package/src/constants.ts +2 -0
- package/src/contract.ts +4 -2
- package/src/install.ts +2 -0
- package/src/output.ts +33 -2
- package/src/resolve.ts +2 -0
- package/src/schemas.ts +1 -0
- package/src/skill.ts +2 -2
- package/tests/install-layout.test.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AC,IAAI,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC,CAAA;AAChD,CAAC"}
|
package/dist/resolve.d.ts
CHANGED
package/dist/resolve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC1C;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC1C;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAsB,OAAO,CAC3B,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,EAC7B,QAAQ,EAAE,YAAY,EAAE,EACxB,IAAI,GAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC1C;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC1C;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAsB,OAAO,CAC3B,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,EAC7B,QAAQ,EAAE,YAAY,EAAE,EACxB,IAAI,GAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,OAAO,CAAC,aAAa,CAAC,CAgFxB"}
|
package/dist/resolve.js
CHANGED
|
@@ -49,6 +49,7 @@ export async function resolve(client, requests, opts = {}) {
|
|
|
49
49
|
const skillDeps = parseDependencies(meta.skillDependencies, assetName, 'skill');
|
|
50
50
|
resolved.set(assetName, {
|
|
51
51
|
name: assetName,
|
|
52
|
+
type: meta.type,
|
|
52
53
|
version: meta.latestVersion,
|
|
53
54
|
npmDependencies: npmDeps,
|
|
54
55
|
assetDependencies: assetDeps,
|
package/dist/resolve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sour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,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAC1C,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CACrE,CAAA;QACD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,eAAe,CACvB,8BAA8B,GAAG,yDAAyD;gBACxF,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAChE,CAAA;QACH,CAAC;QAED,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAA;IAC/B,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const ASSET_TYPES: readonly ["model", "humanoid-model", "texture", "humanoid-animation", "template", "sound-effect", "background-music", "environment"];
|
|
2
|
+
export declare const ASSET_TYPES: readonly ["model", "humanoid-model", "texture", "humanoid-animation", "template", "sound-effect", "background-music", "environment", "tutorial"];
|
|
3
3
|
export type AssetType = (typeof ASSET_TYPES)[number];
|
|
4
4
|
export declare const assetTypeSchema: z.ZodEnum<{
|
|
5
5
|
model: "model";
|
|
@@ -10,6 +10,7 @@ export declare const assetTypeSchema: z.ZodEnum<{
|
|
|
10
10
|
"sound-effect": "sound-effect";
|
|
11
11
|
"background-music": "background-music";
|
|
12
12
|
environment: "environment";
|
|
13
|
+
tutorial: "tutorial";
|
|
13
14
|
}>;
|
|
14
15
|
export declare const MAX_UPLOAD_ZIP_SIZE_BYTES: number;
|
|
15
16
|
export declare const semverSchema: z.ZodString;
|
|
@@ -33,6 +34,7 @@ export declare const listAssetsSchema: z.ZodObject<{
|
|
|
33
34
|
"sound-effect": "sound-effect";
|
|
34
35
|
"background-music": "background-music";
|
|
35
36
|
environment: "environment";
|
|
37
|
+
tutorial: "tutorial";
|
|
36
38
|
}>>;
|
|
37
39
|
query: z.ZodOptional<z.ZodString>;
|
|
38
40
|
includeUnapproved: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -53,6 +55,7 @@ export declare const exactAssetSchema: z.ZodObject<{
|
|
|
53
55
|
"sound-effect": "sound-effect";
|
|
54
56
|
"background-music": "background-music";
|
|
55
57
|
environment: "environment";
|
|
58
|
+
tutorial: "tutorial";
|
|
56
59
|
}>>;
|
|
57
60
|
includeUnapproved: z.ZodDefault<z.ZodBoolean>;
|
|
58
61
|
}, z.core.$strip>;
|
|
@@ -67,6 +70,7 @@ export declare const uploadZipSchema: z.ZodObject<{
|
|
|
67
70
|
"sound-effect": "sound-effect";
|
|
68
71
|
"background-music": "background-music";
|
|
69
72
|
environment: "environment";
|
|
73
|
+
tutorial: "tutorial";
|
|
70
74
|
}>;
|
|
71
75
|
version: z.ZodString;
|
|
72
76
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -90,6 +94,7 @@ export declare const generateAssetSchema: z.ZodObject<{
|
|
|
90
94
|
"sound-effect": "sound-effect";
|
|
91
95
|
"background-music": "background-music";
|
|
92
96
|
environment: "environment";
|
|
97
|
+
tutorial: "tutorial";
|
|
93
98
|
}>>;
|
|
94
99
|
}, z.core.$strip>;
|
|
95
100
|
//# sourceMappingURL=schemas.d.ts.map
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,WAAW,kJAUd,CAAA;AACV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD,eAAO,MAAM,eAAe;;;;;;;;;;EAAsB,CAAA;AAElD,eAAO,MAAM,yBAAyB,QAAqB,CAAA;AAE3D,eAAO,MAAM,YAAY,aAKtB,CAAA;AAEH,eAAO,MAAM,eAAe,aAUxB,CAAA;AAEJ,eAAO,MAAM,qBAAqB,qDAA+C,CAAA;AAEjF,eAAO,MAAM,uBAAuB,qDAA+C,CAAA;AAKnF,eAAO,MAAM,uBAAuB,qDAA+C,CAAA;AAEnF,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;iBAO3B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;iBAI3B,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;iBAS1B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAG9B,CAAA"}
|
package/dist/schemas.js
CHANGED
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO;IACP,gBAAgB;IAChB,SAAS;IACT,oBAAoB;IACpB,UAAU;IACV,cAAc;IACd,kBAAkB;IAClB,aAAa;
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA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AM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,YAAY;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAC5C,eAAe,EAAE,qBAAqB;IACtC,iBAAiB,EAAE,uBAAuB;IAC1C,iBAAiB,EAAE,uBAAuB;IAC1C,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACtC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,YAAY;CACtB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACxC,IAAI,EAAE,eAAe,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAA"}
|
package/dist/skill.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const marketSkill = "---\nname: market\ndescription: Find, preview, install, generate, and publish Drawcall Market assets from a coding agent.\n---\n\n# Drawcall Market\n\nUse the `market` CLI. Keep commands short and read the summary lines.\n\n## Quick Start\n\n```sh\nmarket search \"wooden chair\" --type model --limit 3\nmarket install wooden-chair --cwd \"$PWD\"\nmarket preview wooden-chair --out /tmp/wooden-chair.png\n```\n\n## Workflow\n\n1. Search first unless the user already gave an exact asset name. `search` requires `--type`; use `model` unless the user names another supported type: `humanoid-model`, `texture`, `humanoid-animation`, `template`, `sound-effect`, `background-music`, or `environment`.\n2. Use `--limit 1` for lookup, `--limit 3` for choice. Search caps at 5. Add `--verbose` only when the one-line descriptions are not enough.\n3. `install` takes one or more exact asset names (optionally `name@range`); it does not search or generate. Find names with `search` first. No `--type` is needed \u2014 asset names are unique.\n4. `preview <name>` saves the preview image; no `--type` is needed. Not every type has previews (e.g. `humanoid-animation`, `template`, `sound-effect`, `background-music`); the CLI reports when one is unavailable.\n5. Use `--unapproved` only when the user asks for unapproved/private/admin assets. Do not install unapproved assets without explicit acceptance.\n6. `generate --type <type> \"<prompt>\"` creates a new asset; it requires login and a type that supports generation. No asset type currently supports generation.\n7. Upload only when publishing is requested: `market upload <name> <zip> \"<description>\" --type <type>`. Declare dependencies with repeatable flags: `--npm name@range`, `--asset name@range`, `--skill label=source
|
|
1
|
+
export declare const marketSkill = "---\nname: market\ndescription: Find, preview, install, generate, and publish Drawcall Market assets from a coding agent.\n---\n\n# Drawcall Market\n\nUse the `market` CLI. Keep commands short and read the summary lines.\n\n## Quick Start\n\n```sh\nmarket search \"wooden chair\" --type model --limit 3\nmarket install wooden-chair --cwd \"$PWD\"\nmarket preview wooden-chair --out /tmp/wooden-chair.png\n```\n\n## Workflow\n\n1. Search first unless the user already gave an exact asset name. `search` requires `--type`; use `model` unless the user names another supported type: `humanoid-model`, `texture`, `humanoid-animation`, `template`, `sound-effect`, `background-music`, or `environment`.\n2. Use `--limit 1` for lookup, `--limit 3` for choice. Search caps at 5. Add `--verbose` only when the one-line descriptions are not enough.\n3. `install` takes one or more exact asset names (optionally `name@range`); it does not search or generate. Find names with `search` first. No `--type` is needed \u2014 asset names are unique.\n4. `preview <name>` saves the preview image; no `--type` is needed. Not every type has previews (e.g. `humanoid-animation`, `template`, `sound-effect`, `background-music`); the CLI reports when one is unavailable.\n5. Use `--unapproved` only when the user asks for unapproved/private/admin assets. Do not install unapproved assets without explicit acceptance.\n6. `generate --type <type> \"<prompt>\"` creates a new asset; it requires login and a type that supports generation. No asset type currently supports generation.\n7. Upload only when publishing is requested: `market upload <name> <zip> \"<description>\" --type <type>`. Declare dependencies with repeatable flags: `--npm name@range`, `--asset name@range`, `--skill label=source`. A skill source is a `skills add` argument: a whole repo (`owner/repo` or a git URL), a single skill via the full URL form `https://github.com/owner/repo/tree/<branch>/<subpath>` (the `tree/<branch>/<subpath>` shorthand needs the full URL, not `owner/repo`), or a local path to a skill directory inside the zip. Example: `market upload my-scene scene.zip \"A scene\" --type model --npm three@^0.178.0 --skill web-design=https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines`.\n8. Installed `environment` assets contain `public/environment/<name>.hdr` for Three.js IBL lighting and `public/environment/<name>-background.webp` for the visible equirectangular background. Use `market preview` to fetch the preview image separately.\n\n## Output\n\nCommands print concise, line-oriented summaries:\n\n```text\nResults: 2/8 query=\"wooden chair\" type=model approval=approved\n- wooden-chair@1.0.0 | model | approved | Low-poly wooden chair\nInstalled:\n- wooden-chair@1.0.0 (asset)\n files:\n public/model\n \u2514\u2500 wooden-chair.glb\n- three@^0.178.0 (npm)\n- web-design \u2190 https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines (skill)\nSaved preview for wooden-chair@1.0.0: /tmp/wooden-chair.png\n```\n\nAssets may also declare `skill` dependencies, installed for you via the `skills` CLI (`skills add`) during `install`. Sources are either a GitHub/git ref or a local path to a skill directory shipped inside the asset. This requires `npx` to be available.\n\nIf search returns no results, try one broader noun phrase. If a command returns `Error: Not logged in...`, ask before running `market login`.\n";
|
|
2
2
|
//# sourceMappingURL=skill.d.ts.map
|
package/dist/skill.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../src/skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../src/skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,63GAgDvB,CAAA"}
|
package/dist/skill.js
CHANGED
|
@@ -23,7 +23,7 @@ market preview wooden-chair --out /tmp/wooden-chair.png
|
|
|
23
23
|
4. \`preview <name>\` saves the preview image; no \`--type\` is needed. Not every type has previews (e.g. \`humanoid-animation\`, \`template\`, \`sound-effect\`, \`background-music\`); the CLI reports when one is unavailable.
|
|
24
24
|
5. Use \`--unapproved\` only when the user asks for unapproved/private/admin assets. Do not install unapproved assets without explicit acceptance.
|
|
25
25
|
6. \`generate --type <type> "<prompt>"\` creates a new asset; it requires login and a type that supports generation. No asset type currently supports generation.
|
|
26
|
-
7. Upload only when publishing is requested: \`market upload <name> <zip> "<description>" --type <type>\`. Declare dependencies with repeatable flags: \`--npm name@range\`, \`--asset name@range\`, \`--skill label=source
|
|
26
|
+
7. Upload only when publishing is requested: \`market upload <name> <zip> "<description>" --type <type>\`. Declare dependencies with repeatable flags: \`--npm name@range\`, \`--asset name@range\`, \`--skill label=source\`. A skill source is a \`skills add\` argument: a whole repo (\`owner/repo\` or a git URL), a single skill via the full URL form \`https://github.com/owner/repo/tree/<branch>/<subpath>\` (the \`tree/<branch>/<subpath>\` shorthand needs the full URL, not \`owner/repo\`), or a local path to a skill directory inside the zip. Example: \`market upload my-scene scene.zip "A scene" --type model --npm three@^0.178.0 --skill web-design=https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines\`.
|
|
27
27
|
8. Installed \`environment\` assets contain \`public/environment/<name>.hdr\` for Three.js IBL lighting and \`public/environment/<name>-background.webp\` for the visible equirectangular background. Use \`market preview\` to fetch the preview image separately.
|
|
28
28
|
|
|
29
29
|
## Output
|
|
@@ -39,7 +39,7 @@ Installed:
|
|
|
39
39
|
public/model
|
|
40
40
|
└─ wooden-chair.glb
|
|
41
41
|
- three@^0.178.0 (npm)
|
|
42
|
-
- web-design
|
|
42
|
+
- web-design ← https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines (skill)
|
|
43
43
|
Saved preview for wooden-chair@1.0.0: /tmp/wooden-chair.png
|
|
44
44
|
\`\`\`
|
|
45
45
|
|
package/package.json
CHANGED
|
@@ -45,11 +45,16 @@ export interface AssetGenerateInput {
|
|
|
45
45
|
|
|
46
46
|
export interface AssetProvider {
|
|
47
47
|
type: AssetType
|
|
48
|
+
/**
|
|
49
|
+
* Shown to the user after an asset of this type is installed. Use it for
|
|
50
|
+
* type-specific guidance (where files landed, how to use them). Surfaced to
|
|
51
|
+
* the CLI through the `asset.postInstallMessages` contract procedure.
|
|
52
|
+
*/
|
|
53
|
+
postInstallMessage?: string
|
|
48
54
|
search(input: AssetSearchInput): Promise<PaginatedList<AssetSearchResult>>
|
|
49
55
|
exact(input: AssetExactInput): Promise<AssetSearchResult | null>
|
|
50
56
|
uploadZip(input: AssetUploadZipInput, owner: { id: string; role: string }): Promise<AssetVersion>
|
|
51
57
|
downloadZip(input: AssetDownloadZipInput): Promise<Blob>
|
|
52
|
-
downloadPreviewImage?(input: AssetDownloadZipInput): Promise<Blob>
|
|
53
58
|
generate?(input: AssetGenerateInput): Promise<GenerateAssetResult>
|
|
54
59
|
}
|
|
55
60
|
|
package/src/cli.ts
CHANGED
|
@@ -162,25 +162,18 @@ program
|
|
|
162
162
|
|
|
163
163
|
program
|
|
164
164
|
.command('preview')
|
|
165
|
-
.description(
|
|
165
|
+
.description("Save an asset's preview image")
|
|
166
166
|
.argument('<name>', 'Asset name')
|
|
167
|
-
.argument('[version]', 'Semver version')
|
|
168
167
|
.addOption(apiOption)
|
|
169
168
|
.option('--unapproved', 'Include unapproved versions', false)
|
|
170
169
|
.option('--out <file>', 'Output image path')
|
|
171
|
-
.action(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
baseUrl: opts.api,
|
|
179
|
-
unapproved: opts.unapproved,
|
|
180
|
-
out: opts.out,
|
|
181
|
-
})
|
|
182
|
-
},
|
|
183
|
-
)
|
|
170
|
+
.action(async (name: string, opts: { api?: string; unapproved: boolean; out?: string }) => {
|
|
171
|
+
await previewCommand(name, {
|
|
172
|
+
baseUrl: opts.api,
|
|
173
|
+
unapproved: opts.unapproved,
|
|
174
|
+
out: opts.out,
|
|
175
|
+
})
|
|
176
|
+
})
|
|
184
177
|
|
|
185
178
|
program
|
|
186
179
|
.command('generate')
|
package/src/commands/install.ts
CHANGED
|
@@ -42,8 +42,10 @@ export async function installCommand(args: string[], opts: InstallCommandOptions
|
|
|
42
42
|
},
|
|
43
43
|
})
|
|
44
44
|
|
|
45
|
+
const messages = await client.asset.postInstallMessages()
|
|
46
|
+
|
|
45
47
|
spinner.stop()
|
|
46
|
-
console.log(installResult(result))
|
|
48
|
+
console.log(installResult(result, messages))
|
|
47
49
|
} catch (err) {
|
|
48
50
|
spinner.stop()
|
|
49
51
|
throw err
|
package/src/commands/preview.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as path from 'path'
|
|
|
3
3
|
import ora from 'ora'
|
|
4
4
|
import { getCliClient } from '../cli-client.js'
|
|
5
5
|
import { previewResult } from '../output.js'
|
|
6
|
-
import { assetNameSchema
|
|
6
|
+
import { assetNameSchema } from '../schemas.js'
|
|
7
7
|
|
|
8
8
|
export interface PreviewCommandOptions {
|
|
9
9
|
unapproved?: boolean
|
|
@@ -11,17 +11,8 @@ export interface PreviewCommandOptions {
|
|
|
11
11
|
baseUrl?: string
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export async function previewCommand(
|
|
15
|
-
name: string,
|
|
16
|
-
version: string | undefined,
|
|
17
|
-
opts: PreviewCommandOptions,
|
|
18
|
-
): Promise<void> {
|
|
14
|
+
export async function previewCommand(name: string, opts: PreviewCommandOptions): Promise<void> {
|
|
19
15
|
const parsedName = assetNameSchema.parse(name)
|
|
20
|
-
const parsedVersion = version ? semverSchema.parse(version) : undefined
|
|
21
|
-
// The asset name is globally unique, so the server resolves the type. Whether
|
|
22
|
-
// that type supports preview images is also a server concern: the API checks
|
|
23
|
-
// for a provider `downloadPreviewImage` capability and returns a clear,
|
|
24
|
-
// type-specific error rather than us mirroring a list that can drift.
|
|
25
16
|
|
|
26
17
|
const spinner = ora({
|
|
27
18
|
text: `Resolving preview for ${parsedName}`,
|
|
@@ -31,42 +22,32 @@ export async function previewCommand(
|
|
|
31
22
|
|
|
32
23
|
try {
|
|
33
24
|
const { client } = await getCliClient({ baseUrl: opts.baseUrl })
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
includeUnapproved: opts.unapproved ?? false,
|
|
40
|
-
})
|
|
41
|
-
)?.latestVersion
|
|
42
|
-
|
|
43
|
-
if (!resolvedVersion) {
|
|
25
|
+
const asset = await client.asset.exact({
|
|
26
|
+
name: parsedName,
|
|
27
|
+
includeUnapproved: opts.unapproved ?? false,
|
|
28
|
+
})
|
|
29
|
+
if (!asset) {
|
|
44
30
|
throw new Error(`Asset "${parsedName}" not found`)
|
|
45
31
|
}
|
|
32
|
+
if (!asset.previewUrl) {
|
|
33
|
+
throw new Error(`Asset "${parsedName}" has no preview image`)
|
|
34
|
+
}
|
|
46
35
|
|
|
47
|
-
spinner.text = `Downloading preview for ${parsedName}@${
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
const bytes = new Uint8Array(await
|
|
53
|
-
const out = path.resolve(
|
|
54
|
-
opts.out ?? `${parsedName}-${resolvedVersion}-preview${previewExtension(preview.type)}`,
|
|
55
|
-
)
|
|
36
|
+
spinner.text = `Downloading preview for ${parsedName}@${asset.latestVersion}`
|
|
37
|
+
const response = await fetch(asset.previewUrl)
|
|
38
|
+
if (!response.ok) {
|
|
39
|
+
throw new Error(`Failed to download preview (${response.status}) from ${asset.previewUrl}`)
|
|
40
|
+
}
|
|
41
|
+
const bytes = new Uint8Array(await response.arrayBuffer())
|
|
42
|
+
const out = path.resolve(opts.out ?? `${parsedName}-preview.webp`)
|
|
56
43
|
|
|
57
44
|
await fs.mkdir(path.dirname(out), { recursive: true })
|
|
58
45
|
await fs.writeFile(out, bytes)
|
|
59
46
|
|
|
60
47
|
spinner.stop()
|
|
61
|
-
console.log(previewResult(parsedName,
|
|
48
|
+
console.log(previewResult(parsedName, asset.latestVersion, out))
|
|
62
49
|
} catch (err) {
|
|
63
50
|
spinner.stop()
|
|
64
51
|
throw err
|
|
65
52
|
}
|
|
66
53
|
}
|
|
67
|
-
|
|
68
|
-
function previewExtension(contentType: string): string {
|
|
69
|
-
if (contentType === 'image/webp') return '.webp'
|
|
70
|
-
if (contentType === 'image/jpeg') return '.jpg'
|
|
71
|
-
return '.png'
|
|
72
|
-
}
|
package/src/constants.ts
CHANGED
|
@@ -11,6 +11,7 @@ export const ALLOWED_EXTENSIONS: Record<AssetType, string[]> = {
|
|
|
11
11
|
'sound-effect': ['.zip'],
|
|
12
12
|
'background-music': ['.zip'],
|
|
13
13
|
environment: ['.zip'],
|
|
14
|
+
tutorial: ['.zip'],
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export const ASSET_TYPE_LABELS: Record<AssetType, string> = {
|
|
@@ -22,4 +23,5 @@ export const ASSET_TYPE_LABELS: Record<AssetType, string> = {
|
|
|
22
23
|
'sound-effect': 'Sound Effect',
|
|
23
24
|
'background-music': 'Background Music',
|
|
24
25
|
environment: 'Environment',
|
|
26
|
+
tutorial: 'Tutorial',
|
|
25
27
|
}
|
package/src/contract.ts
CHANGED
|
@@ -45,6 +45,8 @@ export interface AssetSearchResult {
|
|
|
45
45
|
npmDependencies: string
|
|
46
46
|
assetDependencies: string
|
|
47
47
|
skillDependencies: string
|
|
48
|
+
/** Public URL of the preview image, or null for types without one. */
|
|
49
|
+
previewUrl: string | null
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
export interface PaginatedList<T> {
|
|
@@ -91,9 +93,9 @@ export const contract = {
|
|
|
91
93
|
|
|
92
94
|
downloadZip: oc.input(downloadZipSchema).output(z.instanceof(Blob)),
|
|
93
95
|
|
|
94
|
-
downloadPreviewImage: oc.input(downloadZipSchema).output(z.instanceof(Blob)),
|
|
95
|
-
|
|
96
96
|
generate: oc.input(generateAssetSchema).output(z.custom<GenerateAssetResult>()),
|
|
97
|
+
|
|
98
|
+
postInstallMessages: oc.output(z.custom<Record<string, string>>()),
|
|
97
99
|
},
|
|
98
100
|
|
|
99
101
|
user: {
|
package/src/install.ts
CHANGED
|
@@ -40,6 +40,7 @@ export interface InstallOptions {
|
|
|
40
40
|
|
|
41
41
|
export interface InstalledAsset {
|
|
42
42
|
name: string
|
|
43
|
+
type: string
|
|
43
44
|
version: string
|
|
44
45
|
files: string[]
|
|
45
46
|
}
|
|
@@ -136,6 +137,7 @@ async function downloadAssets(
|
|
|
136
137
|
|
|
137
138
|
installedAssets.push({
|
|
138
139
|
name: asset.name,
|
|
140
|
+
type: asset.type,
|
|
139
141
|
version: asset.version,
|
|
140
142
|
files: installedFiles,
|
|
141
143
|
})
|
package/src/output.ts
CHANGED
|
@@ -36,17 +36,24 @@ export function assetSearchResultLine(
|
|
|
36
36
|
)}${description}`
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export function installResult(
|
|
39
|
+
export function installResult(
|
|
40
|
+
result: InstallResult,
|
|
41
|
+
postInstallMessages: Record<string, string> = {},
|
|
42
|
+
): string {
|
|
40
43
|
const npmDependencies = Object.entries(result.npmDependencies)
|
|
41
44
|
|
|
42
45
|
const lines = ['Installed:']
|
|
43
46
|
|
|
44
47
|
for (const asset of result.assets) {
|
|
45
48
|
const files = unique(asset.files)
|
|
46
|
-
lines.push(`- ${assetVersionRef(asset.name, asset.version)} (asset)`)
|
|
49
|
+
lines.push(`- ${assetVersionRef(asset.name, asset.version)} (${asset.type})`)
|
|
47
50
|
if (files.length > 0) {
|
|
48
51
|
lines.push(' files:', ...indent(fileTree(files), ' '))
|
|
49
52
|
}
|
|
53
|
+
const message = postInstallMessages[asset.type]
|
|
54
|
+
if (message) {
|
|
55
|
+
lines.push(...note(message))
|
|
56
|
+
}
|
|
50
57
|
}
|
|
51
58
|
|
|
52
59
|
if (npmDependencies.length > 0) {
|
|
@@ -69,6 +76,30 @@ export function installResult(result: InstallResult): string {
|
|
|
69
76
|
return lines.join('\n')
|
|
70
77
|
}
|
|
71
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Render an asset's post-install message as a `note:` block, word-wrapped with a
|
|
81
|
+
* hanging indent so continuation lines align under the message text.
|
|
82
|
+
*/
|
|
83
|
+
function note(message: string, width = 68): string[] {
|
|
84
|
+
const label = ' note: '
|
|
85
|
+
const hang = ' '.repeat(label.length)
|
|
86
|
+
const words = message.split(/\s+/).filter(Boolean)
|
|
87
|
+
|
|
88
|
+
const wrapped: string[] = []
|
|
89
|
+
let line = ''
|
|
90
|
+
for (const word of words) {
|
|
91
|
+
if (line && (line + ' ' + word).length > width) {
|
|
92
|
+
wrapped.push(line)
|
|
93
|
+
line = word
|
|
94
|
+
} else {
|
|
95
|
+
line = line ? `${line} ${word}` : word
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (line) wrapped.push(line)
|
|
99
|
+
|
|
100
|
+
return wrapped.map((text, index) => `${index === 0 ? label : hang}${text}`)
|
|
101
|
+
}
|
|
102
|
+
|
|
72
103
|
export function generatedInstallResult(name: string, version: string): string {
|
|
73
104
|
return `Generated and installed ${assetVersionRef(name, version)}`
|
|
74
105
|
}
|
package/src/resolve.ts
CHANGED
|
@@ -15,6 +15,7 @@ import type { AssetSearchResult } from './contract.js'
|
|
|
15
15
|
|
|
16
16
|
export interface ResolvedAsset {
|
|
17
17
|
name: string
|
|
18
|
+
type: string
|
|
18
19
|
version: string
|
|
19
20
|
npmDependencies: Record<string, string>
|
|
20
21
|
assetDependencies: Record<string, string>
|
|
@@ -85,6 +86,7 @@ export async function resolve(
|
|
|
85
86
|
|
|
86
87
|
resolved.set(assetName, {
|
|
87
88
|
name: assetName,
|
|
89
|
+
type: meta.type,
|
|
88
90
|
version: meta.latestVersion,
|
|
89
91
|
npmDependencies: npmDeps,
|
|
90
92
|
assetDependencies: assetDeps,
|
package/src/schemas.ts
CHANGED
package/src/skill.ts
CHANGED
|
@@ -23,7 +23,7 @@ market preview wooden-chair --out /tmp/wooden-chair.png
|
|
|
23
23
|
4. \`preview <name>\` saves the preview image; no \`--type\` is needed. Not every type has previews (e.g. \`humanoid-animation\`, \`template\`, \`sound-effect\`, \`background-music\`); the CLI reports when one is unavailable.
|
|
24
24
|
5. Use \`--unapproved\` only when the user asks for unapproved/private/admin assets. Do not install unapproved assets without explicit acceptance.
|
|
25
25
|
6. \`generate --type <type> "<prompt>"\` creates a new asset; it requires login and a type that supports generation. No asset type currently supports generation.
|
|
26
|
-
7. Upload only when publishing is requested: \`market upload <name> <zip> "<description>" --type <type>\`. Declare dependencies with repeatable flags: \`--npm name@range\`, \`--asset name@range\`, \`--skill label=source
|
|
26
|
+
7. Upload only when publishing is requested: \`market upload <name> <zip> "<description>" --type <type>\`. Declare dependencies with repeatable flags: \`--npm name@range\`, \`--asset name@range\`, \`--skill label=source\`. A skill source is a \`skills add\` argument: a whole repo (\`owner/repo\` or a git URL), a single skill via the full URL form \`https://github.com/owner/repo/tree/<branch>/<subpath>\` (the \`tree/<branch>/<subpath>\` shorthand needs the full URL, not \`owner/repo\`), or a local path to a skill directory inside the zip. Example: \`market upload my-scene scene.zip "A scene" --type model --npm three@^0.178.0 --skill web-design=https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines\`.
|
|
27
27
|
8. Installed \`environment\` assets contain \`public/environment/<name>.hdr\` for Three.js IBL lighting and \`public/environment/<name>-background.webp\` for the visible equirectangular background. Use \`market preview\` to fetch the preview image separately.
|
|
28
28
|
|
|
29
29
|
## Output
|
|
@@ -39,7 +39,7 @@ Installed:
|
|
|
39
39
|
public/model
|
|
40
40
|
└─ wooden-chair.glb
|
|
41
41
|
- three@^0.178.0 (npm)
|
|
42
|
-
- web-design
|
|
42
|
+
- web-design ← https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines (skill)
|
|
43
43
|
Saved preview for wooden-chair@1.0.0: /tmp/wooden-chair.png
|
|
44
44
|
\`\`\`
|
|
45
45
|
|
|
@@ -27,6 +27,7 @@ test('install writes zip files into the package root', async () => {
|
|
|
27
27
|
assets: [
|
|
28
28
|
{
|
|
29
29
|
name: 'idle-loop',
|
|
30
|
+
type: 'humanoid-animation',
|
|
30
31
|
version: '1.0.0',
|
|
31
32
|
npmDependencies: {},
|
|
32
33
|
assetDependencies: {},
|
|
@@ -43,6 +44,7 @@ test('install writes zip files into the package root', async () => {
|
|
|
43
44
|
assets: [
|
|
44
45
|
{
|
|
45
46
|
name: 'idle-loop',
|
|
47
|
+
type: 'humanoid-animation',
|
|
46
48
|
version: '1.0.0',
|
|
47
49
|
files: ['public/humanoid-animation/idle-loop.glb', 'src/generated/idle-loop.ts'],
|
|
48
50
|
},
|
|
@@ -75,6 +77,7 @@ test('install rejects zip paths that escape through parent segments', async () =
|
|
|
75
77
|
assets: [
|
|
76
78
|
{
|
|
77
79
|
name: 'bad-path',
|
|
80
|
+
type: 'template',
|
|
78
81
|
version: '1.0.0',
|
|
79
82
|
npmDependencies: {},
|
|
80
83
|
assetDependencies: {},
|
|
@@ -107,6 +110,7 @@ test('install runs the skills runner per dependency, resolving local paths again
|
|
|
107
110
|
assets: [
|
|
108
111
|
{
|
|
109
112
|
name: 'with-skills',
|
|
113
|
+
type: 'template',
|
|
110
114
|
version: '1.0.0',
|
|
111
115
|
npmDependencies: {},
|
|
112
116
|
assetDependencies: {},
|