@wildo-ai/platform-core-shared 1.1.10 → 1.1.11
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/esm/core/resources/resources-operations.custom.shared.definitions.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-relationships.custom.shared.definitions.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/runtime/application-backend-env.contracts.d.ts +9 -2
- package/dist/esm/runtime/application-backend-env.contracts.d.ts.map +1 -1
- package/dist/esm/runtime/application-backend-env.contracts.js +12 -0
- package/dist/esm/runtime/application-backend-env.contracts.js.map +1 -1
- package/dist/esm/runtime/application-worker-env.contracts.d.ts +4 -2
- package/dist/esm/runtime/application-worker-env.contracts.d.ts.map +1 -1
- package/dist/esm/runtime/application-worker-env.contracts.js +3 -0
- package/dist/esm/runtime/application-worker-env.contracts.js.map +1 -1
- package/dist/esm/runtime/backend-start-outcome.contracts.d.ts.map +1 -1
- package/dist/esm/runtime/backend-start-outcome.contracts.js.map +1 -1
- package/dist/esm/runtime/runtime-topology.contracts.d.ts.map +1 -1
- package/dist/esm/security/authorizations/roles.custom.shared.definitions.d.ts.map +1 -1
- package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.d.ts +362 -44
- package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.d.ts +400 -45
- package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.js +107 -1
- package/dist/esm/wildo-application-executions/wildo-application-executions.custom.shared.schemas.js.map +1 -1
- package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.d.ts +24 -14
- package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.d.ts +31 -15
- package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.js +26 -2
- package/dist/esm/wildo-application-tasks/wildo-application-tasks.custom.shared.schemas.js.map +1 -1
- package/dist/esm/wildo-applications/wildo-applications.custom.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/wildo-applications/wildo-applications.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/wildo-applications-versions/wildo-applications-versions.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.js +30 -0
- package/dist/esm/workbench/workbench-aspect-resources.custom.shared.schemas.js.map +1 -1
- package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-creation-console.custom.shared.schemas.js.map +1 -1
- package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.d.ts +21 -3
- package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.js +7 -0
- package/dist/esm/workbench/workbench-creation-conversation.custom.shared.schemas.js.map +1 -1
- package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.d.ts +185 -0
- package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.js +78 -2
- package/dist/esm/workbench/workbench-creation-plane.custom.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.d.ts +412 -10
- package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.js +524 -15
- package/dist/esm/workbench/workbench-creation-plane.custom.shared.schemas.js.map +1 -1
- package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.d.ts +34 -0
- package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.js +31 -0
- package/dist/esm/workbench/workbench-domain-model.custom.shared.schemas.js.map +1 -1
- package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.d.ts +7 -2
- package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.js +12 -2
- package/dist/esm/workbench/workbench-resources-types.custom.shared.schemas.js.map +1 -1
- package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.d.ts +93 -0
- package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js +1 -0
- package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js.map +1 -1
- package/dist/esm/workbench/workbench-resources.custom.shared.schemas.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/esm/workbench/workbench-resources.custom.shared.resources-config.schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workbench-resources.custom.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/workbench/workbench-resources.custom.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAE5B,uCAAuC,EACvC,+BAA+B,EAC/B,kBAAkB,EAClB,0CAA0C,EAC1C,2BAA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AC/D,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,EAC7C,oEAAoE;IACtE,CAAC,4BAA4B,CAAC,uBAAuB,CAAC,EACpD,2EAA2E;IAC7E,0FAA0F;IAC1F,GAAG,iDAAiD;IACpD,mGAAmG;IACnG,GAAG,wDAAwD;CAC5D,CAAC","sourcesContent":["import {\n CORE_APP_ROLES,\n CoreResourceOperation,\n CoreResourceType,\n IntrospectionTenancyStance,\n PersistenceAdapter,\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n ResourceRelationship,\n ResourceRelationshipAccessScopeStrategy,\n ResourceRelationshipCardinality,\n RelationshipNature,\n createResourceConfiguration_Initialization,\n createResourcesRelationship,\n} from '@wildo-ai/saas-models';\n\nimport { z } from 'zod';\n\nimport {\n WorkbenchShared_ResourceFieldIdentifier,\n WorkbenchShared_ResourceType,\n} from './workbench-resources-types.custom.shared.schemas';\nimport {\n buildWorkbenchAspectRelationships,\n workbenchAspectResources_ConfigurationsFactoryMap,\n} from './workbench-aspect-resources.custom.shared.schemas';\nimport {\n Workbench_DomainResource_Schema,\n Workbench_SpecificationArtifact_Schema,\n WorkbenchSpecificationArtifactConcern,\n WorkbenchSpecificationArtifactState,\n} from './workbench-resources.custom.shared.schemas';\nimport {\n workbenchCreationPlane_ResourcesConfigurationsFactoryMap,\n workbenchCreationPlane_ResourcesRelationships,\n} from './workbench-creation-plane.custom.shared.resources-config.schemas';\n\n/**\n * The page ceiling every workbench LIST declares — and it is a correctness fix, not a tuning knob.\n *\n * `IntrospectionResourceRepository.list()` answers `pagination.limit = rows.length` over the WHOLE\n * derived set, deliberately: a behavior computes its entire answer in one subprocess run, there is no\n * cursor to seek, and reporting a total the caller cannot page past would be a lie. The response DTO\n * then bounds that `limit` by the operation's `maxPaginatedResultPerPageLimit`, whose default is\n * **100**. So any introspected resource whose derivation exceeds 100 rows fails with `too_big` at\n * `pagination.limit` — the request having been served correctly right up to the last hop.\n *\n * Measured 2026-08-31, and the measurement is why this ceiling is a CORRECTNESS FIX rather than\n * headroom. The domain model projects every resource the observed application RUNS, which is its own\n * plus the engine's whole merged vocabulary: `saas-models`' core map alone carries **82** resources\n * and **105** relationships before `saas-backend-lib`'s map or the application's own eight are\n * counted. So the domain-model LIST is already comfortably past the default 100 on the smallest\n * application there is, and would have failed with `too_big` at `pagination.limit` — the request\n * having been served correctly right up to the last hop, and the bound named in none of these\n * declarations. The number also scales with the OBSERVED application, which is the one input this\n * repository does not control.\n *\n * Declared on the shared variant so every workbench resource is bounded by the same number, rather\n * than one being raised and its siblings left waiting to hit the same wall.\n *\n * Above the ceiling the request FAILS rather than truncating, which is the correct direction: a\n * silently short domain model is indistinguishable from a complete one once it is drawn.\n */\nexport const WORKBENCH_INTROSPECTION_MAX_ROWS_PER_PAGE = 1000;\n\n/**\n * Read-only over HTTP, and PUBLIC.\n *\n * `APP_PUBLIC` means what its enum comment says — accessible to everyone, no credential — and as of\n * 2026-08-30 the runtime implements it: the authentication chain now admits an operation declaring\n * this role instead of demanding a credential it never required. Before that it was declared,\n * published as public by the OpenAPI generator, and refused at runtime.\n *\n * ## Why these rows are genuinely public\n *\n * They are a projection of the application's OWN SOURCE — module ids and the resource types each\n * registers — carrying no tenant dimension, which is exactly what the binding's\n * `APPLICATION_STRUCTURE` tenancy stance declares. There is no subject whose data could leak,\n * because no subject's data is here.\n *\n * This is the same category as a public price list, a frontend application configuration or an i18n\n * bundle: things every caller may read, which until now could only be served by escaping the\n * resource system into a manual controller.\n *\n * ## What still confines them\n *\n * The companion asserts a loopback bind at startup and fails closed otherwise, so this surface is\n * reachable only from the developer's own machine. `APP_PUBLIC` is the right declaration on its\n * merits; the loopback bind is what makes the whole workbench local, and both remain true\n * independently.\n *\n * If an introspected resource is ever added that projects something OTHER than the application's own\n * structure, this role is wrong for it — the stance and the role must move together.\n */\nexport function createReadOnlyApiVariant() {\n return {\n variantType: ResourceOperationVariantType.API_CALL as const,\n isDefault: true as const,\n /*\n * `APP_PUBLIC` ALONE, and that single entry is now load-bearing evidence rather than a shorthand.\n *\n * It briefly read `[APP_PUBLIC, APP_USER]`. That was a WORKAROUND for an engine defect (#153),\n * not a statement about these rows: the authorizer admitted a public operation only when the\n * caller was ALSO a public execution, so an AUTHENTICATED caller fell past that carve-out to the\n * ordinary role gate — where `APP_PUBLIC` is in nobody's granted set — and was refused. Measured\n * 2026-08-31 on the workbench's module projection (a resource retired the same day): with no\n * credential the LIST answered 200 with the eight modules; with a valid administrator bearer it\n * answered 403 `authorizations_access_denied`. The workbench's own sidebar could not read the\n * rows it exists to show, because its operator had logged in.\n *\n * `requiredRolesDeclarePublicAccess` in `@wildo-ai/saas-models` is now the one named source for\n * what `APP_PUBLIC` means, and every role gate in the engine consults it — so the sentinel\n * genuinely admits every caller and the second role has nothing left to add. Declaring it anyway\n * would say these rows need an authenticated reader, which is the opposite of what they are.\n *\n * Keeping the bare declaration is deliberate: it is the surface the fix is exercised on. If the\n * defect ever returns, the workbench sidebar goes blank for a logged-in operator — a loud,\n * immediate signal — instead of being silently masked by a role that was only ever there to hide\n * it.\n */\n roles: [CORE_APP_ROLES.APP_PUBLIC],\n riskLevel: ResourceOperationRiskLevel.LOW as const,\n };\n}\n\n/**\n * The LIST variant — the read-only variant plus the page ceiling.\n *\n * Separate from {@link createReadOnlyApiVariant} because `maxPaginatedResultPerPageLimit` is only\n * read on a LIST-like operation (`isListLike` in the resource factory); putting it on READ too would\n * declare a field that operation does not have, which reads as though it did something.\n */\nexport function createReadOnlyListApiVariant() {\n return {\n ...createReadOnlyApiVariant(),\n maxPaginatedResultPerPageLimit: WORKBENCH_INTROSPECTION_MAX_ROWS_PER_PAGE,\n };\n}\n\n\n/**\n * APPLICATION-scoped, anchored by a STANDALONE relationship.\n *\n * The form the resource factory's own migration note prescribes: STANDALONE \"keeps the rel inert for\n * URL routing while declaring the structural ownership anchor\", so the resource is reachable at a\n * flat path rather than nested under `/applications/:id/`.\n *\n * APPLICATION rather than ORGANIZATIONS on purpose: these rows describe the application's own\n * structure, so the application IS their scope. There is no tenant dimension to anchor on — the\n * binding's `APPLICATION_STRUCTURE` stance above says the same thing from the data's side.\n *\n * This originally read as a consequence of API-key scoping, because the workbench browser was\n * expected to authenticate with an application-scope key. `APP_PUBLIC` removed that requirement\n * entirely (see the role note above), so the scope now rests on its own merits rather than on a\n * credential's constraint. The tenant-scoping trade remains recorded in issue #118.\n */\nexport const workbenchShared_ResourcesRelationships: ResourceRelationship[] = [\n /*\n * A STANDALONE anchor for the domain-model resource. Every INTROSPECTION resource needs one:\n * `resourcePrimaryScope` is DERIVED from a relationship flagged `isPrimaryScope`, so a resource\n * without one has no scope at all — and STANDALONE keeps it off the URL, which is what gives these\n * resources a flat route instead of `/applications/:id/...`.\n */\n createResourcesRelationship(\n CoreResourceType.APPLICATION,\n WorkbenchShared_ResourceType.DOMAIN_RESOURCES,\n ResourceRelationshipCardinality.ONE,\n ResourceRelationshipCardinality.MANY,\n {\n nature: RelationshipNature.COMPOSITION,\n isPrimaryScope: true,\n accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.STANDALONE,\n contextPolicy: {},\n },\n ),\n /* And for the specification-artifacts resource. Same anchor, same reason. */\n createResourcesRelationship(\n CoreResourceType.APPLICATION,\n WorkbenchShared_ResourceType.SPECIFICATION_ARTIFACTS,\n ResourceRelationshipCardinality.ONE,\n ResourceRelationshipCardinality.MANY,\n {\n nature: RelationshipNature.COMPOSITION,\n isPrimaryScope: true,\n accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.STANDALONE,\n contextPolicy: {},\n },\n ),\n /*\n * Every family-aspect resource's relationships — the same STANDALONE anchor per aspect, plus\n * one REFERENCE per declared edge whose `foreignKeyField` is what makes reference navigation\n * resolve. Generated from the descriptor table beside the aspect configs.\n */\n ...buildWorkbenchAspectRelationships(),\n /*\n * The creation plane's four STANDALONE anchors — same form, declared beside its configs. Merged\n * here so the one array every registrar consumes stays the single relationship authority.\n */\n ...workbenchCreationPlane_ResourcesRelationships,\n];\n\n\n/**\n * The observed application's domain model — one row per resource, and the source the workbench's\n * domain-model graph is drawn from.\n *\n * ## Why a THIRD introspected resource beside modules and relationships\n *\n * Its two siblings project two DIFFERENT behaviors on two different targets, so a graph assembled\n * from both is assembled from two subprocess runs against a working tree an operator is editing —\n * nodes from one state of the application, edges from the next, with nothing to detect the mismatch.\n * `application-domain-model` answers ownership, edges, field names and specification prose from a\n * SINGLE import, which is the only shape in which the three are internally consistent. Speed is the\n * smaller half of the reason; consistency is the whole of it.\n *\n * Same tenancy stance and same PUBLIC role as its siblings, for the same reason: a resource, the\n * module that registers it and the edges it declares are facts about the application's SOURCE, with\n * no tenant dimension and no subject whose data could leak.\n */\nconst WorkbenchDomainResource_Operations = undefined;\n\ntype WorkbenchDomainResource_CoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST;\n\nexport const workbenchDomainResources_ResourceConfiguration_InitializationFactory =\n (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof WorkbenchDomainResource_Operations,\n WorkbenchDomainResource_CoreOperations,\n typeof Workbench_DomainResource_Schema\n >({\n mainSchema: Workbench_DomainResource_Schema,\n resourceIdentifier: WorkbenchShared_ResourceType.DOMAIN_RESOURCES,\n resourceFieldIdentifier:\n WorkbenchShared_ResourceFieldIdentifier[WorkbenchShared_ResourceType.DOMAIN_RESOURCES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: false,\n persistenceAdapter: PersistenceAdapter.INTROSPECTION,\n introspectionBinding: {\n behavior: 'application-domain-model',\n rowsPath: 'domainResources',\n tenancy: IntrospectionTenancyStance.APPLICATION_STRUCTURE,\n /*\n * A resource type is unique in a registry by construction — a registry is keyed by it — so one\n * field is the whole key here, and no discriminator can be needed.\n *\n * Composed onto `workbenchDomainResourceId` rather than addressing the row by `resourceType`\n * directly: `resourceFieldIdentifier` values are published into the GLOBAL field-identifier map\n * that resolves a foreign-key field NAME to the resource it points at, and `resourceType` is a\n * name any application could collide with on a map whose whole job is that names are\n * unambiguous.\n */\n identityFields: ['resourceType'],\n },\n coreOperations: [CoreResourceOperation.READ, CoreResourceOperation.LIST],\n customOperation: WorkbenchDomainResource_Operations,\n operationsConfiguration: {\n [CoreResourceOperation.READ]: { variants: [createReadOnlyApiVariant()] },\n [CoreResourceOperation.LIST]: { variants: [createReadOnlyListApiVariant()] },\n },\n });\n\n/**\n * Every application-specification family the journey produces, projected for a human reviewer.\n *\n * ## What this is for\n *\n * Its three siblings project the application's STRUCTURE. This one projects the PRODUCT and its\n * obligations — vision, market, requirements, roadmap, brand, business model, the assurance\n * programme and the governed-document families — which until now were reachable only by opening a\n * TypeScript file in an editor (issue #162).\n *\n * ## Why the same behavior does not serve it\n *\n * `application-domain-model` answers questions about the resource registry. A family's content is\n * not in the registry at all: it is on the specifications package's companion exports, validated by\n * the `_core` validator the semantic authority names for it. Different target, different question,\n * different behavior — the split the two original workbench resources already demonstrate.\n *\n * ## Same posture as its siblings, for the same reason\n *\n * `APPLICATION_STRUCTURE` tenancy and `APP_PUBLIC`: a vision brief, a roadmap and a compliance\n * programme are facts about what the application's own source SAYS about itself. There is no tenant\n * dimension and no subject whose data could leak, and the companion's loopback bind is what keeps\n * the whole workbench local.\n *\n * READ and LIST only, and structurally so — `PersistenceAdapter.INTROSPECTION` refuses every write\n * verb, rows are derived per read and nothing is stored. Acceptance of a specification is a human\n * git commit (`.claude/rules/one-source-of-truth.md` rule 2), so there is deliberately no place here\n * for an acceptance state to accumulate, not even by accident.\n */\nconst WorkbenchSpecificationArtifact_Operations = undefined;\n\ntype WorkbenchSpecificationArtifact_CoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST;\n\nexport const workbenchSpecificationArtifacts_ResourceConfiguration_InitializationFactory =\n (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof WorkbenchSpecificationArtifact_Operations,\n WorkbenchSpecificationArtifact_CoreOperations,\n typeof Workbench_SpecificationArtifact_Schema\n >({\n mainSchema: Workbench_SpecificationArtifact_Schema,\n resourceIdentifier: WorkbenchShared_ResourceType.SPECIFICATION_ARTIFACTS,\n resourceFieldIdentifier:\n WorkbenchShared_ResourceFieldIdentifier[WorkbenchShared_ResourceType.SPECIFICATION_ARTIFACTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: false,\n persistenceAdapter: PersistenceAdapter.INTROSPECTION,\n introspectionBinding: {\n behavior: 'specification-artifacts',\n rowsPath: 'artifacts',\n tenancy: IntrospectionTenancyStance.APPLICATION_STRUCTURE,\n /*\n * NO `identityFields`, and the omission is the point.\n *\n * Every row already carries `family`, and `family` IS this resource's\n * `resourceFieldIdentifier` — so there is nothing to compose. This is the `moduleId` case, not\n * the relationships one: declaring an identity here would stamp a composed key over a real\n * field, replacing the source's own id with a copy of itself.\n */\n },\n coreOperations: [CoreResourceOperation.READ, CoreResourceOperation.LIST],\n customOperation: WorkbenchSpecificationArtifact_Operations,\n operationsConfiguration: {\n [CoreResourceOperation.READ]: { variants: [createReadOnlyApiVariant()] },\n [CoreResourceOperation.LIST]: {\n variants: [{\n ...createReadOnlyListApiVariant(),\n /*\n * The two review axes a reader slices fifteen rows by. Declaring them is an OBLIGATION,\n * not a hint: the introspection source honors exactly the scalar-equality/IN filters that\n * reach it and REFUSES shapes it cannot apply, because a declared filter that is silently\n * dropped returns the unfiltered set wearing a filtered label — the `--state ready` defect\n * class. The frontend's concern quick-filter tabs require `concern` to be here, or the\n * tab strip silently never renders.\n */\n filterFields: {\n concern: z.enum(WorkbenchSpecificationArtifactConcern).systemEnum('WorkbenchSpecificationArtifactConcern'),\n state: z.enum(WorkbenchSpecificationArtifactState).systemEnum('WorkbenchSpecificationArtifactState'),\n },\n }],\n },\n },\n });\n\nexport const workbenchShared_ResourcesConfigurationsFactoryMap = {\n [WorkbenchShared_ResourceType.DOMAIN_RESOURCES]:\n workbenchDomainResources_ResourceConfiguration_InitializationFactory,\n [WorkbenchShared_ResourceType.SPECIFICATION_ARTIFACTS]:\n workbenchSpecificationArtifacts_ResourceConfiguration_InitializationFactory,\n // The 40 family-aspect resources — generated from the descriptor table, one mold for all.\n ...workbenchAspectResources_ConfigurationsFactoryMap,\n // The creation plane — companion-RUNTIME projections (authenticated, APPLICATION_RUNTIME tenancy).\n ...workbenchCreationPlane_ResourcesConfigurationsFactoryMap,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"workbench-resources.custom.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/workbench/workbench-resources.custom.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAE5B,uCAAuC,EACvC,+BAA+B,EAC/B,kBAAkB,EAClB,0CAA0C,EAC1C,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,0BAA0B,CAAC;AAElC,OAAO,EACL,uCAAuC,EACvC,4BAA4B,GAC7B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,iCAAiC,EACjC,iDAAiD,GAClD,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,+BAA+B,EAC/B,sCAAsC,EACtC,qCAAqC,EACrC,mCAAmC,GACpC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,wDAAwD,EACxD,6CAA6C,GAC9C,MAAM,mEAAmE,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,IAAI,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,wBAAwB;IACtC,OAAO;QACL,WAAW,EAAE,4BAA4B,CAAC,QAAiB;QAC3D,SAAS,EAAE,IAAa;QACxB;;;;;;;;;;;;;;;;;;;;;WAqBG;QACH,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;QAClC,SAAS,EAAE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uB,EAAE;QACvB,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,wBAAwB,EAAE,CAAC,EAAE;QACxE,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE,CAAC;oBACT,GAAG,4BAA4B,EAAE;oBACjC;;;;;;;uBAOG;oBACH,YAAY,EAAE;wBACZ,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC,UAAU,CAAC,uCAAuC,CAAC;wBAC1G,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,UAAU,CAAC,qCAAqC,CAAC;qBACrG;iBACF,CAAC;SACH;KACF;CACF,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,iDAAiD,GAAG;IAC/D,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,EAC7C,oEAAoE;IACtE,CAAC,4BAA4B,CAAC,uBAAuB,CAAC,EACpD,2EAA2E;IAC7E,0FAA0F;IAC1F,GAAG,iDAAiD;IACpD,mGAAmG;IACnG,GAAG,wDAAwD;CAC5D,CAAC","sourcesContent":["import {\n CORE_APP_ROLES,\n CoreResourceOperation,\n CoreResourceType,\n IntrospectionTenancyStance,\n PersistenceAdapter,\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n ResourceRelationship,\n ResourceRelationshipAccessScopeStrategy,\n ResourceRelationshipCardinality,\n RelationshipNature,\n createResourceConfiguration_Initialization,\n createResourcesRelationship,\n} from '@wildo-ai/saas-models';\n\nimport { z } from 'zod';\nimport '@wildo-ai/zod-decorators';\n\nimport {\n WorkbenchShared_ResourceFieldIdentifier,\n WorkbenchShared_ResourceType,\n} from './workbench-resources-types.custom.shared.schemas';\nimport {\n buildWorkbenchAspectRelationships,\n workbenchAspectResources_ConfigurationsFactoryMap,\n} from './workbench-aspect-resources.custom.shared.schemas';\nimport {\n Workbench_DomainResource_Schema,\n Workbench_SpecificationArtifact_Schema,\n WorkbenchSpecificationArtifactConcern,\n WorkbenchSpecificationArtifactState,\n} from './workbench-resources.custom.shared.schemas';\nimport {\n workbenchCreationPlane_ResourcesConfigurationsFactoryMap,\n workbenchCreationPlane_ResourcesRelationships,\n} from './workbench-creation-plane.custom.shared.resources-config.schemas';\n\n/**\n * The page ceiling every workbench LIST declares — and it is a correctness fix, not a tuning knob.\n *\n * `IntrospectionResourceRepository.list()` answers `pagination.limit = rows.length` over the WHOLE\n * derived set, deliberately: a behavior computes its entire answer in one subprocess run, there is no\n * cursor to seek, and reporting a total the caller cannot page past would be a lie. The response DTO\n * then bounds that `limit` by the operation's `maxPaginatedResultPerPageLimit`, whose default is\n * **100**. So any introspected resource whose derivation exceeds 100 rows fails with `too_big` at\n * `pagination.limit` — the request having been served correctly right up to the last hop.\n *\n * Measured 2026-08-31, and the measurement is why this ceiling is a CORRECTNESS FIX rather than\n * headroom. The domain model projects every resource the observed application RUNS, which is its own\n * plus the engine's whole merged vocabulary: `saas-models`' core map alone carries **82** resources\n * and **105** relationships before `saas-backend-lib`'s map or the application's own eight are\n * counted. So the domain-model LIST is already comfortably past the default 100 on the smallest\n * application there is, and would have failed with `too_big` at `pagination.limit` — the request\n * having been served correctly right up to the last hop, and the bound named in none of these\n * declarations. The number also scales with the OBSERVED application, which is the one input this\n * repository does not control.\n *\n * Declared on the shared variant so every workbench resource is bounded by the same number, rather\n * than one being raised and its siblings left waiting to hit the same wall.\n *\n * Above the ceiling the request FAILS rather than truncating, which is the correct direction: a\n * silently short domain model is indistinguishable from a complete one once it is drawn.\n */\nexport const WORKBENCH_INTROSPECTION_MAX_ROWS_PER_PAGE = 1000;\n\n/**\n * Read-only over HTTP, and PUBLIC.\n *\n * `APP_PUBLIC` means what its enum comment says — accessible to everyone, no credential — and as of\n * 2026-08-30 the runtime implements it: the authentication chain now admits an operation declaring\n * this role instead of demanding a credential it never required. Before that it was declared,\n * published as public by the OpenAPI generator, and refused at runtime.\n *\n * ## Why these rows are genuinely public\n *\n * They are a projection of the application's OWN SOURCE — module ids and the resource types each\n * registers — carrying no tenant dimension, which is exactly what the binding's\n * `APPLICATION_STRUCTURE` tenancy stance declares. There is no subject whose data could leak,\n * because no subject's data is here.\n *\n * This is the same category as a public price list, a frontend application configuration or an i18n\n * bundle: things every caller may read, which until now could only be served by escaping the\n * resource system into a manual controller.\n *\n * ## What still confines them\n *\n * The companion asserts a loopback bind at startup and fails closed otherwise, so this surface is\n * reachable only from the developer's own machine. `APP_PUBLIC` is the right declaration on its\n * merits; the loopback bind is what makes the whole workbench local, and both remain true\n * independently.\n *\n * If an introspected resource is ever added that projects something OTHER than the application's own\n * structure, this role is wrong for it — the stance and the role must move together.\n */\nexport function createReadOnlyApiVariant() {\n return {\n variantType: ResourceOperationVariantType.API_CALL as const,\n isDefault: true as const,\n /*\n * `APP_PUBLIC` ALONE, and that single entry is now load-bearing evidence rather than a shorthand.\n *\n * It briefly read `[APP_PUBLIC, APP_USER]`. That was a WORKAROUND for an engine defect (#153),\n * not a statement about these rows: the authorizer admitted a public operation only when the\n * caller was ALSO a public execution, so an AUTHENTICATED caller fell past that carve-out to the\n * ordinary role gate — where `APP_PUBLIC` is in nobody's granted set — and was refused. Measured\n * 2026-08-31 on the workbench's module projection (a resource retired the same day): with no\n * credential the LIST answered 200 with the eight modules; with a valid administrator bearer it\n * answered 403 `authorizations_access_denied`. The workbench's own sidebar could not read the\n * rows it exists to show, because its operator had logged in.\n *\n * `requiredRolesDeclarePublicAccess` in `@wildo-ai/saas-models` is now the one named source for\n * what `APP_PUBLIC` means, and every role gate in the engine consults it — so the sentinel\n * genuinely admits every caller and the second role has nothing left to add. Declaring it anyway\n * would say these rows need an authenticated reader, which is the opposite of what they are.\n *\n * Keeping the bare declaration is deliberate: it is the surface the fix is exercised on. If the\n * defect ever returns, the workbench sidebar goes blank for a logged-in operator — a loud,\n * immediate signal — instead of being silently masked by a role that was only ever there to hide\n * it.\n */\n roles: [CORE_APP_ROLES.APP_PUBLIC],\n riskLevel: ResourceOperationRiskLevel.LOW as const,\n };\n}\n\n/**\n * The LIST variant — the read-only variant plus the page ceiling.\n *\n * Separate from {@link createReadOnlyApiVariant} because `maxPaginatedResultPerPageLimit` is only\n * read on a LIST-like operation (`isListLike` in the resource factory); putting it on READ too would\n * declare a field that operation does not have, which reads as though it did something.\n */\nexport function createReadOnlyListApiVariant() {\n return {\n ...createReadOnlyApiVariant(),\n maxPaginatedResultPerPageLimit: WORKBENCH_INTROSPECTION_MAX_ROWS_PER_PAGE,\n };\n}\n\n\n/**\n * APPLICATION-scoped, anchored by a STANDALONE relationship.\n *\n * The form the resource factory's own migration note prescribes: STANDALONE \"keeps the rel inert for\n * URL routing while declaring the structural ownership anchor\", so the resource is reachable at a\n * flat path rather than nested under `/applications/:id/`.\n *\n * APPLICATION rather than ORGANIZATIONS on purpose: these rows describe the application's own\n * structure, so the application IS their scope. There is no tenant dimension to anchor on — the\n * binding's `APPLICATION_STRUCTURE` stance above says the same thing from the data's side.\n *\n * This originally read as a consequence of API-key scoping, because the workbench browser was\n * expected to authenticate with an application-scope key. `APP_PUBLIC` removed that requirement\n * entirely (see the role note above), so the scope now rests on its own merits rather than on a\n * credential's constraint. The tenant-scoping trade remains recorded in issue #118.\n */\nexport const workbenchShared_ResourcesRelationships: ResourceRelationship[] = [\n /*\n * A STANDALONE anchor for the domain-model resource. Every INTROSPECTION resource needs one:\n * `resourcePrimaryScope` is DERIVED from a relationship flagged `isPrimaryScope`, so a resource\n * without one has no scope at all — and STANDALONE keeps it off the URL, which is what gives these\n * resources a flat route instead of `/applications/:id/...`.\n */\n createResourcesRelationship(\n CoreResourceType.APPLICATION,\n WorkbenchShared_ResourceType.DOMAIN_RESOURCES,\n ResourceRelationshipCardinality.ONE,\n ResourceRelationshipCardinality.MANY,\n {\n nature: RelationshipNature.COMPOSITION,\n isPrimaryScope: true,\n accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.STANDALONE,\n contextPolicy: {},\n },\n ),\n /* And for the specification-artifacts resource. Same anchor, same reason. */\n createResourcesRelationship(\n CoreResourceType.APPLICATION,\n WorkbenchShared_ResourceType.SPECIFICATION_ARTIFACTS,\n ResourceRelationshipCardinality.ONE,\n ResourceRelationshipCardinality.MANY,\n {\n nature: RelationshipNature.COMPOSITION,\n isPrimaryScope: true,\n accessScopeStrategy: ResourceRelationshipAccessScopeStrategy.STANDALONE,\n contextPolicy: {},\n },\n ),\n /*\n * Every family-aspect resource's relationships — the same STANDALONE anchor per aspect, plus\n * one REFERENCE per declared edge whose `foreignKeyField` is what makes reference navigation\n * resolve. Generated from the descriptor table beside the aspect configs.\n */\n ...buildWorkbenchAspectRelationships(),\n /*\n * The creation plane's four STANDALONE anchors — same form, declared beside its configs. Merged\n * here so the one array every registrar consumes stays the single relationship authority.\n */\n ...workbenchCreationPlane_ResourcesRelationships,\n];\n\n\n/**\n * The observed application's domain model — one row per resource, and the source the workbench's\n * domain-model graph is drawn from.\n *\n * ## Why a THIRD introspected resource beside modules and relationships\n *\n * Its two siblings project two DIFFERENT behaviors on two different targets, so a graph assembled\n * from both is assembled from two subprocess runs against a working tree an operator is editing —\n * nodes from one state of the application, edges from the next, with nothing to detect the mismatch.\n * `application-domain-model` answers ownership, edges, field names and specification prose from a\n * SINGLE import, which is the only shape in which the three are internally consistent. Speed is the\n * smaller half of the reason; consistency is the whole of it.\n *\n * Same tenancy stance and same PUBLIC role as its siblings, for the same reason: a resource, the\n * module that registers it and the edges it declares are facts about the application's SOURCE, with\n * no tenant dimension and no subject whose data could leak.\n */\nconst WorkbenchDomainResource_Operations = undefined;\n\ntype WorkbenchDomainResource_CoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST;\n\nexport const workbenchDomainResources_ResourceConfiguration_InitializationFactory =\n (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof WorkbenchDomainResource_Operations,\n WorkbenchDomainResource_CoreOperations,\n typeof Workbench_DomainResource_Schema\n >({\n mainSchema: Workbench_DomainResource_Schema,\n resourceIdentifier: WorkbenchShared_ResourceType.DOMAIN_RESOURCES,\n resourceFieldIdentifier:\n WorkbenchShared_ResourceFieldIdentifier[WorkbenchShared_ResourceType.DOMAIN_RESOURCES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: false,\n persistenceAdapter: PersistenceAdapter.INTROSPECTION,\n introspectionBinding: {\n behavior: 'application-domain-model',\n rowsPath: 'domainResources',\n tenancy: IntrospectionTenancyStance.APPLICATION_STRUCTURE,\n /*\n * A resource type is unique in a registry by construction — a registry is keyed by it — so one\n * field is the whole key here, and no discriminator can be needed.\n *\n * Composed onto `workbenchDomainResourceId` rather than addressing the row by `resourceType`\n * directly: `resourceFieldIdentifier` values are published into the GLOBAL field-identifier map\n * that resolves a foreign-key field NAME to the resource it points at, and `resourceType` is a\n * name any application could collide with on a map whose whole job is that names are\n * unambiguous.\n */\n identityFields: ['resourceType'],\n },\n coreOperations: [CoreResourceOperation.READ, CoreResourceOperation.LIST],\n customOperation: WorkbenchDomainResource_Operations,\n operationsConfiguration: {\n [CoreResourceOperation.READ]: { variants: [createReadOnlyApiVariant()] },\n [CoreResourceOperation.LIST]: { variants: [createReadOnlyListApiVariant()] },\n },\n });\n\n/**\n * Every application-specification family the journey produces, projected for a human reviewer.\n *\n * ## What this is for\n *\n * Its three siblings project the application's STRUCTURE. This one projects the PRODUCT and its\n * obligations — vision, market, requirements, roadmap, brand, business model, the assurance\n * programme and the governed-document families — which until now were reachable only by opening a\n * TypeScript file in an editor (issue #162).\n *\n * ## Why the same behavior does not serve it\n *\n * `application-domain-model` answers questions about the resource registry. A family's content is\n * not in the registry at all: it is on the specifications package's companion exports, validated by\n * the `_core` validator the semantic authority names for it. Different target, different question,\n * different behavior — the split the two original workbench resources already demonstrate.\n *\n * ## Same posture as its siblings, for the same reason\n *\n * `APPLICATION_STRUCTURE` tenancy and `APP_PUBLIC`: a vision brief, a roadmap and a compliance\n * programme are facts about what the application's own source SAYS about itself. There is no tenant\n * dimension and no subject whose data could leak, and the companion's loopback bind is what keeps\n * the whole workbench local.\n *\n * READ and LIST only, and structurally so — `PersistenceAdapter.INTROSPECTION` refuses every write\n * verb, rows are derived per read and nothing is stored. Acceptance of a specification is a human\n * git commit (`.claude/rules/one-source-of-truth.md` rule 2), so there is deliberately no place here\n * for an acceptance state to accumulate, not even by accident.\n */\nconst WorkbenchSpecificationArtifact_Operations = undefined;\n\ntype WorkbenchSpecificationArtifact_CoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST;\n\nexport const workbenchSpecificationArtifacts_ResourceConfiguration_InitializationFactory =\n (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof WorkbenchSpecificationArtifact_Operations,\n WorkbenchSpecificationArtifact_CoreOperations,\n typeof Workbench_SpecificationArtifact_Schema\n >({\n mainSchema: Workbench_SpecificationArtifact_Schema,\n resourceIdentifier: WorkbenchShared_ResourceType.SPECIFICATION_ARTIFACTS,\n resourceFieldIdentifier:\n WorkbenchShared_ResourceFieldIdentifier[WorkbenchShared_ResourceType.SPECIFICATION_ARTIFACTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: false,\n persistenceAdapter: PersistenceAdapter.INTROSPECTION,\n introspectionBinding: {\n behavior: 'specification-artifacts',\n rowsPath: 'artifacts',\n tenancy: IntrospectionTenancyStance.APPLICATION_STRUCTURE,\n /*\n * NO `identityFields`, and the omission is the point.\n *\n * Every row already carries `family`, and `family` IS this resource's\n * `resourceFieldIdentifier` — so there is nothing to compose. This is the `moduleId` case, not\n * the relationships one: declaring an identity here would stamp a composed key over a real\n * field, replacing the source's own id with a copy of itself.\n */\n },\n coreOperations: [CoreResourceOperation.READ, CoreResourceOperation.LIST],\n customOperation: WorkbenchSpecificationArtifact_Operations,\n operationsConfiguration: {\n [CoreResourceOperation.READ]: { variants: [createReadOnlyApiVariant()] },\n [CoreResourceOperation.LIST]: {\n variants: [{\n ...createReadOnlyListApiVariant(),\n /*\n * The two review axes a reader slices fifteen rows by. Declaring them is an OBLIGATION,\n * not a hint: the introspection source honors exactly the scalar-equality/IN filters that\n * reach it and REFUSES shapes it cannot apply, because a declared filter that is silently\n * dropped returns the unfiltered set wearing a filtered label — the `--state ready` defect\n * class. The frontend's concern quick-filter tabs require `concern` to be here, or the\n * tab strip silently never renders.\n */\n filterFields: {\n concern: z.enum(WorkbenchSpecificationArtifactConcern).systemEnum('WorkbenchSpecificationArtifactConcern'),\n state: z.enum(WorkbenchSpecificationArtifactState).systemEnum('WorkbenchSpecificationArtifactState'),\n },\n }],\n },\n },\n });\n\nexport const workbenchShared_ResourcesConfigurationsFactoryMap = {\n [WorkbenchShared_ResourceType.DOMAIN_RESOURCES]:\n workbenchDomainResources_ResourceConfiguration_InitializationFactory,\n [WorkbenchShared_ResourceType.SPECIFICATION_ARTIFACTS]:\n workbenchSpecificationArtifacts_ResourceConfiguration_InitializationFactory,\n // The 40 family-aspect resources — generated from the descriptor table, one mold for all.\n ...workbenchAspectResources_ConfigurationsFactoryMap,\n // The creation plane — companion-RUNTIME projections (authenticated, APPLICATION_RUNTIME tenancy).\n ...workbenchCreationPlane_ResourcesConfigurationsFactoryMap,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workbench-resources.custom.shared.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"workbench-resources.custom.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/workbench/workbench-resources.custom.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;iBA+DtD,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAE/G;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0L1C,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAEvF;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvF,qFAAqF;AACrF,MAAM,MAAM,iCAAiC,GAAG,wBAAwB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,qCAAqC;IAC/C,oFAAoF;IACpF,MAAM,WAAW;IACjB,8FAA8F;IAC9F,KAAK,UAAU;IACf,6FAA6F;IAC7F,QAAQ,aAAa;IACrB,8CAA8C;IAC9C,QAAQ,aAAa;IACrB,uFAAuF;IACvF,WAAW,gBAAgB;IAC3B;;;;;;;;;;;OAWG;IACH,YAAY,iBAAiB;CAC9B;AAED;;;;;;GAMG;AACH,oBAAY,mCAAmC;IAC7C,4FAA4F;IAC5F,YAAY,iBAAiB;IAC7B,kGAAkG;IAClG,cAAc,mBAAmB;IACjC;;;;;;;OAOG;IACH,UAAU,eAAe;CAC1B;AAED;;;;GAIG;AACH,eAAO,MAAM,6CAA6C;;;iBAGxD,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;iBA6HjD,CAAC;AAEH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildo-ai/platform-core-shared",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "Todo app specific models and types",
|
|
6
6
|
"author": "Wildo AI",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"test:watch": "vitest"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@wildo-ai/saas-models": "1.1.
|
|
34
|
-
"@wildo-ai/presets-components-models": "1.1.
|
|
35
|
-
"@wildo-ai/zod-decorators": "1.1.
|
|
33
|
+
"@wildo-ai/saas-models": "1.1.11",
|
|
34
|
+
"@wildo-ai/presets-components-models": "1.1.11",
|
|
35
|
+
"@wildo-ai/zod-decorators": "1.1.11"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"zod": "^4.3.6"
|