{"_id":"@aiforus/dsl","_rev":"4-da7ba675ea312d5e962dec862a022709","name":"@aiforus/dsl","dist-tags":{"latest":"0.1.0","alpha":"0.1.0-alpha.1"},"versions":{"0.1.0-alpha.0":{"name":"@aiforus/dsl","version":"0.1.0-alpha.0","keywords":["aiforus","openmaic","dsl","slide","schema","contract"],"license":"MIT","_id":"@aiforus/dsl@0.1.0-alpha.0","maintainers":[{"name":"maozain","email":"391052034@qq.com"}],"homepage":"https://github.com/MaoZain/aiforus-core#readme","bugs":{"url":"https://github.com/MaoZain/aiforus-core/issues"},"dist":{"shasum":"9a418716cb6d74a9e59441e047593fbe1de2e2a0","tarball":"https://registry.npmjs.org/@aiforus/dsl/-/dsl-0.1.0-alpha.0.tgz","fileCount":50,"integrity":"sha512-XaeOgx9dc73ImtLxXRumMIE1yaHzfzxINNh0BCHr2FAfnWSu0qhE42rE3LgobtKvma05hj3SSsj1RXRVzKd0yA==","signatures":[{"sig":"MEUCIQC0SnPrz3JFQmBr3WFXpqqtMUZeYRN1c1fEF98T8VXKJgIgU3Z07kBkfMudc2IepE0jddEtlRIcbyfHvKDZqjkXwGg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":352550},"main":"./dist/index.js","type":"module","_from":"file:.artifacts/aiforus-dsl-0.1.0-alpha.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22.14.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema/*":"./dist/schema/*"},"scripts":{"dev":"tsc -p tsconfig.json --watch","test":"vitest run","build":"pnpm clean && tsc -p tsconfig.json && node scripts/gen-schema.mjs","clean":"node scripts/clean.mjs","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:schema":"node scripts/gen-schema.mjs"},"_npmUser":{"name":"maozain","email":"391052034@qq.com"},"_resolved":"/Users/maozain/projects/aiforus-core/.artifacts/aiforus-dsl-0.1.0-alpha.0.tgz","_integrity":"sha512-XaeOgx9dc73ImtLxXRumMIE1yaHzfzxINNh0BCHr2FAfnWSu0qhE42rE3LgobtKvma05hj3SSsj1RXRVzKd0yA==","repository":{"url":"git+https://github.com/MaoZain/aiforus-core.git","type":"git","directory":"packages/aiforus-dsl"},"_npmVersion":"10.9.2","description":"OpenMAIC-compatible courseware contracts, schemas, validators, and migrations maintained by AIForUs.","directories":{},"sideEffects":false,"_nodeVersion":"22.16.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"8.17.1","ts-json-schema-generator":"2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/dsl_0.1.0-alpha.0_1784138735446_0.9716266831834541","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-alpha.1":{"name":"@aiforus/dsl","version":"0.1.0-alpha.1","keywords":["aiforus","openmaic","dsl","slide","schema","contract"],"license":"MIT","_id":"@aiforus/dsl@0.1.0-alpha.1","maintainers":[{"name":"maozain","email":"391052034@qq.com"}],"homepage":"https://github.com/MaoZain/aiforus-core#readme","bugs":{"url":"https://github.com/MaoZain/aiforus-core/issues"},"dist":{"shasum":"898cad2a74a6238dd9210f53404b1cd76375be1b","tarball":"https://registry.npmjs.org/@aiforus/dsl/-/dsl-0.1.0-alpha.1.tgz","fileCount":50,"integrity":"sha512-+f4rnEqNm6uj+HEgG0oStgnURqM2gcBIPQsCmf2QVOBR25jmkBSQmiGE4fakSJx8K4kfRmR0PhlYEMhME5c6Xw==","signatures":[{"sig":"MEUCIHL4T0odbUvuZCz4x3N8yBPfw/JSL/xs+eTVSAf5hpYgAiEA9ILY+WXYAvOqk/1YzwW6L8ieuFPiKVjoa5O3Xmadv+c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiforus%2fdsl@0.1.0-alpha.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":352558},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22.14.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema/*":"./dist/schema/*"},"scripts":{"dev":"tsc -p tsconfig.json --watch","test":"vitest run","build":"pnpm clean && tsc -p tsconfig.json && node scripts/gen-schema.mjs","clean":"node scripts/clean.mjs","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:schema":"node scripts/gen-schema.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ce910f26-253b-4e9c-8521-969130d86510"}},"repository":{"url":"git+https://github.com/MaoZain/aiforus-core.git","type":"git","directory":"packages/aiforus-dsl"},"description":"OpenMAIC-compatible courseware contracts, schemas, validators, and migrations maintained by AIForUs.","directories":{},"sideEffects":false,"_nodeVersion":"22.16.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"8.17.1","ts-json-schema-generator":"2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/dsl_0.1.0-alpha.1_1784164682301_0.8169696859572997","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@aiforus/dsl","version":"0.1.0","description":"OpenMAIC-compatible courseware contracts, schemas, validators, and migrations maintained by AIForUs.","license":"MIT","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./schema/*":"./dist/schema/*"},"sideEffects":false,"engines":{"node":">=22.14.0"},"repository":{"type":"git","url":"git+https://github.com/MaoZain/aiforus-core.git","directory":"packages/aiforus-dsl"},"homepage":"https://github.com/MaoZain/aiforus-core#readme","bugs":{"url":"https://github.com/MaoZain/aiforus-core/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"keywords":["aiforus","openmaic","dsl","slide","schema","contract"],"devDependencies":{"ajv":"8.17.1","ts-json-schema-generator":"2.4.0"},"scripts":{"clean":"node scripts/clean.mjs","build":"pnpm clean && tsc -p tsconfig.json && node scripts/gen-schema.mjs","build:schema":"node scripts/gen-schema.mjs","dev":"tsc -p tsconfig.json --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc -p tsconfig.json --noEmit"},"_id":"@aiforus/dsl@0.1.0","_integrity":"sha512-s2O+DimBEEwGJyWZXjkYXMLNhFznpLi4khSXrcjrBOuaDEehfveIBJ73TeeCYoVMGCzNCfkocSxAnfZZTrtzEg==","_resolved":"/home/runner/work/aiforus-core/aiforus-core/.artifacts/aiforus-dsl-0.1.0.tgz","_from":"file:/home/runner/work/aiforus-core/aiforus-core/.artifacts/aiforus-dsl-0.1.0.tgz","_nodeVersion":"22.16.0","_npmVersion":"11.18.0","dist":{"integrity":"sha512-s2O+DimBEEwGJyWZXjkYXMLNhFznpLi4khSXrcjrBOuaDEehfveIBJ73TeeCYoVMGCzNCfkocSxAnfZZTrtzEg==","shasum":"c740d6bea732940ae207f3ddba7876d0a0dcdc9f","tarball":"https://registry.npmjs.org/@aiforus/dsl/-/dsl-0.1.0.tgz","fileCount":50,"unpackedSize":352636,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aiforus%2fdsl@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCErQ+zxT5Zdudw4CsmRq1dX0dmS7Ib7PgJbcSxaF7RPQIhAP4+3W95ypdeRs4NErzQxFo+sQisyH1GFst8794NC55c"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ce910f26-253b-4e9c-8521-969130d86510"}},"directories":{},"maintainers":[{"name":"maozain","email":"391052034@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsl_0.1.0_1784390325136_0.8745407414843123"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-15T18:05:35.318Z","modified":"2026-07-18T15:58:45.855Z","0.1.0-alpha.0":"2026-07-15T18:05:35.591Z","0.1.0-alpha.1":"2026-07-16T01:18:02.450Z","0.1.0":"2026-07-18T15:58:45.316Z"},"bugs":{"url":"https://github.com/MaoZain/aiforus-core/issues"},"license":"MIT","homepage":"https://github.com/MaoZain/aiforus-core#readme","keywords":["aiforus","openmaic","dsl","slide","schema","contract"],"repository":{"type":"git","url":"git+https://github.com/MaoZain/aiforus-core.git","directory":"packages/aiforus-dsl"},"description":"OpenMAIC-compatible courseware contracts, schemas, validators, and migrations maintained by AIForUs.","maintainers":[{"name":"maozain","email":"391052034@qq.com"}],"readme":"# @aiforus/dsl\n\nDependency-free courseware contracts compatible with the frozen OpenMAIC DSL\nbaseline. The package contains TypeScript types, JSON Schemas, validators,\nnormalizers, discriminant guards, and version/migration helpers. Rendering and\nLLM generation are deliberately outside this package.\n\n## Compatibility baseline\n\n- Upstream: `THU-MAIC/OpenMAIC`\n- Commit: `d8a0081c7d229081301dfa5f21ccfd7ba93bda51`\n- Upstream package: `@openmaic/dsl@0.4.0`\n- Serialized `DSL_VERSION`: `0.1.0`\n- License: MIT\n\nThe AIForUs package version is independent of both the OpenMAIC package version\nand the serialized DSL version. Upstream updates are reviewed and imported\nmanually; they are never synchronized automatically.\n\n## Usage\n\n```ts\nimport {\n  DSL_VERSION,\n  normalizeScene,\n  validateAction,\n  validateScene,\n  type Action,\n  type Scene,\n  type Slide,\n} from '@aiforus/dsl';\n```\n\nStatic JSON Schemas are included for non-TypeScript producers such as the\nAIForUs Django backend:\n\n```ts\nimport stageSchema from '@aiforus/dsl/schema/stage.schema.json' with { type: 'json' };\nimport sceneSchema from '@aiforus/dsl/schema/scene.schema.json' with { type: 'json' };\nimport actionSchema from '@aiforus/dsl/schema/action.schema.json' with { type: 'json' };\n```\n\nThe published schema roots are `Stage`, the default serialized `slide | quiz`\n`Scene`, and `Action`. Application-specific Deep Interactive and PBL content is\ncomposed through the generic `Scene<TAction, TContent>` extension point. It is\nnot added to the frozen slide/quiz schema and does not introduce an\n`InteractiveArtifact` type into this package.\n\n## Contract guarantees\n\n- no runtime dependencies;\n- serialized field names, discriminants, defaults, action payloads, and schema\n  roots match the pinned OpenMAIC baseline;\n- `SceneType` remains `slide | quiz | interactive | pbl`;\n- slide elements cover text, image, shape, line, chart, table, LaTeX, video,\n  audio, and code;\n- normalizers are pure and validators do not mutate input;\n- generated schemas are deterministic and pinned by compatibility hashes.\n\n## Development\n\nUse Node `22.16.0` (the repository `.node-version`) and pnpm `11.7.0`:\n\n```bash\npnpm --filter @aiforus/dsl typecheck\npnpm test --project aiforus-dsl\npnpm --filter @aiforus/dsl build\n```\n\nStable consumers should pin a compatible release range according to their own\nupgrade policy. AIForUs applications pin the exact package version so backend\nschema validation and frontend rendering always use the same contract.\n\n## Attribution\n\nThe contract implementation is derived from OpenMAIC under the MIT License.\nThe package `LICENSE` preserves both the upstream and AIForUs copyright notices;\nrepository-level details are recorded in `UPSTREAM.md` and `NOTICE`.\n","readmeFilename":"README.md"}