@drawcall/market 0.8.30 → 0.9.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 (94) hide show
  1. package/README.md +19 -1
  2. package/dist/auth.d.ts +4 -0
  3. package/dist/auth.d.ts.map +1 -0
  4. package/dist/auth.js +32 -0
  5. package/dist/auth.js.map +1 -0
  6. package/dist/cli.js +2 -2
  7. package/dist/cli.js.map +1 -1
  8. package/dist/command.d.ts +0 -1
  9. package/dist/command.d.ts.map +1 -1
  10. package/dist/command.js +2 -36
  11. package/dist/command.js.map +1 -1
  12. package/dist/commands/preview.d.ts +1 -1
  13. package/dist/commands/preview.d.ts.map +1 -1
  14. package/dist/commands/preview.js +2 -2
  15. package/dist/commands/preview.js.map +1 -1
  16. package/dist/commands/urls.js +2 -2
  17. package/dist/commands/urls.js.map +1 -1
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +2 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/mcp/agent.d.ts +4 -0
  23. package/dist/mcp/agent.d.ts.map +1 -0
  24. package/dist/mcp/agent.js +27 -0
  25. package/dist/mcp/agent.js.map +1 -0
  26. package/dist/mcp/asset.d.ts +4 -0
  27. package/dist/mcp/asset.d.ts.map +1 -0
  28. package/dist/mcp/asset.js +124 -0
  29. package/dist/mcp/asset.js.map +1 -0
  30. package/dist/mcp/generation.d.ts +4 -0
  31. package/dist/mcp/generation.d.ts.map +1 -0
  32. package/dist/mcp/generation.js +28 -0
  33. package/dist/mcp/generation.js.map +1 -0
  34. package/dist/mcp/index.d.ts +3 -0
  35. package/dist/mcp/index.d.ts.map +1 -0
  36. package/dist/mcp/index.js +2 -0
  37. package/dist/mcp/index.js.map +1 -0
  38. package/dist/mcp/instructions.d.ts +3 -0
  39. package/dist/mcp/instructions.d.ts.map +1 -0
  40. package/dist/mcp/instructions.js +16 -0
  41. package/dist/mcp/instructions.js.map +1 -0
  42. package/dist/mcp/register.d.ts +4 -0
  43. package/dist/mcp/register.d.ts.map +1 -0
  44. package/dist/mcp/register.js +13 -0
  45. package/dist/mcp/register.js.map +1 -0
  46. package/dist/mcp/result.d.ts +4 -0
  47. package/dist/mcp/result.d.ts.map +1 -0
  48. package/dist/mcp/result.js +14 -0
  49. package/dist/mcp/result.js.map +1 -0
  50. package/dist/mcp/types.d.ts +39 -0
  51. package/dist/mcp/types.d.ts.map +1 -0
  52. package/dist/mcp/types.js +2 -0
  53. package/dist/mcp/types.js.map +1 -0
  54. package/dist/refs.d.ts +6 -0
  55. package/dist/refs.d.ts.map +1 -1
  56. package/dist/refs.js +17 -1
  57. package/dist/refs.js.map +1 -1
  58. package/dist/skill.generated.d.ts +3 -0
  59. package/dist/skill.generated.d.ts.map +1 -0
  60. package/dist/skill.generated.js +4 -0
  61. package/dist/skill.generated.js.map +1 -0
  62. package/dist/standalone.d.ts +4 -0
  63. package/dist/standalone.d.ts.map +1 -0
  64. package/dist/standalone.js +8 -0
  65. package/dist/standalone.js.map +1 -0
  66. package/package.json +14 -2
  67. package/skills/market/SKILL.md +34 -29
  68. package/src/auth.ts +42 -0
  69. package/src/cli.ts +2 -2
  70. package/src/command.ts +2 -43
  71. package/src/commands/preview.ts +2 -3
  72. package/src/commands/urls.ts +2 -2
  73. package/src/index.ts +10 -0
  74. package/src/mcp/agent.ts +39 -0
  75. package/src/mcp/asset.ts +158 -0
  76. package/src/mcp/generation.ts +41 -0
  77. package/src/mcp/index.ts +7 -0
  78. package/src/mcp/instructions.ts +22 -0
  79. package/src/mcp/register.ts +17 -0
  80. package/src/mcp/result.ts +18 -0
  81. package/src/mcp/types.ts +43 -0
  82. package/src/refs.ts +32 -1
  83. package/src/skill.generated.ts +5 -0
  84. package/src/standalone.ts +9 -0
  85. package/dist/commands/asset-ref.d.ts +0 -9
  86. package/dist/commands/asset-ref.d.ts.map +0 -1
  87. package/dist/commands/asset-ref.js +0 -19
  88. package/dist/commands/asset-ref.js.map +0 -1
  89. package/dist/skill.d.ts +0 -2
  90. package/dist/skill.d.ts.map +0 -1
  91. package/dist/skill.js +0 -60
  92. package/dist/skill.js.map +0 -1
  93. package/src/commands/asset-ref.ts +0 -35
  94. package/src/skill.ts +0 -59
package/src/skill.ts DELETED
@@ -1,59 +0,0 @@
1
- export const marketSkill = `---
2
- name: market
3
- description: Find, preview, remotely reference, install, generate, and publish Drawcall Market assets from a coding agent.
4
- ---
5
-
6
- # Drawcall Market
7
-
8
- Run commands as \`npx @drawcall/market <command>\`; do not assume a global \`market\` binary. Use only the parts of this guide needed for the task.
9
-
10
- ## Choose and install
11
-
12
- Run \`npx @drawcall/market types\` when you need the current asset types, generation support, or type-specific search guidance.
13
-
14
- Search one concrete need at a time:
15
-
16
- \`npx @drawcall/market search "<query>" --type <type> --limit 3\`
17
-
18
- Use \`--limit 1\` for an exact lookup and \`--limit 3\` for a choice. Search requires \`--type\` and prints full descriptions. If nothing fits, try one broader noun phrase.
19
-
20
- Preview a finalist when the type supports it:
21
-
22
- \`npx @drawcall/market preview <name@version> --out /tmp/<name>.png\`
23
-
24
- When the codebase cannot accept local asset files, resolve fetch-ready remote URLs without writing to the project:
25
-
26
- \`npx @drawcall/market urls <name@version>\`
27
-
28
- \`urls\` prints one \`base\`, URL-ready file subpaths, and a \`preview\`; each file URL is the base plus its indented subpath. Capability-bearing private URLs are secrets. Otherwise, search and preview only select an asset—a local consumer path is valid only after install or generation succeeds. Never derive a browser path from an asset name or preview metadata.
29
-
30
- The exact \`name@version\` token printed before the first \`|\` in a search result is authoritative. Copy it verbatim. Generated identifiers can legitimately end mid-word at the catalog limit; never expand, normalize, or reconstruct one from the description beside it.
31
-
32
- Install exact refs together in one call; names need no \`--type\`:
33
-
34
- \`npx @drawcall/market install <name@range...> --cwd "$PWD"\`
35
-
36
- Install prints the exact files it wrote and records the dependency so packing and later rebuilds can restore it. It never searches or generates. With no refs it installs \`assetDependencies\` from the nearest \`package.json\`. Assets may install declared skill dependencies with \`npx skills add\`. Use \`--force\` only with permission to overwrite changed local files.
37
-
38
- \`list --cwd "$PWD"\` is an offline, compact inventory of the \`assetDependencies\` in the nearest \`package.json\`, including file aliases. When selected refs are already installed, read this inventory instead of reinstalling them.
39
-
40
- An \`assetDependencies\` entry is either a range string or \`{ "version": "<range>", "alias": { "<canonical path>": "<current path>" } }\`. An alias records where the project keeps a renamed installed file: install writes the file at the aliased path, and packing omits exactly that one copy (extra duplicates ship as project content). Run \`sync --cwd "$PWD"\` after renaming installed files to record aliases in \`package.json\`; template packing runs the same update automatically.
41
-
42
- ## Generate
43
-
44
- \`npx @drawcall/market generate --type <type> "<description>"\` creates and installs one provider-supported asset. It requires login and normally waits through provider generation before printing exact installed paths and type-specific usage guidance. Unsupported types report an error. If an unusually long job returns a continuation, run the printed \`generate install <jobId>\`; it resumes the same server-side job rather than generating again.
45
-
46
- The description is provider input, not the installed filename. The command's successful output is the source of truth for consumer paths, so update a consumer with its exact printed browser path after success. If generation fails, leave the current path unchanged.
47
-
48
- Add repeatable \`--reference-image <file-or-url>\` when the result should match given images; \`types\` shows which asset types accept reference images. A remote ref must be a direct fetchable image URL, never a webpage URL; use the page only to find its underlying image. An environment matches the look of the references (at most 4). Types without reference image support reject them.
49
-
50
- A generated humanoid-model is one expressive, animation-ready biped asset: one head, two arms, two legs, open empty hands, and no companions or scene. Describe its identity, theme, silhouette, clothing, colors, and materials rather than adding generation instructions. Keep imaginative species, creature, robotic, and fantasy ideas; express topology outside the shared skeleton as worn, costume, or body-surface design. A person or humanoid reference preserves the main subject's identity and distinctive features, while a non-person reference supplies visual language such as shapes, colors, and materials (at most 2 references). This boundary keeps the asset riggable without reducing it to a generic human.
51
-
52
- Add \`--access public\` or \`--access private\` when visibility matters. Omitted access follows the account entitlement; private generation requires \`market:private\`.
53
-
54
- ## Publish only when asked
55
-
56
- Use \`pack <source> --out <zip>\` to create a Market zip and \`upload <name> <source> "<description>" --type <type>\` to publish it. Both accept repeatable \`--npm name@range\`, \`--asset name@range\`, and \`--skill label=source\` dependencies. Template packing reads root \`assetDependencies\` and may use the API to omit installed dependency files matched by content hash — even when renamed — recording renames as aliases. A skill source is \`owner/repo\`, a git URL, a full GitHub \`tree/<branch>/<subpath>\` URL, or a local skill directory inside the zip. Use the command's \`--help\` for syntax.
57
-
58
- Use \`--unapproved\` only when explicitly requested. Do not install an unapproved asset without acceptance. If login is required, ask before running \`npx @drawcall/market login\`.
59
- `