@cyber-dash-tech/revela 0.18.8 → 0.18.10

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.
@@ -11,11 +11,15 @@ import {
11
11
  getDesignLayout,
12
12
  getDesignSection,
13
13
  getDesignSkillMd,
14
+ installDesignArchive,
14
15
  installDesignDraftPackage,
16
+ listDesignAssets,
15
17
  listDesigns,
18
+ packDesignPackage,
16
19
  seedBuiltinDesigns,
17
20
  validateDesignDraftPackage,
18
21
  validateDesignPackage,
22
+ type DesignPackageAssetInput,
19
23
  } from "../design/designs"
20
24
  import { createDeckFoundation as createDeckFoundationShell } from "../deck-html/foundation"
21
25
  import { activeDomain, activateDomain, createDomainDraftPackage, createDomainPackage, getDomainSkillMd, installDomainDraftPackage, listDomains, seedBuiltinDomains, validateDomainDraftPackage, validateDomainPackage } from "../domain/domains"
@@ -85,6 +89,7 @@ export interface RuntimeDesignCreateInput {
85
89
  base?: string
86
90
  designMd: string
87
91
  previewHtml: string
92
+ assets?: DesignPackageAssetInput[]
88
93
  overwrite?: boolean
89
94
  }
90
95
 
@@ -103,6 +108,21 @@ export interface RuntimeDraftInstallInput extends RuntimeWorkspaceInput {
103
108
  overwrite?: boolean
104
109
  }
105
110
 
111
+ export interface RuntimeDesignPackInput extends RuntimeWorkspaceInput {
112
+ name: string
113
+ source?: "draft" | "installed"
114
+ outputPath?: string
115
+ format?: "tar.gz" | "tar"
116
+ overwrite?: boolean
117
+ }
118
+
119
+ export interface RuntimeDesignArchiveInstallInput {
120
+ archivePath: string
121
+ name?: string
122
+ overwrite?: boolean
123
+ activate?: boolean
124
+ }
125
+
106
126
  export interface RuntimeNameInput {
107
127
  name: string
108
128
  }
@@ -296,6 +316,7 @@ export function designRead(input: RuntimeDesignReadInput = {}) {
296
316
  name,
297
317
  section: input.section,
298
318
  markdown,
319
+ assets: listDesignAssets(name),
299
320
  }
300
321
  if (input.section === "rules") recordDesignRulesRead(root(input.workspaceRoot), name, markdown)
301
322
  return result
@@ -304,6 +325,7 @@ export function designRead(input: RuntimeDesignReadInput = {}) {
304
325
  ok: true,
305
326
  name,
306
327
  markdown: getDesignSkillMd(name),
328
+ assets: listDesignAssets(name),
307
329
  }
308
330
  }
309
331
 
@@ -341,6 +363,7 @@ export function designCreate(input: RuntimeDesignCreateInput) {
341
363
  base: input.base,
342
364
  designMd: requiredString(input?.designMd, "designMd"),
343
365
  previewHtml: requiredString(input?.previewHtml, "previewHtml"),
366
+ assets: input.assets,
344
367
  overwrite: input.overwrite ?? false,
345
368
  })
346
369
  }
@@ -356,6 +379,7 @@ export function designDraftCreate(input: RuntimeDesignDraftCreateInput) {
356
379
  base: input.base,
357
380
  designMd: requiredString(input?.designMd, "designMd"),
358
381
  previewHtml: requiredString(input?.previewHtml, "previewHtml"),
382
+ assets: input.assets,
359
383
  overwrite: input.overwrite ?? false,
360
384
  })
361
385
  }
@@ -373,6 +397,31 @@ export function designDraftInstall(input: RuntimeDraftInstallInput) {
373
397
  })
374
398
  }
375
399
 
400
+ export function designPack(input: RuntimeDesignPackInput) {
401
+ return packDesignPackage({
402
+ workspaceRoot: root(input.workspaceRoot),
403
+ name: requiredName(input, "design"),
404
+ source: input.source,
405
+ outputPath: input.outputPath,
406
+ format: input.format,
407
+ overwrite: input.overwrite ?? false,
408
+ })
409
+ }
410
+
411
+ export function designInstallArchive(input: RuntimeDesignArchiveInstallInput) {
412
+ seedBuiltinDesigns()
413
+ const installed = installDesignArchive({
414
+ archivePath: requiredString(input?.archivePath, "archivePath"),
415
+ name: input.name,
416
+ overwrite: input.overwrite ?? false,
417
+ })
418
+ if (input.activate) {
419
+ activateDesign(installed.name)
420
+ return { ...installed, activated: true, activeDesign: installed.name }
421
+ }
422
+ return { ...installed, activated: false }
423
+ }
424
+
376
425
  export interface DesignRulesReadinessResult {
377
426
  ok: boolean
378
427
  activeDesign: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyber-dash-tech/revela",
3
- "version": "0.18.8",
3
+ "version": "0.18.10",
4
4
  "description": "OpenCode plugin for trusted narrative artifacts from local sources, research, and evidence",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "revela": {
4
4
  "command": "npx",
5
- "args": ["-y", "@cyber-dash-tech/revela@0.18.8", "mcp"]
5
+ "args": ["-y", "@cyber-dash-tech/revela@0.18.10", "mcp"]
6
6
  }
7
7
  }
8
8
  }
@@ -28,6 +28,8 @@ type RuntimeModule = {
28
28
  designDraftCreate(input: any): any
29
29
  designDraftValidate(input: any): any
30
30
  designDraftInstall(input: any): any
31
+ designPack(input: any): any
32
+ designInstallArchive(input: any): any
31
33
  domainList(): any
32
34
  domainRead(input?: any): any
33
35
  domainActivate(input: any): any
@@ -175,6 +177,7 @@ const tools = [
175
177
  base: stringProp("Optional base design used as structural scaffold."),
176
178
  designMd: requiredStringProp("Complete DESIGN.md content."),
177
179
  previewHtml: requiredStringProp("Complete preview.html content."),
180
+ assets: designAssetsProp(),
178
181
  overwrite: booleanProp("Whether to replace an existing local design package. Defaults to false."),
179
182
  }, ["name", "designMd", "previewHtml"]),
180
183
  },
@@ -192,6 +195,7 @@ const tools = [
192
195
  base: stringProp("Optional base design used as structural scaffold."),
193
196
  designMd: requiredStringProp("Complete DESIGN.md content."),
194
197
  previewHtml: requiredStringProp("Complete preview.html content."),
198
+ assets: designAssetsProp(),
195
199
  overwrite: booleanProp("Whether to replace an existing workspace draft. Defaults to false."),
196
200
  }, ["name", "designMd", "previewHtml"]),
197
201
  },
@@ -212,6 +216,28 @@ const tools = [
212
216
  overwrite: booleanProp("Whether to replace an existing user-level design package. Defaults to false."),
213
217
  }, ["name"]),
214
218
  },
219
+ {
220
+ name: "revela_design_pack",
221
+ description: "Package an installed or workspace-draft Revela design as a shareable .tar or .tar.gz archive.",
222
+ inputSchema: objectSchema({
223
+ workspaceRoot: stringProp("Optional workspace root. Used for draft source lookup and default output path."),
224
+ name: requiredStringProp("Design name in kebab-case."),
225
+ source: enumProp(["draft", "installed"], "Package a workspace draft or installed design. Defaults to draft when a matching draft exists."),
226
+ outputPath: stringProp("Optional archive output path. Defaults to .revela/design-archives/{name}.tar.gz under the workspace."),
227
+ format: enumProp(["tar.gz", "tar"], "Archive format. Defaults to tar.gz."),
228
+ overwrite: booleanProp("Whether to replace an existing archive. Defaults to false."),
229
+ }, ["name"]),
230
+ },
231
+ {
232
+ name: "revela_design_install_archive",
233
+ description: "Install a local .tar or .tar.gz Revela design archive into the user-level design registry.",
234
+ inputSchema: objectSchema({
235
+ archivePath: requiredStringProp("Local path to a .tar, .tar.gz, or .tgz design archive."),
236
+ name: stringProp("Optional installed design name override."),
237
+ overwrite: booleanProp("Whether to replace an existing user-level design package. Defaults to false."),
238
+ activate: booleanProp("Whether to activate the design after installation. Defaults to false."),
239
+ }, ["archivePath"]),
240
+ },
215
241
  {
216
242
  name: "revela_domain_list",
217
243
  description: "List installed Revela narrative domains and the active domain.",
@@ -410,6 +436,8 @@ async function callTool(name: string, args: any): Promise<any> {
410
436
  if (name === "revela_design_draft_create") return r.designDraftCreate(args)
411
437
  if (name === "revela_design_draft_validate") return r.designDraftValidate(args)
412
438
  if (name === "revela_design_draft_install") return r.designDraftInstall(args)
439
+ if (name === "revela_design_pack") return r.designPack(args)
440
+ if (name === "revela_design_install_archive") return r.designInstallArchive(args)
413
441
  if (name === "revela_domain_list") return r.domainList()
414
442
  if (name === "revela_domain_read") return r.domainRead(args)
415
443
  if (name === "revela_domain_activate") return r.domainActivate(args)
@@ -495,6 +523,24 @@ function arrayObjectProp(description: string) {
495
523
  }
496
524
  }
497
525
 
526
+ function designAssetsProp() {
527
+ return {
528
+ type: "array",
529
+ description: "Optional design-owned assets to write under assets/**. Each item must use path plus content, contentBase64, or sourcePath.",
530
+ items: {
531
+ type: "object",
532
+ properties: {
533
+ path: { type: "string", description: "Package-relative asset path. Must start with assets/." },
534
+ content: { type: "string", description: "UTF-8 text asset content." },
535
+ contentBase64: { type: "string", description: "Base64-encoded binary asset content." },
536
+ sourcePath: { type: "string", description: "Local file path to copy into the design asset." },
537
+ },
538
+ required: ["path"],
539
+ additionalProperties: false,
540
+ },
541
+ }
542
+ }
543
+
498
544
  function componentPlanArrayProp() {
499
545
  const childSchema: any = {
500
546
  type: "object",
@@ -1,17 +1,19 @@
1
1
  ---
2
2
  name: revela-design
3
- description: Create, edit, validate, install, activate, inspect, or list Revela design packages in Codex using design MCP tools.
3
+ description: Create, edit, validate, package, share, install, activate, inspect, or list Revela design packages in Codex using design MCP tools.
4
4
  ---
5
5
 
6
6
  # Revela Design
7
7
 
8
- Use this skill when the user asks to create, customize, edit, validate, install, activate, inspect, list, or switch a Revela design.
8
+ Use this skill when the user asks to create, customize, edit, validate, package, share, install, activate, inspect, list, or switch a Revela design.
9
9
 
10
10
  ## Contract
11
11
 
12
12
  - Designs define deck visual systems: rules, foundation, layouts, components, chart rules, and preview coverage.
13
+ - Designs may include package-owned `assets/**` such as cover or closing backgrounds; design tools surface these as design elements, not source evidence.
13
14
  - Default authoring is workspace draft first, then validate, then install only when appropriate.
14
15
  - Direct user-level creation is reserved for explicit create/install-now requests.
16
+ - Shareable design archives are `.tar` or `.tar.gz`; install archives only from trusted local paths.
15
17
  - Do not use domain tools for visual design work.
16
18
  - Do not generate deck HTML while authoring a design.
17
19
 
@@ -34,6 +36,14 @@ For new or edited designs:
34
36
  7. Call `revela_design_draft_install` only after the draft validates and the user intent is to install it.
35
37
  8. Call `revela_design_activate` only when the user asks to make it active.
36
38
 
39
+ For sharing or installing design archives:
40
+
41
+ 1. Call `revela_design_draft_validate` or `revela_design_validate` before packaging.
42
+ 2. Call `revela_design_pack` to create a `.tar.gz` archive from a workspace draft or installed design.
43
+ 3. Call `revela_design_install_archive` to install a local `.tar` or `.tar.gz` archive.
44
+ 4. After archive installation, call `revela_design_inventory` or `revela_design_read` to confirm the design and assets are readable.
45
+ 5. Call `revela_design_activate` only when the user asks to make the installed design active, or use `activate: true` on archive install when the request is explicit.
46
+
37
47
  Use `revela_design_create` only when the user explicitly requests direct local creation outside the workspace draft workflow. Follow it with `revela_design_validate`.
38
48
 
39
49
  ## Design Package Requirements
@@ -41,6 +51,7 @@ Use `revela_design_create` only when the user explicitly requests direct local c
41
51
  - Use a kebab-case design name.
42
52
  - `DESIGN.md` must include valid frontmatter and complete design marker sections.
43
53
  - Include design rules, foundation guidance, at least one layout, and at least one component.
54
+ - Optional assets must live under `assets/**`; reference them as package-relative paths like `assets/cover-background.png`.
44
55
  - `preview.html` must use the fixed Revela preview canvas contract and visibly preview the design.
45
56
  - Preview must include cover and closing examples and showcase every component.
46
57
  - Preserve source inspiration and limitations explicitly; do not copy copyrighted design text or assets into the package.
@@ -48,6 +59,8 @@ Use `revela_design_create` only when the user explicitly requests direct local c
48
59
  ## Outputs
49
60
 
50
61
  - Design draft path/status or installed design name.
62
+ - Archive path/status when packaging or installing a shareable design.
63
+ - Asset metadata surfaced by read/inventory tools when `assets/**` exists.
51
64
  - Validation result and any remaining diagnostics.
52
65
  - Whether the design was activated.
53
66
  - Next step, usually `revela-research` for planning with the design or `revela-make-deck` when a valid `deck-plan.md` already exists.
@@ -48,12 +48,21 @@ Use this skill to turn user intent and available workspace context into a concis
48
48
  - `## Audience`
49
49
  - `## Decision Or Action`
50
50
  - `## Output`
51
+ - `## Language`
52
+ - `## Domain / Use Case`
53
+ - `## Design`
51
54
  - `## Constraints`
52
55
  - `## Available Materials`
53
56
  - `## Known Gaps`
54
57
  - `## Acceptance Criteria`
55
58
  - `## Recommended Next Step`
56
59
 
60
+ Section expectations:
61
+
62
+ - `## Language`: output language, terminology preference, and localization notes.
63
+ - `## Domain / Use Case`: active or requested domain, business/use-case context, and decision context.
64
+ - `## Design`: active or requested design, visual direction, and brand/style constraints.
65
+
57
66
  Use explicit `Unknown` or `Pending user input` entries instead of inventing requirements.
58
67
 
59
68
  ## Outputs