@jini-ai/cms 0.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/LICENSE +201 -0
- package/README.md +84 -0
- package/dist/content-types/agent-tools.d.ts +65 -0
- package/dist/content-types/agent-tools.d.ts.map +1 -0
- package/dist/content-types/agent-tools.js +172 -0
- package/dist/content-types/agent-tools.js.map +1 -0
- package/dist/content-types/cleanup.d.ts +118 -0
- package/dist/content-types/cleanup.d.ts.map +1 -0
- package/dist/content-types/cleanup.js +65 -0
- package/dist/content-types/cleanup.js.map +1 -0
- package/dist/content-types/errors.d.ts +90 -0
- package/dist/content-types/errors.d.ts.map +1 -0
- package/dist/content-types/errors.js +119 -0
- package/dist/content-types/errors.js.map +1 -0
- package/dist/content-types/field-defs.d.ts +25 -0
- package/dist/content-types/field-defs.d.ts.map +1 -0
- package/dist/content-types/field-defs.js +155 -0
- package/dist/content-types/field-defs.js.map +1 -0
- package/dist/content-types/index-provisioning.d.ts +94 -0
- package/dist/content-types/index-provisioning.d.ts.map +1 -0
- package/dist/content-types/index-provisioning.js +133 -0
- package/dist/content-types/index-provisioning.js.map +1 -0
- package/dist/content-types/index.d.ts +63 -0
- package/dist/content-types/index.d.ts.map +1 -0
- package/dist/content-types/index.js +36 -0
- package/dist/content-types/index.js.map +1 -0
- package/dist/content-types/lifecycle-dispatch.d.ts +38 -0
- package/dist/content-types/lifecycle-dispatch.d.ts.map +1 -0
- package/dist/content-types/lifecycle-dispatch.js +28 -0
- package/dist/content-types/lifecycle-dispatch.js.map +1 -0
- package/dist/content-types/lifecycle.d.ts +104 -0
- package/dist/content-types/lifecycle.d.ts.map +1 -0
- package/dist/content-types/lifecycle.js +143 -0
- package/dist/content-types/lifecycle.js.map +1 -0
- package/dist/content-types/list.d.ts +44 -0
- package/dist/content-types/list.d.ts.map +1 -0
- package/dist/content-types/list.js +13 -0
- package/dist/content-types/list.js.map +1 -0
- package/dist/content-types/repo.memory.d.ts +72 -0
- package/dist/content-types/repo.memory.d.ts.map +1 -0
- package/dist/content-types/repo.memory.js +71 -0
- package/dist/content-types/repo.memory.js.map +1 -0
- package/dist/content-types/tool-registrations.d.ts +65 -0
- package/dist/content-types/tool-registrations.d.ts.map +1 -0
- package/dist/content-types/tool-registrations.js +180 -0
- package/dist/content-types/tool-registrations.js.map +1 -0
- package/dist/content-types/types.d.ts +78 -0
- package/dist/content-types/types.d.ts.map +1 -0
- package/dist/content-types/types.js +32 -0
- package/dist/content-types/types.js.map +1 -0
- package/dist/content-types/write-service.d.ts +141 -0
- package/dist/content-types/write-service.d.ts.map +1 -0
- package/dist/content-types/write-service.js +180 -0
- package/dist/content-types/write-service.js.map +1 -0
- package/dist/core/commands/change-set.d.ts +98 -0
- package/dist/core/commands/change-set.d.ts.map +1 -0
- package/dist/core/commands/change-set.js +2 -0
- package/dist/core/commands/change-set.js.map +1 -0
- package/dist/core/commands/command.d.ts +168 -0
- package/dist/core/commands/command.d.ts.map +1 -0
- package/dist/core/commands/command.js +173 -0
- package/dist/core/commands/command.js.map +1 -0
- package/dist/core/index.d.ts +45 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +43 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/ports.d.ts +139 -0
- package/dist/core/ports.d.ts.map +1 -0
- package/dist/core/ports.js +2 -0
- package/dist/core/ports.js.map +1 -0
- package/dist/core/tools/registration-kit.d.ts +308 -0
- package/dist/core/tools/registration-kit.d.ts.map +1 -0
- package/dist/core/tools/registration-kit.js +381 -0
- package/dist/core/tools/registration-kit.js.map +1 -0
- package/dist/entries/agent-tools.d.ts +78 -0
- package/dist/entries/agent-tools.d.ts.map +1 -0
- package/dist/entries/agent-tools.js +158 -0
- package/dist/entries/agent-tools.js.map +1 -0
- package/dist/entries/errors.d.ts +43 -0
- package/dist/entries/errors.d.ts.map +1 -0
- package/dist/entries/errors.js +59 -0
- package/dist/entries/errors.js.map +1 -0
- package/dist/entries/field-validation.d.ts +70 -0
- package/dist/entries/field-validation.d.ts.map +1 -0
- package/dist/entries/field-validation.js +87 -0
- package/dist/entries/field-validation.js.map +1 -0
- package/dist/entries/index.d.ts +55 -0
- package/dist/entries/index.d.ts.map +1 -0
- package/dist/entries/index.js +38 -0
- package/dist/entries/index.js.map +1 -0
- package/dist/entries/lifecycle-dispatch.d.ts +15 -0
- package/dist/entries/lifecycle-dispatch.d.ts.map +1 -0
- package/dist/entries/lifecycle-dispatch.js +16 -0
- package/dist/entries/lifecycle-dispatch.js.map +1 -0
- package/dist/entries/list.d.ts +47 -0
- package/dist/entries/list.d.ts.map +1 -0
- package/dist/entries/list.js +12 -0
- package/dist/entries/list.js.map +1 -0
- package/dist/entries/repo.memory.d.ts +64 -0
- package/dist/entries/repo.memory.d.ts.map +1 -0
- package/dist/entries/repo.memory.js +73 -0
- package/dist/entries/repo.memory.js.map +1 -0
- package/dist/entries/tool-registrations.d.ts +52 -0
- package/dist/entries/tool-registrations.d.ts.map +1 -0
- package/dist/entries/tool-registrations.js +141 -0
- package/dist/entries/tool-registrations.js.map +1 -0
- package/dist/entries/types.d.ts +55 -0
- package/dist/entries/types.d.ts.map +1 -0
- package/dist/entries/types.js +2 -0
- package/dist/entries/types.js.map +1 -0
- package/dist/entries/write-service.d.ts +202 -0
- package/dist/entries/write-service.d.ts.map +1 -0
- package/dist/entries/write-service.js +204 -0
- package/dist/entries/write-service.js.map +1 -0
- package/dist/identity/admin-crud-service.d.ts +252 -0
- package/dist/identity/admin-crud-service.d.ts.map +1 -0
- package/dist/identity/admin-crud-service.js +437 -0
- package/dist/identity/admin-crud-service.js.map +1 -0
- package/dist/identity/agent-tool-input.d.ts +58 -0
- package/dist/identity/agent-tool-input.d.ts.map +1 -0
- package/dist/identity/agent-tool-input.js +126 -0
- package/dist/identity/agent-tool-input.js.map +1 -0
- package/dist/identity/agent-tools.d.ts +101 -0
- package/dist/identity/agent-tools.d.ts.map +1 -0
- package/dist/identity/agent-tools.js +290 -0
- package/dist/identity/agent-tools.js.map +1 -0
- package/dist/identity/auth-service.d.ts +87 -0
- package/dist/identity/auth-service.d.ts.map +1 -0
- package/dist/identity/auth-service.js +141 -0
- package/dist/identity/auth-service.js.map +1 -0
- package/dist/identity/authorize.d.ts +90 -0
- package/dist/identity/authorize.d.ts.map +1 -0
- package/dist/identity/authorize.js +94 -0
- package/dist/identity/authorize.js.map +1 -0
- package/dist/identity/grant-service.d.ts +198 -0
- package/dist/identity/grant-service.d.ts.map +1 -0
- package/dist/identity/grant-service.js +361 -0
- package/dist/identity/grant-service.js.map +1 -0
- package/dist/identity/hasher.d.ts +39 -0
- package/dist/identity/hasher.d.ts.map +1 -0
- package/dist/identity/hasher.js +39 -0
- package/dist/identity/hasher.js.map +1 -0
- package/dist/identity/index.d.ts +59 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +51 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/identity/password-policy.d.ts +58 -0
- package/dist/identity/password-policy.d.ts.map +1 -0
- package/dist/identity/password-policy.js +67 -0
- package/dist/identity/password-policy.js.map +1 -0
- package/dist/identity/permission-migrations.d.ts +86 -0
- package/dist/identity/permission-migrations.d.ts.map +1 -0
- package/dist/identity/permission-migrations.js +67 -0
- package/dist/identity/permission-migrations.js.map +1 -0
- package/dist/identity/permissions.d.ts +35 -0
- package/dist/identity/permissions.d.ts.map +1 -0
- package/dist/identity/permissions.js +603 -0
- package/dist/identity/permissions.js.map +1 -0
- package/dist/identity/ports.d.ts +201 -0
- package/dist/identity/ports.d.ts.map +1 -0
- package/dist/identity/ports.js +2 -0
- package/dist/identity/ports.js.map +1 -0
- package/dist/identity/repo.memory.d.ts +164 -0
- package/dist/identity/repo.memory.d.ts.map +1 -0
- package/dist/identity/repo.memory.js +224 -0
- package/dist/identity/repo.memory.js.map +1 -0
- package/dist/identity/seed.d.ts +42 -0
- package/dist/identity/seed.d.ts.map +1 -0
- package/dist/identity/seed.js +277 -0
- package/dist/identity/seed.js.map +1 -0
- package/dist/identity/tool-registrations.d.ts +50 -0
- package/dist/identity/tool-registrations.d.ts.map +1 -0
- package/dist/identity/tool-registrations.js +419 -0
- package/dist/identity/tool-registrations.js.map +1 -0
- package/dist/identity/types.d.ts +185 -0
- package/dist/identity/types.d.ts.map +1 -0
- package/dist/identity/types.js +64 -0
- package/dist/identity/types.js.map +1 -0
- package/dist/identity/username.d.ts +12 -0
- package/dist/identity/username.d.ts.map +1 -0
- package/dist/identity/username.js +14 -0
- package/dist/identity/username.js.map +1 -0
- package/dist/media/agent-tools.d.ts +66 -0
- package/dist/media/agent-tools.d.ts.map +1 -0
- package/dist/media/agent-tools.js +131 -0
- package/dist/media/agent-tools.js.map +1 -0
- package/dist/media/blob-gc-lock.d.ts +37 -0
- package/dist/media/blob-gc-lock.d.ts.map +1 -0
- package/dist/media/blob-gc-lock.js +55 -0
- package/dist/media/blob-gc-lock.js.map +1 -0
- package/dist/media/blob-gc.d.ts +246 -0
- package/dist/media/blob-gc.d.ts.map +1 -0
- package/dist/media/blob-gc.js +254 -0
- package/dist/media/blob-gc.js.map +1 -0
- package/dist/media/blob-key.d.ts +28 -0
- package/dist/media/blob-key.d.ts.map +1 -0
- package/dist/media/blob-key.js +11 -0
- package/dist/media/blob-key.js.map +1 -0
- package/dist/media/blob-store.fs.d.ts +23 -0
- package/dist/media/blob-store.fs.d.ts.map +1 -0
- package/dist/media/blob-store.fs.js +48 -0
- package/dist/media/blob-store.fs.js.map +1 -0
- package/dist/media/blob-store.memory.d.ts +22 -0
- package/dist/media/blob-store.memory.d.ts.map +1 -0
- package/dist/media/blob-store.memory.js +23 -0
- package/dist/media/blob-store.memory.js.map +1 -0
- package/dist/media/content-type-sniffer.d.ts +49 -0
- package/dist/media/content-type-sniffer.d.ts.map +1 -0
- package/dist/media/content-type-sniffer.js +141 -0
- package/dist/media/content-type-sniffer.js.map +1 -0
- package/dist/media/image-transformer.d.ts +45 -0
- package/dist/media/image-transformer.d.ts.map +1 -0
- package/dist/media/image-transformer.js +23 -0
- package/dist/media/image-transformer.js.map +1 -0
- package/dist/media/image-transformer.sharp.d.ts +26 -0
- package/dist/media/image-transformer.sharp.d.ts.map +1 -0
- package/dist/media/image-transformer.sharp.js +91 -0
- package/dist/media/image-transformer.sharp.js.map +1 -0
- package/dist/media/index.d.ts +43 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +31 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/media-service.d.ts +244 -0
- package/dist/media/media-service.d.ts.map +1 -0
- package/dist/media/media-service.js +345 -0
- package/dist/media/media-service.js.map +1 -0
- package/dist/media/ports.d.ts +142 -0
- package/dist/media/ports.d.ts.map +1 -0
- package/dist/media/ports.js +2 -0
- package/dist/media/ports.js.map +1 -0
- package/dist/media/rendition-service.d.ts +66 -0
- package/dist/media/rendition-service.d.ts.map +1 -0
- package/dist/media/rendition-service.js +135 -0
- package/dist/media/rendition-service.js.map +1 -0
- package/dist/media/repo.memory.d.ts +107 -0
- package/dist/media/repo.memory.d.ts.map +1 -0
- package/dist/media/repo.memory.js +131 -0
- package/dist/media/repo.memory.js.map +1 -0
- package/dist/media/tool-registrations.d.ts +42 -0
- package/dist/media/tool-registrations.d.ts.map +1 -0
- package/dist/media/tool-registrations.js +121 -0
- package/dist/media/tool-registrations.js.map +1 -0
- package/dist/media/transform-lock.d.ts +36 -0
- package/dist/media/transform-lock.d.ts.map +1 -0
- package/dist/media/transform-lock.js +50 -0
- package/dist/media/transform-lock.js.map +1 -0
- package/dist/media/transform-registry.d.ts +103 -0
- package/dist/media/transform-registry.d.ts.map +1 -0
- package/dist/media/transform-registry.js +87 -0
- package/dist/media/transform-registry.js.map +1 -0
- package/dist/media/transform-types.d.ts +82 -0
- package/dist/media/transform-types.d.ts.map +1 -0
- package/dist/media/transform-types.js +47 -0
- package/dist/media/transform-types.js.map +1 -0
- package/dist/media/types.d.ts +150 -0
- package/dist/media/types.d.ts.map +1 -0
- package/dist/media/types.js +26 -0
- package/dist/media/types.js.map +1 -0
- package/dist/navigation/agent-tools.d.ts +90 -0
- package/dist/navigation/agent-tools.d.ts.map +1 -0
- package/dist/navigation/agent-tools.js +225 -0
- package/dist/navigation/agent-tools.js.map +1 -0
- package/dist/navigation/contracts.d.ts +98 -0
- package/dist/navigation/contracts.d.ts.map +1 -0
- package/dist/navigation/contracts.js +70 -0
- package/dist/navigation/contracts.js.map +1 -0
- package/dist/navigation/index.d.ts +39 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +30 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/menu-service.d.ts +256 -0
- package/dist/navigation/menu-service.d.ts.map +1 -0
- package/dist/navigation/menu-service.js +382 -0
- package/dist/navigation/menu-service.js.map +1 -0
- package/dist/navigation/ports.d.ts +147 -0
- package/dist/navigation/ports.d.ts.map +1 -0
- package/dist/navigation/ports.js +2 -0
- package/dist/navigation/ports.js.map +1 -0
- package/dist/navigation/read-model.d.ts +11 -0
- package/dist/navigation/read-model.d.ts.map +1 -0
- package/dist/navigation/read-model.js +27 -0
- package/dist/navigation/read-model.js.map +1 -0
- package/dist/navigation/reconcile.d.ts +57 -0
- package/dist/navigation/reconcile.d.ts.map +1 -0
- package/dist/navigation/reconcile.js +33 -0
- package/dist/navigation/reconcile.js.map +1 -0
- package/dist/navigation/repo.memory.d.ts +137 -0
- package/dist/navigation/repo.memory.d.ts.map +1 -0
- package/dist/navigation/repo.memory.js +95 -0
- package/dist/navigation/repo.memory.js.map +1 -0
- package/dist/navigation/resolver.d.ts +110 -0
- package/dist/navigation/resolver.d.ts.map +1 -0
- package/dist/navigation/resolver.js +131 -0
- package/dist/navigation/resolver.js.map +1 -0
- package/dist/navigation/tool-registrations.d.ts +43 -0
- package/dist/navigation/tool-registrations.d.ts.map +1 -0
- package/dist/navigation/tool-registrations.js +126 -0
- package/dist/navigation/tool-registrations.js.map +1 -0
- package/dist/navigation/types.d.ts +207 -0
- package/dist/navigation/types.d.ts.map +1 -0
- package/dist/navigation/types.js +14 -0
- package/dist/navigation/types.js.map +1 -0
- package/dist/presentation/index.d.ts +15 -0
- package/dist/presentation/index.d.ts.map +1 -0
- package/dist/presentation/index.js +15 -0
- package/dist/presentation/index.js.map +1 -0
- package/dist/presentation/presentation.d.ts +72 -0
- package/dist/presentation/presentation.d.ts.map +1 -0
- package/dist/presentation/presentation.js +51 -0
- package/dist/presentation/presentation.js.map +1 -0
- package/dist/presentation/repo.memory.d.ts +9 -0
- package/dist/presentation/repo.memory.d.ts.map +1 -0
- package/dist/presentation/repo.memory.js +21 -0
- package/dist/presentation/repo.memory.js.map +1 -0
- package/dist/server/index.d.ts +28 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +28 -0
- package/dist/server/index.js.map +1 -0
- package/dist/settings/agent-tools.d.ts +83 -0
- package/dist/settings/agent-tools.d.ts.map +1 -0
- package/dist/settings/agent-tools.js +200 -0
- package/dist/settings/agent-tools.js.map +1 -0
- package/dist/settings/agent-writable-preferences.d.ts +67 -0
- package/dist/settings/agent-writable-preferences.d.ts.map +1 -0
- package/dist/settings/agent-writable-preferences.js +144 -0
- package/dist/settings/agent-writable-preferences.js.map +1 -0
- package/dist/settings/change-feed.d.ts +74 -0
- package/dist/settings/change-feed.d.ts.map +1 -0
- package/dist/settings/change-feed.js +61 -0
- package/dist/settings/change-feed.js.map +1 -0
- package/dist/settings/definitions-dispatch.d.ts +51 -0
- package/dist/settings/definitions-dispatch.d.ts.map +1 -0
- package/dist/settings/definitions-dispatch.js +86 -0
- package/dist/settings/definitions-dispatch.js.map +1 -0
- package/dist/settings/dictionaries/index.d.ts +45 -0
- package/dist/settings/dictionaries/index.d.ts.map +1 -0
- package/dist/settings/dictionaries/index.js +69 -0
- package/dist/settings/dictionaries/index.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ar.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.ar.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ar.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.ar.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.bn.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.bn.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.bn.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.bn.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.de.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.de.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.de.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.de.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.es.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.es.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.es.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.es.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.fa.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.fa.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.fa.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.fa.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.fr.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.fr.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.fr.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.fr.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.hi.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.hi.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.hi.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.hi.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.hu.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.hu.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.hu.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.hu.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.id.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.id.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.id.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.id.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.it.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.it.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.it.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.it.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ja.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.ja.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ja.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.ja.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ko.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.ko.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ko.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.ko.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.pl.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.pl.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.pl.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.pl.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.pt-BR.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.pt-BR.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.pt-BR.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.pt-BR.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ru.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.ru.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ru.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.ru.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.th.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.th.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.th.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.th.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.tr.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.tr.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.tr.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.tr.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.uk.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.uk.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.uk.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.uk.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ur.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.ur.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.ur.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.ur.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.zh-CN.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.zh-CN.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.zh-CN.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.zh-CN.js.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.zh-TW.d.ts +3 -0
- package/dist/settings/dictionaries/settings-dialog.zh-TW.d.ts.map +1 -0
- package/dist/settings/dictionaries/settings-dialog.zh-TW.js +28 -0
- package/dist/settings/dictionaries/settings-dialog.zh-TW.js.map +1 -0
- package/dist/settings/ensure-definitions.d.ts +88 -0
- package/dist/settings/ensure-definitions.d.ts.map +1 -0
- package/dist/settings/ensure-definitions.js +91 -0
- package/dist/settings/ensure-definitions.js.map +1 -0
- package/dist/settings/errors.d.ts +36 -0
- package/dist/settings/errors.d.ts.map +1 -0
- package/dist/settings/errors.js +40 -0
- package/dist/settings/errors.js.map +1 -0
- package/dist/settings/index.d.ts +37 -0
- package/dist/settings/index.d.ts.map +1 -0
- package/dist/settings/index.js +36 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/settings/ports.d.ts +117 -0
- package/dist/settings/ports.d.ts.map +1 -0
- package/dist/settings/ports.js +2 -0
- package/dist/settings/ports.js.map +1 -0
- package/dist/settings/purge-service.d.ts +53 -0
- package/dist/settings/purge-service.d.ts.map +1 -0
- package/dist/settings/purge-service.js +105 -0
- package/dist/settings/purge-service.js.map +1 -0
- package/dist/settings/repo.memory.d.ts +119 -0
- package/dist/settings/repo.memory.d.ts.map +1 -0
- package/dist/settings/repo.memory.js +199 -0
- package/dist/settings/repo.memory.js.map +1 -0
- package/dist/settings/settings.d.ts +124 -0
- package/dist/settings/settings.d.ts.map +1 -0
- package/dist/settings/settings.js +238 -0
- package/dist/settings/settings.js.map +1 -0
- package/dist/settings/tool-registrations.d.ts +56 -0
- package/dist/settings/tool-registrations.d.ts.map +1 -0
- package/dist/settings/tool-registrations.js +240 -0
- package/dist/settings/tool-registrations.js.map +1 -0
- package/dist/settings/types.d.ts +125 -0
- package/dist/settings/types.d.ts.map +1 -0
- package/dist/settings/types.js +3 -0
- package/dist/settings/types.js.map +1 -0
- package/dist/settings/ui-tab-definitions.d.ts +41 -0
- package/dist/settings/ui-tab-definitions.d.ts.map +1 -0
- package/dist/settings/ui-tab-definitions.js +148 -0
- package/dist/settings/ui-tab-definitions.js.map +1 -0
- package/dist/settings/write-service.d.ts +314 -0
- package/dist/settings/write-service.d.ts.map +1 -0
- package/dist/settings/write-service.js +677 -0
- package/dist/settings/write-service.js.map +1 -0
- package/dist/taxonomy/agent-tools.d.ts +76 -0
- package/dist/taxonomy/agent-tools.d.ts.map +1 -0
- package/dist/taxonomy/agent-tools.js +178 -0
- package/dist/taxonomy/agent-tools.js.map +1 -0
- package/dist/taxonomy/content-lookup.d.ts +45 -0
- package/dist/taxonomy/content-lookup.d.ts.map +1 -0
- package/dist/taxonomy/content-lookup.js +9 -0
- package/dist/taxonomy/content-lookup.js.map +1 -0
- package/dist/taxonomy/index.d.ts +38 -0
- package/dist/taxonomy/index.d.ts.map +1 -0
- package/dist/taxonomy/index.js +38 -0
- package/dist/taxonomy/index.js.map +1 -0
- package/dist/taxonomy/list.d.ts +39 -0
- package/dist/taxonomy/list.d.ts.map +1 -0
- package/dist/taxonomy/list.js +19 -0
- package/dist/taxonomy/list.js.map +1 -0
- package/dist/taxonomy/merge-term.d.ts +94 -0
- package/dist/taxonomy/merge-term.d.ts.map +1 -0
- package/dist/taxonomy/merge-term.js +65 -0
- package/dist/taxonomy/merge-term.js.map +1 -0
- package/dist/taxonomy/repo.memory.d.ts +160 -0
- package/dist/taxonomy/repo.memory.d.ts.map +1 -0
- package/dist/taxonomy/repo.memory.js +171 -0
- package/dist/taxonomy/repo.memory.js.map +1 -0
- package/dist/taxonomy/validation-chain.d.ts +114 -0
- package/dist/taxonomy/validation-chain.d.ts.map +1 -0
- package/dist/taxonomy/validation-chain.js +152 -0
- package/dist/taxonomy/validation-chain.js.map +1 -0
- package/dist/taxonomy/write-service.d.ts +387 -0
- package/dist/taxonomy/write-service.d.ts.map +1 -0
- package/dist/taxonomy/write-service.js +350 -0
- package/dist/taxonomy/write-service.js.map +1 -0
- package/dist/workspace/agent-tools.d.ts +67 -0
- package/dist/workspace/agent-tools.d.ts.map +1 -0
- package/dist/workspace/agent-tools.js +103 -0
- package/dist/workspace/agent-tools.js.map +1 -0
- package/dist/workspace/create.d.ts +116 -0
- package/dist/workspace/create.d.ts.map +1 -0
- package/dist/workspace/create.js +69 -0
- package/dist/workspace/create.js.map +1 -0
- package/dist/workspace/delete.d.ts +50 -0
- package/dist/workspace/delete.d.ts.map +1 -0
- package/dist/workspace/delete.js +24 -0
- package/dist/workspace/delete.js.map +1 -0
- package/dist/workspace/index.d.ts +27 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +27 -0
- package/dist/workspace/index.js.map +1 -0
- package/dist/workspace/repo.memory.d.ts +34 -0
- package/dist/workspace/repo.memory.d.ts.map +1 -0
- package/dist/workspace/repo.memory.js +50 -0
- package/dist/workspace/repo.memory.js.map +1 -0
- package/dist/workspace/tool-registrations.d.ts +38 -0
- package/dist/workspace/tool-registrations.d.ts.map +1 -0
- package/dist/workspace/tool-registrations.js +71 -0
- package/dist/workspace/tool-registrations.js.map +1 -0
- package/dist/workspace/update.d.ts +52 -0
- package/dist/workspace/update.d.ts.map +1 -0
- package/dist/workspace/update.js +41 -0
- package/dist/workspace/update.js.map +1 -0
- package/package.json +149 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Domain types + typed errors for the `media` library.
|
|
3
|
+
*
|
|
4
|
+
* Purpose:
|
|
5
|
+
* `MediaRecord` is the editorial half of a media asset; `AssetBlobRecord` and
|
|
6
|
+
* `AssetRenditionRecord` are the two core-owned operational sidecars the
|
|
7
|
+
* original design specifies.
|
|
8
|
+
*
|
|
9
|
+
* SCOPE NOTE (disclosed, not a silent deviation): the original design describes media as a
|
|
10
|
+
* seeded `entries` content-type entry — editorial fields live under
|
|
11
|
+
* `bodyJson.$.source`/`fields.ext.media.*` on a generic entry row, with
|
|
12
|
+
* revisions/taxonomy/`entry_refs` for free. That generic `entries` model does
|
|
13
|
+
* not exist as running code in the host that first built this yet (it is
|
|
14
|
+
* accepted design only; `post` itself is still a bespoke first-class table,
|
|
15
|
+
* not a generic entry). `MediaRecord` below is therefore built the same way a
|
|
16
|
+
* bespoke `post`-style record is built: a bespoke record with its editorial
|
|
17
|
+
* fields inlined directly. When a generic entries system ships, `media`
|
|
18
|
+
* should migrate onto it the same way `post` eventually will — this file is
|
|
19
|
+
* not a competing permanent design, it is that pattern applied to media.
|
|
20
|
+
*
|
|
21
|
+
* The two sidecars (`AssetBlobRecord`, `AssetRenditionRecord`) ARE built as
|
|
22
|
+
* the original design describes — they were always meant to be core-owned tables
|
|
23
|
+
* independent of the entries model, so no scope adjustment was needed there.
|
|
24
|
+
*/
|
|
25
|
+
import type { ISODateTime, UUID } from "../core/ports.js";
|
|
26
|
+
/** Deletion ladder status (mirrored from `navigation`'s menu ladder). */
|
|
27
|
+
export type MediaStatus = "active" | "trashed";
|
|
28
|
+
/**
|
|
29
|
+
* Write-once source binding — the edge from a media record to its bytes.
|
|
30
|
+
* "Settable-once-from-absent" (absent -> set exactly once, then
|
|
31
|
+
* immutable). In this bespoke-table build every `MediaRecord` gets its
|
|
32
|
+
* `source` set at creation time by `uploadMedia` (never a row without bytes),
|
|
33
|
+
* so in practice the absent state is transient/internal
|
|
34
|
+
* to `uploadMedia`, not something the write-once guard needs to police at the
|
|
35
|
+
* repo/API boundary. The guard exists anyway (`assertSourceUnchanged` in
|
|
36
|
+
* `media-service.ts`) as the enforced invariant for any future write path.
|
|
37
|
+
*/
|
|
38
|
+
export interface MediaSource {
|
|
39
|
+
sha256: string;
|
|
40
|
+
}
|
|
41
|
+
export interface MediaRecord {
|
|
42
|
+
id: UUID;
|
|
43
|
+
workspaceId: UUID;
|
|
44
|
+
title: string;
|
|
45
|
+
alt: string;
|
|
46
|
+
caption: string;
|
|
47
|
+
credit: string;
|
|
48
|
+
/** Write-once (see {@link MediaSource} doc). Always set by the time a row exists. */
|
|
49
|
+
source: MediaSource;
|
|
50
|
+
status: MediaStatus;
|
|
51
|
+
createdAt: ISODateTime;
|
|
52
|
+
updatedAt: ISODateTime;
|
|
53
|
+
version: number;
|
|
54
|
+
/**
|
|
55
|
+
* Quick-and-dirty public-render sizing fields (owner-directed skip-the-ADR fix — "should we have
|
|
56
|
+
* more lines on the upload/edit media page for css tags and height and width?"). An operator-set
|
|
57
|
+
* per-asset override the public site's renderer threads onto the `<img>` tag so an inserted image
|
|
58
|
+
* stops rendering at full native pixel width with nothing constraining it. `null` means "not set"
|
|
59
|
+
* — a host renderer must omit the corresponding attribute entirely rather than emit `width="null"`
|
|
60
|
+
* or coerce to `0`. Always present (never `undefined`) so every existing `MediaRecord` construction
|
|
61
|
+
* site is forced to make an explicit choice; `uploadMedia` defaults all three to `null`.
|
|
62
|
+
*/
|
|
63
|
+
width: number | null;
|
|
64
|
+
height: number | null;
|
|
65
|
+
cssClass: string | null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Blob-GC lifecycle status (INV-1's two-phase journaled protocol,
|
|
69
|
+
* implemented in `blob-gc.ts`). `active` — has at least one live reference as
|
|
70
|
+
* of the last check (or has never been checked). `tombstoned` — the
|
|
71
|
+
* tombstone-pass found it unreferenced and is waiting out `gc_grace` before
|
|
72
|
+
* the delete-pass may remove the row; a dedup upload observing `tombstoned`
|
|
73
|
+
* resurrects it back to `active` in the same locked section instead of
|
|
74
|
+
* writing a duplicate blob.
|
|
75
|
+
*/
|
|
76
|
+
export type AssetBlobStatus = "active" | "tombstoned";
|
|
77
|
+
/**
|
|
78
|
+
* `asset_blobs` sidecar: physical bytes metadata. Identity is
|
|
79
|
+
* `(workspaceId, sha256)` — dedup is per-workspace, no cross-tenant byte
|
|
80
|
+
* sharing.
|
|
81
|
+
*/
|
|
82
|
+
export interface AssetBlobRecord {
|
|
83
|
+
id: UUID;
|
|
84
|
+
workspaceId: UUID;
|
|
85
|
+
sha256: string;
|
|
86
|
+
storageKey: string;
|
|
87
|
+
/** Required attribution (machine writes still stamp a principal). */
|
|
88
|
+
createdByPrincipal: string;
|
|
89
|
+
createdAt: ISODateTime;
|
|
90
|
+
/** See {@link AssetBlobStatus}. Always `"active"` for a freshly written blob. */
|
|
91
|
+
status: AssetBlobStatus;
|
|
92
|
+
/** Set only while `status === "tombstoned"`; cleared (undefined) on resurrect. */
|
|
93
|
+
tombstonedAt?: ISODateTime | undefined;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* `blob_gc_journal` sidecar (INV-1's two-phase protocol,
|
|
97
|
+
* `blob-gc.ts`): written by the delete-pass in the same locked step as the
|
|
98
|
+
* `asset_blobs` row deletion, drained by the unlink-pass. This is what makes
|
|
99
|
+
* the unlink crash-safe/retriable instead of "delete row, hope the unlink
|
|
100
|
+
* happens" — a journal entry surviving between the two passes is the seam a
|
|
101
|
+
* crash-recovery sweep would resume from. (This build's journal is an
|
|
102
|
+
* in-memory table like every other `media` repo in this pass — it does not
|
|
103
|
+
* survive a process restart; see `repo.memory.ts` file header for the
|
|
104
|
+
* standing disclosed precedent.)
|
|
105
|
+
*/
|
|
106
|
+
export interface BlobGcJournalEntry {
|
|
107
|
+
id: UUID;
|
|
108
|
+
workspaceId: UUID;
|
|
109
|
+
sha256: string;
|
|
110
|
+
storageKey: string;
|
|
111
|
+
journaledAt: ISODateTime;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* `asset_renditions` sidecar: derived variants. This build has no
|
|
115
|
+
* real transform pipeline (deferred — see `media-service.ts` file header); the
|
|
116
|
+
* only rendition ever created is the trivial "original" passthrough written by
|
|
117
|
+
* `uploadMedia`.
|
|
118
|
+
*/
|
|
119
|
+
export interface AssetRenditionRecord {
|
|
120
|
+
id: UUID;
|
|
121
|
+
workspaceId: UUID;
|
|
122
|
+
assetId: UUID;
|
|
123
|
+
transformName: string;
|
|
124
|
+
version: number;
|
|
125
|
+
storageKey: string;
|
|
126
|
+
createdAt: ISODateTime;
|
|
127
|
+
}
|
|
128
|
+
export declare class MediaNotFoundError extends Error {
|
|
129
|
+
}
|
|
130
|
+
export declare class MediaValidationError extends Error {
|
|
131
|
+
}
|
|
132
|
+
export declare class MediaConflictError extends Error {
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* The write-once source guard rejected an attempt to change an
|
|
136
|
+
* already-set `source.sha256` ("settable-once-from-absent").
|
|
137
|
+
*/
|
|
138
|
+
export declare class MediaSourceImmutableError extends MediaValidationError {
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The 409-style purge rejection (deletion ladder, mirrors
|
|
142
|
+
* `MenuLocationBoundError`). `referencing` is a human-readable stand-in list —
|
|
143
|
+
* see `media-service.ts` file header for the disclosed simplification (no real
|
|
144
|
+
* `entry_refs` where-used index exists yet).
|
|
145
|
+
*/
|
|
146
|
+
export declare class MediaStillReferencedError extends MediaConflictError {
|
|
147
|
+
readonly referencing: readonly string[];
|
|
148
|
+
constructor(message: string, referencing: readonly string[]);
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/media/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE1D,yEAAyE;AACzE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,IAAI,CAAC;IACT,WAAW,EAAE,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,qFAAqF;IACrF,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,IAAI,CAAC;IACT,WAAW,EAAE,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;IACvB,iFAAiF;IACjF,MAAM,EAAE,eAAe,CAAC;IACxB,kFAAkF;IAClF,YAAY,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACxC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,IAAI,CAAC;IACT,WAAW,EAAE,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,IAAI,CAAC;IACT,WAAW,EAAE,IAAI,CAAC;IAClB,OAAO,EAAE,IAAI,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,WAAW,CAAC;CACxB;AAED,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAChD,qBAAa,oBAAqB,SAAQ,KAAK;CAAG;AAClD,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAEhD;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,oBAAoB;CAAG;AAEtE;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,kBAAkB;IAC/D,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;gBAE5B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,MAAM,EAAE;CAI5D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class MediaNotFoundError extends Error {
|
|
2
|
+
}
|
|
3
|
+
export class MediaValidationError extends Error {
|
|
4
|
+
}
|
|
5
|
+
export class MediaConflictError extends Error {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The write-once source guard rejected an attempt to change an
|
|
9
|
+
* already-set `source.sha256` ("settable-once-from-absent").
|
|
10
|
+
*/
|
|
11
|
+
export class MediaSourceImmutableError extends MediaValidationError {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The 409-style purge rejection (deletion ladder, mirrors
|
|
15
|
+
* `MenuLocationBoundError`). `referencing` is a human-readable stand-in list —
|
|
16
|
+
* see `media-service.ts` file header for the disclosed simplification (no real
|
|
17
|
+
* `entry_refs` where-used index exists yet).
|
|
18
|
+
*/
|
|
19
|
+
export class MediaStillReferencedError extends MediaConflictError {
|
|
20
|
+
referencing;
|
|
21
|
+
constructor(message, referencing) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.referencing = referencing;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/media/types.ts"],"names":[],"mappings":"AAuIA,MAAM,OAAO,kBAAmB,SAAQ,KAAK;CAAG;AAChD,MAAM,OAAO,oBAAqB,SAAQ,KAAK;CAAG;AAClD,MAAM,OAAO,kBAAmB,SAAQ,KAAK;CAAG;AAEhD;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,oBAAoB;CAAG;AAEtE;;;;;GAKG;AACH,MAAM,OAAO,yBAA0B,SAAQ,kBAAkB;IACtD,WAAW,CAAoB;IAExC,YAAY,OAAe,EAAE,WAA8B;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The Navigation (Menus) agent-tool catalog — this domain's instance of the
|
|
3
|
+
* per-domain `agent-tools.ts` convention `forms/agent-tools.ts` and `identity/agent-tools.ts`
|
|
4
|
+
* already use.
|
|
5
|
+
*
|
|
6
|
+
* Purpose:
|
|
7
|
+
* A static, in-process catalog describing every agent-callable tool this domain exposes and the
|
|
8
|
+
* permission each carries. Every entry maps 1:1 onto a real exported function of
|
|
9
|
+
* `navigation/menu-service.ts` (plus two pure reads over `MenuRepoPort`) — this catalog never names
|
|
10
|
+
* an operation the domain cannot perform.
|
|
11
|
+
*
|
|
12
|
+
* Precedent already in this library: `navigation/contracts.ts` declares `NAVIGATION_AI_TOOLS` — a
|
|
13
|
+
* design-note list of an intended future AI tool surface (`navigation.search`/`.get`/`.where_used`/
|
|
14
|
+
* `.update`/`.assign`) for a DIFFERENT, not-yet-built delivery mechanism (a "change-set review
|
|
15
|
+
* layer" HITL gateway; the list itself is unused anywhere in this build today). Two of its five
|
|
16
|
+
* names do not correspond to any real, callable capability in this build: `navigation.search` has
|
|
17
|
+
* no implementation beyond `MenuRepoPort.list` (folded into `menus_list_menus` below — there is no
|
|
18
|
+
* separate text-search capability, matching how `identity_user_list`/`identity_role_list` are
|
|
19
|
+
* likewise this library's "search" for their own domains), and `navigation.where_used` has no
|
|
20
|
+
* implementation anywhere (`NavWhereUsedResult` is declared in `contracts.ts` but no function in
|
|
21
|
+
* `navigation/` computes it — `entry_refs`-backed where-used, unlike `widgets`/`media`, was never
|
|
22
|
+
* built for menus). Wrapping either literally would invent backend capability this catalog's own
|
|
23
|
+
* discipline forbids; `menus_list_menus` + `menus_get_menu` are this build's honest equivalents of
|
|
24
|
+
* "search"/"get".
|
|
25
|
+
*
|
|
26
|
+
* Deliberate absence (the point of a catalog, not an oversight):
|
|
27
|
+
* - There is NO `menus_delete_menu` (nor a separate trash-only tool). `deleteMenu` is ONE function
|
|
28
|
+
* that performs BOTH steps of the deletion ladder, keyed off the menu's CURRENT status:
|
|
29
|
+
* a first call trashes (safe, unconditional), but a second call against an already-trashed menu
|
|
30
|
+
* PURGES it — a hard, irreversible delete, blocked only by a still-bound-location guard that
|
|
31
|
+
* itself can be bypassed with `force` (gated behind the separate `admin.menus.delete.force`
|
|
32
|
+
* permission). Unlike `widgets`/`media` (which expose trash and purge as two SEPARATE domain
|
|
33
|
+
* functions, letting a catalog safely wire trash alone), navigation has no decomposed trash-only
|
|
34
|
+
* entrypoint to call — the very same tool call, made twice, silently escalates from a reversible
|
|
35
|
+
* soft-delete into a permanent one. That is exactly the shape of risk `identity/agent-tools.ts`
|
|
36
|
+
* excludes `resetUserPassword` for: a single lever whose second pull does something categorically
|
|
37
|
+
* more dangerous than its first, reachable by an agent re-invoking a tool it already called once
|
|
38
|
+
* (e.g. after losing track of a prior call, or via prompt injection through ordinary operator
|
|
39
|
+
* content). Left human-UI-only.
|
|
40
|
+
*
|
|
41
|
+
* How it relates to the project:
|
|
42
|
+
* A host's own tool-registration layer maps these entries into `ToolRegistration`s (see
|
|
43
|
+
* `tool-registrations.ts`). Unlike Forms/Identity/Widgets, `menu-service.ts`'s functions perform NO
|
|
44
|
+
* internal `authorize()` call of their own (confirmed: `CreateMenuDeps`/`UpdateMenuTreeDeps`/
|
|
45
|
+
* `AssignLocationDeps` carry no `authorize` field) — every admin HTTP route a host builds is expected
|
|
46
|
+
* to check `deps.authorize(...)` inline, before calling the service function (mirrors `media`'s
|
|
47
|
+
* identical gap, see `media/agent-tools.ts`'s header). `tool-registrations.ts` therefore performs
|
|
48
|
+
* that SAME inline `authorize()` call itself (the identical permission string and `entityType:
|
|
49
|
+
* "menu"` the HTTP route uses) rather than relying on a domain-layer gate that does not exist for
|
|
50
|
+
* this library.
|
|
51
|
+
*
|
|
52
|
+
* Architectural role:
|
|
53
|
+
* `navigation` domain declaration. Imports only `VALID_TARGET_KINDS`-equivalent constants are not
|
|
54
|
+
* exported from `menu-service.ts` as public data (the target-kind allowlist is enforced, not
|
|
55
|
+
* published, there), so the target schema below is hand-authored against `types.ts`'s `NavTarget`
|
|
56
|
+
* union and cross-checked by this catalog's own contract test rather than imported.
|
|
57
|
+
*/
|
|
58
|
+
export type AgentToolSideEffect = "none" | "mutates-durable-state" | "mints-token";
|
|
59
|
+
export type AgentToolActorClassRule = "confirmer-must-equal-own-delegatedBy" | "user-only" | "none";
|
|
60
|
+
export interface AgentToolDefinition {
|
|
61
|
+
name: string;
|
|
62
|
+
description: string;
|
|
63
|
+
sideEffects: AgentToolSideEffect;
|
|
64
|
+
authorization: {
|
|
65
|
+
permission: string;
|
|
66
|
+
};
|
|
67
|
+
actorClassRule?: AgentToolActorClassRule;
|
|
68
|
+
/**
|
|
69
|
+
* JSON Schema for this tool's `input`, published to the model via `ToolDescriptor.inputSchema`
|
|
70
|
+
* (a host's own tool-registration layer, which refuses to wire any tool lacking one).
|
|
71
|
+
*
|
|
72
|
+
* Deliberately not widened to `| undefined` (unlike most optional fields in this port) — this
|
|
73
|
+
* type flows into `core/tools/registration-kit.ts`'s `WirableToolDefinition`, which declares both
|
|
74
|
+
* this field and `actorClassRule` below without `| undefined`. Widening only this catalog's copy
|
|
75
|
+
* would make it structurally incompatible with that shared interface under
|
|
76
|
+
* `exactOptionalPropertyTypes`, which is exactly what identity's own `agent-tools.ts` avoids for
|
|
77
|
+
* the same reason.
|
|
78
|
+
*/
|
|
79
|
+
inputSchema?: Readonly<Record<string, unknown>>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The Navigation domain's fixed agent-tool catalog — the 5 operations a host's admin HTTP surface
|
|
83
|
+
* (`server/routes/admin/menus/*.ts`) exposes that are safe to wrap, out of its 6 total (see file
|
|
84
|
+
* header for why `delete` is the one exclusion).
|
|
85
|
+
*
|
|
86
|
+
* Ordered read-first, matching `identity/agent-tools.ts`'s convention: a model needs a `menuId`
|
|
87
|
+
* before it can update or assign one, and `menus_list_menus` is how it learns one for an existing menu.
|
|
88
|
+
*/
|
|
89
|
+
export declare const menusAgentToolCatalog: AgentToolDefinition[];
|
|
90
|
+
//# sourceMappingURL=agent-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/navigation/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,uBAAuB,GAAG,aAAa,CAAC;AAEnF,MAAM,MAAM,uBAAuB,GAAG,sCAAsC,GAAG,WAAW,GAAG,MAAM,CAAC;AAEpG,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACjD;AAqFD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,mBAAmB,EAkFtD,CAAC"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The Navigation (Menus) agent-tool catalog — this domain's instance of the
|
|
3
|
+
* per-domain `agent-tools.ts` convention `forms/agent-tools.ts` and `identity/agent-tools.ts`
|
|
4
|
+
* already use.
|
|
5
|
+
*
|
|
6
|
+
* Purpose:
|
|
7
|
+
* A static, in-process catalog describing every agent-callable tool this domain exposes and the
|
|
8
|
+
* permission each carries. Every entry maps 1:1 onto a real exported function of
|
|
9
|
+
* `navigation/menu-service.ts` (plus two pure reads over `MenuRepoPort`) — this catalog never names
|
|
10
|
+
* an operation the domain cannot perform.
|
|
11
|
+
*
|
|
12
|
+
* Precedent already in this library: `navigation/contracts.ts` declares `NAVIGATION_AI_TOOLS` — a
|
|
13
|
+
* design-note list of an intended future AI tool surface (`navigation.search`/`.get`/`.where_used`/
|
|
14
|
+
* `.update`/`.assign`) for a DIFFERENT, not-yet-built delivery mechanism (a "change-set review
|
|
15
|
+
* layer" HITL gateway; the list itself is unused anywhere in this build today). Two of its five
|
|
16
|
+
* names do not correspond to any real, callable capability in this build: `navigation.search` has
|
|
17
|
+
* no implementation beyond `MenuRepoPort.list` (folded into `menus_list_menus` below — there is no
|
|
18
|
+
* separate text-search capability, matching how `identity_user_list`/`identity_role_list` are
|
|
19
|
+
* likewise this library's "search" for their own domains), and `navigation.where_used` has no
|
|
20
|
+
* implementation anywhere (`NavWhereUsedResult` is declared in `contracts.ts` but no function in
|
|
21
|
+
* `navigation/` computes it — `entry_refs`-backed where-used, unlike `widgets`/`media`, was never
|
|
22
|
+
* built for menus). Wrapping either literally would invent backend capability this catalog's own
|
|
23
|
+
* discipline forbids; `menus_list_menus` + `menus_get_menu` are this build's honest equivalents of
|
|
24
|
+
* "search"/"get".
|
|
25
|
+
*
|
|
26
|
+
* Deliberate absence (the point of a catalog, not an oversight):
|
|
27
|
+
* - There is NO `menus_delete_menu` (nor a separate trash-only tool). `deleteMenu` is ONE function
|
|
28
|
+
* that performs BOTH steps of the deletion ladder, keyed off the menu's CURRENT status:
|
|
29
|
+
* a first call trashes (safe, unconditional), but a second call against an already-trashed menu
|
|
30
|
+
* PURGES it — a hard, irreversible delete, blocked only by a still-bound-location guard that
|
|
31
|
+
* itself can be bypassed with `force` (gated behind the separate `admin.menus.delete.force`
|
|
32
|
+
* permission). Unlike `widgets`/`media` (which expose trash and purge as two SEPARATE domain
|
|
33
|
+
* functions, letting a catalog safely wire trash alone), navigation has no decomposed trash-only
|
|
34
|
+
* entrypoint to call — the very same tool call, made twice, silently escalates from a reversible
|
|
35
|
+
* soft-delete into a permanent one. That is exactly the shape of risk `identity/agent-tools.ts`
|
|
36
|
+
* excludes `resetUserPassword` for: a single lever whose second pull does something categorically
|
|
37
|
+
* more dangerous than its first, reachable by an agent re-invoking a tool it already called once
|
|
38
|
+
* (e.g. after losing track of a prior call, or via prompt injection through ordinary operator
|
|
39
|
+
* content). Left human-UI-only.
|
|
40
|
+
*
|
|
41
|
+
* How it relates to the project:
|
|
42
|
+
* A host's own tool-registration layer maps these entries into `ToolRegistration`s (see
|
|
43
|
+
* `tool-registrations.ts`). Unlike Forms/Identity/Widgets, `menu-service.ts`'s functions perform NO
|
|
44
|
+
* internal `authorize()` call of their own (confirmed: `CreateMenuDeps`/`UpdateMenuTreeDeps`/
|
|
45
|
+
* `AssignLocationDeps` carry no `authorize` field) — every admin HTTP route a host builds is expected
|
|
46
|
+
* to check `deps.authorize(...)` inline, before calling the service function (mirrors `media`'s
|
|
47
|
+
* identical gap, see `media/agent-tools.ts`'s header). `tool-registrations.ts` therefore performs
|
|
48
|
+
* that SAME inline `authorize()` call itself (the identical permission string and `entityType:
|
|
49
|
+
* "menu"` the HTTP route uses) rather than relying on a domain-layer gate that does not exist for
|
|
50
|
+
* this library.
|
|
51
|
+
*
|
|
52
|
+
* Architectural role:
|
|
53
|
+
* `navigation` domain declaration. Imports only `VALID_TARGET_KINDS`-equivalent constants are not
|
|
54
|
+
* exported from `menu-service.ts` as public data (the target-kind allowlist is enforced, not
|
|
55
|
+
* published, there), so the target schema below is hand-authored against `types.ts`'s `NavTarget`
|
|
56
|
+
* union and cross-checked by this catalog's own contract test rather than imported.
|
|
57
|
+
*/
|
|
58
|
+
const MENU_ID_SCHEMA = {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "The menu's id, as returned by menus_list_menus, menus_get_menu, or menus_create_menu.",
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* A link target, published as a `oneOf` over the 4 v1 kinds `menu-service.ts`'s `validateTarget`
|
|
64
|
+
* accepts (`entryRef`/`termRef`/`url`/`route`) — `dynamicQuery`/`content` are named-but-rejected
|
|
65
|
+
* reserved seams and are deliberately absent from this enum so the model is never
|
|
66
|
+
* invited to try them.
|
|
67
|
+
*/
|
|
68
|
+
const NAV_TARGET_SCHEMA = {
|
|
69
|
+
description: "The item's link target — exactly one of the 4 supported kinds below.",
|
|
70
|
+
oneOf: [
|
|
71
|
+
{
|
|
72
|
+
type: "object",
|
|
73
|
+
additionalProperties: false,
|
|
74
|
+
required: ["kind", "entryId"],
|
|
75
|
+
properties: { kind: { const: "entryRef" }, entryId: { type: "string", description: "Target entry id (e.g. a page or post)." } },
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: "object",
|
|
79
|
+
additionalProperties: false,
|
|
80
|
+
required: ["kind", "termId", "taxonomy"],
|
|
81
|
+
properties: {
|
|
82
|
+
kind: { const: "termRef" },
|
|
83
|
+
termId: { type: "string", description: "Target taxonomy term id." },
|
|
84
|
+
taxonomy: { type: "string", description: "The taxonomy the term belongs to." },
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: "object",
|
|
89
|
+
additionalProperties: false,
|
|
90
|
+
required: ["kind", "href"],
|
|
91
|
+
properties: {
|
|
92
|
+
kind: { const: "url" },
|
|
93
|
+
href: { type: "string", description: "An absolute or site-relative URL. 'javascript:', 'data:', and 'vbscript:' schemes are rejected." },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: "object",
|
|
98
|
+
additionalProperties: false,
|
|
99
|
+
required: ["kind", "route"],
|
|
100
|
+
properties: {
|
|
101
|
+
kind: { const: "route" },
|
|
102
|
+
route: { type: "string", description: "A named core route (e.g. 'home', 'search')." },
|
|
103
|
+
params: { type: "object", description: "Optional static params passed to the route resolver." },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* One node of a menu's item tree, published as a `$ref`-recursive JSON Schema (`$defs.navItem`) —
|
|
110
|
+
* the tree nests via `children`, so this is the one catalog schema in this task that is genuinely
|
|
111
|
+
* recursive. Enforcement of depth/count/id-uniqueness bounds happens server-side in
|
|
112
|
+
* `validateAndCloneTree`, not by this published schema; the schema documents the accepted shape,
|
|
113
|
+
* the domain function is still the authority.
|
|
114
|
+
*/
|
|
115
|
+
const NAV_ITEM_NODE_SCHEMA = {
|
|
116
|
+
type: "object",
|
|
117
|
+
additionalProperties: false,
|
|
118
|
+
required: ["id", "target"],
|
|
119
|
+
properties: {
|
|
120
|
+
id: { type: "string", minLength: 1, description: "Stable id, minted once and preserved across edits. Required and unique within the whole tree." },
|
|
121
|
+
label: { type: "string", description: "Display label. Omit to fall back to an empty string (target-title fallback is not implemented)." },
|
|
122
|
+
target: NAV_TARGET_SCHEMA,
|
|
123
|
+
attrs: {
|
|
124
|
+
type: "object",
|
|
125
|
+
description: "Optional presentational attributes: openInNewTab (boolean), rel (string), cssClass (string), description (string), icon (string).",
|
|
126
|
+
},
|
|
127
|
+
children: { type: "array", items: { $ref: "#/$defs/navItem" }, description: "Nested child items. Max nesting depth 5 (root = depth 1); max 500 total items across the whole tree." },
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
/** The `items` property shared by create and update — the complete tree, per node above. */
|
|
131
|
+
const ITEMS_TREE_SCHEMA = {
|
|
132
|
+
type: "array",
|
|
133
|
+
items: { $ref: "#/$defs/navItem" },
|
|
134
|
+
description: "The COMPLETE item tree (whole-document replace — there is no per-item patch operation). Every node's id must be unique within the tree.",
|
|
135
|
+
$defs: { navItem: NAV_ITEM_NODE_SCHEMA },
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* The Navigation domain's fixed agent-tool catalog — the 5 operations a host's admin HTTP surface
|
|
139
|
+
* (`server/routes/admin/menus/*.ts`) exposes that are safe to wrap, out of its 6 total (see file
|
|
140
|
+
* header for why `delete` is the one exclusion).
|
|
141
|
+
*
|
|
142
|
+
* Ordered read-first, matching `identity/agent-tools.ts`'s convention: a model needs a `menuId`
|
|
143
|
+
* before it can update or assign one, and `menus_list_menus` is how it learns one for an existing menu.
|
|
144
|
+
*/
|
|
145
|
+
export const menusAgentToolCatalog = [
|
|
146
|
+
{
|
|
147
|
+
name: "menus_list_menus",
|
|
148
|
+
description: "Lists every menu in the workspace (id, slug, title, status, item tree, locations, version). Read-only.",
|
|
149
|
+
sideEffects: "none",
|
|
150
|
+
authorization: { permission: "admin.menus.read" },
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: "object",
|
|
153
|
+
additionalProperties: false,
|
|
154
|
+
required: [],
|
|
155
|
+
properties: {},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "menus_get_menu",
|
|
160
|
+
description: "Reads one menu by id, including its full item tree and current version.",
|
|
161
|
+
sideEffects: "none",
|
|
162
|
+
authorization: { permission: "admin.menus.read" },
|
|
163
|
+
inputSchema: {
|
|
164
|
+
type: "object",
|
|
165
|
+
additionalProperties: false,
|
|
166
|
+
required: ["menuId"],
|
|
167
|
+
properties: { menuId: MENU_ID_SCHEMA },
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "menus_create_menu",
|
|
172
|
+
description: "Creates a new menu in 'draft' status with no location assigned yet — it has no effect on the live site until " +
|
|
173
|
+
"menus_assign_location binds it somewhere. Rejects a duplicate slug within the workspace.",
|
|
174
|
+
sideEffects: "mutates-durable-state",
|
|
175
|
+
authorization: { permission: "admin.menus.create" },
|
|
176
|
+
inputSchema: {
|
|
177
|
+
type: "object",
|
|
178
|
+
additionalProperties: false,
|
|
179
|
+
required: ["title", "slug"],
|
|
180
|
+
properties: {
|
|
181
|
+
title: { type: "string", minLength: 1, description: "Human-readable menu name." },
|
|
182
|
+
slug: { type: "string", pattern: "^[a-z0-9-]+$", description: "Stable machine handle. Lowercase letters, digits, and hyphens only." },
|
|
183
|
+
items: { ...ITEMS_TREE_SCHEMA, description: "Optional initial item tree. Defaults to an empty menu if omitted." },
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: "menus_update_menu_tree",
|
|
189
|
+
description: "Replaces an existing menu's whole item tree (and optionally its title/slug) in one version-guarded write. " +
|
|
190
|
+
"Always a whole-tree replace — there is no per-item patch operation, so the submitted tree must include every " +
|
|
191
|
+
"item the menu keeps.",
|
|
192
|
+
sideEffects: "mutates-durable-state",
|
|
193
|
+
authorization: { permission: "admin.menus.update" },
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: "object",
|
|
196
|
+
additionalProperties: false,
|
|
197
|
+
required: ["menuId", "expectedVersion", "items"],
|
|
198
|
+
properties: {
|
|
199
|
+
menuId: MENU_ID_SCHEMA,
|
|
200
|
+
expectedVersion: { type: "integer", description: "The menu's current 'version', as last returned by a read or write on it — the optimistic-concurrency guard. A stale value is rejected with a conflict naming the current version." },
|
|
201
|
+
title: { type: "string", description: "New title. Omit to leave unchanged." },
|
|
202
|
+
slug: { type: "string", pattern: "^[a-z0-9-]+$", description: "New slug. Omit to leave unchanged. Must not collide with another menu's slug." },
|
|
203
|
+
items: ITEMS_TREE_SCHEMA,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: "menus_assign_location",
|
|
209
|
+
description: "Assigns a menu to a theme location, making it appear on the live site at that location. If the location was " +
|
|
210
|
+
"already bound to a DIFFERENT menu, that menu is displaced (last-writer-wins) — its own 'locations' field loses " +
|
|
211
|
+
"the key, returned as displacedMenu so the caller can see what changed.",
|
|
212
|
+
sideEffects: "mutates-durable-state",
|
|
213
|
+
authorization: { permission: "admin.menus.assign" },
|
|
214
|
+
inputSchema: {
|
|
215
|
+
type: "object",
|
|
216
|
+
additionalProperties: false,
|
|
217
|
+
required: ["menuId", "locationKey"],
|
|
218
|
+
properties: {
|
|
219
|
+
menuId: MENU_ID_SCHEMA,
|
|
220
|
+
locationKey: { type: "string", minLength: 1, description: "A theme-registered location key (e.g. 'primary', 'footer', 'social'). An unregistered key is still accepted (assignments survive a theme switch)." },
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
];
|
|
225
|
+
//# sourceMappingURL=agent-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.js","sourceRoot":"","sources":["../../src/navigation/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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AC,QAAQ,EAAE,iBAAiB,EAAE,OAAO,CAAC;YAChD,UAAU,EAAE;gBACV,MAAM,EAAE,cAAc;gBACtB,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,mLAAmL,EAAE;gBACtO,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qCAAqC,EAAE;gBAC7E,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,+EAA+E,EAAE;gBAC/I,KAAK,EAAE,iBAAiB;aACzB;SACF;KACF;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EACT,8GAA8G;YAC9G,iHAAiH;YACjH,wEAAwE;QAC1E,WAAW,EAAE,uBAAuB;QACpC,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE;QACnD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;YACnC,UAAU,EAAE;gBACV,MAAM,EAAE,cAAc;gBACtB,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,mJAAmJ,EAAE;aAChN;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Command inputs, permission catalog, events, and hook points for the
|
|
3
|
+
* `navigation` library.
|
|
4
|
+
*
|
|
5
|
+
* All mutation runs through the command gateway (`core/commands`) so
|
|
6
|
+
* menus inherit the single write chokepoint, same-transaction revisions,
|
|
7
|
+
* `pluginId`/actor attribution, and revert — no bespoke write path. These are
|
|
8
|
+
* the typed shapes those commands take; the handler bodies live in
|
|
9
|
+
* `navigation/menu-service.ts` (not in this interface-only slice).
|
|
10
|
+
*
|
|
11
|
+
* INTERFACES + DATA CATALOGS ONLY. No feature logic.
|
|
12
|
+
*/
|
|
13
|
+
import type { UUID } from "../core/ports.js";
|
|
14
|
+
import type { NavItemNode, NavLocationKey, NavMenuEntry } from "./types.js";
|
|
15
|
+
/**
|
|
16
|
+
* The `admin.menus.*` permission strings (renamed
|
|
17
|
+
* from the flat `navigation.manage` to the frozen `admin.<section>.<action>`
|
|
18
|
+
* convention, and split by action so force-purge no longer shares a
|
|
19
|
+
* permission with ordinary edits). `assign` is split from `update` because
|
|
20
|
+
* changing where a menu appears on the live site is higher-trust than
|
|
21
|
+
* editing an item label (mirrors the media library's `media.delete.force` /
|
|
22
|
+
* `media.upload_svg` splits); `delete.force` is split from `delete` for the
|
|
23
|
+
* same reason. The legacy `navigation.manage` string
|
|
24
|
+
* stays registered (deprecated, not deleted) in the host's identity permission
|
|
25
|
+
* registry until the Point of No Return — it
|
|
26
|
+
* is not part of this catalog. See `docs/decisions/permission-catalog-migration.md`
|
|
27
|
+
* for the migration's completion criteria.
|
|
28
|
+
*/
|
|
29
|
+
export declare const NAVIGATION_PERMISSIONS: readonly ["admin.menus.read", "admin.menus.create", "admin.menus.update", "admin.menus.delete", "admin.menus.delete.force", "admin.menus.assign", "admin.menus.manage"];
|
|
30
|
+
export type NavigationPermission = (typeof NAVIGATION_PERMISSIONS)[number];
|
|
31
|
+
export interface CreateMenuInput {
|
|
32
|
+
readonly workspaceId: UUID;
|
|
33
|
+
readonly title: string;
|
|
34
|
+
readonly slug: string;
|
|
35
|
+
/** Optional initial tree; defaults to an empty menu. */
|
|
36
|
+
readonly items?: readonly NavItemNode[] | undefined;
|
|
37
|
+
}
|
|
38
|
+
export interface UpdateMenuInput {
|
|
39
|
+
readonly workspaceId: UUID;
|
|
40
|
+
readonly id: UUID;
|
|
41
|
+
readonly title: string;
|
|
42
|
+
readonly slug: string;
|
|
43
|
+
/**
|
|
44
|
+
* The full replacement tree. Menus are edited whole → whole-menu revisions +
|
|
45
|
+
* clean optimistic-concurrency on the entry `version` (a point in favor of the
|
|
46
|
+
* entry-native model). Item ids must be preserved for
|
|
47
|
+
* items that survive the edit (id-stability validation).
|
|
48
|
+
*/
|
|
49
|
+
readonly items: readonly NavItemNode[];
|
|
50
|
+
}
|
|
51
|
+
export interface AssignLocationInput {
|
|
52
|
+
readonly workspaceId: UUID;
|
|
53
|
+
readonly menuId: UUID;
|
|
54
|
+
readonly locationKey: NavLocationKey;
|
|
55
|
+
}
|
|
56
|
+
export interface UnassignLocationInput {
|
|
57
|
+
readonly workspaceId: UUID;
|
|
58
|
+
readonly locationKey: NavLocationKey;
|
|
59
|
+
}
|
|
60
|
+
export interface DeleteMenuInput {
|
|
61
|
+
readonly workspaceId: UUID;
|
|
62
|
+
readonly id: UUID;
|
|
63
|
+
/** Force-purge past the 409 dangling-reference guard (needs `delete.force`). */
|
|
64
|
+
readonly force?: boolean | undefined;
|
|
65
|
+
}
|
|
66
|
+
/** Stable event names emitted on the outbox for async consumers. */
|
|
67
|
+
export declare const NAVIGATION_EVENTS: readonly ["navigation.menu.created", "navigation.menu.updated", "navigation.menu.deleted", "navigation.location.assigned", "navigation.location.unassigned"];
|
|
68
|
+
export type NavigationEventName = (typeof NAVIGATION_EVENTS)[number];
|
|
69
|
+
export interface NavMenuChangedPayload {
|
|
70
|
+
readonly menuId: UUID;
|
|
71
|
+
readonly slug: string;
|
|
72
|
+
}
|
|
73
|
+
export interface NavLocationChangedPayload {
|
|
74
|
+
readonly locationKey: NavLocationKey;
|
|
75
|
+
/** Menu now bound (assigned) / previously bound (unassigned). */
|
|
76
|
+
readonly menuId: UUID;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Typed navigation hook points. Filters transform a value in-line (events
|
|
80
|
+
* cannot); the action lets extensions register locations. Declared here so the
|
|
81
|
+
* SDK/type system can enforce "declared points only" (the anti-hook-rot rule,
|
|
82
|
+
* the platform's v2 design doc §7).
|
|
83
|
+
*/
|
|
84
|
+
export declare const NAVIGATION_HOOKS: readonly ["navigation.item.resolve", "navigation.tree.filter", "navigation.locations.register"];
|
|
85
|
+
export type NavigationHookName = (typeof NAVIGATION_HOOKS)[number];
|
|
86
|
+
/**
|
|
87
|
+
* AI tools are thin clients of the same command/read handlers admins use (no
|
|
88
|
+
* back door). Agents are delegated principals (`grant ∩ delegator`);
|
|
89
|
+
* `update`/`assign`/`delete` are HITL through the change-set review layer.
|
|
90
|
+
*/
|
|
91
|
+
export declare const NAVIGATION_AI_TOOLS: readonly ["navigation.search", "navigation.get", "navigation.where_used", "navigation.update", "navigation.assign"];
|
|
92
|
+
export type NavigationAiTool = (typeof NAVIGATION_AI_TOOLS)[number];
|
|
93
|
+
/** Result shape of `navigation.where_used` — menus referencing a target. */
|
|
94
|
+
export interface NavWhereUsedResult {
|
|
95
|
+
readonly targetId: UUID;
|
|
96
|
+
readonly menus: readonly Pick<NavMenuEntry, "id" | "slug" | "title">[];
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/navigation/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACb,MAAM,YAAY,CAAC;AAMpB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,yKAQzB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAM3E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,CAAC;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