@objectstack/studio 4.0.5 → 4.1.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/dist/assets/cloud-Dwi8Il6Z.js +4 -0
- package/dist/assets/ffi-B4eWOoTe.js +1 -0
- package/dist/assets/index-DIuA2gbH.js +384 -0
- package/dist/assets/index-DiCZvWI4.css +2 -0
- package/dist/assets/module-asyncify-2EFITU5U-DaHMqS9w.js +1 -0
- package/dist/index.html +2 -6
- package/dist/mockServiceWorker.js +1 -1
- package/package.json +43 -43
- package/dist/assets/cloud-zHAemJHv.js +0 -4
- package/dist/assets/compat-CIH473jE.js +0 -1
- package/dist/assets/dist-BF0OK3kd.js +0 -1
- package/dist/assets/ffi-BYrHUVKi.js +0 -1
- package/dist/assets/index-DxL_OHPG.css +0 -2
- package/dist/assets/index-VYLmyF5I.js +0 -321
- package/dist/assets/module-asyncify-2EFITU5U-BtUKRhzr.js +0 -1
- package/dist/assets/node-polyfills-DgkfaM1v.js +0 -2
- package/dist/assets/schemas-UAzPs-Wp.js +0 -64
- /package/dist/assets/{emscripten-module.browser-DCCodjJJ.js → emscripten-module.browser-CJHTIMmB.js} +0 -0
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{C as e,E as t,T as n,c as r,d as i,f as a,g as o,h as s,i as c,l,o as ee,p as u,r as d,u as f,v as p,w as te,x as m,y as h}from"./schemas-UAzPs-Wp.js";import{t as g}from"./compat-CIH473jE.js";function _(e){if(typeof process<`u`&&{}?.OS_EAGER_SCHEMAS===`1`)return e();let t,n=()=>(t===void 0&&(t=e()),t);return new Proxy(function(){},{get(e,t){let r=n(),i=r[t];return typeof i==`function`?i.bind(r):i},set(e,t,r){let i=n();return i[t]=r,!0},has(e,t){return t in n()},ownKeys(){return Reflect.ownKeys(n())},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(n(),t)},getPrototypeOf(){return Reflect.getPrototypeOf(n())}})}var v=_(()=>d([`unverified`,`pending`,`verified`,`trusted`,`partner`]).describe(`Publisher verification status`));_(()=>h({id:e().describe(`Publisher ID`),name:e().describe(`Publisher display name`),type:d([`individual`,`organization`]).describe(`Publisher type`),verification:v.default(`unverified`).describe(`Publisher verification status`),email:e().email().optional().describe(`Contact email`),website:e().url().optional().describe(`Publisher website`),logoUrl:e().url().optional().describe(`Publisher logo URL`),description:e().optional().describe(`Publisher description`),registeredAt:e().datetime().optional().describe(`Publisher registration timestamp`)}).describe(`Developer or organization that publishes packages`));var ne=_(()=>h({url:e().url().describe(`Artifact download URL`),sha256:e().regex(/^[a-f0-9]{64}$/).describe(`SHA256 checksum`),size:p().int().positive().describe(`Artifact size in bytes`),format:d([`tgz`,`zip`]).default(`tgz`).describe(`Artifact format`),uploadedAt:e().datetime().describe(`Upload timestamp`)}).describe(`Reference to a downloadable package artifact`));_(()=>h({downloadUrl:e().url().describe(`Artifact download URL (may be pre-signed)`),sha256:e().regex(/^[a-f0-9]{64}$/).describe(`SHA256 checksum for verification`),size:p().int().positive().describe(`Artifact size in bytes`),format:d([`tgz`,`zip`]).describe(`Artifact format`),expiresAt:e().datetime().optional().describe(`URL expiration timestamp for pre-signed URLs`)}).describe(`Artifact download response with integrity metadata`));var y=_(()=>d([`crm`,`erp`,`hr`,`finance`,`project`,`collaboration`,`analytics`,`integration`,`automation`,`ai`,`security`,`developer-tools`,`ui-theme`,`storage`,`other`]).describe(`Marketplace package category`)),re=_(()=>d([`draft`,`submitted`,`in-review`,`approved`,`published`,`rejected`,`suspended`,`deprecated`,`unlisted`]).describe(`Marketplace listing status`)),b=_(()=>d([`free`,`freemium`,`paid`,`subscription`,`usage-based`,`contact-sales`]).describe(`Package pricing model`)),ie=_(()=>h({id:e().describe(`Listing ID (matches package manifest ID)`),packageId:e().describe(`Package identifier`),publisherId:e().describe(`Publisher ID`),status:re.default(`draft`).describe(`Publication state: draft, published, under-review, suspended, deprecated, or unlisted`),name:e().describe(`Display name`),tagline:e().max(120).optional().describe(`Short tagline (max 120 chars)`),description:e().optional().describe(`Full description (Markdown)`),category:y.describe(`Package category`),tags:l(e()).optional().describe(`Search tags`),iconUrl:e().url().optional().describe(`Package icon URL`),screenshots:l(h({url:e().url(),caption:e().optional()})).optional().describe(`Screenshots`),documentationUrl:e().url().optional().describe(`Documentation URL`),supportUrl:e().url().optional().describe(`Support URL`),repositoryUrl:e().url().optional().describe(`Source repository URL`),pricing:b.default(`free`).describe(`Pricing model`),priceInCents:p().int().min(0).optional().describe(`Price in cents (e.g. 999 = $9.99)`),latestVersion:e().describe(`Latest published version`),minPlatformVersion:e().optional().describe(`Minimum ObjectStack platform version`),versions:l(h({version:e().describe(`Version string`),releaseDate:e().datetime().describe(`Release date`),releaseNotes:e().optional().describe(`Release notes`),minPlatformVersion:e().optional().describe(`Minimum platform version`),deprecated:f().default(!1).describe(`Whether this version is deprecated`),artifact:ne.optional().describe(`Downloadable artifact for this version`)})).optional().describe(`Published versions`),stats:h({totalInstalls:p().int().min(0).default(0).describe(`Total installs`),activeInstalls:p().int().min(0).default(0).describe(`Active installs`),averageRating:p().min(0).max(5).optional().describe(`Average user rating (0-5)`),totalRatings:p().int().min(0).default(0).describe(`Total ratings count`),totalReviews:p().int().min(0).default(0).describe(`Total reviews count`)}).optional().describe(`Aggregate marketplace statistics`),publishedAt:e().datetime().optional().describe(`First published timestamp`),updatedAt:e().datetime().optional().describe(`Last updated timestamp`)}).describe(`Public-facing package listing on the marketplace`));_(()=>h({id:e().describe(`Submission ID`),packageId:e().describe(`Package identifier`),version:e().describe(`Version being submitted`),publisherId:e().describe(`Publisher submitting`),status:d([`pending`,`scanning`,`in-review`,`changes-requested`,`approved`,`rejected`]).default(`pending`).describe(`Review status`),artifactUrl:e().describe(`Package artifact URL for review`),releaseNotes:e().optional().describe(`Release notes for this version`),isNewListing:f().default(!1).describe(`Whether this is a new listing submission`),scanResults:h({passed:f(),securityScore:p().min(0).max(100).optional(),compatibilityCheck:f().optional(),issues:l(h({severity:d([`critical`,`high`,`medium`,`low`,`info`]),message:e(),file:e().optional(),line:p().optional()})).optional()}).optional().describe(`Automated scan results`),reviewerNotes:e().optional().describe(`Notes from the platform reviewer`),submittedAt:e().datetime().optional().describe(`Submission timestamp`),reviewedAt:e().datetime().optional().describe(`Review completion timestamp`)}).describe(`Developer submission of a package version for review`)),_(()=>h({query:e().optional().describe(`Full-text search query`),category:y.optional().describe(`Filter by category`),tags:l(e()).optional().describe(`Filter by tags`),pricing:b.optional().describe(`Filter by pricing model`),publisherVerification:v.optional().describe(`Filter by publisher verification level`),sortBy:d([`relevance`,`popularity`,`rating`,`newest`,`updated`,`name`]).default(`relevance`).describe(`Sort field`),sortDirection:d([`asc`,`desc`]).default(`desc`).describe(`Sort direction`),page:p().int().min(1).default(1).describe(`Page number`),pageSize:p().int().min(1).max(100).default(20).describe(`Items per page`),platformVersion:e().optional().describe(`Filter by platform version compatibility`)}).describe(`Marketplace search request`)),_(()=>h({items:l(ie).describe(`Search result listings`),total:p().int().min(0).describe(`Total matching results`),page:p().int().min(1).describe(`Current page number`),pageSize:p().int().min(1).describe(`Items per page`),facets:h({categories:l(h({category:y,count:p().int().min(0)})).optional(),pricing:l(h({model:b,count:p().int().min(0)})).optional()}).optional().describe(`Aggregation facets for refining search`)}).describe(`Marketplace search response`)),_(()=>h({listingId:e().describe(`Marketplace listing ID`),version:e().optional().describe(`Version to install`),licenseKey:e().optional().describe(`License key for paid packages`),settings:m(e(),t()).optional().describe(`User-provided settings at install time`),enableOnInstall:f().default(!0).describe(`Whether to enable immediately after install`),artifactRef:ne.optional().describe(`Artifact reference for direct installation`),tenantId:e().optional().describe(`Tenant identifier`)}).describe(`Install from marketplace request`)),_(()=>h({success:f().describe(`Whether installation succeeded`),packageId:e().optional().describe(`Installed package identifier`),version:e().optional().describe(`Installed version`),message:e().optional().describe(`Installation status message`)}).describe(`Install from marketplace response`)),_(()=>h({organizationId:e().describe(`Identity Organization ID`),publisherId:e().describe(`Marketplace publisher ID`),verification:v.default(`unverified`),agreementVersion:e().optional().describe(`Accepted developer agreement version`),website:e().url().optional().describe(`Publisher website`),supportEmail:e().email().optional().describe(`Publisher support email`),registeredAt:e().datetime()}));var ae=_(()=>d([`alpha`,`beta`,`rc`,`stable`]));_(()=>h({version:e().describe(`Semver version (e.g., 2.1.0-beta.1)`),channel:ae.default(`stable`),releaseNotes:e().optional().describe(`Release notes (Markdown)`),changelog:l(h({type:d([`added`,`changed`,`fixed`,`removed`,`deprecated`,`security`]),description:e()})).optional().describe(`Structured changelog entries`),minPlatformVersion:e().optional(),artifactUrl:e().optional().describe(`Built package artifact URL`),artifactChecksum:e().optional().describe(`SHA-256 checksum`),deprecated:f().default(!1),deprecationMessage:e().optional(),releasedAt:e().datetime().optional()})),_(()=>h({packageId:e().describe(`Package identifier`),name:e().describe(`App display name`),tagline:e().max(120).optional(),description:e().optional(),category:e().describe(`Marketplace category`),tags:l(e()).optional(),iconUrl:e().url().optional(),screenshots:l(h({url:e().url(),caption:e().optional()})).optional(),documentationUrl:e().url().optional(),supportUrl:e().url().optional(),repositoryUrl:e().url().optional(),pricing:d([`free`,`freemium`,`paid`,`subscription`,`usage-based`,`contact-sales`]).default(`free`),priceInCents:p().int().min(0).optional()})),_(()=>h({listingId:e().describe(`Listing ID to update`),name:e().optional(),tagline:e().max(120).optional(),description:e().optional(),category:e().optional(),tags:l(e()).optional(),iconUrl:e().url().optional(),screenshots:l(h({url:e().url(),caption:e().optional()})).optional(),documentationUrl:e().url().optional(),supportUrl:e().url().optional(),repositoryUrl:e().url().optional(),pricing:d([`free`,`freemium`,`paid`,`subscription`,`usage-based`,`contact-sales`]).optional(),priceInCents:p().int().min(0).optional()})),_(()=>h({listingId:e().describe(`Listing ID`),action:d([`submit`,`unlist`,`deprecate`,`reactivate`]).describe(`Action to perform on listing`),reason:e().optional()}));var oe=_(()=>d([`last_7d`,`last_30d`,`last_90d`,`last_365d`,`all_time`]));_(()=>h({listingId:e().describe(`Listing to get analytics for`),timeRange:oe.default(`last_30d`),metrics:l(d([`installs`,`uninstalls`,`active_installs`,`ratings`,`revenue`,`page_views`])).optional().describe(`Metrics to include (default: all)`)}));var se=_(()=>h({date:e(),value:p()}));_(()=>h({listingId:e(),timeRange:oe,summary:h({totalInstalls:p().int().min(0),activeInstalls:p().int().min(0),totalUninstalls:p().int().min(0),averageRating:p().min(0).max(5).optional(),totalRatings:p().int().min(0),totalRevenue:p().min(0).optional().describe(`Revenue in cents`),pageViews:p().int().min(0)}),timeSeries:m(e(),l(se)).optional().describe(`Time series keyed by metric name`),ratingDistribution:h({1:p().int().min(0).default(0),2:p().int().min(0).default(0),3:p().int().min(0).default(0),4:p().int().min(0).default(0),5:p().int().min(0).default(0)}).optional()}));var ce=_(()=>h({id:e().describe(`Criterion ID`),category:d([`security`,`performance`,`quality`,`ux`,`documentation`,`policy`,`compatibility`]),description:e(),required:f().default(!0),passed:f().optional(),notes:e().optional()})),le=_(()=>d([`approved`,`rejected`,`changes-requested`])),ue=_(()=>d([`security-vulnerability`,`policy-violation`,`quality-below-standard`,`misleading-metadata`,`incompatible`,`duplicate`,`insufficient-documentation`,`other`]));_(()=>h({id:e().describe(`Review ID`),submissionId:e().describe(`Submission being reviewed`),reviewerId:e().describe(`Platform reviewer ID`),decision:le.optional().describe(`Final decision`),criteria:l(ce).optional().describe(`Review checklist results`),rejectionReasons:l(ue).optional(),feedback:e().optional().describe(`Detailed review feedback (Markdown)`),internalNotes:e().optional().describe(`Internal reviewer notes`),startedAt:e().datetime().optional(),completedAt:e().datetime().optional()})),_(()=>h({listingId:e().describe(`Featured listing ID`),priority:p().int().min(0).default(0),bannerUrl:e().url().optional(),editorialNote:e().optional(),startDate:e().datetime(),endDate:e().datetime().optional(),active:f().default(!0)})),_(()=>h({id:e().describe(`Collection ID`),name:e().describe(`Collection name`),description:e().optional(),coverImageUrl:e().url().optional(),listingIds:l(e()).min(1).describe(`Ordered listing IDs`),published:f().default(!1),sortOrder:p().int().min(0).default(0),createdBy:e().optional(),createdAt:e().datetime().optional(),updatedAt:e().datetime().optional()}));var de=_(()=>d([`malware`,`data-harvesting`,`spam`,`copyright`,`inappropriate-content`,`terms-of-service`,`security-risk`,`abandoned`]));_(()=>h({id:e().describe(`Action ID`),listingId:e().describe(`Target listing ID`),violationType:de,action:d([`warning`,`suspend`,`takedown`,`restrict`]),reason:e().describe(`Explanation of the violation`),actionBy:e().describe(`Admin user ID`),actionAt:e().datetime(),resolution:e().optional(),resolved:f().default(!1)})),_(()=>h({totalListings:p().int().min(0),listingsByStatus:m(e(),p().int().min(0)).optional(),listingsByCategory:m(e(),p().int().min(0)).optional(),totalPublishers:p().int().min(0),verifiedPublishers:p().int().min(0),totalInstalls:p().int().min(0),averageReviewTime:p().min(0).optional(),pendingReviews:p().int().min(0),listingsByPricing:m(e(),p().int().min(0)).optional(),snapshotAt:e().datetime()})),_(()=>h({listingId:e(),rank:p().int().min(1),trendScore:p().min(0),installVelocity:p().min(0),period:e()}));var fe=_(()=>d([`pending`,`approved`,`flagged`,`rejected`])),pe=_(()=>h({id:e().describe(`Review ID`),listingId:e().describe(`Listing being reviewed`),userId:e().describe(`Review author user ID`),displayName:e().optional().describe(`Reviewer display name`),rating:p().int().min(1).max(5).describe(`Star rating (1-5)`),title:e().max(200).optional().describe(`Review title`),body:e().max(5e3).optional().describe(`Review text`),appVersion:e().optional().describe(`App version being reviewed`),moderationStatus:fe.default(`pending`),helpfulCount:p().int().min(0).default(0),publisherResponse:h({body:e(),respondedAt:e().datetime()}).optional().describe(`Publisher response to review`),submittedAt:e().datetime(),updatedAt:e().datetime().optional()}));_(()=>h({listingId:e().describe(`Listing to review`),rating:p().int().min(1).max(5).describe(`Star rating`),title:e().max(200).optional(),body:e().max(5e3).optional()})),_(()=>h({listingId:e().describe(`Listing to get reviews for`),sortBy:d([`newest`,`oldest`,`highest`,`lowest`,`most-helpful`]).default(`newest`),rating:p().int().min(1).max(5).optional(),page:p().int().min(1).default(1),pageSize:p().int().min(1).max(50).default(10)})),_(()=>h({items:l(pe),total:p().int().min(0),page:p().int().min(1),pageSize:p().int().min(1),ratingSummary:h({averageRating:p().min(0).max(5),totalRatings:p().int().min(0),distribution:h({1:p().int().min(0).default(0),2:p().int().min(0).default(0),3:p().int().min(0).default(0),4:p().int().min(0).default(0),5:p().int().min(0).default(0)})}).optional()}));var me=_(()=>d([`popular-in-category`,`similar-users`,`complements-installed`,`trending`,`new-release`,`editor-pick`])),x=_(()=>h({listingId:e(),name:e(),tagline:e().optional(),iconUrl:e().url().optional(),category:y,pricing:b,averageRating:p().min(0).max(5).optional(),activeInstalls:p().int().min(0).optional(),reason:me}));_(()=>h({tenantId:e().optional(),categories:l(y).optional(),platformVersion:e().optional(),limit:p().int().min(1).max(50).default(10)})),_(()=>h({featured:l(x).optional(),recommended:l(x).optional(),trending:l(x).optional(),newArrivals:l(x).optional(),collections:l(h({id:e(),name:e(),description:e().optional(),coverImageUrl:e().url().optional(),apps:l(x)})).optional()}));var he=_(()=>d([`active`,`trialing`,`past-due`,`cancelled`,`expired`]));_(()=>h({id:e().describe(`Subscription ID`),listingId:e().describe(`App listing ID`),tenantId:e().describe(`Customer tenant ID`),status:he,licenseKey:e().optional(),plan:e().optional().describe(`Subscription plan name`),billingCycle:d([`monthly`,`annual`]).optional(),priceInCents:p().int().min(0).optional(),currentPeriodStart:e().datetime().optional(),currentPeriodEnd:e().datetime().optional(),trialEndDate:e().datetime().optional(),autoRenew:f().default(!0),createdAt:e().datetime()}));var ge=_(()=>h({listingId:e(),packageId:e(),name:e(),iconUrl:e().url().optional(),installedVersion:e(),latestVersion:e().optional(),updateAvailable:f().default(!1),enabled:f().default(!0),subscriptionStatus:he.optional(),installedAt:e().datetime()}));_(()=>h({tenantId:e().optional(),enabled:f().optional(),updateAvailable:f().optional(),sortBy:d([`name`,`installed-date`,`updated-date`]).default(`name`),page:p().int().min(1).default(1),pageSize:p().int().min(1).max(100).default(20)})),_(()=>h({items:l(ge),total:p().int().min(0),page:p().int().min(1),pageSize:p().int().min(1)}));var _e=_(()=>d([`provisioning`,`active`,`suspended`,`archived`,`failed`])),S=_(()=>d([`free`,`starter`,`pro`,`enterprise`,`custom`])),ve=_(()=>h({id:e().uuid().describe(`Unique tenant database identifier (UUID)`),organizationId:e().describe(`Organization ID (foreign key to sys_organization)`),databaseName:e().describe(`Database name (UUID-based)`),databaseUrl:e().url().describe(`Full database URL`),authToken:e().describe(`Encrypted tenant-specific auth token`),status:_e.default(`provisioning`).describe(`Database status`),region:e().describe(`Deployment region`),plan:S.default(`free`).describe(`Tenant plan tier`),storageLimitMb:p().int().positive().describe(`Storage limit in megabytes`),createdAt:e().datetime().describe(`Database creation timestamp`),updatedAt:e().datetime().describe(`Last update timestamp`),lastAccessedAt:e().datetime().optional().describe(`Last accessed timestamp`),metadata:m(e(),t()).optional().describe(`Custom tenant configuration`)})),ye=_(()=>d([`installing`,`active`,`disabled`,`uninstalling`,`failed`]));_(()=>h({id:e().uuid().describe(`Unique installation identifier`),tenantId:e().uuid().describe(`Tenant database ID`),packageId:e().describe(`Package identifier`),version:e().describe(`Installed package version`),status:ye.default(`installing`).describe(`Installation status`),installedAt:e().datetime().describe(`Installation timestamp`),installedBy:e().describe(`User ID who installed the package`),config:m(e(),t()).optional().describe(`Package-specific configuration`),updatedAt:e().datetime().describe(`Last update timestamp`)})),_(()=>h({tenantId:e().uuid().describe(`Current tenant database ID`),organizationId:e().describe(`Current organization ID`),organizationSlug:e().optional().describe(`Organization slug`),databaseUrl:e().url().describe(`Tenant database URL`),plan:S.describe(`Tenant plan tier`),metadata:m(e(),t()).optional().describe(`Custom tenant metadata`)}));var be=_(()=>d([`subdomain`,`custom_domain`,`header`,`jwt_claim`,`session`,`default`]));_(()=>h({enabled:f().default(!1).describe(`Enable multi-tenant mode`),identificationSources:l(be).default([`subdomain`,`header`,`jwt_claim`]).describe(`Tenant identification strategy (in order of precedence)`),defaultTenantId:e().uuid().optional().describe(`Default tenant ID`),subdomainPattern:e().optional().describe(`Subdomain pattern for tenant extraction`),customDomainMapping:m(e(),e().uuid()).optional().describe(`Custom domain to tenant ID mapping`),tenantHeaderName:e().default(`X-Tenant-ID`).describe(`Header name for tenant ID`),jwtOrganizationClaim:e().default(`organizationId`).describe(`JWT claim name for organization ID`)})),_(()=>h({organizationId:e().describe(`Organization ID`),region:e().optional().describe(`Deployment region preference`),plan:S.default(`free`).describe(`Tenant plan tier`),storageLimitMb:p().int().positive().optional().describe(`Storage limit in megabytes`),metadata:m(e(),t()).optional().describe(`Custom tenant metadata`)})),_(()=>h({tenant:ve.describe(`Provisioned tenant database`),durationMs:p().describe(`Provisioning duration in milliseconds`),warnings:l(e()).optional().describe(`Provisioning warnings`)})),_(()=>d([`production`,`sandbox`,`development`,`test`,`staging`,`preview`,`trial`]).describe(`Project type (prod/sandbox/dev/test/…)`));var xe=_(()=>d([`provisioning`,`active`,`suspended`,`archived`,`failed`,`migrating`]).describe(`Project lifecycle status`)),C=_(()=>e().min(1).describe("Data-plane driver key (e.g. `turso`, `libsql`, `sqlite`, `postgres`)")),Se=_(()=>h({id:e().uuid().describe(`UUID of the project (stable, never reused)`),organizationId:e().describe(`Organization that owns this project`),displayName:e().describe(`Display name shown in Studio and APIs`),isDefault:f().default(!1).describe(`Whether this is the default project for the organization`),isSystem:f().default(!1).describe(`Whether this is a system project (platform infrastructure, not user data)`),plan:S.default(`free`).describe(`Plan tier for this project`),status:xe.default(`provisioning`).describe(`Project lifecycle status`),createdBy:e().describe(`User ID that created the project`),createdAt:e().datetime().describe(`Creation timestamp (ISO-8601)`),updatedAt:e().datetime().describe(`Last update timestamp (ISO-8601)`),databaseUrl:e().url().optional().describe(`Full connection URL for the project database`),databaseDriver:C.optional().describe(`Data-plane driver key (turso, libsql, sqlite, memory, postgres)`),storageLimitMb:p().int().positive().optional().describe(`Storage quota in megabytes`),provisionedAt:e().datetime().optional().describe(`Provisioning timestamp (ISO-8601)`),metadata:m(e(),t()).optional().describe(`Free-form metadata`),hostname:e().optional().describe(`Canonical hostname for this project (e.g. acme-dev.objectstack.app or api.acme.com). UNIQUE. Auto-set on creation; can be overridden for custom domains.`)})),Ce=_(()=>d([`active`,`rotating`,`revoked`]).describe(`Credential lifecycle status`)),we=_(()=>h({id:e().uuid().describe(`UUID of the credential`),projectId:e().uuid().describe(`Project this credential authorizes`),secretCiphertext:e().describe(`Encrypted auth token or secret (ciphertext)`),encryptionKeyId:e().describe(`Encryption key ID used to encrypt the secret`),authorization:d([`full_access`,`read_only`]).default(`full_access`).describe(`Authorization scope for this credential`),status:Ce.default(`active`).describe(`Credential lifecycle status`),createdAt:e().datetime().describe(`Creation timestamp (ISO-8601)`),expiresAt:e().datetime().optional().describe(`Optional expiry timestamp`),revokedAt:e().datetime().optional().describe(`Revocation timestamp (if revoked)`)})),Te=_(()=>d([`owner`,`admin`,`maker`,`reader`,`guest`]).describe(`Per-project role`));_(()=>h({id:e().uuid().describe(`UUID of the membership`),projectId:e().uuid().describe(`Project this membership grants access to`),userId:e().describe(`User ID`),role:Te.describe(`Per-project role`),invitedBy:e().describe(`User ID that granted this membership`),createdAt:e().datetime().describe(`Creation timestamp (ISO-8601)`),updatedAt:e().datetime().describe(`Last update timestamp (ISO-8601)`)})),_(()=>h({organizationId:e().describe(`Organization that will own the new project`),displayName:e().min(1).describe(`Display name shown in Studio and APIs`),driver:C.optional().describe(`Driver key (defaults to provisioning service config)`),plan:S.optional().describe(`Plan tier`),storageLimitMb:p().int().positive().optional().describe(`Storage quota in megabytes`),isDefault:f().optional().describe(`Mark as the organization default project`),createdBy:e().describe(`User ID that initiated the provisioning`),metadata:m(e(),t()).optional().describe(`Free-form metadata`),hostname:e().optional().describe(`Canonical hostname for this project (auto-generated if omitted)`),templateId:e().optional().describe(`Template to seed into the project on first provisioning (e.g. "crm", "todo"). Defaults to "blank".`)}));var Ee=_(()=>h({project:Se.describe(`Provisioned project (includes database addressing)`),credential:we.describe(`Freshly-minted credential for the project DB`),durationMs:p().describe(`Total provisioning duration in milliseconds`),warnings:l(e()).optional().describe(`Non-fatal warnings emitted during provisioning`)}));_(()=>h({organizationId:e().describe(`Organization being bootstrapped`),defaultProjectDisplayName:e().min(1).default(`Production`).describe(`Display name for the default project`),driver:C.optional().describe(`Driver key`),plan:S.optional().describe(`Plan tier`),storageLimitMb:p().int().positive().optional().describe(`Storage quota in megabytes`),createdBy:e().describe(`User ID that initiated provisioning`),metadata:m(e(),t()).optional().describe(`Free-form metadata`)})),_(()=>h({defaultProject:Ee.describe(`Default project that was created`),durationMs:p().describe(`Total bootstrap duration in milliseconds`),warnings:l(e()).optional().describe(`Non-fatal warnings`)}));var w=_(()=>d([`private`,`org`,`marketplace`]).describe(`Package visibility: private = owner org only; org = all envs in owner org; marketplace = public registry`)),T=_(()=>e().min(1).describe(`Package category for marketplace discovery (e.g. "crm", "hr", "finance", "devtools")`)),E=_(()=>h({id:e().uuid().describe(`UUID of the package (stable, never reused)`),manifestId:e().regex(/^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/).describe(`Globally unique reverse-domain package identifier (e.g. com.acme.crm)`),ownerOrgId:e().describe(`Organization ID of the package owner/publisher`),displayName:e().min(1).max(128).describe(`Display name shown in Studio and Marketplace`),description:e().max(512).optional().describe(`Short package description`),readme:e().optional().describe(`Long-form package documentation (markdown)`),visibility:w.default(`private`),category:T.optional(),tags:l(e()).optional().describe(`Search and filter tags`),iconUrl:e().url().optional().describe(`Package icon URL`),homepageUrl:e().url().optional().describe(`Package homepage URL`),license:e().optional().describe(`SPDX license identifier (e.g. MIT, Apache-2.0)`),createdAt:e().datetime().describe(`Creation timestamp (ISO-8601)`),updatedAt:e().datetime().describe(`Last update timestamp (ISO-8601)`),createdBy:e().describe(`User ID that created the package`)}));_(()=>h({manifestId:E.shape.manifestId,ownerOrgId:e().describe(`Owner organization ID`),displayName:E.shape.displayName,description:E.shape.description,visibility:w.optional(),category:T.optional(),tags:l(e()).optional(),iconUrl:e().url().optional(),homepageUrl:e().url().optional(),license:e().optional(),createdBy:e().describe(`User ID creating the package`)}).describe(`Register a new package in the Control Plane`)),_(()=>h({displayName:E.shape.displayName.optional(),description:E.shape.description,readme:E.shape.readme,visibility:w.optional(),category:T.optional(),tags:l(e()).optional(),iconUrl:e().url().optional(),homepageUrl:e().url().optional(),license:e().optional()}).describe(`Update mutable package metadata`));var De=_(()=>d([`draft`,`published`,`deprecated`]).describe(`Package version lifecycle status`)),Oe=_(()=>h({packageId:e().describe(`Manifest ID of the dependency`),versionRange:e().describe(`Semver version range (e.g. ^1.0.0)`),optional:f().default(!1).describe(`Whether this dependency is optional`)}).describe(`Package dependency declaration`));_(()=>h({id:e().describe(`Package manifest ID (reverse-domain)`),version:e().describe(`Semver version string (e.g. 1.2.3)`),name:e().describe(`Display name`),description:e().optional().describe(`Short description`),scope:d([`platform`,`environment`]).default(`environment`).describe(`Package scope`),minPlatformVersion:e().optional().describe(`Minimum required platform version (semver)`),dependencies:l(Oe).default([]).describe(`Package dependencies`),metadataTypes:l(e()).default([]).describe(`Metadata types provided by this package`),migrations:l(e()).default([]).describe(`Migration script identifiers (ordered)`),configurationSchema:m(e(),t()).optional().describe(`JSON Schema for per-installation configuration properties`),metadata:m(e(),t()).optional().describe(`Extension metadata`)}).describe(`Package manifest snapshot embedded in a package version`));var ke=_(()=>h({id:e().uuid().describe(`UUID of the package version (stable, never reused)`),packageId:e().uuid().describe(`UUID of the parent sys_package row`),version:e().regex(/^\d+\.\d+\.\d+(-[a-z0-9.-]+)?(\+[a-z0-9.-]+)?$/).describe(`Semantic version string`),status:De.default(`draft`),manifestJson:e().describe(`JSON-serialized package manifest (frozen on publish)`),checksum:e().regex(/^[a-f0-9]{64}$/).optional().describe(`SHA-256 hex digest of manifestJson`),releaseNotes:e().optional().describe(`Release notes for this version (markdown)`),minPlatformVersion:e().optional().describe(`Minimum required platform version (denormalized from manifest)`),isPreRelease:f().default(!1).describe(`Whether this is a pre-release version`),publishedAt:e().datetime().optional().describe(`Publish timestamp (ISO-8601)`),publishedBy:e().optional().describe(`User ID who published this version`),createdAt:e().datetime().describe(`Creation timestamp (ISO-8601)`),updatedAt:e().datetime().describe(`Last update timestamp (ISO-8601)`),createdBy:e().describe(`User ID that created this version`)}));_(()=>h({packageId:e().uuid().describe(`Parent package UUID`),version:ke.shape.version,manifestJson:e().describe(`Initial manifest JSON (can be updated while draft)`),releaseNotes:e().optional(),isPreRelease:f().optional(),createdBy:e().describe(`User ID creating this version`)}).describe(`Create a new draft package version`)),_(()=>h({manifestJson:e().optional().describe(`Updated manifest JSON`),releaseNotes:e().optional(),isPreRelease:f().optional()}).describe(`Update a draft package version (only while status is draft)`)),_(()=>h({publishedBy:e().describe(`User ID publishing this version`)}).describe(`Publish a draft version — seals manifestJson and checksum`));var Ae=_(()=>d([`installed`,`installing`,`upgrading`,`disabled`,`error`]).describe(`Package installation status within a project`)),je=_(()=>h({id:e().uuid().describe(`Unique installation record ID`),projectId:e().uuid().describe(`Project this installation belongs to`),packageVersionId:e().uuid().describe(`UUID of the installed sys_package_version row`),packageId:e().uuid().describe(`UUID of the parent sys_package row (denormalized for constraint enforcement)`),status:Ae.default(`installed`),enabled:f().default(!0).describe(`Whether the package metadata is loaded`),settings:m(e(),t()).optional().describe(`Per-installation configuration settings`),installedAt:e().datetime().describe(`Installation timestamp (ISO-8601)`),installedBy:e().optional().describe(`User ID of the installer`),updatedAt:e().datetime().optional().describe(`Last update timestamp (ISO-8601)`),errorMessage:e().optional().describe(`Error message when status is error`)}).describe(`Package installation record in a project (sys_package_installation)`));_(()=>h({packageVersionId:e().uuid().optional().describe(`Exact package version UUID to install (preferred)`),packageManifestId:e().optional().describe(`Package manifest ID (reverse-domain, e.g. com.acme.crm) — resolved to version UUID`),version:e().optional().describe(`Version string (defaults to latest published)`),allowDraft:f().default(!1).describe(`Allow installing a draft version (dev/sandbox projects only)`),settings:m(e(),t()).optional().describe(`Installation-time configuration settings`),enableOnInstall:f().default(!0).describe(`Activate the package immediately after install`),installedBy:e().optional().describe(`User ID of the installer`)}).describe(`Install a package version into a specific project`).refine(e=>e.packageVersionId!=null||e.packageManifestId!=null,{message:`Either packageVersionId or packageManifestId must be provided`})),_(()=>h({targetPackageVersionId:e().uuid().optional().describe(`Target package version UUID (preferred)`),targetVersion:e().optional().describe(`Target version string (defaults to latest published)`),allowDraft:f().default(!1).describe(`Allow upgrading to a draft version`),upgradedBy:e().optional().describe(`User ID performing the upgrade`)}).describe(`Upgrade a package installation to a newer version`)),_(()=>h({targetPackageVersionId:e().uuid().describe(`Package version UUID to roll back to`),rolledBackBy:e().optional().describe(`User ID performing the rollback`)}).describe(`Roll back a package installation to a specific older version`)),_(()=>h({packages:l(je).describe(`Packages installed in this project`),total:p().describe(`Total count`)}).describe(`List of packages installed in a project`));var Me=_(()=>d([`full`,`partial`,`experimental`,`deprecated`]).describe(`Level of protocol conformance`)),Ne=_(()=>h({major:p().int().min(0),minor:p().int().min(0),patch:p().int().min(0)}).describe(`Semantic version of the protocol`)),Pe=_(()=>h({id:e().regex(/^([a-z][a-z0-9]*\.)+protocol\.[a-z][a-z0-9._]*\.v\d+$/).describe(`Unique protocol identifier (e.g., com.objectstack.protocol.storage.v1)`),label:e(),version:Ne,specification:e().optional().describe(`URL or path to protocol specification`),description:e().optional()})),Fe=_(()=>h({name:e().describe(`Feature identifier within the protocol`),enabled:f().default(!0),description:e().optional(),sinceVersion:e().optional().describe(`Version when this feature was added`),deprecatedSince:e().optional().describe(`Version when deprecated`)})),Ie=_(()=>h({protocol:Pe,conformance:Me.default(`full`),implementedFeatures:l(e()).optional().describe(`List of implemented feature names`),features:l(Fe).optional(),metadata:m(e(),t()).optional(),certified:f().default(!1).describe(`Has passed official conformance tests`),certificationDate:e().datetime().optional()})),Le=_(()=>h({id:e().regex(/^([a-z][a-z0-9]*\.)+interface\.[a-z][a-z0-9._]+$/).describe(`Unique interface identifier`),name:e(),description:e().optional(),version:Ne,methods:l(h({name:e().describe(`Method name`),description:e().optional(),parameters:l(h({name:e(),type:e().describe(`Type notation (e.g., string, number, User)`),required:f().default(!0),description:e().optional()})).optional(),returnType:e().optional().describe(`Return value type`),async:f().default(!1).describe(`Whether method returns a Promise`)})),events:l(h({name:e().describe(`Event name`),description:e().optional(),payload:e().optional().describe(`Event payload type`)})).optional(),stability:d([`stable`,`beta`,`alpha`,`experimental`]).default(`stable`)})),Re=_(()=>h({pluginId:e().regex(/^([a-z][a-z0-9]*\.)+[a-z][a-z0-9-]+$/).describe(`Required plugin identifier`),version:e().describe(`Semantic version constraint`),optional:f().default(!1),reason:e().optional(),requiredCapabilities:l(e()).optional().describe(`Protocol IDs the dependency must support`)})),ze=_(()=>h({id:e().regex(/^([a-z][a-z0-9]*\.)+extension\.[a-z][a-z0-9._]+$/).describe(`Unique extension point identifier`),name:e(),description:e().optional(),type:d([`action`,`hook`,`widget`,`provider`,`transformer`,`validator`,`decorator`]),contract:h({input:e().optional().describe(`Input type/schema`),output:e().optional().describe(`Output type/schema`),signature:e().optional().describe(`Function signature if applicable`)}).optional(),cardinality:d([`single`,`multiple`]).default(`multiple`).describe(`Whether multiple extensions can register to this point`)})),Be=_(()=>h({implements:l(Ie).optional().describe(`List of protocols this plugin conforms to`),provides:l(Le).optional().describe(`Services/APIs this plugin offers to others`),requires:l(Re).optional().describe(`Required plugins and their capabilities`),extensionPoints:l(ze).optional().describe(`Points where other plugins can extend this plugin`),extensions:l(h({targetPluginId:e().describe(`Plugin ID being extended`),extensionPointId:e().describe(`Extension point identifier`),implementation:e().describe(`Path to implementation module`),priority:p().int().default(100).describe(`Registration priority (lower = higher priority)`)})).optional().describe(`Extensions contributed to other plugins`)})),Ve=_(()=>d([`eager`,`lazy`,`parallel`,`deferred`,`on-demand`]).describe(`Plugin loading strategy`)),He=_(()=>h({enabled:f().default(!1),priority:p().int().min(0).default(100),resources:l(d([`metadata`,`dependencies`,`assets`,`code`,`services`])).optional(),conditions:h({routes:l(e()).optional(),roles:l(e()).optional(),deviceType:l(d([`desktop`,`mobile`,`tablet`])).optional(),minNetworkSpeed:d([`slow-2g`,`2g`,`3g`,`4g`]).optional()}).optional()}).describe(`Plugin preloading configuration`)),Ue=_(()=>h({enabled:f().default(!0),strategy:d([`route`,`feature`,`size`,`custom`]).default(`feature`),chunkNaming:d([`hashed`,`named`,`sequential`]).default(`hashed`),maxChunkSize:p().int().min(10).optional().describe(`Max chunk size in KB`),sharedDependencies:h({enabled:f().default(!0),minChunks:p().int().min(1).default(2)}).optional()}).describe(`Plugin code splitting configuration`)),We=_(()=>h({enabled:f().default(!0),mode:d([`async`,`sync`,`eager`,`lazy`]).default(`async`),prefetch:f().default(!1).describe(`Prefetch module in idle time`),preload:f().default(!1).describe(`Preload module in parallel with parent`),webpackChunkName:e().optional().describe(`Custom chunk name for webpack`),timeout:p().int().min(100).default(3e4).describe(`Dynamic import timeout (ms)`),retry:h({enabled:f().default(!0),maxAttempts:p().int().min(1).max(10).default(3),backoffMs:p().int().min(0).default(1e3).describe(`Exponential backoff base delay`)}).optional()}).describe(`Plugin dynamic import configuration`)),Ge=_(()=>h({mode:d([`sync`,`async`,`parallel`,`sequential`]).default(`async`),timeout:p().int().min(100).default(3e4),priority:p().int().min(0).default(100),critical:f().default(!1).describe(`If true, kernel bootstrap fails if plugin fails`),retry:h({enabled:f().default(!1),maxAttempts:p().int().min(1).max(5).default(3),backoffMs:p().int().min(0).default(1e3)}).optional(),healthCheckInterval:p().int().min(0).optional().describe(`Health check interval in ms (0 = disabled)`)}).describe(`Plugin initialization configuration`)),Ke=_(()=>h({strategy:d([`strict`,`compatible`,`latest`,`pinned`]).default(`compatible`),peerDependencies:h({resolve:f().default(!0),onMissing:d([`error`,`warn`,`ignore`]).default(`warn`),onMismatch:d([`error`,`warn`,`ignore`]).default(`warn`)}).optional(),optionalDependencies:h({load:f().default(!0),onFailure:d([`warn`,`ignore`]).default(`warn`)}).optional(),conflictResolution:d([`fail`,`latest`,`oldest`,`manual`]).default(`latest`),circularDependencies:d([`error`,`warn`,`allow`]).default(`warn`)}).describe(`Plugin dependency resolution configuration`)),qe=_(()=>h({enabled:f().default(!1),environment:d([`development`,`staging`,`production`]).default(`development`).describe(`Target environment controlling safety level`),strategy:d([`full`,`partial`,`state-preserve`]).default(`full`),watchPatterns:l(e()).optional().describe(`Glob patterns for files to watch`),ignorePatterns:l(e()).optional().describe(`Glob patterns for files to ignore`),debounceMs:p().int().min(0).default(300),preserveState:f().default(!1),stateSerialization:h({enabled:f().default(!1),handler:e().optional()}).optional(),hooks:h({beforeReload:e().optional().describe(`Function to call before reload`),afterReload:e().optional().describe(`Function to call after reload`),onError:e().optional().describe(`Function to call on reload error`)}).optional(),productionSafety:h({healthValidation:f().default(!0).describe(`Run health checks after reload before accepting traffic`),rollbackOnFailure:f().default(!0).describe(`Auto-rollback if reloaded plugin fails health check`),healthTimeout:p().int().min(1e3).default(3e4).describe(`Health check timeout after reload in ms`),drainConnections:f().default(!0).describe(`Gracefully drain active requests before reloading`),drainTimeout:p().int().min(0).default(15e3).describe(`Max wait time for connection draining in ms`),maxConcurrentReloads:p().int().min(1).default(1).describe(`Limit concurrent reloads to prevent system instability`),minReloadInterval:p().int().min(1e3).default(5e3).describe(`Cooldown period between reloads of the same plugin`)}).optional()}).describe(`Plugin hot reload configuration`)),Je=_(()=>h({enabled:f().default(!0),storage:d([`memory`,`disk`,`indexeddb`,`hybrid`]).default(`memory`),keyStrategy:d([`version`,`hash`,`timestamp`]).default(`version`),ttl:p().int().min(0).optional().describe(`Time to live in seconds (0 = infinite)`),maxSize:p().int().min(1).optional().describe(`Max cache size in MB`),invalidateOn:l(d([`version-change`,`dependency-change`,`manual`,`error`])).optional(),compression:h({enabled:f().default(!1),algorithm:d([`gzip`,`brotli`,`deflate`]).default(`gzip`)}).optional()}).describe(`Plugin caching configuration`)),Ye=_(()=>h({enabled:f().default(!1),scope:d([`automation-only`,`untrusted-only`,`all-plugins`]).default(`automation-only`).describe(`Which plugins are subject to isolation`),isolationLevel:d([`none`,`process`,`vm`,`iframe`,`web-worker`]).default(`none`),allowedCapabilities:l(e()).optional().describe(`List of allowed capability IDs`),resourceQuotas:h({maxMemoryMB:p().int().min(1).optional(),maxCpuTimeMs:p().int().min(100).optional(),maxFileDescriptors:p().int().min(1).optional(),maxNetworkKBps:p().int().min(1).optional()}).optional(),permissions:h({allowedAPIs:l(e()).optional(),allowedPaths:l(e()).optional(),allowedEndpoints:l(e()).optional(),allowedEnvVars:l(e()).optional()}).optional(),ipc:h({enabled:f().default(!0).describe(`Allow sandboxed plugins to communicate via IPC`),transport:d([`message-port`,`unix-socket`,`tcp`,`memory`]).default(`message-port`).describe(`IPC transport for cross-boundary communication`),maxMessageSize:p().int().min(1024).default(1048576).describe(`Maximum IPC message size in bytes (default 1MB)`),timeout:p().int().min(100).default(3e4).describe(`IPC message response timeout in ms`),allowedServices:l(e()).optional().describe(`Service names the sandboxed plugin may invoke via IPC`)}).optional()}).describe(`Plugin sandboxing configuration`)),Xe=_(()=>h({enabled:f().default(!1),metrics:l(d([`load-time`,`init-time`,`memory-usage`,`cpu-usage`,`api-calls`,`error-rate`,`cache-hit-rate`])).optional(),samplingRate:p().min(0).max(1).default(1),reportingInterval:p().int().min(1).default(60),budgets:h({maxLoadTimeMs:p().int().min(0).optional(),maxInitTimeMs:p().int().min(0).optional(),maxMemoryMB:p().int().min(0).optional()}).optional(),onBudgetViolation:d([`warn`,`error`,`ignore`]).default(`warn`)}).describe(`Plugin performance monitoring configuration`)),Ze=_(()=>h({strategy:Ve.default(`lazy`),preload:He.optional(),codeSplitting:Ue.optional(),dynamicImport:We.optional(),initialization:Ge.optional(),dependencyResolution:Ke.optional(),hotReload:qe.optional(),caching:Je.optional(),sandboxing:Ye.optional(),monitoring:Xe.optional()}).describe(`Complete plugin loading configuration`));_(()=>h({type:d([`load-started`,`load-completed`,`load-failed`,`init-started`,`init-completed`,`init-failed`,`preload-started`,`preload-completed`,`cache-hit`,`cache-miss`,`hot-reload`,`dynamic-load`,`dynamic-unload`,`dynamic-discover`]),pluginId:e(),timestamp:p().int().min(0),durationMs:p().int().min(0).optional(),metadata:m(e(),t()).optional(),error:h({message:e(),code:e().optional(),stack:e().optional()}).optional()}).describe(`Plugin loading lifecycle event`)),_(()=>h({pluginId:e(),state:d([`pending`,`loading`,`loaded`,`initializing`,`ready`,`failed`,`reloading`,`unloading`,`unloaded`]),progress:p().min(0).max(100).default(0),startedAt:p().int().min(0).optional(),completedAt:p().int().min(0).optional(),lastError:e().optional(),retryCount:p().int().min(0).default(0)}).describe(`Plugin loading state`)),_(()=>h({ql:h({object:c().describe(`Get object handle for method chaining`),query:c().describe(`Execute a query`)}).passthrough().describe(`ObjectQL Engine Interface`),os:h({getCurrentUser:c().describe(`Get the current authenticated user`),getConfig:c().describe(`Get platform configuration`)}).passthrough().describe(`ObjectStack Kernel Interface`),logger:h({debug:c().describe(`Log debug message`),info:c().describe(`Log info message`),warn:c().describe(`Log warning message`),error:c().describe(`Log error message`)}).passthrough().describe(`Logger Interface`),storage:h({get:c().describe(`Get a value from storage`),set:c().describe(`Set a value in storage`),delete:c().describe(`Delete a value from storage`)}).passthrough().describe(`Storage Interface`),i18n:h({t:c().describe(`Translate a key`),getLocale:c().describe(`Get current locale`)}).passthrough().describe(`Internationalization Interface`),metadata:m(e(),t()),events:m(e(),t()),app:h({router:h({get:c().describe(`Register GET route handler`),post:c().describe(`Register POST route handler`),use:c().describe(`Register middleware`)}).passthrough()}).passthrough().describe(`App Framework Interface`),drivers:h({register:c().describe(`Register a driver`)}).passthrough().describe(`Driver Registry`)})),_(()=>h({previousVersion:e().describe(`Version before upgrade`),newVersion:e().describe(`Version after upgrade`),isMajorUpgrade:f().describe(`Whether this is a major version bump`),previousMetadata:m(e(),t()).optional().describe(`Metadata snapshot before upgrade`)}).describe(`Version migration context for onUpgrade hook`));var Qe=_(()=>h({onInstall:c().optional().describe(`Called when plugin is installed`),onEnable:c().optional().describe(`Called when plugin is enabled`),onDisable:c().optional().describe(`Called when plugin is disabled`),onUninstall:c().optional().describe(`Called when plugin is uninstalled`),onUpgrade:c().optional().describe(`Called when plugin is upgraded. Receives UpgradeContext with previousVersion, newVersion, and isMajorUpgrade`)})),$e=[`ui`,`driver`,`server`,`app`,`theme`,`agent`,`objectql`];_(()=>Qe.extend({id:e().min(1).optional().describe(`Unique Plugin ID (e.g. com.example.crm)`),type:d([`standard`,...$e]).default(`standard`).optional().describe(`Plugin Type categorization for runtime behavior`),staticPath:e().optional().describe(`Absolute path to static assets (Required for type="ui-plugin")`),slug:e().regex(/^[a-z0-9-_]+$/).optional().describe(`URL path segment (Required for type="ui-plugin")`),default:f().optional().describe(`Serve at root path (Only one "ui-plugin" can be default)`),version:e().regex(/^\d+\.\d+\.\d+$/).optional().describe(`Semantic Version`),description:e().optional(),author:e().optional(),homepage:e().url().optional()}));var et=d([`insert`,`update`,`upsert`,`replace`,`ignore`]),tt=_(()=>h({object:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Target Object Name`),externalId:e().default(`name`).describe(`Field match for uniqueness check`),mode:et.default(`upsert`).describe(`Conflict resolution strategy`),env:l(d([`prod`,`dev`,`test`])).default([`prod`,`dev`,`test`]).describe(`Applicable environments`),records:l(m(e(),t())).describe(`Data records`)})),nt=h({id:e().describe(`Unique package identifier (reverse domain style)`),namespace:e().regex(/^[a-z][a-z0-9_]{1,19}$/,`Namespace must be 2-20 chars, lowercase alphanumeric + underscore`).optional().describe(`Short namespace identifier for metadata scoping (e.g. "crm", "todo")`),defaultDatasource:e().optional().default(`default`).describe(`Default datasource for all objects in this package`),version:e().regex(/^\d+\.\d+\.\d+$/).describe(`Package version (semantic versioning)`),type:d([`plugin`,...$e,`module`,`gateway`,`adapter`]).describe(`Type of package`),scope:d([`cloud`,`system`,`project`]).default(`project`).describe(`Deployment scope: cloud | system | project`),name:e().describe(`Human-readable package name`),description:e().optional().describe(`Package description`),permissions:l(e()).optional().describe(`Array of required permission strings`),objects:l(e()).optional().describe(`Glob patterns for ObjectQL schemas files`),datasources:l(e()).optional().describe(`Glob patterns for Datasource definitions`),dependencies:m(e(),e()).optional().describe(`Package dependencies`),configuration:h({title:e().optional(),properties:m(e(),h({type:d([`string`,`number`,`boolean`,`array`,`object`]).describe(`Data type of the setting`),default:t().optional().describe(`Default value`),description:e().optional().describe(`Tooltip description`),required:f().optional().describe(`Is this setting required?`),secret:f().optional().describe(`If true, value is encrypted/masked (e.g. API Keys)`),enum:l(e()).optional().describe(`Allowed values for select inputs`)})).describe(`Map of configuration keys to their definitions`)}).optional().describe(`Plugin configuration settings`),contributes:h({kinds:l(h({id:e().describe(`The generic identifier of the kind (e.g., "sys.bi.report")`),globs:l(e()).describe(`File patterns to watch (e.g., ["**/*.report.ts"])`),description:e().optional().describe(`Description of what this kind represents`)})).optional().describe(`New Metadata Types to recognize`),events:l(e()).optional().describe(`Events this plugin listens to`),menus:m(e(),l(h({id:e(),label:e(),command:e().optional()}))).optional().describe(`UI Menu contributions`),themes:l(h({id:e(),label:e(),path:e()})).optional().describe(`Theme contributions`),translations:l(h({locale:e(),path:e()})).optional().describe(`Translation resources`),actions:l(h({name:e().describe(`Unique action name`),label:e().optional(),description:e().optional(),input:t().optional().describe(`Input validation schema`),output:t().optional().describe(`Output schema`)})).optional().describe(`Exposed server actions`),drivers:l(h({id:e().describe(`Driver unique identifier (e.g. "postgres", "mongo")`),label:e().describe(`Human readable name`),description:e().optional()})).optional().describe(`Driver contributions`),fieldTypes:l(h({name:e().describe(`Unique field type name (e.g. "vector")`),label:e().describe(`Display label`),description:e().optional()})).optional().describe(`Field Type contributions`),functions:l(h({name:e().describe(`Function name (e.g. "distance")`),description:e().optional(),args:l(e()).optional().describe(`Argument types`),returnType:e().optional()})).optional().describe(`Query Function contributions`),routes:l(h({prefix:e().regex(/^\//).describe(`API path prefix`),service:e().describe(`Service name this plugin provides`),methods:l(e()).optional().describe(`Protocol method names implemented (e.g. ["aiNlq", "aiChat"])`)})).optional().describe(`API route contributions to HttpDispatcher`),commands:l(h({name:e().regex(/^[a-z][a-z0-9-]*$/,`Command name must be lowercase alphanumeric with hyphens`).describe(`CLI command name`),description:e().optional().describe(`Command description for help text`),module:e().optional().describe(`Module path exporting Commander.js commands`)})).optional().describe(`CLI command contributions`)}).optional().describe(`Platform contributions`),data:l(tt).optional().describe(`Initial seed data (prefer top-level data field)`),capabilities:Be.optional().describe(`Plugin capability declarations for interoperability`),extensions:m(e(),t()).optional().describe(`Extension points and contributions`),loading:Ze.optional().describe(`Plugin loading and runtime behavior configuration`),engine:h({objectstack:e().regex(/^[><=~^]*\d+\.\d+\.\d+/).describe(`ObjectStack platform version requirement (SemVer range, e.g. ">=3.0.0")`)}).optional().describe(`Platform compatibility requirements`)}),rt=e().describe(`Underlying driver identifier`);_(()=>h({id:e().describe(`Unique driver identifier (e.g. "postgres")`),label:e().describe(`Display label (e.g. "PostgreSQL")`),description:e().optional(),icon:e().optional(),configSchema:m(e(),t()).describe(`JSON Schema for connection configuration`),capabilities:s(()=>D).optional()}));var D=h({transactions:f().default(!1),queryFilters:f().default(!1),queryAggregations:f().default(!1),querySorting:f().default(!1),queryPagination:f().default(!1),queryWindowFunctions:f().default(!1),querySubqueries:f().default(!1),joins:f().default(!1),fullTextSearch:f().default(!1),readOnly:f().default(!1),dynamicSchema:f().default(!1)}),it=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique datasource identifier`),label:e().optional().describe(`Display label`),driver:rt.describe(`Underlying driver type`),config:m(e(),t()).describe(`Driver specific configuration`),pool:h({min:p().default(0).describe(`Minimum connections`),max:p().default(10).describe(`Maximum connections`),idleTimeoutMillis:p().default(3e4).describe(`Idle timeout`),connectionTimeoutMillis:p().default(3e3).describe(`Connection establishment timeout`)}).optional().describe(`Connection pool settings`),readReplicas:l(m(e(),t())).optional().describe(`Read-only replica configurations`),capabilities:D.optional().describe(`Capability overrides`),healthCheck:h({enabled:f().default(!0).describe(`Enable health check endpoint`),intervalMs:p().default(3e4).describe(`Health check interval in milliseconds`),timeoutMs:p().default(5e3).describe(`Health check timeout in milliseconds`)}).optional().describe(`Datasource health check configuration`),ssl:h({enabled:f().default(!1).describe(`Enable SSL/TLS for database connection`),rejectUnauthorized:f().default(!0).describe(`Reject connections with invalid/self-signed certificates`),ca:e().optional().describe(`CA certificate (PEM format or path to file)`),cert:e().optional().describe(`Client certificate (PEM format or path to file)`),key:e().optional().describe(`Client private key (PEM format or path to file)`)}).optional().describe(`SSL/TLS configuration for secure database connections`),retryPolicy:h({maxRetries:p().default(3).describe(`Maximum number of retry attempts`),baseDelayMs:p().default(1e3).describe(`Base delay between retries in milliseconds`),maxDelayMs:p().default(3e4).describe(`Maximum delay between retries in milliseconds`),backoffMultiplier:p().default(2).describe(`Exponential backoff multiplier`)}).optional().describe(`Connection retry policy for transient failures`),description:e().optional().describe(`Internal description`),active:f().default(!0).describe(`Is datasource enabled`)})),O=_(()=>e().describe(`BCP-47 Language Tag (e.g. en-US, zh-CN)`)),at=_(()=>h({label:e().optional().describe(`Translated field label`),help:e().optional().describe(`Translated help text`),placeholder:e().optional().describe(`Translated placeholder text for form inputs`),options:m(e(),e()).optional().describe(`Option value to translated label map`)}).describe(`Translation data for a single field`)),ot=_(()=>h({label:e().describe(`Translated singular label`),pluralLabel:e().optional().describe(`Translated plural label`),description:e().optional().describe(`Translated object description`),fields:m(e(),at).optional().describe(`Field-level translations`),_views:m(e(),h({label:e().optional().describe(`Translated view label`),description:e().optional().describe(`Translated view description`)})).optional().describe(`View translations keyed by view name`),_actions:m(e(),h({label:e().optional().describe(`Translated action label`),confirmText:e().optional().describe(`Translated confirmation prompt`),successMessage:e().optional().describe(`Translated success toast/message`)})).optional().describe(`Action translations keyed by action name`)}).describe(`Translation data for a single object`)),st=_(()=>h({objects:m(e(),ot).optional().describe(`Object translations keyed by object name`),apps:m(e(),h({label:e().describe(`Translated app label`),description:e().optional().describe(`Translated app description`),navigation:m(e(),h({label:e().describe(`Translated navigation group label`)})).optional().describe(`Navigation group translations keyed by group ID`)})).optional().describe(`App translations keyed by app name`),messages:m(e(),e()).optional().describe(`UI message translations keyed by message ID`),validationMessages:m(e(),e()).optional().describe(`Translatable validation error messages keyed by rule name (e.g., {"discount_limit": "折扣不能超过40%"})`),globalActions:m(e(),h({label:e().optional().describe(`Translated action label`),confirmText:e().optional().describe(`Translated confirmation prompt`),successMessage:e().optional().describe(`Translated success toast/message`)})).optional().describe(`Global action translations keyed by action name`),dashboards:m(e(),h({label:e().optional().describe(`Translated dashboard title`),description:e().optional().describe(`Translated dashboard description`),actions:m(e(),h({label:e().optional().describe(`Translated header action label`)})).optional().describe(`Header action label translations keyed by action url/key`),widgets:m(e(),h({title:e().optional().describe(`Translated widget title`),description:e().optional().describe(`Translated widget description`)})).optional().describe(`Widget translations keyed by widget id`)})).optional().describe(`Dashboard translations keyed by dashboard name`)}).describe(`Translation data for objects, apps, and UI messages`)),ct=_(()=>m(O,st).describe(`Map of locale codes to translation data`)),lt=_(()=>d([`bundled`,`per_locale`,`per_namespace`]).describe(`Translation file organization strategy`)),ut=_(()=>d([`icu`,`simple`]).describe(`Message interpolation format: ICU MessageFormat or simple {variable} replacement`)),dt=_(()=>h({defaultLocale:O.describe(`Default locale (e.g., "en")`),supportedLocales:l(O).describe(`Supported BCP-47 locale codes`),fallbackLocale:O.optional().describe(`Fallback locale code`),fileOrganization:lt.default(`per_locale`).describe(`File organization strategy`),messageFormat:ut.default(`simple`).describe(`Message interpolation format (ICU MessageFormat or simple)`),lazyLoad:f().default(!1).describe(`Load translations on demand`),cache:f().default(!0).describe(`Cache loaded translations`)}).describe(`Internationalization configuration`)),ft=m(e(),e()).describe(`Option value to translated label map`),pt=_(()=>h({label:e().describe(`Translated singular label`),pluralLabel:e().optional().describe(`Translated plural label`),description:e().optional().describe(`Translated object description`),helpText:e().optional().describe(`Translated help text for the object`),fields:m(e(),at).optional().describe(`Field translations keyed by field name`),_options:m(e(),ft).optional().describe(`Object-scoped picklist option translations keyed by field name`),_views:m(e(),h({label:e().optional().describe(`Translated view label`),description:e().optional().describe(`Translated view description`)})).optional().describe(`View translations keyed by view name`),_sections:m(e(),h({label:e().optional().describe(`Translated section label`)})).optional().describe(`Section translations keyed by section name`),_actions:m(e(),h({label:e().optional().describe(`Translated action label`),confirmMessage:e().optional().describe(`Translated confirmation message`)})).optional().describe(`Action translations keyed by action name`),_notifications:m(e(),h({title:e().optional().describe(`Translated notification title`),body:e().optional().describe(`Translated notification body (supports ICU MessageFormat when enabled)`)})).optional().describe(`Notification translations keyed by notification name`),_errors:m(e(),e()).optional().describe(`Error message translations keyed by error code`)}).describe(`Object-first aggregated translation node`));_(()=>h({_meta:h({locale:e().optional().describe(`BCP-47 locale code for this bundle`),direction:d([`ltr`,`rtl`]).optional().describe(`Text direction: left-to-right or right-to-left`)}).optional().describe(`Bundle-level metadata (locale, bidi direction)`),namespace:e().optional().describe(`Namespace for plugin isolation to avoid translation key collisions`),o:m(e(),pt).optional().describe(`Object-first translations keyed by object name`),_globalOptions:m(e(),ft).optional().describe(`Global picklist option translations keyed by option set name`),app:m(e(),h({label:e().describe(`Translated app label`),description:e().optional().describe(`Translated app description`)})).optional().describe(`App translations keyed by app name`),nav:m(e(),e()).optional().describe(`Navigation item translations keyed by nav item name`),dashboard:m(e(),h({label:e().optional().describe(`Translated dashboard label`),description:e().optional().describe(`Translated dashboard description`)})).optional().describe(`Dashboard translations keyed by dashboard name`),reports:m(e(),h({label:e().optional().describe(`Translated report label`),description:e().optional().describe(`Translated report description`)})).optional().describe(`Report translations keyed by report name`),pages:m(e(),h({title:e().optional().describe(`Translated page title`),description:e().optional().describe(`Translated page description`)})).optional().describe(`Page translations keyed by page name`),messages:m(e(),e()).optional().describe(`UI message translations keyed by message ID (supports ICU MessageFormat)`),validationMessages:m(e(),e()).optional().describe(`Validation error message translations keyed by rule name (supports ICU MessageFormat)`),notifications:m(e(),h({title:e().optional().describe(`Translated notification title`),body:e().optional().describe(`Translated notification body (supports ICU MessageFormat when enabled)`)})).optional().describe(`Global notification translations keyed by notification name`),errors:m(e(),e()).optional().describe(`Global error message translations keyed by error code`)}).describe(`Object-first application translation bundle for a single locale`));var mt=_(()=>d([`missing`,`redundant`,`stale`]).describe(`Translation diff status: missing from bundle, redundant (no matching metadata), or stale (metadata changed)`)),ht=_(()=>h({key:e().describe(`Dot-path translation key`),status:mt.describe(`Diff status of this translation key`),objectName:e().optional().describe(`Associated object name (snake_case)`),locale:e().describe(`BCP-47 locale code`),sourceHash:e().optional().describe(`Hash of source metadata for precise stale detection`),aiSuggested:e().optional().describe(`AI-suggested translation for this key`),aiConfidence:p().min(0).max(1).optional().describe(`AI suggestion confidence score (0–1)`)}).describe(`A single translation diff item`)),gt=_(()=>h({group:e().describe(`Translation group category`),totalKeys:p().int().nonnegative().describe(`Total keys in this group`),translatedKeys:p().int().nonnegative().describe(`Translated keys in this group`),coveragePercent:p().min(0).max(100).describe(`Coverage percentage for this group`)}).describe(`Coverage breakdown for a single translation group`));_(()=>h({locale:e().describe(`BCP-47 locale code`),objectName:e().optional().describe(`Object name scope (omit for full bundle)`),totalKeys:p().int().nonnegative().describe(`Total translatable keys from metadata`),translatedKeys:p().int().nonnegative().describe(`Number of translated keys`),missingKeys:p().int().nonnegative().describe(`Number of missing translations`),redundantKeys:p().int().nonnegative().describe(`Number of redundant translations`),staleKeys:p().int().nonnegative().describe(`Number of stale translations`),coveragePercent:p().min(0).max(100).describe(`Translation coverage percentage`),items:l(ht).describe(`Detailed diff items`),breakdown:l(gt).optional().describe(`Per-group coverage breakdown`)}).describe(`Aggregated translation coverage result`));var _t=_(()=>e().min(2,{message:`System identifier must be at least 2 characters`}).regex(/^[a-z][a-z0-9_.]*$/,{message:`System identifier must be lowercase, starting with a letter, and may contain letters, numbers, underscores, or dots (e.g., "user_profile" or "order.created")`}).describe(`System identifier (lowercase with underscores or dots)`)),k=_(()=>e().min(2,{message:`Identifier must be at least 2 characters`}).regex(/^[a-z][a-z0-9_]*$/,{message:`Identifier must be lowercase snake_case, starting with a letter, and may contain only letters, numbers, and underscores (e.g., "user_profile")`}).describe(`Snake case identifier (lowercase with underscores only)`));_(()=>e().min(3,{message:`Event name must be at least 3 characters`}).regex(/^[a-z][a-z0-9_.]*$/,{message:`Event name must be lowercase with dots for namespacing (e.g., "user.created", "order.paid")`}).describe(`Event name (lowercase with dot notation for namespacing)`));var vt=d([`cel`,`js`,`cron`,`template`]),yt=h({rationale:e().optional(),generatedBy:e().optional()}),A=h({dialect:vt,source:e().min(1).optional(),ast:t().optional(),meta:yt.optional()}).refine(e=>e.source!==void 0||e.ast!==void 0,{message:"Expression requires at least one of `source` or `ast`"}),j=n([e().min(1).transform(e=>({dialect:`cel`,source:e})),A]),bt=n([e().min(1).transform(e=>({dialect:`cron`,source:e})),A]),xt=n([e().min(1).transform(e=>({dialect:`template`,source:e})),A]),St=_(()=>d([`aes-256-gcm`,`aes-256-cbc`,`chacha20-poly1305`]).describe(`Supported encryption algorithm`)),Ct=_(()=>d([`local`,`aws-kms`,`azure-key-vault`,`gcp-kms`,`hashicorp-vault`]).describe(`Key management service provider`)),wt=_(()=>h({enabled:f().default(!1).describe(`Enable automatic key rotation`),frequencyDays:p().min(1).default(90).describe(`Rotation frequency in days`),retainOldVersions:p().default(3).describe(`Number of old key versions to retain`),autoRotate:f().default(!0).describe(`Automatically rotate without manual approval`)}).describe(`Policy for automatic encryption key rotation`)),Tt=_(()=>h({enabled:f().default(!1).describe(`Enable field-level encryption`),algorithm:St.default(`aes-256-gcm`).describe(`Encryption algorithm`),keyManagement:h({provider:Ct.describe(`Key management service provider`),keyId:e().optional().describe(`Key identifier in the provider`),rotationPolicy:wt.optional().describe(`Key rotation policy`)}).describe(`Key management configuration`),scope:d([`field`,`record`,`table`,`database`]).describe(`Encryption scope level`),deterministicEncryption:f().default(!1).describe(`Allows equality queries on encrypted data`),searchableEncryption:f().default(!1).describe(`Allows search on encrypted data`)}).describe(`Field-level encryption configuration`));_(()=>h({fieldName:e().describe(`Name of the field to encrypt`),encryptionConfig:Tt.describe(`Encryption settings for this field`),indexable:f().default(!1).describe(`Allow indexing on encrypted field`)}).describe(`Per-field encryption assignment`));var Et=_(()=>d([`redact`,`partial`,`hash`,`tokenize`,`randomize`,`nullify`,`substitute`]).describe(`Data masking strategy for PII protection`)),Dt=_(()=>h({field:e().describe(`Field name to apply masking to`),strategy:Et.describe(`Masking strategy to use`),pattern:e().optional().describe(`Regex pattern for partial masking`),preserveFormat:f().default(!0).describe(`Keep the original data format after masking`),preserveLength:f().default(!0).describe(`Keep the original data length after masking`),roles:l(e()).optional().describe(`Roles that see masked data`),exemptRoles:l(e()).optional().describe(`Roles that see unmasked data`)}).describe(`Masking rule for a single field`));_(()=>h({enabled:f().default(!1).describe(`Enable data masking`),rules:l(Dt).describe(`List of field-level masking rules`),auditUnmasking:f().default(!0).describe(`Log when masked data is accessed unmasked`)}).describe(`Top-level data masking configuration for PII protection`));var Ot=d(`text.textarea.email.url.phone.password.markdown.html.richtext.number.currency.percent.date.datetime.time.boolean.toggle.select.multiselect.radio.checkboxes.lookup.master_detail.tree.image.file.avatar.video.audio.formula.summary.autonumber.location.address.code.json.color.rating.slider.signature.qrcode.progress.tags.vector`.split(`.`)),kt=_(()=>h({label:e().describe(`Display label (human-readable, any case allowed)`),value:_t.describe(`Stored value (lowercase machine identifier)`),color:e().optional().describe(`Color code for badges/charts`),default:f().optional().describe(`Is default option`)}));_(()=>h({latitude:p().min(-90).max(90).describe(`Latitude coordinate`),longitude:p().min(-180).max(180).describe(`Longitude coordinate`),altitude:p().optional().describe(`Altitude in meters`),accuracy:p().optional().describe(`Accuracy in meters`)}));var At=_(()=>h({precision:p().int().min(0).max(10).default(2).describe(`Decimal precision (default: 2)`),currencyMode:d([`dynamic`,`fixed`]).default(`dynamic`).describe(`Currency mode: dynamic (user selectable) or fixed (single currency)`),defaultCurrency:e().length(3).default(`CNY`).describe(`Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)`)}));_(()=>h({value:p().describe(`Monetary amount`),currency:e().length(3).describe(`Currency code (ISO 4217)`)})),_(()=>h({street:e().optional().describe(`Street address`),city:e().optional().describe(`City name`),state:e().optional().describe(`State/Province`),postalCode:e().optional().describe(`Postal/ZIP code`),country:e().optional().describe(`Country name or code`),countryCode:e().optional().describe(`ISO country code (e.g., US, GB)`),formatted:e().optional().describe(`Formatted address string`)}));var jt=_(()=>h({dimensions:p().int().min(1).max(1e4).describe(`Vector dimensionality (e.g., 1536 for OpenAI embeddings)`),distanceMetric:d([`cosine`,`euclidean`,`dotProduct`,`manhattan`]).default(`cosine`).describe(`Distance/similarity metric for vector search`),normalized:f().default(!1).describe(`Whether vectors are normalized (unit length)`),indexed:f().default(!0).describe(`Whether to create a vector index for fast similarity search`),indexType:d([`hnsw`,`ivfflat`,`flat`]).optional().describe(`Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets)`)})),Mt=_(()=>h({minSize:p().min(0).optional().describe(`Minimum file size in bytes`),maxSize:p().min(1).optional().describe(`Maximum file size in bytes (e.g., 10485760 = 10MB)`),allowedTypes:l(e()).optional().describe(`Allowed file extensions (e.g., [".pdf", ".docx", ".jpg"])`),blockedTypes:l(e()).optional().describe(`Blocked file extensions (e.g., [".exe", ".bat", ".sh"])`),allowedMimeTypes:l(e()).optional().describe(`Allowed MIME types (e.g., ["image/jpeg", "application/pdf"])`),blockedMimeTypes:l(e()).optional().describe(`Blocked MIME types`),virusScan:f().default(!1).describe(`Enable virus scanning for uploaded files`),virusScanProvider:d([`clamav`,`virustotal`,`metadefender`,`custom`]).optional().describe(`Virus scanning service provider`),virusScanOnUpload:f().default(!0).describe(`Scan files immediately on upload`),quarantineOnThreat:f().default(!0).describe(`Quarantine files if threat detected`),storageProvider:e().optional().describe(`Object storage provider name (references ObjectStorageConfig)`),storageBucket:e().optional().describe(`Target bucket name`),storagePrefix:e().optional().describe(`Storage path prefix (e.g., "uploads/documents/")`),imageValidation:h({minWidth:p().min(1).optional().describe(`Minimum image width in pixels`),maxWidth:p().min(1).optional().describe(`Maximum image width in pixels`),minHeight:p().min(1).optional().describe(`Minimum image height in pixels`),maxHeight:p().min(1).optional().describe(`Maximum image height in pixels`),aspectRatio:e().optional().describe(`Required aspect ratio (e.g., "16:9", "1:1")`),generateThumbnails:f().default(!1).describe(`Auto-generate thumbnails`),thumbnailSizes:l(h({name:e().describe(`Thumbnail variant name (e.g., "small", "medium", "large")`),width:p().min(1).describe(`Thumbnail width in pixels`),height:p().min(1).describe(`Thumbnail height in pixels`),crop:f().default(!1).describe(`Crop to exact dimensions`)})).optional().describe(`Thumbnail size configurations`),preserveMetadata:f().default(!1).describe(`Preserve EXIF metadata`),autoRotate:f().default(!0).describe(`Auto-rotate based on EXIF orientation`)}).optional().describe(`Image-specific validation rules`),allowMultiple:f().default(!1).describe(`Allow multiple file uploads (overrides field.multiple)`),allowReplace:f().default(!0).describe(`Allow replacing existing files`),allowDelete:f().default(!0).describe(`Allow deleting uploaded files`),requireUpload:f().default(!1).describe(`Require at least one file when field is required`),extractMetadata:f().default(!0).describe(`Extract file metadata (name, size, type, etc.)`),extractText:f().default(!1).describe(`Extract text content from documents (OCR/parsing)`),versioningEnabled:f().default(!1).describe(`Keep previous versions of replaced files`),maxVersions:p().min(1).optional().describe(`Maximum number of versions to retain`),publicRead:f().default(!1).describe(`Allow public read access to uploaded files`),presignedUrlExpiry:p().min(60).max(604800).default(3600).describe(`Presigned URL expiration in seconds (default: 1 hour)`)}).refine(e=>!(e.minSize!==void 0&&e.maxSize!==void 0&&e.minSize>e.maxSize),{message:`minSize must be less than or equal to maxSize`}).refine(e=>!(e.virusScanProvider!==void 0&&e.virusScan!==!0),{message:`virusScanProvider requires virusScan to be enabled`})),Nt=_(()=>h({uniqueness:f().default(!1).describe(`Enforce unique values across all records`),completeness:p().min(0).max(1).default(0).describe(`Minimum ratio of non-null values (0-1, default: 0 = no requirement)`),accuracy:h({source:e().describe(`Reference data source for validation (e.g., "api.verify.com", "master_data")`),threshold:p().min(0).max(1).describe(`Minimum accuracy threshold (0-1, e.g., 0.95 = 95% match required)`)}).optional().describe(`Accuracy validation configuration`)})),Pt=_(()=>h({enabled:f().describe(`Enable caching for computed field results`),ttl:p().min(0).describe(`Cache TTL in seconds (0 = no expiration)`),invalidateOn:l(e()).describe(`Field paths that invalidate cache (e.g., ["inventory.quantity", "pricing.base_price"])`)})),Ft=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Machine name (snake_case)`).optional(),label:e().optional().describe(`Human readable label`),type:Ot.describe(`Field Data Type`),description:e().optional().describe(`Tooltip/Help text`),format:e().optional().describe(`Format string (e.g. email, phone)`),columnName:e().optional().describe(`Physical column name in the target datasource. Defaults to the field key when not set.`),required:f().default(!1).describe(`Is required`),searchable:f().default(!1).describe(`Is searchable`),multiple:f().default(!1).describe(`Allow multiple values (Stores as Array/JSON). Applicable for select, lookup, file, image.`),unique:f().default(!1).describe(`Is unique constraint`),defaultValue:t().optional().describe(`Default value`),maxLength:p().optional().describe(`Max character length`),minLength:p().optional().describe(`Min character length`),precision:p().optional().describe(`Total digits`),scale:p().optional().describe(`Decimal places`),min:p().optional().describe(`Minimum value`),max:p().optional().describe(`Maximum value`),options:l(kt).optional().describe(`Static options for select/multiselect`),reference:e().optional().describe(`Target object name (snake_case) for lookup/master_detail fields. Required for relationship types. Used by $expand to resolve foreign key IDs into full objects.`),referenceFilters:l(e()).optional().describe(`Filters applied to lookup dialogs (e.g. "active = true")`),writeRequiresMasterRead:f().optional().describe(`If true, user needs read access to master record to edit this field`),deleteBehavior:d([`set_null`,`cascade`,`restrict`]).optional().default(`set_null`).describe(`What happens if referenced record is deleted`),expression:j.optional().describe("Formula expression (CEL). e.g. F`record.amount * 0.1`"),summaryOperations:h({object:e().describe(`Source child object name for roll-up`),field:e().describe(`Field on child object to aggregate`),function:d([`count`,`sum`,`min`,`max`,`avg`]).describe(`Aggregation function to apply`)}).optional().describe(`Roll-up summary definition`),language:e().optional().describe(`Programming language for syntax highlighting (e.g., javascript, python, sql)`),theme:e().optional().describe(`Code editor theme (e.g., dark, light, monokai)`),lineNumbers:f().optional().describe(`Show line numbers in code editor`),maxRating:p().optional().describe(`Maximum rating value (default: 5)`),allowHalf:f().optional().describe(`Allow half-star ratings`),displayMap:f().optional().describe(`Display map widget for location field`),allowGeocoding:f().optional().describe(`Allow address-to-coordinate conversion`),addressFormat:d([`us`,`uk`,`international`]).optional().describe(`Address format template`),colorFormat:d([`hex`,`rgb`,`rgba`,`hsl`]).optional().describe(`Color value format`),allowAlpha:f().optional().describe(`Allow transparency/alpha channel`),presetColors:l(e()).optional().describe(`Preset color options`),step:p().optional().describe(`Step increment for slider (default: 1)`),showValue:f().optional().describe(`Display current value on slider`),marks:m(e(),e()).optional().describe(`Custom marks/labels at specific values (e.g., {0: "Low", 50: "Medium", 100: "High"})`),barcodeFormat:d([`qr`,`ean13`,`ean8`,`code128`,`code39`,`upca`,`upce`]).optional().describe(`Barcode format type`),qrErrorCorrection:d([`L`,`M`,`Q`,`H`]).optional().describe(`QR code error correction level (L=7%, M=15%, Q=25%, H=30%). Only applicable when barcodeFormat is "qr"`),displayValue:f().optional().describe(`Display human-readable value below barcode/QR code`),allowScanning:f().optional().describe(`Enable camera scanning for barcode/QR code input`),currencyConfig:At.optional().describe(`Configuration for currency field type`),vectorConfig:jt.optional().describe(`Configuration for vector field type (AI/ML embeddings)`),fileAttachmentConfig:Mt.optional().describe(`Configuration for file and attachment field types`),encryptionConfig:Tt.optional().describe(`Field-level encryption configuration for sensitive data (GDPR/HIPAA/PCI-DSS)`),maskingRule:Dt.optional().describe(`Data masking rules for PII protection`),auditTrail:f().default(!1).describe(`Enable detailed audit trail for this field (tracks all changes with user and timestamp)`),dependencies:l(e()).optional().describe(`Array of field names that this field depends on (for formulas, visibility rules, etc.)`),cached:Pt.optional().describe(`Caching configuration for computed/formula fields`),dataQuality:Nt.optional().describe(`Data quality validation and monitoring rules`),group:e().optional().describe(`Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system")`),conditionalRequired:j.optional().describe("Predicate (CEL) — field is required when TRUE. e.g. P`record.status == 'closed_won'`"),hidden:f().default(!1).describe(`Hidden from default UI`),readonly:f().default(!1).describe(`Read-only in UI`),sortable:f().optional().default(!0).describe(`Whether field is sortable in list views`),inlineHelpText:e().optional().describe(`Help text displayed below the field in forms`),trackFeedHistory:f().optional().describe(`Track field changes in Chatter/activity feed (Salesforce pattern)`),caseSensitive:f().optional().describe(`Whether text comparisons are case-sensitive`),autonumberFormat:e().optional().describe(`Auto-number display format pattern (e.g., "CASE-{0000}")`),index:f().default(!1).describe(`Create standard database index`),externalId:f().default(!1).describe(`Is external ID for upsert operations`)}));Object.fromEntries(Object.entries({objects:`object`,apps:`app`,pages:`page`,dashboards:`dashboard`,reports:`report`,actions:`action`,themes:`theme`,workflows:`workflow`,approvals:`approval`,flows:`flow`,roles:`role`,permissions:`permission`,profiles:`profile`,sharingRules:`sharingRule`,policies:`policy`,apis:`api`,webhooks:`webhook`,agents:`agent`,ragPipelines:`ragPipeline`,hooks:`hook`,mappings:`mapping`,analyticsCubes:`analyticsCube`,connectors:`connector`,datasources:`datasource`,views:`view`}).map(([e,t])=>[t,e]));var M=h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique rule name (snake_case)`),label:e().optional().describe(`Human-readable label for the rule listing`),description:e().optional().describe(`Administrative notes explaining the business reason`),active:f().default(!0),events:l(d([`insert`,`update`,`delete`])).default([`insert`,`update`]).describe(`Validation contexts`),priority:p().int().min(0).max(9999).default(100).describe(`Execution priority (lower runs first, default: 100)`),tags:l(e()).optional().describe(`Categorization tags (e.g., "compliance", "billing")`),severity:d([`error`,`warning`,`info`]).default(`error`),message:e().describe(`Error message to display to the user`)}),It=_(()=>M.extend({type:o(`script`),condition:j.describe("Predicate (CEL). If TRUE, validation fails. e.g. P`record.amount < 0`")})),Lt=_(()=>M.extend({type:o(`unique`),fields:l(e()).describe(`Fields that must be combined unique`),scope:j.optional().describe("Predicate (CEL) limiting uniqueness scope. e.g. P`record.active == true`"),caseSensitive:f().default(!0)})),Rt=_(()=>M.extend({type:o(`state_machine`),field:e().describe(`State field (e.g. status)`),transitions:m(e(),l(e())).describe(`Map of { OldState: [AllowedNewStates] }`)})),zt=_(()=>M.extend({type:o(`format`),field:e(),regex:e().optional(),format:d([`email`,`url`,`phone`,`json`]).optional()})),Bt=_(()=>M.extend({type:o(`cross_field`),condition:j.describe("Predicate (CEL) comparing fields. e.g. P`record.end_date > record.start_date`"),fields:l(e()).describe(`Fields involved in the validation`)})),Vt=_(()=>M.extend({type:o(`json_schema`),field:e().describe(`JSON field to validate`),schema:m(e(),t()).describe(`JSON Schema object definition`)})),Ht=_(()=>M.extend({type:o(`async`),field:e().describe(`Field to validate`),validatorUrl:e().optional().describe(`External API endpoint for validation`),method:d([`GET`,`POST`]).default(`GET`).describe(`HTTP method for external call`),headers:m(e(),e()).optional().describe(`Custom headers for the request`),validatorFunction:e().optional().describe(`Reference to custom validator function`),timeout:p().optional().default(5e3).describe(`Timeout in milliseconds`),debounce:p().optional().describe(`Debounce delay in milliseconds`),params:m(e(),t()).optional().describe(`Additional parameters to pass to validator`)})),Ut=_(()=>M.extend({type:o(`custom`),handler:e().describe(`Name of the custom validation function registered in the system`),params:m(e(),t()).optional().describe(`Parameters passed to the custom handler`)})),N=s(()=>u(`type`,[It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt])),Wt=_(()=>M.extend({type:o(`conditional`),when:j.describe("Predicate (CEL). e.g. P`record.type == 'enterprise'`"),then:N.describe(`Validation rule to apply when condition is true`),otherwise:N.optional().describe(`Validation rule to apply when condition is false`)})),P=_(()=>n([e().describe(`Action Name`),h({type:e(),params:m(e(),t()).optional()})])),Gt=_(()=>n([e().describe(`Guard Name (e.g., "isManager", "amountGT1000")`),h({type:e(),params:m(e(),t()).optional()})])),F=_(()=>h({target:e().optional().describe(`Target State ID`),cond:Gt.optional().describe(`Condition (Guard) required to take this path`),actions:l(P).optional().describe(`Actions to execute during transition`),description:e().optional().describe(`Human readable description of this rule`)}));_(()=>h({type:e().describe(`Event Type (e.g. "APPROVE", "REJECT", "Submit")`),schema:m(e(),t()).optional().describe(`Expected event payload structure`)}));var Kt=s(()=>h({type:d([`atomic`,`compound`,`parallel`,`final`,`history`]).default(`atomic`),entry:l(P).optional().describe(`Actions to run when entering this state`),exit:l(P).optional().describe(`Actions to run when leaving this state`),on:m(e(),n([e(),F,l(F)])).optional().describe(`Map of Event Type -> Transition Definition`),always:l(F).optional(),initial:e().optional().describe(`Initial child state (if compound)`),states:m(e(),Kt).optional(),meta:h({label:e().optional(),description:e().optional(),color:e().optional(),aiInstructions:e().optional().describe(`Specific instructions for AI when in this state`)}).optional()})),qt=_(()=>h({id:k.describe(`Unique Machine ID`),description:e().optional(),contextSchema:m(e(),t()).optional().describe(`Zod Schema for the machine context/memory`),initial:e().describe(`Initial State ID`),states:m(e(),Kt).describe(`State Nodes`),on:m(e(),n([e(),F,l(F)])).optional()}));_(()=>h({key:e().describe(`Translation key (e.g., "views.task_list.label")`),defaultValue:e().optional().describe(`Fallback value when translation key is not found`),params:m(e(),n([e(),p(),f()])).optional().describe(`Interpolation parameters (e.g., { count: 5 })`)}));var I=_(()=>e().describe(`Display label (plain string; i18n keys are auto-generated by the framework)`)),L=_(()=>h({ariaLabel:I.optional().describe(`Accessible label for screen readers (WAI-ARIA aria-label)`),ariaDescribedBy:e().optional().describe(`ID of element providing additional description (WAI-ARIA aria-describedby)`),role:e().optional().describe(`WAI-ARIA role attribute (e.g., "dialog", "navigation", "alert")`)}).describe(`ARIA accessibility attributes`));_(()=>h({key:e().describe(`Translation key`),zero:e().optional().describe(`Zero form (e.g., "No items")`),one:e().optional().describe(`Singular form (e.g., "{count} item")`),two:e().optional().describe(`Dual form (e.g., "{count} items" for exactly 2)`),few:e().optional().describe(`Few form (e.g., for 2-4 in some languages)`),many:e().optional().describe(`Many form (e.g., for 5+ in some languages)`),other:e().describe(`Default plural form (e.g., "{count} items")`)}).describe(`ICU plural rules for a translation key`));var Jt=_(()=>h({style:d([`decimal`,`currency`,`percent`,`unit`]).default(`decimal`).describe(`Number formatting style`),currency:e().optional().describe(`ISO 4217 currency code (e.g., "USD", "EUR")`),unit:e().optional().describe(`Unit for unit formatting (e.g., "kilometer", "liter")`),minimumFractionDigits:p().optional().describe(`Minimum number of fraction digits`),maximumFractionDigits:p().optional().describe(`Maximum number of fraction digits`),useGrouping:f().optional().describe(`Whether to use grouping separators (e.g., 1,000)`)}).describe(`Number formatting rules`)),Yt=_(()=>h({dateStyle:d([`full`,`long`,`medium`,`short`]).optional().describe(`Date display style`),timeStyle:d([`full`,`long`,`medium`,`short`]).optional().describe(`Time display style`),timeZone:e().optional().describe(`IANA time zone (e.g., "America/New_York")`),hour12:f().optional().describe(`Use 12-hour format`)}).describe(`Date/time formatting rules`));_(()=>h({code:e().describe(`BCP 47 language code (e.g., "en-US", "zh-CN")`),fallbackChain:l(e()).optional().describe(`Fallback language codes in priority order (e.g., ["zh-TW", "en"])`),direction:d([`ltr`,`rtl`]).default(`ltr`).describe(`Text direction: left-to-right or right-to-left`),numberFormat:Jt.optional().describe(`Default number formatting rules`),dateFormat:Yt.optional().describe(`Default date/time formatting rules`)}).describe(`Locale configuration`));var Xt=d([`api.read`,`api.write`,`crypto.uuid`,`crypto.hash`,`log`]),Zt=u(`language`,[h({language:o(`expression`),source:e().min(1).describe(`Formula expression source`)}).describe(`L1 expression body — pure formula, no IO`),h({language:o(`js`),source:e().min(1).describe(`Function body source`),capabilities:l(Xt).default([]).describe(`Granted capability tokens`),timeoutMs:p().int().positive().max(3e4).optional().describe(`Per-invocation timeout (ms)`),memoryMb:p().int().positive().max(256).optional().describe(`Per-invocation memory cap (MB)`)}).describe(`L2 sandboxed JS body — runs inside an isolated VM with declared capabilities`)]).describe(`Hook/Action body — expression (L1) or sandboxed JS (L2)`),Qt=_(()=>h({name:e(),label:I,type:Ot,required:f().default(!1),options:l(h({label:I,value:e()})).optional()})),$t=d([`script`,`url`,`modal`,`flow`,`api`]),en=new Set($t.options.filter(e=>e!==`script`)),tn=_(()=>h({name:k.describe(`Machine name (lowercase snake_case)`),label:I.describe(`Display label`),objectName:e().regex(/^[a-z_][a-z0-9_]*$/).optional().describe(`Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack().`),icon:e().optional().describe(`Icon name`),locations:l(d([`list_toolbar`,`list_item`,`record_header`,`record_more`,`record_related`,`global_nav`])).optional().describe(`Locations where this action is visible`),component:d([`action:button`,`action:icon`,`action:menu`,`action:group`]).optional().describe(`Visual component override`),type:$t.default(`script`).describe(`Action functionality type`),target:e().optional().describe(`URL, Script Name, Flow ID, or API Endpoint`),body:Zt.optional().describe("Action body — expression (L1) or sandboxed JS (L2). Only used when type is `script`."),execute:e().optional().describe(`@deprecated — Use target instead. Auto-migrated to target during parsing.`),params:l(Qt).optional().describe(`Input parameters required from user`),variant:d([`primary`,`secondary`,`danger`,`ghost`,`link`]).optional().describe(`Button visual variant for styling (primary = highlighted, danger = destructive, ghost = transparent)`),confirmText:I.optional().describe(`Confirmation message before execution`),successMessage:I.optional().describe(`Success message to show after execution`),refreshAfter:f().default(!1).describe(`Refresh view after execution`),visible:j.optional().describe(`Visibility predicate (CEL).`),disabled:n([f(),j]).optional().describe(`Boolean or predicate (CEL) — action is disabled when TRUE.`),shortcut:e().optional().describe(`Keyboard shortcut to trigger this action (e.g., "Ctrl+S")`),bulkEnabled:f().optional().describe(`Whether this action can be applied to multiple selected records`),timeout:p().optional().describe(`Maximum execution time in milliseconds for the action`),aria:L.optional().describe(`ARIA accessibility attributes`)}).transform(e=>e.execute&&!e.target?{...e,target:e.execute}:e).refine(e=>!(en.has(e.type)&&!e.target),{message:`Action 'target' is required when type is 'url', 'flow', 'modal', or 'api'.`,path:[`target`]})),nn=d([`get`,`list`,`create`,`update`,`delete`,`upsert`,`bulk`,`aggregate`,`history`,`search`,`restore`,`purge`,`import`,`export`]),rn=h({trackHistory:f().default(!1).describe(`Enable field history tracking for audit compliance`),searchable:f().default(!0).describe(`Index records for global search`),apiEnabled:f().default(!0).describe(`Expose object via automatic APIs`),apiMethods:l(nn).optional().describe(`Whitelist of allowed API operations`),files:f().default(!1).describe(`Enable file attachments and document management`),feeds:f().default(!1).describe(`Enable social feed, comments, and mentions (Chatter-like)`),activities:f().default(!1).describe(`Enable standard tasks and events tracking`),trash:f().default(!0).describe(`Enable soft-delete with restore capability`),mru:f().default(!0).describe(`Track Most Recently Used (MRU) list for users`),clone:f().default(!0).describe(`Allow record deep cloning`)}),an=_(()=>h({name:e().optional().describe(`Index name (auto-generated if not provided)`),fields:l(e()).describe(`Fields included in the index`),type:d([`btree`,`hash`,`gin`,`gist`,`fulltext`]).optional().default(`btree`).describe(`Index algorithm type`),unique:f().optional().default(!1).describe(`Whether the index enforces uniqueness`),partial:e().optional().describe(`Partial index condition (SQL WHERE clause for conditional indexes)`)})),on=_(()=>h({fields:l(e()).describe(`Fields to index for full-text search weighting`),displayFields:l(e()).optional().describe(`Fields to display in search result cards`),filters:l(e()).optional().describe(`Default filters for search results`)})),sn=_(()=>h({enabled:f().describe(`Enable multi-tenancy for this object`),strategy:d([`shared`,`isolated`,`hybrid`]).describe(`Tenant isolation strategy: shared (single DB, row-level), isolated (separate DB per tenant), hybrid (mix)`),tenantField:e().default(`tenant_id`).describe(`Field name for tenant identifier`),crossTenantAccess:f().default(!1).describe(`Allow cross-tenant data access (with explicit permission)`)})),cn=_(()=>h({enabled:f().describe(`Enable soft delete (trash/recycle bin)`),field:e().default(`deleted_at`).describe(`Field name for soft delete timestamp`),cascadeDelete:f().default(!1).describe(`Cascade soft delete to related records`)})),ln=_(()=>h({enabled:f().describe(`Enable record versioning`),strategy:d([`snapshot`,`delta`,`event-sourcing`]).describe(`Versioning strategy: snapshot (full copy), delta (changes only), event-sourcing (event log)`),retentionDays:p().min(1).optional().describe(`Number of days to retain old versions (undefined = infinite)`),versionField:e().default(`version`).describe(`Field name for version number/timestamp`)})),un=_(()=>h({enabled:f().describe(`Enable table partitioning`),strategy:d([`range`,`hash`,`list`]).describe(`Partitioning strategy: range (date ranges), hash (consistent hashing), list (predefined values)`),key:e().describe(`Field name to partition by`),interval:e().optional().describe(`Partition interval for range strategy (e.g., "1 month", "1 year")`)}).refine(e=>!(e.strategy===`range`&&!e.interval),{message:`interval is required when strategy is "range"`})),dn=_(()=>h({enabled:f().describe(`Enable Change Data Capture`),events:l(d([`insert`,`update`,`delete`])).describe(`Event types to capture`),destination:e().describe(`Destination endpoint (e.g., "kafka://topic", "webhook://url")`)})),fn=_(()=>h({key:e().regex(/^[a-z_][a-z0-9_]*$/,{message:`Field group key must be lowercase snake_case (e.g., "contact_info", "billing", "system")`}).describe(`Group machine key (snake_case). Referenced by Field.group.`),label:e().describe(`Group display label`),icon:e().optional().describe(`Icon name (Lucide/Material) for the group header`),description:e().optional().describe(`Optional description shown under the group header`),defaultExpanded:f().optional().default(!0).describe(`Whether the group is expanded by default`),visibleOn:j.optional().describe(`Visibility predicate (CEL); group is hidden when FALSE.`)})),pn=h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Machine unique key (snake_case). Immutable.`),label:e().optional().describe(`Human readable singular label (e.g. "Account")`),pluralLabel:e().optional().describe(`Human readable plural label (e.g. "Accounts")`),description:e().optional().describe(`Developer documentation / description`),icon:e().optional().describe(`Icon name (Lucide/Material) for UI representation`),tags:l(e()).optional().describe(`Categorization tags (e.g. "sales", "system", "reference")`),active:f().optional().default(!0).describe(`Is the object active and usable`),isSystem:f().optional().default(!1).describe(`Is system object (protected from deletion)`),abstract:f().optional().default(!1).describe(`Is abstract base object (cannot be instantiated)`),managedBy:d([`better-auth`,`system`,`platform`]).optional().describe(`Hint that this object is managed by an external subsystem; clients should hide generic CRUD UI and route mutations through the corresponding API.`),systemFields:n([o(!1),h({tenant:f().optional().describe(`Inject organization_id (multi-tenant only). Default true.`),owner:f().optional().describe(`Reserved for future owner_id auto-injection.`),audit:f().optional().describe(`Reserved for future created_by/updated_by auto-injection.`)})]).optional().describe(`Opt out of, or selectively disable, registry-level system-field auto-injection.`),datasource:e().optional().default(`default`).describe(`Target Datasource ID. "default" is the primary DB.`),fields:m(e().regex(/^[a-z_][a-z0-9_]*$/,{message:`Field names must be lowercase snake_case (e.g., "first_name", "company", "annual_revenue")`}),Ft).describe(`Field definitions map. Keys must be snake_case identifiers.`),indexes:l(an).optional().describe(`Database performance indexes`),fieldGroups:l(fn).refine(e=>new Set(e.map(e=>e.key)).size===e.length,{message:`fieldGroups[].key must be unique within an object`}).optional().describe(`Ordered list of field groups (array order = display order). See ObjectFieldGroupSchema.`),tenancy:sn.optional().describe(`Multi-tenancy configuration for SaaS applications`),softDelete:cn.optional().describe(`Soft delete (trash/recycle bin) configuration`),versioning:ln.optional().describe(`Record versioning and history tracking configuration`),partitioning:un.optional().describe(`Table partitioning configuration for performance`),cdc:dn.optional().describe(`Change Data Capture (CDC) configuration for real-time data streaming`),validations:l(N).optional().describe(`Object-level validation rules`),stateMachines:m(e(),qt).optional().describe(`Named state machines for parallel lifecycles (e.g., status, payment, approval)`),displayNameField:e().optional().describe(`Field to use as the record display name (e.g., "name", "title"). Defaults to "name" if present.`),recordName:h({type:d([`text`,`autonumber`]).describe(`Record name type: text (user-entered) or autonumber (system-generated)`),displayFormat:e().optional().describe(`Auto-number format pattern (e.g., "CASE-{0000}", "INV-{YYYY}-{0000}")`),startNumber:p().int().min(0).optional().describe(`Starting number for autonumber (default: 1)`)}).optional().describe(`Record name generation configuration (Salesforce pattern)`),titleFormat:xt.optional().describe(`Title template — supports {{record.field}} interpolation. Overrides displayNameField.`),compactLayout:l(e()).optional().describe(`Primary fields for hover/cards/lookups`),search:on.optional().describe(`Search engine configuration`),enable:rn.optional().describe(`Enabled system features modules`),recordTypes:l(e()).optional().describe(`Record type names for this object`),sharingModel:d([`private`,`read`,`read_write`,`full`]).optional().describe(`Default sharing model`),keyPrefix:e().max(5).optional().describe(`Short prefix for record IDs (e.g., "001" for Account)`),actions:l(tn).optional().describe(`Actions associated with this object (auto-populated from top-level actions via objectName)`)});function mn(e){return e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var hn=_(()=>Object.assign(pn,{create:e=>{let t={...e,label:e.label??mn(e.name)};return pn.parse(t)}}));d([`own`,`extend`]);var gn=_(()=>h({extend:e().describe(`Target object name (FQN) to extend`),fields:m(e(),Ft).optional().describe(`Fields to add/override`),label:e().optional().describe(`Override label for the extended object`),pluralLabel:e().optional().describe(`Override plural label for the extended object`),description:e().optional().describe(`Override description for the extended object`),validations:l(N).optional().describe(`Additional validation rules to merge into the target object`),indexes:l(an).optional().describe(`Additional indexes to merge into the target object`),priority:p().int().min(0).max(999).default(200).describe(`Merge priority (higher = applied later)`)})),_n=_(()=>h({enabled:f().default(!1).describe(`Enable public sharing`),publicLink:e().optional().describe(`Generated public share URL`),password:e().optional().describe(`Password required to access shared link`),allowedDomains:l(e()).optional().describe(`Restrict access to specific email domains (e.g. ["example.com"])`),expiresAt:e().optional().describe(`Expiration date/time in ISO 8601 format`),allowAnonymous:f().optional().default(!1).describe(`Allow access without authentication`)})),vn=_(()=>h({enabled:f().default(!1).describe(`Enable iframe embedding`),allowedOrigins:l(e()).optional().describe(`Allowed iframe parent origins (e.g. ["https://example.com"])`),width:e().optional().default(`100%`).describe(`Embed width (CSS value)`),height:e().optional().default(`600px`).describe(`Embed height (CSS value)`),showHeader:f().optional().default(!0).describe(`Show interface header in embed`),showNavigation:f().optional().default(!1).describe(`Show navigation in embed`),responsive:f().optional().default(!0).describe(`Enable responsive resizing`)})),R=h({id:k.describe(`Unique identifier for this navigation item (lowercase snake_case)`),label:I.describe(`Display proper label`),icon:e().optional().describe(`Icon name`),order:p().optional().describe(`Sort order within the same level (lower = first)`),badge:n([e(),p()]).optional().describe(`Badge text or count displayed on the item`),visible:j.optional().describe('Visibility predicate (CEL). e.g. P`os.user.role == "admin"`'),requiredPermissions:l(e()).optional().describe(`Permissions required to access this item`)}),yn=_(()=>R.extend({type:o(`object`),objectName:e().describe(`Target object name`),viewName:e().optional().describe(`Default list view to open. Defaults to "all"`)})),bn=_(()=>R.extend({type:o(`dashboard`),dashboardName:e().describe(`Target dashboard name`)})),xn=_(()=>R.extend({type:o(`page`),pageName:e().describe(`Target custom page component name`),params:m(e(),t()).optional().describe(`Parameters passed to the page context`)})),Sn=_(()=>R.extend({type:o(`url`),url:e().describe(`Target external URL`),target:d([`_self`,`_blank`]).default(`_self`).describe(`Link target window`)})),Cn=_(()=>R.extend({type:o(`report`),reportName:e().describe(`Target report name`)})),wn=_(()=>R.extend({type:o(`action`),actionDef:h({actionName:e().describe(`Action machine name to execute`),params:m(e(),t()).optional().describe(`Parameters passed to the action`)}).describe(`Action definition to execute when clicked`)})),Tn=_(()=>R.extend({type:o(`group`),expanded:f().default(!1).describe(`Default expansion state in sidebar`)})),z=s(()=>n([yn.extend({children:l(z).optional().describe(`Child navigation items (e.g. specific views)`)}),bn,xn,Sn,Cn,wn,Tn.extend({children:l(z).describe(`Child navigation items`)})])),En=_(()=>h({primaryColor:e().optional().describe(`Primary theme color hex code`),logo:e().optional().describe(`Custom logo URL for this app`),favicon:e().optional().describe(`Custom favicon URL for this app`)})),Dn=_(()=>h({id:k.describe(`Unique area identifier (lowercase snake_case)`),label:I.describe(`Area display label`),icon:e().optional().describe(`Area icon name`),order:p().optional().describe(`Sort order among areas (lower = first)`),description:I.optional().describe(`Area description`),visible:j.optional().describe(`Visibility predicate (CEL) for this area.`),requiredPermissions:l(e()).optional().describe(`Permissions required to access this area`),navigation:l(z).describe(`Navigation items within this area`)})),On=_(()=>h({name:k.describe(`App unique machine name (lowercase snake_case)`),label:I.describe(`App display label`),version:e().optional().describe(`App version`),description:I.optional().describe(`App description`),icon:e().optional().describe(`App icon used in the App Launcher`),branding:En.optional().describe(`App-specific branding`),active:f().optional().default(!0).describe(`Whether the app is enabled`),isDefault:f().optional().default(!1).describe(`Is default app`),navigation:l(z).optional().describe(`Full navigation tree for the app sidebar`),areas:l(Dn).optional().describe(`Navigation areas for partitioning navigation by business domain`),homePageId:e().optional().describe(`ID of the navigation item to serve as landing page`),requiredPermissions:l(e()).optional().describe(`Permissions required to access this app`),objects:l(t()).optional().describe(`Objects belonging to this app`),apis:l(t()).optional().describe(`Custom APIs belonging to this app`),sharing:_n.optional().describe(`Public sharing configuration`),embed:vn.optional().describe(`Iframe embedding configuration`),mobileNavigation:h({mode:d([`drawer`,`bottom_nav`,`hamburger`]).default(`drawer`).describe(`Mobile navigation mode: drawer sidebar, bottom navigation bar, or hamburger menu`),bottomNavItems:l(e()).optional().describe(`Navigation item IDs to show in bottom nav (max 5)`)}).optional().describe(`Mobile-specific navigation configuration`),defaultAgent:k.optional().describe(`Name of the default AI agent for this app (used by the ambient chat endpoint)`),aria:L.optional().describe(`ARIA accessibility attributes for the application`)})),kn=d([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),An=_(()=>h({xs:p().min(1).max(12).optional(),sm:p().min(1).max(12).optional(),md:p().min(1).max(12).optional(),lg:p().min(1).max(12).optional(),xl:p().min(1).max(12).optional(),"2xl":p().min(1).max(12).optional()}).describe(`Grid columns per breakpoint (1-12)`)),jn=_(()=>h({xs:p().optional(),sm:p().optional(),md:p().optional(),lg:p().optional(),xl:p().optional(),"2xl":p().optional()}).describe(`Display order per breakpoint`)),B=_(()=>h({breakpoint:kn.optional().describe(`Minimum breakpoint for visibility`),hiddenOn:l(kn).optional().describe(`Hide on these breakpoints`),columns:An.optional().describe(`Grid columns per breakpoint`),order:jn.optional().describe(`Display order per breakpoint`)}).describe(`Responsive layout configuration`)),V=_(()=>h({lazyLoad:f().optional().describe(`Enable lazy loading (defer rendering until visible)`),virtualScroll:h({enabled:f().default(!1).describe(`Enable virtual scrolling`),itemHeight:p().optional().describe(`Fixed item height in pixels (for estimation)`),overscan:p().optional().describe(`Number of extra items to render outside viewport`)}).optional().describe(`Virtual scrolling configuration`),cacheStrategy:d([`none`,`cache-first`,`network-first`,`stale-while-revalidate`]).optional().describe(`Client-side data caching strategy`),prefetch:f().optional().describe(`Prefetch data before component is visible`),pageSize:p().optional().describe(`Number of items per page for pagination`),debounceMs:p().optional().describe(`Debounce interval for user interactions in milliseconds`)}).describe(`Performance optimization configuration`)),Mn=d([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`,`HEAD`,`OPTIONS`]),Nn=_(()=>d([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`])),Pn=_(()=>h({url:e().describe(`API endpoint URL`),method:Nn.optional().default(`GET`).describe(`HTTP method`),headers:m(e(),e()).optional().describe(`Custom HTTP headers`),params:m(e(),t()).optional().describe(`Query parameters`),body:t().optional().describe(`Request body for POST/PUT/PATCH`)}));_(()=>h({enabled:f().default(!0).describe(`Enable CORS`),origins:n([e(),l(e())]).default(`*`).describe(`Allowed origins (* for all)`),methods:l(Mn).optional().describe(`Allowed HTTP methods`),credentials:f().default(!1).describe(`Allow credentials (cookies, authorization headers)`),maxAge:p().int().optional().describe(`Preflight cache duration in seconds`)}));var Fn=_(()=>h({enabled:f().default(!1).describe(`Enable rate limiting`),windowMs:p().int().default(6e4).describe(`Time window in milliseconds`),maxRequests:p().int().default(100).describe(`Max requests per window`)}));_(()=>h({path:e().describe(`URL path to serve from`),directory:e().describe(`Physical directory to serve`),cacheControl:e().optional().describe(`Cache-Control header value`)}));var In=_(()=>u(`provider`,[h({provider:o(`object`),object:e().describe(`Target object name`)}),h({provider:o(`api`),read:Pn.optional().describe(`Configuration for fetching data`),write:Pn.optional().describe(`Configuration for submitting data (for forms/editable tables)`)}),h({provider:o(`value`),items:l(t()).describe(`Static data array`)})])),H=_(()=>h({field:e().describe(`Field name to filter on`),operator:e().describe(`Filter operator (e.g. equals, not_equals, contains, this_quarter)`),value:n([e(),p(),f(),ee(),l(n([e(),p()]))]).optional().describe(`Filter value`)}).describe(`View filter rule`)),Ln=_(()=>d([`none`,`count`,`count_empty`,`count_filled`,`count_unique`,`percent_empty`,`percent_filled`,`sum`,`avg`,`min`,`max`]).describe(`Aggregation function for column footer summary`)),Rn=_(()=>h({field:e().describe(`Field name (snake_case)`),label:I.optional().describe(`Display label override`),width:p().positive().optional().describe(`Column width in pixels`),align:d([`left`,`center`,`right`]).optional().describe(`Text alignment`),hidden:f().optional().describe(`Hide column by default`),sortable:f().optional().describe(`Allow sorting by this column`),resizable:f().optional().describe(`Allow resizing this column`),wrap:f().optional().describe(`Allow text wrapping`),type:e().optional().describe(`Renderer type override (e.g., "currency", "date")`),pinned:d([`left`,`right`]).optional().describe(`Pin/freeze column to left or right side`),summary:Ln.optional().describe(`Footer aggregation function for this column`),link:f().optional().describe(`Functions as the primary navigation link (triggers View navigation)`),action:e().optional().describe(`Registered Action ID to execute when clicked`)})),zn=_(()=>h({type:d([`none`,`single`,`multiple`]).default(`none`).describe(`Selection mode`)})),Bn=_(()=>h({pageSize:p().int().positive().default(25).describe(`Number of records per page`),pageSizeOptions:l(p().int().positive()).optional().describe(`Available page size options`)})),Vn=_(()=>d([`compact`,`short`,`medium`,`tall`,`extra_tall`]).describe(`Row height / density setting for list view`)),Hn=_(()=>h({field:e().describe(`Field name to group by`),order:d([`asc`,`desc`]).default(`asc`).describe(`Group sort order`),collapsed:f().default(!1).describe(`Collapse groups by default`)})),Un=_(()=>h({fields:l(Hn).min(1).describe(`Fields to group by (supports up to 3 levels)`)}).describe(`Record grouping configuration`)),Wn=_(()=>h({coverField:e().optional().describe(`Attachment/image field to display as card cover`),coverFit:d([`cover`,`contain`]).default(`cover`).describe(`Image fit mode for card cover`),cardSize:d([`small`,`medium`,`large`]).default(`medium`).describe(`Card size in gallery view`),titleField:e().optional().describe(`Field to display as card title`),visibleFields:l(e()).optional().describe(`Fields to display on card body`)}).describe(`Gallery/card view configuration`)),Gn=_(()=>h({startDateField:e().describe(`Field for timeline item start date`),endDateField:e().optional().describe(`Field for timeline item end date`),titleField:e().describe(`Field to display as timeline item title`),groupByField:e().optional().describe(`Field to group timeline rows`),colorField:e().optional().describe(`Field to determine item color`),scale:d([`hour`,`day`,`week`,`month`,`quarter`,`year`]).default(`week`).describe(`Default timeline scale`)}).describe(`Timeline view configuration`)),Kn=_(()=>h({type:d([`personal`,`collaborative`]).default(`collaborative`).describe(`View ownership type`),lockedBy:e().optional().describe(`User who locked the view configuration`)}).describe(`View sharing and access configuration`)),qn=_(()=>h({field:e().describe(`Field to derive color from (typically a select/status field)`),colors:m(e(),e()).optional().describe(`Map of field value to color (hex/token)`)}).describe(`Row color configuration based on field values`)),Jn=_(()=>d([`grid`,`kanban`,`gallery`,`calendar`,`timeline`,`gantt`,`map`]).describe(`Visualization type that users can switch to`)),Yn=_(()=>h({sort:f().default(!0).describe(`Allow users to sort records`),search:f().default(!0).describe(`Allow users to search records`),filter:f().default(!0).describe(`Allow users to filter records`),rowHeight:f().default(!0).describe(`Allow users to toggle row height/density`),addRecordForm:f().default(!1).describe(`Add records through a form instead of inline`),buttons:l(e()).optional().describe(`Custom action button IDs to show in the toolbar`)}).describe(`User action toggles for the view toolbar`)),Xn=_(()=>h({showDescription:f().default(!0).describe(`Show the view description text`),allowedVisualizations:l(Jn).optional().describe(`Whitelist of visualization types users can switch between (e.g. ["grid", "gallery", "kanban"])`)}).describe(`Appearance and visualization configuration`)),Zn=_(()=>h({name:k.describe(`Tab identifier (snake_case)`),label:I.optional().describe(`Display label`),icon:e().optional().describe(`Tab icon name`),view:e().optional().describe(`Referenced list view name from listViews`),filter:l(H).optional().describe(`Tab-specific filter criteria`),order:p().int().min(0).optional().describe(`Tab display order`),pinned:f().default(!1).describe(`Pin tab (cannot be removed by users)`),isDefault:f().default(!1).describe(`Set as the default active tab`),visible:f().default(!0).describe(`Tab visibility`)}).describe(`Tab configuration for multi-tab view interface`)),Qn=_(()=>h({enabled:f().default(!0).describe(`Show the add record entry point`),position:d([`top`,`bottom`,`both`]).default(`bottom`).describe(`Position of the add record button`),mode:d([`inline`,`form`,`modal`]).default(`inline`).describe(`How to add a new record`),formView:e().optional().describe(`Named form view to use when mode is "form" or "modal"`)}).describe(`Add record entry point configuration`)),$n=_(()=>h({groupByField:e().describe(`Field to group columns by (usually status/select)`),summarizeField:e().optional().describe(`Field to sum at top of column (e.g. amount)`),columns:l(e()).describe(`Fields to show on cards`)})),er=_(()=>h({startDateField:e(),endDateField:e().optional(),titleField:e(),colorField:e().optional()})),tr=_(()=>h({startDateField:e(),endDateField:e(),titleField:e(),progressField:e().optional(),dependenciesField:e().optional()})),nr=_(()=>d([`page`,`drawer`,`modal`,`split`,`popover`,`new_window`,`none`])),rr=_(()=>h({mode:nr.default(`page`),view:e().optional().describe(`Name of the form view to use for details (e.g. "summary_view", "edit_form")`),preventNavigation:f().default(!1).describe(`Disable standard navigation entirely`),openNewTab:f().default(!1).describe(`Force open in new tab (applies to page mode)`),width:n([e(),p()]).optional().describe(`Width of the drawer/modal (e.g. "600px", "50%")`)})),ir=_(()=>h({name:k.optional().describe(`Internal view name (lowercase snake_case)`),label:I.optional(),type:d([`grid`,`kanban`,`gallery`,`calendar`,`timeline`,`gantt`,`map`]).default(`grid`),data:In.optional().describe(`Data source configuration (defaults to "object" provider)`),columns:n([l(e()),l(Rn)]).describe(`Fields to display as columns`),filter:l(H).optional().describe(`Filter criteria (JSON Rules)`),sort:n([e(),l(h({field:e(),order:d([`asc`,`desc`])}))]).optional(),searchableFields:l(e()).optional().describe(`Fields enabled for search`),filterableFields:l(e()).optional().describe(`Fields enabled for end-user filtering in the top bar`),resizable:f().optional().describe(`Enable column resizing`),striped:f().optional().describe(`Striped row styling`),bordered:f().optional().describe(`Show borders`),selection:zn.optional().describe(`Row selection configuration`),navigation:rr.optional().describe(`Configuration for item click navigation (page, drawer, modal, etc.)`),pagination:Bn.optional().describe(`Pagination configuration`),kanban:$n.optional(),calendar:er.optional(),gantt:tr.optional(),gallery:Wn.optional(),timeline:Gn.optional(),description:I.optional().describe(`View description for documentation/tooltips`),sharing:Kn.optional().describe(`View sharing and access configuration`),rowHeight:Vn.optional().describe(`Row height / density setting`),grouping:Un.optional().describe(`Group records by one or more fields`),rowColor:qn.optional().describe(`Color rows based on field value`),hiddenFields:l(e()).optional().describe(`Fields to hide in this specific view`),fieldOrder:l(e()).optional().describe(`Explicit field display order for this view`),rowActions:l(e()).optional().describe(`Actions available for individual row items`),bulkActions:l(e()).optional().describe(`Actions available when multiple rows are selected`),virtualScroll:f().optional().describe(`Enable virtual scrolling for large datasets`),conditionalFormatting:l(h({condition:j.describe(`Predicate (CEL) to evaluate.`),style:m(e(),e()).describe(`CSS styles to apply when condition is true`)})).optional().describe(`Conditional formatting rules for list rows`),inlineEdit:f().optional().describe(`Allow inline editing of records directly in the list view`),exportOptions:l(d([`csv`,`xlsx`,`pdf`,`json`])).optional().describe(`Available export format options`),userActions:Yn.optional().describe(`User action toggles for the view toolbar`),appearance:Xn.optional().describe(`Appearance and visualization configuration`),tabs:l(Zn).optional().describe(`Tab definitions for multi-tab view interface`),addRecord:Qn.optional().describe(`Add record entry point configuration`),showRecordCount:f().optional().describe(`Show record count at the bottom of the list`),allowPrinting:f().optional().describe(`Allow users to print the view`),emptyState:h({title:I.optional(),message:I.optional(),icon:e().optional()}).optional().describe(`Empty state configuration when no records found`),aria:L.optional().describe(`ARIA accessibility attributes for the list view`),responsive:B.optional().describe(`Responsive layout configuration`),performance:V.optional().describe(`Performance optimization settings`)})),ar=_(()=>h({field:e().describe(`Field name (snake_case)`),label:I.optional().describe(`Display label override`),placeholder:I.optional().describe(`Placeholder text`),helpText:I.optional().describe(`Help/hint text`),readonly:f().optional().describe(`Read-only override`),required:f().optional().describe(`Required override`),hidden:f().optional().describe(`Hidden override`),colSpan:p().int().min(1).max(4).optional().describe(`Column span in grid layout (1-4)`),widget:e().optional().describe(`Custom widget/component name`),dependsOn:e().optional().describe(`Parent field name for cascading`),visibleOn:j.optional().describe(`Visibility predicate (CEL).`)})),or=_(()=>h({label:I.optional(),collapsible:f().default(!1),collapsed:f().default(!1),columns:n([d([`1`,`2`,`3`,`4`]),o(1),o(2),o(3),o(4)]).default(2).transform(e=>typeof e==`string`?parseInt(e):e),fields:l(n([e(),ar]))})),sr=_(()=>h({type:d([`simple`,`tabbed`,`wizard`,`split`,`drawer`,`modal`]).default(`simple`),data:In.optional().describe(`Data source configuration (defaults to "object" provider)`),sections:l(or).optional(),groups:l(or).optional(),defaultSort:l(h({field:e().describe(`Field name to sort by`),order:d([`asc`,`desc`]).default(`desc`).describe(`Sort direction`)})).optional().describe(`Default sort order for related list views within this form`),sharing:_n.optional().describe(`Public sharing configuration for this form`),aria:L.optional().describe(`ARIA accessibility attributes for the form view`)})),cr=_(()=>h({list:ir.optional(),form:sr.optional(),listViews:m(e(),ir).optional().describe(`Additional named list views`),formViews:m(e(),sr).optional().describe(`Additional named form views`)}));d([`count`,`sum`,`avg`,`min`,`max`,`count_distinct`,`percentile`,`median`,`stddev`,`variance`]).describe(`Standard aggregation functions`);var lr=d([`asc`,`desc`]).describe(`Sort order direction`),ur=_(()=>h({field:e().describe(`Field name to sort by`),order:lr.describe(`Sort direction`)}).describe(`Sort field and direction pair`));d([`insert`,`update`,`delete`,`upsert`]).describe(`Data mutation event types`),d([`read_uncommitted`,`read_committed`,`repeatable_read`,`serializable`,`snapshot`]).describe(`Transaction isolation levels (snake_case standard)`),d([`lru`,`lfu`,`ttl`,`fifo`]).describe(`Cache eviction strategy`);var U=_(()=>h({$field:e().describe(`Field Reference/Column Name`)}));_(()=>h({$eq:r().optional(),$ne:r().optional()})),_(()=>h({$gt:n([p(),a(),U]).optional(),$gte:n([p(),a(),U]).optional(),$lt:n([p(),a(),U]).optional(),$lte:n([p(),a(),U]).optional()})),_(()=>h({$in:l(r()).optional(),$nin:l(r()).optional()})),_(()=>h({$between:te([n([p(),a(),U]),n([p(),a(),U])]).optional()})),_(()=>h({$contains:e().optional(),$notContains:e().optional(),$startsWith:e().optional(),$endsWith:e().optional()})),_(()=>h({$null:f().optional(),$exists:f().optional()}));var W=_(()=>h({$eq:r().optional(),$ne:r().optional(),$gt:n([p(),a(),U]).optional(),$gte:n([p(),a(),U]).optional(),$lt:n([p(),a(),U]).optional(),$lte:n([p(),a(),U]).optional(),$in:l(r()).optional(),$nin:l(r()).optional(),$between:te([n([p(),a(),U]),n([p(),a(),U])]).optional(),$contains:e().optional(),$notContains:e().optional(),$startsWith:e().optional(),$endsWith:e().optional(),$null:f().optional(),$exists:f().optional()})),G=s(()=>m(e(),t()).and(h({$and:l(G).optional(),$or:l(G).optional(),$not:G.optional()})));_(()=>h({where:G.optional()}));var K=s(()=>h({$and:l(n([m(e(),W),K])).optional(),$or:l(n([m(e(),W),K])).optional(),$not:n([m(e(),W),K]).optional()})),dr=_(()=>h({name:e().describe(`Region name (e.g. "sidebar", "main", "header")`),width:d([`small`,`medium`,`large`,`full`]).optional(),components:l(s(()=>mr)).describe(`Components in this region`)})),fr=d(`page:header.page:footer.page:sidebar.page:tabs.page:accordion.page:card.page:section.record:details.record:highlights.record:related_list.record:activity.record:chatter.record:path.app:launcher.nav:menu.nav:breadcrumb.global:search.global:notifications.user:profile.ai:chat_window.ai:suggestion.element:text.element:number.element:image.element:divider.element:button.element:filter.element:form.element:record_picker`.split(`.`)),pr=_(()=>h({object:e().describe(`Object to query`),view:e().optional().describe(`Named view to apply`),filter:G.optional().describe(`Additional filter criteria`),sort:l(ur).optional().describe(`Sort order`),limit:p().int().positive().optional().describe(`Max records to display`)})),mr=_(()=>h({type:n([fr,e()]).describe(`Component Type (Standard enum or custom string)`),id:e().optional().describe(`Unique instance ID`),label:I.optional(),properties:m(e(),t()).describe(`Component props passed to the widget. See component.zod.ts for schemas.`),events:m(e(),e()).optional().describe(`Event handlers map`),style:m(e(),e()).optional().describe(`Inline styles or utility classes`),className:e().optional().describe(`CSS class names`),visibility:j.optional().describe(`Visibility predicate (CEL).`),dataSource:pr.optional().describe(`Per-element data binding for multi-object pages`),responsive:B.optional().describe(`Responsive layout configuration`),aria:L.optional().describe(`ARIA accessibility attributes`)})),hr=_(()=>h({name:e().describe(`Variable name`),type:d([`string`,`number`,`boolean`,`object`,`array`,`record_id`]).default(`string`),defaultValue:t().optional(),source:e().optional().describe(`Component ID that writes to this variable`)})),gr=_(()=>h({componentId:e().describe(`Reference to a PageComponent.id in the page`),x:p().int().min(0).describe(`Grid column position (0-based)`),y:p().int().min(0).describe(`Grid row position (0-based)`),width:p().int().min(1).describe(`Width in grid columns`),height:p().int().min(1).describe(`Height in grid rows`)})),_r=_(()=>h({columns:p().int().min(1).default(12).describe(`Number of grid columns`),rowHeight:p().int().min(1).default(40).describe(`Height of each grid row in pixels`),gap:p().int().min(0).default(8).describe(`Gap between grid items in pixels`),items:l(gr).describe(`Positioned components on the canvas`)})),vr=_(()=>d([`record`,`home`,`app`,`utility`,`dashboard`,`grid`,`list`,`gallery`,`kanban`,`calendar`,`timeline`,`form`,`record_detail`,`record_review`,`overview`,`blank`]).describe(`Page type — platform or interface page types`)),yr=_(()=>h({object:e().describe(`Target object for review`),filter:G.optional().describe(`Filter criteria for review queue`),sort:l(ur).optional().describe(`Sort order for review queue`),displayFields:l(e()).optional().describe(`Fields to display on the review page`),actions:l(h({label:e().describe(`Action button label`),type:d([`approve`,`reject`,`skip`,`custom`]).describe(`Action type`),field:e().optional().describe(`Field to update on action`),value:n([e(),p(),f()]).optional().describe(`Value to set on action`),nextRecord:f().optional().default(!0).describe(`Auto-advance to next record after action`)})).describe(`Review actions`),navigation:d([`sequential`,`random`,`filtered`]).optional().default(`sequential`).describe(`Record navigation mode`),showProgress:f().optional().default(!0).describe(`Show review progress indicator`)})),br=_(()=>h({source:e().optional().describe(`Source object name for the page`),levels:p().int().min(1).optional().describe(`Number of hierarchy levels to display`),filterBy:l(H).optional().describe(`Page-level filter criteria`),appearance:Xn.optional().describe(`Appearance and visualization configuration`),userFilters:h({elements:l(d([`grid`,`gallery`,`kanban`])).optional().describe(`Visualization element types available in user filter bar`),tabs:l(Zn).optional().describe(`User-configurable tabs`)}).optional().describe(`User filter configuration`),userActions:Yn.optional().describe(`User action toggles`),addRecord:Qn.optional().describe(`Add record entry point configuration`),showRecordCount:f().optional().describe(`Show record count at page bottom`),allowPrinting:f().optional().describe(`Allow users to print the page`)}).describe(`Interface-level page configuration (Airtable parity)`)),xr=_(()=>h({name:k.describe(`Page unique name (lowercase snake_case)`),label:I,description:I.optional(),icon:e().optional().describe(`Page icon name`),type:vr.default(`record`).describe(`Page type`),variables:l(hr).optional().describe(`Local page state variables`),object:e().optional().describe(`Bound object (for Record pages)`),recordReview:yr.optional().describe(`Record review configuration (required when type is "record_review")`),blankLayout:_r.optional().describe(`Free-form grid layout for blank pages (used when type is "blank")`),template:e().default(`default`).describe(`Layout template name (e.g. "header-sidebar-main")`),regions:l(dr).describe(`Defined regions with components`),isDefault:f().default(!1),assignedProfiles:l(e()).optional(),interfaceConfig:br.optional().describe(`Interface-level page configuration (for Airtable-style interface pages)`),aria:L.optional().describe(`ARIA accessibility attributes`)}).superRefine((e,t)=>{e.type===`record_review`&&!e.recordReview&&t.addIssue({code:g.custom,path:[`recordReview`],message:`recordReview is required when type is "record_review"`}),e.type===`blank`&&!e.blankLayout&&t.addIssue({code:g.custom,path:[`blankLayout`],message:`blankLayout is required when type is "blank"`})})),q=_(()=>d(`bar.horizontal-bar.column.grouped-bar.stacked-bar.bi-polar-bar.line.area.stacked-area.step-line.spline.pie.donut.funnel.pyramid.scatter.bubble.treemap.sunburst.sankey.word-cloud.gauge.solid-gauge.metric.kpi.bullet.choropleth.bubble-map.gl-map.heatmap.radar.waterfall.box-plot.violin.candlestick.stock.table.pivot`.split(`.`))),Sr=_(()=>h({field:e().describe(`Data field key`),title:I.optional().describe(`Axis display title`),format:e().optional().describe(`Value format string (e.g., "$0,0.00")`),min:p().optional().describe(`Minimum value`),max:p().optional().describe(`Maximum value`),stepSize:p().optional().describe(`Step size for ticks`),showGridLines:f().default(!0),position:d([`left`,`right`,`top`,`bottom`]).optional().describe(`Axis position`),logarithmic:f().default(!1)})),Cr=_(()=>h({name:e().describe(`Field name or series identifier`),label:I.optional().describe(`Series display label`),type:q.optional().describe(`Override chart type for this series`),color:e().optional().describe(`Series color (hex/rgb/token)`),stack:e().optional().describe(`Stack identifier to group series`),yAxis:d([`left`,`right`]).default(`left`).describe(`Bind to specific Y-Axis`)})),wr=_(()=>h({type:d([`line`,`region`]).default(`line`),axis:d([`x`,`y`]).default(`y`),value:n([p(),e()]).describe(`Start value`),endValue:n([p(),e()]).optional().describe(`End value for regions`),color:e().optional(),label:I.optional(),style:d([`solid`,`dashed`,`dotted`]).default(`dashed`)})),Tr=_(()=>h({tooltips:f().default(!0),zoom:f().default(!1),brush:f().default(!1),clickAction:e().optional().describe(`Action ID to trigger on click`)})),Er=_(()=>h({type:q,title:I.optional().describe(`Chart title`),subtitle:I.optional().describe(`Chart subtitle`),description:I.optional().describe(`Accessibility description`),xAxis:Sr.optional().describe(`X-Axis configuration`),yAxis:l(Sr).optional().describe(`Y-Axis configuration (support dual axis)`),series:l(Cr).optional().describe(`Defined series configuration`),colors:l(e()).optional().describe(`Color palette`),height:p().optional().describe(`Fixed height in pixels`),showLegend:f().default(!0).describe(`Display legend`),showDataLabels:f().default(!1).describe(`Display data labels`),annotations:l(wr).optional(),interaction:Tr.optional(),aria:L.optional().describe(`ARIA accessibility attributes`)})),Dr=_(()=>d([`default`,`blue`,`teal`,`orange`,`purple`,`success`,`warning`,`danger`]).describe(`Widget color variant`)),Or=_(()=>d([`script`,`url`,`modal`,`flow`,`api`]).describe(`Widget action type`)),kr=_(()=>h({label:I.describe(`Action button label`),actionUrl:e().describe(`URL or target for the action`),actionType:Or.optional().describe(`Type of action`),icon:e().optional().describe(`Icon identifier for the action button`)}).describe(`Dashboard header action`)),Ar=_(()=>h({showTitle:f().default(!0).describe(`Show dashboard title in header`),showDescription:f().default(!0).describe(`Show dashboard description in header`),actions:l(kr).optional().describe(`Header action buttons`)}).describe(`Dashboard header configuration`)),jr=_(()=>h({valueField:e().describe(`Field to aggregate`),aggregate:d([`count`,`sum`,`avg`,`min`,`max`]).default(`count`).describe(`Aggregate function`),label:I.optional().describe(`Measure display label`),format:e().optional().describe(`Number format string`)}).describe(`Widget measure definition`)),Mr=_(()=>h({id:k.describe(`Unique widget identifier (snake_case)`),title:I.optional().describe(`Widget title`),description:I.optional().describe(`Widget description text below the header`),type:q.default(`metric`).describe(`Visualization type`),chartConfig:Er.optional().describe(`Chart visualization configuration`),colorVariant:Dr.optional().describe(`Widget color variant for theming`),actionUrl:e().optional().describe(`URL or target for the widget action button`),actionType:Or.optional().describe(`Type of action for the widget action button`),actionIcon:e().optional().describe(`Icon identifier for the widget action button`),object:e().optional().describe(`Data source object name`),filter:G.optional().describe(`Data filter criteria`),categoryField:e().optional().describe(`Field for grouping (X-Axis)`),valueField:e().optional().describe(`Field for values (Y-Axis)`),aggregate:d([`count`,`sum`,`avg`,`min`,`max`]).optional().default(`count`).describe(`Aggregate function`),measures:l(jr).optional().describe(`Multiple measures for pivot/matrix analysis`),layout:h({x:p(),y:p(),w:p(),h:p()}).describe(`Grid layout position`),options:t().optional().describe(`Widget specific configuration`),responsive:B.optional().describe(`Responsive layout configuration`),aria:L.optional().describe(`ARIA accessibility attributes`)})),Nr=_(()=>h({object:e().describe(`Source object name`),valueField:e().describe(`Field to use as option value`),labelField:e().describe(`Field to use as option label`),filter:G.optional().describe(`Filter to apply to source object`)}).describe(`Dynamic filter options from object`)),Pr=_(()=>h({field:e().describe(`Field name to filter on`),label:I.optional().describe(`Display label for the filter`),type:d([`text`,`select`,`date`,`number`,`lookup`]).optional().describe(`Filter input type`),options:l(h({value:n([e(),p(),f()]).describe(`Option value`),label:I})).optional().describe(`Static filter options`),optionsFrom:Nr.optional().describe(`Dynamic filter options from object`),defaultValue:n([e(),p(),f()]).optional().describe(`Default filter value`),scope:d([`dashboard`,`widget`]).default(`dashboard`).describe(`Filter application scope`),targetWidgets:l(e()).optional().describe(`Widget IDs to apply this filter to`)})),Fr=_(()=>h({name:k.describe(`Dashboard unique name`),label:I.describe(`Dashboard label`),description:I.optional().describe(`Dashboard description`),header:Ar.optional().describe(`Dashboard header configuration`),widgets:l(Mr).describe(`Widgets to display`),columns:p().int().min(1).max(24).optional().describe(`Number of grid columns (default 12)`),gap:p().int().min(0).optional().describe(`Grid gap in Tailwind spacing units`),refreshInterval:p().optional().describe(`Auto-refresh interval in seconds`),dateRange:h({field:e().optional().describe(`Default date field name for time-based filtering`),defaultRange:d([`today`,`yesterday`,`this_week`,`last_week`,`this_month`,`last_month`,`this_quarter`,`last_quarter`,`this_year`,`last_year`,`last_7_days`,`last_30_days`,`last_90_days`,`custom`]).default(`this_month`).describe(`Default date range preset`),allowCustomRange:f().default(!0).describe(`Allow users to pick a custom date range`)}).optional().describe(`Global dashboard date range filter configuration`),globalFilters:l(Pr).optional().describe(`Global filters that apply to all widgets in the dashboard`),aria:L.optional().describe(`ARIA accessibility attributes`),performance:V.optional().describe(`Performance optimization settings`)})),Ir=d([`tabular`,`summary`,`matrix`,`joined`]),Lr=_(()=>h({field:e().describe(`Field name`),label:I.optional().describe(`Override label`),aggregate:d([`sum`,`avg`,`max`,`min`,`count`,`unique`]).optional().describe(`Aggregation function`),responsive:B.optional().describe(`Responsive visibility for this column`)})),Rr=_(()=>h({field:e().describe(`Field to group by`),sortOrder:d([`asc`,`desc`]).default(`asc`),dateGranularity:d([`day`,`week`,`month`,`quarter`,`year`]).optional().describe(`For date fields`)})),zr=_(()=>Er.extend({xAxis:e().describe(`Grouping field for X-Axis`),yAxis:e().describe(`Summary field for Y-Axis`),groupBy:e().optional().describe(`Additional grouping field`)})),Br=_(()=>h({name:k.describe(`Report unique name`),label:I.describe(`Report label`),description:I.optional(),objectName:e().describe(`Primary object`),type:Ir.default(`tabular`).describe(`Report format type`),columns:l(Lr).describe(`Columns to display`),groupingsDown:l(Rr).optional().describe(`Row groupings`),groupingsAcross:l(Rr).optional().describe(`Column groupings (Matrix only)`),filter:G.optional().describe(`Filter criteria`),chart:zr.optional().describe(`Embedded chart configuration`),aria:L.optional().describe(`ARIA accessibility attributes`),performance:V.optional().describe(`Performance optimization settings`)})),Vr=_(()=>h({minWidth:p().default(44).describe(`Minimum touch target width in pixels (WCAG 2.5.5: 44px)`),minHeight:p().default(44).describe(`Minimum touch target height in pixels (WCAG 2.5.5: 44px)`),padding:p().optional().describe(`Additional padding around touch target in pixels`),hitSlop:h({top:p().optional().describe(`Extra hit area above the element`),right:p().optional().describe(`Extra hit area to the right of the element`),bottom:p().optional().describe(`Extra hit area below the element`),left:p().optional().describe(`Extra hit area to the left of the element`)}).optional().describe(`Invisible hit area extension beyond the visible bounds`)}).describe(`Touch target sizing configuration (WCAG accessible)`)),Hr=_(()=>d([`swipe`,`pinch`,`long_press`,`double_tap`,`drag`,`rotate`,`pan`]).describe(`Touch gesture type`)),Ur=_(()=>d([`up`,`down`,`left`,`right`])),Wr=_(()=>h({direction:l(Ur).describe(`Allowed swipe directions`),threshold:p().optional().describe(`Minimum distance in pixels to recognize swipe`),velocity:p().optional().describe(`Minimum velocity (px/ms) to trigger swipe`)}).describe(`Swipe gesture recognition settings`)),Gr=_(()=>h({minScale:p().optional().describe(`Minimum scale factor (e.g., 0.5 for 50%)`),maxScale:p().optional().describe(`Maximum scale factor (e.g., 3.0 for 300%)`)}).describe(`Pinch/zoom gesture recognition settings`)),Kr=_(()=>h({duration:p().default(500).describe(`Hold duration in milliseconds to trigger long press`),moveTolerance:p().optional().describe(`Max movement in pixels allowed during press`)}).describe(`Long press gesture recognition settings`)),qr=_(()=>h({type:Hr.describe(`Gesture type to configure`),label:I.optional().describe(`Descriptive label for the gesture action`),enabled:f().default(!0).describe(`Whether this gesture is active`),swipe:Wr.optional().describe(`Swipe gesture settings (when type is swipe)`),pinch:Gr.optional().describe(`Pinch gesture settings (when type is pinch)`),longPress:Kr.optional().describe(`Long press settings (when type is long_press)`)}).describe(`Per-gesture configuration`));_(()=>h({gestures:l(qr).optional().describe(`Configured gesture recognizers`),touchTarget:Vr.optional().describe(`Touch target sizing and hit area`),hapticFeedback:f().optional().describe(`Enable haptic feedback on touch interactions`)}).merge(L.partial()).describe(`Touch and gesture interaction configuration`));var Jr=_(()=>h({enabled:f().default(!1).describe(`Enable focus trapping within this container`),initialFocus:e().optional().describe(`CSS selector for the element to focus on activation`),returnFocus:f().default(!0).describe(`Return focus to trigger element on deactivation`),escapeDeactivates:f().default(!0).describe(`Allow Escape key to deactivate the focus trap`)}).describe(`Focus trap configuration for modal-like containers`)),Yr=_(()=>h({key:e().describe(`Key combination (e.g., "Ctrl+S", "Alt+N", "Escape")`),action:e().describe(`Action identifier to invoke when shortcut is triggered`),description:I.optional().describe(`Human-readable description of what the shortcut does`),scope:d([`global`,`view`,`form`,`modal`,`list`]).default(`global`).describe(`Scope in which this shortcut is active`)}).describe(`Keyboard shortcut binding`)),Xr=_(()=>h({tabOrder:d([`auto`,`manual`]).default(`auto`).describe(`Tab order strategy: auto (DOM order) or manual (explicit tabIndex)`),skipLinks:f().default(!1).describe(`Provide skip-to-content navigation links`),focusVisible:f().default(!0).describe(`Show visible focus indicators for keyboard users`),focusTrap:Jr.optional().describe(`Focus trap settings`),arrowNavigation:f().default(!1).describe(`Enable arrow key navigation between focusable items`)}).describe(`Focus and tab navigation management`));_(()=>h({shortcuts:l(Yr).optional().describe(`Registered keyboard shortcuts`),focusManagement:Xr.optional().describe(`Focus and tab order management`),rovingTabindex:f().default(!1).describe(`Enable roving tabindex pattern for composite widgets`)}).merge(L.partial()).describe(`Keyboard navigation and shortcut configuration`));var Zr=_(()=>h({primary:e().describe(`Primary brand color (hex, rgb, or hsl)`),secondary:e().optional().describe(`Secondary brand color`),accent:e().optional().describe(`Accent color for highlights`),success:e().optional().describe(`Success state color (default: green)`),warning:e().optional().describe(`Warning state color (default: yellow)`),error:e().optional().describe(`Error state color (default: red)`),info:e().optional().describe(`Info state color (default: blue)`),background:e().optional().describe(`Background color`),surface:e().optional().describe(`Surface/card background color`),text:e().optional().describe(`Primary text color`),textSecondary:e().optional().describe(`Secondary text color`),border:e().optional().describe(`Border color`),disabled:e().optional().describe(`Disabled state color`),primaryLight:e().optional().describe(`Lighter shade of primary`),primaryDark:e().optional().describe(`Darker shade of primary`),secondaryLight:e().optional().describe(`Lighter shade of secondary`),secondaryDark:e().optional().describe(`Darker shade of secondary`)})),Qr=_(()=>h({fontFamily:h({base:e().optional().describe(`Base font family (default: system fonts)`),heading:e().optional().describe(`Heading font family`),mono:e().optional().describe(`Monospace font family for code`)}).optional(),fontSize:h({xs:e().optional().describe(`Extra small font size (e.g., 0.75rem)`),sm:e().optional().describe(`Small font size (e.g., 0.875rem)`),base:e().optional().describe(`Base font size (e.g., 1rem)`),lg:e().optional().describe(`Large font size (e.g., 1.125rem)`),xl:e().optional().describe(`Extra large font size (e.g., 1.25rem)`),"2xl":e().optional().describe(`2X large font size (e.g., 1.5rem)`),"3xl":e().optional().describe(`3X large font size (e.g., 1.875rem)`),"4xl":e().optional().describe(`4X large font size (e.g., 2.25rem)`)}).optional(),fontWeight:h({light:p().optional().describe(`Light weight (default: 300)`),normal:p().optional().describe(`Normal weight (default: 400)`),medium:p().optional().describe(`Medium weight (default: 500)`),semibold:p().optional().describe(`Semibold weight (default: 600)`),bold:p().optional().describe(`Bold weight (default: 700)`)}).optional(),lineHeight:h({tight:e().optional().describe(`Tight line height (e.g., 1.25)`),normal:e().optional().describe(`Normal line height (e.g., 1.5)`),relaxed:e().optional().describe(`Relaxed line height (e.g., 1.75)`),loose:e().optional().describe(`Loose line height (e.g., 2)`)}).optional(),letterSpacing:h({tighter:e().optional().describe(`Tighter letter spacing (e.g., -0.05em)`),tight:e().optional().describe(`Tight letter spacing (e.g., -0.025em)`),normal:e().optional().describe(`Normal letter spacing (e.g., 0)`),wide:e().optional().describe(`Wide letter spacing (e.g., 0.025em)`),wider:e().optional().describe(`Wider letter spacing (e.g., 0.05em)`)}).optional()})),$r=_(()=>h({0:e().optional().describe(`0 spacing (0)`),1:e().optional().describe(`Spacing unit 1 (e.g., 0.25rem)`),2:e().optional().describe(`Spacing unit 2 (e.g., 0.5rem)`),3:e().optional().describe(`Spacing unit 3 (e.g., 0.75rem)`),4:e().optional().describe(`Spacing unit 4 (e.g., 1rem)`),5:e().optional().describe(`Spacing unit 5 (e.g., 1.25rem)`),6:e().optional().describe(`Spacing unit 6 (e.g., 1.5rem)`),8:e().optional().describe(`Spacing unit 8 (e.g., 2rem)`),10:e().optional().describe(`Spacing unit 10 (e.g., 2.5rem)`),12:e().optional().describe(`Spacing unit 12 (e.g., 3rem)`),16:e().optional().describe(`Spacing unit 16 (e.g., 4rem)`),20:e().optional().describe(`Spacing unit 20 (e.g., 5rem)`),24:e().optional().describe(`Spacing unit 24 (e.g., 6rem)`)})),ei=_(()=>h({none:e().optional().describe(`No border radius (0)`),sm:e().optional().describe(`Small border radius (e.g., 0.125rem)`),base:e().optional().describe(`Base border radius (e.g., 0.25rem)`),md:e().optional().describe(`Medium border radius (e.g., 0.375rem)`),lg:e().optional().describe(`Large border radius (e.g., 0.5rem)`),xl:e().optional().describe(`Extra large border radius (e.g., 0.75rem)`),"2xl":e().optional().describe(`2X large border radius (e.g., 1rem)`),full:e().optional().describe(`Full border radius (50%)`)})),ti=_(()=>h({none:e().optional().describe(`No shadow`),sm:e().optional().describe(`Small shadow`),base:e().optional().describe(`Base shadow`),md:e().optional().describe(`Medium shadow`),lg:e().optional().describe(`Large shadow`),xl:e().optional().describe(`Extra large shadow`),"2xl":e().optional().describe(`2X large shadow`),inner:e().optional().describe(`Inner shadow (inset)`)})),ni=_(()=>h({xs:e().optional().describe(`Extra small breakpoint (e.g., 480px)`),sm:e().optional().describe(`Small breakpoint (e.g., 640px)`),md:e().optional().describe(`Medium breakpoint (e.g., 768px)`),lg:e().optional().describe(`Large breakpoint (e.g., 1024px)`),xl:e().optional().describe(`Extra large breakpoint (e.g., 1280px)`),"2xl":e().optional().describe(`2X large breakpoint (e.g., 1536px)`)})),ri=_(()=>h({duration:h({fast:e().optional().describe(`Fast animation (e.g., 150ms)`),base:e().optional().describe(`Base animation (e.g., 300ms)`),slow:e().optional().describe(`Slow animation (e.g., 500ms)`)}).optional(),timing:h({linear:e().optional().describe(`Linear timing function`),ease:e().optional().describe(`Ease timing function`),ease_in:e().optional().describe(`Ease-in timing function`),ease_out:e().optional().describe(`Ease-out timing function`),ease_in_out:e().optional().describe(`Ease-in-out timing function`)}).optional()})),ii=_(()=>h({base:p().optional().describe(`Base z-index (e.g., 0)`),dropdown:p().optional().describe(`Dropdown z-index (e.g., 1000)`),sticky:p().optional().describe(`Sticky z-index (e.g., 1020)`),fixed:p().optional().describe(`Fixed z-index (e.g., 1030)`),modalBackdrop:p().optional().describe(`Modal backdrop z-index (e.g., 1040)`),modal:p().optional().describe(`Modal z-index (e.g., 1050)`),popover:p().optional().describe(`Popover z-index (e.g., 1060)`),tooltip:p().optional().describe(`Tooltip z-index (e.g., 1070)`)})),ai=_(()=>d([`light`,`dark`,`auto`])),oi=_(()=>d([`compact`,`regular`,`spacious`])),si=_(()=>d([`AA`,`AAA`])),ci=_(()=>h({name:k.describe(`Unique theme identifier (snake_case)`),label:e().describe(`Human-readable theme name`),description:e().optional().describe(`Theme description`),mode:ai.default(`light`).describe(`Theme mode (light, dark, or auto)`),colors:Zr.describe(`Color palette configuration`),typography:Qr.optional().describe(`Typography settings`),spacing:$r.optional().describe(`Spacing scale`),borderRadius:ei.optional().describe(`Border radius scale`),shadows:ti.optional().describe(`Box shadow effects`),breakpoints:ni.optional().describe(`Responsive breakpoints`),animation:ri.optional().describe(`Animation settings`),zIndex:ii.optional().describe(`Z-index scale for layering`),customVars:m(e(),e()).optional().describe(`Custom CSS variables (key-value pairs)`),logo:h({light:e().optional().describe(`Logo URL for light mode`),dark:e().optional().describe(`Logo URL for dark mode`),favicon:e().optional().describe(`Favicon URL`)}).optional().describe(`Logo assets`),extends:e().optional().describe(`Base theme to extend from`),density:oi.optional().describe(`Display density: compact, regular, or spacious`),wcagContrast:si.optional().describe(`WCAG color contrast level (AA or AAA)`),rtl:f().optional().describe(`Enable right-to-left layout direction`),touchTarget:Vr.optional().describe(`Touch target sizing defaults`),keyboardNavigation:Xr.optional().describe(`Keyboard focus management settings`)})),li=d([`user`,`role`,`manager`,`field`,`queue`]),ui=d([`field_update`,`email_alert`,`webhook`,`script`,`connector_action`]),J=_(()=>h({type:ui,name:e().describe(`Action name`),config:m(e(),t()).describe(`Action configuration`),connectorId:e().optional(),actionId:e().optional()})),di=_(()=>h({name:k.describe(`Step machine name`),label:e().describe(`Step display label`),description:e().optional(),entryCriteria:j.optional().describe(`Predicate (CEL) to enter this step.`),approvers:l(h({type:li,value:e().describe(`User ID, Role Name, or Field Name`)})).min(1).describe(`List of allowed approvers`),behavior:d([`first_response`,`unanimous`]).default(`first_response`).describe(`How to handle multiple approvers`),rejectionBehavior:d([`reject_process`,`back_to_previous`]).default(`reject_process`).describe(`What happens if rejected`),onApprove:l(J).optional().describe(`Actions on step approval`),onReject:l(J).optional().describe(`Actions on step rejection`)})),fi=_(()=>h({name:k.describe(`Unique process name`),label:e().describe(`Human readable label`),object:e().describe(`Target Object Name`),active:f().default(!1),description:e().optional(),entryCriteria:j.optional().describe(`Predicate (CEL) to allow submission.`),lockRecord:f().default(!0).describe(`Lock record from editing during approval`),steps:l(di).min(1).describe(`Sequence of approval steps`),escalation:h({enabled:f().default(!1).describe(`Enable SLA-based escalation`),timeoutHours:p().min(1).describe(`Hours before escalation triggers`),action:d([`reassign`,`auto_approve`,`auto_reject`,`notify`]).default(`notify`).describe(`Action to take on escalation timeout`),escalateTo:e().optional().describe(`User ID, role, or manager level to escalate to`),notifySubmitter:f().default(!0).describe(`Notify the original submitter on escalation`)}).optional().describe(`SLA escalation configuration for pending approval steps`),onSubmit:l(J).optional().describe(`Actions on initial submission`),onFinalApprove:l(J).optional().describe(`Actions on final approval`),onFinalReject:l(J).optional().describe(`Actions on final rejection`),onRecall:l(J).optional().describe(`Actions on recall`)}));Object.assign(fi,{create:e=>e});var pi=d([`on_create`,`on_update`,`on_create_or_update`,`on_delete`,`schedule`]),mi=_(()=>h({name:e().describe(`Action name`),type:o(`field_update`),field:e().describe(`Field to update`),value:t().describe(`Value or Formula to set`)})),hi=_(()=>h({name:e().describe(`Action name`),type:o(`email_alert`),template:e().describe(`Email template ID/DevName`),recipients:l(e()).describe(`List of recipient emails or user IDs`)})),gi=_(()=>h({name:e().describe(`Action name`),type:o(`connector_action`),connectorId:e().describe(`Target Connector ID (e.g. slack, twilio)`),actionId:e().describe(`Target Action ID (e.g. send_message)`),input:m(e(),t()).describe(`Input parameters matching the action schema`)})),_i=_(()=>h({name:e().describe(`Action name`),type:o(`http_call`),url:e().describe(`Target URL`),method:d([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`]).default(`POST`).describe(`HTTP Method`),headers:m(e(),e()).optional().describe(`HTTP Headers`),body:e().optional().describe(`Request body (JSON or text)`)})),vi=_(()=>h({name:e().describe(`Action name`),type:o(`task_creation`),taskObject:e().describe(`Task object name (e.g., "task", "project_task")`),subject:e().describe(`Task subject/title`),description:e().optional().describe(`Task description`),assignedTo:e().optional().describe(`User ID or field reference for assignee`),dueDate:j.optional().describe('Due date — CEL expression evaluated at task creation, e.g. cel`now() + duration("P3D")`'),priority:e().optional().describe(`Task priority`),relatedTo:e().optional().describe(`Related record ID or field reference`),additionalFields:m(e(),t()).optional().describe(`Additional custom fields`)})),yi=_(()=>h({name:e().describe(`Action name`),type:o(`push_notification`),title:e().describe(`Notification title`),body:e().describe(`Notification body text`),recipients:l(e()).describe(`User IDs or device tokens`),data:m(e(),t()).optional().describe(`Additional data payload`),badge:p().optional().describe(`Badge count (iOS)`),sound:e().optional().describe(`Notification sound`),clickAction:e().optional().describe(`Action/URL when notification is clicked`)})),bi=_(()=>h({name:e().describe(`Action name`),type:o(`custom_script`),language:d([`javascript`,`typescript`,`python`]).default(`javascript`).describe(`Script language`),code:e().describe(`Script code to execute`),timeout:p().default(3e4).describe(`Execution timeout in milliseconds`),context:m(e(),t()).optional().describe(`Additional context variables`)})),xi=_(()=>u(`type`,[mi,hi,_i,gi,vi,yi,bi])),Si=_(()=>h({id:e().optional().describe(`Unique identifier`),timeLength:p().int().describe(`Duration amount (e.g. 1, 30)`),timeUnit:d([`minutes`,`hours`,`days`]).describe(`Unit of time`),offsetDirection:d([`before`,`after`]).describe(`Before or After the reference date`),offsetFrom:d([`trigger_date`,`date_field`]).describe(`Basis for calculation`),dateField:e().optional().describe(`Date field to calculate from (required if offsetFrom is date_field)`),actions:l(xi).describe(`Actions to execute at the scheduled time`)})),Ci=_(()=>h({name:k.describe(`Unique workflow name (lowercase snake_case)`),objectName:e().describe(`Target Object`),triggerType:pi.describe(`When to evaluate`),criteria:j.optional().describe(`Predicate (CEL). If TRUE, actions execute.`),actions:l(xi).optional().describe(`Immediate actions`),timeTriggers:l(Si).optional().describe(`Scheduled actions relative to trigger or date field`),active:f().default(!0).describe(`Whether this workflow is active`),executionOrder:p().int().min(0).default(100).describe(`Deterministic execution order when multiple workflows match (lower runs first)`),reevaluateOnChange:f().default(!1).describe(`Re-evaluate rule if field updates change the record validity`)})),wi=d([`start`,`end`,`decision`,`assignment`,`loop`,`create_record`,`update_record`,`delete_record`,`get_record`,`http_request`,`script`,`screen`,`wait`,`subflow`,`connector_action`,`parallel_gateway`,`join_gateway`,`boundary_event`]),Ti=_(()=>h({name:e().describe(`Variable name`),type:e().describe(`Data type (text, number, boolean, object, list)`),isInput:f().default(!1).describe(`Is input parameter`),isOutput:f().default(!1).describe(`Is output parameter`)})),Ei=_(()=>h({id:e().describe(`Node unique ID`),type:wi.describe(`Action type`),label:e().describe(`Node label`),config:m(e(),t()).optional().describe(`Node configuration`),connectorConfig:h({connectorId:e(),actionId:e(),input:m(e(),t()).describe(`Mapped inputs for the action`)}).optional(),position:h({x:p(),y:p()}).optional(),timeoutMs:p().int().min(0).optional().describe(`Maximum execution time for this node in milliseconds`),inputSchema:m(e(),h({type:d([`string`,`number`,`boolean`,`object`,`array`]).describe(`Parameter type`),required:f().default(!1).describe(`Whether the parameter is required`),description:e().optional().describe(`Parameter description`)})).optional().describe(`Input parameter schema for this node`),outputSchema:m(e(),h({type:d([`string`,`number`,`boolean`,`object`,`array`]).describe(`Output type`),description:e().optional().describe(`Output description`)})).optional().describe(`Output schema declaration for this node`),waitEventConfig:h({eventType:d([`timer`,`signal`,`webhook`,`manual`,`condition`]).describe(`What kind of event resumes the execution`),timerDuration:e().optional().describe(`ISO 8601 duration (e.g., "PT1H") or wait time for timer events`),signalName:e().optional().describe(`Named signal or webhook event to wait for`),timeoutMs:p().int().min(0).optional().describe(`Maximum wait time before timeout (ms)`),onTimeout:d([`fail`,`continue`]).default(`fail`).describe(`Behavior when the wait times out`)}).optional().describe(`Configuration for wait node event resumption`),boundaryConfig:h({attachedToNodeId:e().describe(`Host node ID this boundary event monitors`),eventType:d([`error`,`timer`,`signal`,`cancel`]).describe(`Boundary event trigger type`),interrupting:f().default(!0).describe(`If true, the host activity is cancelled when this event fires`),errorCode:e().optional().describe(`Specific error code to catch (empty = catch all errors)`),timerDuration:e().optional().describe(`ISO 8601 duration for timer boundary events`),signalName:e().optional().describe(`Named signal to catch`)}).optional().describe(`Configuration for boundary events attached to host nodes`)})),Di=_(()=>h({id:e().describe(`Edge unique ID`),source:e().describe(`Source Node ID`),target:e().describe(`Target Node ID`),condition:j.optional().describe(`Predicate (CEL) returning boolean used for branching.`),type:d([`default`,`fault`,`conditional`]).default(`default`).describe(`Connection type: default (normal flow), fault (error path), or conditional (expression-guarded)`),label:e().optional().describe(`Label on the connector`),isDefault:f().default(!1).describe(`Marks this edge as the default path when no other conditions match`)})),Oi=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Machine name`),label:e().describe(`Flow label`),description:e().optional(),version:p().int().default(1).describe(`Version number`),status:d([`draft`,`active`,`obsolete`,`invalid`]).default(`draft`).describe(`Deployment status`),template:f().default(!1).describe(`Is logic template (Subflow)`),type:d([`autolaunched`,`record_change`,`schedule`,`screen`,`api`]).describe(`Flow type`),variables:l(Ti).optional().describe(`Flow variables`),nodes:l(Ei).describe(`Flow nodes`),edges:l(Di).describe(`Flow connections`),active:f().default(!1).describe(`Is active (Deprecated: use status)`),runAs:d([`system`,`user`]).default(`user`).describe(`Execution context`),errorHandling:h({strategy:d([`fail`,`retry`,`continue`]).default(`fail`).describe(`How to handle node execution errors`),maxRetries:p().int().min(0).max(10).default(0).describe(`Number of retry attempts (only for retry strategy)`),retryDelayMs:p().int().min(0).default(1e3).describe(`Delay between retries in milliseconds`),backoffMultiplier:p().min(1).default(1).describe(`Multiplier for exponential backoff between retries`),maxRetryDelayMs:p().int().min(0).default(3e4).describe(`Maximum delay between retries in milliseconds`),jitter:f().default(!1).describe(`Add random jitter to retry delay to avoid thundering herd`),fallbackNodeId:e().optional().describe(`Node ID to jump to on unrecoverable error`)}).optional().describe(`Flow-level error handling configuration`)}));_(()=>h({flowName:e().describe(`Flow machine name`),version:p().int().min(1).describe(`Version number`),definition:Oi.describe(`Complete flow definition snapshot`),createdAt:e().datetime().describe(`When this version was created`),createdBy:e().optional().describe(`User who created this version`),changeNote:e().optional().describe(`Description of what changed in this version`)}));var ki=_(()=>h({name:k.describe(`Unique role name (lowercase snake_case)`),label:e().describe(`Display label (e.g. VP of Sales)`),parent:e().optional().describe(`Parent Role ID (Reports To)`),description:e().optional()})),Ai=d([`select`,`insert`,`update`,`delete`,`all`]),ji=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Policy unique identifier (snake_case)`),label:e().optional().describe(`Human-readable policy label`),description:e().optional().describe(`Policy description and business justification`),object:e().describe(`Target object name`),operation:Ai.describe(`Database operation this policy applies to`),using:e().optional().describe(`Filter condition for SELECT/UPDATE/DELETE (PostgreSQL SQL WHERE clause syntax with parameterized context variables). Optional for INSERT-only policies.`),check:e().optional().describe(`Validation condition for INSERT/UPDATE (defaults to USING clause if not specified - enforced at application level)`),roles:l(e()).optional().describe(`Roles this policy applies to (omit for all roles)`),enabled:f().default(!0).describe(`Whether this policy is active`),priority:p().int().default(0).describe(`Policy evaluation priority (higher = evaluated first)`),tags:l(e()).optional().describe(`Policy categorization tags`)}).superRefine((e,t)=>{!e.using&&!e.check&&t.addIssue({code:g.custom,message:`At least one of "using" or "check" must be specified. For SELECT/UPDATE/DELETE operations, provide "using". For INSERT operations, provide "check".`})}));_(()=>h({timestamp:e().describe(`ISO 8601 timestamp of the evaluation`),userId:e().describe(`User ID whose access was evaluated`),operation:d([`select`,`insert`,`update`,`delete`]).describe(`Database operation being performed`),object:e().describe(`Target object name`),policyName:e().describe(`Name of the RLS policy evaluated`),granted:f().describe(`Whether access was granted`),evaluationDurationMs:p().describe(`Policy evaluation duration in milliseconds`),matchedCondition:e().optional().describe(`Which USING/CHECK clause matched`),rowCount:p().optional().describe(`Number of rows affected`),metadata:m(e(),t()).optional().describe(`Additional audit event metadata`)}));var Mi=_(()=>h({enabled:f().describe(`Enable RLS audit logging`),logLevel:d([`all`,`denied_only`,`granted_only`,`none`]).describe(`Which evaluations to log`),destination:d([`system_log`,`audit_trail`,`external`]).describe(`Audit log destination`),sampleRate:p().min(0).max(1).describe(`Sampling rate (0-1) for high-traffic environments`),retentionDays:p().int().default(90).describe(`Audit log retention period in days`),includeRowData:f().default(!1).describe(`Include row data in audit logs (security-sensitive)`),alertOnDenied:f().default(!0).describe(`Send alerts when access is denied`)}));_(()=>h({enabled:f().default(!0).describe(`Enable RLS enforcement globally`),defaultPolicy:d([`deny`,`allow`]).default(`deny`).describe(`Default action when no policies match`),allowSuperuserBypass:f().default(!0).describe(`Allow superusers to bypass RLS`),bypassRoles:l(e()).optional().describe(`Roles that bypass RLS (see all data)`),logEvaluations:f().default(!1).describe(`Log RLS policy evaluations for debugging`),cacheResults:f().default(!0).describe(`Cache RLS evaluation results`),cacheTtlSeconds:p().int().positive().default(300).describe(`Cache TTL in seconds`),prefetchUserContext:f().default(!0).describe(`Pre-fetch user context for performance`),audit:Mi.optional().describe(`RLS audit logging configuration`)})),_(()=>h({id:e().describe(`User ID`),email:e().email().optional().describe(`User email`),tenantId:e().optional().describe(`Tenant/Organization ID`),role:n([e(),l(e())]).optional().describe(`User role(s)`),department:e().optional().describe(`User department`),attributes:m(e(),t()).optional().describe(`Additional custom user attributes`)})),_(()=>h({policyName:e().describe(`Policy name`),granted:f().describe(`Whether access was granted`),durationMs:p().optional().describe(`Evaluation duration in milliseconds`),error:e().optional().describe(`Error message if evaluation failed`),usingResult:f().optional().describe(`USING clause evaluation result`),checkResult:f().optional().describe(`CHECK clause evaluation result`)}));var Ni=_(()=>h({allowCreate:f().default(!1).describe(`Create permission`),allowRead:f().default(!1).describe(`Read permission`),allowEdit:f().default(!1).describe(`Edit permission`),allowDelete:f().default(!1).describe(`Delete permission`),allowTransfer:f().default(!1).describe(`Change record ownership`),allowRestore:f().default(!1).describe(`Restore from trash (Undelete)`),allowPurge:f().default(!1).describe(`Permanently delete (Hard Delete/GDPR)`),viewAllRecords:f().default(!1).describe(`View All Data (Bypass Sharing)`),modifyAllRecords:f().default(!1).describe(`Modify All Data (Bypass Sharing)`)})),Pi=_(()=>h({readable:f().default(!0).describe(`Field read access`),editable:f().default(!1).describe(`Field edit access`)})),Fi=_(()=>h({name:k.describe(`Permission set unique name (lowercase snake_case)`),label:e().optional().describe(`Display label`),isProfile:f().default(!1).describe(`Whether this is a user profile`),objects:m(e(),Ni).describe(`Entity permissions`),fields:m(e(),Pi).optional().describe(`Field level security`),systemPermissions:l(e()).optional().describe(`System level capabilities`),tabPermissions:m(e(),d([`visible`,`hidden`,`default_on`,`default_off`])).optional().describe(`App/tab visibility: visible, hidden, default_on (shown by default), default_off (available but hidden initially)`),rowLevelSecurity:l(ji).optional().describe(`Row-level security policies (see rls.zod.ts for full spec)`),contextVariables:m(e(),t()).optional().describe(`Context variables for RLS evaluation`)}));d([`private`,`public_read`,`public_read_write`,`controlled_by_parent`]),d([`owner`,`criteria`]);var Ii=d([`read`,`edit`,`full`]),Li=d([`user`,`group`,`role`,`role_and_subordinates`,`guest`]),Ri=h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique rule name (snake_case)`),label:e().optional().describe(`Human-readable label`),description:e().optional().describe(`Administrative notes`),object:e().describe(`Target Object Name`),active:f().default(!0),accessLevel:Ii.default(`read`),sharedWith:h({type:Li,value:e().describe(`ID or Code of the User/Group/Role`)}).describe(`The recipient of the shared access`)}),zi=_(()=>Ri.extend({type:o(`criteria`),condition:j.describe('Predicate (CEL). e.g. P`record.department == "Sales"`')})),Bi=_(()=>Ri.extend({type:o(`owner`),ownedBy:h({type:Li,value:e()}).describe(`Source group/role whose records are being shared`)})),Vi=_(()=>u(`type`,[zi,Bi])),Hi=_(()=>h({minLength:p().default(8),requireUppercase:f().default(!0),requireLowercase:f().default(!0),requireNumbers:f().default(!0),requireSymbols:f().default(!1),expirationDays:p().optional().describe(`Force password change every X days`),historyCount:p().default(3).describe(`Prevent reusing last X passwords`)})),Ui=_(()=>h({trustedRanges:l(e()).describe(`CIDR ranges allowed to access (e.g. 10.0.0.0/8)`),blockUnknown:f().default(!1).describe(`Block all IPs not in trusted ranges`),vpnRequired:f().default(!1)})),Wi=_(()=>h({idleTimeout:p().default(30).describe(`Minutes before idle session logout`),absoluteTimeout:p().default(480).describe(`Max session duration (minutes)`),forceMfa:f().default(!1).describe(`Require 2FA for all users`)})),Gi=_(()=>h({logRetentionDays:p().default(180),sensitiveFields:l(e()).describe(`Fields to redact in logs (e.g. password, ssn)`),captureRead:f().default(!1).describe(`Log read access (High volume!)`)})),Ki=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Policy Name`),password:Hi.optional(),network:Ui.optional(),session:Wi.optional(),audit:Gi.optional(),isDefault:f().default(!1).describe(`Apply to all users by default`),assignedProfiles:l(e()).optional().describe(`Apply to specific profiles`)})),qi=_(()=>h({source:e().describe(`Source field/path`),target:e().describe(`Target field/path`),transform:e().optional().describe(`Transformation function name`)})),Y=h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique endpoint ID`),path:e().regex(/^\//).describe(`URL Path (e.g. /api/v1/customers)`),method:Mn.describe(`HTTP Method`),summary:e().optional(),description:e().optional(),type:d([`flow`,`script`,`object_operation`,`proxy`]).describe(`Implementation type`),target:e().describe(`Target Flow ID, Script Name, or Proxy URL`),objectParams:h({object:e().optional(),operation:d([`find`,`get`,`create`,`update`,`delete`]).optional()}).optional().describe(`For object_operation type`),inputMapping:l(qi).optional().describe(`Map Request Body to Internal Params`),outputMapping:l(qi).optional().describe(`Map Internal Result to Response Body`),authRequired:f().default(!0).describe(`Require authentication`),rateLimit:Fn.optional().describe(`Rate limiting policy`),cacheTtl:p().optional().describe(`Response cache TTL in seconds`)});Object.assign(Y,{create:e=>e});var Ji=d([`boolean`,`percentage`,`user_list`,`group`,`custom`]),Yi=_(()=>h({name:k.describe(`Feature key (snake_case)`),label:e().optional().describe(`Display label`),description:e().optional(),enabled:f().default(!1).describe(`Is globally enabled`),strategy:Ji.default(`boolean`),conditions:h({percentage:p().min(0).max(100).optional(),users:l(e()).optional(),groups:l(e()).optional(),expression:j.optional().describe(`Custom predicate (CEL).`)}).optional(),environment:d([`dev`,`staging`,`prod`,`all`]).default(`all`).describe(`Environment validity`),expiresAt:e().datetime().optional().describe(`Feature flag expiration date`)}));Object.assign(Yi,{create:e=>e});var Xi=_(()=>h({provider:d([`openai`,`azure_openai`,`anthropic`,`local`]).default(`openai`),model:e().describe(`Model name (e.g. gpt-4, claude-3-opus)`),temperature:p().min(0).max(2).default(.7),maxTokens:p().optional(),topP:p().optional()})),Zi=_(()=>h({type:d([`action`,`flow`,`query`,`vector_search`]),name:e().describe(`Reference name (Action Name, Flow Name)`),description:e().optional().describe(`Override description for the LLM`)})),Qi=_(()=>h({topics:l(e()).describe(`Topics/Tags to recruit knowledge from`),indexes:l(e()).describe(`Vector Store Indexes`)})),$i=_(()=>d([`json_object`,`json_schema`,`regex`,`grammar`,`xml`]).describe(`Output format for structured agent responses`)),ea=_(()=>d([`trim`,`parse_json`,`validate`,`coerce_types`]).describe(`Post-processing step for structured output`)),ta=_(()=>h({format:$i.describe(`Expected output format`),schema:m(e(),t()).optional().describe(`JSON Schema definition for output`),strict:f().default(!1).describe(`Enforce exact schema compliance`),retryOnValidationFailure:f().default(!0).describe(`Retry generation when output fails validation`),maxRetries:p().int().min(0).default(3).describe(`Maximum retries on validation failure`),fallbackFormat:$i.optional().describe(`Fallback format if primary format fails`),transformPipeline:l(ea).optional().describe(`Post-processing steps applied to output`)}).describe(`Structured output configuration for agent responses`)),na=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Agent unique identifier`),label:e().describe(`Agent display name`),avatar:e().optional(),role:e().describe(`The persona/role (e.g. "Senior Support Engineer")`),instructions:e().describe(`System Prompt / Prime Directives`),model:Xi.optional(),lifecycle:qt.optional().describe(`State machine defining the agent conversation follow and constraints`),skills:l(e().regex(/^[a-z_][a-z0-9_]*$/)).optional().describe(`Skill names to attach (Agent→Skill→Tool architecture)`),tools:l(Zi).optional().describe(`Direct tool references (legacy fallback)`),knowledge:Qi.optional().describe(`RAG access`),active:f().default(!0),access:l(e()).optional().describe(`Who can chat with this agent`),permissions:l(e()).optional().describe(`Required permissions or roles`),tenantId:e().optional().describe(`Tenant/Organization ID`),visibility:d([`global`,`organization`,`private`]).default(`organization`),planning:h({strategy:d([`react`,`plan_and_execute`,`reflexion`,`tree_of_thought`]).default(`react`).describe(`Autonomous reasoning strategy`),maxIterations:p().int().min(1).max(100).default(10).describe(`Maximum planning loop iterations`),allowReplan:f().default(!0).describe(`Allow dynamic re-planning based on intermediate results`)}).optional().describe(`Autonomous reasoning and planning configuration`),memory:h({shortTerm:h({maxMessages:p().int().min(1).default(50).describe(`Max recent messages in working memory`),maxTokens:p().int().min(100).optional().describe(`Max tokens for short-term context window`)}).optional().describe(`Short-term / working memory`),longTerm:h({enabled:f().default(!1).describe(`Enable long-term memory persistence`),store:d([`vector`,`database`,`redis`]).default(`vector`).describe(`Long-term memory storage backend`),maxEntries:p().int().min(1).optional().describe(`Max entries in long-term memory`)}).optional().describe(`Long-term / persistent memory`),reflectionInterval:p().int().min(1).optional().describe(`Reflect every N interactions to improve behavior`)}).optional().describe(`Agent memory management`),guardrails:h({maxTokensPerInvocation:p().int().min(1).optional().describe(`Token budget per single invocation`),maxExecutionTimeSec:p().int().min(1).optional().describe(`Max execution time in seconds`),blockedTopics:l(e()).optional().describe(`Forbidden topics or action names`)}).optional().describe(`Safety guardrails for the agent`),structuredOutput:ta.optional().describe(`Structured output format and validation configuration`)})),ra=_(()=>h({field:e().describe(`Context field to evaluate`),operator:d([`eq`,`neq`,`in`,`not_in`,`contains`]).describe(`Comparison operator`),value:n([e(),l(e())]).describe(`Expected value or values`)})),ia=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Skill unique identifier (snake_case)`),label:e().describe(`Skill display name`),description:e().optional().describe(`Skill description`),instructions:e().optional().describe(`LLM instructions when skill is active`),tools:l(e().regex(/^[a-z_][a-z0-9_]*$/)).describe(`Tool names belonging to this skill`),triggerPhrases:l(e()).optional().describe(`Phrases that activate this skill`),triggerConditions:l(ra).optional().describe(`Programmatic activation conditions`),permissions:l(e()).optional().describe(`Required permissions or roles`),active:f().default(!0).describe(`Whether the skill is enabled`)})),X=_(()=>h({prompt:p().int().nonnegative().describe(`Input tokens`),completion:p().int().nonnegative().describe(`Output tokens`),total:p().int().nonnegative().describe(`Total tokens`)}));_(()=>h({operationId:e(),operationType:d([`conversation`,`orchestration`,`prediction`,`rag`,`nlq`]),agentName:e().optional().describe(`Agent that performed the operation`),modelId:e(),tokens:X,cost:p().nonnegative().describe(`Cost in USD`),timestamp:e().datetime(),metadata:m(e(),t()).optional()})),_(()=>d([`token`,`request`,`character`,`second`,`image`,`embedding`]));var aa=_(()=>d([`hourly`,`daily`,`weekly`,`monthly`,`quarterly`,`yearly`,`custom`]));_(()=>h({id:e().describe(`Unique cost entry ID`),timestamp:e().datetime().describe(`ISO 8601 timestamp`),modelId:e().describe(`AI model used`),provider:e().describe(`AI provider (e.g., "openai", "anthropic")`),operation:e().describe(`Operation type (e.g., "chat_completion", "embedding")`),tokens:X.optional().describe(`Standardized token usage`),requestCount:p().int().positive().default(1),promptCost:p().nonnegative().optional().describe(`Cost of prompt tokens`),completionCost:p().nonnegative().optional().describe(`Cost of completion tokens`),totalCost:p().nonnegative().describe(`Total cost in base currency`),currency:e().default(`USD`),sessionId:e().optional().describe(`Conversation session ID`),userId:e().optional().describe(`User who triggered the request`),agentId:e().optional().describe(`AI agent ID`),object:e().optional().describe(`Related object (e.g., "case", "project")`),recordId:e().optional().describe(`Related record ID`),tags:l(e()).optional(),metadata:m(e(),t()).optional()}));var Z=_(()=>d([`global`,`user`,`agent`,`object`,`project`,`department`]));_(()=>h({type:Z,scope:e().optional().describe(`Scope identifier (userId, agentId, etc.)`),maxCost:p().nonnegative().describe(`Maximum cost limit`),currency:e().default(`USD`),period:aa,customPeriodDays:p().int().positive().optional().describe(`Custom period in days`),softLimit:p().nonnegative().optional().describe(`Soft limit for warnings`),warnThresholds:l(p().min(0).max(1)).optional().describe(`Warning thresholds (e.g., [0.5, 0.8, 0.95])`),enforced:f().default(!0).describe(`Block requests when exceeded`),gracePeriodSeconds:p().int().nonnegative().default(0).describe(`Grace period after limit exceeded`),allowRollover:f().default(!1).describe(`Allow unused budget to rollover`),maxRolloverPercentage:p().min(0).max(1).optional().describe(`Max rollover as % of limit`),name:e().optional().describe(`Budget name`),description:e().optional(),active:f().default(!0),tags:l(e()).optional()}));var oa=_(()=>h({budgetId:e(),type:Z,scope:e().optional(),periodStart:e().datetime().describe(`ISO 8601 timestamp`),periodEnd:e().datetime().describe(`ISO 8601 timestamp`),currentCost:p().nonnegative().default(0),maxCost:p().nonnegative(),currency:e().default(`USD`),percentageUsed:p().nonnegative().describe(`Usage as percentage (can exceed 1.0 if over budget)`),remainingCost:p().describe(`Remaining budget (can be negative if exceeded)`),isExceeded:f().default(!1),isWarning:f().default(!1),projectedCost:p().nonnegative().optional().describe(`Projected cost for period`),projectedOverage:p().nonnegative().optional().describe(`Projected overage`),lastUpdated:e().datetime().describe(`ISO 8601 timestamp`)})),sa=_(()=>d([`threshold_warning`,`threshold_critical`,`limit_exceeded`,`anomaly_detected`,`projection_exceeded`])),ca=_(()=>h({id:e(),timestamp:e().datetime().describe(`ISO 8601 timestamp`),type:sa,severity:d([`info`,`warning`,`critical`]),budgetId:e().optional(),budgetType:Z.optional(),scope:e().optional(),message:e().describe(`Alert message`),currentCost:p().nonnegative(),maxCost:p().nonnegative().optional(),threshold:p().min(0).max(1).optional(),currency:e().default(`USD`),recommendations:l(e()).optional(),acknowledged:f().default(!1),acknowledgedBy:e().optional(),acknowledgedAt:e().datetime().optional(),resolved:f().default(!1),metadata:m(e(),t()).optional()})),la=_(()=>d([`model`,`provider`,`user`,`agent`,`object`,`operation`,`date`,`hour`,`tag`])),Q=_(()=>h({dimension:la,value:e().describe(`Dimension value (e.g., model ID, user ID)`),totalCost:p().nonnegative(),requestCount:p().int().nonnegative(),totalTokens:p().int().nonnegative().optional(),percentageOfTotal:p().min(0).max(1),periodStart:e().datetime().optional(),periodEnd:e().datetime().optional()})),ua=_(()=>h({periodStart:e().datetime().describe(`ISO 8601 timestamp`),periodEnd:e().datetime().describe(`ISO 8601 timestamp`),totalCost:p().nonnegative(),totalRequests:p().int().nonnegative(),totalTokens:p().int().nonnegative().optional(),currency:e().default(`USD`),averageCostPerRequest:p().nonnegative(),averageCostPerToken:p().nonnegative().optional(),averageRequestsPerDay:p().nonnegative(),costTrend:d([`increasing`,`decreasing`,`stable`]).optional(),trendPercentage:p().optional().describe(`% change vs previous period`),byModel:l(Q).optional(),byProvider:l(Q).optional(),byUser:l(Q).optional(),byAgent:l(Q).optional(),byOperation:l(Q).optional(),byDate:l(Q).optional(),topModels:l(Q).optional(),topUsers:l(Q).optional(),topAgents:l(Q).optional(),tokensPerDollar:p().nonnegative().optional(),requestsPerDollar:p().nonnegative().optional()})),da=_(()=>h({id:e(),type:d([`switch_model`,`reduce_tokens`,`batch_requests`,`cache_results`,`adjust_parameters`,`limit_usage`]),title:e(),description:e(),estimatedSavings:p().nonnegative().optional(),savingsPercentage:p().min(0).max(1).optional(),priority:d([`low`,`medium`,`high`]),effort:d([`low`,`medium`,`high`]),actionable:f().default(!0),actionSteps:l(e()).optional(),targetModel:e().optional(),alternativeModel:e().optional(),affectedUsers:l(e()).optional(),status:d([`pending`,`accepted`,`rejected`,`implemented`]).default(`pending`),implementedAt:e().datetime().optional()}));_(()=>h({id:e(),name:e(),generatedAt:e().datetime().describe(`ISO 8601 timestamp`),periodStart:e().datetime().describe(`ISO 8601 timestamp`),periodEnd:e().datetime().describe(`ISO 8601 timestamp`),period:aa,analytics:ua,budgets:l(oa).optional(),alerts:l(ca).optional(),activeAlertCount:p().int().nonnegative().default(0),recommendations:l(da).optional(),previousPeriodCost:p().nonnegative().optional(),costChange:p().optional().describe(`Change vs previous period`),costChangePercentage:p().optional(),forecastedCost:p().nonnegative().optional(),forecastedBudgetStatus:d([`under`,`at`,`over`]).optional(),format:d([`summary`,`detailed`,`executive`]).default(`summary`),currency:e().default(`USD`)})),_(()=>h({startDate:e().datetime().optional().describe(`ISO 8601 timestamp`),endDate:e().datetime().optional().describe(`ISO 8601 timestamp`),modelIds:l(e()).optional(),providers:l(e()).optional(),userIds:l(e()).optional(),agentIds:l(e()).optional(),operations:l(e()).optional(),sessionIds:l(e()).optional(),minCost:p().nonnegative().optional(),maxCost:p().nonnegative().optional(),tags:l(e()).optional(),groupBy:l(la).optional(),orderBy:d([`timestamp`,`cost`,`tokens`]).optional().default(`timestamp`),orderDirection:d([`asc`,`desc`]).optional().default(`desc`),limit:p().int().positive().optional(),offset:p().int().nonnegative().optional()}));var fa=_(()=>d([`pinecone`,`weaviate`,`qdrant`,`milvus`,`chroma`,`pgvector`,`redis`,`opensearch`,`elasticsearch`,`custom`])),pa=_(()=>h({provider:d([`openai`,`cohere`,`huggingface`,`azure_openai`,`local`,`custom`]),model:e().describe(`Model name (e.g., "text-embedding-3-large")`),dimensions:p().int().positive().describe(`Embedding vector dimensions`),maxTokens:p().int().positive().optional().describe(`Maximum tokens per embedding`),batchSize:p().int().positive().optional().default(100).describe(`Batch size for embedding`),endpoint:e().url().optional().describe(`Custom endpoint URL`),apiKey:e().optional().describe(`API key`),secretRef:e().optional().describe(`Reference to stored secret`)})),ma=_(()=>u(`type`,[h({type:o(`fixed`),chunkSize:p().int().positive().describe(`Fixed chunk size in tokens/chars`),chunkOverlap:p().int().min(0).default(0).describe(`Overlap between chunks`),unit:d([`tokens`,`characters`]).default(`tokens`)}),h({type:o(`semantic`),model:e().optional().describe(`Model for semantic chunking`),minChunkSize:p().int().positive().default(100),maxChunkSize:p().int().positive().default(1e3)}),h({type:o(`recursive`),separators:l(e()).default([`
|
|
2
|
-
|
|
3
|
-
`,`
|
|
4
|
-
`,` `,``]),chunkSize:p().int().positive(),chunkOverlap:p().int().min(0).default(0)}),h({type:o(`markdown`),maxChunkSize:p().int().positive().default(1e3),respectHeaders:f().default(!0).describe(`Keep headers with content`),respectCodeBlocks:f().default(!0).describe(`Keep code blocks intact`)})])),ha=_(()=>h({source:e().describe(`Document source (file path, URL, etc.)`),sourceType:d([`file`,`url`,`api`,`database`,`custom`]).optional(),title:e().optional(),author:e().optional().describe(`Document author`),createdAt:e().datetime().optional().describe(`ISO timestamp`),updatedAt:e().datetime().optional().describe(`ISO timestamp`),tags:l(e()).optional(),category:e().optional(),language:e().optional().describe(`Document language (ISO 639-1 code)`),custom:m(e(),t()).optional().describe(`Custom metadata fields`)}));_(()=>h({id:e().describe(`Unique chunk identifier`),content:e().describe(`Chunk text content`),embedding:l(p()).optional().describe(`Embedding vector`),metadata:ha,chunkIndex:p().int().min(0).describe(`Chunk position in document`),tokens:p().int().optional().describe(`Token count`)}));var ga=_(()=>u(`type`,[h({type:o(`similarity`),topK:p().int().positive().default(5).describe(`Number of results to retrieve`),scoreThreshold:p().min(0).max(1).optional().describe(`Minimum similarity score`)}),h({type:o(`mmr`),topK:p().int().positive().default(5),fetchK:p().int().positive().default(20).describe(`Initial fetch size`),lambda:p().min(0).max(1).default(.5).describe(`Diversity vs relevance (0=diverse, 1=relevant)`)}),h({type:o(`hybrid`),topK:p().int().positive().default(5),vectorWeight:p().min(0).max(1).default(.7).describe(`Weight for vector search`),keywordWeight:p().min(0).max(1).default(.3).describe(`Weight for keyword search`)}),h({type:o(`parent_document`),topK:p().int().positive().default(5),retrieveParent:f().default(!0).describe(`Retrieve full parent document`)})])),_a=_(()=>h({enabled:f().default(!1),model:e().optional().describe(`Reranking model name`),provider:d([`cohere`,`huggingface`,`custom`]).optional(),topK:p().int().positive().default(3).describe(`Final number of results after reranking`)})),va=_(()=>h({provider:fa,indexName:e().describe(`Index/collection name`),namespace:e().optional().describe(`Namespace for multi-tenancy`),host:e().optional().describe(`Vector store host`),port:p().int().optional().describe(`Vector store port`),secretRef:e().optional().describe(`Reference to stored secret`),apiKey:e().optional().describe(`API key or reference to secret`),dimensions:p().int().positive().describe(`Vector dimensions`),metric:d([`cosine`,`euclidean`,`dotproduct`]).optional().default(`cosine`),batchSize:p().int().positive().optional().default(100),connectionPoolSize:p().int().positive().optional().default(10),timeout:p().int().positive().optional().default(3e4).describe(`Timeout in milliseconds`)})),ya=_(()=>h({type:d([`file`,`directory`,`url`,`api`,`database`,`custom`]),source:e().describe(`Source path, URL, or identifier`),fileTypes:l(e()).optional().describe(`Accepted file extensions (e.g., [".pdf", ".md"])`),recursive:f().optional().default(!1).describe(`Process directories recursively`),maxFileSize:p().int().optional().describe(`Maximum file size in bytes`),excludePatterns:l(e()).optional().describe(`Patterns to exclude`),extractImages:f().optional().default(!1).describe(`Extract text from images (OCR)`),extractTables:f().optional().default(!1).describe(`Extract and format tables`),loaderConfig:m(e(),t()).optional().describe(`Custom loader-specific config`)})),ba=_(()=>h({field:e().describe(`Metadata field to filter`),operator:d([`eq`,`neq`,`gt`,`gte`,`lt`,`lte`,`in`,`nin`,`contains`]).default(`eq`),value:n([e(),p(),f(),l(n([e(),p()]))]).describe(`Filter value`)})),xa=_(()=>h({logic:d([`and`,`or`]).default(`and`),filters:l(n([ba,s(()=>xa)]))})),Sa=_(()=>n([ba,xa,m(e(),n([e(),p(),f(),l(n([e(),p()]))]))])),Ca=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Pipeline name (snake_case)`),label:e().describe(`Display name`),description:e().optional(),embedding:pa,vectorStore:va,chunking:ma,retrieval:ga,reranking:_a.optional(),loaders:l(ya).optional().describe(`Document loaders`),maxContextTokens:p().int().positive().default(4e3).describe(`Maximum tokens in context`),contextWindow:p().int().positive().optional().describe(`LLM context window size`),metadataFilters:Sa.optional().describe(`Global filters for retrieval`),enableCache:f().default(!0),cacheTTL:p().int().positive().default(3600).describe(`Cache TTL in seconds`),cacheInvalidationStrategy:d([`time_based`,`manual`,`on_update`]).default(`time_based`).optional()}));_(()=>h({query:e().describe(`User query`),pipelineName:e().describe(`Pipeline to use`),topK:p().int().positive().optional(),metadataFilters:m(e(),t()).optional(),conversationHistory:l(h({role:d([`user`,`assistant`,`system`]),content:e()})).optional(),includeMetadata:f().default(!0),includeSources:f().default(!0)})),_(()=>h({query:e(),results:l(h({content:e(),score:p(),metadata:ha.optional(),chunkId:e().optional()})),context:e().describe(`Assembled context for LLM`),tokens:X.optional().describe(`Token usage for this query`),cost:p().nonnegative().optional().describe(`Cost for this query in USD`),retrievalTime:p().optional().describe(`Retrieval time in milliseconds`)})),_(()=>h({name:e(),status:d([`active`,`indexing`,`error`,`disabled`]),documentsIndexed:p().int().min(0),lastIndexed:e().datetime().optional().describe(`ISO timestamp`),errorMessage:e().optional(),health:h({vectorStore:d([`healthy`,`unhealthy`,`unknown`]),embeddingService:d([`healthy`,`unhealthy`,`unknown`])}).optional()}));var wa=d([`beforeFind`,`afterFind`,`beforeFindOne`,`afterFindOne`,`beforeCount`,`afterCount`,`beforeAggregate`,`afterAggregate`,`beforeInsert`,`afterInsert`,`beforeUpdate`,`afterUpdate`,`beforeDelete`,`afterDelete`,`beforeUpdateMany`,`afterUpdateMany`,`beforeDeleteMany`,`afterDeleteMany`]),Ta=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Hook unique name (snake_case)`),label:e().optional().describe(`Description of what this hook does`),object:n([e(),l(e())]).describe(`Target object(s)`),events:l(wa).describe(`Lifecycle events`),handler:n([e(),i(e=>typeof e==`function`,{message:`Expected function`})]).optional().describe("Handler function name (string, post-build) or inline function (pre-build) — DEPRECATED, prefer `body`"),body:Zt.optional().describe(`Hook body — expression (L1) or sandboxed JS (L2)`),priority:p().default(100).describe(`Execution priority`),async:f().default(!1).describe(`Run specifically as fire-and-forget`),condition:j.optional().describe('Predicate (CEL); hook runs only when TRUE. e.g. P`record.status == "closed" && record.amount > 1000`'),description:e().optional().describe(`Human-readable description of what this hook does`),retryPolicy:h({maxRetries:p().default(3).describe(`Maximum retry attempts on failure`),backoffMs:p().default(1e3).describe(`Backoff delay between retries in milliseconds`)}).optional().describe(`Retry policy for failed hook executions`),timeout:p().optional().describe(`Maximum execution time in milliseconds before the hook is aborted`),onError:d([`abort`,`log`]).default(`abort`).describe(`Error handling strategy`)}));_(()=>h({id:e().optional().describe(`Unique execution ID for tracing`),object:e(),event:wa,input:m(e(),t()).describe(`Mutable input parameters`),result:t().optional().describe(`Operation result (After hooks only)`),previous:m(e(),t()).optional().describe(`Record state before operation`),session:h({userId:e().optional(),tenantId:e().optional(),roles:l(e()).optional(),accessToken:e().optional()}).optional().describe(`Current session context`),transaction:t().optional().describe(`Database transaction handle`),ql:t().describe(`ObjectQL Engine Reference`),api:t().optional().describe(`Cross-object data access (ScopedContext)`),user:h({id:e().optional(),name:e().optional(),email:e().optional()}).optional().describe(`Current user info shortcut`)}));var Ea=_(()=>h({field:e(),order:d([`asc`,`desc`]).default(`asc`)})),Da=d([`count`,`sum`,`avg`,`min`,`max`,`count_distinct`,`array_agg`,`string_agg`]),Oa=_(()=>h({function:Da.describe(`Aggregation function`),field:e().optional().describe(`Field to aggregate (optional for COUNT(*))`),alias:e().describe(`Result column alias`),distinct:f().optional().describe(`Apply DISTINCT before aggregation`),filter:G.optional().describe(`Filter/Condition to apply to the aggregation (FILTER WHERE clause)`)})),ka=d([`inner`,`left`,`right`,`full`]),Aa=d([`auto`,`database`,`hash`,`loop`]),ja=s(()=>h({type:ka.describe(`Join type`),strategy:Aa.optional().describe(`Execution strategy hint`),object:e().describe(`Object/table to join`),alias:e().optional().describe(`Table alias`),on:G.describe(`Join condition`),subquery:s(()=>$).optional().describe(`Subquery instead of object`)})),Ma=d([`row_number`,`rank`,`dense_rank`,`percent_rank`,`lag`,`lead`,`first_value`,`last_value`,`sum`,`avg`,`count`,`min`,`max`]),Na=_(()=>h({partitionBy:l(e()).optional().describe(`PARTITION BY fields`),orderBy:l(Ea).optional().describe(`ORDER BY specification`),frame:h({type:d([`rows`,`range`]).optional(),start:e().optional().describe(`Frame start (e.g., "UNBOUNDED PRECEDING", "1 PRECEDING")`),end:e().optional().describe(`Frame end (e.g., "CURRENT ROW", "1 FOLLOWING")`)}).optional().describe(`Window frame specification`)})),Pa=_(()=>h({function:Ma.describe(`Window function name`),field:e().optional().describe(`Field to operate on (for aggregate window functions)`),alias:e().describe(`Result column alias`),over:Na.describe(`Window specification (OVER clause)`)})),Fa=s(()=>n([e(),h({field:e(),fields:l(Fa).optional(),alias:e().optional()})])),Ia=_(()=>h({query:e().describe(`Search query text`),fields:l(e()).optional().describe(`Fields to search in (if not specified, searches all text fields)`),fuzzy:f().optional().default(!1).describe(`Enable fuzzy matching (tolerates typos)`),operator:d([`and`,`or`]).optional().default(`or`).describe(`Logical operator between terms`),boost:m(e(),p()).optional().describe(`Field-specific relevance boosting (field name -> boost factor)`),minScore:p().optional().describe(`Minimum relevance score threshold`),language:e().optional().describe(`Language for text analysis (e.g., "en", "zh", "es")`),highlight:f().optional().default(!1).describe(`Enable search result highlighting`)})),La=h({object:e().describe(`Object name (e.g. account)`),fields:l(Fa).optional().describe(`Fields to retrieve`),where:G.optional().describe(`Filtering criteria (WHERE)`),search:Ia.optional().describe(`Full-text search configuration ($search parameter)`),orderBy:l(Ea).optional().describe(`Sorting instructions (ORDER BY)`),limit:p().optional().describe(`Max records to return (LIMIT)`),offset:p().optional().describe(`Records to skip (OFFSET)`),top:p().optional().describe(`Alias for limit (OData compatibility)`),cursor:m(e(),t()).optional().describe(`Cursor for keyset pagination`),joins:l(ja).optional().describe(`Explicit Table Joins`),aggregations:l(Oa).optional().describe(`Aggregation functions`),groupBy:l(e()).optional().describe(`GROUP BY fields`),having:G.optional().describe(`HAVING clause for aggregation filtering`),windowFunctions:l(Pa).optional().describe(`Window functions with OVER clause`),distinct:f().optional().describe(`SELECT DISTINCT flag`)}),$=_(()=>La.extend({expand:s(()=>m(e(),$)).optional().describe(`Recursive relation loading map. Keys are lookup/master_detail field names; values are nested QueryAST objects that control select, filter, sort, and further expansion on the related object. The engine resolves expand via batch $in queries (driver-agnostic) with a default max depth of 3.`)})),Ra=d([`none`,`constant`,`lookup`,`split`,`join`,`javascript`,`map`]),za=_(()=>h({source:n([e(),l(e())]).describe(`Source column header(s)`),target:n([e(),l(e())]).describe(`Target object field(s)`),transform:Ra.default(`none`),params:h({value:t().optional(),object:e().optional(),fromField:e().optional(),toField:e().optional(),autoCreate:f().optional(),valueMap:m(e(),t()).optional(),separator:e().optional()}).optional()})),Ba=_(()=>h({name:k.describe(`Mapping unique name (lowercase snake_case)`),label:e().optional(),sourceFormat:d([`csv`,`json`,`xml`,`sql`]).default(`csv`),targetObject:e().describe(`Target Object Name`),fieldMapping:l(za),mode:d([`insert`,`update`,`upsert`]).default(`insert`),upsertKey:l(e()).optional().describe(`Fields to match for upsert (e.g. email)`),extractQuery:$.optional().describe(`Query to run for export only`),errorPolicy:d([`skip`,`abort`,`retry`]).default(`skip`),batchSize:p().default(1e3)})),Va=d([`count`,`sum`,`avg`,`min`,`max`,`count_distinct`,`number`,`string`,`boolean`]),Ha=d([`string`,`number`,`boolean`,`time`,`geo`]),Ua=d([`second`,`minute`,`hour`,`day`,`week`,`month`,`quarter`,`year`]),Wa=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique metric ID`),label:e().describe(`Human readable label`),description:e().optional(),type:Va,sql:e().describe(`SQL expression or field reference`),filters:l(h({sql:e()})).optional(),format:e().optional()})),Ga=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique dimension ID`),label:e().describe(`Human readable label`),description:e().optional(),type:Ha,sql:e().describe(`SQL expression or column reference`),granularities:l(Ua).optional()})),Ka=_(()=>h({name:e().describe(`Target cube name`),relationship:d([`one_to_one`,`one_to_many`,`many_to_one`]).default(`many_to_one`),sql:e().describe(`Join condition (ON clause)`)})),qa=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Cube name (snake_case)`),title:e().optional(),description:e().optional(),sql:e().describe(`Base SQL statement or Table Name`),measures:m(e(),Wa).describe(`Quantitative metrics`),dimensions:m(e(),Ga).describe(`Qualitative attributes`),joins:m(e(),Ka).optional(),refreshKey:h({every:e().optional(),sql:e().optional()}).optional(),public:f().default(!1)}));_(()=>h({cube:e().optional().describe(`Target cube name (optional when provided externally, e.g. in API request wrapper)`),measures:l(e()).describe(`List of metrics to calculate`),dimensions:l(e()).optional().describe(`List of dimensions to group by`),filters:l(h({member:e().describe(`Dimension or Measure`),operator:d([`equals`,`notEquals`,`contains`,`notContains`,`gt`,`gte`,`lt`,`lte`,`in`,`notIn`,`set`,`notSet`,`inDateRange`]),values:l(e()).optional()})).optional(),timeDimensions:l(h({dimension:e(),granularity:Ua.optional(),dateRange:n([e(),l(e())]).optional()})).optional(),order:m(e(),d([`asc`,`desc`])).optional(),limit:p().optional(),offset:p().optional(),timezone:e().optional().default(`UTC`)}));var Ja=d([`create`,`update`,`delete`,`undelete`,`api`]),Ya=_(()=>h({name:k.describe(`Webhook unique name (lowercase snake_case)`),label:e().optional().describe(`Human-readable webhook label`),object:e().optional().describe(`Object to listen to (optional for manual webhooks)`),triggers:l(Ja).optional().describe(`Events that trigger execution`),url:e().url().describe(`External webhook endpoint URL`),method:d([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`]).default(`POST`).describe(`HTTP method`),headers:m(e(),e()).optional().describe(`Custom HTTP headers`),body:t().optional().describe(`Request body payload (if not using default record data)`),payloadFields:l(e()).optional().describe(`Fields to include. Empty = All`),includeSession:f().default(!1).describe(`Include user session info`),authentication:h({type:d([`none`,`bearer`,`basic`,`api-key`]).describe(`Authentication type`),credentials:m(e(),e()).optional().describe(`Authentication credentials`)}).optional().describe(`Authentication configuration`),retryPolicy:h({maxRetries:p().int().min(0).max(10).default(3).describe(`Maximum retry attempts`),backoffStrategy:d([`exponential`,`linear`,`fixed`]).default(`exponential`).describe(`Backoff strategy`),initialDelayMs:p().int().min(100).default(1e3).describe(`Initial retry delay in milliseconds`),maxDelayMs:p().int().min(1e3).default(6e4).describe(`Maximum retry delay in milliseconds`)}).optional().describe(`Retry policy configuration`),timeoutMs:p().int().min(1e3).max(3e5).default(3e4).describe(`Request timeout in milliseconds`),secret:e().optional().describe(`Signing secret for HMAC signature verification`),isActive:f().default(!0).describe(`Whether webhook is active`),description:e().optional().describe(`Webhook description`),tags:l(e()).optional().describe(`Tags for organization`)}));_(()=>h({name:k.describe(`Webhook receiver unique name (lowercase snake_case)`),path:e().describe(`URL Path (e.g. /webhooks/stripe)`),verificationType:d([`none`,`header_token`,`hmac`,`ip_whitelist`]).default(`none`),verificationParams:h({header:e().optional(),secret:e().optional(),ips:l(e()).optional()}).optional(),action:d([`trigger_flow`,`script`,`upsert_record`]).default(`trigger_flow`),target:e().describe(`Flow ID or Script name`)}));var Xa=_(()=>h({type:o(`oauth2`),authorizationUrl:e().url().describe(`OAuth2 authorization endpoint`),tokenUrl:e().url().describe(`OAuth2 token endpoint`),clientId:e().describe(`OAuth2 client ID`),clientSecret:e().describe(`OAuth2 client secret (typically from ENV)`),scopes:l(e()).optional().describe(`Requested OAuth2 scopes`),redirectUri:e().url().optional().describe(`OAuth2 redirect URI`),refreshToken:e().optional().describe(`Refresh token for token renewal`),tokenExpiry:p().optional().describe(`Token expiry timestamp`)})),Za=_(()=>h({type:o(`api-key`),key:e().describe(`API key value`),headerName:e().default(`X-API-Key`).describe(`HTTP header name for API key`),paramName:e().optional().describe(`Query parameter name (alternative to header)`)})),Qa=_(()=>h({type:o(`basic`),username:e().describe(`Username`),password:e().describe(`Password`)})),$a=_(()=>h({type:o(`bearer`),token:e().describe(`Bearer token`)})),eo=_(()=>h({type:o(`none`)})),to=_(()=>u(`type`,[Xa,Za,Qa,$a,eo])),no=_(()=>u(`type`,[h({type:o(`constant`),value:t().describe(`Constant value to use`)}).describe(`Set a constant value`),h({type:o(`cast`),targetType:d([`string`,`number`,`boolean`,`date`]).describe(`Target data type`)}).describe(`Cast to a specific data type`),h({type:o(`lookup`),table:e().describe(`Lookup table name`),keyField:e().describe(`Field to match on`),valueField:e().describe(`Field to retrieve`)}).describe(`Lookup value from another table`),h({type:o(`javascript`),expression:j.describe(`JS expression (dialect="js" recommended). e.g. value.toUpperCase()`)}).describe(`Custom JavaScript transformation`),h({type:o(`map`),mappings:m(e(),t()).describe(`Value mappings (e.g., {"Active": "active"})`)}).describe(`Map values using a dictionary`)])),ro=_(()=>h({source:e().describe(`Source field name`),target:e().describe(`Target field name`),transform:no.optional().describe(`Transformation to apply`),defaultValue:t().optional().describe(`Default if source is null/undefined`)})),io=_(()=>ro.extend({dataType:d([`string`,`number`,`boolean`,`date`,`datetime`,`json`,`array`]).optional().describe(`Target data type`),required:f().default(!1).describe(`Field is required`),syncMode:d([`read_only`,`write_only`,`bidirectional`]).default(`bidirectional`).describe(`Sync mode`)})),ao=_(()=>d([`full`,`incremental`,`upsert`,`append_only`]).describe(`Synchronization strategy`)),oo=_(()=>d([`source_wins`,`target_wins`,`latest_wins`,`manual`]).describe(`Conflict resolution strategy`)),so=_(()=>h({strategy:ao.optional().default(`incremental`),direction:d([`import`,`export`,`bidirectional`]).optional().default(`import`).describe(`Sync direction`),schedule:bt.optional().describe("Cron expression for scheduled sync — cron`0 */15 * * *`"),realtimeSync:f().optional().default(!1).describe(`Enable real-time sync`),timestampField:e().optional().describe(`Field to track last modification time`),conflictResolution:oo.optional().default(`latest_wins`),batchSize:p().min(1).max(1e4).optional().default(1e3).describe(`Records per batch`),deleteMode:d([`hard_delete`,`soft_delete`,`ignore`]).optional().default(`soft_delete`).describe(`Delete handling mode`),filters:m(e(),t()).optional().describe(`Filter criteria for selective sync`)})),co=_(()=>d([`record.created`,`record.updated`,`record.deleted`,`sync.started`,`sync.completed`,`sync.failed`,`auth.expired`,`rate_limit.exceeded`]).describe(`Webhook event type`)),lo=_(()=>d([`hmac_sha256`,`hmac_sha512`,`none`]).describe(`Webhook signature algorithm`)),uo=_(()=>Ya.extend({events:l(co).optional().describe(`Connector events to subscribe to`),signatureAlgorithm:lo.optional().default(`hmac_sha256`)})),fo=_(()=>d([`fixed_window`,`sliding_window`,`token_bucket`,`leaky_bucket`]).describe(`Rate limiting strategy`)),po=_(()=>h({strategy:fo.optional().default(`token_bucket`),maxRequests:p().min(1).describe(`Maximum requests per window`),windowSeconds:p().min(1).describe(`Time window in seconds`),burstCapacity:p().min(1).optional().describe(`Burst capacity`),respectUpstreamLimits:f().optional().default(!0).describe(`Respect external rate limit headers`),rateLimitHeaders:h({remaining:e().optional().default(`X-RateLimit-Remaining`).describe(`Header for remaining requests`),limit:e().optional().default(`X-RateLimit-Limit`).describe(`Header for rate limit`),reset:e().optional().default(`X-RateLimit-Reset`).describe(`Header for reset time`)}).optional().describe(`Custom rate limit headers`)})),mo=_(()=>d([`exponential_backoff`,`linear_backoff`,`fixed_delay`,`no_retry`]).describe(`Retry strategy`)),ho=_(()=>h({strategy:mo.optional().default(`exponential_backoff`),maxAttempts:p().min(0).max(10).optional().default(3).describe(`Maximum retry attempts`),initialDelayMs:p().min(100).optional().default(1e3).describe(`Initial retry delay in ms`),maxDelayMs:p().min(1e3).optional().default(6e4).describe(`Maximum retry delay in ms`),backoffMultiplier:p().min(1).optional().default(2).describe(`Exponential backoff multiplier`),retryableStatusCodes:l(p()).optional().default([408,429,500,502,503,504]).describe(`HTTP status codes to retry`),retryOnNetworkError:f().optional().default(!0).describe(`Retry on network errors`),jitter:f().optional().default(!0).describe(`Add jitter to retry delays`)})),go=_(()=>d([`validation`,`authorization`,`not_found`,`conflict`,`rate_limit`,`timeout`,`server_error`,`integration_error`]).describe(`Standard error category`)),_o=_(()=>h({sourceCode:n([e(),p()]).describe(`External system error code`),sourceMessage:e().optional().describe(`Pattern to match against error message`),targetCode:e().describe(`ObjectStack standard error code`),targetCategory:go.describe(`Error category`),severity:d([`low`,`medium`,`high`,`critical`]).describe(`Error severity level`),retryable:f().describe(`Whether the error is retryable`),userMessage:e().optional().describe(`Human-readable message to show users`)}).describe(`Error mapping rule`)),vo=_(()=>h({rules:l(_o).describe(`Error mapping rules`),defaultCategory:go.optional().default(`integration_error`).describe(`Default category for unmapped errors`),unmappedBehavior:d([`passthrough`,`generic_error`,`throw`]).describe(`What to do with unmapped errors`),logUnmapped:f().optional().default(!0).describe(`Log unmapped errors`)}).describe(`Error mapping configuration`)),yo=_(()=>h({enabled:f().describe(`Enable health checks`),intervalMs:p().optional().default(6e4).describe(`Health check interval in milliseconds`),timeoutMs:p().optional().default(5e3).describe(`Health check timeout in milliseconds`),endpoint:e().optional().describe(`Health check endpoint path`),method:d([`GET`,`HEAD`,`OPTIONS`]).optional().describe(`HTTP method for health check`),expectedStatus:p().optional().default(200).describe(`Expected HTTP status code`),unhealthyThreshold:p().optional().default(3).describe(`Consecutive failures before marking unhealthy`),healthyThreshold:p().optional().default(1).describe(`Consecutive successes before marking healthy`)}).describe(`Health check configuration`)),bo=_(()=>h({enabled:f().describe(`Enable circuit breaker`),failureThreshold:p().optional().default(5).describe(`Failures before opening circuit`),resetTimeoutMs:p().optional().default(3e4).describe(`Time in open state before half-open`),halfOpenMaxRequests:p().optional().default(1).describe(`Requests allowed in half-open state`),monitoringWindow:p().optional().default(6e4).describe(`Rolling window for failure count in ms`),fallbackStrategy:d([`cache`,`default_value`,`error`,`queue`]).optional().describe(`Fallback strategy when circuit is open`)}).describe(`Circuit breaker configuration`)),xo=_(()=>h({healthCheck:yo.optional().describe(`Health check configuration`),circuitBreaker:bo.optional().describe(`Circuit breaker configuration`)}).describe(`Connector health configuration`)),So=_(()=>d([`saas`,`database`,`file_storage`,`message_queue`,`api`,`custom`]).describe(`Connector type`)),Co=_(()=>d([`active`,`inactive`,`error`,`configuring`]).describe(`Connector status`)),wo=_(()=>h({key:e().describe(`Action key (machine name)`),label:e().describe(`Human readable label`),description:e().optional(),inputSchema:m(e(),t()).optional().describe(`Input parameters schema (JSON Schema)`),outputSchema:m(e(),t()).optional().describe(`Output schema (JSON Schema)`)})),To=_(()=>h({key:e().describe(`Trigger key`),label:e().describe(`Trigger label`),description:e().optional(),type:d([`polling`,`webhook`]).describe(`Trigger type`),interval:p().optional().describe(`Polling interval in seconds`)})),Eo=_(()=>h({name:e().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique connector identifier`),label:e().describe(`Display label`),type:So.describe(`Connector type`),description:e().optional().describe(`Connector description`),icon:e().optional().describe(`Icon identifier`),authentication:to.describe(`Authentication configuration`),actions:l(wo).optional(),triggers:l(To).optional(),syncConfig:so.optional().describe(`Data sync configuration`),fieldMappings:l(io).optional().describe(`Field mapping rules`),webhooks:l(uo).optional().describe(`Webhook configurations`),rateLimitConfig:po.optional().describe(`Rate limiting configuration`),retryConfig:ho.optional().describe(`Retry configuration`),connectionTimeoutMs:p().min(1e3).max(3e5).optional().default(3e4).describe(`Connection timeout in ms`),requestTimeoutMs:p().min(1e3).max(3e5).optional().default(3e4).describe(`Request timeout in ms`),status:Co.optional().default(`inactive`).describe(`Connector status`),enabled:f().optional().default(!0).describe(`Enable connector`),errorMapping:vo.optional().describe(`Error mapping configuration`),health:xo.optional().describe(`Health and resilience configuration`),metadata:m(e(),t()).optional().describe(`Custom connector metadata`)})),Do=_(()=>h({namespace:e().optional().describe(`Match objects by namespace`),package:e().optional().describe(`Match objects by package ID`),objectPattern:e().optional().describe(`Match objects by name pattern (glob-style)`),default:f().optional().describe(`Default fallback rule`),datasource:e().describe(`Target datasource name`),priority:p().optional().describe(`Rule priority (lower = higher priority)`)}).describe(`Datasource routing rule`)),Oo=_(()=>h({manifest:nt.optional().describe(`Project Package Configuration`),datasources:l(it).optional().describe(`External Data Connections`),datasourceMapping:l(Do).optional().describe(`Centralized datasource routing rules for packages/namespaces/objects`),translations:l(ct).optional().describe(`I18n Translation Bundles`),i18n:dt.optional().describe(`Internationalization configuration`),objects:l(hn).optional().describe(`Business Objects definition (owned by this package)`),objectExtensions:l(gn).optional().describe(`Extensions to objects owned by other packages`),apps:l(On).optional().describe(`Applications`),views:l(cr).optional().describe(`List Views`),pages:l(xr).optional().describe(`Custom Pages`),dashboards:l(Fr).optional().describe(`Dashboards`),reports:l(Br).optional().describe(`Analytics Reports`),actions:l(tn).optional().describe(`Global and Object Actions`),themes:l(ci).optional().describe(`UI Themes`),workflows:l(Ci).optional().describe(`Event-driven workflows`),approvals:l(fi).optional().describe(`Approval processes`),flows:l(Oi).optional().describe(`Screen Flows`),roles:l(ki).optional().describe(`User Roles hierarchy`),permissions:l(Fi).optional().describe(`Permission Sets and Profiles`),sharingRules:l(Vi).optional().describe(`Record Sharing Rules`),policies:l(Ki).optional().describe(`Security & Compliance Policies`),apis:l(Y).optional().describe(`API Endpoints`),webhooks:l(Ya).optional().describe(`Outbound Webhooks`),agents:l(na).optional().describe(`AI Agents and Assistants`),skills:l(ia).optional().describe(`AI Skills (reusable capability bundles referenced by Agents)`),ragPipelines:l(Ca).optional().describe(`RAG Pipelines`),hooks:l(Ta).optional().describe(`Object Lifecycle Hooks`),functions:n([m(e(),c()),l(h({name:e(),handler:c(),packageId:e().optional()}))]).optional().describe(`Named handler functions referenced by hooks/actions`),mappings:l(Ba).optional().describe(`Data Import/Export Mappings`),analyticsCubes:l(qa).optional().describe(`Analytics Semantic Layer Cubes`),connectors:l(Eo).optional().describe(`External System Connectors`),data:l(tt).optional().describe(`Seed Data / Fixtures for bootstrapping`),plugins:l(t()).optional().describe(`Plugins to load`),requires:l(e()).optional().describe(`Capability names this stack requires from the platform`),devPlugins:l(n([nt,e()])).optional().describe(`Plugins to load only in development (CLI dev command)`),runtimeModule:e().optional().describe("Path (relative to the artifact JSON) of the compiled runtime ESM bundle. Set by `objectstack build`; do not author by hand.")}));_(()=>Oo);var ko=_(()=>d([`error`,`override`,`merge`]));_(()=>h({objectConflict:ko.default(`error`),manifest:n([d([`first`,`last`]),p().int().min(0)]).default(`last`),namespace:e().optional()}));var Ao=_(()=>h({queryFilters:f().default(!0).describe(`Supports WHERE clause filtering`),queryAggregations:f().default(!0).describe(`Supports GROUP BY and aggregation functions`),querySorting:f().default(!0).describe(`Supports ORDER BY sorting`),queryPagination:f().default(!0).describe(`Supports LIMIT/OFFSET pagination`),queryWindowFunctions:f().default(!1).describe(`Supports window functions with OVER clause`),querySubqueries:f().default(!1).describe(`Supports subqueries`),queryDistinct:f().default(!0).describe(`Supports SELECT DISTINCT`),queryHaving:f().default(!1).describe(`Supports HAVING clause for aggregations`),queryJoins:f().default(!1).describe(`Supports SQL-style joins`),fullTextSearch:f().default(!1).describe(`Supports full-text search`),vectorSearch:f().default(!1).describe(`Supports vector embeddings and similarity search for AI/RAG`),geoSpatial:f().default(!1).describe(`Supports geospatial queries and location fields`),jsonFields:f().default(!0).describe(`Supports JSON field types`),arrayFields:f().default(!1).describe(`Supports array field types`),validationRules:f().default(!0).describe(`Supports validation rules`),workflows:f().default(!0).describe(`Supports workflow automation`),triggers:f().default(!0).describe(`Supports database triggers`),formulas:f().default(!0).describe(`Supports formula fields`),transactions:f().default(!0).describe(`Supports database transactions`),bulkOperations:f().default(!0).describe(`Supports bulk create/update/delete`),supportedDrivers:l(e()).optional().describe(`Available database drivers (e.g., postgresql, mongodb, excel)`)})),jo=_(()=>h({listView:f().default(!0).describe(`Supports list/grid views`),formView:f().default(!0).describe(`Supports form views`),kanbanView:f().default(!1).describe(`Supports kanban board views`),calendarView:f().default(!1).describe(`Supports calendar views`),ganttView:f().default(!1).describe(`Supports Gantt chart views`),dashboards:f().default(!0).describe(`Supports dashboard creation`),reports:f().default(!0).describe(`Supports report generation`),charts:f().default(!0).describe(`Supports chart widgets`),customPages:f().default(!0).describe(`Supports custom page creation`),customThemes:f().default(!1).describe(`Supports custom theme creation`),customComponents:f().default(!1).describe(`Supports custom UI components/widgets`),customActions:f().default(!0).describe(`Supports custom button actions`),screenFlows:f().default(!1).describe(`Supports interactive screen flows`),mobileOptimized:f().default(!1).describe(`UI optimized for mobile devices`),accessibility:f().default(!1).describe(`WCAG accessibility support`)})),Mo=_(()=>h({version:e().describe(`ObjectOS Kernel Version`),environment:d([`development`,`test`,`staging`,`production`]),restApi:f().default(!0).describe(`REST API available`),graphqlApi:f().default(!1).describe(`GraphQL API available`),odataApi:f().default(!1).describe(`OData API available`),websockets:f().default(!1).describe(`WebSocket support for real-time updates`),serverSentEvents:f().default(!1).describe(`Server-Sent Events support`),eventBus:f().default(!1).describe(`Internal event bus for pub/sub`),webhooks:f().default(!0).describe(`Outbound webhook support`),apiContracts:f().default(!1).describe(`API contract definitions`),authentication:f().default(!0).describe(`Authentication system`),rbac:f().default(!0).describe(`Role-Based Access Control`),fieldLevelSecurity:f().default(!1).describe(`Field-level permissions`),rowLevelSecurity:f().default(!1).describe(`Row-level security/sharing rules`),multiTenant:f().default(!1).describe(`Multi-tenant architecture support`),backgroundJobs:f().default(!1).describe(`Background job scheduling`),auditLogging:f().default(!1).describe(`Audit trail logging`),fileStorage:f().default(!0).describe(`File upload and storage`),i18n:f().default(!0).describe(`Internationalization support`),pluginSystem:f().default(!1).describe(`Plugin/extension system`),features:l(Yi).optional().describe(`Active Feature Flags`),apis:l(Y).optional().describe(`Available System & Business APIs`),network:h({graphql:f().default(!1),search:f().default(!1),websockets:f().default(!1),files:f().default(!0),analytics:f().default(!1).describe(`Is the Analytics/BI engine enabled?`),ai:f().default(!1).describe(`Is the AI engine enabled?`),workflow:f().default(!1).describe(`Is the Workflow engine enabled?`),notifications:f().default(!1).describe(`Is the Notification service enabled?`),i18n:f().default(!1).describe(`Is the i18n service enabled?`)}).optional().describe(`Network Capabilities (GraphQL, WS, etc.)`),systemObjects:l(e()).optional().describe(`List of globally available System Objects`),limits:h({maxObjects:p().optional(),maxFieldsPerObject:p().optional(),maxRecordsPerQuery:p().optional(),apiRateLimit:p().optional(),fileUploadSizeLimit:p().optional().describe(`Max file size in bytes`)}).optional()}));_(()=>h({data:Ao.describe(`Data Layer capabilities`),ui:jo.describe(`UI Layer capabilities`),system:Mo.describe(`System/Runtime Layer capabilities`)}));var No=e().regex(/^[a-f0-9]{64}$/,`Must be a 64-character lowercase hex SHA-256 digest`).describe(`SHA-256 digest (64 hex chars)`),Po=_(()=>h({schemaVersion:o(`0.1`).default(`0.1`),projectId:e(),commitId:e(),checksum:No,builtAt:e().datetime().optional(),builtWith:e().optional(),metadata:Oo}));export{Po as ProjectArtifactSchema};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},t;(function(e){})(t||={});export{e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){return function(...t){let n=e(...t);if(n&&typeof n==`object`&&n instanceof Promise)throw Error(`Function unexpectedly returned a Promise`);return n}}var t={JS_EVAL_TYPE_GLOBAL:0,JS_EVAL_TYPE_MODULE:1,JS_EVAL_TYPE_DIRECT:2,JS_EVAL_TYPE_INDIRECT:3,JS_EVAL_TYPE_MASK:3,JS_EVAL_FLAG_STRICT:8,JS_EVAL_FLAG_STRIP:16,JS_EVAL_FLAG_COMPILE_ONLY:32,JS_EVAL_FLAG_BACKTRACE_BARRIER:64},n={BaseObjects:1,Date:2,Eval:4,StringNormalize:8,RegExp:16,RegExpCompiler:32,JSON:64,Proxy:128,MapSet:256,TypedArrays:512,Promise:1024,BigInt:2048,BigFloat:4096,BigDecimal:8192,OperatorOverloading:16384,BignumExt:32768},r={Pending:0,Fulfilled:1,Rejected:2},i={JS_GPN_STRING_MASK:1,JS_GPN_SYMBOL_MASK:2,JS_GPN_PRIVATE_MASK:4,JS_GPN_ENUM_ONLY:16,JS_GPN_SET_ENUM:32,QTS_GPN_NUMBER_MASK:64,QTS_STANDARD_COMPLIANT_NUMBER:128},a={IsStrictlyEqual:0,IsSameValue:1,IsSameValueZero:2};export{r as a,a as i,i as n,e as o,n as r,t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./dist-BF0OK3kd.js";var t=class{constructor(t){this.module=t,this.DEBUG=!1,this.QTS_Throw=this.module.cwrap(`QTS_Throw`,`number`,[`number`,`number`]),this.QTS_NewError=this.module.cwrap(`QTS_NewError`,`number`,[`number`]),this.QTS_RuntimeSetMemoryLimit=this.module.cwrap(`QTS_RuntimeSetMemoryLimit`,null,[`number`,`number`]),this.QTS_RuntimeComputeMemoryUsage=this.module.cwrap(`QTS_RuntimeComputeMemoryUsage`,`number`,[`number`,`number`]),this.QTS_RuntimeDumpMemoryUsage=this.module.cwrap(`QTS_RuntimeDumpMemoryUsage`,`number`,[`number`]),this.QTS_RecoverableLeakCheck=this.module.cwrap(`QTS_RecoverableLeakCheck`,`number`,[]),this.QTS_BuildIsSanitizeLeak=this.module.cwrap(`QTS_BuildIsSanitizeLeak`,`number`,[]),this.QTS_RuntimeSetMaxStackSize=this.module.cwrap(`QTS_RuntimeSetMaxStackSize`,null,[`number`,`number`]),this.QTS_GetUndefined=this.module.cwrap(`QTS_GetUndefined`,`number`,[]),this.QTS_GetNull=this.module.cwrap(`QTS_GetNull`,`number`,[]),this.QTS_GetFalse=this.module.cwrap(`QTS_GetFalse`,`number`,[]),this.QTS_GetTrue=this.module.cwrap(`QTS_GetTrue`,`number`,[]),this.QTS_NewHostRef=this.module.cwrap(`QTS_NewHostRef`,`number`,[`number`,`number`]),this.QTS_GetHostRefId=this.module.cwrap(`QTS_GetHostRefId`,`number`,[`number`]),this.QTS_NewRuntime=this.module.cwrap(`QTS_NewRuntime`,`number`,[]),this.QTS_FreeRuntime=this.module.cwrap(`QTS_FreeRuntime`,null,[`number`]),this.QTS_NewContext=this.module.cwrap(`QTS_NewContext`,`number`,[`number`,`number`]),this.QTS_FreeContext=this.module.cwrap(`QTS_FreeContext`,null,[`number`]),this.QTS_FreeValuePointer=this.module.cwrap(`QTS_FreeValuePointer`,null,[`number`,`number`]),this.QTS_FreeValuePointerRuntime=this.module.cwrap(`QTS_FreeValuePointerRuntime`,null,[`number`,`number`]),this.QTS_FreeVoidPointer=this.module.cwrap(`QTS_FreeVoidPointer`,null,[`number`,`number`]),this.QTS_FreeCString=this.module.cwrap(`QTS_FreeCString`,null,[`number`,`number`]),this.QTS_DupValuePointer=this.module.cwrap(`QTS_DupValuePointer`,`number`,[`number`,`number`]),this.QTS_NewObject=this.module.cwrap(`QTS_NewObject`,`number`,[`number`]),this.QTS_NewObjectProto=this.module.cwrap(`QTS_NewObjectProto`,`number`,[`number`,`number`]),this.QTS_NewArray=this.module.cwrap(`QTS_NewArray`,`number`,[`number`]),this.QTS_NewArrayBuffer=this.module.cwrap(`QTS_NewArrayBuffer`,`number`,[`number`,`number`,`number`]),this.QTS_NewFloat64=this.module.cwrap(`QTS_NewFloat64`,`number`,[`number`,`number`]),this.QTS_GetFloat64=this.module.cwrap(`QTS_GetFloat64`,`number`,[`number`,`number`]),this.QTS_NewString=this.module.cwrap(`QTS_NewString`,`number`,[`number`,`number`]),this.QTS_GetString=this.module.cwrap(`QTS_GetString`,`number`,[`number`,`number`]),this.QTS_GetArrayBuffer=this.module.cwrap(`QTS_GetArrayBuffer`,`number`,[`number`,`number`]),this.QTS_GetArrayBufferLength=this.module.cwrap(`QTS_GetArrayBufferLength`,`number`,[`number`,`number`]),this.QTS_NewSymbol=this.module.cwrap(`QTS_NewSymbol`,`number`,[`number`,`number`,`number`]),this.QTS_GetSymbolDescriptionOrKey=e(this.module.cwrap(`QTS_GetSymbolDescriptionOrKey`,`number`,[`number`,`number`])),this.QTS_GetSymbolDescriptionOrKey_MaybeAsync=this.module.cwrap(`QTS_GetSymbolDescriptionOrKey`,`number`,[`number`,`number`]),this.QTS_IsGlobalSymbol=this.module.cwrap(`QTS_IsGlobalSymbol`,`number`,[`number`,`number`]),this.QTS_IsJobPending=this.module.cwrap(`QTS_IsJobPending`,`number`,[`number`]),this.QTS_ExecutePendingJob=e(this.module.cwrap(`QTS_ExecutePendingJob`,`number`,[`number`,`number`,`number`])),this.QTS_ExecutePendingJob_MaybeAsync=this.module.cwrap(`QTS_ExecutePendingJob`,`number`,[`number`,`number`,`number`]),this.QTS_GetProp=e(this.module.cwrap(`QTS_GetProp`,`number`,[`number`,`number`,`number`])),this.QTS_GetProp_MaybeAsync=this.module.cwrap(`QTS_GetProp`,`number`,[`number`,`number`,`number`]),this.QTS_GetPropNumber=e(this.module.cwrap(`QTS_GetPropNumber`,`number`,[`number`,`number`,`number`])),this.QTS_GetPropNumber_MaybeAsync=this.module.cwrap(`QTS_GetPropNumber`,`number`,[`number`,`number`,`number`]),this.QTS_SetProp=e(this.module.cwrap(`QTS_SetProp`,null,[`number`,`number`,`number`,`number`])),this.QTS_SetProp_MaybeAsync=this.module.cwrap(`QTS_SetProp`,null,[`number`,`number`,`number`,`number`]),this.QTS_DefineProp=this.module.cwrap(`QTS_DefineProp`,null,[`number`,`number`,`number`,`number`,`number`,`number`,`boolean`,`boolean`,`boolean`]),this.QTS_GetOwnPropertyNames=e(this.module.cwrap(`QTS_GetOwnPropertyNames`,`number`,[`number`,`number`,`number`,`number`,`number`])),this.QTS_GetOwnPropertyNames_MaybeAsync=this.module.cwrap(`QTS_GetOwnPropertyNames`,`number`,[`number`,`number`,`number`,`number`,`number`]),this.QTS_Call=e(this.module.cwrap(`QTS_Call`,`number`,[`number`,`number`,`number`,`number`,`number`])),this.QTS_Call_MaybeAsync=this.module.cwrap(`QTS_Call`,`number`,[`number`,`number`,`number`,`number`,`number`]),this.QTS_ResolveException=this.module.cwrap(`QTS_ResolveException`,`number`,[`number`,`number`]),this.QTS_Dump=e(this.module.cwrap(`QTS_Dump`,`number`,[`number`,`number`])),this.QTS_Dump_MaybeAsync=this.module.cwrap(`QTS_Dump`,`number`,[`number`,`number`]),this.QTS_Eval=e(this.module.cwrap(`QTS_Eval`,`number`,[`number`,`number`,`number`,`string`,`number`,`number`])),this.QTS_Eval_MaybeAsync=this.module.cwrap(`QTS_Eval`,`number`,[`number`,`number`,`number`,`string`,`number`,`number`]),this.QTS_GetModuleNamespace=this.module.cwrap(`QTS_GetModuleNamespace`,`number`,[`number`,`number`]),this.QTS_Typeof=this.module.cwrap(`QTS_Typeof`,`number`,[`number`,`number`]),this.QTS_GetLength=this.module.cwrap(`QTS_GetLength`,`number`,[`number`,`number`,`number`]),this.QTS_IsEqual=this.module.cwrap(`QTS_IsEqual`,`number`,[`number`,`number`,`number`,`number`]),this.QTS_GetGlobalObject=this.module.cwrap(`QTS_GetGlobalObject`,`number`,[`number`]),this.QTS_NewPromiseCapability=this.module.cwrap(`QTS_NewPromiseCapability`,`number`,[`number`,`number`]),this.QTS_PromiseState=this.module.cwrap(`QTS_PromiseState`,`number`,[`number`,`number`]),this.QTS_PromiseResult=this.module.cwrap(`QTS_PromiseResult`,`number`,[`number`,`number`]),this.QTS_TestStringArg=this.module.cwrap(`QTS_TestStringArg`,null,[`string`]),this.QTS_GetDebugLogEnabled=this.module.cwrap(`QTS_GetDebugLogEnabled`,`number`,[`number`]),this.QTS_SetDebugLogEnabled=this.module.cwrap(`QTS_SetDebugLogEnabled`,null,[`number`,`number`]),this.QTS_BuildIsDebug=this.module.cwrap(`QTS_BuildIsDebug`,`number`,[]),this.QTS_BuildIsAsyncify=this.module.cwrap(`QTS_BuildIsAsyncify`,`number`,[]),this.QTS_NewFunction=this.module.cwrap(`QTS_NewFunction`,`number`,[`number`,`string`,`number`,`boolean`,`number`]),this.QTS_ArgvGetJSValueConstPointer=this.module.cwrap(`QTS_ArgvGetJSValueConstPointer`,`number`,[`number`,`number`]),this.QTS_RuntimeEnableInterruptHandler=this.module.cwrap(`QTS_RuntimeEnableInterruptHandler`,null,[`number`]),this.QTS_RuntimeDisableInterruptHandler=this.module.cwrap(`QTS_RuntimeDisableInterruptHandler`,null,[`number`]),this.QTS_RuntimeEnableModuleLoader=this.module.cwrap(`QTS_RuntimeEnableModuleLoader`,null,[`number`,`number`]),this.QTS_RuntimeDisableModuleLoader=this.module.cwrap(`QTS_RuntimeDisableModuleLoader`,null,[`number`]),this.QTS_bjson_encode=this.module.cwrap(`QTS_bjson_encode`,`number`,[`number`,`number`]),this.QTS_bjson_decode=this.module.cwrap(`QTS_bjson_decode`,`number`,[`number`,`number`])}};export{t as QuickJSAsyncFFI};
|