@happyvertical/smrt-cli 0.53.3 → 0.53.4

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.
Files changed (64) hide show
  1. package/AGENTS.md +1 -0
  2. package/README.md +40 -0
  3. package/agents/app-commands.md +93 -0
  4. package/bin/smrt-web.mjs +19 -0
  5. package/bin/smrt.js +18 -12
  6. package/dist/{ApiKey-BZmbOTnL-DchyhIPA.js → ApiKey-BZmbOTnL-DPPF6Swn.js} +2 -2
  7. package/dist/ApiKeyCollection-Bfb_nw81-B1-2YKj8.js +2 -0
  8. package/dist/AuditLogCollection-B1YonCAP-DP4PCCw-.js +2 -0
  9. package/dist/{NostrIdentity-n70E0vck-CLGPdJ1W.js → NostrIdentity-n70E0vck-D60BSg6H.js} +3 -3
  10. package/dist/NostrIdentityCollection-Ca74dkaL-C-v57o9N.js +2 -0
  11. package/dist/{OidcIdentity-Cb1bxreM-DPBTZddF.js → OidcIdentity-Cb1bxreM-B2eV2ahq.js} +2 -2
  12. package/dist/OidcIdentityCollection-TV8VdK69-BodvOtPJ.js +2 -0
  13. package/dist/ProfileAssetCollection-B9hacUJa-B7PLe0ld.js +2 -0
  14. package/dist/{ProfileCollection-DuJT7Mum-BUYQQ9xZ.js → ProfileCollection-DuJT7Mum-B3Uhqphs.js} +26 -26
  15. package/dist/ProfileLinkCollection-4uNURz32-CLY1cBnn.js +2 -0
  16. package/dist/{ProfileMetadataCollection-DQhbfEfa-BQTogfVX.js → ProfileMetadataCollection-DQhbfEfa-Bzv-E4ep.js} +1 -1
  17. package/dist/{ProfileMetafieldCollection-CoBuM_5G-BXtoIP02.js → ProfileMetafieldCollection-CoBuM_5G-D-VqQuY1.js} +1 -1
  18. package/dist/{ProfileRelationshipCollection-DUVgaIqf-CNMliUF3.js → ProfileRelationshipCollection-DUVgaIqf-gEkDBmkh.js} +1 -1
  19. package/dist/{ProfileRelationshipTermCollection-DtA9OM23-DPOMtMr7.js → ProfileRelationshipTermCollection-DtA9OM23-DI_awdol.js} +1 -1
  20. package/dist/{ProfileRelationshipType-BRiRka6t-xzRfZRFG.js → ProfileRelationshipType-BRiRka6t-Ci-qvFhm.js} +1 -1
  21. package/dist/{ProfileRelationshipTypeCollection-BdXwd7Kf-Co3PdH01.js → ProfileRelationshipTypeCollection-BdXwd7Kf-CaQMLH9f.js} +1 -1
  22. package/dist/app/cli.d.ts +44 -0
  23. package/dist/app/cli.d.ts.map +1 -0
  24. package/dist/app/errors.d.ts +22 -0
  25. package/dist/app/errors.d.ts.map +1 -0
  26. package/dist/app/identity.d.ts +24 -0
  27. package/dist/app/identity.d.ts.map +1 -0
  28. package/dist/app/index.d.ts +19 -0
  29. package/dist/app/index.d.ts.map +1 -0
  30. package/dist/app/launchers.d.ts +40 -0
  31. package/dist/app/launchers.d.ts.map +1 -0
  32. package/dist/app/operations.d.ts +28 -0
  33. package/dist/app/operations.d.ts.map +1 -0
  34. package/dist/app/portability-assets.d.ts +151 -0
  35. package/dist/app/portability-assets.d.ts.map +1 -0
  36. package/dist/app/portability.d.ts +117 -0
  37. package/dist/app/portability.d.ts.map +1 -0
  38. package/dist/app/process-record.d.ts +54 -0
  39. package/dist/app/process-record.d.ts.map +1 -0
  40. package/dist/app/runtime.d.ts +83 -0
  41. package/dist/app/runtime.d.ts.map +1 -0
  42. package/dist/app.d.ts +1 -0
  43. package/dist/app.js +4 -0
  44. package/dist/cli-BRFsobey.js +1275 -0
  45. package/dist/cli-generator.d.ts.map +1 -1
  46. package/dist/commands/utilities.d.ts.map +1 -1
  47. package/dist/{commands-B8N38deG.js → commands-dFz1e9A6.js} +17 -288
  48. package/dist/{dist-BBQyIRsO.js → dist-Berwe80z.js} +4 -4
  49. package/dist/{dist-CL9KGm1j.js → dist-C2BqYVu7.js} +27 -27
  50. package/dist/{dist-C8BOgli4.js → dist-D4BNILLN.js} +3 -3
  51. package/dist/{dist-B62O-xH6.js → dist-EJ63xUEp.js} +2 -2
  52. package/dist/index.js +14 -9
  53. package/dist/mcp-apps-packaging-CixRnxz_.js +286 -0
  54. package/dist/{oidcProvisioningPrimitives-D9OYu5-F-l8afZs4F.js → oidcProvisioningPrimitives-D9OYu5-F-B-kYsBTM.js} +4 -4
  55. package/dist/portability-DmQWSSXA.js +859 -0
  56. package/dist/resolveIdentity-B-PK6RwU-BmAU1Kse.js +2 -0
  57. package/package.json +14 -9
  58. package/dist/ApiKeyCollection-Bfb_nw81-DR5XF_SZ.js +0 -2
  59. package/dist/AuditLogCollection-B1YonCAP-PbzALncL.js +0 -2
  60. package/dist/NostrIdentityCollection-Ca74dkaL-C2r-uDlC.js +0 -2
  61. package/dist/OidcIdentityCollection-TV8VdK69-2fZROnih.js +0 -2
  62. package/dist/ProfileAssetCollection-B9hacUJa-D33sifgF.js +0 -2
  63. package/dist/ProfileLinkCollection-4uNURz32-CHDTinax.js +0 -2
  64. package/dist/resolveIdentity-B-PK6RwU-B306Ch1I.js +0 -2
@@ -246,7 +246,7 @@ async function queryWithGlobals(collection, tenantId, label) {
246
246
  createLogger({ level: "info" });
247
247
  //#endregion
248
248
  //#region ../tenancy/dist/index.js
249
- ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-tenancy\",\"packageVersion\":\"0.53.3\",\"objects\":{\"@happyvertical/smrt-tenancy:BillingRelationship\":{\"name\":\"billingrelationship\",\"className\":\"BillingRelationship\",\"qualifiedName\":\"@happyvertical/smrt-tenancy:BillingRelationship\",\"collection\":\"billingrelationships\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts\",\"packageName\":\"@happyvertical/smrt-tenancy\",\"fields\":{\"childTenantId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-users:Tenant\",\"_meta\":{\"required\":true}},\"resellerTenantId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-users:Tenant\",\"_meta\":{\"required\":true}},\"billingOwnerMode\":{\"type\":\"text\",\"required\":false,\"default\":\"self\"}},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"_smrt_billing_relationships\",\"conflictColumns\":[\"child_tenant_id\"],\"api\":false,\"cli\":false,\"mcp\":false},\"extends\":\"SmrtObject\",\"exportName\":\"BillingRelationship\",\"collectionExportName\":\"BillingRelationshipCollection\",\"validationRules\":[{\"field\":\"childTenantId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"resellerTenantId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"}],\"schema\":{\"tableName\":\"_smrt_billing_relationships\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_billing_relationships\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"child_tenant_id\\\" UUID NOT NULL,\\n \\\"reseller_tenant_id\\\" UUID NOT NULL,\\n \\\"billing_owner_mode\\\" TEXT DEFAULT 'self'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"child_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"reseller_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"billing_owner_mode\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"self\"}},\"indexes\":[{\"name\":\"_smrt_billing_relationships_child_tenant_id_idx\",\"columns\":[\"child_tenant_id\"],\"unique\":true},{\"name\":\"_smrt_billing_relationships_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_billing_relationships_created_at_idx\",\"columns\":[\"created_at\"]},{\"name\":\"_smrt_billing_relationships_reseller_tenant_id_idx\",\"columns\":[\"reseller_tenant_id\"]}],\"version\":\"4d7f410a\"},\"importPath\":\"@happyvertical/smrt-tenancy\"},\"@happyvertical/smrt-tenancy:BillingRelationshipCollection\":{\"name\":\"billingrelationshipcollection\",\"className\":\"BillingRelationshipCollection\",\"qualifiedName\":\"@happyvertical/smrt-tenancy:BillingRelationshipCollection\",\"collection\":\"billingrelationships\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts\",\"packageName\":\"@happyvertical/smrt-tenancy\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"_smrt_billing_relationships\",\"api\":false,\"mcp\":false,\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"BillingRelationship\",\"exportName\":\"BillingRelationshipCollection\",\"collectionExportName\":\"BillingRelationshipCollectionCollection\",\"schema\":{\"tableName\":\"_smrt_billing_relationships\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_billing_relationships\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"child_tenant_id\\\" UUID NOT NULL,\\n \\\"reseller_tenant_id\\\" UUID NOT NULL,\\n \\\"billing_owner_mode\\\" TEXT DEFAULT 'self'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"child_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"reseller_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"billing_owner_mode\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"self\"}},\"indexes\":[{\"name\":\"_smrt_billing_relationships_child_tenant_id_idx\",\"columns\":[\"child_tenant_id\"],\"unique\":true},{\"name\":\"_smrt_billing_relationships_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_billing_relationships_created_at_idx\",\"columns\":[\"created_at\"]},{\"name\":\"_smrt_billing_relationships_reseller_tenant_id_idx\",\"columns\":[\"reseller_tenant_id\"]}],\"version\":\"4d7f410a\"},\"importPath\":\"@happyvertical/smrt-tenancy\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\"]}"));
249
+ ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-tenancy\",\"packageVersion\":\"0.53.4\",\"objects\":{\"@happyvertical/smrt-tenancy:BillingRelationship\":{\"name\":\"billingrelationship\",\"className\":\"BillingRelationship\",\"qualifiedName\":\"@happyvertical/smrt-tenancy:BillingRelationship\",\"collection\":\"billingrelationships\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts\",\"packageName\":\"@happyvertical/smrt-tenancy\",\"fields\":{\"childTenantId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-users:Tenant\",\"_meta\":{\"required\":true}},\"resellerTenantId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-users:Tenant\",\"_meta\":{\"required\":true}},\"billingOwnerMode\":{\"type\":\"text\",\"required\":false,\"default\":\"self\"}},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"_smrt_billing_relationships\",\"conflictColumns\":[\"child_tenant_id\"],\"api\":false,\"cli\":false,\"mcp\":false},\"extends\":\"SmrtObject\",\"exportName\":\"BillingRelationship\",\"collectionExportName\":\"BillingRelationshipCollection\",\"validationRules\":[{\"field\":\"childTenantId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"resellerTenantId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"}],\"schema\":{\"tableName\":\"_smrt_billing_relationships\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_billing_relationships\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"child_tenant_id\\\" UUID NOT NULL,\\n \\\"reseller_tenant_id\\\" UUID NOT NULL,\\n \\\"billing_owner_mode\\\" TEXT DEFAULT 'self'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"child_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"reseller_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"billing_owner_mode\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"self\"}},\"indexes\":[{\"name\":\"_smrt_billing_relationships_child_tenant_id_idx\",\"columns\":[\"child_tenant_id\"],\"unique\":true},{\"name\":\"_smrt_billing_relationships_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_billing_relationships_created_at_idx\",\"columns\":[\"created_at\"]},{\"name\":\"_smrt_billing_relationships_reseller_tenant_id_idx\",\"columns\":[\"reseller_tenant_id\"]}],\"version\":\"4d7f410a\"},\"importPath\":\"@happyvertical/smrt-tenancy\"},\"@happyvertical/smrt-tenancy:BillingRelationshipCollection\":{\"name\":\"billingrelationshipcollection\",\"className\":\"BillingRelationshipCollection\",\"qualifiedName\":\"@happyvertical/smrt-tenancy:BillingRelationshipCollection\",\"collection\":\"billingrelationships\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tenancy/src/billing-relationship.ts\",\"packageName\":\"@happyvertical/smrt-tenancy\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"tableName\":\"_smrt_billing_relationships\",\"api\":false,\"mcp\":false,\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"BillingRelationship\",\"exportName\":\"BillingRelationshipCollection\",\"collectionExportName\":\"BillingRelationshipCollectionCollection\",\"schema\":{\"tableName\":\"_smrt_billing_relationships\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_billing_relationships\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"child_tenant_id\\\" UUID NOT NULL,\\n \\\"reseller_tenant_id\\\" UUID NOT NULL,\\n \\\"billing_owner_mode\\\" TEXT DEFAULT 'self'\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"child_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"reseller_tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"billing_owner_mode\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false,\"default\":\"self\"}},\"indexes\":[{\"name\":\"_smrt_billing_relationships_child_tenant_id_idx\",\"columns\":[\"child_tenant_id\"],\"unique\":true},{\"name\":\"_smrt_billing_relationships_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_billing_relationships_created_at_idx\",\"columns\":[\"created_at\"]},{\"name\":\"_smrt_billing_relationships_reseller_tenant_id_idx\",\"columns\":[\"reseller_tenant_id\"]}],\"version\":\"4d7f410a\"},\"importPath\":\"@happyvertical/smrt-tenancy\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\"]}"));
250
250
  var __defProp$2 = Object.defineProperty;
251
251
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
252
252
  var __decorateClass$1 = (decorators, target, key, kind) => {
@@ -353,7 +353,7 @@ var __exportAll = (all, no_symbols) => {
353
353
  if (!no_symbols) __defProp$1(target, Symbol.toStringTag, { value: "Module" });
354
354
  return target;
355
355
  };
356
- ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-prompts\",\"packageVersion\":\"0.53.3\",\"objects\":{\"@happyvertical/smrt-prompts:PromptOverrideCollection\":{\"name\":\"promptoverridecollection\",\"className\":\"PromptOverrideCollection\",\"qualifiedName\":\"@happyvertical/smrt-prompts:PromptOverrideCollection\",\"collection\":\"promptoverrides\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/prompts/src/collections/PromptOverrideCollection.ts\",\"packageName\":\"@happyvertical/smrt-prompts\",\"fields\":{},\"methods\":{\"getAppOverride\":{\"name\":\"getAppOverride\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<PromptOverride | null>\",\"isStatic\":false,\"isPublic\":true},\"getTenantOverride\":{\"name\":\"getTenantOverride\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<PromptOverride | null>\",\"isStatic\":false,\"isPublic\":true},\"getResolutionLayers\":{\"name\":\"getResolutionLayers\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string | null\",\"optional\":true,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<object>\",\"isStatic\":false,\"isPublic\":true},\"getOverrideMapForKeys\":{\"name\":\"getOverrideMapForKeys\",\"async\":true,\"parameters\":[{\"name\":\"keys\",\"type\":\"string[]\",\"optional\":false},{\"name\":\"scopeType\",\"type\":\"PromptOverrideScopeType\",\"optional\":false},{\"name\":\"scopeId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Map<string, PromptOverride>>\",\"isStatic\":false,\"isPublic\":true},\"findByScope\":{\"name\":\"findByScope\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"scopeType\",\"type\":\"PromptOverrideScopeType\",\"optional\":false},{\"name\":\"scopeId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<PromptOverride | null>\",\"isStatic\":false,\"isPublic\":true},\"setTemplateOverride\":{\"name\":\"setTemplateOverride\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"scopeType\",\"type\":\"PromptOverrideScopeType\",\"optional\":false},{\"name\":\"scopeId\",\"type\":\"string\",\"optional\":false},{\"name\":\"template\",\"type\":\"string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<PromptOverride>\",\"isStatic\":false,\"isPublic\":true},\"removeOverride\":{\"name\":\"removeOverride\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"scopeType\",\"type\":\"PromptOverrideScopeType\",\"optional\":false},{\"name\":\"scopeId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"_smrt_prompt_overrides\",\"api\":false,\"mcp\":false,\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"PromptOverride\",\"exportName\":\"PromptOverrideCollection\",\"collectionExportName\":\"PromptOverrideCollectionCollection\",\"schema\":{\"tableName\":\"_smrt_prompt_overrides\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_prompt_overrides\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"key\\\" TEXT NOT NULL DEFAULT '',\\n \\\"tenant_id\\\" UUID,\\n \\\"template\\\" TEXT,\\n \\\"profile\\\" TEXT,\\n \\\"model\\\" TEXT,\\n \\\"params\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"key\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"tenant_id\":{\"type\":\"UUID\",\"notNull\":false,\"unique\":false},\"template\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"profile\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"model\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"params\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"_smrt_prompt_overrides_key_context_idx\",\"columns\":[\"key\",\"context\"],\"unique\":true},{\"name\":\"_smrt_prompt_overrides_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_prompt_overrides_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"38f505e7\"},\"importPath\":\"@happyvertical/smrt-prompts\"},\"@happyvertical/smrt-prompts:PromptOverride\":{\"name\":\"promptoverride\",\"className\":\"PromptOverride\",\"qualifiedName\":\"@happyvertical/smrt-prompts:PromptOverride\",\"collection\":\"promptoverrides\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/prompts/src/models/PromptOverride.ts\",\"packageName\":\"@happyvertical/smrt-prompts\",\"fields\":{\"key\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true}},\"template\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"profile\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"model\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"params\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}}},\"methods\":{\"getParams\":{\"name\":\"getParams\",\"async\":false,\"parameters\":[],\"returnType\":\"PromptParams\",\"isStatic\":false,\"isPublic\":true},\"setParams\":{\"name\":\"setParams\",\"async\":false,\"parameters\":[{\"name\":\"params\",\"type\":\"PromptParams | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"PromptParams\"},{\"type\":\"null\"}]}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"toPromptLayer\":{\"name\":\"toPromptLayer\",\"async\":false,\"parameters\":[],\"returnType\":\"PromptLayer\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"_smrt_prompt_overrides\",\"conflictColumns\":[\"key\",\"context\"],\"api\":false,\"cli\":false,\"mcp\":false},\"extends\":\"SmrtObject\",\"exportName\":\"PromptOverride\",\"collectionExportName\":\"PromptOverrideCollection\",\"validationRules\":[{\"field\":\"key\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"_smrt_prompt_overrides\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_prompt_overrides\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"key\\\" TEXT NOT NULL DEFAULT '',\\n \\\"tenant_id\\\" UUID,\\n \\\"template\\\" TEXT,\\n \\\"profile\\\" TEXT,\\n \\\"model\\\" TEXT,\\n \\\"params\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"key\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"tenant_id\":{\"type\":\"UUID\",\"notNull\":false,\"unique\":false},\"template\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"profile\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"model\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"params\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"_smrt_prompt_overrides_key_context_idx\",\"columns\":[\"key\",\"context\"],\"unique\":true},{\"name\":\"_smrt_prompt_overrides_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_prompt_overrides_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"38f505e7\"},\"importPath\":\"@happyvertical/smrt-prompts\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
356
+ ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-prompts\",\"packageVersion\":\"0.53.4\",\"objects\":{\"@happyvertical/smrt-prompts:PromptOverrideCollection\":{\"name\":\"promptoverridecollection\",\"className\":\"PromptOverrideCollection\",\"qualifiedName\":\"@happyvertical/smrt-prompts:PromptOverrideCollection\",\"collection\":\"promptoverrides\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/prompts/src/collections/PromptOverrideCollection.ts\",\"packageName\":\"@happyvertical/smrt-prompts\",\"fields\":{},\"methods\":{\"getAppOverride\":{\"name\":\"getAppOverride\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<PromptOverride | null>\",\"isStatic\":false,\"isPublic\":true},\"getTenantOverride\":{\"name\":\"getTenantOverride\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<PromptOverride | null>\",\"isStatic\":false,\"isPublic\":true},\"getResolutionLayers\":{\"name\":\"getResolutionLayers\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"tenantId\",\"type\":\"string | null\",\"optional\":true,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<object>\",\"isStatic\":false,\"isPublic\":true},\"getOverrideMapForKeys\":{\"name\":\"getOverrideMapForKeys\",\"async\":true,\"parameters\":[{\"name\":\"keys\",\"type\":\"string[]\",\"optional\":false},{\"name\":\"scopeType\",\"type\":\"PromptOverrideScopeType\",\"optional\":false},{\"name\":\"scopeId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Map<string, PromptOverride>>\",\"isStatic\":false,\"isPublic\":true},\"findByScope\":{\"name\":\"findByScope\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"scopeType\",\"type\":\"PromptOverrideScopeType\",\"optional\":false},{\"name\":\"scopeId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<PromptOverride | null>\",\"isStatic\":false,\"isPublic\":true},\"setTemplateOverride\":{\"name\":\"setTemplateOverride\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"scopeType\",\"type\":\"PromptOverrideScopeType\",\"optional\":false},{\"name\":\"scopeId\",\"type\":\"string\",\"optional\":false},{\"name\":\"template\",\"type\":\"string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<PromptOverride>\",\"isStatic\":false,\"isPublic\":true},\"removeOverride\":{\"name\":\"removeOverride\",\"async\":true,\"parameters\":[{\"name\":\"key\",\"type\":\"string\",\"optional\":false},{\"name\":\"scopeType\",\"type\":\"PromptOverrideScopeType\",\"optional\":false},{\"name\":\"scopeId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"_smrt_prompt_overrides\",\"api\":false,\"mcp\":false,\"cli\":false},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"PromptOverride\",\"exportName\":\"PromptOverrideCollection\",\"collectionExportName\":\"PromptOverrideCollectionCollection\",\"schema\":{\"tableName\":\"_smrt_prompt_overrides\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_prompt_overrides\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"key\\\" TEXT NOT NULL DEFAULT '',\\n \\\"tenant_id\\\" UUID,\\n \\\"template\\\" TEXT,\\n \\\"profile\\\" TEXT,\\n \\\"model\\\" TEXT,\\n \\\"params\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"key\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"tenant_id\":{\"type\":\"UUID\",\"notNull\":false,\"unique\":false},\"template\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"profile\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"model\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"params\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"_smrt_prompt_overrides_key_context_idx\",\"columns\":[\"key\",\"context\"],\"unique\":true},{\"name\":\"_smrt_prompt_overrides_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_prompt_overrides_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"38f505e7\"},\"importPath\":\"@happyvertical/smrt-prompts\"},\"@happyvertical/smrt-prompts:PromptOverride\":{\"name\":\"promptoverride\",\"className\":\"PromptOverride\",\"qualifiedName\":\"@happyvertical/smrt-prompts:PromptOverride\",\"collection\":\"promptoverrides\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/prompts/src/models/PromptOverride.ts\",\"packageName\":\"@happyvertical/smrt-prompts\",\"fields\":{\"key\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true}},\"template\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"profile\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"model\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"params\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}}},\"methods\":{\"getParams\":{\"name\":\"getParams\",\"async\":false,\"parameters\":[],\"returnType\":\"PromptParams\",\"isStatic\":false,\"isPublic\":true},\"setParams\":{\"name\":\"setParams\",\"async\":false,\"parameters\":[{\"name\":\"params\",\"type\":\"PromptParams | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"PromptParams\"},{\"type\":\"null\"}]}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"toPromptLayer\":{\"name\":\"toPromptLayer\",\"async\":false,\"parameters\":[],\"returnType\":\"PromptLayer\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"_smrt_prompt_overrides\",\"conflictColumns\":[\"key\",\"context\"],\"api\":false,\"cli\":false,\"mcp\":false},\"extends\":\"SmrtObject\",\"exportName\":\"PromptOverride\",\"collectionExportName\":\"PromptOverrideCollection\",\"validationRules\":[{\"field\":\"key\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"_smrt_prompt_overrides\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"_smrt_prompt_overrides\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"key\\\" TEXT NOT NULL DEFAULT '',\\n \\\"tenant_id\\\" UUID,\\n \\\"template\\\" TEXT,\\n \\\"profile\\\" TEXT,\\n \\\"model\\\" TEXT,\\n \\\"params\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"key\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false,\"default\":\"\"},\"tenant_id\":{\"type\":\"UUID\",\"notNull\":false,\"unique\":false},\"template\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"profile\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"model\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"params\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"_smrt_prompt_overrides_key_context_idx\",\"columns\":[\"key\",\"context\"],\"unique\":true},{\"name\":\"_smrt_prompt_overrides_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"_smrt_prompt_overrides_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"38f505e7\"},\"importPath\":\"@happyvertical/smrt-prompts\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
357
357
  var PROMPT_CACHE_TTL_MS = 3e4;
358
358
  var promptCache = /* @__PURE__ */ new Map();
359
359
  var cacheGenerations = /* @__PURE__ */ new Map();
package/dist/index.js CHANGED
@@ -49,63 +49,63 @@ var _playgroundCommands = null;
49
49
  var _workbenchCommands = null;
50
50
  async function getGnodeCommands() {
51
51
  if (!_gnodeCommands) {
52
- const { gnodeCommands } = await import("./commands-B8N38deG.js");
52
+ const { gnodeCommands } = await import("./commands-dFz1e9A6.js");
53
53
  _gnodeCommands = gnodeCommands;
54
54
  }
55
55
  return _gnodeCommands;
56
56
  }
57
57
  async function getGitCommands() {
58
58
  if (!_gitCommands) {
59
- const { gitCommands } = await import("./commands-B8N38deG.js");
59
+ const { gitCommands } = await import("./commands-dFz1e9A6.js");
60
60
  _gitCommands = gitCommands;
61
61
  }
62
62
  return _gitCommands;
63
63
  }
64
64
  async function getGenerateCommands() {
65
65
  if (!_generateCommands) {
66
- const { generateCommands } = await import("./commands-B8N38deG.js");
66
+ const { generateCommands } = await import("./commands-dFz1e9A6.js");
67
67
  _generateCommands = generateCommands;
68
68
  }
69
69
  return _generateCommands;
70
70
  }
71
71
  async function getInitCommands() {
72
72
  if (!_initCommands) {
73
- const { initCommands } = await import("./commands-B8N38deG.js");
73
+ const { initCommands } = await import("./commands-dFz1e9A6.js");
74
74
  _initCommands = initCommands;
75
75
  }
76
76
  return _initCommands;
77
77
  }
78
78
  async function getUtilityCommands() {
79
79
  if (!_utilityCommands) {
80
- const { utilityCommands } = await import("./commands-B8N38deG.js");
80
+ const { utilityCommands } = await import("./commands-dFz1e9A6.js");
81
81
  _utilityCommands = utilityCommands;
82
82
  }
83
83
  return _utilityCommands;
84
84
  }
85
85
  async function getDispatchCommands() {
86
86
  if (!_dispatchCommands) {
87
- const { dispatchCommands } = await import("./commands-B8N38deG.js");
87
+ const { dispatchCommands } = await import("./commands-dFz1e9A6.js");
88
88
  _dispatchCommands = dispatchCommands;
89
89
  }
90
90
  return _dispatchCommands;
91
91
  }
92
92
  async function getDocsCommands() {
93
93
  if (!_docsCommands) {
94
- const { docsCommands } = await import("./commands-B8N38deG.js");
94
+ const { docsCommands } = await import("./commands-dFz1e9A6.js");
95
95
  _docsCommands = docsCommands;
96
96
  }
97
97
  return _docsCommands;
98
98
  }
99
99
  async function getPlaygroundCommands() {
100
100
  if (!_playgroundCommands) {
101
- const { playgroundCommands } = await import("./commands-B8N38deG.js");
101
+ const { playgroundCommands } = await import("./commands-dFz1e9A6.js");
102
102
  _playgroundCommands = playgroundCommands;
103
103
  }
104
104
  return _playgroundCommands;
105
105
  }
106
106
  async function getWorkbenchCommands() {
107
107
  if (!_workbenchCommands) {
108
- const { workbenchCommands } = await import("./commands-B8N38deG.js");
108
+ const { workbenchCommands } = await import("./commands-dFz1e9A6.js");
109
109
  _workbenchCommands = workbenchCommands;
110
110
  }
111
111
  return _workbenchCommands;
@@ -1565,6 +1565,11 @@ var CLIGenerator = class {
1565
1565
  };
1566
1566
  async function main() {
1567
1567
  const args = process.argv.slice(2);
1568
+ if (args[0] === "app") {
1569
+ const { runAppCommand } = await import("./cli-BRFsobey.js").then((n) => n.r);
1570
+ process.exitCode = await runAppCommand(args.slice(1));
1571
+ return;
1572
+ }
1568
1573
  const timingEnabled = args.includes("--timing");
1569
1574
  const timing = {};
1570
1575
  const startTime = timingEnabled ? performance.now() : 0;
@@ -0,0 +1,286 @@
1
+ import { createRequire } from "node:module";
2
+ import { cpSync, lstatSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
3
+ import { dirname, join, relative, resolve, sep } from "node:path";
4
+ import Ajv2020 from "ajv/dist/2020.js";
5
+ //#region src/commands/mcp-apps-packaging.ts
6
+ /**
7
+ * Portable MCP Apps plugin packaging helpers.
8
+ *
9
+ * These helpers intentionally validate distribution metadata only. Runtime
10
+ * MCP extension metadata is owned by the v2 server adapter and is not an
11
+ * install-plugin manifest.
12
+ */
13
+ var requireSchema = createRequire(import.meta.url);
14
+ var pluginSchema = requireSchema("@happyvertical/smrt-dev-mcp/schemas/agent-plugins-1.0.0/plugin.schema.json");
15
+ var mcpSchema = requireSchema("@happyvertical/smrt-dev-mcp/schemas/agent-plugins-1.0.0/mcp.schema.json");
16
+ var ajv = new Ajv2020({
17
+ strict: true,
18
+ allErrors: true
19
+ });
20
+ var validatePluginSchema = ajv.compile(pluginSchema);
21
+ var validateMcpSchema = ajv.compile(mcpSchema);
22
+ var PLUGIN_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
23
+ var MCP_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json";
24
+ var CANONICAL_SCOPE_REGISTRY = "@happyvertical:registry=https://npm.happyvertical.com/";
25
+ var SECRET_KEY = /(?:api[_-]?key|secret|token|password|authorization|credential)/i;
26
+ var ENVIRONMENT_CREDENTIAL_FILE = /^\.env(?:\.|$)/;
27
+ var PRIVATE_KEY_CARRIER = /^(?:id_(?:rsa|dsa|ecdsa|ed25519)|private(?:[._-]key)?|.*\.key)$/i;
28
+ var PRIVATE_KEY_HEADER = /-----BEGIN(?: [A-Z0-9]+)* PRIVATE KEY-----/;
29
+ function add(result, code, message) {
30
+ result.findings.push({
31
+ code,
32
+ message
33
+ });
34
+ }
35
+ function readJson(path, result) {
36
+ try {
37
+ return JSON.parse(readFileSync(path, "utf8"));
38
+ } catch (error) {
39
+ add(result, "json-malformed", `${relative(process.cwd(), path)} is not valid JSON`);
40
+ return;
41
+ }
42
+ }
43
+ function isObject(value) {
44
+ return typeof value === "object" && value !== null && !Array.isArray(value);
45
+ }
46
+ function safeRelativePath(value, field, root, result) {
47
+ if (typeof value !== "string" || !value.startsWith("./") || value.includes("\\") || value.split("/").includes("..")) {
48
+ add(result, "unsafe-path", `${field} must be a root-relative ./ path without parent segments`);
49
+ return;
50
+ }
51
+ const target = resolve(root, value);
52
+ if (!target.startsWith(`${root}${sep}`)) {
53
+ add(result, "unsafe-path", `${field} resolves outside the plugin root`);
54
+ return;
55
+ }
56
+ try {
57
+ const stat = lstatSync(target);
58
+ if (stat.isSymbolicLink() || !stat.isFile()) add(result, "invalid-resource", `${field} must name a regular file`);
59
+ } catch {
60
+ add(result, "missing-resource", `${field} does not exist`);
61
+ }
62
+ }
63
+ function scanTree(root, current, result) {
64
+ for (const entry of readdirSync(current, { withFileTypes: true })) {
65
+ const path = join(current, entry.name);
66
+ const display = relative(root, path);
67
+ const stat = lstatSync(path);
68
+ if (stat.isSymbolicLink()) add(result, "symlink", `${display} is a symbolic link; plugin packages must contain regular files`);
69
+ else if (stat.isDirectory()) scanTree(root, path, result);
70
+ else if (stat.isFile()) if (ENVIRONMENT_CREDENTIAL_FILE.test(entry.name) || PRIVATE_KEY_CARRIER.test(entry.name)) add(result, "secret-artifact", `${display} is a credential carrier and cannot be packaged`);
71
+ else try {
72
+ if (PRIVATE_KEY_HEADER.test(readFileSync(path, "utf8"))) add(result, "secret-artifact", `${display} contains a private key and cannot be packaged`);
73
+ } catch {
74
+ add(result, "artifact-unreadable", `${display} could not be inspected and cannot be packaged`);
75
+ }
76
+ }
77
+ }
78
+ function scanSecrets(value, source, result) {
79
+ if (Array.isArray(value)) {
80
+ value.forEach((item) => {
81
+ scanSecrets(item, source, result);
82
+ });
83
+ return;
84
+ }
85
+ if (!isObject(value)) return;
86
+ for (const [key, child] of Object.entries(value)) {
87
+ if (SECRET_KEY.test(key) && typeof child === "string" && child.trim()) add(result, "secret-artifact", `${source} contains a credential-shaped ${key} field`);
88
+ scanSecrets(child, source, result);
89
+ }
90
+ }
91
+ function validateServerUrl(value, name, result) {
92
+ if (typeof value !== "string") return add(result, "server-url", `mcpServers.${name}.url must be a string`);
93
+ try {
94
+ const url = new URL(value);
95
+ const isLoopback = url.hostname === "127.0.0.1" || url.hostname === "localhost" || url.hostname === "[::1]";
96
+ if (url.username || url.password) add(result, "server-url", `mcpServers.${name}.url must not contain credentials`);
97
+ if (url.protocol !== "https:" && !(url.protocol === "http:" && isLoopback)) add(result, "server-url", `mcpServers.${name}.url must use HTTPS, except loopback development URLs`);
98
+ } catch {
99
+ add(result, "server-url", `mcpServers.${name}.url is not a URL`);
100
+ }
101
+ }
102
+ /** Validate portable plugin files and the optional OpenAI install extension. */
103
+ function validateMcpAppsPackage(rootPath) {
104
+ const root = resolve(rootPath);
105
+ const result = {
106
+ findings: [],
107
+ valid: false
108
+ };
109
+ try {
110
+ scanTree(root, root, result);
111
+ } catch {
112
+ add(result, "plugin-root", "Plugin root must be a readable directory");
113
+ return result;
114
+ }
115
+ const pluginPath = join(root, "plugin.json");
116
+ const mcpPath = join(root, "mcp.json");
117
+ if (!lstatExists(pluginPath)) add(result, "plugin-missing", "plugin.json is required at the plugin root");
118
+ if (!lstatExists(mcpPath)) add(result, "mcp-missing", "mcp.json is required at the plugin root");
119
+ const plugin = lstatExists(pluginPath) ? readJson(pluginPath, result) : void 0;
120
+ const mcp = lstatExists(mcpPath) ? readJson(mcpPath, result) : void 0;
121
+ if (plugin !== void 0 && !isObject(plugin)) add(result, "plugin-object", "plugin.json must contain an object");
122
+ if (mcp !== void 0 && !isObject(mcp)) add(result, "mcp-object", "mcp.json must contain an object");
123
+ if (plugin !== void 0 && !validatePluginSchema(plugin)) add(result, "plugin-format", "plugin.json violates the pinned Agent Plugins 1.0.0 schema");
124
+ if (mcp !== void 0 && !validateMcpSchema(mcp)) add(result, "mcp-format", "mcp.json violates the pinned Agent Plugins 1.0.0 schema");
125
+ if (isObject(plugin)) {
126
+ scanSecrets(plugin, "plugin.json", result);
127
+ if (plugin.$schema !== PLUGIN_SCHEMA) add(result, "plugin-schema", `plugin.json.$schema must be ${PLUGIN_SCHEMA}`);
128
+ if (plugin.extensions !== void 0 && !isObject(plugin.extensions)) add(result, "extensions", "plugin.json.extensions must be an object");
129
+ const openai = (isObject(plugin.extensions) ? plugin.extensions : void 0)?.["com.openai"];
130
+ if (openai !== void 0 && !isObject(openai)) add(result, "openai-extension", "extensions.com.openai must be an object");
131
+ if (isObject(openai)) {
132
+ if (openai.apps !== void 0) safeRelativePath(openai.apps, "extensions.com.openai.apps", root, result);
133
+ const ui = openai.interface;
134
+ if (ui !== void 0 && !isObject(ui)) add(result, "openai-interface", "extensions.com.openai.interface must be an object");
135
+ if (isObject(ui)) {
136
+ for (const key of ["composerIcon", "logo"]) if (ui[key] !== void 0) safeRelativePath(ui[key], `extensions.com.openai.interface.${key}`, root, result);
137
+ if (ui.screenshots !== void 0) if (!Array.isArray(ui.screenshots) || ui.screenshots.some((path) => typeof path !== "string")) add(result, "openai-screenshots", "interface.screenshots must be an array of paths");
138
+ else ui.screenshots.forEach((path, index) => {
139
+ safeRelativePath(path, `extensions.com.openai.interface.screenshots[${index}]`, root, result);
140
+ });
141
+ }
142
+ }
143
+ }
144
+ if (isObject(mcp)) {
145
+ scanSecrets(mcp, "mcp.json", result);
146
+ if (mcp.$schema !== MCP_SCHEMA) add(result, "mcp-schema", `mcp.json.$schema must be ${MCP_SCHEMA}`);
147
+ if (!isObject(mcp.mcpServers) || Object.keys(mcp.mcpServers).length === 0) add(result, "mcp-servers", "mcp.json requires a non-empty mcpServers object");
148
+ else for (const [name, server] of Object.entries(mcp.mcpServers)) {
149
+ if (!name.trim() || !isObject(server)) {
150
+ add(result, "mcp-server", `mcpServers.${name || "<empty>"} must be an object with a name`);
151
+ continue;
152
+ }
153
+ if (server.type !== "streamable-http") add(result, "mcp-transport", `mcpServers.${name}.type must be streamable-http`);
154
+ validateServerUrl(server.url, name, result);
155
+ }
156
+ }
157
+ result.valid = result.findings.length === 0;
158
+ return result;
159
+ }
160
+ function lstatExists(path) {
161
+ try {
162
+ return lstatSync(path).isFile();
163
+ } catch {
164
+ return false;
165
+ }
166
+ }
167
+ /**
168
+ * Add the public, credential-free SMRT package route to a generated app.
169
+ * A pre-existing scope route is an explicit consumer decision and must not be
170
+ * silently replaced.
171
+ */
172
+ function configureMcpAppsConsumerRegistry(appRoot) {
173
+ const npmrcPath = join(resolve(appRoot), ".npmrc");
174
+ let existing = "";
175
+ try {
176
+ const stat = lstatSync(npmrcPath);
177
+ if (stat.isSymbolicLink() || !stat.isFile()) throw new Error("Generated application .npmrc must be a regular file");
178
+ existing = readFileSync(npmrcPath, "utf8");
179
+ } catch (error) {
180
+ if (error.code !== "ENOENT") throw error;
181
+ }
182
+ const scopeLines = existing.split(/\r?\n/).filter((line) => /^\s*@happyvertical:registry(?:\s|=|$)/.test(line));
183
+ if (scopeLines.length > 0) {
184
+ for (const line of scopeLines) {
185
+ const match = /^\s*@happyvertical:registry\s*=\s*(\S+?)(?:\s+[;#].*)?\s*$/.exec(line);
186
+ if (!match || match[1] !== "https://npm.happyvertical.com/") throw new Error("Generated application already declares a different or malformed @happyvertical registry; refusing to replace it");
187
+ }
188
+ return;
189
+ }
190
+ writeFileSync(npmrcPath, `${existing}${existing && !existing.endsWith("\n") ? "\n" : ""}${CANONICAL_SCOPE_REGISTRY}\n`);
191
+ }
192
+ /** Copy the opt-in app route/resources and merge only its declared dependencies. */
193
+ function addMcpAppsRuntime(sourceRoot, appRoot) {
194
+ const resolvedSource = resolve(sourceRoot);
195
+ const source = join(lstatSync(resolvedSource).isFile() ? dirname(resolvedSource) : resolvedSource, "mcp-apps-template");
196
+ const dependencies = JSON.parse(readFileSync(join(source, "package.dependencies.json"), "utf8"));
197
+ cpSync(join(source, "src"), join(resolve(appRoot), "src"), {
198
+ recursive: true,
199
+ force: false,
200
+ errorOnExist: true
201
+ });
202
+ const packagePath = join(resolve(appRoot), "package.json");
203
+ const packageJson = JSON.parse(readFileSync(packagePath, "utf8"));
204
+ packageJson.dependencies = {
205
+ ...packageJson.dependencies,
206
+ ...dependencies
207
+ };
208
+ writeFileSync(packagePath, `${JSON.stringify(packageJson, null, 2)}\n`);
209
+ }
210
+ function assertMcpAppsPluginName(name) {
211
+ if (!validatePluginSchema({
212
+ $schema: PLUGIN_SCHEMA,
213
+ name
214
+ })) throw new Error("Plugin name must satisfy Agent Plugins 1.0.0 (1–64 lowercase letters, digits, dots or hyphens; no repeated separators).");
215
+ }
216
+ /** Create the minimal local portable package. It intentionally has no .app.json: registered IDs are host-owned. */
217
+ function scaffoldMcpAppsPackage(rootPath, name, version = "0.1.0") {
218
+ assertMcpAppsPluginName(name);
219
+ const root = resolve(rootPath);
220
+ mkdirSync(root, { recursive: true });
221
+ const pluginPath = join(root, "plugin.json");
222
+ const mcpPath = join(root, "mcp.json");
223
+ if (lstatExists(pluginPath) || lstatExists(mcpPath)) throw new Error("Refusing to overwrite existing MCP Apps package files");
224
+ writeFileSync(pluginPath, `${JSON.stringify({
225
+ $schema: PLUGIN_SCHEMA,
226
+ name,
227
+ version,
228
+ description: "SMRT MCP Apps package",
229
+ extensions: { "com.openai": { interface: {
230
+ displayName: name,
231
+ shortDescription: "SMRT MCP Apps package"
232
+ } } }
233
+ }, null, 2)}\n`);
234
+ writeFileSync(mcpPath, `${JSON.stringify({
235
+ $schema: MCP_SCHEMA,
236
+ mcpServers: { smrt: {
237
+ type: "streamable-http",
238
+ url: "http://127.0.0.1:3000/api/mcp"
239
+ } }
240
+ }, null, 2)}\n`);
241
+ }
242
+ var mcpAppsCommands = {
243
+ "mcp-apps scaffold": {
244
+ name: "mcp-apps scaffold",
245
+ description: "Create opt-in portable MCP Apps plugin metadata for a local SMRT app",
246
+ options: {
247
+ "output-dir": {
248
+ type: "string",
249
+ description: "Plugin directory (defaults to ./mcp-apps)"
250
+ },
251
+ name: {
252
+ type: "string",
253
+ description: "Portable plugin name",
254
+ default: "smrt-app"
255
+ },
256
+ version: {
257
+ type: "string",
258
+ description: "Portable plugin version",
259
+ default: "0.1.0"
260
+ }
261
+ },
262
+ handler: async (_args, options) => {
263
+ const root = typeof options["output-dir"] === "string" ? options["output-dir"] : "./mcp-apps";
264
+ scaffoldMcpAppsPackage(root, typeof options.name === "string" ? options.name : "smrt-app", typeof options.version === "string" ? options.version : "0.1.0");
265
+ console.log(`Created portable MCP Apps metadata in ${root}.`);
266
+ console.log("Mount and authorize the native v2 /api/mcp endpoint before changing the loopback URL.");
267
+ }
268
+ },
269
+ "mcp-apps validate": {
270
+ name: "mcp-apps validate",
271
+ description: "Fail closed when portable MCP Apps package metadata is unsafe or incomplete",
272
+ options: { "output-dir": {
273
+ type: "string",
274
+ description: "Plugin directory (defaults to ./mcp-apps)"
275
+ } },
276
+ handler: async (_args, options) => {
277
+ const root = typeof options["output-dir"] === "string" ? options["output-dir"] : "./mcp-apps";
278
+ const result = validateMcpAppsPackage(root);
279
+ for (const finding of result.findings) console.error(`${finding.code}: ${finding.message}`);
280
+ if (!result.valid) throw new Error(`MCP Apps package validation failed with ${result.findings.length} finding(s)`);
281
+ console.log(`MCP Apps package at ${root} is valid.`);
282
+ }
283
+ }
284
+ };
285
+ //#endregion
286
+ export { addMcpAppsRuntime, assertMcpAppsPluginName, configureMcpAppsConsumerRegistry, mcpAppsCommands, scaffoldMcpAppsPackage, validateMcpAppsPackage };
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { c as isSystemContext } from "./dist-B62O-xH6.js";
3
- import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-CLGPdJ1W.js";
4
- import { t as OidcIdentity } from "./OidcIdentity-Cb1bxreM-DPBTZddF.js";
5
- import { c as saveOidcRaceArbiter, i as ProfileType, n as ProfileCollection, t as Profile } from "./ProfileCollection-DuJT7Mum-BUYQQ9xZ.js";
2
+ import { c as isSystemContext } from "./dist-EJ63xUEp.js";
3
+ import { n as __exportAll$1 } from "./NostrIdentity-n70E0vck-D60BSg6H.js";
4
+ import { t as OidcIdentity } from "./OidcIdentity-Cb1bxreM-B2eV2ahq.js";
5
+ import { c as saveOidcRaceArbiter, i as ProfileType, n as ProfileCollection, t as Profile } from "./ProfileCollection-DuJT7Mum-B3Uhqphs.js";
6
6
  import { SmrtCollection, smrt } from "@happyvertical/smrt-core";
7
7
  //#region ../profiles/dist/chunks/oidcProvisioningPrimitives-D9OYu5-F.js
8
8
  var oidcProvisioningPrimitives_D9OYu5_F_exports = /* @__PURE__ */ __exportAll({