@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,628 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import ora from 'ora';
|
|
3
|
+
import { diffEntitySurface, formatRelative, inspectCompiledIR, inspectRouteSurfaceForCommand, inspectSourceEntities, mergeIREntityDefinitions, mergeSourceEntityDefinitions, readMergeReports, } from './doctor-lib.js';
|
|
4
|
+
function createSpinner(message, enabled) {
|
|
5
|
+
if (!enabled) {
|
|
6
|
+
return {
|
|
7
|
+
text: message,
|
|
8
|
+
stop() { },
|
|
9
|
+
fail(_msg) { },
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return ora(message).start();
|
|
13
|
+
}
|
|
14
|
+
function arrayify(value) {
|
|
15
|
+
if (!value)
|
|
16
|
+
return undefined;
|
|
17
|
+
return Array.isArray(value) ? value : [value];
|
|
18
|
+
}
|
|
19
|
+
function printJson(data) {
|
|
20
|
+
console.log(JSON.stringify(data, null, 2));
|
|
21
|
+
}
|
|
22
|
+
function tableLine(label, value) {
|
|
23
|
+
return `${label.padEnd(26)} ${value}`;
|
|
24
|
+
}
|
|
25
|
+
function summarizeDiff(diff) {
|
|
26
|
+
const errors = [];
|
|
27
|
+
const warnings = [];
|
|
28
|
+
if (diff.entityMissingInSource)
|
|
29
|
+
errors.push(`Entity '${diff.entityName}' not found in source manifests.`);
|
|
30
|
+
if (diff.entityMissingInIR)
|
|
31
|
+
errors.push(`Entity '${diff.entityName}' not found in compiled IR.`);
|
|
32
|
+
if (diff.commands.missingInIR.length > 0)
|
|
33
|
+
errors.push(`Commands missing in IR: ${diff.commands.missingInIR.join(', ')}`);
|
|
34
|
+
if (diff.commands.extraInIR.length > 0)
|
|
35
|
+
warnings.push(`Extra commands in IR: ${diff.commands.extraInIR.join(', ')}`);
|
|
36
|
+
if (diff.properties.missingInIR.length > 0)
|
|
37
|
+
errors.push(`Properties missing in IR: ${diff.properties.missingInIR.join(', ')}`);
|
|
38
|
+
if (diff.properties.extraInIR.length > 0)
|
|
39
|
+
warnings.push(`Extra properties in IR: ${diff.properties.extraInIR.join(', ')}`);
|
|
40
|
+
if (diff.emits.missingInIR.length > 0)
|
|
41
|
+
warnings.push(`Emitted events missing in IR: ${diff.emits.missingInIR.join(', ')}`);
|
|
42
|
+
if (diff.emits.extraInIR.length > 0)
|
|
43
|
+
warnings.push(`Extra emitted events in IR: ${diff.emits.extraInIR.join(', ')}`);
|
|
44
|
+
return { errors, warnings };
|
|
45
|
+
}
|
|
46
|
+
function filterDuplicates(entries, entityName) {
|
|
47
|
+
if (!entityName)
|
|
48
|
+
return entries;
|
|
49
|
+
const needle = entityName.toLowerCase();
|
|
50
|
+
return entries.filter((e) => {
|
|
51
|
+
const key = e.key.toLowerCase();
|
|
52
|
+
const kept = (e.keptFrom || '').toLowerCase();
|
|
53
|
+
const dropped = (e.droppedFrom || '').toLowerCase();
|
|
54
|
+
return key.includes(needle) || kept.includes(needle) || dropped.includes(needle);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async function buildEntityContext(entityName, options) {
|
|
58
|
+
const cwd = process.cwd();
|
|
59
|
+
const [sourceInspection, irInspection] = await Promise.all([
|
|
60
|
+
inspectSourceEntities({ cwd, srcPattern: options.src }),
|
|
61
|
+
inspectCompiledIR({ cwd, irRoots: arrayify(options.irRoot) }),
|
|
62
|
+
]);
|
|
63
|
+
const sourceDefs = sourceInspection.entities.get(entityName);
|
|
64
|
+
const irDefs = irInspection.entities.get(entityName);
|
|
65
|
+
const source = mergeSourceEntityDefinitions(sourceDefs);
|
|
66
|
+
const ir = mergeIREntityDefinitions(irDefs);
|
|
67
|
+
const diff = diffEntitySurface({ entityName, source, ir });
|
|
68
|
+
return { cwd, sourceInspection, irInspection, sourceDefs, irDefs, source, ir, diff };
|
|
69
|
+
}
|
|
70
|
+
export async function inspectEntityCommand(entityName, options = {}) {
|
|
71
|
+
const spinner = createSpinner(`Inspecting entity ${entityName}`, !options.json);
|
|
72
|
+
try {
|
|
73
|
+
const ctx = await buildEntityContext(entityName, options);
|
|
74
|
+
spinner.stop();
|
|
75
|
+
const payload = {
|
|
76
|
+
success: true,
|
|
77
|
+
entity: entityName,
|
|
78
|
+
source: {
|
|
79
|
+
exists: ctx.source.exists,
|
|
80
|
+
files: ctx.source.files.map((f) => ({
|
|
81
|
+
file: formatRelative(ctx.cwd, f.file),
|
|
82
|
+
line: f.line,
|
|
83
|
+
})),
|
|
84
|
+
commands: ctx.source.commands,
|
|
85
|
+
properties: ctx.source.properties,
|
|
86
|
+
emits: ctx.source.emits,
|
|
87
|
+
policies: ctx.source.policies,
|
|
88
|
+
parserFindings: ctx.source.parserFindings,
|
|
89
|
+
parserErrors: ctx.source.parserErrors,
|
|
90
|
+
},
|
|
91
|
+
compiledIR: {
|
|
92
|
+
exists: ctx.ir.exists,
|
|
93
|
+
files: ctx.ir.files.map((f) => ({
|
|
94
|
+
file: formatRelative(ctx.cwd, f.file),
|
|
95
|
+
provenance: f.provenance || null,
|
|
96
|
+
})),
|
|
97
|
+
commands: ctx.ir.commands,
|
|
98
|
+
properties: ctx.ir.properties,
|
|
99
|
+
emits: ctx.ir.emits,
|
|
100
|
+
policies: ctx.ir.policies,
|
|
101
|
+
events: ctx.ir.events,
|
|
102
|
+
},
|
|
103
|
+
drift: ctx.diff,
|
|
104
|
+
};
|
|
105
|
+
if (options.json) {
|
|
106
|
+
printJson(payload);
|
|
107
|
+
if (ctx.diff.hasDrift)
|
|
108
|
+
process.exit(1);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
console.log(chalk.bold(`\nEntity Inspection: ${entityName}`));
|
|
112
|
+
console.log('');
|
|
113
|
+
console.log(chalk.cyan('Source manifests'));
|
|
114
|
+
console.log(tableLine('Entity found', ctx.source.exists ? 'yes' : 'no'));
|
|
115
|
+
console.log(tableLine('Definitions', String(ctx.source.files.length)));
|
|
116
|
+
if (ctx.source.files.length > 0) {
|
|
117
|
+
for (const f of ctx.source.files) {
|
|
118
|
+
console.log(` - ${formatRelative(ctx.cwd, f.file)}${f.line ? `:${f.line}` : ''}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
console.log(tableLine('Commands', ctx.source.commands.length ? ctx.source.commands.join(', ') : '(none)'));
|
|
122
|
+
console.log(tableLine('Properties', ctx.source.properties.length ? ctx.source.properties.join(', ') : '(none)'));
|
|
123
|
+
console.log(tableLine('Emits/events', ctx.source.emits.length ? ctx.source.emits.join(', ') : '(none)'));
|
|
124
|
+
console.log(tableLine('Policies', ctx.source.policies.length ? ctx.source.policies.join(', ') : '(none)'));
|
|
125
|
+
if (ctx.source.parserFindings.length > 0 || ctx.source.parserErrors.length > 0) {
|
|
126
|
+
console.log('');
|
|
127
|
+
console.log(chalk.yellow('Source parser/scanner diagnostics'));
|
|
128
|
+
for (const finding of ctx.source.parserFindings) {
|
|
129
|
+
console.log(` [${finding.severity.toUpperCase()}] ${finding.code}: ${finding.message}`);
|
|
130
|
+
if (finding.suggestion)
|
|
131
|
+
console.log(chalk.gray(` -> ${finding.suggestion}`));
|
|
132
|
+
}
|
|
133
|
+
for (const err of ctx.source.parserErrors.slice(0, 10)) {
|
|
134
|
+
const at = err.line ? `:${err.line}${err.column ? `:${err.column}` : ''}` : '';
|
|
135
|
+
console.log(` [${(err.severity || 'error').toUpperCase()}] ${err.message}${at}`);
|
|
136
|
+
}
|
|
137
|
+
if (ctx.source.parserErrors.length > 10) {
|
|
138
|
+
console.log(chalk.gray(` ... ${ctx.source.parserErrors.length - 10} more parser diagnostics`));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
console.log('');
|
|
142
|
+
console.log(chalk.cyan('Compiled IR'));
|
|
143
|
+
console.log(tableLine('Entity found', ctx.ir.exists ? 'yes' : 'no'));
|
|
144
|
+
console.log(tableLine('IR files', String(ctx.ir.files.length)));
|
|
145
|
+
for (const f of ctx.ir.files) {
|
|
146
|
+
const p = f.provenance || {};
|
|
147
|
+
const compiledAt = typeof p.compiledAt === 'string' ? p.compiledAt : 'n/a';
|
|
148
|
+
const compilerVersion = typeof p.compilerVersion === 'string' ? p.compilerVersion : 'n/a';
|
|
149
|
+
console.log(` - ${formatRelative(ctx.cwd, f.file)} (compiledAt=${compiledAt}, compilerVersion=${compilerVersion})`);
|
|
150
|
+
}
|
|
151
|
+
console.log(tableLine('Commands', ctx.ir.commands.length ? ctx.ir.commands.join(', ') : '(none)'));
|
|
152
|
+
console.log(tableLine('Properties', ctx.ir.properties.length ? ctx.ir.properties.join(', ') : '(none)'));
|
|
153
|
+
console.log(tableLine('Emits', ctx.ir.emits.length ? ctx.ir.emits.join(', ') : '(none)'));
|
|
154
|
+
console.log(tableLine('IR events', ctx.ir.events.length ? ctx.ir.events.join(', ') : '(none)'));
|
|
155
|
+
console.log(tableLine('Policies', ctx.ir.policies.length ? ctx.ir.policies.join(', ') : '(none)'));
|
|
156
|
+
const summary = summarizeDiff(ctx.diff);
|
|
157
|
+
console.log('');
|
|
158
|
+
console.log(chalk.bold('Drift Summary'));
|
|
159
|
+
if (!ctx.diff.hasDrift) {
|
|
160
|
+
console.log(chalk.green(' No source-vs-IR drift detected for this entity.'));
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
for (const err of summary.errors)
|
|
164
|
+
console.log(chalk.red(` ERROR: ${err}`));
|
|
165
|
+
for (const warn of summary.warnings)
|
|
166
|
+
console.log(chalk.yellow(` WARN: ${warn}`));
|
|
167
|
+
if (ctx.source.commands.length > 0 && ctx.ir.commands.length === 0) {
|
|
168
|
+
console.log(chalk.red(` Diagnosis: source defines commands for ${entityName}, but compiled IR has 0 commands. Precompiled IR is likely stale or generated from different sources.`));
|
|
169
|
+
}
|
|
170
|
+
process.exit(1);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
spinner.fail(`inspect entity failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
175
|
+
process.exit(1);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
export async function diffSourceVsIRCommand(entityName, options = {}) {
|
|
179
|
+
const spinner = createSpinner(`Diffing source vs IR for ${entityName}`, !options.json);
|
|
180
|
+
try {
|
|
181
|
+
const ctx = await buildEntityContext(entityName, options);
|
|
182
|
+
spinner.stop();
|
|
183
|
+
const summary = summarizeDiff(ctx.diff);
|
|
184
|
+
const payload = {
|
|
185
|
+
success: !ctx.diff.hasDrift,
|
|
186
|
+
entity: entityName,
|
|
187
|
+
diff: ctx.diff,
|
|
188
|
+
diagnostics: summary,
|
|
189
|
+
};
|
|
190
|
+
if (options.json) {
|
|
191
|
+
printJson(payload);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
console.log(chalk.bold(`\nSource vs IR Diff: ${entityName}`));
|
|
195
|
+
if (!ctx.diff.hasDrift) {
|
|
196
|
+
console.log(chalk.green(' No drift detected.'));
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
for (const err of summary.errors)
|
|
200
|
+
console.log(chalk.red(` ERROR: ${err}`));
|
|
201
|
+
for (const warn of summary.warnings)
|
|
202
|
+
console.log(chalk.yellow(` WARN: ${warn}`));
|
|
203
|
+
}
|
|
204
|
+
console.log('');
|
|
205
|
+
console.log(tableLine('Source commands', ctx.source.commands.join(', ') || '(none)'));
|
|
206
|
+
console.log(tableLine('IR commands', ctx.ir.commands.join(', ') || '(none)'));
|
|
207
|
+
console.log(tableLine('Source props', ctx.source.properties.join(', ') || '(none)'));
|
|
208
|
+
console.log(tableLine('IR props', ctx.ir.properties.join(', ') || '(none)'));
|
|
209
|
+
console.log(tableLine('Source emits', ctx.source.emits.join(', ') || '(none)'));
|
|
210
|
+
console.log(tableLine('IR emits', ctx.ir.emits.join(', ') || '(none)'));
|
|
211
|
+
}
|
|
212
|
+
if (ctx.diff.hasDrift)
|
|
213
|
+
process.exit(1);
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
spinner.fail(`diff source-vs-ir failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
217
|
+
process.exit(1);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
export async function duplicatesCommand(options = {}) {
|
|
221
|
+
const spinner = createSpinner('Reading merge reports', !options.json);
|
|
222
|
+
try {
|
|
223
|
+
const reports = await readMergeReports({
|
|
224
|
+
cwd: process.cwd(),
|
|
225
|
+
pattern: options.mergeReport || '**/*.merge-report.json',
|
|
226
|
+
});
|
|
227
|
+
spinner.stop();
|
|
228
|
+
const entries = filterDuplicates(reports.flatMap((r) => r.entries), options.entity);
|
|
229
|
+
const suspicious = entries.filter((e) => e.classification === 'suspicious');
|
|
230
|
+
const payload = {
|
|
231
|
+
success: suspicious.length === 0,
|
|
232
|
+
reports: reports.map((r) => ({
|
|
233
|
+
file: formatRelative(process.cwd(), r.file),
|
|
234
|
+
parseError: r.parseError || null,
|
|
235
|
+
entries: filterDuplicates(r.entries, options.entity),
|
|
236
|
+
})),
|
|
237
|
+
summary: {
|
|
238
|
+
reportsFound: reports.length,
|
|
239
|
+
totalEntries: entries.length,
|
|
240
|
+
knownDuplicates: entries.filter((e) => e.classification === 'known').length,
|
|
241
|
+
suspiciousDuplicates: suspicious.length,
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
if (options.json) {
|
|
245
|
+
printJson(payload);
|
|
246
|
+
if (suspicious.length > 0)
|
|
247
|
+
process.exit(1);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
console.log(chalk.bold('\nDuplicate / Merge Report'));
|
|
251
|
+
if (reports.length === 0) {
|
|
252
|
+
console.log(chalk.yellow(' No *.merge-report.json files found.'));
|
|
253
|
+
console.log(chalk.gray(' This is not an error. Duplicate merge visibility is unavailable until a merge report is generated.'));
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
console.log('');
|
|
257
|
+
for (const report of reports) {
|
|
258
|
+
console.log(chalk.cyan(` ${formatRelative(process.cwd(), report.file)}`));
|
|
259
|
+
if (report.parseError) {
|
|
260
|
+
console.log(chalk.red(` parse error: ${report.parseError}`));
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
const filtered = filterDuplicates(report.entries, options.entity);
|
|
264
|
+
if (filtered.length === 0) {
|
|
265
|
+
console.log(chalk.gray(' no matching duplicates'));
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
for (const entry of filtered) {
|
|
269
|
+
const color = entry.classification === 'known' ? chalk.yellow : chalk.red;
|
|
270
|
+
console.log(color(` [${entry.classification.toUpperCase()}] ${entry.type} ${entry.key}`));
|
|
271
|
+
console.log(` keptFrom: ${entry.keptFrom || 'n/a'}`);
|
|
272
|
+
console.log(` droppedFrom: ${entry.droppedFrom || 'n/a'}`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
console.log('');
|
|
276
|
+
console.log(chalk.bold('Summary'));
|
|
277
|
+
console.log(tableLine('Reports found', String(payload.summary.reportsFound)));
|
|
278
|
+
console.log(tableLine('Entries', String(payload.summary.totalEntries)));
|
|
279
|
+
console.log(tableLine('Known duplicates', String(payload.summary.knownDuplicates)));
|
|
280
|
+
console.log(tableLine('Suspicious duplicates', String(payload.summary.suspiciousDuplicates)));
|
|
281
|
+
if (suspicious.length > 0)
|
|
282
|
+
process.exit(1);
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
spinner.fail(`duplicates failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
286
|
+
process.exit(1);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
export async function runtimeCheckCommand(entityName, commandName, options = {}) {
|
|
290
|
+
const spinner = createSpinner(`Runtime readiness check ${entityName}.${commandName}`, !options.json);
|
|
291
|
+
try {
|
|
292
|
+
const [ctx, routeCheck] = await Promise.all([
|
|
293
|
+
buildEntityContext(entityName, options),
|
|
294
|
+
inspectRouteSurfaceForCommand({ entityName, commandName, routePath: options.route, cwd: process.cwd() }),
|
|
295
|
+
]);
|
|
296
|
+
spinner.stop();
|
|
297
|
+
const sourceHasCommand = ctx.source.commands.includes(commandName);
|
|
298
|
+
const irHasCommand = ctx.ir.commands.includes(commandName);
|
|
299
|
+
const routeExists = routeCheck.routeExists;
|
|
300
|
+
const issues = [];
|
|
301
|
+
if (!sourceHasCommand) {
|
|
302
|
+
issues.push({
|
|
303
|
+
severity: 'error',
|
|
304
|
+
code: 'SOURCE_COMMAND_MISSING',
|
|
305
|
+
message: `Source manifests do not expose ${entityName}.${commandName}.`,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
if (!irHasCommand) {
|
|
309
|
+
issues.push({
|
|
310
|
+
severity: 'error',
|
|
311
|
+
code: 'IR_COMMAND_MISSING',
|
|
312
|
+
message: `Precompiled IR does not contain ${entityName}.${commandName}.`,
|
|
313
|
+
fix: 'Rebuild manifests (e.g. `pnpm manifest:build`) and verify the generated IR file was updated.',
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
if (!routeExists) {
|
|
317
|
+
issues.push({
|
|
318
|
+
severity: 'warning',
|
|
319
|
+
code: 'ROUTE_SURFACE_COMMAND_NOT_FOUND',
|
|
320
|
+
message: options.route
|
|
321
|
+
? `No canonical route manifest entry found for route ${options.route} -> ${entityName}.${commandName}.`
|
|
322
|
+
: `No canonical route manifest entry found for ${entityName}.${commandName} (routes.manifest.json not found or route missing).`,
|
|
323
|
+
fix: 'Generate or refresh canonical routes (`manifest routes --format json`) and verify route manifest output.',
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
if (routeExists && sourceHasCommand && !irHasCommand) {
|
|
327
|
+
issues.unshift({
|
|
328
|
+
severity: 'error',
|
|
329
|
+
code: 'ROUTE_EXISTS_BUT_PRECOMPILED_IR_MISSING_COMMAND',
|
|
330
|
+
message: `Route exists but precompiled IR lacks ${entityName}.${commandName}. Route was generated from prior IR/source while current precompiled IR is stale.`,
|
|
331
|
+
fix: 'Rebuild manifests and restart API process. Rebuilding IR alone may not fix a running server with cached IR.',
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
const payload = {
|
|
335
|
+
success: issues.every((i) => i.severity !== 'error'),
|
|
336
|
+
target: { entity: entityName, command: commandName, route: options.route || null },
|
|
337
|
+
checks: {
|
|
338
|
+
source: {
|
|
339
|
+
entityExists: ctx.source.exists,
|
|
340
|
+
commandExists: sourceHasCommand,
|
|
341
|
+
files: ctx.source.files.map((f) => ({ file: formatRelative(ctx.cwd, f.file), line: f.line })),
|
|
342
|
+
parserFindings: ctx.source.parserFindings,
|
|
343
|
+
},
|
|
344
|
+
precompiledIR: {
|
|
345
|
+
entityExists: ctx.ir.exists,
|
|
346
|
+
commandExists: irHasCommand,
|
|
347
|
+
files: ctx.ir.files.map((f) => ({ file: formatRelative(ctx.cwd, f.file), provenance: f.provenance || null })),
|
|
348
|
+
},
|
|
349
|
+
routeSurface: {
|
|
350
|
+
routeExists,
|
|
351
|
+
matches: routeCheck.matches.map((m) => ({
|
|
352
|
+
...m,
|
|
353
|
+
manifestFile: formatRelative(ctx.cwd, m.manifestFile),
|
|
354
|
+
})),
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
issues,
|
|
358
|
+
cacheGuidance: (sourceHasCommand && irHasCommand)
|
|
359
|
+
? `Compiled IR includes ${entityName}.${commandName}. If runtime still returns "Command '${commandName}' not found", restart the API dev server to clear in-process IR cache.`
|
|
360
|
+
: `Fix source/IR drift first, then restart the API dev server to clear in-process IR cache.`,
|
|
361
|
+
};
|
|
362
|
+
if (options.json) {
|
|
363
|
+
printJson(payload);
|
|
364
|
+
if (!payload.success)
|
|
365
|
+
process.exit(1);
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
console.log(chalk.bold(`\nRuntime Check: ${entityName}.${commandName}`));
|
|
369
|
+
console.log('');
|
|
370
|
+
console.log(chalk.cyan('Readiness Correlation'));
|
|
371
|
+
console.log(tableLine('Source entity', ctx.source.exists ? 'yes' : 'no'));
|
|
372
|
+
console.log(tableLine('Source command', sourceHasCommand ? 'yes' : 'no'));
|
|
373
|
+
console.log(tableLine('Precompiled IR entity', ctx.ir.exists ? 'yes' : 'no'));
|
|
374
|
+
console.log(tableLine('Precompiled IR command', irHasCommand ? 'yes' : 'no'));
|
|
375
|
+
console.log(tableLine('Canonical route entry', routeExists ? 'yes' : 'no'));
|
|
376
|
+
if (routeCheck.matches.length > 0) {
|
|
377
|
+
for (const m of routeCheck.matches) {
|
|
378
|
+
console.log(` - ${m.method} ${m.routePath} (${formatRelative(ctx.cwd, m.manifestFile)})`);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
if (issues.length > 0) {
|
|
382
|
+
console.log('');
|
|
383
|
+
console.log(chalk.bold('Diagnosis'));
|
|
384
|
+
for (const issue of issues) {
|
|
385
|
+
const color = issue.severity === 'error' ? chalk.red : chalk.yellow;
|
|
386
|
+
console.log(color(` [${issue.severity.toUpperCase()}] ${issue.code}: ${issue.message}`));
|
|
387
|
+
if (issue.fix)
|
|
388
|
+
console.log(chalk.gray(` -> ${issue.fix}`));
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
console.log(chalk.green('\n Source, precompiled IR, and route surface are aligned for this command.'));
|
|
393
|
+
}
|
|
394
|
+
console.log('');
|
|
395
|
+
console.log(chalk.bold('Runtime Cache Guidance'));
|
|
396
|
+
console.log(` ${payload.cacheGuidance}`);
|
|
397
|
+
if (!payload.success)
|
|
398
|
+
process.exit(1);
|
|
399
|
+
}
|
|
400
|
+
catch (error) {
|
|
401
|
+
spinner.fail(`runtime-check failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
402
|
+
process.exit(1);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
export async function cacheStatusCommand(options = {}) {
|
|
406
|
+
const spinner = createSpinner('Inspecting compiled IR timestamps', !options.json);
|
|
407
|
+
try {
|
|
408
|
+
const irInspection = await inspectCompiledIR({ cwd: process.cwd(), irRoots: arrayify(options.irRoot) });
|
|
409
|
+
spinner.stop();
|
|
410
|
+
const compiledEntries = Array.from(irInspection.entities.values())
|
|
411
|
+
.flat()
|
|
412
|
+
.flatMap((def) => {
|
|
413
|
+
const p = def.provenance || {};
|
|
414
|
+
return [{
|
|
415
|
+
file: def.irFile,
|
|
416
|
+
entity: def.entityName,
|
|
417
|
+
compiledAt: typeof p.compiledAt === 'string' ? p.compiledAt : null,
|
|
418
|
+
compilerVersion: typeof p.compilerVersion === 'string' ? p.compilerVersion : null,
|
|
419
|
+
}];
|
|
420
|
+
})
|
|
421
|
+
.sort((a, b) => String(b.compiledAt || '').localeCompare(String(a.compiledAt || '')));
|
|
422
|
+
const latest = compiledEntries[0] || null;
|
|
423
|
+
const payload = {
|
|
424
|
+
success: true,
|
|
425
|
+
canInspectRuntimeCacheDirectly: false,
|
|
426
|
+
message: 'Direct in-process runtime cache introspection is not available from the CLI without app-specific hooks.',
|
|
427
|
+
latestCompiledIR: latest ? {
|
|
428
|
+
file: formatRelative(process.cwd(), latest.file),
|
|
429
|
+
entity: latest.entity,
|
|
430
|
+
compiledAt: latest.compiledAt,
|
|
431
|
+
compilerVersion: latest.compilerVersion,
|
|
432
|
+
} : null,
|
|
433
|
+
guidance: options.entity && options.command
|
|
434
|
+
? `If ${options.entity}.${options.command} is now present in precompiled IR and runtime still reports command-not-found, restart the API dev server to clear in-process IR cache.`
|
|
435
|
+
: 'After rebuilding manifests, restart long-running API processes (dev server/workers) to clear any in-process IR cache.',
|
|
436
|
+
};
|
|
437
|
+
if (options.json) {
|
|
438
|
+
printJson(payload);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
console.log(chalk.bold('\nCache Status / Guidance'));
|
|
442
|
+
console.log(chalk.yellow(' Direct runtime cache introspection: unavailable (CLI is offline by design)'));
|
|
443
|
+
if (latest) {
|
|
444
|
+
console.log(` Latest compiled IR: ${formatRelative(process.cwd(), latest.file)}`);
|
|
445
|
+
console.log(` entity: ${latest.entity}`);
|
|
446
|
+
console.log(` compiledAt: ${latest.compiledAt || 'n/a'}`);
|
|
447
|
+
console.log(` compilerVersion: ${latest.compilerVersion || 'n/a'}`);
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
console.log(' No precompiled IR files found.');
|
|
451
|
+
}
|
|
452
|
+
console.log('');
|
|
453
|
+
console.log(chalk.bold('Guidance'));
|
|
454
|
+
console.log(` ${payload.guidance}`);
|
|
455
|
+
}
|
|
456
|
+
catch (error) {
|
|
457
|
+
spinner.fail(`cache-status failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
458
|
+
process.exit(1);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
export async function doctorCommand(options = {}) {
|
|
462
|
+
const entityName = options.entity;
|
|
463
|
+
const commandName = options.command;
|
|
464
|
+
const spinner = createSpinner('Running manifest doctor', !options.json);
|
|
465
|
+
try {
|
|
466
|
+
const cwd = process.cwd();
|
|
467
|
+
const [sourceInspection, irInspection, duplicates, routeCheck] = await Promise.all([
|
|
468
|
+
inspectSourceEntities({ cwd, srcPattern: options.src }),
|
|
469
|
+
inspectCompiledIR({ cwd, irRoots: arrayify(options.irRoot) }),
|
|
470
|
+
readMergeReports({ cwd }),
|
|
471
|
+
entityName && commandName
|
|
472
|
+
? inspectRouteSurfaceForCommand({ entityName, commandName, routePath: options.route, cwd })
|
|
473
|
+
: Promise.resolve({ routeExists: false, matches: [] }),
|
|
474
|
+
]);
|
|
475
|
+
spinner.stop();
|
|
476
|
+
const findings = [];
|
|
477
|
+
// Global parser/scanner mismatch heuristics
|
|
478
|
+
for (const defs of sourceInspection.entities.values()) {
|
|
479
|
+
for (const def of defs) {
|
|
480
|
+
if (entityName && def.entityName !== entityName) {
|
|
481
|
+
continue;
|
|
482
|
+
}
|
|
483
|
+
for (const finding of def.parserHeuristics) {
|
|
484
|
+
findings.push({
|
|
485
|
+
rank: 10,
|
|
486
|
+
severity: finding.severity === 'error' ? 'error' : 'warning',
|
|
487
|
+
code: finding.code,
|
|
488
|
+
message: `${formatRelative(cwd, def.file)}${def.line ? `:${def.line}` : ''} - ${finding.message}`,
|
|
489
|
+
fix: finding.suggestion,
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
let entityDiff = null;
|
|
495
|
+
let sourceMerged = null;
|
|
496
|
+
let irMerged = null;
|
|
497
|
+
if (entityName) {
|
|
498
|
+
sourceMerged = mergeSourceEntityDefinitions(sourceInspection.entities.get(entityName));
|
|
499
|
+
irMerged = mergeIREntityDefinitions(irInspection.entities.get(entityName));
|
|
500
|
+
entityDiff = diffEntitySurface({ entityName, source: sourceMerged, ir: irMerged });
|
|
501
|
+
const diffSummary = summarizeDiff(entityDiff);
|
|
502
|
+
for (const msg of diffSummary.errors) {
|
|
503
|
+
findings.push({ rank: 20, severity: 'error', code: 'SOURCE_IR_DRIFT', message: `${entityName}: ${msg}` });
|
|
504
|
+
}
|
|
505
|
+
for (const msg of diffSummary.warnings) {
|
|
506
|
+
findings.push({ rank: 21, severity: 'warning', code: 'SOURCE_IR_DRIFT_WARNING', message: `${entityName}: ${msg}` });
|
|
507
|
+
}
|
|
508
|
+
if (commandName && sourceMerged.commands.includes(commandName) && !irMerged.commands.includes(commandName)) {
|
|
509
|
+
findings.push({
|
|
510
|
+
rank: 25,
|
|
511
|
+
severity: 'error',
|
|
512
|
+
code: 'COMMAND_MISSING_IN_PRECOMPILED_IR',
|
|
513
|
+
message: `${entityName}.${commandName} exists in source but not in precompiled IR.`,
|
|
514
|
+
fix: 'Run your manifest build step (e.g. `pnpm manifest:build`) and verify precompiled IR is regenerated.',
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
if (commandName && routeCheck.routeExists && sourceMerged.commands.includes(commandName) && !irMerged.commands.includes(commandName)) {
|
|
518
|
+
findings.push({
|
|
519
|
+
rank: 30,
|
|
520
|
+
severity: 'error',
|
|
521
|
+
code: 'ROUTE_EXISTS_BUT_IR_MISSING_COMMAND',
|
|
522
|
+
message: `Route exists for ${entityName}.${commandName}, but precompiled IR lacks the command.`,
|
|
523
|
+
fix: 'Route likely came from prior source/IR. Rebuild manifests and restart API dev server.',
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
if (commandName && sourceMerged.commands.includes(commandName) && irMerged.commands.includes(commandName)) {
|
|
527
|
+
findings.push({
|
|
528
|
+
rank: 80,
|
|
529
|
+
severity: 'warning',
|
|
530
|
+
code: 'STALE_RUNTIME_CACHE_LIKELY_IF_ERROR_PERSISTS',
|
|
531
|
+
message: `Source and precompiled IR both include ${entityName}.${commandName}. If runtime still returns command-not-found, in-process IR cache is likely stale.`,
|
|
532
|
+
fix: 'Restart the API dev server / worker process.',
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
const duplicateEntries = duplicates.flatMap((r) => r.entries);
|
|
537
|
+
const filteredDuplicateEntries = filterDuplicates(duplicateEntries, entityName);
|
|
538
|
+
for (const entry of filteredDuplicateEntries) {
|
|
539
|
+
findings.push({
|
|
540
|
+
rank: entry.classification === 'suspicious' ? 40 : 70,
|
|
541
|
+
severity: entry.classification === 'suspicious' ? 'warning' : 'info',
|
|
542
|
+
code: entry.classification === 'suspicious' ? 'SUSPICIOUS_DUPLICATE' : 'KNOWN_DUPLICATE_MERGE',
|
|
543
|
+
message: `${entry.type} ${entry.key} (kept=${entry.keptFrom || 'n/a'}, dropped=${entry.droppedFrom || 'n/a'})`,
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
findings.sort((a, b) => a.rank - b.rank || a.code.localeCompare(b.code));
|
|
547
|
+
const payload = {
|
|
548
|
+
success: !findings.some((f) => f.severity === 'error'),
|
|
549
|
+
target: entityName ? { entity: entityName, command: commandName || null, route: options.route || null } : null,
|
|
550
|
+
summary: {
|
|
551
|
+
filesScanned: {
|
|
552
|
+
sourceManifests: sourceInspection.filesScanned,
|
|
553
|
+
compiledIR: irInspection.filesScanned,
|
|
554
|
+
mergeReports: duplicates.length,
|
|
555
|
+
},
|
|
556
|
+
parserErrorsInSourceFiles: sourceInspection.filesWithParseErrors,
|
|
557
|
+
findings: {
|
|
558
|
+
errors: findings.filter((f) => f.severity === 'error').length,
|
|
559
|
+
warnings: findings.filter((f) => f.severity === 'warning').length,
|
|
560
|
+
info: findings.filter((f) => f.severity === 'info').length,
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
routeSurface: entityName && commandName ? {
|
|
564
|
+
routeExists: routeCheck.routeExists,
|
|
565
|
+
matches: routeCheck.matches.map((m) => ({ ...m, manifestFile: formatRelative(cwd, m.manifestFile) })),
|
|
566
|
+
} : null,
|
|
567
|
+
drift: entityDiff,
|
|
568
|
+
findings,
|
|
569
|
+
suggestedFixes: [
|
|
570
|
+
'pnpm manifest:build',
|
|
571
|
+
'Restart apps/api dev server (or the process hosting precompiled IR)',
|
|
572
|
+
'Re-run `manifest doctor` or `manifest runtime-check <Entity> <command>`',
|
|
573
|
+
],
|
|
574
|
+
};
|
|
575
|
+
if (options.json) {
|
|
576
|
+
printJson(payload);
|
|
577
|
+
if (!payload.success)
|
|
578
|
+
process.exit(1);
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
console.log(chalk.bold('\nManifest Doctor'));
|
|
582
|
+
console.log('');
|
|
583
|
+
console.log(chalk.cyan('Summary'));
|
|
584
|
+
console.log(tableLine('Source manifests scanned', String(payload.summary.filesScanned.sourceManifests)));
|
|
585
|
+
console.log(tableLine('Compiled IR files scanned', String(payload.summary.filesScanned.compiledIR)));
|
|
586
|
+
console.log(tableLine('Merge reports found', String(payload.summary.filesScanned.mergeReports)));
|
|
587
|
+
console.log(tableLine('Source parse-error files', String(payload.summary.parserErrorsInSourceFiles)));
|
|
588
|
+
if (payload.target) {
|
|
589
|
+
console.log(tableLine('Target', `${payload.target.entity}${payload.target.command ? `.${payload.target.command}` : ''}`));
|
|
590
|
+
if (payload.target.route)
|
|
591
|
+
console.log(tableLine('Route', payload.target.route));
|
|
592
|
+
if (payload.routeSurface)
|
|
593
|
+
console.log(tableLine('Route surface hit', payload.routeSurface.routeExists ? 'yes' : 'no'));
|
|
594
|
+
}
|
|
595
|
+
console.log('');
|
|
596
|
+
console.log(chalk.bold('Ranked Diagnosis'));
|
|
597
|
+
if (findings.length === 0) {
|
|
598
|
+
console.log(chalk.green(' No issues detected by offline checks.'));
|
|
599
|
+
if (entityName && commandName) {
|
|
600
|
+
console.log(chalk.yellow(` If runtime still returns "Command '${commandName}' not found", restart the API dev server to clear in-process IR cache.`));
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
else {
|
|
604
|
+
for (const finding of findings) {
|
|
605
|
+
const prefix = finding.severity === 'error'
|
|
606
|
+
? chalk.red('ERROR')
|
|
607
|
+
: finding.severity === 'warning'
|
|
608
|
+
? chalk.yellow('WARN ')
|
|
609
|
+
: chalk.gray('INFO ');
|
|
610
|
+
console.log(` ${prefix} [${finding.code}] ${finding.message}`);
|
|
611
|
+
if (finding.fix)
|
|
612
|
+
console.log(chalk.gray(` -> ${finding.fix}`));
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
console.log('');
|
|
616
|
+
console.log(chalk.bold('Fix Commands'));
|
|
617
|
+
for (const cmd of payload.suggestedFixes) {
|
|
618
|
+
console.log(` ${cmd}`);
|
|
619
|
+
}
|
|
620
|
+
if (!payload.success)
|
|
621
|
+
process.exit(1);
|
|
622
|
+
}
|
|
623
|
+
catch (error) {
|
|
624
|
+
spinner.fail(`doctor failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
625
|
+
process.exit(1);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
//# sourceMappingURL=doctor.js.map
|