@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,772 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* manifest repl command
|
|
3
|
+
*
|
|
4
|
+
* Interactive read-eval-print loop for executing commands, inspecting entity state,
|
|
5
|
+
* and evaluating expressions against a live runtime loaded from .manifest source.
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'fs/promises';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
import { glob } from 'glob';
|
|
10
|
+
import chalk from 'chalk';
|
|
11
|
+
import ora from 'ora';
|
|
12
|
+
import { createInterface } from 'node:readline';
|
|
13
|
+
// Import from the main Manifest package
|
|
14
|
+
async function loadCompiler() {
|
|
15
|
+
const module = await import('@angriff36/manifest/ir-compiler');
|
|
16
|
+
return {
|
|
17
|
+
compileToIR: module.compileToIR,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
async function loadRuntime() {
|
|
21
|
+
const module = await import('@angriff36/manifest');
|
|
22
|
+
return {
|
|
23
|
+
RuntimeEngine: module.RuntimeEngine,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get all manifest files from source pattern
|
|
28
|
+
*/
|
|
29
|
+
async function getManifestFiles(source) {
|
|
30
|
+
if (!source) {
|
|
31
|
+
const pattern = '**/*.manifest';
|
|
32
|
+
const files = await glob(pattern, { cwd: process.cwd() });
|
|
33
|
+
return files.map(f => path.resolve(process.cwd(), f));
|
|
34
|
+
}
|
|
35
|
+
const resolved = path.resolve(process.cwd(), source);
|
|
36
|
+
const stat = await fs.stat(resolved).catch(() => null);
|
|
37
|
+
if (!stat) {
|
|
38
|
+
throw new Error(`Source not found: ${source}`);
|
|
39
|
+
}
|
|
40
|
+
if (stat.isFile()) {
|
|
41
|
+
return [resolved];
|
|
42
|
+
}
|
|
43
|
+
const pattern = '**/*.manifest';
|
|
44
|
+
const files = await glob(pattern, { cwd: resolved });
|
|
45
|
+
return files.map(f => path.resolve(resolved, f));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Compile a manifest file to IR
|
|
49
|
+
*/
|
|
50
|
+
async function compileManifest(filePath, spinner) {
|
|
51
|
+
const { compileToIR } = await loadCompiler();
|
|
52
|
+
spinner.text = `Compiling ${path.relative(process.cwd(), filePath)}`;
|
|
53
|
+
const source = await fs.readFile(filePath, 'utf-8');
|
|
54
|
+
const result = await compileToIR(source, { sourcePath: filePath });
|
|
55
|
+
if (result.diagnostics && result.diagnostics.length > 0) {
|
|
56
|
+
const errors = result.diagnostics.filter((d) => d.severity === 'error');
|
|
57
|
+
if (errors.length > 0) {
|
|
58
|
+
spinner.fail(`Compilation failed with ${errors.length} error(s)`);
|
|
59
|
+
for (const error of errors) {
|
|
60
|
+
console.error(chalk.red(` ${error.message}`));
|
|
61
|
+
}
|
|
62
|
+
throw new Error('Compilation failed');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (!result.ir) {
|
|
66
|
+
throw new Error('Compilation produced no IR');
|
|
67
|
+
}
|
|
68
|
+
spinner.succeed(`Compiled ${path.relative(process.cwd(), filePath)}`);
|
|
69
|
+
return result.ir;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create a RuntimeEngine instance from IR
|
|
73
|
+
*/
|
|
74
|
+
async function createRuntime(ir, context) {
|
|
75
|
+
const { RuntimeEngine } = await loadRuntime();
|
|
76
|
+
return new RuntimeEngine(ir, context);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Extract a human-readable message from an unknown thrown value.
|
|
80
|
+
*/
|
|
81
|
+
function errorMessage(err) {
|
|
82
|
+
if (err instanceof Error)
|
|
83
|
+
return err.message;
|
|
84
|
+
return String(err);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Read an optional `description` field that may exist on runtime IR objects
|
|
88
|
+
* but is not declared on the static IR types.
|
|
89
|
+
*/
|
|
90
|
+
function optionalDescription(obj) {
|
|
91
|
+
if (obj && typeof obj === 'object' && 'description' in obj) {
|
|
92
|
+
const value = obj.description;
|
|
93
|
+
return typeof value === 'string' ? value : undefined;
|
|
94
|
+
}
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Colorize JSON output for better readability
|
|
99
|
+
*/
|
|
100
|
+
function colorizeJSON(obj) {
|
|
101
|
+
const json = JSON.stringify(obj, null, 2);
|
|
102
|
+
return json
|
|
103
|
+
.replace(/(".*?"): ("(.*?)"|(\d+)|(true|false|null))/g, (match, key, value, num, bool) => {
|
|
104
|
+
const coloredKey = chalk.cyan(key);
|
|
105
|
+
let coloredValue = value;
|
|
106
|
+
if (num)
|
|
107
|
+
coloredValue = chalk.green(num);
|
|
108
|
+
else if (bool === 'true' || bool === 'false')
|
|
109
|
+
coloredValue = chalk.yellow(bool);
|
|
110
|
+
else if (bool === 'null')
|
|
111
|
+
coloredValue = chalk.gray(bool);
|
|
112
|
+
else
|
|
113
|
+
coloredValue = chalk.white(value);
|
|
114
|
+
return `${coloredKey}: ${coloredValue}`;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* REPL Commands
|
|
119
|
+
*/
|
|
120
|
+
// HELP: Show all available commands
|
|
121
|
+
const helpCommand = {
|
|
122
|
+
name: 'help',
|
|
123
|
+
description: 'Show this help message',
|
|
124
|
+
handler: async (_args, _context) => {
|
|
125
|
+
const commands = getAllCommands();
|
|
126
|
+
let output = '\n' + chalk.bold('Available Commands:') + '\n\n';
|
|
127
|
+
for (const cmd of commands) {
|
|
128
|
+
const args = cmd.completer ? ' [...]' : '';
|
|
129
|
+
output += ` ${chalk.green(cmd.name + args)} - ${chalk.gray(cmd.description)}\n`;
|
|
130
|
+
}
|
|
131
|
+
output += '\n' + chalk.bold('Expression Evaluation:') + '\n';
|
|
132
|
+
output += ' Any input not matching a command is evaluated as a Manifest expression.\n';
|
|
133
|
+
output += ' Example: `user.role` or `context.tenantId`\n\n';
|
|
134
|
+
output += chalk.bold('Meta Commands:') + '\n';
|
|
135
|
+
output += ' `json on|off` - Toggle JSON output mode\n';
|
|
136
|
+
output += ' `set user <id>` - Set current user\n';
|
|
137
|
+
output += ' `set tenant <id>` - Set current tenant\n';
|
|
138
|
+
output += ' `set context <json>` - Set context variables\n\n';
|
|
139
|
+
output += chalk.bold('Tips:') + '\n';
|
|
140
|
+
output += ' Use TAB for completion\n';
|
|
141
|
+
output += ' Use UP/DOWN arrows for command history\n';
|
|
142
|
+
output += ' Use Ctrl+C or type `exit` to quit\n';
|
|
143
|
+
return output;
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
// LIST: List all entities
|
|
147
|
+
const listCommand = {
|
|
148
|
+
name: 'list',
|
|
149
|
+
description: 'List all entities (aliases: ls, entities)',
|
|
150
|
+
handler: async (_args, context) => {
|
|
151
|
+
const entities = context.ir.entities || [];
|
|
152
|
+
if (context.jsonMode) {
|
|
153
|
+
return JSON.stringify(entities.map((e) => ({
|
|
154
|
+
name: e.name,
|
|
155
|
+
properties: e.properties.length,
|
|
156
|
+
commands: e.commands.length,
|
|
157
|
+
})), null, 2);
|
|
158
|
+
}
|
|
159
|
+
let output = '\n' + chalk.bold('Entities:') + '\n\n';
|
|
160
|
+
for (const entity of entities) {
|
|
161
|
+
output += ` ${chalk.cyan(entity.name)}`;
|
|
162
|
+
output += chalk.gray(` (${entity.properties.length} properties, ${entity.commands.length} commands)\n`);
|
|
163
|
+
}
|
|
164
|
+
return output;
|
|
165
|
+
},
|
|
166
|
+
completer: (_args, _context) => [],
|
|
167
|
+
};
|
|
168
|
+
// INSPECT: Show entity details
|
|
169
|
+
const inspectCommand = {
|
|
170
|
+
name: 'inspect',
|
|
171
|
+
description: 'Show entity schema, properties, and commands',
|
|
172
|
+
handler: async (args, context) => {
|
|
173
|
+
const [entityName] = args;
|
|
174
|
+
if (!entityName) {
|
|
175
|
+
return chalk.red('Error: Entity name required\nUsage: inspect <entity-name>');
|
|
176
|
+
}
|
|
177
|
+
const entity = context.ir.entities.find((e) => e.name === entityName);
|
|
178
|
+
if (!entity) {
|
|
179
|
+
return chalk.red(`Error: Entity '${entityName}' not found`);
|
|
180
|
+
}
|
|
181
|
+
if (context.jsonMode) {
|
|
182
|
+
return JSON.stringify(entity, null, 2);
|
|
183
|
+
}
|
|
184
|
+
let output = '\n' + chalk.bold(`Entity: ${chalk.cyan(entity.name)}`) + '\n\n';
|
|
185
|
+
// Properties
|
|
186
|
+
output += chalk.bold('Properties:') + '\n';
|
|
187
|
+
for (const prop of entity.properties) {
|
|
188
|
+
const isRequired = prop.required;
|
|
189
|
+
const required = isRequired ? '' : chalk.gray('?');
|
|
190
|
+
const typeName = prop.type?.name || prop.type || 'unknown';
|
|
191
|
+
const nullable = prop.type?.nullable ? '?' : '';
|
|
192
|
+
output += ` ${chalk.yellow(prop.name)}${required}: ${chalk.white(typeName + nullable)}\n`;
|
|
193
|
+
}
|
|
194
|
+
// Computed properties
|
|
195
|
+
if (entity.computedProperties.length > 0) {
|
|
196
|
+
output += '\n' + chalk.bold('Computed Properties:') + '\n';
|
|
197
|
+
for (const cp of entity.computedProperties) {
|
|
198
|
+
output += ` ${chalk.yellow(cp.name)}: ${chalk.gray('(computed)')}\n`;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// Relationships
|
|
202
|
+
if (entity.relationships.length > 0) {
|
|
203
|
+
output += '\n' + chalk.bold('Relationships:') + '\n';
|
|
204
|
+
for (const rel of entity.relationships) {
|
|
205
|
+
output += ` ${chalk.yellow(rel.name)}: ${rel.kind} → ${chalk.cyan(rel.target)}\n`;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Commands
|
|
209
|
+
if (entity.commands.length > 0) {
|
|
210
|
+
output += '\n' + chalk.bold('Commands:') + '\n';
|
|
211
|
+
for (const cmd of entity.commands) {
|
|
212
|
+
const command = context.ir.commands.find((c) => c.name === cmd && c.entity === entityName);
|
|
213
|
+
if (command) {
|
|
214
|
+
output += ` ${chalk.green(cmd)}${chalk.gray(' - ' + (optionalDescription(command) || 'No description'))}\n`;
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
output += ` ${chalk.green(cmd)}\n`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
// Constraints
|
|
222
|
+
if (entity.constraints.length > 0) {
|
|
223
|
+
output += '\n' + chalk.bold('Constraints:') + '\n';
|
|
224
|
+
for (const constraint of entity.constraints) {
|
|
225
|
+
output += ` ${chalk.yellow(constraint.name)}: ${chalk.gray(constraint.code || 'block')}\n`;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return output;
|
|
229
|
+
},
|
|
230
|
+
completer: (_args, context) => {
|
|
231
|
+
return context.ir.entities.map((e) => e.name);
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
// SHOW: Show entity instances
|
|
235
|
+
const showCommand = {
|
|
236
|
+
name: 'show',
|
|
237
|
+
description: 'List all instances of an entity',
|
|
238
|
+
handler: async (args, context) => {
|
|
239
|
+
const [entityName] = args;
|
|
240
|
+
if (!entityName) {
|
|
241
|
+
return chalk.red('Error: Entity name required\nUsage: show <entity-name>');
|
|
242
|
+
}
|
|
243
|
+
const entity = context.ir.entities.find((e) => e.name === entityName);
|
|
244
|
+
if (!entity) {
|
|
245
|
+
return chalk.red(`Error: Entity '${entityName}' not found`);
|
|
246
|
+
}
|
|
247
|
+
const instances = await context.runtime.getAllInstances(entityName);
|
|
248
|
+
if (context.jsonMode) {
|
|
249
|
+
return JSON.stringify(instances, null, 2);
|
|
250
|
+
}
|
|
251
|
+
if (instances.length === 0) {
|
|
252
|
+
return chalk.gray(`No instances of ${chalk.cyan(entityName)} found`);
|
|
253
|
+
}
|
|
254
|
+
let output = `\n${chalk.bold(entityName)} instances (${instances.length}):\n\n`;
|
|
255
|
+
for (const inst of instances) {
|
|
256
|
+
output += ` ${chalk.green(inst.id)}`;
|
|
257
|
+
// Show a few key properties
|
|
258
|
+
const keys = Object.keys(inst).filter(k => k !== 'id' && !k.startsWith('_')).slice(0, 3);
|
|
259
|
+
if (keys.length > 0) {
|
|
260
|
+
const preview = keys.map(k => `${k}=${JSON.stringify(inst[k])}`).join(', ');
|
|
261
|
+
output += chalk.gray(` - ${preview}`);
|
|
262
|
+
}
|
|
263
|
+
output += '\n';
|
|
264
|
+
}
|
|
265
|
+
return output;
|
|
266
|
+
},
|
|
267
|
+
completer: (_args, context) => {
|
|
268
|
+
return context.ir.entities.map((e) => e.name);
|
|
269
|
+
},
|
|
270
|
+
};
|
|
271
|
+
// GET: Get a specific instance by ID
|
|
272
|
+
const getCommand = {
|
|
273
|
+
name: 'get',
|
|
274
|
+
description: 'Get a specific instance by ID',
|
|
275
|
+
handler: async (args, context) => {
|
|
276
|
+
const [entityName, id] = args;
|
|
277
|
+
if (!entityName || !id) {
|
|
278
|
+
return chalk.red('Error: Entity name and ID required\nUsage: get <entity-name> <id>');
|
|
279
|
+
}
|
|
280
|
+
const entity = context.ir.entities.find((e) => e.name === entityName);
|
|
281
|
+
if (!entity) {
|
|
282
|
+
return chalk.red(`Error: Entity '${entityName}' not found`);
|
|
283
|
+
}
|
|
284
|
+
const instance = await context.runtime.getInstance(entityName, id);
|
|
285
|
+
if (!instance) {
|
|
286
|
+
return chalk.yellow(`Instance ${chalk.green(id)} of ${chalk.cyan(entityName)} not found`);
|
|
287
|
+
}
|
|
288
|
+
if (context.jsonMode) {
|
|
289
|
+
return JSON.stringify(instance, null, 2);
|
|
290
|
+
}
|
|
291
|
+
return `\n${chalk.cyan(entityName)} ${chalk.green(id)}:\n${colorizeJSON(instance)}`;
|
|
292
|
+
},
|
|
293
|
+
completer: (_args, context) => {
|
|
294
|
+
return context.ir.entities.map((e) => e.name);
|
|
295
|
+
},
|
|
296
|
+
};
|
|
297
|
+
// RUN: Execute a command
|
|
298
|
+
const runCommand = {
|
|
299
|
+
name: 'run',
|
|
300
|
+
description: 'Execute a manifest command (aliases: exec, execute)',
|
|
301
|
+
handler: async (args, context) => {
|
|
302
|
+
const [entityName, commandName, ...inputArgs] = args;
|
|
303
|
+
if (!entityName || !commandName) {
|
|
304
|
+
return chalk.red('Error: Entity name and command name required\nUsage: run <entity> <command> [json-input]');
|
|
305
|
+
}
|
|
306
|
+
// Parse input JSON if provided
|
|
307
|
+
let input = {};
|
|
308
|
+
if (inputArgs.length > 0) {
|
|
309
|
+
try {
|
|
310
|
+
const inputStr = inputArgs.join(' ');
|
|
311
|
+
input = JSON.parse(inputStr);
|
|
312
|
+
}
|
|
313
|
+
catch {
|
|
314
|
+
return chalk.red('Error: Invalid JSON input\nUsage: run <entity> <command> {"key": "value"}');
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
const result = await context.runtime.runCommand(commandName, input, {
|
|
318
|
+
entityName,
|
|
319
|
+
});
|
|
320
|
+
if (context.jsonMode) {
|
|
321
|
+
return JSON.stringify(result, null, 2);
|
|
322
|
+
}
|
|
323
|
+
let output = '';
|
|
324
|
+
if (result.success) {
|
|
325
|
+
output += chalk.green(`✓ Command ${chalk.cyan(`${entityName}.${commandName}`)} succeeded\n`);
|
|
326
|
+
if (result.instance) {
|
|
327
|
+
output += `\n${chalk.bold('Result:')}\n${colorizeJSON(result.instance)}\n`;
|
|
328
|
+
}
|
|
329
|
+
else if (result.result !== undefined) {
|
|
330
|
+
output += `\n${chalk.bold('Result:')}\n${colorizeJSON(result.result)}\n`;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
output += chalk.red(`✗ Command ${chalk.cyan(`${entityName}.${commandName}`)} failed\n`);
|
|
335
|
+
if (result.error) {
|
|
336
|
+
output += chalk.red(` Error: ${result.error}\n`);
|
|
337
|
+
}
|
|
338
|
+
if (result.deniedBy) {
|
|
339
|
+
output += chalk.yellow(` Denied by: ${result.deniedBy}\n`);
|
|
340
|
+
}
|
|
341
|
+
if (result.guardFailure) {
|
|
342
|
+
output += chalk.yellow(` Guard ${result.guardFailure.index} failed\n`);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
// Show emitted events
|
|
346
|
+
if (result.emittedEvents && result.emittedEvents.length > 0) {
|
|
347
|
+
output += `\n${chalk.bold('Emitted Events:')}\n`;
|
|
348
|
+
for (const event of result.emittedEvents) {
|
|
349
|
+
output += ` ${chalk.magenta(event.name)} - ${chalk.gray(JSON.stringify(event.payload))}\n`;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
return output;
|
|
353
|
+
},
|
|
354
|
+
completer: (args, context) => {
|
|
355
|
+
if (args.length === 0 || args.length === 1) {
|
|
356
|
+
return context.ir.entities.map((e) => e.name);
|
|
357
|
+
}
|
|
358
|
+
const [entityName] = args;
|
|
359
|
+
const entity = context.ir.entities.find((e) => e.name === entityName);
|
|
360
|
+
if (entity && args.length === 2) {
|
|
361
|
+
return entity.commands;
|
|
362
|
+
}
|
|
363
|
+
return [];
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
// CMDS: List all commands in the IR
|
|
367
|
+
const cmdsCommand = {
|
|
368
|
+
name: 'cmds',
|
|
369
|
+
description: 'List all commands',
|
|
370
|
+
handler: async (_args, context) => {
|
|
371
|
+
const commands = context.ir.commands || [];
|
|
372
|
+
if (context.jsonMode) {
|
|
373
|
+
return JSON.stringify(commands, null, 2);
|
|
374
|
+
}
|
|
375
|
+
// Group by entity
|
|
376
|
+
const byEntity = {};
|
|
377
|
+
for (const cmd of commands) {
|
|
378
|
+
const entity = cmd.entity || '(global)';
|
|
379
|
+
if (!byEntity[entity])
|
|
380
|
+
byEntity[entity] = [];
|
|
381
|
+
byEntity[entity].push(cmd);
|
|
382
|
+
}
|
|
383
|
+
let output = '\n' + chalk.bold('Commands:') + '\n\n';
|
|
384
|
+
for (const [entity, cmds] of Object.entries(byEntity)) {
|
|
385
|
+
output += chalk.cyan(entity) + ':\n';
|
|
386
|
+
for (const cmd of cmds) {
|
|
387
|
+
output += ` ${chalk.green(cmd.name)}`;
|
|
388
|
+
const description = optionalDescription(cmd);
|
|
389
|
+
if (description) {
|
|
390
|
+
output += chalk.gray(` - ${description}`);
|
|
391
|
+
}
|
|
392
|
+
output += '\n';
|
|
393
|
+
}
|
|
394
|
+
output += '\n';
|
|
395
|
+
}
|
|
396
|
+
return output;
|
|
397
|
+
},
|
|
398
|
+
completer: (_args, _context) => [],
|
|
399
|
+
};
|
|
400
|
+
// EVAL: Evaluate a Manifest expression
|
|
401
|
+
const evalCommand = {
|
|
402
|
+
name: 'eval',
|
|
403
|
+
description: 'Evaluate a Manifest expression (use `:eval` for inline evaluation)',
|
|
404
|
+
handler: async (args, _context) => {
|
|
405
|
+
const expr = args.join(' ');
|
|
406
|
+
if (!expr) {
|
|
407
|
+
return chalk.red('Error: Expression required\nUsage: eval <expression>');
|
|
408
|
+
}
|
|
409
|
+
try {
|
|
410
|
+
// For now, we'll just return the expression as-is
|
|
411
|
+
// Full expression evaluation would require parsing the expression
|
|
412
|
+
return chalk.gray(`Expression evaluation not yet implemented for: ${expr}`);
|
|
413
|
+
}
|
|
414
|
+
catch (err) {
|
|
415
|
+
return chalk.red(`Error evaluating expression: ${errorMessage(err)}`);
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
};
|
|
419
|
+
// SET: Set context variables
|
|
420
|
+
const setCommand = {
|
|
421
|
+
name: 'set',
|
|
422
|
+
description: 'Set context variables (user, tenant, context)',
|
|
423
|
+
handler: async (args, context) => {
|
|
424
|
+
const [key, ...valueParts] = args;
|
|
425
|
+
const value = valueParts.join(' ');
|
|
426
|
+
switch (key) {
|
|
427
|
+
case 'user':
|
|
428
|
+
context.userContext.user = { id: value, role: 'user' };
|
|
429
|
+
return chalk.green(`User set to: ${value}`);
|
|
430
|
+
case 'tenant':
|
|
431
|
+
context.userContext.tenantId = value;
|
|
432
|
+
// Recreate runtime with new tenant context
|
|
433
|
+
context.runtime = await createRuntime(context.ir, context.userContext);
|
|
434
|
+
return chalk.green(`Tenant set to: ${value}`);
|
|
435
|
+
case 'context':
|
|
436
|
+
try {
|
|
437
|
+
const parsed = JSON.parse(value);
|
|
438
|
+
context.userContext.context = { ...context.userContext.context, ...parsed };
|
|
439
|
+
return chalk.green(`Context updated`);
|
|
440
|
+
}
|
|
441
|
+
catch {
|
|
442
|
+
return chalk.red('Error: Invalid JSON for context');
|
|
443
|
+
}
|
|
444
|
+
default:
|
|
445
|
+
return chalk.yellow(`Unknown setting: ${key}\nAvailable: user, tenant, context`);
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
completer: (_args, _context) => ['user', 'tenant', 'context'],
|
|
449
|
+
};
|
|
450
|
+
// POLICIES: List all policies
|
|
451
|
+
const policiesCommand = {
|
|
452
|
+
name: 'policies',
|
|
453
|
+
description: 'List all policies',
|
|
454
|
+
handler: async (_args, context) => {
|
|
455
|
+
const policies = context.ir.policies || [];
|
|
456
|
+
if (context.jsonMode) {
|
|
457
|
+
return JSON.stringify(policies, null, 2);
|
|
458
|
+
}
|
|
459
|
+
let output = '\n' + chalk.bold('Policies:') + '\n\n';
|
|
460
|
+
for (const policy of policies) {
|
|
461
|
+
output += ` ${chalk.cyan(policy.name)}`;
|
|
462
|
+
const description = optionalDescription(policy);
|
|
463
|
+
if (description) {
|
|
464
|
+
output += chalk.gray(` - ${description}`);
|
|
465
|
+
}
|
|
466
|
+
output += '\n';
|
|
467
|
+
}
|
|
468
|
+
return output;
|
|
469
|
+
},
|
|
470
|
+
};
|
|
471
|
+
// INFO: Show runtime info
|
|
472
|
+
const infoCommand = {
|
|
473
|
+
name: 'info',
|
|
474
|
+
description: 'Show runtime and IR information',
|
|
475
|
+
handler: async (_args, context) => {
|
|
476
|
+
const provenance = context.ir.provenance;
|
|
477
|
+
if (context.jsonMode) {
|
|
478
|
+
return JSON.stringify({
|
|
479
|
+
manifestPath: context.manifestPath,
|
|
480
|
+
compilerVersion: provenance?.compilerVersion,
|
|
481
|
+
schemaVersion: provenance?.schemaVersion,
|
|
482
|
+
compiledAt: provenance?.compiledAt,
|
|
483
|
+
entities: context.ir.entities.length,
|
|
484
|
+
commands: context.ir.commands.length,
|
|
485
|
+
policies: context.ir.policies.length,
|
|
486
|
+
tenant: context.ir.tenant,
|
|
487
|
+
}, null, 2);
|
|
488
|
+
}
|
|
489
|
+
let output = '\n' + chalk.bold('Runtime Information') + '\n\n';
|
|
490
|
+
output += ` ${chalk.yellow('Manifest:')} ${context.manifestPath}\n`;
|
|
491
|
+
output += ` ${chalk.yellow('Compiler:')} ${provenance?.compilerVersion || 'unknown'}\n`;
|
|
492
|
+
output += ` ${chalk.yellow('Schema:')} ${provenance?.schemaVersion || 'unknown'}\n`;
|
|
493
|
+
output += ` ${chalk.yellow('Compiled:')} ${provenance?.compiledAt || 'unknown'}\n\n`;
|
|
494
|
+
output += ` ${chalk.yellow('Entities:')} ${context.ir.entities.length}\n`;
|
|
495
|
+
output += ` ${chalk.yellow('Commands:')} ${context.ir.commands.length}\n`;
|
|
496
|
+
output += ` ${chalk.yellow('Policies:')} ${context.ir.policies.length}\n`;
|
|
497
|
+
if (context.ir.tenant) {
|
|
498
|
+
output += ` ${chalk.yellow('Tenant:')} ${context.ir.tenant.property}\n`;
|
|
499
|
+
}
|
|
500
|
+
// Show current context
|
|
501
|
+
output += '\n' + chalk.bold('Current Context:') + '\n';
|
|
502
|
+
if (context.userContext.user) {
|
|
503
|
+
output += ` ${chalk.yellow('User:')} ${context.userContext.user.id}\n`;
|
|
504
|
+
}
|
|
505
|
+
if (context.userContext.tenantId) {
|
|
506
|
+
output += ` ${chalk.yellow('Tenant ID:')} ${context.userContext.tenantId}\n`;
|
|
507
|
+
}
|
|
508
|
+
output += ` ${chalk.yellow('JSON Mode:')} ${context.jsonMode ? 'on' : 'off'}\n`;
|
|
509
|
+
return output;
|
|
510
|
+
},
|
|
511
|
+
};
|
|
512
|
+
// CLEAR: Clear event log
|
|
513
|
+
const clearCommand = {
|
|
514
|
+
name: 'clear',
|
|
515
|
+
description: 'Clear the event log (aliases: cls)',
|
|
516
|
+
handler: async (_args, context) => {
|
|
517
|
+
context.runtime.clearEventLog();
|
|
518
|
+
return chalk.green('Event log cleared');
|
|
519
|
+
},
|
|
520
|
+
};
|
|
521
|
+
// EVENTS: Show event log
|
|
522
|
+
const eventsCommand = {
|
|
523
|
+
name: 'events',
|
|
524
|
+
description: 'Show event log',
|
|
525
|
+
handler: async (_args, context) => {
|
|
526
|
+
const events = context.runtime.getEventLog();
|
|
527
|
+
if (context.jsonMode) {
|
|
528
|
+
return JSON.stringify(events, null, 2);
|
|
529
|
+
}
|
|
530
|
+
if (events.length === 0) {
|
|
531
|
+
return chalk.gray('No events logged yet');
|
|
532
|
+
}
|
|
533
|
+
let output = `\n${chalk.bold('Event Log')} (${events.length} events):\n\n`;
|
|
534
|
+
for (const event of events) {
|
|
535
|
+
output += ` ${chalk.magenta(event.name)} - ${chalk.gray(JSON.stringify(event.payload))}\n`;
|
|
536
|
+
}
|
|
537
|
+
return output;
|
|
538
|
+
},
|
|
539
|
+
};
|
|
540
|
+
// EXIT: Exit the REPL
|
|
541
|
+
const exitCommand = {
|
|
542
|
+
name: 'exit',
|
|
543
|
+
description: 'Exit the REPL (aliases: quit, q)',
|
|
544
|
+
handler: async () => {
|
|
545
|
+
return '__EXIT__';
|
|
546
|
+
},
|
|
547
|
+
};
|
|
548
|
+
// JSON: Toggle JSON output mode
|
|
549
|
+
const jsonToggleCommand = {
|
|
550
|
+
name: 'json',
|
|
551
|
+
description: 'Toggle JSON output mode',
|
|
552
|
+
handler: async (args, context) => {
|
|
553
|
+
const [mode] = args;
|
|
554
|
+
if (mode === 'on' || mode === 'true' || mode === '1') {
|
|
555
|
+
context.jsonMode = true;
|
|
556
|
+
return chalk.green('JSON mode: ON');
|
|
557
|
+
}
|
|
558
|
+
else if (mode === 'off' || mode === 'false' || mode === '0') {
|
|
559
|
+
context.jsonMode = false;
|
|
560
|
+
return chalk.green('JSON mode: OFF');
|
|
561
|
+
}
|
|
562
|
+
else {
|
|
563
|
+
context.jsonMode = !context.jsonMode;
|
|
564
|
+
return chalk.green(`JSON mode: ${context.jsonMode ? 'ON' : 'OFF'}`);
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
completer: (_args, _context) => ['on', 'off'],
|
|
568
|
+
};
|
|
569
|
+
// Reload: Reload the manifest file
|
|
570
|
+
const reloadCommand = {
|
|
571
|
+
name: 'reload',
|
|
572
|
+
description: 'Reload the manifest file',
|
|
573
|
+
handler: async (args, context) => {
|
|
574
|
+
const spinner = ora('Reloading manifest').start();
|
|
575
|
+
try {
|
|
576
|
+
const ir = await compileManifest(context.manifestPath, spinner);
|
|
577
|
+
context.ir = ir;
|
|
578
|
+
context.runtime = await createRuntime(ir, context.userContext);
|
|
579
|
+
return chalk.green('Manifest reloaded successfully');
|
|
580
|
+
}
|
|
581
|
+
catch (err) {
|
|
582
|
+
spinner.fail('Reload failed');
|
|
583
|
+
return chalk.red(`Error: ${errorMessage(err)}`);
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
};
|
|
587
|
+
// Get all commands with aliases
|
|
588
|
+
function getAllCommands() {
|
|
589
|
+
return [
|
|
590
|
+
helpCommand,
|
|
591
|
+
listCommand,
|
|
592
|
+
inspectCommand,
|
|
593
|
+
showCommand,
|
|
594
|
+
getCommand,
|
|
595
|
+
runCommand,
|
|
596
|
+
cmdsCommand,
|
|
597
|
+
evalCommand,
|
|
598
|
+
setCommand,
|
|
599
|
+
policiesCommand,
|
|
600
|
+
infoCommand,
|
|
601
|
+
clearCommand,
|
|
602
|
+
eventsCommand,
|
|
603
|
+
jsonToggleCommand,
|
|
604
|
+
reloadCommand,
|
|
605
|
+
exitCommand,
|
|
606
|
+
];
|
|
607
|
+
}
|
|
608
|
+
// Command lookup by name (including aliases)
|
|
609
|
+
const commandAliases = {
|
|
610
|
+
'ls': 'list',
|
|
611
|
+
'entities': 'list',
|
|
612
|
+
'exec': 'run',
|
|
613
|
+
'execute': 'run',
|
|
614
|
+
'quit': 'exit',
|
|
615
|
+
'q': 'exit',
|
|
616
|
+
'cls': 'clear',
|
|
617
|
+
};
|
|
618
|
+
function findCommand(name) {
|
|
619
|
+
const canonicalName = commandAliases[name] || name;
|
|
620
|
+
return getAllCommands().find(c => c.name === canonicalName);
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Parse input line into command and arguments
|
|
624
|
+
*/
|
|
625
|
+
function parseInput(line) {
|
|
626
|
+
const trimmed = line.trim();
|
|
627
|
+
// Check for special "json on|off" syntax
|
|
628
|
+
if (trimmed.startsWith('json ')) {
|
|
629
|
+
const parts = trimmed.slice(4).trim().split(/\s+/);
|
|
630
|
+
return { command: 'json', args: parts, raw: trimmed };
|
|
631
|
+
}
|
|
632
|
+
// Check for "set user/tenant/context" syntax
|
|
633
|
+
if (trimmed.startsWith('set ')) {
|
|
634
|
+
const parts = trimmed.slice(4).trim().split(/\s+/);
|
|
635
|
+
return { command: 'set', args: parts, raw: trimmed };
|
|
636
|
+
}
|
|
637
|
+
// Check for ":eval" inline evaluation syntax
|
|
638
|
+
if (trimmed.startsWith(':eval ')) {
|
|
639
|
+
const expr = trimmed.slice(6).trim();
|
|
640
|
+
return { command: 'eval', args: [expr], raw: trimmed };
|
|
641
|
+
}
|
|
642
|
+
// Regular command parsing
|
|
643
|
+
const parts = trimmed.split(/\s+/);
|
|
644
|
+
const command = parts[0];
|
|
645
|
+
const args = parts.slice(1);
|
|
646
|
+
return { command, args, raw: trimmed };
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Create readline interface with completion
|
|
650
|
+
*/
|
|
651
|
+
function createReadline(context) {
|
|
652
|
+
return createInterface({
|
|
653
|
+
input: process.stdin,
|
|
654
|
+
output: process.stdout,
|
|
655
|
+
completer: (line) => {
|
|
656
|
+
const { command, args } = parseInput(line);
|
|
657
|
+
const cmd = findCommand(command);
|
|
658
|
+
if (cmd && cmd.completer) {
|
|
659
|
+
const completions = cmd.completer(args, context);
|
|
660
|
+
const lastArg = args[args.length - 1] || '';
|
|
661
|
+
const hits = completions.filter((c) => c.startsWith(lastArg));
|
|
662
|
+
// Show all completions if no input, or filter by input
|
|
663
|
+
if (args.length === 0) {
|
|
664
|
+
return [completions, line];
|
|
665
|
+
}
|
|
666
|
+
return [hits.length ? hits : completions, line];
|
|
667
|
+
}
|
|
668
|
+
// Complete command names
|
|
669
|
+
if (args.length === 0) {
|
|
670
|
+
const commands = getAllCommands().map(c => c.name);
|
|
671
|
+
const hits = commands.filter(c => c.startsWith(command));
|
|
672
|
+
return [hits.length ? hits : commands, line];
|
|
673
|
+
}
|
|
674
|
+
return [[], line];
|
|
675
|
+
},
|
|
676
|
+
prompt: chalk.cyan('manifest') + chalk.gray('>') + ' ',
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Main REPL loop
|
|
681
|
+
*/
|
|
682
|
+
async function replLoop(context) {
|
|
683
|
+
const rl = createReadline(context);
|
|
684
|
+
// Show welcome message
|
|
685
|
+
console.log('');
|
|
686
|
+
console.log(chalk.bold.green('Manifest REPL') + chalk.gray(' - Interactive Runtime'));
|
|
687
|
+
console.log(chalk.gray('Type `help` for available commands, `exit` to quit'));
|
|
688
|
+
console.log('');
|
|
689
|
+
rl.prompt();
|
|
690
|
+
for await (const line of rl) {
|
|
691
|
+
if (line.trim() === '') {
|
|
692
|
+
rl.prompt();
|
|
693
|
+
continue;
|
|
694
|
+
}
|
|
695
|
+
try {
|
|
696
|
+
const { command, args } = parseInput(line);
|
|
697
|
+
const cmd = findCommand(command);
|
|
698
|
+
if (cmd) {
|
|
699
|
+
const result = await cmd.handler(args, context);
|
|
700
|
+
if (result === '__EXIT__') {
|
|
701
|
+
rl.close();
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
if (result) {
|
|
705
|
+
console.log(result);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
// Not a recognized command - could be an expression evaluation
|
|
710
|
+
// For now, show an error
|
|
711
|
+
console.log(chalk.yellow(`Unknown command: ${command}`));
|
|
712
|
+
console.log(chalk.gray('Type `help` for available commands'));
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
catch (err) {
|
|
716
|
+
console.error(chalk.red(`Error: ${errorMessage(err)}`));
|
|
717
|
+
}
|
|
718
|
+
rl.prompt();
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Main entry point for the repl command
|
|
723
|
+
*/
|
|
724
|
+
export async function replCommand(source, options = {}) {
|
|
725
|
+
// Find and compile manifest file
|
|
726
|
+
const files = await getManifestFiles(source || '');
|
|
727
|
+
if (files.length === 0) {
|
|
728
|
+
console.error(chalk.red('Error: No .manifest files found'));
|
|
729
|
+
console.log(chalk.gray('Create a .manifest file or specify a source path'));
|
|
730
|
+
process.exit(1);
|
|
731
|
+
}
|
|
732
|
+
// Use the first file found
|
|
733
|
+
const manifestPath = files[0];
|
|
734
|
+
const spinner = ora('Loading manifest').start();
|
|
735
|
+
try {
|
|
736
|
+
const ir = await compileManifest(manifestPath, spinner);
|
|
737
|
+
// Build user context
|
|
738
|
+
const userContext = {
|
|
739
|
+
user: options.user ? { id: options.user, role: 'user' } : { id: 'repl-user', role: 'user' },
|
|
740
|
+
};
|
|
741
|
+
if (options.tenant) {
|
|
742
|
+
userContext.tenantId = options.tenant;
|
|
743
|
+
}
|
|
744
|
+
if (options.context) {
|
|
745
|
+
try {
|
|
746
|
+
userContext.context = JSON.parse(options.context);
|
|
747
|
+
}
|
|
748
|
+
catch {
|
|
749
|
+
spinner.warn('Invalid JSON for --context, ignoring');
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
// Create runtime
|
|
753
|
+
const runtime = await createRuntime(ir, userContext);
|
|
754
|
+
// Set up REPL context
|
|
755
|
+
const replContext = {
|
|
756
|
+
ir,
|
|
757
|
+
runtime,
|
|
758
|
+
manifestPath,
|
|
759
|
+
jsonMode: options.json || false,
|
|
760
|
+
userContext,
|
|
761
|
+
};
|
|
762
|
+
spinner.stop();
|
|
763
|
+
// Start REPL loop
|
|
764
|
+
await replLoop(replContext);
|
|
765
|
+
}
|
|
766
|
+
catch (err) {
|
|
767
|
+
spinner.fail('Failed to load manifest');
|
|
768
|
+
console.error(chalk.red(errorMessage(err)));
|
|
769
|
+
process.exit(1);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
//# sourceMappingURL=repl.js.map
|