@jini-ai/admin 0.3.9 → 0.4.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/CHANGELOG.md +58 -0
- package/README.md +71 -37
- package/dist/agent-plugins/adapters/http.d.ts +7 -0
- package/dist/agent-plugins/adapters/http.js +15 -0
- package/dist/agent-plugins/adapters/memory.d.ts +8 -0
- package/dist/agent-plugins/adapters/memory.js +25 -0
- package/dist/agent-plugins/agent-plugins.module.d.ts +51 -0
- package/dist/agent-plugins/agent-plugins.module.js +6 -0
- package/dist/agent-plugins/conformance/agent-plugins-api.conformance.d.ts +12 -0
- package/dist/agent-plugins/conformance/agent-plugins-api.conformance.js +47 -0
- package/dist/agent-plugins/controllers/agent-plugin-files.controller.d.ts +20 -0
- package/dist/agent-plugins/controllers/agent-plugin-files.controller.js +43 -0
- package/dist/agent-plugins/controllers/agent-plugins.controller.d.ts +25 -0
- package/dist/agent-plugins/controllers/agent-plugins.controller.js +91 -0
- package/dist/agent-plugins/index.d.ts +9 -0
- package/dist/agent-plugins/index.js +9 -0
- package/dist/agent-plugins/messages.en.d.ts +23 -0
- package/dist/agent-plugins/messages.en.js +14 -0
- package/dist/agent-plugins/models.d.ts +57 -0
- package/dist/agent-plugins/models.js +2 -0
- package/dist/agent-plugins/package-file-tree.d.ts +111 -0
- package/dist/agent-plugins/package-file-tree.js +188 -0
- package/dist/agent-plugins/ports.d.ts +18 -0
- package/dist/agent-plugins/ports.js +3 -0
- package/dist/agent-plugins/react/components/AgentPluginFileContent.d.ts +5 -0
- package/dist/agent-plugins/react/components/AgentPluginFileContent.js +9 -0
- package/dist/agent-plugins/react/components/AgentPluginFileTree.d.ts +9 -0
- package/dist/agent-plugins/react/components/AgentPluginFileTree.js +7 -0
- package/dist/agent-plugins/react/components/AgentPluginInspector.d.ts +3 -0
- package/dist/agent-plugins/react/components/AgentPluginInspector.js +11 -0
- package/dist/agent-plugins/react/components/AgentPluginListPanel.d.ts +6 -0
- package/dist/agent-plugins/react/components/AgentPluginListPanel.js +10 -0
- package/dist/agent-plugins/react/components/AgentPluginRow.d.ts +5 -0
- package/dist/agent-plugins/react/components/AgentPluginRow.js +8 -0
- package/dist/agent-plugins/react/hooks/AgentPluginInspector.hooks.d.ts +90 -0
- package/dist/agent-plugins/react/hooks/AgentPluginInspector.hooks.js +74 -0
- package/dist/agent-plugins/react/hooks/AgentPluginPanel.hooks.d.ts +67 -0
- package/dist/agent-plugins/react/hooks/AgentPluginPanel.hooks.js +50 -0
- package/dist/agent-plugins/react/hooks/AgentPluginRow.hooks.d.ts +55 -0
- package/dist/agent-plugins/react/hooks/AgentPluginRow.hooks.js +6 -0
- package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.d.ts +64 -0
- package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.js +39 -0
- package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.d.ts +7 -0
- package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.js +10 -0
- package/dist/agent-plugins/react/hooks/MarketplaceTab.hooks.d.ts +6 -0
- package/dist/agent-plugins/react/hooks/MarketplaceTab.hooks.js +3 -0
- package/dist/agent-plugins/react/index.d.ts +245 -0
- package/dist/agent-plugins/react/index.js +13 -0
- package/dist/agent-plugins/react/pages/AgentPluginsPage.d.ts +4 -0
- package/dist/agent-plugins/react/pages/AgentPluginsPage.js +12 -0
- package/dist/agent-plugins/react/tabs/DownloadedTab.d.ts +4 -0
- package/dist/agent-plugins/react/tabs/DownloadedTab.js +5 -0
- package/dist/agent-plugins/react/tabs/InstalledTab.d.ts +4 -0
- package/dist/agent-plugins/react/tabs/InstalledTab.js +5 -0
- package/dist/agent-plugins/react/tabs/MarketplaceTab.d.ts +4 -0
- package/dist/agent-plugins/react/tabs/MarketplaceTab.js +10 -0
- package/dist/agent-plugins/rules.d.ts +33 -0
- package/dist/agent-plugins/rules.js +51 -0
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.js +1 -0
- package/dist/browser/navigation.d.ts +19 -4
- package/dist/browser/navigation.js +8 -8
- package/dist/browser/shell-navigation.d.ts +12 -0
- package/dist/browser/shell-navigation.js +16 -0
- package/dist/contracts/credential-management.d.ts +8 -0
- package/dist/contracts/credential-management.js +3 -0
- package/dist/contracts/media-picker.d.ts +17 -0
- package/dist/contracts/media-picker.js +5 -0
- package/dist/contracts/playground-render-target.d.ts +18 -0
- package/dist/contracts/playground-render-target.js +3 -0
- package/dist/core/entities/rules.d.ts +138 -0
- package/dist/core/entities/rules.js +344 -0
- package/dist/core/gated/types.d.ts +8 -4
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +1 -0
- package/dist/core/manifest/rules.d.ts +24 -6
- package/dist/core/manifest/rules.js +12 -11
- package/dist/core/module/controller-store.d.ts +22 -0
- package/dist/core/module/controller-store.js +32 -0
- package/dist/core/module/create-admin.d.ts +41 -0
- package/dist/core/module/create-admin.js +187 -0
- package/dist/core/module/define-admin-module.d.ts +4 -0
- package/dist/core/module/define-admin-module.js +5 -0
- package/dist/core/module/index.d.ts +7 -0
- package/dist/core/module/index.js +4 -0
- package/dist/core/module/token.d.ts +19 -0
- package/dist/core/module/token.js +4 -0
- package/dist/core/module/types.d.ts +79 -0
- package/dist/core/module/types.js +2 -0
- package/dist/core/permissions/rules.d.ts +4 -1
- package/dist/core/permissions/rules.js +1 -1
- package/dist/core/ports/analytics.d.ts +1 -1
- package/dist/core/ports/auth.d.ts +2 -2
- package/dist/core/ports/comments.d.ts +9 -6
- package/dist/core/ports/database.d.ts +13 -10
- package/dist/core/ports/entities.d.ts +302 -0
- package/dist/core/ports/entities.js +47 -0
- package/dist/core/ports/forms.d.ts +19 -7
- package/dist/core/ports/identity.d.ts +42 -17
- package/dist/core/ports/index.d.ts +2 -0
- package/dist/core/ports/integrations.d.ts +9 -4
- package/dist/core/ports/media.d.ts +16 -7
- package/dist/core/ports/members.d.ts +7 -3
- package/dist/core/ports/menus.d.ts +43 -0
- package/dist/core/ports/menus.js +43 -0
- package/dist/core/ports/plugins.d.ts +3 -2
- package/dist/core/ports/recovery.d.ts +10 -6
- package/dist/core/ports/redirects.d.ts +17 -7
- package/dist/core/ports/seo.d.ts +12 -6
- package/dist/core/ports/shell.d.ts +41 -0
- package/dist/core/ports/shell.js +2 -0
- package/dist/core/ports/workspace.d.ts +3 -3
- package/dist/core/routing/rules.d.ts +17 -4
- package/dist/core/routing/rules.js +4 -4
- package/dist/core/transport/errors.d.ts +13 -4
- package/dist/core/transport/errors.js +4 -4
- package/dist/core/transport/http.d.ts +26 -16
- package/dist/core/transport/http.js +59 -21
- package/dist/core/transport/types.d.ts +26 -14
- package/dist/core/transport/types.js +9 -7
- package/dist/media/adapters/http.d.ts +27 -0
- package/dist/media/adapters/http.js +44 -0
- package/dist/media/adapters/memory.d.ts +11 -0
- package/dist/media/adapters/memory.js +139 -0
- package/dist/media/conformance/media-api.conformance.d.ts +7 -0
- package/dist/media/conformance/media-api.conformance.js +69 -0
- package/dist/media/controllers/edit-media.controller.d.ts +24 -0
- package/dist/media/controllers/edit-media.controller.js +69 -0
- package/dist/media/controllers/library.controller.d.ts +47 -0
- package/dist/media/controllers/library.controller.js +173 -0
- package/dist/media/controllers/providers.controller.d.ts +30 -0
- package/dist/media/controllers/providers.controller.js +76 -0
- package/dist/media/html-attributes.d.ts +82 -0
- package/dist/media/html-attributes.js +204 -0
- package/dist/media/index.d.ts +12 -0
- package/dist/media/index.js +9 -0
- package/dist/media/media.module.d.ts +83 -0
- package/dist/media/media.module.js +43 -0
- package/dist/media/messages.en.d.ts +24 -0
- package/dist/media/messages.en.js +24 -0
- package/dist/media/models.d.ts +72 -0
- package/dist/media/models.js +2 -0
- package/dist/media/ports.d.ts +75 -0
- package/dist/media/ports.js +7 -0
- package/dist/media/react/components/EditMediaPanel.d.ts +3 -0
- package/dist/media/react/components/EditMediaPanel.js +10 -0
- package/dist/media/react/components/MediaCard.d.ts +5 -0
- package/dist/media/react/components/MediaCard.js +17 -0
- package/dist/media/react/components/MediaDialog.d.ts +3 -0
- package/dist/media/react/components/MediaDialog.js +8 -0
- package/dist/media/react/components/MediaGrid.d.ts +4 -0
- package/dist/media/react/components/MediaGrid.js +8 -0
- package/dist/media/react/components/MediaIcons.d.ts +14 -0
- package/dist/media/react/components/MediaIcons.js +39 -0
- package/dist/media/react/components/MediaLightbox.d.ts +5 -0
- package/dist/media/react/components/MediaLightbox.js +12 -0
- package/dist/media/react/components/MediaPicker.d.ts +3 -0
- package/dist/media/react/components/MediaPicker.js +10 -0
- package/dist/media/react/components/MediaPurgeDialog.d.ts +4 -0
- package/dist/media/react/components/MediaPurgeDialog.js +9 -0
- package/dist/media/react/components/UploadButton.d.ts +3 -0
- package/dist/media/react/components/UploadButton.js +8 -0
- package/dist/media/react/hooks/EditMediaPanel.hooks.d.ts +84 -0
- package/dist/media/react/hooks/EditMediaPanel.hooks.js +105 -0
- package/dist/media/react/hooks/LibraryTab.hooks.d.ts +103 -0
- package/dist/media/react/hooks/LibraryTab.hooks.js +164 -0
- package/dist/media/react/hooks/MediaCard.hooks.d.ts +79 -0
- package/dist/media/react/hooks/MediaCard.hooks.js +63 -0
- package/dist/media/react/hooks/MediaDialog.hooks.d.ts +10 -0
- package/dist/media/react/hooks/MediaDialog.hooks.js +20 -0
- package/dist/media/react/hooks/MediaGrid.hooks.d.ts +28 -0
- package/dist/media/react/hooks/MediaGrid.hooks.js +6 -0
- package/dist/media/react/hooks/MediaLightbox.hooks.d.ts +27 -0
- package/dist/media/react/hooks/MediaLightbox.hooks.js +64 -0
- package/dist/media/react/hooks/MediaPage.hooks.d.ts +68 -0
- package/dist/media/react/hooks/MediaPage.hooks.js +68 -0
- package/dist/media/react/hooks/MediaPicker.hooks.d.ts +26 -0
- package/dist/media/react/hooks/MediaPicker.hooks.js +25 -0
- package/dist/media/react/hooks/MediaPorts.hooks.d.ts +9 -0
- package/dist/media/react/hooks/MediaPorts.hooks.js +10 -0
- package/dist/media/react/hooks/MediaPurgeDialog.hooks.d.ts +22 -0
- package/dist/media/react/hooks/MediaPurgeDialog.hooks.js +6 -0
- package/dist/media/react/hooks/ProvidersTab.hooks.d.ts +55 -0
- package/dist/media/react/hooks/ProvidersTab.hooks.js +124 -0
- package/dist/media/react/hooks/UploadButton.hooks.d.ts +48 -0
- package/dist/media/react/hooks/UploadButton.hooks.js +118 -0
- package/dist/media/react/index.d.ts +373 -0
- package/dist/media/react/index.js +73 -0
- package/dist/media/react/pages/MediaPage.d.ts +4 -0
- package/dist/media/react/pages/MediaPage.js +9 -0
- package/dist/media/react/tabs/LibraryTab.d.ts +4 -0
- package/dist/media/react/tabs/LibraryTab.js +14 -0
- package/dist/media/react/tabs/ProvidersTab.d.ts +4 -0
- package/dist/media/react/tabs/ProvidersTab.js +10 -0
- package/dist/media/rules.d.ts +80 -0
- package/dist/media/rules.js +127 -0
- package/dist/media/styles.d.ts +4 -0
- package/dist/media/styles.js +5 -0
- package/dist/playground/adapters/http.d.ts +8 -0
- package/dist/playground/adapters/http.js +4 -0
- package/dist/playground/adapters/memory.d.ts +10 -0
- package/dist/playground/adapters/memory.js +30 -0
- package/dist/playground/conformance/playground-api.conformance.d.ts +6 -0
- package/dist/playground/conformance/playground-api.conformance.js +37 -0
- package/dist/playground/controllers/playground.controller.d.ts +16 -0
- package/dist/playground/controllers/playground.controller.js +21 -0
- package/dist/playground/index.d.ts +7 -0
- package/dist/playground/index.js +5 -0
- package/dist/playground/messages.en.d.ts +9 -0
- package/dist/playground/messages.en.js +2 -0
- package/dist/playground/models.d.ts +4 -0
- package/dist/playground/models.js +2 -0
- package/dist/playground/playground.module.d.ts +31 -0
- package/dist/playground/playground.module.js +5 -0
- package/dist/playground/ports.d.ts +5 -0
- package/dist/playground/ports.js +2 -0
- package/dist/playground/react/components/Canvas.d.ts +3 -0
- package/dist/playground/react/components/Canvas.js +9 -0
- package/dist/playground/react/hooks/Canvas.hooks.d.ts +7 -0
- package/dist/playground/react/hooks/Canvas.hooks.js +18 -0
- package/dist/playground/react/hooks/PlaygroundPage.hooks.d.ts +8 -0
- package/dist/playground/react/hooks/PlaygroundPage.hooks.js +2 -0
- package/dist/playground/react/hooks/PlaygroundPorts.hooks.d.ts +4 -0
- package/dist/playground/react/hooks/PlaygroundPorts.hooks.js +6 -0
- package/dist/playground/react/index.d.ts +136 -0
- package/dist/playground/react/index.js +10 -0
- package/dist/playground/react/pages/PlaygroundPage.d.ts +4 -0
- package/dist/playground/react/pages/PlaygroundPage.js +11 -0
- package/dist/playground/react/tabs/CanvasTab.d.ts +4 -0
- package/dist/playground/react/tabs/CanvasTab.js +5 -0
- package/dist/playground/rules.d.ts +4 -0
- package/dist/playground/rules.js +2 -0
- package/dist/react/OverlayHost.d.ts +3 -0
- package/dist/react/OverlayHost.hooks.d.ts +9 -0
- package/dist/react/OverlayHost.hooks.js +9 -0
- package/dist/react/OverlayHost.js +7 -0
- package/dist/react/bind-react.d.ts +46 -0
- package/dist/react/bind-react.js +28 -0
- package/dist/react/components/ConfirmButton/ConfirmButton.hooks.d.ts +7 -1
- package/dist/react/components/ConfirmButton/ConfirmButton.hooks.js +2 -2
- package/dist/react/components/ConfirmButton/ConfirmButton.js +1 -1
- package/dist/react/components/ConfirmDialog/ConfirmDialog.d.ts +15 -3
- package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.d.ts +17 -3
- package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.js +3 -3
- package/dist/react/components/ConfirmDialog/ConfirmDialog.js +6 -6
- package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.d.ts +6 -2
- package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.js +7 -8
- package/dist/react/components/RowMenu/RowMenu.d.ts +5 -1
- package/dist/react/components/RowMenu/RowMenu.hooks.d.ts +8 -2
- package/dist/react/components/RowMenu/RowMenu.hooks.js +4 -4
- package/dist/react/components/RowMenu/RowMenu.js +6 -6
- package/dist/react/components/Sidebar.d.ts +1 -1
- package/dist/react/components/Sidebar.js +103 -7
- package/dist/react/entities/EntityCell.d.ts +10 -0
- package/dist/react/entities/EntityCell.js +18 -0
- package/dist/react/entities/EntityDetail.d.ts +3 -0
- package/dist/react/entities/EntityDetail.js +21 -0
- package/dist/react/entities/EntityEdit.d.ts +13 -0
- package/dist/react/entities/EntityEdit.js +45 -0
- package/dist/react/entities/EntityField.d.ts +20 -0
- package/dist/react/entities/EntityField.js +31 -0
- package/dist/react/entities/EntityIndex.d.ts +3 -0
- package/dist/react/entities/EntityIndex.js +10 -0
- package/dist/react/entities/EntityList.d.ts +7 -0
- package/dist/react/entities/EntityList.js +52 -0
- package/dist/react/entities/contribution.d.ts +26 -0
- package/dist/react/entities/contribution.js +78 -0
- package/dist/react/entities/index.d.ts +10 -0
- package/dist/react/entities/index.js +7 -0
- package/dist/react/entities/rules.d.ts +179 -0
- package/dist/react/entities/rules.js +224 -0
- package/dist/react/entities/types.d.ts +45 -0
- package/dist/react/entities/types.js +5 -0
- package/dist/react/entities/use-entity-edit.d.ts +35 -0
- package/dist/react/entities/use-entity-edit.js +98 -0
- package/dist/react/entities/use-entity-read.d.ts +22 -0
- package/dist/react/entities/use-entity-read.js +27 -0
- package/dist/react/hooks/use-nav-sections.d.ts +12 -3
- package/dist/react/hooks/use-nav-sections.js +14 -14
- package/dist/react/hooks/use-sidebar-rail.d.ts +7 -1
- package/dist/react/hooks/use-sidebar-rail.js +11 -11
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +5 -2
- package/dist/react/kit/Kit.hooks.d.ts +13 -0
- package/dist/react/kit/Kit.hooks.js +10 -0
- package/dist/react/kit/Native.hooks.d.ts +38 -0
- package/dist/react/kit/Native.hooks.js +65 -0
- package/dist/react/kit/index.d.ts +12 -0
- package/dist/react/kit/index.js +21 -0
- package/dist/react/kit/native.d.ts +3 -0
- package/dist/react/kit/native.js +21 -0
- package/dist/react/kit/types.d.ts +40 -0
- package/dist/react/kit/types.js +2 -0
- package/dist/react/overlay.d.ts +36 -0
- package/dist/react/overlay.js +35 -0
- package/dist/react/overlays.d.ts +38 -0
- package/dist/react/overlays.js +46 -0
- package/dist/react/shell/AdminShell.d.ts +9 -0
- package/dist/react/shell/AdminShell.hooks.d.ts +15 -0
- package/dist/react/shell/AdminShell.hooks.js +27 -0
- package/dist/react/shell/AdminShell.js +46 -0
- package/dist/react/shell/index.d.ts +7 -0
- package/dist/react/shell/index.js +5 -0
- package/dist/react/shell/model.d.ts +25 -0
- package/dist/react/shell/model.js +29 -0
- package/dist/react/shell/theme-ports.d.ts +28 -0
- package/dist/react/shell/theme-ports.js +2 -0
- package/dist/react/shell/types.d.ts +99 -0
- package/dist/react/shell/types.js +2 -0
- package/dist/react/shell/use-admin-shell-session.d.ts +13 -0
- package/dist/react/shell/use-admin-shell-session.js +81 -0
- package/dist/react/shell/use-admin-theme.d.ts +16 -0
- package/dist/react/shell/use-admin-theme.js +57 -0
- package/dist/react/types.d.ts +6 -4
- package/dist/react/types.js +2 -2
- package/dist/react/use-controller.d.ts +16 -0
- package/dist/react/use-controller.js +18 -0
- package/dist/security/adapters/http.d.ts +16 -0
- package/dist/security/adapters/http.js +94 -0
- package/dist/security/adapters/memory.d.ts +15 -0
- package/dist/security/adapters/memory.js +60 -0
- package/dist/security/conformance/security-api.conformance.d.ts +10 -0
- package/dist/security/conformance/security-api.conformance.js +48 -0
- package/dist/security/controllers/access-tokens.controller.d.ts +44 -0
- package/dist/security/controllers/access-tokens.controller.js +112 -0
- package/dist/security/controllers/other-credentials.controller.d.ts +30 -0
- package/dist/security/controllers/other-credentials.controller.js +74 -0
- package/dist/security/controllers/root-key.controller.d.ts +35 -0
- package/dist/security/controllers/root-key.controller.js +90 -0
- package/dist/security/index.d.ts +9 -0
- package/dist/security/index.js +9 -0
- package/dist/security/messages.en.d.ts +12 -0
- package/dist/security/messages.en.js +2 -0
- package/dist/security/models.d.ts +112 -0
- package/dist/security/models.js +2 -0
- package/dist/security/ports.d.ts +58 -0
- package/dist/security/ports.js +5 -0
- package/dist/security/react/components/CredentialEditor.d.ts +3 -0
- package/dist/security/react/components/CredentialEditor.js +8 -0
- package/dist/security/react/hooks/AccessTokensTab.hooks.d.ts +94 -0
- package/dist/security/react/hooks/AccessTokensTab.hooks.js +36 -0
- package/dist/security/react/hooks/CredentialEditor.hooks.d.ts +49 -0
- package/dist/security/react/hooks/CredentialEditor.hooks.js +14 -0
- package/dist/security/react/hooks/RootKeyTab.hooks.d.ts +29 -0
- package/dist/security/react/hooks/RootKeyTab.hooks.js +19 -0
- package/dist/security/react/hooks/SecurityPage.hooks.d.ts +17 -0
- package/dist/security/react/hooks/SecurityPage.hooks.js +12 -0
- package/dist/security/react/hooks/SecurityPorts.hooks.d.ts +9 -0
- package/dist/security/react/hooks/SecurityPorts.hooks.js +6 -0
- package/dist/security/react/index.d.ts +215 -0
- package/dist/security/react/index.js +10 -0
- package/dist/security/react/pages/SecurityPage.d.ts +4 -0
- package/dist/security/react/pages/SecurityPage.js +10 -0
- package/dist/security/react/tabs/AccessTokensTab.d.ts +4 -0
- package/dist/security/react/tabs/AccessTokensTab.js +10 -0
- package/dist/security/react/tabs/RootKeyTab.d.ts +4 -0
- package/dist/security/react/tabs/RootKeyTab.js +9 -0
- package/dist/security/rules.d.ts +57 -0
- package/dist/security/rules.js +63 -0
- package/dist/security/security.module.d.ts +45 -0
- package/dist/security/security.module.js +5 -0
- package/dist/source-control/adapters/http.d.ts +6 -0
- package/dist/source-control/adapters/http.js +13 -0
- package/dist/source-control/adapters/memory.d.ts +9 -0
- package/dist/source-control/adapters/memory.js +35 -0
- package/dist/source-control/conformance/source-control-api.conformance.d.ts +10 -0
- package/dist/source-control/conformance/source-control-api.conformance.js +48 -0
- package/dist/source-control/controllers/source-control.controller.d.ts +26 -0
- package/dist/source-control/controllers/source-control.controller.js +70 -0
- package/dist/source-control/index.d.ts +8 -0
- package/dist/source-control/index.js +6 -0
- package/dist/source-control/messages.en.d.ts +11 -0
- package/dist/source-control/messages.en.js +2 -0
- package/dist/source-control/models.d.ts +70 -0
- package/dist/source-control/models.js +2 -0
- package/dist/source-control/ports.d.ts +23 -0
- package/dist/source-control/ports.js +3 -0
- package/dist/source-control/react/components/SourceControlCredentialFields.d.ts +5 -0
- package/dist/source-control/react/components/SourceControlCredentialFields.js +8 -0
- package/dist/source-control/react/components/SourceControlProviderRow.d.ts +5 -0
- package/dist/source-control/react/components/SourceControlProviderRow.js +7 -0
- package/dist/source-control/react/hooks/ProvidersTab.hooks.d.ts +45 -0
- package/dist/source-control/react/hooks/ProvidersTab.hooks.js +20 -0
- package/dist/source-control/react/hooks/SourceControlCredentialFields.hooks.d.ts +43 -0
- package/dist/source-control/react/hooks/SourceControlCredentialFields.hooks.js +9 -0
- package/dist/source-control/react/hooks/SourceControlPage.hooks.d.ts +17 -0
- package/dist/source-control/react/hooks/SourceControlPage.hooks.js +5 -0
- package/dist/source-control/react/hooks/SourceControlPorts.hooks.d.ts +9 -0
- package/dist/source-control/react/hooks/SourceControlPorts.hooks.js +6 -0
- package/dist/source-control/react/index.d.ts +156 -0
- package/dist/source-control/react/index.js +10 -0
- package/dist/source-control/react/pages/SourceControlPage.d.ts +4 -0
- package/dist/source-control/react/pages/SourceControlPage.js +11 -0
- package/dist/source-control/react/tabs/ProvidersTab.d.ts +4 -0
- package/dist/source-control/react/tabs/ProvidersTab.js +10 -0
- package/dist/source-control/rules.d.ts +32 -0
- package/dist/source-control/rules.js +35 -0
- package/dist/source-control/source-control.module.d.ts +36 -0
- package/dist/source-control/source-control.module.js +6 -0
- package/package.json +207 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const agentPluginsMessagesEn = {
|
|
2
|
+
title: 'Agent Plugins', installed: 'Installed', downloaded: 'Downloaded', marketplace: 'Marketplace',
|
|
3
|
+
description: 'Portable packages installed for this workspace.', denied: 'Permission denied',
|
|
4
|
+
loading: 'Loading Agent Plugins…', empty: 'No Agent Plugins are installed in this workspace.',
|
|
5
|
+
loadError: 'Failed to load agent plugins', actionError: 'Failed to update agent plugin',
|
|
6
|
+
fileError: 'Failed to load package files', filesLoading: 'Loading package files…',
|
|
7
|
+
filesEmpty: 'No files to show for this plugin.', filesTruncated: 'Some files are not listed: this package is larger than the viewer’s limits.',
|
|
8
|
+
installedLede: 'Every plugin installed in this workspace. Only switched-on plugins reach the assistant’s prompt.',
|
|
9
|
+
downloadedLede: 'An installed plugin sits inert until you enable it. Enabling one puts its skills in the assistant’s prompt for every run.',
|
|
10
|
+
uninstallUnavailable: 'Uninstall is unavailable in this view. Package removal is managed by the host.',
|
|
11
|
+
marketplaceTitle: 'Nothing to browse yet', marketplaceDescription: 'Marketplace is planned for a future release. This view does not fetch, install, or list marketplace packages yet.',
|
|
12
|
+
marketplaceHint: 'Until then, the Downloaded tab lists the packages available in this workspace.',
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=messages.en.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { InstalledAgentPlugin, InstalledAgentPluginSkill, SetAgentPluginEnabledInput } from '@jini-ai/agent-plugins/lifecycle';
|
|
2
|
+
/** HTTP presentation projection; installation paths/digests never enter the browser. */
|
|
3
|
+
export interface AgentPluginSummary extends Pick<InstalledAgentPlugin, 'pluginId'> {
|
|
4
|
+
readonly version: InstalledAgentPlugin['version'] | null;
|
|
5
|
+
readonly description: InstalledAgentPlugin['description'] | null;
|
|
6
|
+
readonly keywords: NonNullable<InstalledAgentPlugin['keywords']>;
|
|
7
|
+
readonly skills: readonly (Pick<InstalledAgentPluginSkill, 'name'> & {
|
|
8
|
+
readonly summary: string;
|
|
9
|
+
})[];
|
|
10
|
+
readonly mcpServerIds: readonly string[];
|
|
11
|
+
readonly enabled: SetAgentPluginEnabledInput['enabled'];
|
|
12
|
+
}
|
|
13
|
+
export type AgentPluginActivationInput = Pick<SetAgentPluginEnabledInput, 'pluginId' | 'enabled'>;
|
|
14
|
+
export interface AgentPluginPackageFile {
|
|
15
|
+
readonly relativePath: string;
|
|
16
|
+
readonly sizeBytes: number;
|
|
17
|
+
readonly content: string | null;
|
|
18
|
+
readonly omitted: null | 'binary' | 'too-large' | 'symlink' | 'unreadable';
|
|
19
|
+
}
|
|
20
|
+
/** The existing read-only route's bounded listing, not lifecycle's on-disk files array. */
|
|
21
|
+
export interface AgentPluginFiles {
|
|
22
|
+
readonly pluginId: InstalledAgentPlugin['pluginId'];
|
|
23
|
+
readonly files: readonly AgentPluginPackageFile[];
|
|
24
|
+
readonly truncated: boolean;
|
|
25
|
+
readonly limits: {
|
|
26
|
+
readonly maxFiles: number;
|
|
27
|
+
readonly maxEntries: number;
|
|
28
|
+
readonly maxFileBytes: number;
|
|
29
|
+
readonly maxTotalBytes: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface AgentPluginRequestOptions {
|
|
33
|
+
readonly signal?: AbortSignal;
|
|
34
|
+
}
|
|
35
|
+
export type AgentPluginTab = 'installed' | 'downloaded' | 'marketplace';
|
|
36
|
+
export interface AgentPluginDisableRequest {
|
|
37
|
+
readonly pluginId: string;
|
|
38
|
+
readonly variant: 'disable' | 'remove';
|
|
39
|
+
}
|
|
40
|
+
export interface AgentPluginsState {
|
|
41
|
+
readonly plugins: readonly AgentPluginSummary[] | null;
|
|
42
|
+
readonly loading: boolean;
|
|
43
|
+
readonly error: string | null;
|
|
44
|
+
readonly actionError: string | null;
|
|
45
|
+
readonly busyIds: readonly string[];
|
|
46
|
+
readonly expandedIds: readonly string[];
|
|
47
|
+
readonly pendingDisable: AgentPluginDisableRequest | null;
|
|
48
|
+
readonly inspectedId: string | null;
|
|
49
|
+
}
|
|
50
|
+
export interface AgentPluginFilesState {
|
|
51
|
+
readonly pluginId: string | null;
|
|
52
|
+
readonly listing: AgentPluginFiles | null;
|
|
53
|
+
readonly loading: boolean;
|
|
54
|
+
readonly error: string | null;
|
|
55
|
+
readonly selectedPath: string;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Pure helpers behind `PackageFilesModal`'s VS Code-style file tree (2026-09-29): folding a
|
|
3
|
+
* package's flat `relativePath` list into folders, flattening the tree into the rows currently
|
|
4
|
+
* visible for a given expansion, which rows a keyboard key moves to, and each file's icon.
|
|
5
|
+
*
|
|
6
|
+
* No React here — `hooks/use-package-file-tree.hooks.ts` holds the expansion and focus state and
|
|
7
|
+
* calls these; the component only renders the rows it gets back.
|
|
8
|
+
*/
|
|
9
|
+
export interface PackageFileTreeFolder {
|
|
10
|
+
readonly kind: "folder";
|
|
11
|
+
readonly name: string;
|
|
12
|
+
/** Package-relative folder path, no trailing slash (`skills/deploy`). */
|
|
13
|
+
readonly path: string;
|
|
14
|
+
readonly children: readonly PackageFileTreeNode[];
|
|
15
|
+
}
|
|
16
|
+
export interface PackageFileTreeFile {
|
|
17
|
+
readonly kind: "file";
|
|
18
|
+
readonly name: string;
|
|
19
|
+
/** The file's full `relativePath`, as the listing gave it. */
|
|
20
|
+
readonly path: string;
|
|
21
|
+
}
|
|
22
|
+
export type PackageFileTreeNode = PackageFileTreeFolder | PackageFileTreeFile;
|
|
23
|
+
/** One rendered row of the tree: a node plus where it sits, for `aria-level`/`-setsize`/`-posinset`
|
|
24
|
+
* and the indentation guides. */
|
|
25
|
+
export interface PackageFileTreeRow {
|
|
26
|
+
readonly node: PackageFileTreeNode;
|
|
27
|
+
/** 0 for the package root's own entries. */
|
|
28
|
+
readonly depth: number;
|
|
29
|
+
/** The containing folder's path, `null` at the root. */
|
|
30
|
+
readonly parentPath: string | null;
|
|
31
|
+
readonly setSize: number;
|
|
32
|
+
/** 1-based, as `aria-posinset` wants. */
|
|
33
|
+
readonly posInSet: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Groups flat package-relative paths into a folder tree. Empty segments (a leading, trailing or
|
|
37
|
+
* doubled `/`) are ignored for grouping, so a stray slash can never produce a nameless folder; the
|
|
38
|
+
* file node still carries the path exactly as listed, since that is what selection is keyed by.
|
|
39
|
+
*
|
|
40
|
+
* @complexity O(n·d + n log n) for n paths of depth d.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildPackageFileTree({ paths }: {
|
|
43
|
+
paths: readonly string[];
|
|
44
|
+
}, _optional?: {}): PackageFileTreeNode[];
|
|
45
|
+
/**
|
|
46
|
+
* The path of the tree's top file row once every folder on the way is open — the first file in
|
|
47
|
+
* display order (files before folders, so a root file wins over anything nested); `null` for no files.
|
|
48
|
+
* @complexity O(nodes).
|
|
49
|
+
*/
|
|
50
|
+
export declare function firstPackageFilePath({ nodes }: {
|
|
51
|
+
nodes: readonly PackageFileTreeNode[];
|
|
52
|
+
}, _optional?: {}): string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Every folder path that contains `filePath` — the folders that start expanded so the selected
|
|
55
|
+
* file is visible when the dialog opens.
|
|
56
|
+
* @example ancestorFolderPaths("skills/deploy/SKILL.md") // ["skills", "skills/deploy"]
|
|
57
|
+
* @complexity O(d).
|
|
58
|
+
*/
|
|
59
|
+
export declare function ancestorFolderPaths({ filePath }: {
|
|
60
|
+
filePath: string;
|
|
61
|
+
}, _optional?: {}): string[];
|
|
62
|
+
/**
|
|
63
|
+
* The rows on screen, top to bottom: a collapsed folder's descendants are left out.
|
|
64
|
+
* @complexity O(visible rows).
|
|
65
|
+
*/
|
|
66
|
+
export declare function visiblePackageFileRows({ nodes, isExpanded }: {
|
|
67
|
+
nodes: readonly PackageFileTreeNode[];
|
|
68
|
+
isExpanded: (required: {
|
|
69
|
+
path: string;
|
|
70
|
+
}) => boolean;
|
|
71
|
+
}, _optional?: {}): PackageFileTreeRow[];
|
|
72
|
+
/** What one key press in the tree does. Every field is optional; an empty object means "not ours". */
|
|
73
|
+
export interface PackageFileTreeKeyAction {
|
|
74
|
+
/** Row path to move keyboard focus to. */
|
|
75
|
+
readonly focus?: string;
|
|
76
|
+
/** Folder to expand (`true`) or collapse (`false`). */
|
|
77
|
+
readonly setExpanded?: {
|
|
78
|
+
readonly path: string;
|
|
79
|
+
readonly expanded: boolean;
|
|
80
|
+
};
|
|
81
|
+
/** File to open in the content pane. */
|
|
82
|
+
readonly open?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The WAI-ARIA tree keyboard pattern, as VS Code's explorer does it: Up/Down move, Home/End jump,
|
|
86
|
+
* Right expands a closed folder or steps into an open one, Left collapses an open folder or steps
|
|
87
|
+
* out to the parent, Enter/Space opens a file or toggles a folder.
|
|
88
|
+
*
|
|
89
|
+
* @param rows The visible rows, from {@link visiblePackageFileRows}.
|
|
90
|
+
* @param currentPath The focused row's path.
|
|
91
|
+
* @complexity O(rows).
|
|
92
|
+
*/
|
|
93
|
+
export declare function packageFileTreeKeyAction({ rows, currentPath, key, isExpanded }: {
|
|
94
|
+
rows: readonly PackageFileTreeRow[];
|
|
95
|
+
currentPath: string;
|
|
96
|
+
key: string;
|
|
97
|
+
isExpanded: (required: {
|
|
98
|
+
path: string;
|
|
99
|
+
}) => boolean;
|
|
100
|
+
}, _optional?: {}): PackageFileTreeKeyAction;
|
|
101
|
+
/** Icon family for a file row; the component maps it to a RemixIcon glyph and a tint. */
|
|
102
|
+
export type PackageFileIconKind = "json" | "markdown" | "javascript" | "typescript" | "config" | "html" | "css" | "image" | "shell" | "text" | "file";
|
|
103
|
+
/**
|
|
104
|
+
* Picks a file's icon family from its extension (the text after the last `.`, case-insensitive).
|
|
105
|
+
* A dotfile with no other dot (`.env`) counts its whole name as the extension.
|
|
106
|
+
* @complexity O(name length).
|
|
107
|
+
*/
|
|
108
|
+
export declare function packageFileIconKind({ fileName }: {
|
|
109
|
+
fileName: string;
|
|
110
|
+
}, _optional?: {}): PackageFileIconKind;
|
|
111
|
+
//# sourceMappingURL=package-file-tree.d.ts.map
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Pure helpers behind `PackageFilesModal`'s VS Code-style file tree (2026-09-29): folding a
|
|
3
|
+
* package's flat `relativePath` list into folders, flattening the tree into the rows currently
|
|
4
|
+
* visible for a given expansion, which rows a keyboard key moves to, and each file's icon.
|
|
5
|
+
*
|
|
6
|
+
* No React here — `hooks/use-package-file-tree.hooks.ts` holds the expansion and focus state and
|
|
7
|
+
* calls these; the component only renders the rows it gets back.
|
|
8
|
+
*/
|
|
9
|
+
const collator = new Intl.Collator("en", { numeric: true, sensitivity: "base" });
|
|
10
|
+
/** Files first, then folders, each alphabetical (owner's call, 2026-09-29 — VS Code's default is the reverse). */
|
|
11
|
+
function compareNodes(a, b) {
|
|
12
|
+
if (a.kind !== b.kind)
|
|
13
|
+
return a.kind === "file" ? -1 : 1;
|
|
14
|
+
return collator.compare(a.name, b.name) || (a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
|
|
15
|
+
}
|
|
16
|
+
function freeze(folder, prefix) {
|
|
17
|
+
const nodes = [];
|
|
18
|
+
for (const [name, child] of folder.folders) {
|
|
19
|
+
const path = prefix ? `${prefix}/${name}` : name;
|
|
20
|
+
nodes.push({ kind: "folder", name, path, children: freeze(child, path) });
|
|
21
|
+
}
|
|
22
|
+
for (const file of folder.files)
|
|
23
|
+
nodes.push({ kind: "file", ...file });
|
|
24
|
+
return nodes.sort(compareNodes);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Groups flat package-relative paths into a folder tree. Empty segments (a leading, trailing or
|
|
28
|
+
* doubled `/`) are ignored for grouping, so a stray slash can never produce a nameless folder; the
|
|
29
|
+
* file node still carries the path exactly as listed, since that is what selection is keyed by.
|
|
30
|
+
*
|
|
31
|
+
* @complexity O(n·d + n log n) for n paths of depth d.
|
|
32
|
+
*/
|
|
33
|
+
export function buildPackageFileTree({ paths }, _optional = {}) {
|
|
34
|
+
const root = { folders: new Map(), files: [] };
|
|
35
|
+
const seen = new Set();
|
|
36
|
+
for (const path of paths) {
|
|
37
|
+
const segments = path.split("/").filter(Boolean);
|
|
38
|
+
const fileName = segments.pop();
|
|
39
|
+
if (!fileName)
|
|
40
|
+
continue;
|
|
41
|
+
let folder = root;
|
|
42
|
+
for (const segment of segments) {
|
|
43
|
+
let next = folder.folders.get(segment);
|
|
44
|
+
if (!next) {
|
|
45
|
+
next = { folders: new Map(), files: [] };
|
|
46
|
+
folder.folders.set(segment, next);
|
|
47
|
+
}
|
|
48
|
+
folder = next;
|
|
49
|
+
}
|
|
50
|
+
const normalized = [...segments, fileName].join("/");
|
|
51
|
+
if (seen.has(normalized))
|
|
52
|
+
continue;
|
|
53
|
+
seen.add(normalized);
|
|
54
|
+
folder.files.push({ name: fileName, path });
|
|
55
|
+
}
|
|
56
|
+
return freeze(root, "");
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The path of the tree's top file row once every folder on the way is open — the first file in
|
|
60
|
+
* display order (files before folders, so a root file wins over anything nested); `null` for no files.
|
|
61
|
+
* @complexity O(nodes).
|
|
62
|
+
*/
|
|
63
|
+
export function firstPackageFilePath({ nodes }, _optional = {}) {
|
|
64
|
+
for (const node of nodes) {
|
|
65
|
+
const path = node.kind === "file" ? node.path : firstPackageFilePath({ nodes: node.children });
|
|
66
|
+
if (path !== null)
|
|
67
|
+
return path;
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Every folder path that contains `filePath` — the folders that start expanded so the selected
|
|
73
|
+
* file is visible when the dialog opens.
|
|
74
|
+
* @example ancestorFolderPaths("skills/deploy/SKILL.md") // ["skills", "skills/deploy"]
|
|
75
|
+
* @complexity O(d).
|
|
76
|
+
*/
|
|
77
|
+
export function ancestorFolderPaths({ filePath }, _optional = {}) {
|
|
78
|
+
const segments = filePath.split("/").filter(Boolean);
|
|
79
|
+
segments.pop();
|
|
80
|
+
return segments.map((_, i) => segments.slice(0, i + 1).join("/"));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The rows on screen, top to bottom: a collapsed folder's descendants are left out.
|
|
84
|
+
* @complexity O(visible rows).
|
|
85
|
+
*/
|
|
86
|
+
export function visiblePackageFileRows({ nodes, isExpanded }, _optional = {}) {
|
|
87
|
+
const rows = [];
|
|
88
|
+
const walk = (level, depth, parentPath) => {
|
|
89
|
+
level.forEach((node, index) => {
|
|
90
|
+
rows.push({ node, depth, parentPath, setSize: level.length, posInSet: index + 1 });
|
|
91
|
+
if (node.kind === "folder" && isExpanded({ path: node.path }))
|
|
92
|
+
walk(node.children, depth + 1, node.path);
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
walk(nodes, 0, null);
|
|
96
|
+
return rows;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The WAI-ARIA tree keyboard pattern, as VS Code's explorer does it: Up/Down move, Home/End jump,
|
|
100
|
+
* Right expands a closed folder or steps into an open one, Left collapses an open folder or steps
|
|
101
|
+
* out to the parent, Enter/Space opens a file or toggles a folder.
|
|
102
|
+
*
|
|
103
|
+
* @param rows The visible rows, from {@link visiblePackageFileRows}.
|
|
104
|
+
* @param currentPath The focused row's path.
|
|
105
|
+
* @complexity O(rows).
|
|
106
|
+
*/
|
|
107
|
+
export function packageFileTreeKeyAction({ rows, currentPath, key, isExpanded }, _optional = {}) {
|
|
108
|
+
if (rows.length === 0)
|
|
109
|
+
return {};
|
|
110
|
+
const index = Math.max(0, rows.findIndex((row) => row.node.path === currentPath));
|
|
111
|
+
const row = rows[index];
|
|
112
|
+
const node = row.node;
|
|
113
|
+
const open = node.kind === "folder" && isExpanded({ path: node.path });
|
|
114
|
+
switch (key) {
|
|
115
|
+
case "ArrowDown":
|
|
116
|
+
return { focus: rows[Math.min(index + 1, rows.length - 1)].node.path };
|
|
117
|
+
case "ArrowUp":
|
|
118
|
+
return { focus: rows[Math.max(index - 1, 0)].node.path };
|
|
119
|
+
case "Home":
|
|
120
|
+
return { focus: rows[0].node.path };
|
|
121
|
+
case "End":
|
|
122
|
+
return { focus: rows[rows.length - 1].node.path };
|
|
123
|
+
case "ArrowRight":
|
|
124
|
+
if (node.kind !== "folder")
|
|
125
|
+
return { focus: node.path };
|
|
126
|
+
if (!open)
|
|
127
|
+
return { focus: node.path, setExpanded: { path: node.path, expanded: true } };
|
|
128
|
+
return { focus: rows[index + 1]?.parentPath === node.path ? rows[index + 1].node.path : node.path };
|
|
129
|
+
case "ArrowLeft":
|
|
130
|
+
if (open)
|
|
131
|
+
return { focus: node.path, setExpanded: { path: node.path, expanded: false } };
|
|
132
|
+
return { focus: row.parentPath ?? node.path };
|
|
133
|
+
case "Enter":
|
|
134
|
+
case " ":
|
|
135
|
+
if (node.kind === "file")
|
|
136
|
+
return { focus: node.path, open: node.path };
|
|
137
|
+
return { focus: node.path, setExpanded: { path: node.path, expanded: !open } };
|
|
138
|
+
default:
|
|
139
|
+
return {};
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const ICON_KIND_BY_EXTENSION = {
|
|
143
|
+
json: "json",
|
|
144
|
+
jsonc: "json",
|
|
145
|
+
md: "markdown",
|
|
146
|
+
mdx: "markdown",
|
|
147
|
+
js: "javascript",
|
|
148
|
+
mjs: "javascript",
|
|
149
|
+
cjs: "javascript",
|
|
150
|
+
jsx: "javascript",
|
|
151
|
+
ts: "typescript",
|
|
152
|
+
mts: "typescript",
|
|
153
|
+
cts: "typescript",
|
|
154
|
+
tsx: "typescript",
|
|
155
|
+
yml: "config",
|
|
156
|
+
yaml: "config",
|
|
157
|
+
toml: "config",
|
|
158
|
+
ini: "config",
|
|
159
|
+
env: "config",
|
|
160
|
+
html: "html",
|
|
161
|
+
htm: "html",
|
|
162
|
+
css: "css",
|
|
163
|
+
scss: "css",
|
|
164
|
+
png: "image",
|
|
165
|
+
jpg: "image",
|
|
166
|
+
jpeg: "image",
|
|
167
|
+
gif: "image",
|
|
168
|
+
svg: "image",
|
|
169
|
+
webp: "image",
|
|
170
|
+
ico: "image",
|
|
171
|
+
sh: "shell",
|
|
172
|
+
bash: "shell",
|
|
173
|
+
zsh: "shell",
|
|
174
|
+
txt: "text",
|
|
175
|
+
log: "text",
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Picks a file's icon family from its extension (the text after the last `.`, case-insensitive).
|
|
179
|
+
* A dotfile with no other dot (`.env`) counts its whole name as the extension.
|
|
180
|
+
* @complexity O(name length).
|
|
181
|
+
*/
|
|
182
|
+
export function packageFileIconKind({ fileName }, _optional = {}) {
|
|
183
|
+
const dot = fileName.lastIndexOf(".");
|
|
184
|
+
if (dot < 0)
|
|
185
|
+
return "file";
|
|
186
|
+
return ICON_KIND_BY_EXTENSION[fileName.slice(dot + 1).toLowerCase()] ?? "file";
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=package-file-tree.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AgentPluginActivationInput, AgentPluginSummary, AgentPluginFiles, AgentPluginRequestOptions } from './models.js';
|
|
2
|
+
/** Host owns lifecycle effects and authorization. Both list tabs read this same workspace scope. */
|
|
3
|
+
export interface AgentPluginsApiPort {
|
|
4
|
+
list(required: Record<string, never>, optional?: AgentPluginRequestOptions): Promise<readonly AgentPluginSummary[]>;
|
|
5
|
+
setEnabled(required: AgentPluginActivationInput, optional?: AgentPluginRequestOptions): Promise<AgentPluginSummary>;
|
|
6
|
+
files(required: {
|
|
7
|
+
readonly pluginId: string;
|
|
8
|
+
}, optional?: AgentPluginRequestOptions): Promise<AgentPluginFiles>;
|
|
9
|
+
}
|
|
10
|
+
export interface AgentPluginsTransportPort {
|
|
11
|
+
request<T>(required: {
|
|
12
|
+
readonly path: string;
|
|
13
|
+
readonly method: 'GET' | 'PATCH';
|
|
14
|
+
readonly body?: unknown;
|
|
15
|
+
}, optional?: AgentPluginRequestOptions): Promise<T>;
|
|
16
|
+
}
|
|
17
|
+
export declare const agentPluginsApiToken: import("../core/module/token.js").AdminPortToken<AgentPluginsApiPort, "admin.agent-plugins.api">;
|
|
18
|
+
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import { Button } from '@jini-ai/ui-kit/react';
|
|
4
|
+
import { useAgentPluginFileContent } from '../hooks/AgentPluginInspector.hooks.js';
|
|
5
|
+
export function AgentPluginFileContent({ file }, _optional = {}) {
|
|
6
|
+
const vm = useAgentPluginFileContent({ file });
|
|
7
|
+
return _jsxs("section", { "aria-labelledby": vm.headingId, children: [_jsx("h3", { id: vm.headingId, children: vm.segments.map((segment, i) => _jsxs("span", { children: [segment.text, segment.slash && _jsxs(_Fragment, { children: [_jsx("span", { children: "/" }), _jsx("wbr", {})] })] }, i)) }), vm.hasContent ? _jsxs(_Fragment, { children: [_jsx(Button, { attrs: vm.wrapAttrs, onPress: vm.toggleWrap, children: vm.wrapText }), _jsx("div", { style: vm.codeStyle, children: vm.lines.map(line => _jsxs(Fragment, { children: [_jsxs("span", { "aria-hidden": true, children: [line.number, " "] }), _jsx("code", { style: vm.lineStyle, children: line.text })] }, line.number)) })] }) : _jsx("p", { role: "status", children: vm.notice })] });
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=AgentPluginFileContent.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AgentPluginPackageFile } from '../../models.js';
|
|
2
|
+
export declare function AgentPluginFileTree({ files, selectedPath, onOpen }: {
|
|
3
|
+
files: readonly AgentPluginPackageFile[];
|
|
4
|
+
selectedPath: string | null;
|
|
5
|
+
onOpen: (required: {
|
|
6
|
+
path: string;
|
|
7
|
+
}) => void;
|
|
8
|
+
}, _optional?: {}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=AgentPluginFileTree.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useAgentPluginFileTree } from '../hooks/AgentPluginInspector.hooks.js';
|
|
3
|
+
export function AgentPluginFileTree({ files, selectedPath, onOpen }, _optional = {}) {
|
|
4
|
+
const vm = useAgentPluginFileTree({ files, selectedPath, onOpen });
|
|
5
|
+
return _jsx("div", { ref: vm.treeRef, role: "tree", "aria-label": "Package files", onKeyDown: vm.onKeyDown, children: vm.rows.map(row => _jsxs("div", { role: "treeitem", "aria-label": row.name, "aria-level": row.depth, "aria-setsize": row.setSize, "aria-posinset": row.posInSet, "aria-expanded": row.expanded, "aria-selected": row.selected, tabIndex: row.tabIndex, title: row.path, "data-tree-path": row.path, style: row.indent, onClick: row.onClick, onFocus: row.onFocus, children: [_jsxs("span", { "aria-hidden": true, children: [row.icon, " "] }), row.name] }, row.key)) });
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=AgentPluginFileTree.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog, Notice } from '@jini-ai/ui-kit/react';
|
|
3
|
+
import { useAgentPluginInspector } from '../hooks/AgentPluginInspector.hooks.js';
|
|
4
|
+
import { AgentPluginFileTree } from './AgentPluginFileTree.js';
|
|
5
|
+
import { AgentPluginFileContent } from './AgentPluginFileContent.js';
|
|
6
|
+
import { agentPluginsMessagesEn as m } from '../../messages.en.js';
|
|
7
|
+
export function AgentPluginInspector(props, _optional = {}) {
|
|
8
|
+
const vm = useAgentPluginInspector(props);
|
|
9
|
+
return _jsx(Dialog, { open: true, title: vm.title, closeLabel: "Close package files", onClose: props.onClose, children: vm.denied ? _jsx(Notice, { tone: "danger", children: m.denied }) : _jsxs(_Fragment, { children: [vm.listNotice && _jsx("p", { role: "note", children: vm.listNotice }), _jsx(AgentPluginFileTree, { files: vm.files, selectedPath: vm.selectedPath, onOpen: vm.select }), vm.selected ? _jsx(AgentPluginFileContent, { file: vm.selected }, vm.selected.relativePath) : vm.status && _jsx("p", { role: vm.status.role, children: vm.status.text })] }) });
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=AgentPluginInspector.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TabViewProps } from '../../../react/bind-react.js';
|
|
2
|
+
export declare function AgentPluginListPanel({ props, mode }: {
|
|
3
|
+
props: TabViewProps;
|
|
4
|
+
mode: 'installed' | 'downloaded';
|
|
5
|
+
}, _optional?: {}): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=AgentPluginListPanel.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Notice, Spinner } from '@jini-ai/ui-kit/react';
|
|
3
|
+
import { useAgentPluginPanel } from '../hooks/AgentPluginPanel.hooks.js';
|
|
4
|
+
import { AgentPluginRow } from './AgentPluginRow.js';
|
|
5
|
+
import { agentPluginsMessagesEn as m } from '../../messages.en.js';
|
|
6
|
+
export function AgentPluginListPanel({ props, mode }, _optional = {}) {
|
|
7
|
+
const vm = useAgentPluginPanel({ props, mode });
|
|
8
|
+
return vm.denied ? _jsx(Notice, { tone: "danger", children: m.denied }) : _jsxs("section", { "aria-label": vm.label, children: [_jsx("p", { children: vm.lede }), vm.error && _jsx(Notice, { tone: "danger", children: vm.error }), vm.loading && _jsx(Spinner, { label: m.loading }), vm.actionError && _jsx("p", { role: "alert", children: vm.actionError }), vm.empty && _jsx("p", { role: "status", children: m.empty }), _jsx(Button, { onPress: vm.reload, children: "Reload packages" }), _jsx("ul", { children: vm.rows.map(row => _jsx(AgentPluginRow, { row: row }, row.id)) }), _jsx("p", { id: vm.uninstallNoteId, children: vm.uninstallNotice }), _jsxs("p", { children: ["Package format: ", _jsx("a", { href: vm.specUrl, target: "_blank", rel: "noreferrer", children: "Agent Plugins open standard" })] })] });
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=AgentPluginListPanel.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Badge, Button, IconButton, Switch } from '@jini-ai/ui-kit/react';
|
|
3
|
+
import { useAgentPluginRow } from '../hooks/AgentPluginRow.hooks.js';
|
|
4
|
+
export function AgentPluginRow({ row }, _optional = {}) {
|
|
5
|
+
const vm = useAgentPluginRow({ row });
|
|
6
|
+
return _jsxs("li", { "data-jini-part": "agent-plugins.row", children: [_jsx("span", { "aria-hidden": true, children: vm.glyph }), _jsxs("h3", { children: [vm.name, " ", vm.version && _jsx("small", { children: vm.version })] }), vm.description && _jsx("p", { children: vm.description }), _jsx(Badge, { children: vm.stateLabel }), vm.installed ? _jsx(Switch, { label: vm.toggleLabel, checked: vm.enabled, disabled: !vm.canWrite || vm.busy, onCheckedChange: vm.toggle }) : _jsx(Button, { attrs: vm.actionAttrs, disabled: !vm.canWrite || vm.busy, pending: vm.busy, onPress: vm.act, children: vm.actionText }), _jsx(Button, { attrs: vm.expandAttrs, onPress: vm.expand, children: "Details" }), _jsx(IconButton, { label: vm.inspectLabel, attrs: vm.inspectAttrs, onPress: vm.inspect, children: "Inspect" }), _jsx(IconButton, { label: vm.uninstallLabel, attrs: vm.uninstallAttrs, disabled: true, children: "Uninstall" }), _jsxs("div", { id: vm.detailId, hidden: vm.detailHidden, children: [vm.description && _jsx("p", { children: vm.description }), vm.hasSkills && _jsxs("section", { "aria-label": "Portable components", children: [_jsx("h4", { children: "Portable components" }), _jsx("ul", { children: vm.skills.map(skill => _jsxs("li", { children: [_jsx("strong", { children: skill.name }), _jsx("p", { children: skill.summary })] }, skill.name)) })] }), vm.hasServers && _jsxs("section", { "aria-label": "MCP servers", children: [_jsx("h4", { children: "MCP servers" }), _jsx("ul", { children: vm.servers.map(id => _jsx("li", { children: id }, id)) })] }), vm.hasKeywords && _jsxs("section", { "aria-label": "Keywords", children: [_jsx("h4", { children: "Keywords" }), _jsx("ul", { children: vm.keywords.map(word => _jsx("li", { children: word }, word)) })] })] })] });
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=AgentPluginRow.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type KeyboardEvent } from 'react';
|
|
2
|
+
import type { AgentPluginPackageFile } from '../../models.js';
|
|
3
|
+
export interface AgentPluginInspectorProps {
|
|
4
|
+
readonly pluginId: string;
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly permissions: readonly string[];
|
|
7
|
+
readonly onClose: (required: Record<string, never>, optional?: Record<string, never>) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useAgentPluginInspector({ pluginId, permissions, name }: AgentPluginInspectorProps, _optional?: {}): {
|
|
10
|
+
title: string;
|
|
11
|
+
denied: boolean;
|
|
12
|
+
files: readonly AgentPluginPackageFile[];
|
|
13
|
+
selected: AgentPluginPackageFile | null;
|
|
14
|
+
selectedPath: string | null;
|
|
15
|
+
status: {
|
|
16
|
+
text: string;
|
|
17
|
+
role: "alert";
|
|
18
|
+
} | {
|
|
19
|
+
text: "Loading package files…";
|
|
20
|
+
role: "status";
|
|
21
|
+
} | {
|
|
22
|
+
text: "No files to show for this plugin.";
|
|
23
|
+
role: "status";
|
|
24
|
+
} | null;
|
|
25
|
+
listNotice: "Some files are not listed: this package is larger than the viewer’s limits." | null;
|
|
26
|
+
select({ path }: {
|
|
27
|
+
path: string;
|
|
28
|
+
}, _optional?: {}): void;
|
|
29
|
+
};
|
|
30
|
+
export declare function useAgentPluginFileTree({ files, selectedPath, onOpen }: {
|
|
31
|
+
files: readonly AgentPluginPackageFile[];
|
|
32
|
+
selectedPath: string | null;
|
|
33
|
+
onOpen: (required: {
|
|
34
|
+
path: string;
|
|
35
|
+
}, optional?: Record<string, never>) => void;
|
|
36
|
+
}, _optional?: {}): {
|
|
37
|
+
treeRef: import("react").RefObject<HTMLDivElement | null>;
|
|
38
|
+
rows: {
|
|
39
|
+
key: string;
|
|
40
|
+
name: string;
|
|
41
|
+
path: string;
|
|
42
|
+
depth: number;
|
|
43
|
+
setSize: number;
|
|
44
|
+
posInSet: number;
|
|
45
|
+
expanded: boolean | undefined;
|
|
46
|
+
selected: boolean | undefined;
|
|
47
|
+
tabIndex: number;
|
|
48
|
+
icon: string;
|
|
49
|
+
indent: {
|
|
50
|
+
backgroundColor?: string;
|
|
51
|
+
color?: string;
|
|
52
|
+
paddingInlineStart: string;
|
|
53
|
+
};
|
|
54
|
+
onClick(): void;
|
|
55
|
+
onFocus(): void;
|
|
56
|
+
}[];
|
|
57
|
+
onKeyDown(event: KeyboardEvent<HTMLElement>): void;
|
|
58
|
+
};
|
|
59
|
+
export declare function useAgentPluginFileContent({ file }: {
|
|
60
|
+
file: NonNullable<ReturnType<typeof useAgentPluginInspector>['selected']>;
|
|
61
|
+
}, _optional?: {}): {
|
|
62
|
+
headingId: string;
|
|
63
|
+
path: string;
|
|
64
|
+
segments: {
|
|
65
|
+
text: string;
|
|
66
|
+
slash: boolean;
|
|
67
|
+
}[];
|
|
68
|
+
notice: string | null;
|
|
69
|
+
hasContent: boolean;
|
|
70
|
+
lines: {
|
|
71
|
+
text: string;
|
|
72
|
+
number: number;
|
|
73
|
+
}[];
|
|
74
|
+
wrap: boolean;
|
|
75
|
+
wrapAttrs: {
|
|
76
|
+
'aria-pressed': boolean;
|
|
77
|
+
};
|
|
78
|
+
wrapText: string;
|
|
79
|
+
codeStyle: {
|
|
80
|
+
display: string;
|
|
81
|
+
gridTemplateColumns: string;
|
|
82
|
+
overflow: string;
|
|
83
|
+
};
|
|
84
|
+
lineStyle: {
|
|
85
|
+
whiteSpace: "pre" | "pre-wrap";
|
|
86
|
+
overflowWrap: "anywhere" | "normal";
|
|
87
|
+
};
|
|
88
|
+
toggleWrap(_required: Record<string, never>, _optional?: {}): void;
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=AgentPluginInspector.hooks.d.ts.map
|