@angriff36/manifest 2.18.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.
- package/LICENSE +21 -0
- package/README.md +476 -0
- package/dist/manifest/agent-sdk/agent-runtime.d.ts +30 -0
- package/dist/manifest/agent-sdk/agent-runtime.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/agent-runtime.js +232 -0
- package/dist/manifest/agent-sdk/agent-runtime.js.map +1 -0
- package/dist/manifest/agent-sdk/index.d.ts +17 -0
- package/dist/manifest/agent-sdk/index.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/index.js +21 -0
- package/dist/manifest/agent-sdk/index.js.map +1 -0
- package/dist/manifest/agent-sdk/intent-mapper.d.ts +17 -0
- package/dist/manifest/agent-sdk/intent-mapper.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/intent-mapper.js +115 -0
- package/dist/manifest/agent-sdk/intent-mapper.js.map +1 -0
- package/dist/manifest/agent-sdk/introspect.d.ts +42 -0
- package/dist/manifest/agent-sdk/introspect.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/introspect.js +284 -0
- package/dist/manifest/agent-sdk/introspect.js.map +1 -0
- package/dist/manifest/agent-sdk/json-schema.d.ts +29 -0
- package/dist/manifest/agent-sdk/json-schema.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/json-schema.js +132 -0
- package/dist/manifest/agent-sdk/json-schema.js.map +1 -0
- package/dist/manifest/agent-sdk/tool-definitions.d.ts +41 -0
- package/dist/manifest/agent-sdk/tool-definitions.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/tool-definitions.js +288 -0
- package/dist/manifest/agent-sdk/tool-definitions.js.map +1 -0
- package/dist/manifest/agent-sdk/types.d.ts +293 -0
- package/dist/manifest/agent-sdk/types.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/types.js +6 -0
- package/dist/manifest/agent-sdk/types.js.map +1 -0
- package/dist/manifest/api-diagnostics.d.ts +41 -0
- package/dist/manifest/api-diagnostics.d.ts.map +1 -0
- package/dist/manifest/api-diagnostics.js +105 -0
- package/dist/manifest/api-diagnostics.js.map +1 -0
- package/dist/manifest/approval/approval-store.d.ts +52 -0
- package/dist/manifest/approval/approval-store.d.ts.map +1 -0
- package/dist/manifest/approval/approval-store.js +25 -0
- package/dist/manifest/approval/approval-store.js.map +1 -0
- package/dist/manifest/approval/stores/memory.d.ts +33 -0
- package/dist/manifest/approval/stores/memory.d.ts.map +1 -0
- package/dist/manifest/approval/stores/memory.js +56 -0
- package/dist/manifest/approval/stores/memory.js.map +1 -0
- package/dist/manifest/approval/stores/postgres.d.ts +41 -0
- package/dist/manifest/approval/stores/postgres.d.ts.map +1 -0
- package/dist/manifest/approval/stores/postgres.js +124 -0
- package/dist/manifest/approval/stores/postgres.js.map +1 -0
- package/dist/manifest/audit/audit-sink.d.ts +53 -0
- package/dist/manifest/audit/audit-sink.d.ts.map +1 -0
- package/dist/manifest/audit/audit-sink.js +15 -0
- package/dist/manifest/audit/audit-sink.js.map +1 -0
- package/dist/manifest/audit/sinks/memory.d.ts +50 -0
- package/dist/manifest/audit/sinks/memory.d.ts.map +1 -0
- package/dist/manifest/audit/sinks/memory.js +66 -0
- package/dist/manifest/audit/sinks/memory.js.map +1 -0
- package/dist/manifest/audit/sinks/postgres.d.ts +31 -0
- package/dist/manifest/audit/sinks/postgres.d.ts.map +1 -0
- package/dist/manifest/audit/sinks/postgres.js +67 -0
- package/dist/manifest/audit/sinks/postgres.js.map +1 -0
- package/dist/manifest/binary-ir.d.ts +76 -0
- package/dist/manifest/binary-ir.d.ts.map +1 -0
- package/dist/manifest/binary-ir.js +124 -0
- package/dist/manifest/binary-ir.js.map +1 -0
- package/dist/manifest/breaking-change.d.ts +75 -0
- package/dist/manifest/breaking-change.d.ts.map +1 -0
- package/dist/manifest/breaking-change.js +704 -0
- package/dist/manifest/breaking-change.js.map +1 -0
- package/dist/manifest/compiler.d.ts +12 -0
- package/dist/manifest/compiler.d.ts.map +1 -0
- package/dist/manifest/compiler.js +23 -0
- package/dist/manifest/compiler.js.map +1 -0
- package/dist/manifest/config.d.ts +171 -0
- package/dist/manifest/config.d.ts.map +1 -0
- package/dist/manifest/config.js +65 -0
- package/dist/manifest/config.js.map +1 -0
- package/dist/manifest/constraint-analysis.d.ts +122 -0
- package/dist/manifest/constraint-analysis.d.ts.map +1 -0
- package/dist/manifest/constraint-analysis.js +340 -0
- package/dist/manifest/constraint-analysis.js.map +1 -0
- package/dist/manifest/date-time.d.ts +13 -0
- package/dist/manifest/date-time.d.ts.map +1 -0
- package/dist/manifest/date-time.js +60 -0
- package/dist/manifest/date-time.js.map +1 -0
- package/dist/manifest/debug/command-trace.d.ts +37 -0
- package/dist/manifest/debug/command-trace.d.ts.map +1 -0
- package/dist/manifest/debug/command-trace.js +51 -0
- package/dist/manifest/debug/command-trace.js.map +1 -0
- package/dist/manifest/debug/index.d.ts +3 -0
- package/dist/manifest/debug/index.d.ts.map +1 -0
- package/dist/manifest/debug/index.js +2 -0
- package/dist/manifest/debug/index.js.map +1 -0
- package/dist/manifest/domain-completeness.d.ts +13 -0
- package/dist/manifest/domain-completeness.d.ts.map +1 -0
- package/dist/manifest/domain-completeness.js +245 -0
- package/dist/manifest/domain-completeness.js.map +1 -0
- package/dist/manifest/entity-composition.d.ts +24 -0
- package/dist/manifest/entity-composition.d.ts.map +1 -0
- package/dist/manifest/entity-composition.js +157 -0
- package/dist/manifest/entity-composition.js.map +1 -0
- package/dist/manifest/examples.d.ts +6 -0
- package/dist/manifest/examples.d.ts.map +1 -0
- package/dist/manifest/examples.js +443 -0
- package/dist/manifest/examples.js.map +1 -0
- package/dist/manifest/federation/client.d.ts +52 -0
- package/dist/manifest/federation/client.d.ts.map +1 -0
- package/dist/manifest/federation/client.js +152 -0
- package/dist/manifest/federation/client.js.map +1 -0
- package/dist/manifest/federation/descriptor.d.ts +25 -0
- package/dist/manifest/federation/descriptor.d.ts.map +1 -0
- package/dist/manifest/federation/descriptor.js +97 -0
- package/dist/manifest/federation/descriptor.js.map +1 -0
- package/dist/manifest/federation/http-adapter.d.ts +26 -0
- package/dist/manifest/federation/http-adapter.d.ts.map +1 -0
- package/dist/manifest/federation/http-adapter.js +209 -0
- package/dist/manifest/federation/http-adapter.js.map +1 -0
- package/dist/manifest/federation/index.d.ts +51 -0
- package/dist/manifest/federation/index.d.ts.map +1 -0
- package/dist/manifest/federation/index.js +49 -0
- package/dist/manifest/federation/index.js.map +1 -0
- package/dist/manifest/federation/policy-bridge.d.ts +51 -0
- package/dist/manifest/federation/policy-bridge.d.ts.map +1 -0
- package/dist/manifest/federation/policy-bridge.js +122 -0
- package/dist/manifest/federation/policy-bridge.js.map +1 -0
- package/dist/manifest/federation/registry.d.ts +88 -0
- package/dist/manifest/federation/registry.d.ts.map +1 -0
- package/dist/manifest/federation/registry.js +165 -0
- package/dist/manifest/federation/registry.js.map +1 -0
- package/dist/manifest/federation/types.d.ts +209 -0
- package/dist/manifest/federation/types.d.ts.map +1 -0
- package/dist/manifest/federation/types.js +13 -0
- package/dist/manifest/federation/types.js.map +1 -0
- package/dist/manifest/generator.d.ts +44 -0
- package/dist/manifest/generator.d.ts.map +1 -0
- package/dist/manifest/generator.js +899 -0
- package/dist/manifest/generator.js.map +1 -0
- package/dist/manifest/ir-cache.d.ts +48 -0
- package/dist/manifest/ir-cache.d.ts.map +1 -0
- package/dist/manifest/ir-cache.js +91 -0
- package/dist/manifest/ir-cache.js.map +1 -0
- package/dist/manifest/ir-compiler.d.ts +135 -0
- package/dist/manifest/ir-compiler.d.ts.map +1 -0
- package/dist/manifest/ir-compiler.js +1477 -0
- package/dist/manifest/ir-compiler.js.map +1 -0
- package/dist/manifest/ir-diff.d.ts +266 -0
- package/dist/manifest/ir-diff.d.ts.map +1 -0
- package/dist/manifest/ir-diff.js +731 -0
- package/dist/manifest/ir-diff.js.map +1 -0
- package/dist/manifest/ir-version-store.d.ts +109 -0
- package/dist/manifest/ir-version-store.d.ts.map +1 -0
- package/dist/manifest/ir-version-store.js +162 -0
- package/dist/manifest/ir-version-store.js.map +1 -0
- package/dist/manifest/ir.d.ts +616 -0
- package/dist/manifest/ir.d.ts.map +1 -0
- package/dist/manifest/ir.js +2 -0
- package/dist/manifest/ir.js.map +1 -0
- package/dist/manifest/lexer.d.ts +37 -0
- package/dist/manifest/lexer.d.ts.map +1 -0
- package/dist/manifest/lexer.js +224 -0
- package/dist/manifest/lexer.js.map +1 -0
- package/dist/manifest/masking.d.ts +11 -0
- package/dist/manifest/masking.d.ts.map +1 -0
- package/dist/manifest/masking.js +34 -0
- package/dist/manifest/masking.js.map +1 -0
- package/dist/manifest/module-resolver.d.ts +42 -0
- package/dist/manifest/module-resolver.d.ts.map +1 -0
- package/dist/manifest/module-resolver.js +162 -0
- package/dist/manifest/module-resolver.js.map +1 -0
- package/dist/manifest/multi-compiler.d.ts +40 -0
- package/dist/manifest/multi-compiler.d.ts.map +1 -0
- package/dist/manifest/multi-compiler.js +324 -0
- package/dist/manifest/multi-compiler.js.map +1 -0
- package/dist/manifest/outbox/outbox-store.d.ts +56 -0
- package/dist/manifest/outbox/outbox-store.d.ts.map +1 -0
- package/dist/manifest/outbox/outbox-store.js +13 -0
- package/dist/manifest/outbox/outbox-store.js.map +1 -0
- package/dist/manifest/outbox/stores/dynamodb.d.ts +100 -0
- package/dist/manifest/outbox/stores/dynamodb.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/dynamodb.js +239 -0
- package/dist/manifest/outbox/stores/dynamodb.js.map +1 -0
- package/dist/manifest/outbox/stores/memory.d.ts +54 -0
- package/dist/manifest/outbox/stores/memory.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/memory.js +131 -0
- package/dist/manifest/outbox/stores/memory.js.map +1 -0
- package/dist/manifest/outbox/stores/mongodb.d.ts +58 -0
- package/dist/manifest/outbox/stores/mongodb.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/mongodb.js +151 -0
- package/dist/manifest/outbox/stores/mongodb.js.map +1 -0
- package/dist/manifest/outbox/stores/postgres.d.ts +81 -0
- package/dist/manifest/outbox/stores/postgres.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/postgres.js +182 -0
- package/dist/manifest/outbox/stores/postgres.js.map +1 -0
- package/dist/manifest/outbox/stores/redis.d.ts +95 -0
- package/dist/manifest/outbox/stores/redis.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/redis.js +248 -0
- package/dist/manifest/outbox/stores/redis.js.map +1 -0
- package/dist/manifest/parser.d.ts +148 -0
- package/dist/manifest/parser.d.ts.map +1 -0
- package/dist/manifest/parser.js +2243 -0
- package/dist/manifest/parser.js.map +1 -0
- package/dist/manifest/plugin-api.d.ts +202 -0
- package/dist/manifest/plugin-api.d.ts.map +1 -0
- package/dist/manifest/plugin-api.js +101 -0
- package/dist/manifest/plugin-api.js.map +1 -0
- package/dist/manifest/plugin-loader.d.ts +101 -0
- package/dist/manifest/plugin-loader.d.ts.map +1 -0
- package/dist/manifest/plugin-loader.js +332 -0
- package/dist/manifest/plugin-loader.js.map +1 -0
- package/dist/manifest/profiling.d.ts +183 -0
- package/dist/manifest/profiling.d.ts.map +1 -0
- package/dist/manifest/profiling.js +186 -0
- package/dist/manifest/profiling.js.map +1 -0
- package/dist/manifest/projections/analytics/generator.d.ts +27 -0
- package/dist/manifest/projections/analytics/generator.d.ts.map +1 -0
- package/dist/manifest/projections/analytics/generator.js +686 -0
- package/dist/manifest/projections/analytics/generator.js.map +1 -0
- package/dist/manifest/projections/analytics/types.d.ts +46 -0
- package/dist/manifest/projections/analytics/types.d.ts.map +1 -0
- package/dist/manifest/projections/analytics/types.js +8 -0
- package/dist/manifest/projections/analytics/types.js.map +1 -0
- package/dist/manifest/projections/builtins.d.ts +29 -0
- package/dist/manifest/projections/builtins.d.ts.map +1 -0
- package/dist/manifest/projections/builtins.js +143 -0
- package/dist/manifest/projections/builtins.js.map +1 -0
- package/dist/manifest/projections/convex/expression.d.ts +52 -0
- package/dist/manifest/projections/convex/expression.d.ts.map +1 -0
- package/dist/manifest/projections/convex/expression.js +166 -0
- package/dist/manifest/projections/convex/expression.js.map +1 -0
- package/dist/manifest/projections/convex/functions.d.ts +22 -0
- package/dist/manifest/projections/convex/functions.d.ts.map +1 -0
- package/dist/manifest/projections/convex/functions.js +786 -0
- package/dist/manifest/projections/convex/functions.js.map +1 -0
- package/dist/manifest/projections/convex/generator.d.ts +79 -0
- package/dist/manifest/projections/convex/generator.d.ts.map +1 -0
- package/dist/manifest/projections/convex/generator.js +406 -0
- package/dist/manifest/projections/convex/generator.js.map +1 -0
- package/dist/manifest/projections/convex/index.d.ts +10 -0
- package/dist/manifest/projections/convex/index.d.ts.map +1 -0
- package/dist/manifest/projections/convex/index.js +10 -0
- package/dist/manifest/projections/convex/index.js.map +1 -0
- package/dist/manifest/projections/convex/options.d.ts +153 -0
- package/dist/manifest/projections/convex/options.d.ts.map +1 -0
- package/dist/manifest/projections/convex/options.js +60 -0
- package/dist/manifest/projections/convex/options.js.map +1 -0
- package/dist/manifest/projections/convex/orchestration.d.ts +23 -0
- package/dist/manifest/projections/convex/orchestration.d.ts.map +1 -0
- package/dist/manifest/projections/convex/orchestration.js +150 -0
- package/dist/manifest/projections/convex/orchestration.js.map +1 -0
- package/dist/manifest/projections/convex/type-mapping.d.ts +40 -0
- package/dist/manifest/projections/convex/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/convex/type-mapping.js +71 -0
- package/dist/manifest/projections/convex/type-mapping.js.map +1 -0
- package/dist/manifest/projections/dart/generator.d.ts +33 -0
- package/dist/manifest/projections/dart/generator.d.ts.map +1 -0
- package/dist/manifest/projections/dart/generator.js +981 -0
- package/dist/manifest/projections/dart/generator.js.map +1 -0
- package/dist/manifest/projections/dart/types.d.ts +29 -0
- package/dist/manifest/projections/dart/types.d.ts.map +1 -0
- package/dist/manifest/projections/dart/types.js +5 -0
- package/dist/manifest/projections/dart/types.js.map +1 -0
- package/dist/manifest/projections/drizzle/generator.d.ts +27 -0
- package/dist/manifest/projections/drizzle/generator.d.ts.map +1 -0
- package/dist/manifest/projections/drizzle/generator.js +654 -0
- package/dist/manifest/projections/drizzle/generator.js.map +1 -0
- package/dist/manifest/projections/drizzle/index.d.ts +12 -0
- package/dist/manifest/projections/drizzle/index.d.ts.map +1 -0
- package/dist/manifest/projections/drizzle/index.js +12 -0
- package/dist/manifest/projections/drizzle/index.js.map +1 -0
- package/dist/manifest/projections/drizzle/options.d.ts +94 -0
- package/dist/manifest/projections/drizzle/options.d.ts.map +1 -0
- package/dist/manifest/projections/drizzle/options.js +31 -0
- package/dist/manifest/projections/drizzle/options.js.map +1 -0
- package/dist/manifest/projections/drizzle/type-mapping.d.ts +74 -0
- package/dist/manifest/projections/drizzle/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/drizzle/type-mapping.js +101 -0
- package/dist/manifest/projections/drizzle/type-mapping.js.map +1 -0
- package/dist/manifest/projections/dynamodb/generator.d.ts +48 -0
- package/dist/manifest/projections/dynamodb/generator.d.ts.map +1 -0
- package/dist/manifest/projections/dynamodb/generator.js +341 -0
- package/dist/manifest/projections/dynamodb/generator.js.map +1 -0
- package/dist/manifest/projections/elasticsearch/generator.d.ts +44 -0
- package/dist/manifest/projections/elasticsearch/generator.d.ts.map +1 -0
- package/dist/manifest/projections/elasticsearch/generator.js +613 -0
- package/dist/manifest/projections/elasticsearch/generator.js.map +1 -0
- package/dist/manifest/projections/elasticsearch/options.d.ts +56 -0
- package/dist/manifest/projections/elasticsearch/options.d.ts.map +1 -0
- package/dist/manifest/projections/elasticsearch/options.js +37 -0
- package/dist/manifest/projections/elasticsearch/options.js.map +1 -0
- package/dist/manifest/projections/elasticsearch/type-mapping.d.ts +30 -0
- package/dist/manifest/projections/elasticsearch/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/elasticsearch/type-mapping.js +34 -0
- package/dist/manifest/projections/elasticsearch/type-mapping.js.map +1 -0
- package/dist/manifest/projections/elasticsearch/types.d.ts +81 -0
- package/dist/manifest/projections/elasticsearch/types.d.ts.map +1 -0
- package/dist/manifest/projections/elasticsearch/types.js +10 -0
- package/dist/manifest/projections/elasticsearch/types.js.map +1 -0
- package/dist/manifest/projections/express/generator.d.ts +38 -0
- package/dist/manifest/projections/express/generator.d.ts.map +1 -0
- package/dist/manifest/projections/express/generator.js +620 -0
- package/dist/manifest/projections/express/generator.js.map +1 -0
- package/dist/manifest/projections/express/index.d.ts +8 -0
- package/dist/manifest/projections/express/index.d.ts.map +1 -0
- package/dist/manifest/projections/express/index.js +7 -0
- package/dist/manifest/projections/express/index.js.map +1 -0
- package/dist/manifest/projections/express/types.d.ts +92 -0
- package/dist/manifest/projections/express/types.d.ts.map +1 -0
- package/dist/manifest/projections/express/types.js +9 -0
- package/dist/manifest/projections/express/types.js.map +1 -0
- package/dist/manifest/projections/graphql/generator.d.ts +43 -0
- package/dist/manifest/projections/graphql/generator.d.ts.map +1 -0
- package/dist/manifest/projections/graphql/generator.js +662 -0
- package/dist/manifest/projections/graphql/generator.js.map +1 -0
- package/dist/manifest/projections/graphql/index.d.ts +11 -0
- package/dist/manifest/projections/graphql/index.d.ts.map +1 -0
- package/dist/manifest/projections/graphql/index.js +10 -0
- package/dist/manifest/projections/graphql/index.js.map +1 -0
- package/dist/manifest/projections/graphql/types.d.ts +69 -0
- package/dist/manifest/projections/graphql/types.d.ts.map +1 -0
- package/dist/manifest/projections/graphql/types.js +9 -0
- package/dist/manifest/projections/graphql/types.js.map +1 -0
- package/dist/manifest/projections/health/generator.d.ts +36 -0
- package/dist/manifest/projections/health/generator.d.ts.map +1 -0
- package/dist/manifest/projections/health/generator.js +355 -0
- package/dist/manifest/projections/health/generator.js.map +1 -0
- package/dist/manifest/projections/health/types.d.ts +67 -0
- package/dist/manifest/projections/health/types.d.ts.map +1 -0
- package/dist/manifest/projections/health/types.js +28 -0
- package/dist/manifest/projections/health/types.js.map +1 -0
- package/dist/manifest/projections/hono/generator.d.ts +36 -0
- package/dist/manifest/projections/hono/generator.d.ts.map +1 -0
- package/dist/manifest/projections/hono/generator.js +578 -0
- package/dist/manifest/projections/hono/generator.js.map +1 -0
- package/dist/manifest/projections/hono/types.d.ts +86 -0
- package/dist/manifest/projections/hono/types.d.ts.map +1 -0
- package/dist/manifest/projections/hono/types.js +10 -0
- package/dist/manifest/projections/hono/types.js.map +1 -0
- package/dist/manifest/projections/index.d.ts +58 -0
- package/dist/manifest/projections/index.d.ts.map +1 -0
- package/dist/manifest/projections/index.js +41 -0
- package/dist/manifest/projections/index.js.map +1 -0
- package/dist/manifest/projections/interface.d.ts +285 -0
- package/dist/manifest/projections/interface.d.ts.map +1 -0
- package/dist/manifest/projections/interface.js +8 -0
- package/dist/manifest/projections/interface.js.map +1 -0
- package/dist/manifest/projections/jsonschema/generator.d.ts +35 -0
- package/dist/manifest/projections/jsonschema/generator.d.ts.map +1 -0
- package/dist/manifest/projections/jsonschema/generator.js +347 -0
- package/dist/manifest/projections/jsonschema/generator.js.map +1 -0
- package/dist/manifest/projections/jsonschema/index.d.ts +3 -0
- package/dist/manifest/projections/jsonschema/index.d.ts.map +1 -0
- package/dist/manifest/projections/jsonschema/index.js +2 -0
- package/dist/manifest/projections/jsonschema/index.js.map +1 -0
- package/dist/manifest/projections/jsonschema/types.d.ts +31 -0
- package/dist/manifest/projections/jsonschema/types.d.ts.map +1 -0
- package/dist/manifest/projections/jsonschema/types.js +2 -0
- package/dist/manifest/projections/jsonschema/types.js.map +1 -0
- package/dist/manifest/projections/kysely/generator.d.ts +36 -0
- package/dist/manifest/projections/kysely/generator.d.ts.map +1 -0
- package/dist/manifest/projections/kysely/generator.js +325 -0
- package/dist/manifest/projections/kysely/generator.js.map +1 -0
- package/dist/manifest/projections/kysely/index.d.ts +4 -0
- package/dist/manifest/projections/kysely/index.d.ts.map +1 -0
- package/dist/manifest/projections/kysely/index.js +2 -0
- package/dist/manifest/projections/kysely/index.js.map +1 -0
- package/dist/manifest/projections/kysely/options.d.ts +61 -0
- package/dist/manifest/projections/kysely/options.d.ts.map +1 -0
- package/dist/manifest/projections/kysely/options.js +31 -0
- package/dist/manifest/projections/kysely/options.js.map +1 -0
- package/dist/manifest/projections/kysely/type-mapping.d.ts +61 -0
- package/dist/manifest/projections/kysely/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/kysely/type-mapping.js +84 -0
- package/dist/manifest/projections/kysely/type-mapping.js.map +1 -0
- package/dist/manifest/projections/llm-context/generator.d.ts +24 -0
- package/dist/manifest/projections/llm-context/generator.d.ts.map +1 -0
- package/dist/manifest/projections/llm-context/generator.js +371 -0
- package/dist/manifest/projections/llm-context/generator.js.map +1 -0
- package/dist/manifest/projections/llm-context/types.d.ts +205 -0
- package/dist/manifest/projections/llm-context/types.d.ts.map +1 -0
- package/dist/manifest/projections/llm-context/types.js +9 -0
- package/dist/manifest/projections/llm-context/types.js.map +1 -0
- package/dist/manifest/projections/materialized-views/expression-to-sql.d.ts +29 -0
- package/dist/manifest/projections/materialized-views/expression-to-sql.d.ts.map +1 -0
- package/dist/manifest/projections/materialized-views/expression-to-sql.js +211 -0
- package/dist/manifest/projections/materialized-views/expression-to-sql.js.map +1 -0
- package/dist/manifest/projections/materialized-views/generator.d.ts +29 -0
- package/dist/manifest/projections/materialized-views/generator.d.ts.map +1 -0
- package/dist/manifest/projections/materialized-views/generator.js +263 -0
- package/dist/manifest/projections/materialized-views/generator.js.map +1 -0
- package/dist/manifest/projections/materialized-views/options.d.ts +59 -0
- package/dist/manifest/projections/materialized-views/options.d.ts.map +1 -0
- package/dist/manifest/projections/materialized-views/options.js +34 -0
- package/dist/manifest/projections/materialized-views/options.js.map +1 -0
- package/dist/manifest/projections/materialized-views/types.d.ts +100 -0
- package/dist/manifest/projections/materialized-views/types.d.ts.map +1 -0
- package/dist/manifest/projections/materialized-views/types.js +11 -0
- package/dist/manifest/projections/materialized-views/types.js.map +1 -0
- package/dist/manifest/projections/mermaid/generator.d.ts +46 -0
- package/dist/manifest/projections/mermaid/generator.d.ts.map +1 -0
- package/dist/manifest/projections/mermaid/generator.js +436 -0
- package/dist/manifest/projections/mermaid/generator.js.map +1 -0
- package/dist/manifest/projections/mongoose/options.d.ts +30 -0
- package/dist/manifest/projections/mongoose/options.d.ts.map +1 -0
- package/dist/manifest/projections/mongoose/options.js +18 -0
- package/dist/manifest/projections/mongoose/options.js.map +1 -0
- package/dist/manifest/projections/mongoose/type-mapping.d.ts +42 -0
- package/dist/manifest/projections/mongoose/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/mongoose/type-mapping.js +64 -0
- package/dist/manifest/projections/mongoose/type-mapping.js.map +1 -0
- package/dist/manifest/projections/nextjs/defaults.d.ts +161 -0
- package/dist/manifest/projections/nextjs/defaults.d.ts.map +1 -0
- package/dist/manifest/projections/nextjs/defaults.js +157 -0
- package/dist/manifest/projections/nextjs/defaults.js.map +1 -0
- package/dist/manifest/projections/nextjs/generator.d.ts +78 -0
- package/dist/manifest/projections/nextjs/generator.d.ts.map +1 -0
- package/dist/manifest/projections/nextjs/generator.js +1339 -0
- package/dist/manifest/projections/nextjs/generator.js.map +1 -0
- package/dist/manifest/projections/nextjs/schedule-generator.d.ts +10 -0
- package/dist/manifest/projections/nextjs/schedule-generator.d.ts.map +1 -0
- package/dist/manifest/projections/nextjs/schedule-generator.js +54 -0
- package/dist/manifest/projections/nextjs/schedule-generator.js.map +1 -0
- package/dist/manifest/projections/openapi/generator.d.ts +37 -0
- package/dist/manifest/projections/openapi/generator.d.ts.map +1 -0
- package/dist/manifest/projections/openapi/generator.js +690 -0
- package/dist/manifest/projections/openapi/generator.js.map +1 -0
- package/dist/manifest/projections/openapi/index.d.ts +11 -0
- package/dist/manifest/projections/openapi/index.d.ts.map +1 -0
- package/dist/manifest/projections/openapi/index.js +10 -0
- package/dist/manifest/projections/openapi/index.js.map +1 -0
- package/dist/manifest/projections/openapi/types.d.ts +75 -0
- package/dist/manifest/projections/openapi/types.d.ts.map +1 -0
- package/dist/manifest/projections/openapi/types.js +9 -0
- package/dist/manifest/projections/openapi/types.js.map +1 -0
- package/dist/manifest/projections/prisma/generator.d.ts +32 -0
- package/dist/manifest/projections/prisma/generator.d.ts.map +1 -0
- package/dist/manifest/projections/prisma/generator.js +861 -0
- package/dist/manifest/projections/prisma/generator.js.map +1 -0
- package/dist/manifest/projections/prisma/index.d.ts +12 -0
- package/dist/manifest/projections/prisma/index.d.ts.map +1 -0
- package/dist/manifest/projections/prisma/index.js +12 -0
- package/dist/manifest/projections/prisma/index.js.map +1 -0
- package/dist/manifest/projections/prisma/options.d.ts +243 -0
- package/dist/manifest/projections/prisma/options.d.ts.map +1 -0
- package/dist/manifest/projections/prisma/options.js +59 -0
- package/dist/manifest/projections/prisma/options.js.map +1 -0
- package/dist/manifest/projections/prisma/type-mapping.d.ts +60 -0
- package/dist/manifest/projections/prisma/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/prisma/type-mapping.js +95 -0
- package/dist/manifest/projections/prisma/type-mapping.js.map +1 -0
- package/dist/manifest/projections/prisma-store/generator.d.ts +12 -0
- package/dist/manifest/projections/prisma-store/generator.d.ts.map +1 -0
- package/dist/manifest/projections/prisma-store/generator.js +52 -0
- package/dist/manifest/projections/prisma-store/generator.js.map +1 -0
- package/dist/manifest/projections/prisma-store/metadata-builder.d.ts +11 -0
- package/dist/manifest/projections/prisma-store/metadata-builder.d.ts.map +1 -0
- package/dist/manifest/projections/prisma-store/metadata-builder.js +183 -0
- package/dist/manifest/projections/prisma-store/metadata-builder.js.map +1 -0
- package/dist/manifest/projections/prisma-store/options.d.ts +31 -0
- package/dist/manifest/projections/prisma-store/options.d.ts.map +1 -0
- package/dist/manifest/projections/prisma-store/options.js +21 -0
- package/dist/manifest/projections/prisma-store/options.js.map +1 -0
- package/dist/manifest/projections/prisma-store/persistence.d.ts +4 -0
- package/dist/manifest/projections/prisma-store/persistence.d.ts.map +1 -0
- package/dist/manifest/projections/prisma-store/persistence.js +24 -0
- package/dist/manifest/projections/prisma-store/persistence.js.map +1 -0
- package/dist/manifest/projections/pydantic/generator.d.ts +27 -0
- package/dist/manifest/projections/pydantic/generator.d.ts.map +1 -0
- package/dist/manifest/projections/pydantic/generator.js +798 -0
- package/dist/manifest/projections/pydantic/generator.js.map +1 -0
- package/dist/manifest/projections/pydantic/types.d.ts +32 -0
- package/dist/manifest/projections/pydantic/types.d.ts.map +1 -0
- package/dist/manifest/projections/pydantic/types.js +5 -0
- package/dist/manifest/projections/pydantic/types.js.map +1 -0
- package/dist/manifest/projections/react-query/generator.d.ts +87 -0
- package/dist/manifest/projections/react-query/generator.d.ts.map +1 -0
- package/dist/manifest/projections/react-query/generator.js +413 -0
- package/dist/manifest/projections/react-query/generator.js.map +1 -0
- package/dist/manifest/projections/registry.d.ts +59 -0
- package/dist/manifest/projections/registry.d.ts.map +1 -0
- package/dist/manifest/projections/registry.js +110 -0
- package/dist/manifest/projections/registry.js.map +1 -0
- package/dist/manifest/projections/remix/generator.d.ts +58 -0
- package/dist/manifest/projections/remix/generator.d.ts.map +1 -0
- package/dist/manifest/projections/remix/generator.js +788 -0
- package/dist/manifest/projections/remix/generator.js.map +1 -0
- package/dist/manifest/projections/routes/generator.d.ts +32 -0
- package/dist/manifest/projections/routes/generator.d.ts.map +1 -0
- package/dist/manifest/projections/routes/generator.js +401 -0
- package/dist/manifest/projections/routes/generator.js.map +1 -0
- package/dist/manifest/projections/routes/types.d.ts +104 -0
- package/dist/manifest/projections/routes/types.d.ts.map +1 -0
- package/dist/manifest/projections/routes/types.js +11 -0
- package/dist/manifest/projections/routes/types.js.map +1 -0
- package/dist/manifest/projections/shared/naming.d.ts +64 -0
- package/dist/manifest/projections/shared/naming.d.ts.map +1 -0
- package/dist/manifest/projections/shared/naming.js +138 -0
- package/dist/manifest/projections/shared/naming.js.map +1 -0
- package/dist/manifest/projections/storybook/generator.d.ts +38 -0
- package/dist/manifest/projections/storybook/generator.d.ts.map +1 -0
- package/dist/manifest/projections/storybook/generator.js +462 -0
- package/dist/manifest/projections/storybook/generator.js.map +1 -0
- package/dist/manifest/projections/sveltekit/generator.d.ts +64 -0
- package/dist/manifest/projections/sveltekit/generator.d.ts.map +1 -0
- package/dist/manifest/projections/sveltekit/generator.js +1043 -0
- package/dist/manifest/projections/sveltekit/generator.js.map +1 -0
- package/dist/manifest/projections/sveltekit/index.d.ts +11 -0
- package/dist/manifest/projections/sveltekit/index.d.ts.map +1 -0
- package/dist/manifest/projections/sveltekit/index.js +10 -0
- package/dist/manifest/projections/sveltekit/index.js.map +1 -0
- package/dist/manifest/projections/sveltekit/types.d.ts +122 -0
- package/dist/manifest/projections/sveltekit/types.d.ts.map +1 -0
- package/dist/manifest/projections/sveltekit/types.js +10 -0
- package/dist/manifest/projections/sveltekit/types.js.map +1 -0
- package/dist/manifest/projections/terraform/generator.d.ts +29 -0
- package/dist/manifest/projections/terraform/generator.d.ts.map +1 -0
- package/dist/manifest/projections/terraform/generator.js +722 -0
- package/dist/manifest/projections/terraform/generator.js.map +1 -0
- package/dist/manifest/projections/terraform/index.d.ts +7 -0
- package/dist/manifest/projections/terraform/index.d.ts.map +1 -0
- package/dist/manifest/projections/terraform/index.js +7 -0
- package/dist/manifest/projections/terraform/index.js.map +1 -0
- package/dist/manifest/projections/terraform/options.d.ts +92 -0
- package/dist/manifest/projections/terraform/options.d.ts.map +1 -0
- package/dist/manifest/projections/terraform/options.js +37 -0
- package/dist/manifest/projections/terraform/options.js.map +1 -0
- package/dist/manifest/projections/terraform/types.d.ts +55 -0
- package/dist/manifest/projections/terraform/types.d.ts.map +1 -0
- package/dist/manifest/projections/terraform/types.js +38 -0
- package/dist/manifest/projections/terraform/types.js.map +1 -0
- package/dist/manifest/projections/zod/generator.d.ts +27 -0
- package/dist/manifest/projections/zod/generator.d.ts.map +1 -0
- package/dist/manifest/projections/zod/generator.js +367 -0
- package/dist/manifest/projections/zod/generator.js.map +1 -0
- package/dist/manifest/projections/zod/index.d.ts +8 -0
- package/dist/manifest/projections/zod/index.d.ts.map +1 -0
- package/dist/manifest/projections/zod/index.js +7 -0
- package/dist/manifest/projections/zod/index.js.map +1 -0
- package/dist/manifest/projections/zod/types.d.ts +14 -0
- package/dist/manifest/projections/zod/types.d.ts.map +1 -0
- package/dist/manifest/projections/zod/types.js +5 -0
- package/dist/manifest/projections/zod/types.js.map +1 -0
- package/dist/manifest/reaction-completeness-checks.d.ts +11 -0
- package/dist/manifest/reaction-completeness-checks.d.ts.map +1 -0
- package/dist/manifest/reaction-completeness-checks.js +106 -0
- package/dist/manifest/reaction-completeness-checks.js.map +1 -0
- package/dist/manifest/reaction-completeness.d.ts +9 -0
- package/dist/manifest/reaction-completeness.d.ts.map +1 -0
- package/dist/manifest/reaction-completeness.js +35 -0
- package/dist/manifest/reaction-completeness.js.map +1 -0
- package/dist/manifest/registry/emit.d.ts +53 -0
- package/dist/manifest/registry/emit.d.ts.map +1 -0
- package/dist/manifest/registry/emit.js +96 -0
- package/dist/manifest/registry/emit.js.map +1 -0
- package/dist/manifest/runtime-command-extensions.d.ts +21 -0
- package/dist/manifest/runtime-command-extensions.d.ts.map +1 -0
- package/dist/manifest/runtime-command-extensions.js +136 -0
- package/dist/manifest/runtime-command-extensions.js.map +1 -0
- package/dist/manifest/runtime-engine.d.ts +1019 -0
- package/dist/manifest/runtime-engine.d.ts.map +1 -0
- package/dist/manifest/runtime-engine.js +3872 -0
- package/dist/manifest/runtime-engine.js.map +1 -0
- package/dist/manifest/runtime-profiling-bridge.d.ts +22 -0
- package/dist/manifest/runtime-profiling-bridge.d.ts.map +1 -0
- package/dist/manifest/runtime-profiling-bridge.js +69 -0
- package/dist/manifest/runtime-profiling-bridge.js.map +1 -0
- package/dist/manifest/runtime-rate-limit.d.ts +52 -0
- package/dist/manifest/runtime-rate-limit.d.ts.map +1 -0
- package/dist/manifest/runtime-rate-limit.js +70 -0
- package/dist/manifest/runtime-rate-limit.js.map +1 -0
- package/dist/manifest/runtime-retry.d.ts +68 -0
- package/dist/manifest/runtime-retry.d.ts.map +1 -0
- package/dist/manifest/runtime-retry.js +93 -0
- package/dist/manifest/runtime-retry.js.map +1 -0
- package/dist/manifest/runtime-schedule.d.ts +47 -0
- package/dist/manifest/runtime-schedule.d.ts.map +1 -0
- package/dist/manifest/runtime-schedule.js +95 -0
- package/dist/manifest/runtime-schedule.js.map +1 -0
- package/dist/manifest/schedule-utils.d.ts +15 -0
- package/dist/manifest/schedule-utils.d.ts.map +1 -0
- package/dist/manifest/schedule-utils.js +82 -0
- package/dist/manifest/schedule-utils.js.map +1 -0
- package/dist/manifest/standalone-generator.d.ts +32 -0
- package/dist/manifest/standalone-generator.d.ts.map +1 -0
- package/dist/manifest/standalone-generator.js +596 -0
- package/dist/manifest/standalone-generator.js.map +1 -0
- package/dist/manifest/stores/prisma-generic/coercion.d.ts +17 -0
- package/dist/manifest/stores/prisma-generic/coercion.d.ts.map +1 -0
- package/dist/manifest/stores/prisma-generic/coercion.js +83 -0
- package/dist/manifest/stores/prisma-generic/coercion.js.map +1 -0
- package/dist/manifest/stores/prisma-generic/index.d.ts +3 -0
- package/dist/manifest/stores/prisma-generic/index.d.ts.map +1 -0
- package/dist/manifest/stores/prisma-generic/index.js +2 -0
- package/dist/manifest/stores/prisma-generic/index.js.map +1 -0
- package/dist/manifest/stores/prisma-generic/store.d.ts +35 -0
- package/dist/manifest/stores/prisma-generic/store.d.ts.map +1 -0
- package/dist/manifest/stores/prisma-generic/store.js +216 -0
- package/dist/manifest/stores/prisma-generic/store.js.map +1 -0
- package/dist/manifest/stores/prisma-generic/types.d.ts +46 -0
- package/dist/manifest/stores/prisma-generic/types.d.ts.map +1 -0
- package/dist/manifest/stores/prisma-generic/types.js +6 -0
- package/dist/manifest/stores/prisma-generic/types.js.map +1 -0
- package/dist/manifest/stores.node.d.ts +248 -0
- package/dist/manifest/stores.node.d.ts.map +1 -0
- package/dist/manifest/stores.node.js +718 -0
- package/dist/manifest/stores.node.js.map +1 -0
- package/dist/manifest/test/postgres-live-env.d.ts +9 -0
- package/dist/manifest/test/postgres-live-env.d.ts.map +1 -0
- package/dist/manifest/test/postgres-live-env.js +14 -0
- package/dist/manifest/test/postgres-live-env.js.map +1 -0
- package/dist/manifest/types.d.ts +570 -0
- package/dist/manifest/types.d.ts.map +1 -0
- package/dist/manifest/types.js +2 -0
- package/dist/manifest/types.js.map +1 -0
- package/dist/manifest/version.d.ts +15 -0
- package/dist/manifest/version.d.ts.map +1 -0
- package/dist/manifest/version.js +15 -0
- package/dist/manifest/version.js.map +1 -0
- package/dist/manifest/wasm/index.d.ts +15 -0
- package/dist/manifest/wasm/index.d.ts.map +1 -0
- package/dist/manifest/wasm/index.js +15 -0
- package/dist/manifest/wasm/index.js.map +1 -0
- package/dist/manifest/wasm/wasm-evaluator.d.ts +93 -0
- package/dist/manifest/wasm/wasm-evaluator.d.ts.map +1 -0
- package/dist/manifest/wasm/wasm-evaluator.js +242 -0
- package/dist/manifest/wasm/wasm-evaluator.js.map +1 -0
- package/dist/manifest/wasm/wasm-loader.d.ts +56 -0
- package/dist/manifest/wasm/wasm-loader.d.ts.map +1 -0
- package/dist/manifest/wasm/wasm-loader.js +132 -0
- package/dist/manifest/wasm/wasm-loader.js.map +1 -0
- package/docs/spec/config/manifest.config.schema.json +737 -0
- package/docs/spec/config/prisma-projection.schema.json +173 -0
- package/docs/spec/ir/ir-v1.schema.json +2033 -0
- package/docs/spec/plugins/plugin.schema.json +104 -0
- package/docs/spec/registry/bypasses.schema.json +87 -0
- package/docs/spec/registry/commands.schema.json +61 -0
- package/docs/spec/registry/entities.schema.json +52 -0
- package/docs/spec/semantics.md +630 -0
- package/package.json +356 -0
- package/packages/cli/dist/audit/bypass-violations.d.ts +16 -0
- package/packages/cli/dist/audit/bypass-violations.d.ts.map +1 -0
- package/packages/cli/dist/audit/bypass-violations.js +98 -0
- package/packages/cli/dist/audit/bypass-violations.js.map +1 -0
- package/packages/cli/dist/audit/direct-writes.d.ts +15 -0
- package/packages/cli/dist/audit/direct-writes.d.ts.map +1 -0
- package/packages/cli/dist/audit/direct-writes.js +86 -0
- package/packages/cli/dist/audit/direct-writes.js.map +1 -0
- package/packages/cli/dist/audit/event-fabrication.d.ts +17 -0
- package/packages/cli/dist/audit/event-fabrication.d.ts.map +1 -0
- package/packages/cli/dist/audit/event-fabrication.js +101 -0
- package/packages/cli/dist/audit/event-fabrication.js.map +1 -0
- package/packages/cli/dist/audit/existing-command-available.d.ts +20 -0
- package/packages/cli/dist/audit/existing-command-available.d.ts.map +1 -0
- package/packages/cli/dist/audit/existing-command-available.js +158 -0
- package/packages/cli/dist/audit/existing-command-available.js.map +1 -0
- package/packages/cli/dist/audit/missing-tests.d.ts +17 -0
- package/packages/cli/dist/audit/missing-tests.d.ts.map +1 -0
- package/packages/cli/dist/audit/missing-tests.js +108 -0
- package/packages/cli/dist/audit/missing-tests.js.map +1 -0
- package/packages/cli/dist/audit/route-drift.d.ts +16 -0
- package/packages/cli/dist/audit/route-drift.d.ts.map +1 -0
- package/packages/cli/dist/audit/route-drift.js +86 -0
- package/packages/cli/dist/audit/route-drift.js.map +1 -0
- package/packages/cli/dist/audit/types.d.ts +63 -0
- package/packages/cli/dist/audit/types.d.ts.map +1 -0
- package/packages/cli/dist/audit/types.js +10 -0
- package/packages/cli/dist/audit/types.js.map +1 -0
- package/packages/cli/dist/audit/unregistered-command-call.d.ts +25 -0
- package/packages/cli/dist/audit/unregistered-command-call.d.ts.map +1 -0
- package/packages/cli/dist/audit/unregistered-command-call.js +196 -0
- package/packages/cli/dist/audit/unregistered-command-call.js.map +1 -0
- package/packages/cli/dist/audit/unregistered-entity-write.d.ts +16 -0
- package/packages/cli/dist/audit/unregistered-entity-write.d.ts.map +1 -0
- package/packages/cli/dist/audit/unregistered-entity-write.js +96 -0
- package/packages/cli/dist/audit/unregistered-entity-write.js.map +1 -0
- package/packages/cli/dist/audit/write-receiver.d.ts +23 -0
- package/packages/cli/dist/audit/write-receiver.d.ts.map +1 -0
- package/packages/cli/dist/audit/write-receiver.js +32 -0
- package/packages/cli/dist/audit/write-receiver.js.map +1 -0
- package/packages/cli/dist/checks/dispatcher-presence.d.ts +37 -0
- package/packages/cli/dist/checks/dispatcher-presence.d.ts.map +1 -0
- package/packages/cli/dist/checks/dispatcher-presence.js +57 -0
- package/packages/cli/dist/checks/dispatcher-presence.js.map +1 -0
- package/packages/cli/dist/checks/package-shape.d.ts +81 -0
- package/packages/cli/dist/checks/package-shape.d.ts.map +1 -0
- package/packages/cli/dist/checks/package-shape.js +359 -0
- package/packages/cli/dist/checks/package-shape.js.map +1 -0
- package/packages/cli/dist/checks/runtime-smoke.d.ts +42 -0
- package/packages/cli/dist/checks/runtime-smoke.d.ts.map +1 -0
- package/packages/cli/dist/checks/runtime-smoke.js +167 -0
- package/packages/cli/dist/checks/runtime-smoke.js.map +1 -0
- package/packages/cli/dist/commands/analyze.d.ts +97 -0
- package/packages/cli/dist/commands/analyze.d.ts.map +1 -0
- package/packages/cli/dist/commands/analyze.js +411 -0
- package/packages/cli/dist/commands/analyze.js.map +1 -0
- package/packages/cli/dist/commands/audit-bypasses.d.ts +31 -0
- package/packages/cli/dist/commands/audit-bypasses.d.ts.map +1 -0
- package/packages/cli/dist/commands/audit-bypasses.js +152 -0
- package/packages/cli/dist/commands/audit-bypasses.js.map +1 -0
- package/packages/cli/dist/commands/audit-constitution.d.ts +20 -0
- package/packages/cli/dist/commands/audit-constitution.d.ts.map +1 -0
- package/packages/cli/dist/commands/audit-constitution.js +18 -0
- package/packages/cli/dist/commands/audit-constitution.js.map +1 -0
- package/packages/cli/dist/commands/audit-governance.d.ts +37 -0
- package/packages/cli/dist/commands/audit-governance.d.ts.map +1 -0
- package/packages/cli/dist/commands/audit-governance.js +78 -0
- package/packages/cli/dist/commands/audit-governance.js.map +1 -0
- package/packages/cli/dist/commands/audit-routes.d.ts +135 -0
- package/packages/cli/dist/commands/audit-routes.d.ts.map +1 -0
- package/packages/cli/dist/commands/audit-routes.js +514 -0
- package/packages/cli/dist/commands/audit-routes.js.map +1 -0
- package/packages/cli/dist/commands/breaking-change.d.ts +15 -0
- package/packages/cli/dist/commands/breaking-change.d.ts.map +1 -0
- package/packages/cli/dist/commands/breaking-change.js +150 -0
- package/packages/cli/dist/commands/breaking-change.js.map +1 -0
- package/packages/cli/dist/commands/build.d.ts +26 -0
- package/packages/cli/dist/commands/build.d.ts.map +1 -0
- package/packages/cli/dist/commands/build.js +58 -0
- package/packages/cli/dist/commands/build.js.map +1 -0
- package/packages/cli/dist/commands/changelog.d.ts +26 -0
- package/packages/cli/dist/commands/changelog.d.ts.map +1 -0
- package/packages/cli/dist/commands/changelog.js +365 -0
- package/packages/cli/dist/commands/changelog.js.map +1 -0
- package/packages/cli/dist/commands/check.d.ts +21 -0
- package/packages/cli/dist/commands/check.d.ts.map +1 -0
- package/packages/cli/dist/commands/check.js +31 -0
- package/packages/cli/dist/commands/check.js.map +1 -0
- package/packages/cli/dist/commands/compile.d.ts +19 -0
- package/packages/cli/dist/commands/compile.d.ts.map +1 -0
- package/packages/cli/dist/commands/compile.js +325 -0
- package/packages/cli/dist/commands/compile.js.map +1 -0
- package/packages/cli/dist/commands/config.d.ts +23 -0
- package/packages/cli/dist/commands/config.d.ts.map +1 -0
- package/packages/cli/dist/commands/config.js +172 -0
- package/packages/cli/dist/commands/config.js.map +1 -0
- package/packages/cli/dist/commands/coverage.d.ts +55 -0
- package/packages/cli/dist/commands/coverage.d.ts.map +1 -0
- package/packages/cli/dist/commands/coverage.js +343 -0
- package/packages/cli/dist/commands/coverage.js.map +1 -0
- package/packages/cli/dist/commands/diagram.d.ts +22 -0
- package/packages/cli/dist/commands/diagram.d.ts.map +1 -0
- package/packages/cli/dist/commands/diagram.js +176 -0
- package/packages/cli/dist/commands/diagram.js.map +1 -0
- package/packages/cli/dist/commands/docs.d.ts +18 -0
- package/packages/cli/dist/commands/docs.d.ts.map +1 -0
- package/packages/cli/dist/commands/docs.js +722 -0
- package/packages/cli/dist/commands/docs.js.map +1 -0
- package/packages/cli/dist/commands/doctor-lib.d.ts +147 -0
- package/packages/cli/dist/commands/doctor-lib.d.ts.map +1 -0
- package/packages/cli/dist/commands/doctor-lib.js +491 -0
- package/packages/cli/dist/commands/doctor-lib.js.map +1 -0
- package/packages/cli/dist/commands/doctor.d.ts +31 -0
- package/packages/cli/dist/commands/doctor.d.ts.map +1 -0
- package/packages/cli/dist/commands/doctor.js +628 -0
- package/packages/cli/dist/commands/doctor.js.map +1 -0
- package/packages/cli/dist/commands/emit-registries.d.ts +33 -0
- package/packages/cli/dist/commands/emit-registries.d.ts.map +1 -0
- package/packages/cli/dist/commands/emit-registries.js +109 -0
- package/packages/cli/dist/commands/emit-registries.js.map +1 -0
- package/packages/cli/dist/commands/enforce-surface.d.ts +62 -0
- package/packages/cli/dist/commands/enforce-surface.d.ts.map +1 -0
- package/packages/cli/dist/commands/enforce-surface.js +172 -0
- package/packages/cli/dist/commands/enforce-surface.js.map +1 -0
- package/packages/cli/dist/commands/fmt.d.ts +17 -0
- package/packages/cli/dist/commands/fmt.d.ts.map +1 -0
- package/packages/cli/dist/commands/fmt.js +129 -0
- package/packages/cli/dist/commands/fmt.js.map +1 -0
- package/packages/cli/dist/commands/gen-tests.d.ts +41 -0
- package/packages/cli/dist/commands/gen-tests.d.ts.map +1 -0
- package/packages/cli/dist/commands/gen-tests.js +370 -0
- package/packages/cli/dist/commands/gen-tests.js.map +1 -0
- package/packages/cli/dist/commands/generate-from-prompt.d.ts +34 -0
- package/packages/cli/dist/commands/generate-from-prompt.d.ts.map +1 -0
- package/packages/cli/dist/commands/generate-from-prompt.js +990 -0
- package/packages/cli/dist/commands/generate-from-prompt.js.map +1 -0
- package/packages/cli/dist/commands/generate.d.ts +36 -0
- package/packages/cli/dist/commands/generate.d.ts.map +1 -0
- package/packages/cli/dist/commands/generate.js +371 -0
- package/packages/cli/dist/commands/generate.js.map +1 -0
- package/packages/cli/dist/commands/harness.d.ts +13 -0
- package/packages/cli/dist/commands/harness.d.ts.map +1 -0
- package/packages/cli/dist/commands/harness.js +276 -0
- package/packages/cli/dist/commands/harness.js.map +1 -0
- package/packages/cli/dist/commands/init-ci.d.ts +19 -0
- package/packages/cli/dist/commands/init-ci.d.ts.map +1 -0
- package/packages/cli/dist/commands/init-ci.js +148 -0
- package/packages/cli/dist/commands/init-ci.js.map +1 -0
- package/packages/cli/dist/commands/init.d.ts +33 -0
- package/packages/cli/dist/commands/init.d.ts.map +1 -0
- package/packages/cli/dist/commands/init.js +157 -0
- package/packages/cli/dist/commands/init.js.map +1 -0
- package/packages/cli/dist/commands/install-hooks.d.ts +29 -0
- package/packages/cli/dist/commands/install-hooks.d.ts.map +1 -0
- package/packages/cli/dist/commands/install-hooks.js +139 -0
- package/packages/cli/dist/commands/install-hooks.js.map +1 -0
- package/packages/cli/dist/commands/integration-check.d.ts +62 -0
- package/packages/cli/dist/commands/integration-check.d.ts.map +1 -0
- package/packages/cli/dist/commands/integration-check.js +298 -0
- package/packages/cli/dist/commands/integration-check.js.map +1 -0
- package/packages/cli/dist/commands/ir-diff.d.ts +8 -0
- package/packages/cli/dist/commands/ir-diff.d.ts.map +1 -0
- package/packages/cli/dist/commands/ir-diff.js +199 -0
- package/packages/cli/dist/commands/ir-diff.js.map +1 -0
- package/packages/cli/dist/commands/lint-routes.d.ts +56 -0
- package/packages/cli/dist/commands/lint-routes.d.ts.map +1 -0
- package/packages/cli/dist/commands/lint-routes.js +228 -0
- package/packages/cli/dist/commands/lint-routes.js.map +1 -0
- package/packages/cli/dist/commands/load-test.d.ts +61 -0
- package/packages/cli/dist/commands/load-test.d.ts.map +1 -0
- package/packages/cli/dist/commands/load-test.js +675 -0
- package/packages/cli/dist/commands/load-test.js.map +1 -0
- package/packages/cli/dist/commands/migrate.d.ts +21 -0
- package/packages/cli/dist/commands/migrate.d.ts.map +1 -0
- package/packages/cli/dist/commands/migrate.js +264 -0
- package/packages/cli/dist/commands/migrate.js.map +1 -0
- package/packages/cli/dist/commands/mock.d.ts +79 -0
- package/packages/cli/dist/commands/mock.d.ts.map +1 -0
- package/packages/cli/dist/commands/mock.js +324 -0
- package/packages/cli/dist/commands/mock.js.map +1 -0
- package/packages/cli/dist/commands/pack-unpack.d.ts +30 -0
- package/packages/cli/dist/commands/pack-unpack.d.ts.map +1 -0
- package/packages/cli/dist/commands/pack-unpack.js +108 -0
- package/packages/cli/dist/commands/pack-unpack.js.map +1 -0
- package/packages/cli/dist/commands/preflight.d.ts +31 -0
- package/packages/cli/dist/commands/preflight.d.ts.map +1 -0
- package/packages/cli/dist/commands/preflight.js +246 -0
- package/packages/cli/dist/commands/preflight.js.map +1 -0
- package/packages/cli/dist/commands/profile.d.ts +30 -0
- package/packages/cli/dist/commands/profile.d.ts.map +1 -0
- package/packages/cli/dist/commands/profile.js +201 -0
- package/packages/cli/dist/commands/profile.js.map +1 -0
- package/packages/cli/dist/commands/repl.d.ts +16 -0
- package/packages/cli/dist/commands/repl.d.ts.map +1 -0
- package/packages/cli/dist/commands/repl.js +772 -0
- package/packages/cli/dist/commands/repl.js.map +1 -0
- package/packages/cli/dist/commands/routes.d.ts +24 -0
- package/packages/cli/dist/commands/routes.d.ts.map +1 -0
- package/packages/cli/dist/commands/routes.js +144 -0
- package/packages/cli/dist/commands/routes.js.map +1 -0
- package/packages/cli/dist/commands/scan.d.ts +23 -0
- package/packages/cli/dist/commands/scan.d.ts.map +1 -0
- package/packages/cli/dist/commands/scan.js +722 -0
- package/packages/cli/dist/commands/scan.js.map +1 -0
- package/packages/cli/dist/commands/seed.d.ts +35 -0
- package/packages/cli/dist/commands/seed.d.ts.map +1 -0
- package/packages/cli/dist/commands/seed.js +503 -0
- package/packages/cli/dist/commands/seed.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-ajv.d.ts +4 -0
- package/packages/cli/dist/commands/validate-ai-ajv.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-ajv.js +78 -0
- package/packages/cli/dist/commands/validate-ai-ajv.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-compiler.d.ts +5 -0
- package/packages/cli/dist/commands/validate-ai-compiler.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-compiler.js +8 -0
- package/packages/cli/dist/commands/validate-ai-compiler.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-report.d.ts +5 -0
- package/packages/cli/dist/commands/validate-ai-report.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-report.js +80 -0
- package/packages/cli/dist/commands/validate-ai-report.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-resolve-inputs.d.ts +6 -0
- package/packages/cli/dist/commands/validate-ai-resolve-inputs.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-resolve-inputs.js +54 -0
- package/packages/cli/dist/commands/validate-ai-resolve-inputs.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-semantic-checks.d.ts +4 -0
- package/packages/cli/dist/commands/validate-ai-semantic-checks.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-semantic-checks.js +218 -0
- package/packages/cli/dist/commands/validate-ai-semantic-checks.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-types.d.ts +41 -0
- package/packages/cli/dist/commands/validate-ai-types.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-types.js +2 -0
- package/packages/cli/dist/commands/validate-ai-types.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-validate-file.d.ts +5 -0
- package/packages/cli/dist/commands/validate-ai-validate-file.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-validate-file.js +126 -0
- package/packages/cli/dist/commands/validate-ai-validate-file.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai.d.ts +15 -0
- package/packages/cli/dist/commands/validate-ai.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai.js +124 -0
- package/packages/cli/dist/commands/validate-ai.js.map +1 -0
- package/packages/cli/dist/commands/validate.d.ts +15 -0
- package/packages/cli/dist/commands/validate.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate.js +205 -0
- package/packages/cli/dist/commands/validate.js.map +1 -0
- package/packages/cli/dist/commands/versions.d.ts +56 -0
- package/packages/cli/dist/commands/versions.d.ts.map +1 -0
- package/packages/cli/dist/commands/versions.js +427 -0
- package/packages/cli/dist/commands/versions.js.map +1 -0
- package/packages/cli/dist/commands/watch.d.ts +34 -0
- package/packages/cli/dist/commands/watch.d.ts.map +1 -0
- package/packages/cli/dist/commands/watch.js +253 -0
- package/packages/cli/dist/commands/watch.js.map +1 -0
- package/packages/cli/dist/index.d.ts +14 -0
- package/packages/cli/dist/index.d.ts.map +1 -0
- package/packages/cli/dist/index.js +1159 -0
- package/packages/cli/dist/index.js.map +1 -0
- package/packages/cli/dist/utils/config-validate.d.ts +48 -0
- package/packages/cli/dist/utils/config-validate.d.ts.map +1 -0
- package/packages/cli/dist/utils/config-validate.js +116 -0
- package/packages/cli/dist/utils/config-validate.js.map +1 -0
- package/packages/cli/dist/utils/config.d.ts +360 -0
- package/packages/cli/dist/utils/config.d.ts.map +1 -0
- package/packages/cli/dist/utils/config.js +567 -0
- package/packages/cli/dist/utils/config.js.map +1 -0
- package/packages/cli/dist/utils/schema.d.ts +8 -0
- package/packages/cli/dist/utils/schema.d.ts.map +1 -0
- package/packages/cli/dist/utils/schema.js +13 -0
- package/packages/cli/dist/utils/schema.js.map +1 -0
- package/packages/lsp-server/bin/manifest-lsp.js +3 -0
- package/packages/lsp-server/dist/compiler-bridge.d.ts +24 -0
- package/packages/lsp-server/dist/compiler-bridge.d.ts.map +1 -0
- package/packages/lsp-server/dist/compiler-bridge.js +32 -0
- package/packages/lsp-server/dist/compiler-bridge.js.map +1 -0
- package/packages/lsp-server/dist/document-store.d.ts +23 -0
- package/packages/lsp-server/dist/document-store.d.ts.map +1 -0
- package/packages/lsp-server/dist/document-store.js +40 -0
- package/packages/lsp-server/dist/document-store.js.map +1 -0
- package/packages/lsp-server/dist/features/completion.d.ts +23 -0
- package/packages/lsp-server/dist/features/completion.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/completion.js +293 -0
- package/packages/lsp-server/dist/features/completion.js.map +1 -0
- package/packages/lsp-server/dist/features/definition.d.ts +9 -0
- package/packages/lsp-server/dist/features/definition.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/definition.js +24 -0
- package/packages/lsp-server/dist/features/definition.js.map +1 -0
- package/packages/lsp-server/dist/features/diagnostics.d.ts +8 -0
- package/packages/lsp-server/dist/features/diagnostics.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/diagnostics.js +40 -0
- package/packages/lsp-server/dist/features/diagnostics.js.map +1 -0
- package/packages/lsp-server/dist/features/document-symbols.d.ts +8 -0
- package/packages/lsp-server/dist/features/document-symbols.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/document-symbols.js +164 -0
- package/packages/lsp-server/dist/features/document-symbols.js.map +1 -0
- package/packages/lsp-server/dist/features/hover.d.ts +9 -0
- package/packages/lsp-server/dist/features/hover.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/hover.js +100 -0
- package/packages/lsp-server/dist/features/hover.js.map +1 -0
- package/packages/lsp-server/dist/index.d.ts +6 -0
- package/packages/lsp-server/dist/index.d.ts.map +1 -0
- package/packages/lsp-server/dist/index.js +11 -0
- package/packages/lsp-server/dist/index.js.map +1 -0
- package/packages/lsp-server/dist/position-utils.d.ts +25 -0
- package/packages/lsp-server/dist/position-utils.d.ts.map +1 -0
- package/packages/lsp-server/dist/position-utils.js +39 -0
- package/packages/lsp-server/dist/position-utils.js.map +1 -0
- package/packages/lsp-server/dist/server.d.ts +14 -0
- package/packages/lsp-server/dist/server.d.ts.map +1 -0
- package/packages/lsp-server/dist/server.js +96 -0
- package/packages/lsp-server/dist/server.js.map +1 -0
- package/packages/lsp-server/dist/symbols/builtin-docs.d.ts +34 -0
- package/packages/lsp-server/dist/symbols/builtin-docs.d.ts.map +1 -0
- package/packages/lsp-server/dist/symbols/builtin-docs.js +193 -0
- package/packages/lsp-server/dist/symbols/builtin-docs.js.map +1 -0
- package/packages/lsp-server/dist/symbols/symbol-index.d.ts +18 -0
- package/packages/lsp-server/dist/symbols/symbol-index.d.ts.map +1 -0
- package/packages/lsp-server/dist/symbols/symbol-index.js +107 -0
- package/packages/lsp-server/dist/symbols/symbol-index.js.map +1 -0
- package/packages/mcp-server/bin/manifest-mcp.js +27 -0
- package/packages/mcp-server/dist/index.d.ts +24 -0
- package/packages/mcp-server/dist/index.d.ts.map +1 -0
- package/packages/mcp-server/dist/index.js +36 -0
- package/packages/mcp-server/dist/index.js.map +1 -0
- package/packages/mcp-server/dist/resources/ir-cache.d.ts +9 -0
- package/packages/mcp-server/dist/resources/ir-cache.d.ts.map +1 -0
- package/packages/mcp-server/dist/resources/ir-cache.js +47 -0
- package/packages/mcp-server/dist/resources/ir-cache.js.map +1 -0
- package/packages/mcp-server/dist/resources/ir-schema.d.ts +8 -0
- package/packages/mcp-server/dist/resources/ir-schema.d.ts.map +1 -0
- package/packages/mcp-server/dist/resources/ir-schema.js +39 -0
- package/packages/mcp-server/dist/resources/ir-schema.js.map +1 -0
- package/packages/mcp-server/dist/resources/semantics.d.ts +8 -0
- package/packages/mcp-server/dist/resources/semantics.d.ts.map +1 -0
- package/packages/mcp-server/dist/resources/semantics.js +38 -0
- package/packages/mcp-server/dist/resources/semantics.js.map +1 -0
- package/packages/mcp-server/dist/server.d.ts +7 -0
- package/packages/mcp-server/dist/server.d.ts.map +1 -0
- package/packages/mcp-server/dist/server.js +22 -0
- package/packages/mcp-server/dist/server.js.map +1 -0
- package/packages/mcp-server/dist/state/session-store.d.ts +39 -0
- package/packages/mcp-server/dist/state/session-store.d.ts.map +1 -0
- package/packages/mcp-server/dist/state/session-store.js +58 -0
- package/packages/mcp-server/dist/state/session-store.js.map +1 -0
- package/packages/mcp-server/dist/tools/compile.d.ts +30 -0
- package/packages/mcp-server/dist/tools/compile.d.ts.map +1 -0
- package/packages/mcp-server/dist/tools/compile.js +54 -0
- package/packages/mcp-server/dist/tools/compile.js.map +1 -0
- package/packages/mcp-server/dist/tools/execute.d.ts +112 -0
- package/packages/mcp-server/dist/tools/execute.d.ts.map +1 -0
- package/packages/mcp-server/dist/tools/execute.js +103 -0
- package/packages/mcp-server/dist/tools/execute.js.map +1 -0
- package/packages/mcp-server/dist/tools/explain.d.ts +25 -0
- package/packages/mcp-server/dist/tools/explain.d.ts.map +1 -0
- package/packages/mcp-server/dist/tools/explain.js +254 -0
- package/packages/mcp-server/dist/tools/explain.js.map +1 -0
- package/packages/mcp-server/dist/tools/validate.d.ts +23 -0
- package/packages/mcp-server/dist/tools/validate.d.ts.map +1 -0
- package/packages/mcp-server/dist/tools/validate.js +38 -0
- package/packages/mcp-server/dist/tools/validate.js.map +1 -0
- package/src/manifest/audit/sinks/postgres.sql +51 -0
- package/src/manifest/outbox/stores/postgres.sql +61 -0
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* manifest docs command
|
|
3
|
+
*
|
|
4
|
+
* Generates a static documentation site from Manifest IR.
|
|
5
|
+
* Each entity gets a reference page with property tables, command signatures,
|
|
6
|
+
* policy rules, constraint details, and event listings.
|
|
7
|
+
*/
|
|
8
|
+
import fs from 'fs/promises';
|
|
9
|
+
import path from 'path';
|
|
10
|
+
import { glob } from 'glob';
|
|
11
|
+
import chalk from 'chalk';
|
|
12
|
+
import ora from 'ora';
|
|
13
|
+
// Import from the main Manifest package
|
|
14
|
+
async function loadCompiler() {
|
|
15
|
+
const module = await import('@angriff36/manifest/ir-compiler');
|
|
16
|
+
return { compileToIR: module.compileToIR };
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Load IR from a file (either .manifest source or .ir.json)
|
|
20
|
+
*/
|
|
21
|
+
async function loadIR(filePath) {
|
|
22
|
+
const resolved = path.resolve(process.cwd(), filePath);
|
|
23
|
+
const content = await fs.readFile(resolved, 'utf-8');
|
|
24
|
+
if (filePath.endsWith('.manifest')) {
|
|
25
|
+
const { compileToIR } = await loadCompiler();
|
|
26
|
+
const result = await compileToIR(content, { sourcePath: resolved });
|
|
27
|
+
if (!result.ir) {
|
|
28
|
+
const errors = (result.diagnostics || [])
|
|
29
|
+
.filter((d) => d.severity === 'error')
|
|
30
|
+
.map((d) => d.message)
|
|
31
|
+
.join('\n');
|
|
32
|
+
throw new Error(`Compilation failed:\n${errors}`);
|
|
33
|
+
}
|
|
34
|
+
return result.ir;
|
|
35
|
+
}
|
|
36
|
+
return JSON.parse(content);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get all input files (manifest or IR)
|
|
40
|
+
*/
|
|
41
|
+
async function getInputFiles(source) {
|
|
42
|
+
const resolved = path.resolve(process.cwd(), source);
|
|
43
|
+
const stat = await fs.stat(resolved).catch(() => null);
|
|
44
|
+
if (!stat) {
|
|
45
|
+
throw new Error(`Source not found: ${source}`);
|
|
46
|
+
}
|
|
47
|
+
if (stat.isFile()) {
|
|
48
|
+
return [resolved];
|
|
49
|
+
}
|
|
50
|
+
// Directory: find both .manifest and .ir.json files
|
|
51
|
+
const manifestFiles = await glob('**/*.manifest', { cwd: resolved });
|
|
52
|
+
const irFiles = await glob('**/*.ir.json', { cwd: resolved });
|
|
53
|
+
const all = [...manifestFiles, ...irFiles];
|
|
54
|
+
return all.map(f => path.join(resolved, f));
|
|
55
|
+
}
|
|
56
|
+
// ─── Expression formatting ──────────────────────────────────────────────
|
|
57
|
+
function formatExpression(expr) {
|
|
58
|
+
switch (expr.kind) {
|
|
59
|
+
case 'literal':
|
|
60
|
+
return formatValue(expr.value);
|
|
61
|
+
case 'identifier':
|
|
62
|
+
return expr.name;
|
|
63
|
+
case 'member':
|
|
64
|
+
return `${formatExpression(expr.object)}.${expr.property}`;
|
|
65
|
+
case 'binary':
|
|
66
|
+
return `${formatExpression(expr.left)} ${expr.operator} ${formatExpression(expr.right)}`;
|
|
67
|
+
case 'unary':
|
|
68
|
+
return `${expr.operator}${formatExpression(expr.operand)}`;
|
|
69
|
+
case 'call':
|
|
70
|
+
return `${formatExpression(expr.callee)}(${(expr.args || []).map(formatExpression).join(', ')})`;
|
|
71
|
+
case 'conditional':
|
|
72
|
+
return `${formatExpression(expr.condition)} ? ${formatExpression(expr.consequent)} : ${formatExpression(expr.alternate)}`;
|
|
73
|
+
case 'array':
|
|
74
|
+
return `[${(expr.elements || []).map(formatExpression).join(', ')}]`;
|
|
75
|
+
case 'object':
|
|
76
|
+
return `{ ${(expr.properties || []).map(p => `${p.key}: ${formatExpression(p.value)}`).join(', ')} }`;
|
|
77
|
+
case 'lambda':
|
|
78
|
+
return `(${(expr.params || []).join(', ')}) => ${formatExpression(expr.body)}`;
|
|
79
|
+
default:
|
|
80
|
+
return JSON.stringify(expr);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function formatValue(val) {
|
|
84
|
+
switch (val.kind) {
|
|
85
|
+
case 'string':
|
|
86
|
+
return `"${val.value}"`;
|
|
87
|
+
case 'number':
|
|
88
|
+
case 'boolean':
|
|
89
|
+
return String(val.value);
|
|
90
|
+
case 'null':
|
|
91
|
+
return 'null';
|
|
92
|
+
case 'array':
|
|
93
|
+
return `[${(val.elements || []).map(formatValue).join(', ')}]`;
|
|
94
|
+
case 'object': {
|
|
95
|
+
const entries = Object.entries(val.properties || {});
|
|
96
|
+
return `{ ${entries.map(([k, v]) => `${k}: ${formatValue(v)}`).join(', ')} }`;
|
|
97
|
+
}
|
|
98
|
+
default:
|
|
99
|
+
return JSON.stringify(val);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function formatType(type) {
|
|
103
|
+
let base = type.name;
|
|
104
|
+
if (type.generic) {
|
|
105
|
+
base += `<${formatType(type.generic)}>`;
|
|
106
|
+
}
|
|
107
|
+
if (type.params) {
|
|
108
|
+
const paramStr = Object.entries(type.params)
|
|
109
|
+
.map(([k, v]) => `${k}: ${v}`)
|
|
110
|
+
.join(', ');
|
|
111
|
+
base += `(${paramStr})`;
|
|
112
|
+
}
|
|
113
|
+
if (type.nullable) {
|
|
114
|
+
base += '?';
|
|
115
|
+
}
|
|
116
|
+
return base;
|
|
117
|
+
}
|
|
118
|
+
// ─── Escape helpers ─────────────────────────────────────────────────────
|
|
119
|
+
function escapeHtml(str) {
|
|
120
|
+
return str
|
|
121
|
+
.replace(/&/g, '&')
|
|
122
|
+
.replace(/</g, '<')
|
|
123
|
+
.replace(/>/g, '>')
|
|
124
|
+
.replace(/"/g, '"');
|
|
125
|
+
}
|
|
126
|
+
function escapeMarkdown(str) {
|
|
127
|
+
return str.replace(/\|/g, '\\|').replace(/\n/g, ' ');
|
|
128
|
+
}
|
|
129
|
+
// ─── HTML generation ────────────────────────────────────────────────────
|
|
130
|
+
function generateEntityPageHtml(entity, commands, policies, events, stores, siteTitle) {
|
|
131
|
+
const entityCommands = commands.filter(c => c.entity === entity.name);
|
|
132
|
+
const commandPolicyNames = new Set(entityCommands.flatMap(c => c.policies || []));
|
|
133
|
+
const entityPolicies = policies.filter(p => p.entity === entity.name ||
|
|
134
|
+
entity.policies.includes(p.name) ||
|
|
135
|
+
(entity.defaultPolicies || []).includes(p.name) ||
|
|
136
|
+
commandPolicyNames.has(p.name) ||
|
|
137
|
+
(!p.entity && !p.module));
|
|
138
|
+
const entityEvents = events.filter(e => entityCommands.some(c => c.emits.includes(e.name)));
|
|
139
|
+
const entityStore = stores.find(s => s.entity === entity.name);
|
|
140
|
+
return `<!DOCTYPE html>
|
|
141
|
+
<html lang="en">
|
|
142
|
+
<head>
|
|
143
|
+
<meta charset="UTF-8">
|
|
144
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
145
|
+
<title>${escapeHtml(entity.name)} - ${escapeHtml(siteTitle)}</title>
|
|
146
|
+
<style>
|
|
147
|
+
${getStyles()}
|
|
148
|
+
</style>
|
|
149
|
+
</head>
|
|
150
|
+
<body>
|
|
151
|
+
<nav class="sidebar">
|
|
152
|
+
<a href="index.html" class="nav-title">${escapeHtml(siteTitle)}</a>
|
|
153
|
+
</nav>
|
|
154
|
+
<main>
|
|
155
|
+
<h1>${escapeHtml(entity.name)}</h1>
|
|
156
|
+
${entity.module ? `<p class="module-badge">Module: <code>${escapeHtml(entity.module)}</code></p>` : ''}
|
|
157
|
+
${entity.key ? `<p class="meta">Primary Key: <code>${escapeHtml(entity.key.join(', '))}</code></p>` : ''}
|
|
158
|
+
${entityStore ? `<p class="meta">Store: <code>${escapeHtml(entityStore.target)}</code></p>` : ''}
|
|
159
|
+
|
|
160
|
+
${renderPropertiesSection(entity.properties)}
|
|
161
|
+
${renderComputedPropertiesSection(entity.computedProperties)}
|
|
162
|
+
${renderRelationshipsSection(entity.relationships)}
|
|
163
|
+
${renderConstraintsSection(entity.constraints)}
|
|
164
|
+
${renderCommandsSection(entityCommands)}
|
|
165
|
+
${renderPoliciesSection(entityPolicies)}
|
|
166
|
+
${renderEventsSection(entityEvents)}
|
|
167
|
+
${renderTransitionsSection(entity.transitions)}
|
|
168
|
+
</main>
|
|
169
|
+
</body>
|
|
170
|
+
</html>`;
|
|
171
|
+
}
|
|
172
|
+
function generateIndexPageHtml(ir, siteTitle) {
|
|
173
|
+
return `<!DOCTYPE html>
|
|
174
|
+
<html lang="en">
|
|
175
|
+
<head>
|
|
176
|
+
<meta charset="UTF-8">
|
|
177
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
178
|
+
<title>${escapeHtml(siteTitle)}</title>
|
|
179
|
+
<style>
|
|
180
|
+
${getStyles()}
|
|
181
|
+
</style>
|
|
182
|
+
</head>
|
|
183
|
+
<body>
|
|
184
|
+
<nav class="sidebar">
|
|
185
|
+
<a href="index.html" class="nav-title">${escapeHtml(siteTitle)}</a>
|
|
186
|
+
</nav>
|
|
187
|
+
<main>
|
|
188
|
+
<h1>${escapeHtml(siteTitle)}</h1>
|
|
189
|
+
<p class="meta">Compiled with Manifest v${escapeHtml(ir.provenance.compilerVersion)} | Schema v${escapeHtml(ir.provenance.schemaVersion)}</p>
|
|
190
|
+
|
|
191
|
+
<h2>Entities</h2>
|
|
192
|
+
<ul class="entity-list">
|
|
193
|
+
${ir.entities.map(e => ` <li><a href="${encodeURIComponent(e.name)}.html">${escapeHtml(e.name)}</a>${e.module ? ` <span class="module-badge">${escapeHtml(e.module)}</span>` : ''} — ${e.properties.length} properties, ${e.commands.length} commands</li>`).join('\n')}
|
|
194
|
+
</ul>
|
|
195
|
+
|
|
196
|
+
${ir.modules.length > 0 ? `
|
|
197
|
+
<h2>Modules</h2>
|
|
198
|
+
<ul>
|
|
199
|
+
${ir.modules.map(m => ` <li><strong>${escapeHtml(m.name)}</strong> — ${m.entities.length} entities</li>`).join('\n')}
|
|
200
|
+
</ul>
|
|
201
|
+
` : ''}
|
|
202
|
+
|
|
203
|
+
<h2>Summary</h2>
|
|
204
|
+
<table>
|
|
205
|
+
<thead><tr><th>Concept</th><th>Count</th></tr></thead>
|
|
206
|
+
<tbody>
|
|
207
|
+
<tr><td>Entities</td><td>${ir.entities.length}</td></tr>
|
|
208
|
+
<tr><td>Commands</td><td>${ir.commands.length}</td></tr>
|
|
209
|
+
<tr><td>Policies</td><td>${ir.policies.length}</td></tr>
|
|
210
|
+
<tr><td>Events</td><td>${ir.events.length}</td></tr>
|
|
211
|
+
<tr><td>Stores</td><td>${ir.stores.length}</td></tr>
|
|
212
|
+
</tbody>
|
|
213
|
+
</table>
|
|
214
|
+
</main>
|
|
215
|
+
</body>
|
|
216
|
+
</html>`;
|
|
217
|
+
}
|
|
218
|
+
function renderPropertiesSection(properties) {
|
|
219
|
+
if (properties.length === 0)
|
|
220
|
+
return '';
|
|
221
|
+
return `
|
|
222
|
+
<h2>Properties</h2>
|
|
223
|
+
<table>
|
|
224
|
+
<thead><tr><th>Name</th><th>Type</th><th>Modifiers</th><th>Default</th></tr></thead>
|
|
225
|
+
<tbody>
|
|
226
|
+
${properties.map(p => `<tr>
|
|
227
|
+
<td><code>${escapeHtml(p.name)}</code></td>
|
|
228
|
+
<td><code>${escapeHtml(formatType(p.type))}</code></td>
|
|
229
|
+
<td>${p.modifiers.length > 0 ? p.modifiers.map(m => `<span class="badge">${escapeHtml(m)}</span>`).join(' ') : '—'}</td>
|
|
230
|
+
<td>${p.defaultValue ? `<code>${escapeHtml(formatValue(p.defaultValue))}</code>` : '—'}</td>
|
|
231
|
+
</tr>`).join('\n')}
|
|
232
|
+
</tbody>
|
|
233
|
+
</table>`;
|
|
234
|
+
}
|
|
235
|
+
function renderComputedPropertiesSection(computedProperties) {
|
|
236
|
+
if (computedProperties.length === 0)
|
|
237
|
+
return '';
|
|
238
|
+
return `
|
|
239
|
+
<h2>Computed Properties</h2>
|
|
240
|
+
<table>
|
|
241
|
+
<thead><tr><th>Name</th><th>Type</th><th>Expression</th><th>Dependencies</th></tr></thead>
|
|
242
|
+
<tbody>
|
|
243
|
+
${computedProperties.map(cp => `<tr>
|
|
244
|
+
<td><code>${escapeHtml(cp.name)}</code></td>
|
|
245
|
+
<td><code>${escapeHtml(formatType(cp.type))}</code></td>
|
|
246
|
+
<td><code>${escapeHtml(formatExpression(cp.expression))}</code></td>
|
|
247
|
+
<td>${cp.dependencies.length > 0 ? cp.dependencies.map(d => `<code>${escapeHtml(d)}</code>`).join(', ') : '—'}</td>
|
|
248
|
+
</tr>`).join('\n')}
|
|
249
|
+
</tbody>
|
|
250
|
+
</table>`;
|
|
251
|
+
}
|
|
252
|
+
function renderRelationshipsSection(relationships) {
|
|
253
|
+
if (relationships.length === 0)
|
|
254
|
+
return '';
|
|
255
|
+
return `
|
|
256
|
+
<h2>Relationships</h2>
|
|
257
|
+
<table>
|
|
258
|
+
<thead><tr><th>Name</th><th>Kind</th><th>Target</th><th>FK / Through</th><th>On Delete</th></tr></thead>
|
|
259
|
+
<tbody>
|
|
260
|
+
${relationships.map(r => {
|
|
261
|
+
let fkInfo = '—';
|
|
262
|
+
if (r.foreignKey) {
|
|
263
|
+
fkInfo = `fields: [${r.foreignKey.fields.join(', ')}]`;
|
|
264
|
+
if (r.foreignKey.references) {
|
|
265
|
+
fkInfo += ` → [${r.foreignKey.references.join(', ')}]`;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
else if (r.through) {
|
|
269
|
+
fkInfo = `through: ${r.through}`;
|
|
270
|
+
}
|
|
271
|
+
return `<tr>
|
|
272
|
+
<td><code>${escapeHtml(r.name)}</code></td>
|
|
273
|
+
<td><span class="badge">${escapeHtml(r.kind)}</span></td>
|
|
274
|
+
<td><code>${escapeHtml(r.target)}</code></td>
|
|
275
|
+
<td>${fkInfo}</td>
|
|
276
|
+
<td>${r.onDelete ? escapeHtml(r.onDelete) : '—'}</td>
|
|
277
|
+
</tr>`;
|
|
278
|
+
}).join('\n')}
|
|
279
|
+
</tbody>
|
|
280
|
+
</table>`;
|
|
281
|
+
}
|
|
282
|
+
function renderConstraintsSection(constraints) {
|
|
283
|
+
if (constraints.length === 0)
|
|
284
|
+
return '';
|
|
285
|
+
return `
|
|
286
|
+
<h2>Constraints</h2>
|
|
287
|
+
<table>
|
|
288
|
+
<thead><tr><th>Name</th><th>Code</th><th>Severity</th><th>Expression</th><th>Message</th></tr></thead>
|
|
289
|
+
<tbody>
|
|
290
|
+
${constraints.map(c => `<tr>
|
|
291
|
+
<td><code>${escapeHtml(c.name)}</code></td>
|
|
292
|
+
<td><code>${escapeHtml(c.code)}</code></td>
|
|
293
|
+
<td><span class="badge badge-${c.severity || 'block'}">${escapeHtml(c.severity || 'block')}</span></td>
|
|
294
|
+
<td><code>${escapeHtml(formatExpression(c.expression))}</code></td>
|
|
295
|
+
<td>${c.message ? escapeHtml(c.message) : '—'}</td>
|
|
296
|
+
</tr>`).join('\n')}
|
|
297
|
+
</tbody>
|
|
298
|
+
</table>`;
|
|
299
|
+
}
|
|
300
|
+
function renderCommandsSection(commands) {
|
|
301
|
+
if (commands.length === 0)
|
|
302
|
+
return '';
|
|
303
|
+
return `
|
|
304
|
+
<h2>Commands</h2>
|
|
305
|
+
${commands.map(cmd => `
|
|
306
|
+
<div class="command-card">
|
|
307
|
+
<h3><code>${escapeHtml(cmd.name)}</code></h3>
|
|
308
|
+
${cmd.policies && cmd.policies.length > 0 ? `<p class="meta">Policies: ${cmd.policies.map(p => `<code>${escapeHtml(p)}</code>`).join(', ')}</p>` : ''}
|
|
309
|
+
${cmd.emits.length > 0 ? `<p class="meta">Emits: ${cmd.emits.map(e => `<code>${escapeHtml(e)}</code>`).join(', ')}</p>` : ''}
|
|
310
|
+
${cmd.returns ? `<p class="meta">Returns: <code>${escapeHtml(formatType(cmd.returns))}</code></p>` : ''}
|
|
311
|
+
|
|
312
|
+
${cmd.parameters.length > 0 ? `
|
|
313
|
+
<h4>Parameters</h4>
|
|
314
|
+
<table>
|
|
315
|
+
<thead><tr><th>Name</th><th>Type</th><th>Required</th><th>Default</th></tr></thead>
|
|
316
|
+
<tbody>
|
|
317
|
+
${cmd.parameters.map(p => `<tr>
|
|
318
|
+
<td><code>${escapeHtml(p.name)}</code></td>
|
|
319
|
+
<td><code>${escapeHtml(formatType(p.type))}</code></td>
|
|
320
|
+
<td>${p.required ? 'Yes' : 'No'}</td>
|
|
321
|
+
<td>${p.defaultValue ? `<code>${escapeHtml(formatValue(p.defaultValue))}</code>` : '—'}</td>
|
|
322
|
+
</tr>`).join('\n')}
|
|
323
|
+
</tbody>
|
|
324
|
+
</table>
|
|
325
|
+
` : ''}
|
|
326
|
+
|
|
327
|
+
${cmd.guards.length > 0 ? `
|
|
328
|
+
<h4>Guards</h4>
|
|
329
|
+
<ol class="guard-list">
|
|
330
|
+
${cmd.guards.map(g => ` <li><code>${escapeHtml(formatExpression(g))}</code></li>`).join('\n')}
|
|
331
|
+
</ol>
|
|
332
|
+
` : ''}
|
|
333
|
+
|
|
334
|
+
${cmd.actions.length > 0 ? `
|
|
335
|
+
<h4>Actions</h4>
|
|
336
|
+
<ol class="action-list">
|
|
337
|
+
${cmd.actions.map(a => ` <li><span class="badge">${escapeHtml(a.kind)}</span>${a.target ? ` <code>${escapeHtml(a.target)}</code>` : ''} ← <code>${escapeHtml(formatExpression(a.expression))}</code></li>`).join('\n')}
|
|
338
|
+
</ol>
|
|
339
|
+
` : ''}
|
|
340
|
+
|
|
341
|
+
${(cmd.constraints || []).length > 0 ? `
|
|
342
|
+
<h4>Command Constraints</h4>
|
|
343
|
+
<table>
|
|
344
|
+
<thead><tr><th>Name</th><th>Severity</th><th>Expression</th><th>Message</th></tr></thead>
|
|
345
|
+
<tbody>
|
|
346
|
+
${(cmd.constraints || []).map(c => `<tr>
|
|
347
|
+
<td><code>${escapeHtml(c.name)}</code></td>
|
|
348
|
+
<td><span class="badge badge-${c.severity || 'block'}">${escapeHtml(c.severity || 'block')}</span></td>
|
|
349
|
+
<td><code>${escapeHtml(formatExpression(c.expression))}</code></td>
|
|
350
|
+
<td>${c.message ? escapeHtml(c.message) : '—'}</td>
|
|
351
|
+
</tr>`).join('\n')}
|
|
352
|
+
</tbody>
|
|
353
|
+
</table>
|
|
354
|
+
` : ''}
|
|
355
|
+
</div>
|
|
356
|
+
`).join('\n')}`;
|
|
357
|
+
}
|
|
358
|
+
function renderPoliciesSection(policies) {
|
|
359
|
+
if (policies.length === 0)
|
|
360
|
+
return '';
|
|
361
|
+
return `
|
|
362
|
+
<h2>Policies</h2>
|
|
363
|
+
<table>
|
|
364
|
+
<thead><tr><th>Name</th><th>Action</th><th>Expression</th><th>Message</th></tr></thead>
|
|
365
|
+
<tbody>
|
|
366
|
+
${policies.map(p => `<tr>
|
|
367
|
+
<td><code>${escapeHtml(p.name)}</code></td>
|
|
368
|
+
<td><span class="badge">${escapeHtml(p.action)}</span></td>
|
|
369
|
+
<td><code>${escapeHtml(formatExpression(p.expression))}</code></td>
|
|
370
|
+
<td>${p.message ? escapeHtml(p.message) : '—'}</td>
|
|
371
|
+
</tr>`).join('\n')}
|
|
372
|
+
</tbody>
|
|
373
|
+
</table>`;
|
|
374
|
+
}
|
|
375
|
+
function renderEventsSection(events) {
|
|
376
|
+
if (events.length === 0)
|
|
377
|
+
return '';
|
|
378
|
+
return `
|
|
379
|
+
<h2>Events</h2>
|
|
380
|
+
<table>
|
|
381
|
+
<thead><tr><th>Name</th><th>Channel</th><th>Payload</th></tr></thead>
|
|
382
|
+
<tbody>
|
|
383
|
+
${events.map(e => {
|
|
384
|
+
let payloadStr;
|
|
385
|
+
if (Array.isArray(e.payload)) {
|
|
386
|
+
payloadStr = e.payload.map(f => `${f.name}: ${formatType(f.type)}${f.required ? '' : '?'}`).join(', ');
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
payloadStr = formatType(e.payload);
|
|
390
|
+
}
|
|
391
|
+
return `<tr>
|
|
392
|
+
<td><code>${escapeHtml(e.name)}</code></td>
|
|
393
|
+
<td><code>${escapeHtml(e.channel)}</code></td>
|
|
394
|
+
<td><code>${escapeHtml(payloadStr)}</code></td>
|
|
395
|
+
</tr>`;
|
|
396
|
+
}).join('\n')}
|
|
397
|
+
</tbody>
|
|
398
|
+
</table>`;
|
|
399
|
+
}
|
|
400
|
+
function renderTransitionsSection(transitions) {
|
|
401
|
+
if (!transitions || transitions.length === 0)
|
|
402
|
+
return '';
|
|
403
|
+
return `
|
|
404
|
+
<h2>State Transitions</h2>
|
|
405
|
+
<table>
|
|
406
|
+
<thead><tr><th>Property</th><th>From</th><th>To</th></tr></thead>
|
|
407
|
+
<tbody>
|
|
408
|
+
${transitions.map(t => `<tr>
|
|
409
|
+
<td><code>${escapeHtml(t.property)}</code></td>
|
|
410
|
+
<td><code>${escapeHtml(t.from)}</code></td>
|
|
411
|
+
<td>${t.to.map(v => `<code>${escapeHtml(v)}</code>`).join(', ')}</td>
|
|
412
|
+
</tr>`).join('\n')}
|
|
413
|
+
</tbody>
|
|
414
|
+
</table>`;
|
|
415
|
+
}
|
|
416
|
+
function getStyles() {
|
|
417
|
+
return `
|
|
418
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
419
|
+
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1a1a2e; background: #f8f9fa; line-height: 1.6; display: flex; }
|
|
420
|
+
.sidebar { width: 240px; min-height: 100vh; background: #1a1a2e; padding: 20px; position: fixed; }
|
|
421
|
+
.nav-title { color: #fff; text-decoration: none; font-size: 18px; font-weight: 600; display: block; margin-bottom: 16px; }
|
|
422
|
+
main { margin-left: 240px; padding: 40px; max-width: 960px; width: 100%; }
|
|
423
|
+
h1 { font-size: 28px; margin-bottom: 8px; color: #1a1a2e; }
|
|
424
|
+
h2 { font-size: 20px; margin: 32px 0 12px; color: #1a1a2e; border-bottom: 1px solid #dee2e6; padding-bottom: 6px; }
|
|
425
|
+
h3 { font-size: 17px; margin: 16px 0 8px; }
|
|
426
|
+
h4 { font-size: 14px; margin: 12px 0 6px; color: #495057; }
|
|
427
|
+
p { margin-bottom: 8px; }
|
|
428
|
+
.meta { font-size: 14px; color: #6c757d; }
|
|
429
|
+
code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 13px; background: #e9ecef; padding: 1px 5px; border-radius: 3px; }
|
|
430
|
+
table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
|
|
431
|
+
th, td { text-align: left; padding: 8px 12px; border: 1px solid #dee2e6; }
|
|
432
|
+
th { background: #e9ecef; font-weight: 600; }
|
|
433
|
+
tr:nth-child(even) { background: #f8f9fa; }
|
|
434
|
+
.badge { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 3px; background: #e9ecef; color: #495057; font-weight: 500; }
|
|
435
|
+
.badge-block { background: #f8d7da; color: #842029; }
|
|
436
|
+
.badge-warn { background: #fff3cd; color: #664d03; }
|
|
437
|
+
.badge-ok { background: #d1e7dd; color: #0f5132; }
|
|
438
|
+
.module-badge { font-size: 12px; color: #6c757d; }
|
|
439
|
+
.command-card { background: #fff; border: 1px solid #dee2e6; border-radius: 6px; padding: 16px; margin: 12px 0; }
|
|
440
|
+
.guard-list, .action-list { padding-left: 20px; margin: 4px 0 12px; }
|
|
441
|
+
.guard-list li, .action-list li { margin: 4px 0; }
|
|
442
|
+
.entity-list { list-style: none; padding: 0; }
|
|
443
|
+
.entity-list li { padding: 6px 0; border-bottom: 1px solid #e9ecef; }
|
|
444
|
+
.entity-list a { color: #0d6efd; text-decoration: none; font-weight: 500; }
|
|
445
|
+
.entity-list a:hover { text-decoration: underline; }
|
|
446
|
+
`.trim();
|
|
447
|
+
}
|
|
448
|
+
// ─── Markdown generation ────────────────────────────────────────────────
|
|
449
|
+
function generateEntityPageMarkdown(entity, commands, policies, events, stores) {
|
|
450
|
+
const entityCommands = commands.filter(c => c.entity === entity.name);
|
|
451
|
+
const commandPolicyNames = new Set(entityCommands.flatMap(c => c.policies || []));
|
|
452
|
+
const entityPolicies = policies.filter(p => p.entity === entity.name ||
|
|
453
|
+
entity.policies.includes(p.name) ||
|
|
454
|
+
(entity.defaultPolicies || []).includes(p.name) ||
|
|
455
|
+
commandPolicyNames.has(p.name) ||
|
|
456
|
+
(!p.entity && !p.module));
|
|
457
|
+
const entityEvents = events.filter(e => entityCommands.some(c => c.emits.includes(e.name)));
|
|
458
|
+
const entityStore = stores.find(s => s.entity === entity.name);
|
|
459
|
+
const lines = [];
|
|
460
|
+
lines.push(`# ${entity.name}`);
|
|
461
|
+
lines.push('');
|
|
462
|
+
if (entity.module)
|
|
463
|
+
lines.push(`**Module:** \`${entity.module}\``);
|
|
464
|
+
if (entity.key)
|
|
465
|
+
lines.push(`**Primary Key:** \`${entity.key.join(', ')}\``);
|
|
466
|
+
if (entityStore)
|
|
467
|
+
lines.push(`**Store:** \`${entityStore.target}\``);
|
|
468
|
+
lines.push('');
|
|
469
|
+
// Properties
|
|
470
|
+
if (entity.properties.length > 0) {
|
|
471
|
+
lines.push('## Properties');
|
|
472
|
+
lines.push('');
|
|
473
|
+
lines.push('| Name | Type | Modifiers | Default |');
|
|
474
|
+
lines.push('|------|------|-----------|---------|');
|
|
475
|
+
for (const p of entity.properties) {
|
|
476
|
+
const mods = p.modifiers.length > 0 ? p.modifiers.join(', ') : '\u2014';
|
|
477
|
+
const def = p.defaultValue ? `\`${escapeMarkdown(formatValue(p.defaultValue))}\`` : '\u2014';
|
|
478
|
+
lines.push(`| \`${escapeMarkdown(p.name)}\` | \`${escapeMarkdown(formatType(p.type))}\` | ${mods} | ${def} |`);
|
|
479
|
+
}
|
|
480
|
+
lines.push('');
|
|
481
|
+
}
|
|
482
|
+
// Computed Properties
|
|
483
|
+
if (entity.computedProperties.length > 0) {
|
|
484
|
+
lines.push('## Computed Properties');
|
|
485
|
+
lines.push('');
|
|
486
|
+
lines.push('| Name | Type | Expression | Dependencies |');
|
|
487
|
+
lines.push('|------|------|------------|--------------|');
|
|
488
|
+
for (const cp of entity.computedProperties) {
|
|
489
|
+
const deps = cp.dependencies.length > 0 ? cp.dependencies.map(d => `\`${d}\``).join(', ') : '\u2014';
|
|
490
|
+
lines.push(`| \`${escapeMarkdown(cp.name)}\` | \`${escapeMarkdown(formatType(cp.type))}\` | \`${escapeMarkdown(formatExpression(cp.expression))}\` | ${deps} |`);
|
|
491
|
+
}
|
|
492
|
+
lines.push('');
|
|
493
|
+
}
|
|
494
|
+
// Relationships
|
|
495
|
+
if (entity.relationships.length > 0) {
|
|
496
|
+
lines.push('## Relationships');
|
|
497
|
+
lines.push('');
|
|
498
|
+
lines.push('| Name | Kind | Target | FK / Through | On Delete |');
|
|
499
|
+
lines.push('|------|------|--------|-------------|-----------|');
|
|
500
|
+
for (const r of entity.relationships) {
|
|
501
|
+
let fkInfo = '\u2014';
|
|
502
|
+
if (r.foreignKey) {
|
|
503
|
+
fkInfo = `fields: [${r.foreignKey.fields.join(', ')}]`;
|
|
504
|
+
if (r.foreignKey.references)
|
|
505
|
+
fkInfo += ` -> [${r.foreignKey.references.join(', ')}]`;
|
|
506
|
+
}
|
|
507
|
+
else if (r.through) {
|
|
508
|
+
fkInfo = `through: ${r.through}`;
|
|
509
|
+
}
|
|
510
|
+
lines.push(`| \`${escapeMarkdown(r.name)}\` | ${escapeMarkdown(r.kind)} | \`${escapeMarkdown(r.target)}\` | ${escapeMarkdown(fkInfo)} | ${r.onDelete || '\u2014'} |`);
|
|
511
|
+
}
|
|
512
|
+
lines.push('');
|
|
513
|
+
}
|
|
514
|
+
// Constraints
|
|
515
|
+
if (entity.constraints.length > 0) {
|
|
516
|
+
lines.push('## Constraints');
|
|
517
|
+
lines.push('');
|
|
518
|
+
lines.push('| Name | Code | Severity | Expression | Message |');
|
|
519
|
+
lines.push('|------|------|----------|------------|---------|');
|
|
520
|
+
for (const c of entity.constraints) {
|
|
521
|
+
lines.push(`| \`${escapeMarkdown(c.name)}\` | \`${escapeMarkdown(c.code)}\` | ${c.severity || 'block'} | \`${escapeMarkdown(formatExpression(c.expression))}\` | ${c.message ? escapeMarkdown(c.message) : '\u2014'} |`);
|
|
522
|
+
}
|
|
523
|
+
lines.push('');
|
|
524
|
+
}
|
|
525
|
+
// Commands
|
|
526
|
+
if (entityCommands.length > 0) {
|
|
527
|
+
lines.push('## Commands');
|
|
528
|
+
lines.push('');
|
|
529
|
+
for (const cmd of entityCommands) {
|
|
530
|
+
lines.push(`### \`${cmd.name}\``);
|
|
531
|
+
lines.push('');
|
|
532
|
+
if (cmd.policies && cmd.policies.length > 0) {
|
|
533
|
+
lines.push(`**Policies:** ${cmd.policies.map(p => `\`${p}\``).join(', ')}`);
|
|
534
|
+
}
|
|
535
|
+
if (cmd.emits.length > 0) {
|
|
536
|
+
lines.push(`**Emits:** ${cmd.emits.map(e => `\`${e}\``).join(', ')}`);
|
|
537
|
+
}
|
|
538
|
+
if (cmd.returns) {
|
|
539
|
+
lines.push(`**Returns:** \`${formatType(cmd.returns)}\``);
|
|
540
|
+
}
|
|
541
|
+
lines.push('');
|
|
542
|
+
if (cmd.parameters.length > 0) {
|
|
543
|
+
lines.push('#### Parameters');
|
|
544
|
+
lines.push('');
|
|
545
|
+
lines.push('| Name | Type | Required | Default |');
|
|
546
|
+
lines.push('|------|------|----------|---------|');
|
|
547
|
+
for (const p of cmd.parameters) {
|
|
548
|
+
const def = p.defaultValue ? `\`${escapeMarkdown(formatValue(p.defaultValue))}\`` : '\u2014';
|
|
549
|
+
lines.push(`| \`${escapeMarkdown(p.name)}\` | \`${escapeMarkdown(formatType(p.type))}\` | ${p.required ? 'Yes' : 'No'} | ${def} |`);
|
|
550
|
+
}
|
|
551
|
+
lines.push('');
|
|
552
|
+
}
|
|
553
|
+
if (cmd.guards.length > 0) {
|
|
554
|
+
lines.push('#### Guards');
|
|
555
|
+
lines.push('');
|
|
556
|
+
for (let i = 0; i < cmd.guards.length; i++) {
|
|
557
|
+
lines.push(`${i + 1}. \`${escapeMarkdown(formatExpression(cmd.guards[i]))}\``);
|
|
558
|
+
}
|
|
559
|
+
lines.push('');
|
|
560
|
+
}
|
|
561
|
+
if (cmd.actions.length > 0) {
|
|
562
|
+
lines.push('#### Actions');
|
|
563
|
+
lines.push('');
|
|
564
|
+
for (const a of cmd.actions) {
|
|
565
|
+
lines.push(`- **${a.kind}**${a.target ? ` \`${a.target}\`` : ''} \u2190 \`${escapeMarkdown(formatExpression(a.expression))}\``);
|
|
566
|
+
}
|
|
567
|
+
lines.push('');
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
// Policies
|
|
572
|
+
if (entityPolicies.length > 0) {
|
|
573
|
+
lines.push('## Policies');
|
|
574
|
+
lines.push('');
|
|
575
|
+
lines.push('| Name | Action | Expression | Message |');
|
|
576
|
+
lines.push('|------|--------|------------|---------|');
|
|
577
|
+
for (const p of entityPolicies) {
|
|
578
|
+
lines.push(`| \`${escapeMarkdown(p.name)}\` | ${escapeMarkdown(p.action)} | \`${escapeMarkdown(formatExpression(p.expression))}\` | ${p.message ? escapeMarkdown(p.message) : '\u2014'} |`);
|
|
579
|
+
}
|
|
580
|
+
lines.push('');
|
|
581
|
+
}
|
|
582
|
+
// Events
|
|
583
|
+
if (entityEvents.length > 0) {
|
|
584
|
+
lines.push('## Events');
|
|
585
|
+
lines.push('');
|
|
586
|
+
lines.push('| Name | Channel | Payload |');
|
|
587
|
+
lines.push('|------|---------|---------|');
|
|
588
|
+
for (const e of entityEvents) {
|
|
589
|
+
let payloadStr;
|
|
590
|
+
if (Array.isArray(e.payload)) {
|
|
591
|
+
payloadStr = e.payload.map(f => `${f.name}: ${formatType(f.type)}${f.required ? '' : '?'}`).join(', ');
|
|
592
|
+
}
|
|
593
|
+
else {
|
|
594
|
+
payloadStr = formatType(e.payload);
|
|
595
|
+
}
|
|
596
|
+
lines.push(`| \`${escapeMarkdown(e.name)}\` | \`${escapeMarkdown(e.channel)}\` | \`${escapeMarkdown(payloadStr)}\` |`);
|
|
597
|
+
}
|
|
598
|
+
lines.push('');
|
|
599
|
+
}
|
|
600
|
+
// Transitions
|
|
601
|
+
if (entity.transitions && entity.transitions.length > 0) {
|
|
602
|
+
lines.push('## State Transitions');
|
|
603
|
+
lines.push('');
|
|
604
|
+
lines.push('| Property | From | To |');
|
|
605
|
+
lines.push('|----------|------|----|');
|
|
606
|
+
for (const t of entity.transitions) {
|
|
607
|
+
lines.push(`| \`${escapeMarkdown(t.property)}\` | \`${escapeMarkdown(t.from)}\` | ${t.to.map(v => `\`${escapeMarkdown(v)}\``).join(', ')} |`);
|
|
608
|
+
}
|
|
609
|
+
lines.push('');
|
|
610
|
+
}
|
|
611
|
+
return lines.join('\n');
|
|
612
|
+
}
|
|
613
|
+
function generateIndexPageMarkdown(ir, siteTitle) {
|
|
614
|
+
const lines = [];
|
|
615
|
+
lines.push(`# ${siteTitle}`);
|
|
616
|
+
lines.push('');
|
|
617
|
+
lines.push(`Compiled with Manifest v${ir.provenance.compilerVersion} | Schema v${ir.provenance.schemaVersion}`);
|
|
618
|
+
lines.push('');
|
|
619
|
+
lines.push('## Entities');
|
|
620
|
+
lines.push('');
|
|
621
|
+
for (const e of ir.entities) {
|
|
622
|
+
lines.push(`- [${e.name}](./${e.name}.md)${e.module ? ` *(${e.module})*` : ''} \u2014 ${e.properties.length} properties, ${e.commands.length} commands`);
|
|
623
|
+
}
|
|
624
|
+
lines.push('');
|
|
625
|
+
if (ir.modules.length > 0) {
|
|
626
|
+
lines.push('## Modules');
|
|
627
|
+
lines.push('');
|
|
628
|
+
for (const m of ir.modules) {
|
|
629
|
+
lines.push(`- **${m.name}** \u2014 ${m.entities.length} entities`);
|
|
630
|
+
}
|
|
631
|
+
lines.push('');
|
|
632
|
+
}
|
|
633
|
+
lines.push('## Summary');
|
|
634
|
+
lines.push('');
|
|
635
|
+
lines.push('| Concept | Count |');
|
|
636
|
+
lines.push('|---------|-------|');
|
|
637
|
+
lines.push(`| Entities | ${ir.entities.length} |`);
|
|
638
|
+
lines.push(`| Commands | ${ir.commands.length} |`);
|
|
639
|
+
lines.push(`| Policies | ${ir.policies.length} |`);
|
|
640
|
+
lines.push(`| Events | ${ir.events.length} |`);
|
|
641
|
+
lines.push(`| Stores | ${ir.stores.length} |`);
|
|
642
|
+
lines.push('');
|
|
643
|
+
return lines.join('\n');
|
|
644
|
+
}
|
|
645
|
+
// ─── Command handler ────────────────────────────────────────────────────
|
|
646
|
+
/**
|
|
647
|
+
* Generate documentation from IR or .manifest source files.
|
|
648
|
+
*/
|
|
649
|
+
export async function docsCommand(source, options = {}) {
|
|
650
|
+
const spinner = ora('Preparing to generate documentation').start();
|
|
651
|
+
const format = options.format || 'html';
|
|
652
|
+
const siteTitle = options.title || 'Manifest API Reference';
|
|
653
|
+
const outputDir = path.resolve(process.cwd(), options.output || 'docs/api');
|
|
654
|
+
try {
|
|
655
|
+
if (!source) {
|
|
656
|
+
spinner.fail('Source argument is required (path to .manifest file, .ir.json file, or directory)');
|
|
657
|
+
process.exitCode = 1;
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
// Collect all IRs
|
|
661
|
+
const files = await getInputFiles(source);
|
|
662
|
+
if (files.length === 0) {
|
|
663
|
+
spinner.warn('No .manifest or .ir.json files found');
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
spinner.text = `Loading ${files.length} file(s)...`;
|
|
667
|
+
// Merge all IRs into one
|
|
668
|
+
const mergedIR = {
|
|
669
|
+
version: '1.0',
|
|
670
|
+
provenance: {
|
|
671
|
+
contentHash: '',
|
|
672
|
+
compilerVersion: '',
|
|
673
|
+
schemaVersion: '',
|
|
674
|
+
compiledAt: new Date().toISOString(),
|
|
675
|
+
},
|
|
676
|
+
modules: [],
|
|
677
|
+
entities: [],
|
|
678
|
+
stores: [],
|
|
679
|
+
events: [],
|
|
680
|
+
commands: [],
|
|
681
|
+
policies: [],
|
|
682
|
+
};
|
|
683
|
+
for (const file of files) {
|
|
684
|
+
const ir = await loadIR(file);
|
|
685
|
+
// Use first provenance as representative
|
|
686
|
+
if (!mergedIR.provenance.compilerVersion) {
|
|
687
|
+
mergedIR.provenance = ir.provenance;
|
|
688
|
+
}
|
|
689
|
+
mergedIR.modules.push(...ir.modules);
|
|
690
|
+
mergedIR.entities.push(...ir.entities);
|
|
691
|
+
mergedIR.stores.push(...ir.stores);
|
|
692
|
+
mergedIR.events.push(...ir.events);
|
|
693
|
+
mergedIR.commands.push(...ir.commands);
|
|
694
|
+
mergedIR.policies.push(...ir.policies);
|
|
695
|
+
}
|
|
696
|
+
// Create output directory
|
|
697
|
+
await fs.mkdir(outputDir, { recursive: true });
|
|
698
|
+
const ext = format === 'markdown' ? 'md' : 'html';
|
|
699
|
+
// Generate index page
|
|
700
|
+
spinner.text = 'Generating index page...';
|
|
701
|
+
const indexContent = format === 'markdown'
|
|
702
|
+
? generateIndexPageMarkdown(mergedIR, siteTitle)
|
|
703
|
+
: generateIndexPageHtml(mergedIR, siteTitle);
|
|
704
|
+
await fs.writeFile(path.join(outputDir, `index.${ext}`), indexContent, 'utf-8');
|
|
705
|
+
// Generate entity pages
|
|
706
|
+
let entityCount = 0;
|
|
707
|
+
for (const entity of mergedIR.entities) {
|
|
708
|
+
spinner.text = `Generating ${entity.name} reference...`;
|
|
709
|
+
const content = format === 'markdown'
|
|
710
|
+
? generateEntityPageMarkdown(entity, mergedIR.commands, mergedIR.policies, mergedIR.events, mergedIR.stores)
|
|
711
|
+
: generateEntityPageHtml(entity, mergedIR.commands, mergedIR.policies, mergedIR.events, mergedIR.stores, siteTitle);
|
|
712
|
+
await fs.writeFile(path.join(outputDir, `${entity.name}.${ext}`), content, 'utf-8');
|
|
713
|
+
entityCount++;
|
|
714
|
+
}
|
|
715
|
+
spinner.succeed(`Generated documentation: ${entityCount} entity page(s) + index → ${chalk.cyan(path.relative(process.cwd(), outputDir))}`);
|
|
716
|
+
}
|
|
717
|
+
catch (error) {
|
|
718
|
+
spinner.fail(`Documentation generation failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
719
|
+
process.exitCode = 1;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
//# sourceMappingURL=docs.js.map
|