@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,308 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The cross-domain half of the agent-tool wiring split: everything a domain's own
|
|
3
|
+
* `tool-registrations.ts` needs that is NOT specific to that domain.
|
|
4
|
+
*
|
|
5
|
+
* Why this file exists at all. Every domain's wiring repeats the same five moves — index its
|
|
6
|
+
* catalog by id, read a handful of fields off `ctx.input`, run the tool's permission check,
|
|
7
|
+
* decorate a shape rejection with the published schema, and then loop the handler map into
|
|
8
|
+
* `ToolRegistration`s behind a build-time risk/schema gate. Those five moves were previously copied
|
|
9
|
+
* per domain inside one shared `assistant/tool-registrations.ts`, which is exactly why that file
|
|
10
|
+
* grew past 2000 lines and why three independent domain slices could not be developed in parallel
|
|
11
|
+
* without colliding on it. Each domain now owns a `tool-registrations.ts` next to its own code and
|
|
12
|
+
* imports the shared moves from here; `assistant/tool-registrations.ts` is reduced to the
|
|
13
|
+
* aggregator that assembles them.
|
|
14
|
+
*
|
|
15
|
+
* The membership test for anything in this file is "would a fourth, not-yet-written domain need
|
|
16
|
+
* it?". Domain-shaped things deliberately stay out: each domain's model-facing `to*View`
|
|
17
|
+
* projections, its dependency-bag builder, its own `DERIVED_RISK_BY_TOOL_ID` slice (a claim about
|
|
18
|
+
* that domain's handlers, so it is maintained where those handlers live), and its unwired-tool set.
|
|
19
|
+
*
|
|
20
|
+
* What is deliberately NOT abstracted here is the authorization DECISION. {@link requireToolPermission}
|
|
21
|
+
* performs a check a caller asks for; it never decides that a check is needed. The "one
|
|
22
|
+
* evaluator" rule is a per-tool fact — some domains self-enforce inside their service function and
|
|
23
|
+
* must NOT be double-checked here, others have no service-layer gate at all and must be checked at
|
|
24
|
+
* the handler — and that judgement stays recorded in the domain file next to the handler it
|
|
25
|
+
* describes, where a reviewer reading the handler can see it.
|
|
26
|
+
*/
|
|
27
|
+
import { type ToolHandler, type ToolRegistration } from "@jini-ai/core";
|
|
28
|
+
import { type AuthorizeFn } from "../commands/command.js";
|
|
29
|
+
export type { ToolHandler, ToolRegistration };
|
|
30
|
+
/**
|
|
31
|
+
* Mirrors the `AgentToolSideEffect` union every domain's `agent-tools.ts` declares for itself.
|
|
32
|
+
*
|
|
33
|
+
* `deletes-durable-state` is a distinct member rather than a flavor of `mutates-durable-state`, and
|
|
34
|
+
* the distinction is load-bearing rather than cosmetic. Every gate in this file compares the two
|
|
35
|
+
* classifications for EQUALITY, so the strength of the check is exactly the resolution of the
|
|
36
|
+
* vocabulary: folding a delete into `mutates-durable-state` would let a tool that removes content
|
|
37
|
+
* from every read path carry the same declared risk as one that edits a title, and
|
|
38
|
+
* {@link assertToolIsWirable} would have nothing to object to. A separate member means a delete tool
|
|
39
|
+
* whose declaration drifts toward the milder classification fails the build.
|
|
40
|
+
*
|
|
41
|
+
* Widening this union is safe for the twelve domains that declare their own narrower copy: a
|
|
42
|
+
* narrower union stays assignable to this one, and nothing in the codebase switches exhaustively on
|
|
43
|
+
* the type (verified by grep before adding the member).
|
|
44
|
+
*/
|
|
45
|
+
export type AgentToolSideEffect = "none" | "mutates-durable-state" | "deletes-durable-state" | "mints-token";
|
|
46
|
+
/** Mirrors the `AgentToolActorClassRule` union every domain's `agent-tools.ts` declares for itself. */
|
|
47
|
+
export type AgentToolActorClassRule = "confirmer-must-equal-own-delegatedBy" | "user-only" | "none";
|
|
48
|
+
/**
|
|
49
|
+
* The structural minimum this wiring layer needs from a catalog entry, satisfied by every domain's
|
|
50
|
+
* own `AgentToolDefinition` without any of them having to import it.
|
|
51
|
+
*
|
|
52
|
+
* Deliberately a structural supertype rather than a single shared interface the twelve catalogs
|
|
53
|
+
* would all import: those catalogs are domain-owned declarations, and a domain must stay
|
|
54
|
+
* free to tighten its own copy — `identity/agent-tools.ts` makes `inputSchema` REQUIRED because
|
|
55
|
+
* every one of its entries is wired, and adds `authorization.orPermission` because three of its
|
|
56
|
+
* gates are genuinely an OR. Both remain assignable to this. Widening happens here, in the consumer,
|
|
57
|
+
* so no domain's declaration is loosened to accommodate another's.
|
|
58
|
+
*/
|
|
59
|
+
export interface WirableToolDefinition {
|
|
60
|
+
name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
sideEffects: AgentToolSideEffect;
|
|
63
|
+
authorization: {
|
|
64
|
+
permission: string;
|
|
65
|
+
orPermission?: string;
|
|
66
|
+
};
|
|
67
|
+
actorClassRule?: AgentToolActorClassRule;
|
|
68
|
+
inputSchema?: Readonly<Record<string, unknown>>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A domain's independent classification of what its own handlers actually do, keyed by tool id.
|
|
72
|
+
*
|
|
73
|
+
* The point of the type is the point of the pattern: a tool's risk must not be self-declared. A
|
|
74
|
+
* catalog entry that quietly downgraded itself to `sideEffects:'none'` would otherwise become
|
|
75
|
+
* "safe" by editing one word in a file that carries no knowledge of which domain function runs.
|
|
76
|
+
* Each domain's `tool-registrations.ts` maintains its slice next to the handlers it describes, and
|
|
77
|
+
* {@link assertToolIsWirable} refuses to build when the two disagree. An id absent from the map
|
|
78
|
+
* cannot be wired at all, so the conservative default is "refuse", not "assume safe".
|
|
79
|
+
*/
|
|
80
|
+
export type DerivedRiskByToolId = ReadonlyMap<string, AgentToolSideEffect>;
|
|
81
|
+
/**
|
|
82
|
+
* Audit provenance stamped onto every revision row a tool handler writes.
|
|
83
|
+
*
|
|
84
|
+
* A constant, not `ctx.principal`'s own kind, and that is the point: `ctx.principal.id` is the
|
|
85
|
+
* HUMAN admin's principal id — the host's proxy reads it from the browser session and stamps it
|
|
86
|
+
* into the run's `contextRef`, and the daemon hands it back to the handler. So a content-type change made by the assistant and one the same person made by clicking
|
|
87
|
+
* through the admin UI record an identical `actorId`. What distinguishes them is the path, and
|
|
88
|
+
* reaching a `tool-registrations.ts` handler IS the agent path — those handlers are only ever
|
|
89
|
+
* invoked by `@jini-ai/daemon`'s `ToolExecutor` during a run. `'agent'` is therefore a fact about
|
|
90
|
+
* the call site, not a default.
|
|
91
|
+
*/
|
|
92
|
+
export declare const AGENT_TOOL_PRINCIPAL_KIND: "agent";
|
|
93
|
+
/**
|
|
94
|
+
* Actor-class rules that cannot be honored while no confirmation transport is wired.
|
|
95
|
+
*
|
|
96
|
+
* `confirmer-must-equal-own-delegatedBy` means "a human must confirm this, and the confirmer must
|
|
97
|
+
* be the principal who delegated". A host can only deliver that by building `ToolExecutor` with an
|
|
98
|
+
* `ExecutionDelegate`. Without one, `descriptor.requiresConfirmation` would park the execution on a
|
|
99
|
+
* promise only `resumeConfirmation` can settle — and nothing would call it. The park is also unbounded, because `descriptor.timeoutMs`'s timer is armed only AFTER the
|
|
100
|
+
* confirmation await.
|
|
101
|
+
*
|
|
102
|
+
* So a tool carrying this rule must not be wired at all. Today none is — `collections_execute_cleanup`,
|
|
103
|
+
* `database_execute_migrate_forward`, and `backup_execute_restore` all carry it and all three are
|
|
104
|
+
* declared unwired — which makes this guard a statement of the invariant rather than a fix: a
|
|
105
|
+
* future edit wiring any of them fails the build instead of silently shipping a tool whose stated
|
|
106
|
+
* human-confirmation requirement is unenforceable. When a confirmation transport does land, this
|
|
107
|
+
* constant is the deliberate place to relax.
|
|
108
|
+
*/
|
|
109
|
+
export declare const ACTOR_CLASS_RULES_REQUIRING_CONFIRMATION_TRANSPORT: Set<string>;
|
|
110
|
+
/**
|
|
111
|
+
* Indexes a domain catalog by tool id — the single lookup used for descriptors, risk metadata, and
|
|
112
|
+
* schema-bearing error messages.
|
|
113
|
+
*
|
|
114
|
+
* @param catalog - The domain's own `agent-tools.ts` catalog array.
|
|
115
|
+
* @returns The catalog keyed by `name`.
|
|
116
|
+
* @complexity O(n) once at module load, O(1) per subsequent lookup.
|
|
117
|
+
* @overallScore 100
|
|
118
|
+
*/
|
|
119
|
+
export declare function indexCatalogById<T extends {
|
|
120
|
+
name: string;
|
|
121
|
+
}>(catalog: readonly T[]): ReadonlyMap<string, T>;
|
|
122
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
123
|
+
/** Narrows `ctx.input` to a record, refusing anything else. The first line of most handlers. */
|
|
124
|
+
export declare function requireInputRecord(input: unknown): Record<string, unknown>;
|
|
125
|
+
export declare function requireString(input: Record<string, unknown>, key: string): string;
|
|
126
|
+
export declare function requireNumber(input: Record<string, unknown>, key: string): number;
|
|
127
|
+
export declare function requireObject(input: Record<string, unknown>, key: string): Record<string, unknown>;
|
|
128
|
+
export declare function optionalString(input: Record<string, unknown>, key: string): string | undefined;
|
|
129
|
+
export declare function optionalNumber(input: Record<string, unknown>, key: string): number | undefined;
|
|
130
|
+
export declare function optionalBoolean(input: Record<string, unknown>, key: string): boolean | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* The reader for a parameterless tool: `ctx.input` may be omitted entirely or passed as `{}`,
|
|
133
|
+
* nothing else. Refusing a populated object is deliberate — silently ignoring keys would teach a
|
|
134
|
+
* model that a filter it invented was applied.
|
|
135
|
+
*/
|
|
136
|
+
export declare function requireNoInput(input: unknown): void;
|
|
137
|
+
/**
|
|
138
|
+
* Wraps a `Result<T, Error>`-returning domain call as a value: `ToolExecutor` treats a thrown error
|
|
139
|
+
* as a `'failed'` execution, so an `{ok:false}` becomes a throw rather than a silently-swallowed
|
|
140
|
+
* value.
|
|
141
|
+
*/
|
|
142
|
+
export declare function fromResult<T>(fn: () => Promise<{
|
|
143
|
+
ok: true;
|
|
144
|
+
value: T;
|
|
145
|
+
} | {
|
|
146
|
+
ok: false;
|
|
147
|
+
error: Error;
|
|
148
|
+
}>): Promise<T>;
|
|
149
|
+
/**
|
|
150
|
+
* Runs the identical inline `authorize()` check the corresponding admin HTTP route performs, for a
|
|
151
|
+
* tool whose own domain function carries no `authorize()` call to inherit.
|
|
152
|
+
*
|
|
153
|
+
* This is NOT a second evaluator alongside another check — that is exactly the single-evaluator
|
|
154
|
+
* rule's concern. For each tool that
|
|
155
|
+
* calls it, this IS the only gate that tool's execution ever reaches, reached by an identical path
|
|
156
|
+
* to the one a human clicking the same admin route reaches. Domains split cleanly on which kind
|
|
157
|
+
* they are: content-types/Forms/Identity mutations and every Widgets write-service call self-enforce
|
|
158
|
+
* inside the domain function and must NOT call this; Comments/Members/Newsletter/Media/Menus/
|
|
159
|
+
* Database/Recovery gate in the route instead, so their handlers call this in the route's place.
|
|
160
|
+
* Which kind a given tool is stays documented next to that tool's handler, not here.
|
|
161
|
+
*
|
|
162
|
+
* Throws `core/commands`'s `ForbiddenError` — the same class `executeCommand` itself throws — so a
|
|
163
|
+
* tool caller and a route caller see the identical error shape for an identical denial. Throw
|
|
164
|
+
* rather than a 403 body because the caller here is `ToolExecutor`, which reads a thrown error as a
|
|
165
|
+
* failed execution and has no response to write to.
|
|
166
|
+
*
|
|
167
|
+
* @param deps - The `authorize()` evaluator and the workspace the run is scoped to.
|
|
168
|
+
* @param required - Who is asking, for what permission, optionally against which entity.
|
|
169
|
+
* @throws {ForbiddenError} If `authorize()` denies.
|
|
170
|
+
* @complexity O(1) beyond the injected `authorize()` call.
|
|
171
|
+
* @overallScore 100
|
|
172
|
+
*/
|
|
173
|
+
export declare function requireToolPermission(deps: {
|
|
174
|
+
authorize: AuthorizeFn;
|
|
175
|
+
workspaceId: string;
|
|
176
|
+
}, required: {
|
|
177
|
+
principalId: string;
|
|
178
|
+
permission: string;
|
|
179
|
+
entityType?: string | undefined;
|
|
180
|
+
entityId?: string | undefined;
|
|
181
|
+
}): Promise<void>;
|
|
182
|
+
/**
|
|
183
|
+
* Re-throws a rejection with the tool's published `inputSchema` appended, so a model can correct
|
|
184
|
+
* its call in a single turn instead of guessing the rest of the shape from one field's complaint.
|
|
185
|
+
*
|
|
186
|
+
* `isShapeRejection` is the domain's own decision and has no default: only errors a DIFFERENT input
|
|
187
|
+
* would fix are decorated. A `ForbiddenError` or a slug conflict is not a shape problem, and
|
|
188
|
+
* appending a schema to one would be noise the model must read past — worse, it would imply the
|
|
189
|
+
* call is retryable when it is not.
|
|
190
|
+
*
|
|
191
|
+
* @param spec.toolId - The tool whose schema is published with the failure.
|
|
192
|
+
* @param spec.catalog - The domain catalog, consulted for that schema.
|
|
193
|
+
* @param spec.isShapeRejection - Predicate selecting the errors worth decorating.
|
|
194
|
+
* @param fn - The domain call.
|
|
195
|
+
* @throws The original error unchanged when it is not a shape rejection, or a decorated `Error`
|
|
196
|
+
* when it is. A tool whose catalog entry publishes no schema still gets the retry-is-futile note.
|
|
197
|
+
* @complexity O(1) beyond the wrapped call, plus the schema's own serialization on the failure path.
|
|
198
|
+
* @overallScore 100
|
|
199
|
+
*/
|
|
200
|
+
export declare function withSchemaOnRejection<T>(spec: {
|
|
201
|
+
toolId: string;
|
|
202
|
+
catalog: ReadonlyMap<string, WirableToolDefinition>;
|
|
203
|
+
isShapeRejection: (error: unknown) => boolean;
|
|
204
|
+
}, fn: () => Promise<T>): Promise<T>;
|
|
205
|
+
/**
|
|
206
|
+
* The synchronous half of {@link withSchemaOnRejection}, for a domain that validates BEFORE the
|
|
207
|
+
* call rather than inside it (content-types parses `fields` at a boundary parser, so its rejection
|
|
208
|
+
* never reaches a `try` around a domain call).
|
|
209
|
+
*
|
|
210
|
+
* @returns The `Error` to throw — returned rather than thrown so the caller's own `throw` keeps
|
|
211
|
+
* TypeScript's control-flow narrowing at the call site.
|
|
212
|
+
* @complexity O(s) in the serialized schema size, on the failure path only.
|
|
213
|
+
* @overallScore 100
|
|
214
|
+
*/
|
|
215
|
+
export declare function decorateWithSchema(params: {
|
|
216
|
+
toolId: string;
|
|
217
|
+
catalog: ReadonlyMap<string, WirableToolDefinition>;
|
|
218
|
+
message: string;
|
|
219
|
+
}): Error;
|
|
220
|
+
/**
|
|
221
|
+
* Build-time gate on a single tool's risk metadata: refuses to wire a tool whose declared
|
|
222
|
+
* `sideEffects` disagrees with the wiring layer's own {@link DerivedRiskByToolId} classification,
|
|
223
|
+
* whose id that layer has not classified at all, or whose `actorClassRule` needs a confirmation
|
|
224
|
+
* transport that does not exist.
|
|
225
|
+
*
|
|
226
|
+
* Throws rather than warning, and at registration time rather than call time: a metadata
|
|
227
|
+
* inconsistency is a developer error that should stop the daemon booting, not a runtime condition
|
|
228
|
+
* to degrade around.
|
|
229
|
+
*
|
|
230
|
+
* @param params.toolId - The wired tool id.
|
|
231
|
+
* @param params.catalogEntry - Its `agent-tools.ts` entry, the declared side of the comparison.
|
|
232
|
+
* @param params.derivedRisk - The wiring layer's independent classification, the derived side.
|
|
233
|
+
* @throws {Error} If the tool is unclassified, misclassified, or needs missing confirmation support.
|
|
234
|
+
* @complexity O(1) — two map/set lookups.
|
|
235
|
+
* @overallScore 100
|
|
236
|
+
*/
|
|
237
|
+
export declare function assertToolIsWirable(params: {
|
|
238
|
+
toolId: string;
|
|
239
|
+
catalogEntry: WirableToolDefinition;
|
|
240
|
+
derivedRisk: DerivedRiskByToolId;
|
|
241
|
+
}): void;
|
|
242
|
+
/**
|
|
243
|
+
* Turns one domain's handler map into `ToolRegistration`s, applying every build-time gate the
|
|
244
|
+
* wiring layer owes each tool, and tripwiring on any catalog entry that is neither wired nor
|
|
245
|
+
* explicitly declared unwired.
|
|
246
|
+
*
|
|
247
|
+
* The tripwire is the reason this is one shared function rather than a loop each domain copies.
|
|
248
|
+
* "Add a catalog entry, forget to wire it" is the failure this layer is meant to make impossible,
|
|
249
|
+
* and a per-domain copy of the check is a per-domain opportunity to get it subtly wrong — one of
|
|
250
|
+
* the copies this replaced omitted the schema assertion, another omitted the unwired-set escape
|
|
251
|
+
* hatch. Silence is never the outcome: an unwired entry either appears in `unwiredToolIds` with a
|
|
252
|
+
* recorded reason next to it, or the build fails.
|
|
253
|
+
*
|
|
254
|
+
* `policy.authorize` is a pass-through `'allow'` for every registration, and that is by design
|
|
255
|
+
* rather than an omission: each tool's permission is evaluated exactly once — inside its domain
|
|
256
|
+
* function for the self-enforcing domains, or by the handler's own {@link requireToolPermission}
|
|
257
|
+
* call for the domains whose gate lives in the route. A check here would be a SECOND evaluator of
|
|
258
|
+
* the same rule, and a `ToolPolicy`-only check would be bypassable by any future non-tool caller of
|
|
259
|
+
* the same domain function, which is precisely why the chokepoint owns the gate.
|
|
260
|
+
*
|
|
261
|
+
* `descriptor.requiresConfirmation` is deliberately never set — see
|
|
262
|
+
* {@link ACTOR_CLASS_RULES_REQUIRING_CONFIRMATION_TRANSPORT} for why that omission is safe rather
|
|
263
|
+
* than a hole.
|
|
264
|
+
*
|
|
265
|
+
* @param spec.domain - Human-readable domain name, used only in failure messages.
|
|
266
|
+
* @param spec.catalogModule - Path of the catalog file, named in the drift message so the failure
|
|
267
|
+
* points at the file to edit.
|
|
268
|
+
* @param spec.catalog - That domain's catalog indexed by id (see {@link indexCatalogById}).
|
|
269
|
+
* @param spec.handlers - Tool id to handler. Registration order follows this map's key order.
|
|
270
|
+
* @param spec.derivedRisk - The domain's own risk classification (see {@link DerivedRiskByToolId}).
|
|
271
|
+
* @param spec.unwiredToolIds - Catalog ids deliberately not wired. Omit when the domain wires its
|
|
272
|
+
* entire catalog, which makes ANY unwired entry a build failure.
|
|
273
|
+
* @throws {Error} On catalog drift, an unclassified/misclassified tool, a wired tool publishing no
|
|
274
|
+
* `inputSchema`, or a catalog entry that is neither wired nor declared unwired.
|
|
275
|
+
* @complexity O(h + c) in the handler and catalog counts.
|
|
276
|
+
* @overallScore 100
|
|
277
|
+
*/
|
|
278
|
+
export declare function buildDomainRegistrations(spec: {
|
|
279
|
+
domain: string;
|
|
280
|
+
catalogModule: string;
|
|
281
|
+
catalog: ReadonlyMap<string, WirableToolDefinition>;
|
|
282
|
+
handlers: Record<string, ToolHandler>;
|
|
283
|
+
derivedRisk: DerivedRiskByToolId;
|
|
284
|
+
unwiredToolIds?: ReadonlySet<string>;
|
|
285
|
+
}): ToolRegistration[];
|
|
286
|
+
/**
|
|
287
|
+
* Folds every domain's risk slice into the one map the assistant-level
|
|
288
|
+
* `assertRiskMetadataIsWirable(toolId, catalogEntry)` consults, refusing any id two domains both
|
|
289
|
+
* claim.
|
|
290
|
+
*
|
|
291
|
+
* That refusal is the structural answer to the failure this restructure was prompted by: three
|
|
292
|
+
* domain slices were developed in parallel, each checking its new ids only against the ids that
|
|
293
|
+
* existed before it started, so a name two of them both picked would have been discovered at
|
|
294
|
+
* runtime as a silently double-registered tool. A cross-domain id collision now fails the build.
|
|
295
|
+
* The one real collision in the current catalogs — `backup_create_restore_point`, declared by both
|
|
296
|
+
* Database and Recovery — passes because Recovery declares it unwired and therefore contributes no
|
|
297
|
+
* risk entry for it, which is exactly the resolution this check is meant to force.
|
|
298
|
+
*
|
|
299
|
+
* @param slices - Each domain's name (for the failure message) and its own risk map.
|
|
300
|
+
* @throws {Error} If two domains classify the same tool id.
|
|
301
|
+
* @complexity O(t) in the total classified-tool count.
|
|
302
|
+
* @overallScore 100
|
|
303
|
+
*/
|
|
304
|
+
export declare function mergeDerivedRiskMaps(slices: readonly {
|
|
305
|
+
domain: string;
|
|
306
|
+
risk: DerivedRiskByToolId;
|
|
307
|
+
}[]): DerivedRiskByToolId;
|
|
308
|
+
//# sourceMappingURL=registration-kit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration-kit.d.ts","sourceRoot":"","sources":["../../../src/core/tools/registration-kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAkB,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAQxF,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAK1E,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,uBAAuB,GACvB,uBA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