@mulmocast/extended-types 0.1.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 (3) hide show
  1. package/lib/index.d.ts +2006 -0
  2. package/lib/index.js +79 -0
  3. package/package.json +37 -0
package/lib/index.js ADDED
@@ -0,0 +1,79 @@
1
+ import { z } from "zod";
2
+ import { mulmoBeatSchema, mulmoScriptSchema, mulmoImageAssetSchema } from "mulmocast";
3
+ /**
4
+ * Beat Variant - profile-specific content overrides
5
+ */
6
+ export const beatVariantSchema = z.object({
7
+ text: z.string().optional(),
8
+ skip: z.boolean().optional(),
9
+ image: mulmoImageAssetSchema.optional(),
10
+ imagePrompt: z.string().optional(),
11
+ });
12
+ /**
13
+ * Beat Meta - metadata for filtering and context
14
+ */
15
+ export const beatMetaSchema = z.object({
16
+ tags: z.array(z.string()).optional(),
17
+ section: z.string().optional(),
18
+ context: z.string().optional(),
19
+ keywords: z.array(z.string()).optional(),
20
+ expectedQuestions: z.array(z.string()).optional(),
21
+ });
22
+ /**
23
+ * Extended Beat - beat with variants and meta fields
24
+ */
25
+ export const extendedBeatSchema = mulmoBeatSchema.extend({
26
+ variants: z.record(z.string(), beatVariantSchema).optional(),
27
+ meta: beatMetaSchema.optional(),
28
+ });
29
+ /**
30
+ * Output Profile - profile display information
31
+ */
32
+ export const outputProfileSchema = z.object({
33
+ name: z.string(),
34
+ description: z.string().optional(),
35
+ });
36
+ /**
37
+ * Reference - external resource reference
38
+ */
39
+ export const referenceSchema = z.object({
40
+ type: z.enum(["web", "code", "document", "video"]).optional(),
41
+ url: z.string(),
42
+ title: z.string().optional(),
43
+ description: z.string().optional(),
44
+ });
45
+ /**
46
+ * FAQ - frequently asked question
47
+ */
48
+ export const faqSchema = z.object({
49
+ question: z.string(),
50
+ answer: z.string(),
51
+ relatedBeats: z.array(z.string()).optional(),
52
+ });
53
+ /**
54
+ * Script Meta - script-level metadata for AI features
55
+ */
56
+ export const scriptMetaSchema = z.object({
57
+ // Target audience and prerequisites
58
+ audience: z.string().optional(),
59
+ prerequisites: z.array(z.string()).optional(),
60
+ // Learning goals and background
61
+ goals: z.array(z.string()).optional(),
62
+ background: z.string().optional(),
63
+ // FAQ for quick Q&A matching
64
+ faq: z.array(faqSchema).optional(),
65
+ // Search and discovery
66
+ keywords: z.array(z.string()).optional(),
67
+ references: z.array(referenceSchema).optional(),
68
+ // Authoring info
69
+ author: z.string().optional(),
70
+ version: z.string().optional(),
71
+ });
72
+ /**
73
+ * Extended Script - script with variants, meta, and outputProfiles
74
+ */
75
+ export const extendedScriptSchema = mulmoScriptSchema.extend({
76
+ beats: z.array(extendedBeatSchema),
77
+ outputProfiles: z.record(z.string(), outputProfileSchema).optional(),
78
+ scriptMeta: scriptMetaSchema.optional(),
79
+ });
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@mulmocast/extended-types",
3
+ "version": "0.1.0",
4
+ "description": "Type definitions and Zod schemas for MulmoScript ExtendedScript format",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "./lib"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc",
19
+ "lint": "eslint src",
20
+ "format": "prettier --write 'src/**/*.ts'",
21
+ "test": "node --import tsx --test test/*.ts"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/receptron/mulmocast-plus.git"
26
+ },
27
+ "author": "receptron",
28
+ "license": "MIT",
29
+ "bugs": {
30
+ "url": "https://github.com/receptron/mulmocast-plus/issues"
31
+ },
32
+ "homepage": "https://github.com/receptron/mulmocast-plus#readme",
33
+ "dependencies": {
34
+ "mulmocast": "^2.1.35",
35
+ "zod": "^4.3.6"
36
+ }
37
+ }