From 5172de6693036247b85461824b68ca134da1b5ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:24:52 +0000 Subject: [PATCH] Update documentation to reflect removal of functions.json files Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- packages/package_validator/package.json | 6 ------ schemas/package-schemas/ASSETS_SCHEMA_SUMMARY.md | 2 +- schemas/package-schemas/NEW_SCHEMAS_SUMMARY.md | 2 +- schemas/package-schemas/REVIEW_SUMMARY.md | 4 ++-- schemas/package-schemas/SCHEMAS_README.md | 2 +- schemas/package-schemas/examples/README.md | 4 ++-- schemas/package-schemas/index_schema.json | 2 +- storybook/JSON_PACKAGES.md | 2 +- storybook/src/stories/Introduction.mdx | 10 +++++----- 9 files changed, 14 insertions(+), 20 deletions(-) diff --git a/packages/package_validator/package.json b/packages/package_validator/package.json index 1fc434fcd..9538f8fa7 100644 --- a/packages/package_validator/package.json +++ b/packages/package_validator/package.json @@ -75,12 +75,6 @@ "ComponentDefinition" ] }, - "runtime": { - "scripts": [ - "scripts/functions.json" - ], - "main": "scripts/functions.json" - }, "tests": { "suites": [ "tests/metadata.test.json" diff --git a/schemas/package-schemas/ASSETS_SCHEMA_SUMMARY.md b/schemas/package-schemas/ASSETS_SCHEMA_SUMMARY.md index 7a2dece51..12f0751ce 100644 --- a/schemas/package-schemas/ASSETS_SCHEMA_SUMMARY.md +++ b/schemas/package-schemas/ASSETS_SCHEMA_SUMMARY.md @@ -94,7 +94,7 @@ Added comprehensive static assets schema to MetaBuilder, enabling declarative ma 3. `examples/complete-package/validation/validators.json` - Validation functions 4. `examples/complete-package/components/ui.json` - UI components 5. `examples/complete-package/styles/tokens.json` - Design tokens -6. `examples/complete-package/scripts/functions.json` - Business logic functions +6. `examples/advanced-features/scripts/automation.json` - Business logic scripts with implementations ### Documentation 7. Updated `SCHEMAS_README.md` - Added assets schema section diff --git a/schemas/package-schemas/NEW_SCHEMAS_SUMMARY.md b/schemas/package-schemas/NEW_SCHEMAS_SUMMARY.md index 8d0272a2c..facf6980b 100644 --- a/schemas/package-schemas/NEW_SCHEMAS_SUMMARY.md +++ b/schemas/package-schemas/NEW_SCHEMAS_SUMMARY.md @@ -278,7 +278,7 @@ e-commerce-package/ ├── config/ │ └── settings.json # config_schema.json (STRIPE_KEY, feature flags) ├── scripts/ -│ └── functions.json # script_schema.json +│ └── [script-name].json # script_schema.json (e.g., automation.json) ├── components/ │ └── ui.json # components_schema.json ├── validation/ diff --git a/schemas/package-schemas/REVIEW_SUMMARY.md b/schemas/package-schemas/REVIEW_SUMMARY.md index d3f0344bb..f4a6673f4 100644 --- a/schemas/package-schemas/REVIEW_SUMMARY.md +++ b/schemas/package-schemas/REVIEW_SUMMARY.md @@ -68,7 +68,7 @@ examples/ ├── minimal-package/ # Bare minimum example │ ├── package.json │ ├── entities/schema.json -│ └── scripts/functions.json +│ └── scripts/index.json # Simple script examples ├── complete-package/ # Full-featured example │ ├── package.json │ ├── entities/schema.json @@ -336,7 +336,7 @@ examples/ 1. `examples/README.md` 2. `examples/minimal-package/package.json` 3. `examples/minimal-package/entities/schema.json` -4. `examples/minimal-package/scripts/functions.json` +4. `examples/minimal-package/scripts/index.json` 5. `examples/complete-package/package.json` 6. `examples/complete-package/entities/schema.json` 7. `examples/complete-package/types/index.json` diff --git a/schemas/package-schemas/SCHEMAS_README.md b/schemas/package-schemas/SCHEMAS_README.md index 2639b8fc4..4b1d8cb34 100644 --- a/schemas/package-schemas/SCHEMAS_README.md +++ b/schemas/package-schemas/SCHEMAS_README.md @@ -39,7 +39,7 @@ my-package/ ├── types/ │ └── index.json # types_schema.json ├── scripts/ -│ └── functions.json # script_schema.json +│ └── [script-name].json # script_schema.json (e.g., automation.json) ├── components/ │ └── ui.json # components_schema.json ├── validation/ diff --git a/schemas/package-schemas/examples/README.md b/schemas/package-schemas/examples/README.md index 8445bc771..241ea8e19 100644 --- a/schemas/package-schemas/examples/README.md +++ b/schemas/package-schemas/examples/README.md @@ -18,7 +18,7 @@ The simplest valid MetaBuilder package with only required fields. **Files included:** - `package.json` - Basic metadata - `entities/schema.json` - Single User entity -- `scripts/functions.json` - Simple greeting function +- `scripts/index.json` - Simple script examples **Purpose:** Quick start template, understanding minimum requirements @@ -27,7 +27,7 @@ The simplest valid MetaBuilder package with only required fields. cd minimal-package ../../schema_validator.sh package.json ../../schema_validator.sh entities/schema.json -../../schema_validator.sh scripts/functions.json +../../schema_validator.sh scripts/index.json ``` ## Complete Package diff --git a/schemas/package-schemas/index_schema.json b/schemas/package-schemas/index_schema.json index 250061914..5d2713bf7 100644 --- a/schemas/package-schemas/index_schema.json +++ b/schemas/package-schemas/index_schema.json @@ -352,7 +352,7 @@ "package.json": "metadata", "entities/schema.json": "entities", "types/index.json": "types", - "scripts/functions.json": "script", + "scripts/*.json": "script", "components/ui.json": "components", "validation/validators.json": "validation", "styles/tokens.json": "styles", diff --git a/storybook/JSON_PACKAGES.md b/storybook/JSON_PACKAGES.md index 1178b651e..8b1011ab2 100644 --- a/storybook/JSON_PACKAGES.md +++ b/storybook/JSON_PACKAGES.md @@ -21,7 +21,7 @@ packages/ styles/ index.json # Style definitions (schema: styles_schema.json) scripts/ - functions.json # Script definitions (schema: script_schema.json) + [script-name].json # Script definitions (schema: script_schema.json, e.g., automation.json) types/ index.json # Type definitions (schema: types_schema.json) ``` diff --git a/storybook/src/stories/Introduction.mdx b/storybook/src/stories/Introduction.mdx index 1a84eabf5..0beee3d7a 100644 --- a/storybook/src/stories/Introduction.mdx +++ b/storybook/src/stories/Introduction.mdx @@ -39,7 +39,7 @@ Test packages with different user contexts: ## How It Works -1. **JSON script packages** in `/packages/*/seed/scripts/functions.json` define UI component trees +1. **JSON script packages** in `/packages/*/seed/scripts/` define UI component trees 2. **Mock data** mirrors the output structure produced by the JSON scripts 3. **PackageRenderer** (still the runtime entry) converts the component tree to React components 4. **Component Registry** maps package-defined type names to React implementations @@ -52,10 +52,10 @@ Each JSON script package follows this structure: packages/ └── {package_name}/ └── seed/ - ├── metadata.json # Package info - ├── components.json # Component definitions - └── scripts/ - └── functions.json # JSON script definitions + ├── metadata.json # Package info + ├── components.json # Component definitions + └── scripts/ + └── [script-name].json # JSON script definitions (e.g., automation.json) ``` ## JSON Script Output