@knowledge-medium/agent-cli 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 +21 -0
- package/README.md +161 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +908 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +29 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +91 -0
- package/dist/config.js.map +1 -0
- package/dist/kernel-types/assets.d.ts +14 -0
- package/dist/kernel-types/packages/agent-cli/src/protocol.d.ts +470 -0
- package/dist/kernel-types/packages/agent-cli/src/protocol.d.ts.map +1 -0
- package/dist/kernel-types/src/App.d.ts +3 -0
- package/dist/kernel-types/src/App.d.ts.map +1 -0
- package/dist/kernel-types/src/components/BlockComponent.d.ts +21 -0
- package/dist/kernel-types/src/components/BlockComponent.d.ts.map +1 -0
- package/dist/kernel-types/src/components/BlockEditor.d.ts +18 -0
- package/dist/kernel-types/src/components/BlockEditor.d.ts.map +1 -0
- package/dist/kernel-types/src/components/BlockLoadingPlaceholder.d.ts +15 -0
- package/dist/kernel-types/src/components/BlockLoadingPlaceholder.d.ts.map +1 -0
- package/dist/kernel-types/src/components/BlockProperties.d.ts +12 -0
- package/dist/kernel-types/src/components/BlockProperties.d.ts.map +1 -0
- package/dist/kernel-types/src/components/Header.d.ts +2 -0
- package/dist/kernel-types/src/components/Header.d.ts.map +1 -0
- package/dist/kernel-types/src/components/LazyBlockComponent.d.ts +29 -0
- package/dist/kernel-types/src/components/LazyBlockComponent.d.ts.map +1 -0
- package/dist/kernel-types/src/components/Login.d.ts +12 -0
- package/dist/kernel-types/src/components/Login.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyEditors/RefPropertyEditor.d.ts +13 -0
- package/dist/kernel-types/src/components/propertyEditors/RefPropertyEditor.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyEditors/RefTargetTypePicker.d.ts +7 -0
- package/dist/kernel-types/src/components/propertyEditors/RefTargetTypePicker.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyEditors/TypesPropertyEditor.d.ts +3 -0
- package/dist/kernel-types/src/components/propertyEditors/TypesPropertyEditor.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyEditors/defaults.d.ts +84 -0
- package/dist/kernel-types/src/components/propertyEditors/defaults.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyEditors/kernelValuePresets.d.ts +7 -0
- package/dist/kernel-types/src/components/propertyEditors/kernelValuePresets.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyEditors/refPropertyEditorOverride.d.ts +9 -0
- package/dist/kernel-types/src/components/propertyEditors/refPropertyEditorOverride.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyEditors/typesPropertyUi.d.ts +7 -0
- package/dist/kernel-types/src/components/propertyEditors/typesPropertyUi.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/AddPropertyForm.d.ts +16 -0
- package/dist/kernel-types/src/components/propertyPanel/AddPropertyForm.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/PropertyPicker.d.ts +54 -0
- package/dist/kernel-types/src/components/propertyPanel/PropertyPicker.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/PropertyRow.d.ts +21 -0
- package/dist/kernel-types/src/components/propertyPanel/PropertyRow.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/Rows.d.ts +8 -0
- package/dist/kernel-types/src/components/propertyPanel/Rows.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/actions.d.ts +26 -0
- package/dist/kernel-types/src/components/propertyPanel/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/layout.d.ts +7 -0
- package/dist/kernel-types/src/components/propertyPanel/layout.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/model.d.ts +58 -0
- package/dist/kernel-types/src/components/propertyPanel/model.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/shapeUi.d.ts +32 -0
- package/dist/kernel-types/src/components/propertyPanel/shapeUi.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/shapes.d.ts +6 -0
- package/dist/kernel-types/src/components/propertyPanel/shapes.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanel/visibility.d.ts +10 -0
- package/dist/kernel-types/src/components/propertyPanel/visibility.d.ts.map +1 -0
- package/dist/kernel-types/src/components/propertyPanelSections.d.ts +20 -0
- package/dist/kernel-types/src/components/propertyPanelSections.d.ts.map +1 -0
- package/dist/kernel-types/src/components/references/BlockEmbed.d.ts +4 -0
- package/dist/kernel-types/src/components/references/BlockEmbed.d.ts.map +1 -0
- package/dist/kernel-types/src/components/references/BlockRef.d.ts +6 -0
- package/dist/kernel-types/src/components/references/BlockRef.d.ts.map +1 -0
- package/dist/kernel-types/src/components/references/cycleGuard.d.ts +6 -0
- package/dist/kernel-types/src/components/references/cycleGuard.d.ts.map +1 -0
- package/dist/kernel-types/src/components/references/cycleGuardContext.d.ts +2 -0
- package/dist/kernel-types/src/components/references/cycleGuardContext.d.ts.map +1 -0
- package/dist/kernel-types/src/components/references/useBlockRefAncestors.d.ts +2 -0
- package/dist/kernel-types/src/components/references/useBlockRefAncestors.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/BlockTypeBlockRenderer.d.ts +12 -0
- package/dist/kernel-types/src/components/renderer/BlockTypeBlockRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/CodeMirrorContentRenderer.d.ts +3 -0
- package/dist/kernel-types/src/components/renderer/CodeMirrorContentRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/CodeMirrorExtensionBlockRenderer.d.ts +3 -0
- package/dist/kernel-types/src/components/renderer/CodeMirrorExtensionBlockRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/DefaultBlockRenderer.d.ts +26 -0
- package/dist/kernel-types/src/components/renderer/DefaultBlockRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/LayoutRenderer.d.ts +7 -0
- package/dist/kernel-types/src/components/renderer/LayoutRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/MarkdownContentRenderer.d.ts +9 -0
- package/dist/kernel-types/src/components/renderer/MarkdownContentRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/MissingDataRenderer.d.ts +7 -0
- package/dist/kernel-types/src/components/renderer/MissingDataRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/PanelRenderer.d.ts +7 -0
- package/dist/kernel-types/src/components/renderer/PanelRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/PropertySchemaBlockRenderer.d.ts +12 -0
- package/dist/kernel-types/src/components/renderer/PropertySchemaBlockRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/TopLevelRenderer.d.ts +7 -0
- package/dist/kernel-types/src/components/renderer/TopLevelRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/renderer/TypesPageBlockRenderer.d.ts +7 -0
- package/dist/kernel-types/src/components/renderer/TypesPageBlockRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/anchored-floating.d.ts +25 -0
- package/dist/kernel-types/src/components/ui/anchored-floating.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/button.d.ts +15 -0
- package/dist/kernel-types/src/components/ui/button.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/card.d.ts +27 -0
- package/dist/kernel-types/src/components/ui/card.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/checkbox.d.ts +8 -0
- package/dist/kernel-types/src/components/ui/checkbox.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/collapsible.d.ts +6 -0
- package/dist/kernel-types/src/components/ui/collapsible.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/command.d.ts +45 -0
- package/dist/kernel-types/src/components/ui/command.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/context-menu.d.ts +52 -0
- package/dist/kernel-types/src/components/ui/context-menu.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/dialog.d.ts +32 -0
- package/dist/kernel-types/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/dropdown-menu.d.ts +52 -0
- package/dist/kernel-types/src/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/floating-listbox.d.ts +20 -0
- package/dist/kernel-types/src/components/ui/floating-listbox.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/index.d.ts +6 -0
- package/dist/kernel-types/src/components/ui/index.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/input.d.ts +8 -0
- package/dist/kernel-types/src/components/ui/input.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/kbd.d.ts +4 -0
- package/dist/kernel-types/src/components/ui/kbd.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/label.d.ts +11 -0
- package/dist/kernel-types/src/components/ui/label.d.ts.map +1 -0
- package/dist/kernel-types/src/components/ui/textarea.d.ts +8 -0
- package/dist/kernel-types/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/kernel-types/src/components/util/LazyViewportMount.d.ts +22 -0
- package/dist/kernel-types/src/components/util/LazyViewportMount.d.ts.map +1 -0
- package/dist/kernel-types/src/components/util/error.d.ts +4 -0
- package/dist/kernel-types/src/components/util/error.d.ts.map +1 -0
- package/dist/kernel-types/src/components/util/suspense.d.ts +2 -0
- package/dist/kernel-types/src/components/util/suspense.d.ts.map +1 -0
- package/dist/kernel-types/src/components/workspace/CreateWorkspaceDialog.d.ts +9 -0
- package/dist/kernel-types/src/components/workspace/CreateWorkspaceDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/components/workspace/PendingInvitations.d.ts +2 -0
- package/dist/kernel-types/src/components/workspace/PendingInvitations.d.ts.map +1 -0
- package/dist/kernel-types/src/components/workspace/WorkspaceSettingsDialog.d.ts +10 -0
- package/dist/kernel-types/src/components/workspace/WorkspaceSettingsDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/components/workspace/WorkspaceSwitcher.d.ts +4 -0
- package/dist/kernel-types/src/components/workspace/WorkspaceSwitcher.d.ts.map +1 -0
- package/dist/kernel-types/src/context/block.d.ts +13 -0
- package/dist/kernel-types/src/context/block.d.ts.map +1 -0
- package/dist/kernel-types/src/context/repo.d.ts +7 -0
- package/dist/kernel-types/src/context/repo.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/blockData.d.ts +73 -0
- package/dist/kernel-types/src/data/api/blockData.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/blockType.d.ts +19 -0
- package/dist/kernel-types/src/data/api/blockType.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/changeScope.d.ts +62 -0
- package/dist/kernel-types/src/data/api/changeScope.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/codecs.d.ts +72 -0
- package/dist/kernel-types/src/data/api/codecs.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/errors.d.ts +108 -0
- package/dist/kernel-types/src/data/api/errors.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/events.d.ts +19 -0
- package/dist/kernel-types/src/data/api/events.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/handle.d.ts +17 -0
- package/dist/kernel-types/src/data/api/handle.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/index.d.ts +20 -0
- package/dist/kernel-types/src/data/api/index.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/mutator.d.ts +42 -0
- package/dist/kernel-types/src/data/api/mutator.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/processor.d.ts +115 -0
- package/dist/kernel-types/src/data/api/processor.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/propertySchema.d.ts +90 -0
- package/dist/kernel-types/src/data/api/propertySchema.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/query.d.ts +81 -0
- package/dist/kernel-types/src/data/api/query.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/sameTxProcessor.d.ts +112 -0
- package/dist/kernel-types/src/data/api/sameTxProcessor.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/schema.d.ts +8 -0
- package/dist/kernel-types/src/data/api/schema.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/tx.d.ts +142 -0
- package/dist/kernel-types/src/data/api/tx.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/typedBlockQuery.d.ts +115 -0
- package/dist/kernel-types/src/data/api/typedBlockQuery.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/user.d.ts +9 -0
- package/dist/kernel-types/src/data/api/user.d.ts.map +1 -0
- package/dist/kernel-types/src/data/api/valuePresets.d.ts +56 -0
- package/dist/kernel-types/src/data/api/valuePresets.d.ts.map +1 -0
- package/dist/kernel-types/src/data/block.d.ts +140 -0
- package/dist/kernel-types/src/data/block.d.ts.map +1 -0
- package/dist/kernel-types/src/data/blockCache.d.ts +114 -0
- package/dist/kernel-types/src/data/blockCache.d.ts.map +1 -0
- package/dist/kernel-types/src/data/blockSchema.d.ts +102 -0
- package/dist/kernel-types/src/data/blockSchema.d.ts.map +1 -0
- package/dist/kernel-types/src/data/blockTypes.d.ts +21 -0
- package/dist/kernel-types/src/data/blockTypes.d.ts.map +1 -0
- package/dist/kernel-types/src/data/facets.d.ts +67 -0
- package/dist/kernel-types/src/data/facets.d.ts.map +1 -0
- package/dist/kernel-types/src/data/globalState.d.ts +72 -0
- package/dist/kernel-types/src/data/globalState.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/clientSchema.d.ts +273 -0
- package/dist/kernel-types/src/data/internals/clientSchema.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/commitPipeline.d.ts +127 -0
- package/dist/kernel-types/src/data/internals/commitPipeline.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/coreProperties.d.ts +16 -0
- package/dist/kernel-types/src/data/internals/coreProperties.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/handleStore.d.ts +366 -0
- package/dist/kernel-types/src/data/internals/handleStore.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/kernelInvalidation.d.ts +77 -0
- package/dist/kernel-types/src/data/internals/kernelInvalidation.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/kernelMutators.d.ts +174 -0
- package/dist/kernel-types/src/data/internals/kernelMutators.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/kernelProcessors.d.ts +3 -0
- package/dist/kernel-types/src/data/internals/kernelProcessors.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/kernelQueries.d.ts +225 -0
- package/dist/kernel-types/src/data/internals/kernelQueries.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/mergeProperties.d.ts +21 -0
- package/dist/kernel-types/src/data/internals/mergeProperties.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/normalizeReferencesProcessor.d.ts +28 -0
- package/dist/kernel-types/src/data/internals/normalizeReferencesProcessor.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/processorRunner.d.ts +95 -0
- package/dist/kernel-types/src/data/internals/processorRunner.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/rowEventsTail.d.ts +70 -0
- package/dist/kernel-types/src/data/internals/rowEventsTail.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/timingMetrics.d.ts +115 -0
- package/dist/kernel-types/src/data/internals/timingMetrics.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/treeQueries.d.ts +87 -0
- package/dist/kernel-types/src/data/internals/treeQueries.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/txEngine.d.ts +155 -0
- package/dist/kernel-types/src/data/internals/txEngine.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/txSnapshots.d.ts +32 -0
- package/dist/kernel-types/src/data/internals/txSnapshots.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/typedBlockQuery.d.ts +37 -0
- package/dist/kernel-types/src/data/internals/typedBlockQuery.d.ts.map +1 -0
- package/dist/kernel-types/src/data/internals/undoManager.d.ts +88 -0
- package/dist/kernel-types/src/data/internals/undoManager.d.ts.map +1 -0
- package/dist/kernel-types/src/data/invalidation.d.ts +47 -0
- package/dist/kernel-types/src/data/invalidation.d.ts.map +1 -0
- package/dist/kernel-types/src/data/kernelDataExtension.d.ts +32 -0
- package/dist/kernel-types/src/data/kernelDataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/data/kernelPage.d.ts +36 -0
- package/dist/kernel-types/src/data/kernelPage.d.ts.map +1 -0
- package/dist/kernel-types/src/data/localSchema.d.ts +5 -0
- package/dist/kernel-types/src/data/localSchema.d.ts.map +1 -0
- package/dist/kernel-types/src/data/metricsConsoleHook.d.ts +22 -0
- package/dist/kernel-types/src/data/metricsConsoleHook.d.ts.map +1 -0
- package/dist/kernel-types/src/data/orderKey.d.ts +38 -0
- package/dist/kernel-types/src/data/orderKey.d.ts.map +1 -0
- package/dist/kernel-types/src/data/pluginStateExtensions.d.ts +27 -0
- package/dist/kernel-types/src/data/pluginStateExtensions.d.ts.map +1 -0
- package/dist/kernel-types/src/data/properties.d.ts +137 -0
- package/dist/kernel-types/src/data/properties.d.ts.map +1 -0
- package/dist/kernel-types/src/data/propertiesPage.d.ts +8 -0
- package/dist/kernel-types/src/data/propertiesPage.d.ts.map +1 -0
- package/dist/kernel-types/src/data/repo.d.ts +745 -0
- package/dist/kernel-types/src/data/repo.d.ts.map +1 -0
- package/dist/kernel-types/src/data/repoProvider.d.ts +35 -0
- package/dist/kernel-types/src/data/repoProvider.d.ts.map +1 -0
- package/dist/kernel-types/src/data/stateBlocks.d.ts +57 -0
- package/dist/kernel-types/src/data/stateBlocks.d.ts.map +1 -0
- package/dist/kernel-types/src/data/targets.d.ts +130 -0
- package/dist/kernel-types/src/data/targets.d.ts.map +1 -0
- package/dist/kernel-types/src/data/typeExtraction.d.ts +136 -0
- package/dist/kernel-types/src/data/typeExtraction.d.ts.map +1 -0
- package/dist/kernel-types/src/data/typesPage.d.ts +8 -0
- package/dist/kernel-types/src/data/typesPage.d.ts.map +1 -0
- package/dist/kernel-types/src/data/userPrefs.d.ts +7 -0
- package/dist/kernel-types/src/data/userPrefs.d.ts.map +1 -0
- package/dist/kernel-types/src/data/userSchemasService.d.ts +73 -0
- package/dist/kernel-types/src/data/userSchemasService.d.ts.map +1 -0
- package/dist/kernel-types/src/data/userTypesService.d.ts +70 -0
- package/dist/kernel-types/src/data/userTypesService.d.ts.map +1 -0
- package/dist/kernel-types/src/data/workspaceSchema.d.ts +49 -0
- package/dist/kernel-types/src/data/workspaceSchema.d.ts.map +1 -0
- package/dist/kernel-types/src/data/workspaces.d.ts +39 -0
- package/dist/kernel-types/src/data/workspaces.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/AppRuntimeProvider.d.ts +6 -0
- package/dist/kernel-types/src/extensions/AppRuntimeProvider.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/BlockFocusShellDecorator.d.ts +4 -0
- package/dist/kernel-types/src/extensions/BlockFocusShellDecorator.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/ExtensionRenderBoundary.d.ts +6 -0
- package/dist/kernel-types/src/extensions/ExtensionRenderBoundary.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/api.d.ts +25 -0
- package/dist/kernel-types/src/extensions/api.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/blockInteraction.d.ts +147 -0
- package/dist/kernel-types/src/extensions/blockInteraction.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/compileExtensionModule.d.ts +39 -0
- package/dist/kernel-types/src/extensions/compileExtensionModule.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/core.d.ts +99 -0
- package/dist/kernel-types/src/extensions/core.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/defaultEditorInteractions.d.ts +5 -0
- package/dist/kernel-types/src/extensions/defaultEditorInteractions.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/defaultRenderers.d.ts +5 -0
- package/dist/kernel-types/src/extensions/defaultRenderers.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/dialogAppMount.d.ts +4 -0
- package/dist/kernel-types/src/extensions/dialogAppMount.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/discoverToggleTree.d.ts +34 -0
- package/dist/kernel-types/src/extensions/discoverToggleTree.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/dynamicExtensions.d.ts +59 -0
- package/dist/kernel-types/src/extensions/dynamicExtensions.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/editor.d.ts +11 -0
- package/dist/kernel-types/src/extensions/editor.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/editorAutocomplete.d.ts +11 -0
- package/dist/kernel-types/src/extensions/editorAutocomplete.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/exampleExtensions.d.ts +19 -0
- package/dist/kernel-types/src/extensions/exampleExtensions.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/extensionLoadErrors.d.ts +28 -0
- package/dist/kernel-types/src/extensions/extensionLoadErrors.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/extensionLookup.d.ts +25 -0
- package/dist/kernel-types/src/extensions/extensionLookup.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/facet.d.ts +84 -0
- package/dist/kernel-types/src/extensions/facet.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/overridesCache.d.ts +36 -0
- package/dist/kernel-types/src/extensions/overridesCache.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/pluginIds.d.ts +20 -0
- package/dist/kernel-types/src/extensions/pluginIds.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/resolveAppRuntime.d.ts +50 -0
- package/dist/kernel-types/src/extensions/resolveAppRuntime.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/runtimeActions.d.ts +4 -0
- package/dist/kernel-types/src/extensions/runtimeActions.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/runtimeContext.d.ts +4 -0
- package/dist/kernel-types/src/extensions/runtimeContext.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/runtimeEvents.d.ts +3 -0
- package/dist/kernel-types/src/extensions/runtimeEvents.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/staticAppExtensions.d.ts +6 -0
- package/dist/kernel-types/src/extensions/staticAppExtensions.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/staticDataExtensions.d.ts +6 -0
- package/dist/kernel-types/src/extensions/staticDataExtensions.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/toastAppMount.d.ts +4 -0
- package/dist/kernel-types/src/extensions/toastAppMount.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/togglable.d.ts +79 -0
- package/dist/kernel-types/src/extensions/togglable.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/useOverrides.d.ts +36 -0
- package/dist/kernel-types/src/extensions/useOverrides.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/useShortcutSurfaceActivations.d.ts +22 -0
- package/dist/kernel-types/src/extensions/useShortcutSurfaceActivations.d.ts.map +1 -0
- package/dist/kernel-types/src/extensions/variantFacet.d.ts +70 -0
- package/dist/kernel-types/src/extensions/variantFacet.d.ts.map +1 -0
- package/dist/kernel-types/src/hooks/block.d.ts +153 -0
- package/dist/kernel-types/src/hooks/block.d.ts.map +1 -0
- package/dist/kernel-types/src/hooks/propertySchemas.d.ts +6 -0
- package/dist/kernel-types/src/hooks/propertySchemas.d.ts.map +1 -0
- package/dist/kernel-types/src/hooks/useIsFocalRender.d.ts +24 -0
- package/dist/kernel-types/src/hooks/useIsFocalRender.d.ts.map +1 -0
- package/dist/kernel-types/src/hooks/usePendingInvitations.d.ts +8 -0
- package/dist/kernel-types/src/hooks/usePendingInvitations.d.ts.map +1 -0
- package/dist/kernel-types/src/hooks/useRendererRegistry.d.ts +5 -0
- package/dist/kernel-types/src/hooks/useRendererRegistry.d.ts.map +1 -0
- package/dist/kernel-types/src/hooks/useWorkspaces.d.ts +19 -0
- package/dist/kernel-types/src/hooks/useWorkspaces.d.ts.map +1 -0
- package/dist/kernel-types/src/initData.d.ts +26 -0
- package/dist/kernel-types/src/initData.d.ts.map +1 -0
- package/dist/kernel-types/src/lib/utils.d.ts +3 -0
- package/dist/kernel-types/src/lib/utils.d.ts.map +1 -0
- package/dist/kernel-types/src/main.d.ts +2 -0
- package/dist/kernel-types/src/main.d.ts.map +1 -0
- package/dist/kernel-types/src/markdown/MarkdownImage.d.ts +6 -0
- package/dist/kernel-types/src/markdown/MarkdownImage.d.ts.map +1 -0
- package/dist/kernel-types/src/markdown/defaultMarkdownExtension.d.ts +4 -0
- package/dist/kernel-types/src/markdown/defaultMarkdownExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/markdown/extensions.d.ts +18 -0
- package/dist/kernel-types/src/markdown/extensions.d.ts.map +1 -0
- package/dist/kernel-types/src/minimal-editor.d.ts +2 -0
- package/dist/kernel-types/src/minimal-editor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/account-header/AccountHeaderItem.d.ts +2 -0
- package/dist/kernel-types/src/plugins/account-header/AccountHeaderItem.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/account-header/index.d.ts +6 -0
- package/dist/kernel-types/src/plugins/account-header/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/AgentTokensDialog.d.ts +11 -0
- package/dist/kernel-types/src/plugins/agent-runtime/AgentTokensDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/authoringCatalog.d.ts +78 -0
- package/dist/kernel-types/src/plugins/agent-runtime/authoringCatalog.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/bridge.d.ts +5 -0
- package/dist/kernel-types/src/plugins/agent-runtime/bridge.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/commands.d.ts +5 -0
- package/dist/kernel-types/src/plugins/agent-runtime/commands.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/describeRuntime.d.ts +156 -0
- package/dist/kernel-types/src/plugins/agent-runtime/describeRuntime.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/extensionLint.d.ts +37 -0
- package/dist/kernel-types/src/plugins/agent-runtime/extensionLint.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/index.d.ts +11 -0
- package/dist/kernel-types/src/plugins/agent-runtime/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/protocol.d.ts +144 -0
- package/dist/kernel-types/src/plugins/agent-runtime/protocol.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/serialization.d.ts +11 -0
- package/dist/kernel-types/src/plugins/agent-runtime/serialization.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/agent-runtime/tokens.d.ts +39 -0
- package/dist/kernel-types/src/plugins/agent-runtime/tokens.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/alias/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/alias/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/alias/index.d.ts +16 -0
- package/dist/kernel-types/src/plugins/alias/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/alias/syncProcessor.d.ts +54 -0
- package/dist/kernel-types/src/plugins/alias/syncProcessor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/app-intents/appIntents.d.ts +44 -0
- package/dist/kernel-types/src/plugins/app-intents/appIntents.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/app-intents/index.d.ts +24 -0
- package/dist/kernel-types/src/plugins/app-intents/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/BacklinkEntry.d.ts +6 -0
- package/dist/kernel-types/src/plugins/backlinks/BacklinkEntry.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/BacklinkFilters.d.ts +14 -0
- package/dist/kernel-types/src/plugins/backlinks/BacklinkFilters.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/BacklinksFilterPropertyEditor.d.ts +4 -0
- package/dist/kernel-types/src/plugins/backlinks/BacklinksFilterPropertyEditor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/LinkedReferences.d.ts +3 -0
- package/dist/kernel-types/src/plugins/backlinks/LinkedReferences.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/backlinkBreadcrumbShortcuts.d.ts +19 -0
- package/dist/kernel-types/src/plugins/backlinks/backlinkBreadcrumbShortcuts.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/dailyNoteDefaults.d.ts +13 -0
- package/dist/kernel-types/src/plugins/backlinks/dailyNoteDefaults.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/backlinks/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/filterProperty.d.ts +13 -0
- package/dist/kernel-types/src/plugins/backlinks/filterProperty.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/backlinks/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/propertyEditorOverride.d.ts +2 -0
- package/dist/kernel-types/src/plugins/backlinks/propertyEditorOverride.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/propertyFilter.d.ts +35 -0
- package/dist/kernel-types/src/plugins/backlinks/propertyFilter.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/query.d.ts +38 -0
- package/dist/kernel-types/src/plugins/backlinks/query.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/useBacklinks.d.ts +5 -0
- package/dist/kernel-types/src/plugins/backlinks/useBacklinks.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks/useStoredBacklinkFilter.d.ts +11 -0
- package/dist/kernel-types/src/plugins/backlinks/useStoredBacklinkFilter.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks-view/BacklinksEmptyState.d.ts +5 -0
- package/dist/kernel-types/src/plugins/backlinks-view/BacklinksEmptyState.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks-view/BacklinksViewSection.d.ts +30 -0
- package/dist/kernel-types/src/plugins/backlinks-view/BacklinksViewSection.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks-view/facet.d.ts +23 -0
- package/dist/kernel-types/src/plugins/backlinks-view/facet.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks-view/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/backlinks-view/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/backlinks-view/prop.d.ts +20 -0
- package/dist/kernel-types/src/plugins/backlinks-view/prop.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/block-tagging/AddTagDialog.d.ts +6 -0
- package/dist/kernel-types/src/plugins/block-tagging/AddTagDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/block-tagging/BlockTagsConfigEditor.d.ts +3 -0
- package/dist/kernel-types/src/plugins/block-tagging/BlockTagsConfigEditor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/block-tagging/addTagAction.d.ts +7 -0
- package/dist/kernel-types/src/plugins/block-tagging/addTagAction.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/block-tagging/appendTag.d.ts +22 -0
- package/dist/kernel-types/src/plugins/block-tagging/appendTag.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/block-tagging/config.d.ts +21 -0
- package/dist/kernel-types/src/plugins/block-tagging/config.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/block-tagging/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/block-tagging/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/block-tagging/index.d.ts +6 -0
- package/dist/kernel-types/src/plugins/block-tagging/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/block-tagging/propertyEditorOverride.d.ts +2 -0
- package/dist/kernel-types/src/plugins/block-tagging/propertyEditorOverride.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/BreadcrumbList.d.ts +16 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/BreadcrumbList.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/BreadcrumbRenderer.d.ts +7 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/BreadcrumbRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/Breadcrumbs.d.ts +5 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/breadcrumbPreview.d.ts +2 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/breadcrumbPreview.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/index.d.ts +9 -0
- package/dist/kernel-types/src/plugins/breadcrumbs/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/command-palette/CommandPalette.d.ts +2 -0
- package/dist/kernel-types/src/plugins/command-palette/CommandPalette.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/command-palette/HeaderItem.d.ts +2 -0
- package/dist/kernel-types/src/plugins/command-palette/HeaderItem.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/command-palette/context.d.ts +7 -0
- package/dist/kernel-types/src/plugins/command-palette/context.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/command-palette/events.d.ts +2 -0
- package/dist/kernel-types/src/plugins/command-palette/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/command-palette/index.d.ts +24 -0
- package/dist/kernel-types/src/plugins/command-palette/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/command-palette/useCommandPaletteActions.d.ts +8 -0
- package/dist/kernel-types/src/plugins/command-palette/useCommandPaletteActions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/CalendarGrid.d.ts +39 -0
- package/dist/kernel-types/src/plugins/daily-notes/CalendarGrid.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/DailyNotePicker.d.ts +2 -0
- package/dist/kernel-types/src/plugins/daily-notes/DailyNotePicker.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/DateKeyboardScrubController.d.ts +2 -0
- package/dist/kernel-types/src/plugins/daily-notes/DateKeyboardScrubController.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/DateScrubOverlay.d.ts +2 -0
- package/dist/kernel-types/src/plugins/daily-notes/DateScrubOverlay.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/HeaderItem.d.ts +2 -0
- package/dist/kernel-types/src/plugins/daily-notes/HeaderItem.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/ReschedulePicker.d.ts +2 -0
- package/dist/kernel-types/src/plugins/daily-notes/ReschedulePicker.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/SpreadDatesDialog.d.ts +9 -0
- package/dist/kernel-types/src/plugins/daily-notes/SpreadDatesDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/actions.d.ts +59 -0
- package/dist/kernel-types/src/plugins/daily-notes/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/blockDateAdapter.d.ts +45 -0
- package/dist/kernel-types/src/plugins/daily-notes/blockDateAdapter.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/calendar.d.ts +26 -0
- package/dist/kernel-types/src/plugins/daily-notes/calendar.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/dailyNotes.d.ts +67 -0
- package/dist/kernel-types/src/plugins/daily-notes/dailyNotes.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/daily-notes/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/dateScrubGesture.d.ts +32 -0
- package/dist/kernel-types/src/plugins/daily-notes/dateScrubGesture.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/events.d.ts +15 -0
- package/dist/kernel-types/src/plugins/daily-notes/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/index.d.ts +71 -0
- package/dist/kernel-types/src/plugins/daily-notes/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/landing.d.ts +21 -0
- package/dist/kernel-types/src/plugins/daily-notes/landing.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/localSchema.d.ts +4 -0
- package/dist/kernel-types/src/plugins/daily-notes/localSchema.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/referenceDateAdapter.d.ts +20 -0
- package/dist/kernel-types/src/plugins/daily-notes/referenceDateAdapter.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/rescheduleAction.d.ts +6 -0
- package/dist/kernel-types/src/plugins/daily-notes/rescheduleAction.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/rescheduleEvents.d.ts +25 -0
- package/dist/kernel-types/src/plugins/daily-notes/rescheduleEvents.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/schema.d.ts +11 -0
- package/dist/kernel-types/src/plugins/daily-notes/schema.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/spreadBlockDates.d.ts +37 -0
- package/dist/kernel-types/src/plugins/daily-notes/spreadBlockDates.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/spreadDatesAction.d.ts +7 -0
- package/dist/kernel-types/src/plugins/daily-notes/spreadDatesAction.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/daily-notes/wikilinkDateDecorator.d.ts +3 -0
- package/dist/kernel-types/src/plugins/daily-notes/wikilinkDateDecorator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/ExtensionsOverridesEditor.d.ts +19 -0
- package/dist/kernel-types/src/plugins/extensions-settings/ExtensionsOverridesEditor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/ExtensionsSettings.d.ts +28 -0
- package/dist/kernel-types/src/plugins/extensions-settings/ExtensionsSettings.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/actions.d.ts +16 -0
- package/dist/kernel-types/src/plugins/extensions-settings/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/config.d.ts +19 -0
- package/dist/kernel-types/src/plugins/extensions-settings/config.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/extensions-settings/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/effect.d.ts +36 -0
- package/dist/kernel-types/src/plugins/extensions-settings/effect.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/index.d.ts +13 -0
- package/dist/kernel-types/src/plugins/extensions-settings/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/propertyEditorOverride.d.ts +3 -0
- package/dist/kernel-types/src/plugins/extensions-settings/propertyEditorOverride.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extensions-settings/useToggleTree.d.ts +21 -0
- package/dist/kernel-types/src/plugins/extensions-settings/useToggleTree.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extract-type/ExtractTypeDialog.d.ts +17 -0
- package/dist/kernel-types/src/plugins/extract-type/ExtractTypeDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extract-type/FindTypeInstancesDialog.d.ts +18 -0
- package/dist/kernel-types/src/plugins/extract-type/FindTypeInstancesDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extract-type/PropertyShapePicker.d.ts +78 -0
- package/dist/kernel-types/src/plugins/extract-type/PropertyShapePicker.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extract-type/action.d.ts +19 -0
- package/dist/kernel-types/src/plugins/extract-type/action.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extract-type/events.d.ts +16 -0
- package/dist/kernel-types/src/plugins/extract-type/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/extract-type/index.d.ts +22 -0
- package/dist/kernel-types/src/plugins/extract-type/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/find-replace/FindReplaceDialog.d.ts +2 -0
- package/dist/kernel-types/src/plugins/find-replace/FindReplaceDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/find-replace/HeaderItem.d.ts +2 -0
- package/dist/kernel-types/src/plugins/find-replace/HeaderItem.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/find-replace/dataExtension.d.ts +25 -0
- package/dist/kernel-types/src/plugins/find-replace/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/find-replace/events.d.ts +2 -0
- package/dist/kernel-types/src/plugins/find-replace/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/find-replace/index.d.ts +13 -0
- package/dist/kernel-types/src/plugins/find-replace/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/find-replace/search.d.ts +15 -0
- package/dist/kernel-types/src/plugins/find-replace/search.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/find-replace/types.d.ts +33 -0
- package/dist/kernel-types/src/plugins/find-replace/types.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/LocationPropertyEditor.d.ts +14 -0
- package/dist/kernel-types/src/plugins/geo/LocationPropertyEditor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/MapView.d.ts +29 -0
- package/dist/kernel-types/src/plugins/geo/MapView.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/blockTypes.d.ts +15 -0
- package/dist/kernel-types/src/plugins/geo/blockTypes.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/codeMirrorExtensions.d.ts +17 -0
- package/dist/kernel-types/src/plugins/geo/codeMirrorExtensions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/codecs.d.ts +16 -0
- package/dist/kernel-types/src/plugins/geo/codecs.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/createOrFindPlace.d.ts +36 -0
- package/dist/kernel-types/src/plugins/geo/createOrFindPlace.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/currentLocation.d.ts +34 -0
- package/dist/kernel-types/src/plugins/geo/currentLocation.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/dataExtension.d.ts +7 -0
- package/dist/kernel-types/src/plugins/geo/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/geoContentDecorator.d.ts +18 -0
- package/dist/kernel-types/src/plugins/geo/geoContentDecorator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/googlePlacesClient.d.ts +102 -0
- package/dist/kernel-types/src/plugins/geo/googlePlacesClient.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/index.d.ts +11 -0
- package/dist/kernel-types/src/plugins/geo/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/locationsPage.d.ts +11 -0
- package/dist/kernel-types/src/plugins/geo/locationsPage.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/pickCurrentLocation.d.ts +23 -0
- package/dist/kernel-types/src/plugins/geo/pickCurrentLocation.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/placeAutocomplete.d.ts +103 -0
- package/dist/kernel-types/src/plugins/geo/placeAutocomplete.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/properties.d.ts +33 -0
- package/dist/kernel-types/src/plugins/geo/properties.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/propertyEditorOverrides.d.ts +6 -0
- package/dist/kernel-types/src/plugins/geo/propertyEditorOverrides.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/query.d.ts +48 -0
- package/dist/kernel-types/src/plugins/geo/query.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/geo/usePlaceSearch.d.ts +43 -0
- package/dist/kernel-types/src/plugins/geo/usePlaceSearch.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/GroupHeaderActionButton.d.ts +27 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/GroupHeaderActionButton.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/GroupedBacklinksConfigEditor.d.ts +4 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/GroupedBacklinksConfigEditor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/GroupedLinkedReferences.d.ts +3 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/GroupedLinkedReferences.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/config.d.ts +24 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/config.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/facet.d.ts +31 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/facet.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/grouping.d.ts +23 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/grouping.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/propertyEditorOverride.d.ts +3 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/propertyEditorOverride.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/query.d.ts +34 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/query.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/useGroupedBacklinks.d.ts +6 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/useGroupedBacklinks.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/useGroupedBacklinksConfig.d.ts +4 -0
- package/dist/kernel-types/src/plugins/grouped-backlinks/useGroupedBacklinksConfig.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/left-sidebar/HeaderItem.d.ts +2 -0
- package/dist/kernel-types/src/plugins/left-sidebar/HeaderItem.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/left-sidebar/LeftSidebar.d.ts +5 -0
- package/dist/kernel-types/src/plugins/left-sidebar/LeftSidebar.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/left-sidebar/actions.d.ts +5 -0
- package/dist/kernel-types/src/plugins/left-sidebar/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/left-sidebar/events.d.ts +7 -0
- package/dist/kernel-types/src/plugins/left-sidebar/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/left-sidebar/facet.d.ts +11 -0
- package/dist/kernel-types/src/plugins/left-sidebar/facet.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/left-sidebar/index.d.ts +14 -0
- package/dist/kernel-types/src/plugins/left-sidebar/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/left-sidebar/shortcuts.d.ts +5 -0
- package/dist/kernel-types/src/plugins/left-sidebar/shortcuts.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/merge-blocks/MergePicker.d.ts +2 -0
- package/dist/kernel-types/src/plugins/merge-blocks/MergePicker.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/merge-blocks/events.d.ts +17 -0
- package/dist/kernel-types/src/plugins/merge-blocks/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/merge-blocks/index.d.ts +5 -0
- package/dist/kernel-types/src/plugins/merge-blocks/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/merge-blocks/mergeAction.d.ts +4 -0
- package/dist/kernel-types/src/plugins/merge-blocks/mergeAction.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/merge-blocks/strategy.d.ts +13 -0
- package/dist/kernel-types/src/plugins/merge-blocks/strategy.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/Button.d.ts +9 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/Button.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/MobileBottomNav.d.ts +2 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/MobileBottomNav.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/defaultItems.d.ts +9 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/defaultItems.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/facet.d.ts +12 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/facet.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/index.d.ts +9 -0
- package/dist/kernel-types/src/plugins/mobile-bottom-nav/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/mobile-keyboard-toolbar/MobileKeyboardToolbar.d.ts +7 -0
- package/dist/kernel-types/src/plugins/mobile-keyboard-toolbar/MobileKeyboardToolbar.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/mobile-keyboard-toolbar/actions.d.ts +5 -0
- package/dist/kernel-types/src/plugins/mobile-keyboard-toolbar/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/mobile-keyboard-toolbar/index.d.ts +7 -0
- package/dist/kernel-types/src/plugins/mobile-keyboard-toolbar/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/plain-outliner/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/plain-outliner/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/plain-outliner/interactions.d.ts +4 -0
- package/dist/kernel-types/src/plugins/plain-outliner/interactions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/quick-find/HeaderItem.d.ts +2 -0
- package/dist/kernel-types/src/plugins/quick-find/HeaderItem.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/quick-find/QuickFind.d.ts +2 -0
- package/dist/kernel-types/src/plugins/quick-find/QuickFind.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/quick-find/events.d.ts +2 -0
- package/dist/kernel-types/src/plugins/quick-find/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/quick-find/index.d.ts +13 -0
- package/dist/kernel-types/src/plugins/quick-find/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/quick-find/recents.d.ts +13 -0
- package/dist/kernel-types/src/plugins/quick-find/recents.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/quick-find/selection.d.ts +40 -0
- package/dist/kernel-types/src/plugins/quick-find/selection.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/codeMirrorExtensions.d.ts +9 -0
- package/dist/kernel-types/src/plugins/references/codeMirrorExtensions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/references/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/references/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/invalidation.d.ts +4 -0
- package/dist/kernel-types/src/plugins/references/invalidation.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/localSchema.d.ts +21 -0
- package/dist/kernel-types/src/plugins/references/localSchema.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/markdown/blockrefs/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/references/markdown/blockrefs/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/markdown/blockrefs/remark-blockrefs.d.ts +3 -0
- package/dist/kernel-types/src/plugins/references/markdown/blockrefs/remark-blockrefs.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/markdown/wikilinks/Wikilink.d.ts +14 -0
- package/dist/kernel-types/src/plugins/references/markdown/wikilinks/Wikilink.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/markdown/wikilinks/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/references/markdown/wikilinks/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/markdown/wikilinks/remark-wikilinks.d.ts +6 -0
- package/dist/kernel-types/src/plugins/references/markdown/wikilinks/remark-wikilinks.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/markdown/wikilinks/wikilinkDecorator.d.ts +49 -0
- package/dist/kernel-types/src/plugins/references/markdown/wikilinks/wikilinkDecorator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/referenceParser.d.ts +84 -0
- package/dist/kernel-types/src/plugins/references/referenceParser.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/referenceProjection.d.ts +3 -0
- package/dist/kernel-types/src/plugins/references/referenceProjection.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/referencesProcessor.d.ts +59 -0
- package/dist/kernel-types/src/plugins/references/referencesProcessor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/references/renameProcessor.d.ts +56 -0
- package/dist/kernel-types/src/plugins/references/renameProcessor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/action.d.ts +6 -0
- package/dist/kernel-types/src/plugins/roam-import/action.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/content.d.ts +9 -0
- package/dist/kernel-types/src/plugins/roam-import/content.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/effect.d.ts +7 -0
- package/dist/kernel-types/src/plugins/roam-import/effect.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/ids.d.ts +9 -0
- package/dist/kernel-types/src/plugins/roam-import/ids.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/import.d.ts +37 -0
- package/dist/kernel-types/src/plugins/roam-import/import.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/index.d.ts +8 -0
- package/dist/kernel-types/src/plugins/roam-import/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/plan.d.ts +82 -0
- package/dist/kernel-types/src/plugins/roam-import/plan.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/plugin.d.ts +23 -0
- package/dist/kernel-types/src/plugins/roam-import/plugin.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/promotion.d.ts +39 -0
- package/dist/kernel-types/src/plugins/roam-import/promotion.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/properties.d.ts +62 -0
- package/dist/kernel-types/src/plugins/roam-import/properties.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/references.d.ts +2 -0
- package/dist/kernel-types/src/plugins/roam-import/references.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/report.d.ts +25 -0
- package/dist/kernel-types/src/plugins/roam-import/report.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/roamMemo.d.ts +35 -0
- package/dist/kernel-types/src/plugins/roam-import/roamMemo.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/runtime.d.ts +24 -0
- package/dist/kernel-types/src/plugins/roam-import/runtime.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/schemaReconciliation.d.ts +75 -0
- package/dist/kernel-types/src/plugins/roam-import/schemaReconciliation.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/srsMarkers.d.ts +22 -0
- package/dist/kernel-types/src/plugins/roam-import/srsMarkers.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/todo.d.ts +7 -0
- package/dist/kernel-types/src/plugins/roam-import/todo.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/typeCandidates.d.ts +26 -0
- package/dist/kernel-types/src/plugins/roam-import/typeCandidates.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/roam-import/types.d.ts +32 -0
- package/dist/kernel-types/src/plugins/roam-import/types.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/PanelFocusRecovery.d.ts +38 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/PanelFocusRecovery.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/ShellDecorator.d.ts +35 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/ShellDecorator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/actions.d.ts +7 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/index.d.ts +5 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/shell.d.ts +3 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/shell.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/surface.d.ts +4 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/surface.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/walker.d.ts +131 -0
- package/dist/kernel-types/src/plugins/spatial-navigation/walker.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/RescheduleToast.d.ts +14 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/RescheduleToast.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/index.d.ts +19 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/indicator.d.ts +9 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/indicator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/moveSrsState.d.ts +8 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/moveSrsState.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/rescheduleDecorator.d.ts +3 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/rescheduleDecorator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/scheduler.d.ts +24 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/scheduler.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/schema.d.ts +17 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/schema.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/srsBlockDateAdapter.d.ts +3 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/srsBlockDateAdapter.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/srsClipboard.d.ts +9 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/srsClipboard.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/swipeRightDecorator.d.ts +6 -0
- package/dist/kernel-types/src/plugins/srs-rescheduling/swipeRightDecorator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/SwipeActionMenu.d.ts +15 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/SwipeActionMenu.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/actions.d.ts +46 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/anchor.d.ts +9 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/anchor.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/events.d.ts +31 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/index.d.ts +6 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/swipeGesture.d.ts +13 -0
- package/dist/kernel-types/src/plugins/swipe-quick-actions/swipeGesture.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/sync-status/RejectionDialog.d.ts +7 -0
- package/dist/kernel-types/src/plugins/sync-status/RejectionDialog.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/sync-status/SyncStatusHeaderItem.d.ts +2 -0
- package/dist/kernel-types/src/plugins/sync-status/SyncStatusHeaderItem.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/sync-status/index.d.ts +5 -0
- package/dist/kernel-types/src/plugins/sync-status/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/sync-status/model.d.ts +27 -0
- package/dist/kernel-types/src/plugins/sync-status/model.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/sync-status/rejectedHelpers.d.ts +25 -0
- package/dist/kernel-types/src/plugins/sync-status/rejectedHelpers.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/theme-toggle/ThemeToggle.d.ts +2 -0
- package/dist/kernel-types/src/plugins/theme-toggle/ThemeToggle.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/theme-toggle/index.d.ts +7 -0
- package/dist/kernel-types/src/plugins/theme-toggle/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/theme-toggle/theme.d.ts +6 -0
- package/dist/kernel-types/src/plugins/theme-toggle/theme.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/todo/actions.d.ts +9 -0
- package/dist/kernel-types/src/plugins/todo/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/todo/dataExtension.d.ts +3 -0
- package/dist/kernel-types/src/plugins/todo/dataExtension.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/todo/index.d.ts +6 -0
- package/dist/kernel-types/src/plugins/todo/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/todo/schema.d.ts +7 -0
- package/dist/kernel-types/src/plugins/todo/schema.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/update-indicator/UpdateIndicator.d.ts +5 -0
- package/dist/kernel-types/src/plugins/update-indicator/UpdateIndicator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/update-indicator/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/update-indicator/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/update-indicator/loadTimes.d.ts +17 -0
- package/dist/kernel-types/src/plugins/update-indicator/loadTimes.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/VideoPlayerRenderer.d.ts +15 -0
- package/dist/kernel-types/src/plugins/video-player/VideoPlayerRenderer.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/VideoTimeStamp.d.ts +7 -0
- package/dist/kernel-types/src/plugins/video-player/VideoTimeStamp.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/actions.d.ts +17 -0
- package/dist/kernel-types/src/plugins/video-player/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/events.d.ts +13 -0
- package/dist/kernel-types/src/plugins/video-player/events.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/index.d.ts +3 -0
- package/dist/kernel-types/src/plugins/video-player/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/markdown.d.ts +3 -0
- package/dist/kernel-types/src/plugins/video-player/markdown.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/notes.d.ts +4 -0
- package/dist/kernel-types/src/plugins/video-player/notes.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/remark-timestamps.d.ts +4 -0
- package/dist/kernel-types/src/plugins/video-player/remark-timestamps.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/video-player/view.d.ts +5 -0
- package/dist/kernel-types/src/plugins/video-player/view.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/vim-normal-mode/actions.d.ts +10 -0
- package/dist/kernel-types/src/plugins/vim-normal-mode/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/vim-normal-mode/index.d.ts +7 -0
- package/dist/kernel-types/src/plugins/vim-normal-mode/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/vim-normal-mode/interactions.d.ts +5 -0
- package/dist/kernel-types/src/plugins/vim-normal-mode/interactions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/visual-navigation/VisualNavigationShellDecorator.d.ts +3 -0
- package/dist/kernel-types/src/plugins/visual-navigation/VisualNavigationShellDecorator.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/visual-navigation/actions.d.ts +7 -0
- package/dist/kernel-types/src/plugins/visual-navigation/actions.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/visual-navigation/index.d.ts +7 -0
- package/dist/kernel-types/src/plugins/visual-navigation/index.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/visual-navigation/navigation.d.ts +69 -0
- package/dist/kernel-types/src/plugins/visual-navigation/navigation.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/visual-navigation/shell.d.ts +3 -0
- package/dist/kernel-types/src/plugins/visual-navigation/shell.d.ts.map +1 -0
- package/dist/kernel-types/src/plugins/workspace-header/index.d.ts +8 -0
- package/dist/kernel-types/src/plugins/workspace-header/index.d.ts.map +1 -0
- package/dist/kernel-types/src/registerServiceWorker.d.ts +15 -0
- package/dist/kernel-types/src/registerServiceWorker.d.ts.map +1 -0
- package/dist/kernel-types/src/services/powersync.d.ts +49 -0
- package/dist/kernel-types/src/services/powersync.d.ts.map +1 -0
- package/dist/kernel-types/src/services/supabase.d.ts +6 -0
- package/dist/kernel-types/src/services/supabase.d.ts.map +1 -0
- package/dist/kernel-types/src/services/uploadErrorClassifier.d.ts +16 -0
- package/dist/kernel-types/src/services/uploadErrorClassifier.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/ActiveContexts.d.ts +26 -0
- package/dist/kernel-types/src/shortcuts/ActiveContexts.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/HotkeyReconciler.d.ts +24 -0
- package/dist/kernel-types/src/shortcuts/HotkeyReconciler.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/blockActions.d.ts +39 -0
- package/dist/kernel-types/src/shortcuts/blockActions.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/defaultContexts.d.ts +3 -0
- package/dist/kernel-types/src/shortcuts/defaultContexts.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/defaultShortcuts.d.ts +22 -0
- package/dist/kernel-types/src/shortcuts/defaultShortcuts.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/effectiveActions.d.ts +7 -0
- package/dist/kernel-types/src/shortcuts/effectiveActions.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/runAction.d.ts +20 -0
- package/dist/kernel-types/src/shortcuts/runAction.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/types.d.ts +118 -0
- package/dist/kernel-types/src/shortcuts/types.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/useActionContext.d.ts +25 -0
- package/dist/kernel-types/src/shortcuts/useActionContext.d.ts.map +1 -0
- package/dist/kernel-types/src/shortcuts/utils.d.ts +90 -0
- package/dist/kernel-types/src/shortcuts/utils.d.ts.map +1 -0
- package/dist/kernel-types/src/tutorial/outline.d.ts +39 -0
- package/dist/kernel-types/src/tutorial/outline.d.ts.map +1 -0
- package/dist/kernel-types/src/types.d.ts +104 -0
- package/dist/kernel-types/src/types.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/AliasCollisionToast.d.ts +13 -0
- package/dist/kernel-types/src/utils/AliasCollisionToast.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/ClientLocalSettings.d.ts +47 -0
- package/dist/kernel-types/src/utils/ClientLocalSettings.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/array.d.ts +9 -0
- package/dist/kernel-types/src/utils/array.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/async.d.ts +7 -0
- package/dist/kernel-types/src/utils/async.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/backlinkAutocomplete.d.ts +33 -0
- package/dist/kernel-types/src/utils/backlinkAutocomplete.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/blockrefAutocomplete.d.ts +18 -0
- package/dist/kernel-types/src/utils/blockrefAutocomplete.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/callbackSet.d.ts +29 -0
- package/dist/kernel-types/src/utils/callbackSet.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/codemirror.d.ts +46 -0
- package/dist/kernel-types/src/utils/codemirror.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/codemirrorCompletion.d.ts +3 -0
- package/dist/kernel-types/src/utils/codemirrorCompletion.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/copy.d.ts +8 -0
- package/dist/kernel-types/src/utils/copy.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/dailyPage.d.ts +7 -0
- package/dist/kernel-types/src/utils/dailyPage.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/dialogs.d.ts +38 -0
- package/dist/kernel-types/src/utils/dialogs.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/dom.d.ts +4 -0
- package/dist/kernel-types/src/utils/dom.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/exportSqliteDb.d.ts +29 -0
- package/dist/kernel-types/src/utils/exportSqliteDb.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/lastWorkspace.d.ts +4 -0
- package/dist/kernel-types/src/utils/lastWorkspace.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/layoutSessionId.d.ts +11 -0
- package/dist/kernel-types/src/utils/layoutSessionId.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/linkTargetAutocomplete.d.ts +61 -0
- package/dist/kernel-types/src/utils/linkTargetAutocomplete.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/markdownParser.d.ts +12 -0
- package/dist/kernel-types/src/utils/markdownParser.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/navigation.d.ts +64 -0
- package/dist/kernel-types/src/utils/navigation.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/object.d.ts +7 -0
- package/dist/kernel-types/src/utils/object.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/panelHistory.d.ts +70 -0
- package/dist/kernel-types/src/utils/panelHistory.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/panelLayoutProjection.d.ts +70 -0
- package/dist/kernel-types/src/utils/panelLayoutProjection.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/paste.d.ts +22 -0
- package/dist/kernel-types/src/utils/paste.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/processorRejectionToast.d.ts +26 -0
- package/dist/kernel-types/src/utils/processorRejectionToast.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/propertyCreation.d.ts +4 -0
- package/dist/kernel-types/src/utils/propertyCreation.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/propertyNavigation.d.ts +20 -0
- package/dist/kernel-types/src/utils/propertyNavigation.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/react.d.ts +2 -0
- package/dist/kernel-types/src/utils/react.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/relativeDate.d.ts +42 -0
- package/dist/kernel-types/src/utils/relativeDate.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/routing.d.ts +23 -0
- package/dist/kernel-types/src/utils/routing.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/safeMode.d.ts +5 -0
- package/dist/kernel-types/src/utils/safeMode.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/scheduleIdle.d.ts +14 -0
- package/dist/kernel-types/src/utils/scheduleIdle.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/selection.d.ts +74 -0
- package/dist/kernel-types/src/utils/selection.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/state.d.ts +17 -0
- package/dist/kernel-types/src/utils/state.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/templateLiterals.d.ts +6 -0
- package/dist/kernel-types/src/utils/templateLiterals.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/time.d.ts +3 -0
- package/dist/kernel-types/src/utils/time.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/toast.d.ts +65 -0
- package/dist/kernel-types/src/utils/toast.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/types.d.ts +6 -0
- package/dist/kernel-types/src/utils/types.d.ts.map +1 -0
- package/dist/kernel-types/src/utils/viewTransition.d.ts +29 -0
- package/dist/kernel-types/src/utils/viewTransition.d.ts.map +1 -0
- package/dist/kernelDts.d.ts +13 -0
- package/dist/kernelDts.d.ts.map +1 -0
- package/dist/kernelDts.js +47 -0
- package/dist/kernelDts.js.map +1 -0
- package/dist/protocol.d.ts +470 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +365 -0
- package/dist/protocol.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +554 -0
- package/dist/server.js.map +1 -0
- package/package.json +59 -0
package/dist/cli.js
ADDED
|
@@ -0,0 +1,908 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import fs from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { spawn } from 'node:child_process';
|
|
6
|
+
import { createInterface } from 'node:readline/promises';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { cac } from 'cac';
|
|
9
|
+
import { bridgeLogPath, bridgeSecret as resolveBridgeSecret, bridgeUrl as resolveBridgeUrl, isLocalBridgeUrl, pairingUrl, tokenStorePath as resolveTokenStorePath, } from './config.js';
|
|
10
|
+
import { getCommandMeta, sqlModeSchema, } from './protocol.js';
|
|
11
|
+
import { kernelTypeDeclarationCandidates, renderKernelTypesInstallSummary, } from './kernelDts.js';
|
|
12
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
const serverScript = path.join(here, 'server.js');
|
|
14
|
+
const kernelTypesDir = path.join(here, 'kernel-types');
|
|
15
|
+
// Read our own version from package.json at startup so `--version`
|
|
16
|
+
// stays in sync without a build-time codegen step. `here` is dist/, so
|
|
17
|
+
// the package.json is one level up.
|
|
18
|
+
const pkgVersion = (() => {
|
|
19
|
+
try {
|
|
20
|
+
const pkg = JSON.parse(readFileSync(path.join(here, '..', 'package.json'), 'utf8'));
|
|
21
|
+
return pkg.version ?? '0.0.0';
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return '0.0.0';
|
|
25
|
+
}
|
|
26
|
+
})();
|
|
27
|
+
const bridgeUrl = resolveBridgeUrl();
|
|
28
|
+
const pollIntervalMs = 100;
|
|
29
|
+
const defaultTimeoutMs = 30_000;
|
|
30
|
+
const bridgeStartTimeoutMs = 5_000;
|
|
31
|
+
const tokenStorePath = resolveTokenStorePath();
|
|
32
|
+
const defaultProfileName = 'default';
|
|
33
|
+
let selectedProfileName = defaultProfileName;
|
|
34
|
+
// Narrow a thrown `unknown` to NodeJS fs/HTTP errors so we can check
|
|
35
|
+
// `.code === 'ENOENT'` etc without sprinkling `as any` everywhere.
|
|
36
|
+
const isErrnoException = (error) => error instanceof Error && typeof error.code === 'string';
|
|
37
|
+
const errorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
38
|
+
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
39
|
+
const canAutoStartBridge = () => !process.env.AGENT_RUNTIME_URL && isLocalBridgeUrl(bridgeUrl);
|
|
40
|
+
const parseJson = (value, label) => {
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(value);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
throw new Error(`${label} must be valid JSON`);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
// cac coerces a repeated `--actions foo --actions bar` to `['foo', 'bar']`,
|
|
49
|
+
// but a single occurrence gives a bare string. Normalize to an array
|
|
50
|
+
// so the wire payload is shaped consistently regardless of how the
|
|
51
|
+
// user phrased it.
|
|
52
|
+
const toStringArray = (value) => {
|
|
53
|
+
if (Array.isArray(value))
|
|
54
|
+
return value.map(String);
|
|
55
|
+
if (typeof value === 'string')
|
|
56
|
+
return [value];
|
|
57
|
+
return [];
|
|
58
|
+
};
|
|
59
|
+
const evalReturnedUndefined = (value) => value !== null
|
|
60
|
+
&& typeof value === 'object'
|
|
61
|
+
&& !Array.isArray(value)
|
|
62
|
+
&& value.type === 'undefined'
|
|
63
|
+
&& Object.keys(value).length === 1;
|
|
64
|
+
// Eval handlers commonly run for side effects and don't `return` —
|
|
65
|
+
// surface that as a single legible token instead of `{type:
|
|
66
|
+
// 'undefined'}`, which is easy to mistake for an error. Same idea
|
|
67
|
+
// for the explicit string "undefined" some callers return from
|
|
68
|
+
// `repo.db.execute(...)` etc.
|
|
69
|
+
const formatEvalOutput = (value, raw) => {
|
|
70
|
+
if (raw)
|
|
71
|
+
return JSON.stringify(value, null, 2);
|
|
72
|
+
if (value === undefined || value === null || evalReturnedUndefined(value)) {
|
|
73
|
+
return '<ok: eval completed, no return value (use `return ...` to print one; pass --raw for the wire format)>';
|
|
74
|
+
}
|
|
75
|
+
return JSON.stringify(value, null, 2);
|
|
76
|
+
};
|
|
77
|
+
// Accept "<id>" (UUID) or "<label>" — extensions installed via the
|
|
78
|
+
// bridge are tagged with their label as an alias, so a single positional
|
|
79
|
+
// arg can resolve to either.
|
|
80
|
+
const extensionHandle = (handle) => {
|
|
81
|
+
const isUuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(handle);
|
|
82
|
+
return isUuid ? { id: handle } : { label: handle };
|
|
83
|
+
};
|
|
84
|
+
const normalizeProfileName = (value = '') => {
|
|
85
|
+
const name = value.trim();
|
|
86
|
+
if (!name)
|
|
87
|
+
return defaultProfileName;
|
|
88
|
+
if (!/^[A-Za-z0-9_.-]+$/.test(name)) {
|
|
89
|
+
throw new Error('Profile names may only contain letters, numbers, underscores, dots, and dashes.');
|
|
90
|
+
}
|
|
91
|
+
return name;
|
|
92
|
+
};
|
|
93
|
+
selectedProfileName = normalizeProfileName(process.env.AGENT_RUNTIME_PROFILE ?? '');
|
|
94
|
+
const normalizeTokenRecord = (value) => {
|
|
95
|
+
if (!value || typeof value !== 'object')
|
|
96
|
+
return null;
|
|
97
|
+
const candidate = value;
|
|
98
|
+
if (typeof candidate.token !== 'string')
|
|
99
|
+
return null;
|
|
100
|
+
return {
|
|
101
|
+
token: candidate.token,
|
|
102
|
+
savedAt: typeof candidate.savedAt === 'number' ? candidate.savedAt : undefined,
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
const normalizeTokenStore = (value) => {
|
|
106
|
+
const profiles = {};
|
|
107
|
+
if (value && typeof value === 'object') {
|
|
108
|
+
const legacy = normalizeTokenRecord(value);
|
|
109
|
+
if (legacy)
|
|
110
|
+
profiles[defaultProfileName] = legacy;
|
|
111
|
+
const candidate = value;
|
|
112
|
+
if (candidate.profiles && typeof candidate.profiles === 'object') {
|
|
113
|
+
for (const [name, record] of Object.entries(candidate.profiles)) {
|
|
114
|
+
const profileName = normalizeProfileName(name);
|
|
115
|
+
const normalized = normalizeTokenRecord(record);
|
|
116
|
+
if (normalized)
|
|
117
|
+
profiles[profileName] = normalized;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return { profiles };
|
|
122
|
+
};
|
|
123
|
+
const loadTokenStore = async () => {
|
|
124
|
+
try {
|
|
125
|
+
const raw = await fs.readFile(tokenStorePath, 'utf8');
|
|
126
|
+
return normalizeTokenStore(JSON.parse(raw));
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
if (isErrnoException(error) && error.code === 'ENOENT')
|
|
130
|
+
return { profiles: {} };
|
|
131
|
+
throw error;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const writeTokenStore = async (store) => {
|
|
135
|
+
const profiles = Object.fromEntries(Object.entries(store.profiles).sort(([a], [b]) => a.localeCompare(b)));
|
|
136
|
+
await fs.mkdir(path.dirname(tokenStorePath), { recursive: true });
|
|
137
|
+
await fs.writeFile(tokenStorePath, `${JSON.stringify({ profiles }, null, 2)}\n`, { mode: 0o600 });
|
|
138
|
+
};
|
|
139
|
+
const assertBundledKernelTypes = async () => {
|
|
140
|
+
try {
|
|
141
|
+
const stat = await fs.stat(kernelTypesDir);
|
|
142
|
+
if (stat.isDirectory())
|
|
143
|
+
return;
|
|
144
|
+
throw new Error(`Compiled kernel types path is not a directory: ${kernelTypesDir}`);
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
if (isErrnoException(error) && error.code === 'ENOENT') {
|
|
148
|
+
throw new Error(`Compiled kernel type tree is missing at ${kernelTypesDir}. `
|
|
149
|
+
+ 'Run the package build before using `kmagent types` from source.', { cause: error });
|
|
150
|
+
}
|
|
151
|
+
throw error;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const countFiles = async (dir) => {
|
|
155
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
156
|
+
let count = 0;
|
|
157
|
+
for (const entry of entries) {
|
|
158
|
+
const fullPath = path.join(dir, entry.name);
|
|
159
|
+
count += entry.isDirectory() ? await countFiles(fullPath) : 1;
|
|
160
|
+
}
|
|
161
|
+
return count;
|
|
162
|
+
};
|
|
163
|
+
const directoryHasEntries = async (dir) => {
|
|
164
|
+
try {
|
|
165
|
+
const entries = await fs.readdir(dir);
|
|
166
|
+
return entries.length > 0;
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
if (isErrnoException(error) && error.code === 'ENOENT')
|
|
170
|
+
return false;
|
|
171
|
+
throw error;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const normalizeTsconfigPath = (value) => {
|
|
175
|
+
const normalized = value.split(path.sep).join('/');
|
|
176
|
+
return normalized === '' ? '.' : normalized;
|
|
177
|
+
};
|
|
178
|
+
const writeKernelTypes = async (outDir, options = {}) => {
|
|
179
|
+
await assertBundledKernelTypes();
|
|
180
|
+
const exists = await directoryHasEntries(outDir);
|
|
181
|
+
if (exists) {
|
|
182
|
+
if (!options.force) {
|
|
183
|
+
throw new Error(`Type output directory is not empty: ${outDir}. Pass --force to replace it.`);
|
|
184
|
+
}
|
|
185
|
+
await fs.rm(outDir, { recursive: true, force: true });
|
|
186
|
+
}
|
|
187
|
+
await fs.mkdir(path.dirname(outDir), { recursive: true });
|
|
188
|
+
await fs.cp(kernelTypesDir, outDir, { recursive: true });
|
|
189
|
+
const fileCount = await countFiles(outDir);
|
|
190
|
+
const pathsTarget = normalizeTsconfigPath(path.relative(process.cwd(), path.join(outDir, 'src')));
|
|
191
|
+
return { fileCount, pathsTarget };
|
|
192
|
+
};
|
|
193
|
+
const readKernelTypeModuleDeclaration = async (moduleSpec) => {
|
|
194
|
+
await assertBundledKernelTypes();
|
|
195
|
+
const tried = [];
|
|
196
|
+
for (const candidate of kernelTypeDeclarationCandidates(moduleSpec)) {
|
|
197
|
+
const declarationPath = path.join(kernelTypesDir, candidate);
|
|
198
|
+
tried.push(declarationPath);
|
|
199
|
+
try {
|
|
200
|
+
return await fs.readFile(declarationPath, 'utf8');
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
if (!isErrnoException(error) || error.code !== 'ENOENT')
|
|
204
|
+
throw error;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
throw new Error(`No compiled declaration found for ${moduleSpec}. Tried:\n`
|
|
208
|
+
+ tried.map(candidate => ` - ${candidate}`).join('\n'));
|
|
209
|
+
};
|
|
210
|
+
const loadStoredToken = async (profileName = selectedProfileName) => {
|
|
211
|
+
const store = await loadTokenStore();
|
|
212
|
+
return store.profiles[profileName]?.token ?? null;
|
|
213
|
+
};
|
|
214
|
+
const writeStoredToken = async (token, profileName = selectedProfileName) => {
|
|
215
|
+
const store = await loadTokenStore();
|
|
216
|
+
store.profiles[profileName] = { token, savedAt: Date.now() };
|
|
217
|
+
await writeTokenStore(store);
|
|
218
|
+
};
|
|
219
|
+
const removeStoredToken = async (profileName = selectedProfileName) => {
|
|
220
|
+
const store = await loadTokenStore();
|
|
221
|
+
if (!store.profiles[profileName])
|
|
222
|
+
return false;
|
|
223
|
+
delete store.profiles[profileName];
|
|
224
|
+
if (Object.keys(store.profiles).length > 0) {
|
|
225
|
+
await writeTokenStore(store);
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
await fs.unlink(tokenStorePath);
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
if (!isErrnoException(error) || error.code !== 'ENOENT')
|
|
234
|
+
throw error;
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
const listStoredProfiles = async () => {
|
|
239
|
+
const store = await loadTokenStore();
|
|
240
|
+
return Object.entries(store.profiles)
|
|
241
|
+
.map(([name, record]) => ({
|
|
242
|
+
name,
|
|
243
|
+
savedAt: record.savedAt ?? null,
|
|
244
|
+
selected: name === selectedProfileName,
|
|
245
|
+
}))
|
|
246
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
247
|
+
};
|
|
248
|
+
const resolveToken = async () => {
|
|
249
|
+
const fromEnv = process.env.AGENT_RUNTIME_TOKEN?.trim();
|
|
250
|
+
if (fromEnv)
|
|
251
|
+
return fromEnv;
|
|
252
|
+
return loadStoredToken();
|
|
253
|
+
};
|
|
254
|
+
const requestJson = async (url, options = {}) => {
|
|
255
|
+
const response = await fetch(url, {
|
|
256
|
+
...options,
|
|
257
|
+
headers: {
|
|
258
|
+
...(options.body ? { 'content-type': 'application/json' } : {}),
|
|
259
|
+
...(options.headers ?? {}),
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
const text = await response.text();
|
|
263
|
+
const body = text ? JSON.parse(text) : null;
|
|
264
|
+
if (!response.ok) {
|
|
265
|
+
throw new Error(body?.error ?? `Request failed with status ${response.status}`);
|
|
266
|
+
}
|
|
267
|
+
return body;
|
|
268
|
+
};
|
|
269
|
+
const promptForToken = async () => {
|
|
270
|
+
const rl = createInterface({
|
|
271
|
+
input: process.stdin,
|
|
272
|
+
output: process.stderr,
|
|
273
|
+
});
|
|
274
|
+
try {
|
|
275
|
+
return (await rl.question('Paste agent token: ')).trim();
|
|
276
|
+
}
|
|
277
|
+
finally {
|
|
278
|
+
rl.close();
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
const fetchBridgeHealth = async () => {
|
|
282
|
+
const response = await fetch(`${bridgeUrl}/health`);
|
|
283
|
+
if (!response.ok) {
|
|
284
|
+
throw new Error(`Bridge health check failed with status ${response.status}`);
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
const waitForBridgeReady = async () => {
|
|
288
|
+
const startedAt = Date.now();
|
|
289
|
+
let lastError = null;
|
|
290
|
+
while (Date.now() - startedAt < bridgeStartTimeoutMs) {
|
|
291
|
+
try {
|
|
292
|
+
await fetchBridgeHealth();
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
catch (error) {
|
|
296
|
+
lastError = error;
|
|
297
|
+
await sleep(100);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
throw new Error(`Agent runtime bridge did not become ready at ${bridgeUrl}: ${lastError instanceof Error ? lastError.message : String(lastError)}`);
|
|
301
|
+
};
|
|
302
|
+
const startBridgeInBackground = async () => {
|
|
303
|
+
const logPath = bridgeLogPath();
|
|
304
|
+
await resolveBridgeSecret();
|
|
305
|
+
await fs.mkdir(path.dirname(logPath), { recursive: true });
|
|
306
|
+
const logFile = await fs.open(logPath, 'a');
|
|
307
|
+
try {
|
|
308
|
+
const child = spawn(process.execPath, [serverScript], {
|
|
309
|
+
detached: true,
|
|
310
|
+
env: process.env,
|
|
311
|
+
stdio: ['ignore', logFile.fd, logFile.fd],
|
|
312
|
+
});
|
|
313
|
+
child.unref();
|
|
314
|
+
}
|
|
315
|
+
finally {
|
|
316
|
+
await logFile.close();
|
|
317
|
+
}
|
|
318
|
+
process.stderr.write(`Started agent runtime bridge in the background at ${bridgeUrl}. Logs: ${logPath}\n`);
|
|
319
|
+
};
|
|
320
|
+
const ensureBridgeRunning = async () => {
|
|
321
|
+
try {
|
|
322
|
+
await fetchBridgeHealth();
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
catch (error) {
|
|
326
|
+
if (!canAutoStartBridge()) {
|
|
327
|
+
throw error;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
await startBridgeInBackground();
|
|
331
|
+
await waitForBridgeReady();
|
|
332
|
+
};
|
|
333
|
+
const bridgeSecretForStatus = async () => {
|
|
334
|
+
const fromEnv = process.env.AGENT_RUNTIME_BRIDGE_SECRET?.trim();
|
|
335
|
+
if (fromEnv)
|
|
336
|
+
return fromEnv;
|
|
337
|
+
if (process.env.AGENT_RUNTIME_URL)
|
|
338
|
+
return '';
|
|
339
|
+
return resolveBridgeSecret();
|
|
340
|
+
};
|
|
341
|
+
const readBridgeStatus = async () => {
|
|
342
|
+
const bridgeSecret = await bridgeSecretForStatus();
|
|
343
|
+
return requestJson(`${bridgeUrl}/health${bridgeSecret ? '?detail=1' : ''}`, {
|
|
344
|
+
headers: bridgeSecret ? { 'x-agent-runtime-secret': bridgeSecret } : {},
|
|
345
|
+
});
|
|
346
|
+
};
|
|
347
|
+
const compactUser = (user) => {
|
|
348
|
+
if (!user || typeof user !== 'object')
|
|
349
|
+
return null;
|
|
350
|
+
const candidate = user;
|
|
351
|
+
const compact = {};
|
|
352
|
+
if (typeof candidate.id === 'string')
|
|
353
|
+
compact.id = candidate.id;
|
|
354
|
+
if (typeof candidate.name === 'string')
|
|
355
|
+
compact.name = candidate.name;
|
|
356
|
+
return Object.keys(compact).length > 0 ? compact : null;
|
|
357
|
+
};
|
|
358
|
+
const compactBridgeClient = (client) => {
|
|
359
|
+
const metadata = client?.metadata && typeof client.metadata === 'object'
|
|
360
|
+
? client.metadata
|
|
361
|
+
: {};
|
|
362
|
+
const compact = {
|
|
363
|
+
id: client.id,
|
|
364
|
+
lastSeen: client.lastSeen,
|
|
365
|
+
tokenCount: client.tokenCount,
|
|
366
|
+
};
|
|
367
|
+
if (client.audience)
|
|
368
|
+
compact.audience = client.audience;
|
|
369
|
+
if (typeof metadata.activeWorkspaceId === 'string')
|
|
370
|
+
compact.activeWorkspaceId = metadata.activeWorkspaceId;
|
|
371
|
+
const currentUser = compactUser(metadata.currentUser);
|
|
372
|
+
if (currentUser)
|
|
373
|
+
compact.currentUser = currentUser;
|
|
374
|
+
return compact;
|
|
375
|
+
};
|
|
376
|
+
const printPing = async () => {
|
|
377
|
+
await ensureBridgeRunning();
|
|
378
|
+
const runtime = await runCommand({ type: 'ping' });
|
|
379
|
+
const status = await readBridgeStatus();
|
|
380
|
+
const bridge = { ok: Boolean(status?.ok) };
|
|
381
|
+
if (Array.isArray(status?.clients)) {
|
|
382
|
+
bridge.clients = status.clients.map(compactBridgeClient);
|
|
383
|
+
}
|
|
384
|
+
process.stdout.write(`${JSON.stringify({
|
|
385
|
+
ok: runtime?.ok === true && bridge.ok,
|
|
386
|
+
profile: selectedProfileName,
|
|
387
|
+
runtime,
|
|
388
|
+
bridge,
|
|
389
|
+
}, null, 2)}\n`);
|
|
390
|
+
};
|
|
391
|
+
const whoamiWithToken = (token) => requestJson(`${bridgeUrl}/runtime/whoami`, {
|
|
392
|
+
headers: { authorization: `Bearer ${token}` },
|
|
393
|
+
});
|
|
394
|
+
const reloadAppAndWait = async ({ timeoutMs = 30_000 } = {}) => {
|
|
395
|
+
const token = await resolveToken();
|
|
396
|
+
if (!token) {
|
|
397
|
+
throw new Error(`No agent token configured for profile "${selectedProfileName}". Run \`yarn agent --profile ${selectedProfileName} connect\` first.`);
|
|
398
|
+
}
|
|
399
|
+
const before = await whoamiWithToken(token).catch(() => null);
|
|
400
|
+
if (!before?.connected) {
|
|
401
|
+
throw new Error('No app tab is currently connected — nothing to reload. Open the app, then retry.');
|
|
402
|
+
}
|
|
403
|
+
const previousClientId = before.clientId;
|
|
404
|
+
// Schedule the reload after a short delay so the eval result reaches
|
|
405
|
+
// the bridge before the JS context is torn down. Otherwise the
|
|
406
|
+
// bridge sees a delivered-but-never-completed command.
|
|
407
|
+
await runCommand({
|
|
408
|
+
type: 'eval',
|
|
409
|
+
code: 'setTimeout(() => window.location.reload(), 100)',
|
|
410
|
+
});
|
|
411
|
+
const deadline = Date.now() + timeoutMs;
|
|
412
|
+
while (Date.now() < deadline) {
|
|
413
|
+
await sleep(250);
|
|
414
|
+
const info = await whoamiWithToken(token).catch(() => null);
|
|
415
|
+
if (info?.connected && info.clientId !== previousClientId) {
|
|
416
|
+
return info;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
throw new Error(`App did not reconnect within ${Math.round(timeoutMs / 1000)}s`);
|
|
420
|
+
};
|
|
421
|
+
const navigateAppHash = async (hash) => {
|
|
422
|
+
if (typeof hash !== 'string') {
|
|
423
|
+
throw new Error('navigate requires a hash string');
|
|
424
|
+
}
|
|
425
|
+
const normalized = hash.startsWith('#') ? hash.slice(1) : hash;
|
|
426
|
+
// JSON.stringify both escapes and quotes the value safely.
|
|
427
|
+
return runCommand({
|
|
428
|
+
type: 'eval',
|
|
429
|
+
code: `window.location.hash = ${JSON.stringify(normalized)}`,
|
|
430
|
+
});
|
|
431
|
+
};
|
|
432
|
+
const waitForTokenAudience = async (token) => {
|
|
433
|
+
const startedAt = Date.now();
|
|
434
|
+
let lastError = null;
|
|
435
|
+
while (Date.now() - startedAt < 10_000) {
|
|
436
|
+
try {
|
|
437
|
+
return await whoamiWithToken(token);
|
|
438
|
+
}
|
|
439
|
+
catch (error) {
|
|
440
|
+
lastError = error;
|
|
441
|
+
await sleep(250);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
throw lastError ?? new Error('Timed out waiting for token registration');
|
|
445
|
+
};
|
|
446
|
+
const printConnectSuccess = (info) => {
|
|
447
|
+
const audience = info.audience ?? {};
|
|
448
|
+
process.stdout.write(`Connected. Token saved at ${tokenStorePath} (profile: ${selectedProfileName})\n` +
|
|
449
|
+
`User: ${audience.userId ?? '?'}\n` +
|
|
450
|
+
`Workspace: ${audience.workspaceId ?? '?'}\n` +
|
|
451
|
+
`Connected client: ${info.connected ? 'yes' : 'no (will auto-connect when the app reaches the bridge)'}\n`);
|
|
452
|
+
};
|
|
453
|
+
const connectWithToken = async (token, options = {}) => {
|
|
454
|
+
const saveBeforeVerify = options.saveBeforeVerify ?? true;
|
|
455
|
+
if (saveBeforeVerify)
|
|
456
|
+
await writeStoredToken(token);
|
|
457
|
+
// Direct-token mode preserves the old behavior: save first, then
|
|
458
|
+
// verify when the app is reachable. Interactive pairing verifies
|
|
459
|
+
// first so a mistyped pasted token is not persisted.
|
|
460
|
+
try {
|
|
461
|
+
await ensureBridgeRunning();
|
|
462
|
+
const info = await waitForTokenAudience(token);
|
|
463
|
+
if (!saveBeforeVerify)
|
|
464
|
+
await writeStoredToken(token);
|
|
465
|
+
printConnectSuccess(info);
|
|
466
|
+
}
|
|
467
|
+
catch (error) {
|
|
468
|
+
if (!saveBeforeVerify)
|
|
469
|
+
throw error;
|
|
470
|
+
process.stdout.write(`Token saved at ${tokenStorePath} (profile: ${selectedProfileName}), but bridge contact failed: ${errorMessage(error)}\n` +
|
|
471
|
+
`Make sure the app tab is open. Run \`yarn agent whoami\` to verify.\n`);
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
const describeExistingConnection = async () => {
|
|
475
|
+
const token = await loadStoredToken();
|
|
476
|
+
if (!token)
|
|
477
|
+
return null;
|
|
478
|
+
try {
|
|
479
|
+
await ensureBridgeRunning();
|
|
480
|
+
return { token, info: await whoamiWithToken(token) };
|
|
481
|
+
}
|
|
482
|
+
catch {
|
|
483
|
+
return { token, info: null };
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
const connectInteractively = async ({ force = false } = {}) => {
|
|
487
|
+
if (!force) {
|
|
488
|
+
const existing = await describeExistingConnection();
|
|
489
|
+
if (existing?.info?.connected) {
|
|
490
|
+
const audience = existing.info.audience ?? {};
|
|
491
|
+
process.stdout.write(`Profile "${selectedProfileName}" is already paired with a connected app tab.\n` +
|
|
492
|
+
`User: ${audience.userId ?? '?'}\n` +
|
|
493
|
+
`Workspace: ${audience.workspaceId ?? '?'}\n` +
|
|
494
|
+
`Pass --force to re-pair (revokes nothing on its own — generate a new token in the app first if you want to rotate).\n`);
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
if (existing) {
|
|
498
|
+
process.stdout.write(`Profile "${selectedProfileName}" has a saved token but no app tab is currently connected.\n` +
|
|
499
|
+
`Open or focus the app tab, or run \`yarn agent whoami\` to recheck. Re-pairing anyway…\n\n`);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
await ensureBridgeRunning();
|
|
503
|
+
const url = await pairingUrl(bridgeUrl, { openTokensDialog: true });
|
|
504
|
+
process.stdout.write(`Open this URL in the app to pair the agent CLI:\n${url}\n\n` +
|
|
505
|
+
'The app will open the token dialog. Generate a token, copy it, then paste it here.\n');
|
|
506
|
+
const token = await promptForToken();
|
|
507
|
+
if (!token) {
|
|
508
|
+
throw new Error('No token pasted; pairing was not completed.');
|
|
509
|
+
}
|
|
510
|
+
await connectWithToken(token, { saveBeforeVerify: false });
|
|
511
|
+
};
|
|
512
|
+
// Errors the server returns when the client has temporarily lost its
|
|
513
|
+
// token registration (typical after a `yarn agent reload` or after
|
|
514
|
+
// `install-extension` triggers refreshAppRuntime). Retrying on these
|
|
515
|
+
// for ~10–15s smooths over the reconnect gap without papering over
|
|
516
|
+
// real auth failures (scope mismatch, missing token, etc.).
|
|
517
|
+
const isTransientTokenError = (error) => {
|
|
518
|
+
const message = errorMessage(error);
|
|
519
|
+
return message.includes('Unknown or expired token')
|
|
520
|
+
|| message.includes('Missing or invalid command status credentials');
|
|
521
|
+
};
|
|
522
|
+
const authedRetryTotalMs = 15_000;
|
|
523
|
+
const authedRetryStartDelayMs = 200;
|
|
524
|
+
const authedRetryMaxDelayMs = 1_000;
|
|
525
|
+
const authedRequest = async (url, options = {}) => {
|
|
526
|
+
const token = await resolveToken();
|
|
527
|
+
if (!token) {
|
|
528
|
+
throw new Error(`No agent token configured for profile "${selectedProfileName}". Run \`yarn agent --profile ${selectedProfileName} connect\` to pair the CLI with the app.`);
|
|
529
|
+
}
|
|
530
|
+
const send = () => requestJson(url, {
|
|
531
|
+
...options,
|
|
532
|
+
headers: {
|
|
533
|
+
...(options.headers ?? {}),
|
|
534
|
+
authorization: `Bearer ${token}`,
|
|
535
|
+
},
|
|
536
|
+
});
|
|
537
|
+
const start = Date.now();
|
|
538
|
+
let delay = authedRetryStartDelayMs;
|
|
539
|
+
while (true) {
|
|
540
|
+
try {
|
|
541
|
+
return await send();
|
|
542
|
+
}
|
|
543
|
+
catch (error) {
|
|
544
|
+
if (!isTransientTokenError(error) || Date.now() - start >= authedRetryTotalMs) {
|
|
545
|
+
throw error;
|
|
546
|
+
}
|
|
547
|
+
await sleep(delay);
|
|
548
|
+
delay = Math.min(Math.round(delay * 1.5), authedRetryMaxDelayMs);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
const submitCommand = async (command) => {
|
|
553
|
+
const response = await authedRequest(`${bridgeUrl}/runtime/commands`, {
|
|
554
|
+
method: 'POST',
|
|
555
|
+
body: JSON.stringify(command),
|
|
556
|
+
});
|
|
557
|
+
return response.id;
|
|
558
|
+
};
|
|
559
|
+
const waitForCommand = async (id, timeoutMs = defaultTimeoutMs) => {
|
|
560
|
+
const start = Date.now();
|
|
561
|
+
while (Date.now() - start < timeoutMs) {
|
|
562
|
+
const command = await authedRequest(`${bridgeUrl}/runtime/commands/${id}`);
|
|
563
|
+
if (command.status === 'completed') {
|
|
564
|
+
return command.result;
|
|
565
|
+
}
|
|
566
|
+
if (command.status === 'failed') {
|
|
567
|
+
const error = command.result?.error;
|
|
568
|
+
throw new Error(error?.message ?? `Runtime command ${id} failed`);
|
|
569
|
+
}
|
|
570
|
+
await sleep(pollIntervalMs);
|
|
571
|
+
}
|
|
572
|
+
throw new Error(`Timed out waiting for runtime command ${id}`);
|
|
573
|
+
};
|
|
574
|
+
const runCommand = async (command) => {
|
|
575
|
+
const id = await submitCommand(command);
|
|
576
|
+
const result = await waitForCommand(id);
|
|
577
|
+
if (!result?.ok) {
|
|
578
|
+
const error = result?.error;
|
|
579
|
+
throw new Error(error?.message ?? 'Runtime command failed');
|
|
580
|
+
}
|
|
581
|
+
return result.value;
|
|
582
|
+
};
|
|
583
|
+
/** Helper: connect to the bridge, run a wire-protocol command, and
|
|
584
|
+
* pretty-print the result. Used by the "thin" bridge-fronting commands
|
|
585
|
+
* (sql, get-block, runtime-summary, install-extension, …). */
|
|
586
|
+
const runAndPrint = async (command) => {
|
|
587
|
+
await ensureBridgeRunning();
|
|
588
|
+
const value = await runCommand(command);
|
|
589
|
+
process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
|
590
|
+
};
|
|
591
|
+
const cli = cac('kmagent');
|
|
592
|
+
/** Resolve a cac command's description from the wire-command registry
|
|
593
|
+
* so the cli.ts surface and the runtime-summary surface share a
|
|
594
|
+
* single source of truth. The kebab-cased `kmagent` verb (e.g.
|
|
595
|
+
* `subtree`) sometimes differs from the wire type (`get-subtree`);
|
|
596
|
+
* callers pass the wire type to be unambiguous. */
|
|
597
|
+
const wireDescription = (type) => getCommandMeta(type).description;
|
|
598
|
+
// Global option. The catch-all `--profile <name>` selects which CLI
|
|
599
|
+
// token profile to use; defaults to AGENT_RUNTIME_PROFILE then to
|
|
600
|
+
// "default". We apply it from `cli.options.profile` after parse rather
|
|
601
|
+
// than inside each action so the value is consistently set before
|
|
602
|
+
// `ensureBridgeRunning`/token lookup runs.
|
|
603
|
+
cli.option('--profile, -p <name>', 'Saved CLI token profile to use');
|
|
604
|
+
// ----- Local / bridge-management commands ---------------------------
|
|
605
|
+
cli
|
|
606
|
+
.command('connect [token]', 'Pair the agent CLI with the app (or save a token directly)')
|
|
607
|
+
.option('--force', 'Re-pair even if an active connection already exists')
|
|
608
|
+
.action(async (token, options) => {
|
|
609
|
+
const resolved = token?.trim() || process.env.AGENT_RUNTIME_TOKEN?.trim();
|
|
610
|
+
if (resolved) {
|
|
611
|
+
await connectWithToken(resolved);
|
|
612
|
+
}
|
|
613
|
+
else {
|
|
614
|
+
await connectInteractively({ force: Boolean(options.force) });
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
cli
|
|
618
|
+
.command('disconnect', 'Remove the selected profile token')
|
|
619
|
+
.action(async () => {
|
|
620
|
+
const removed = await removeStoredToken();
|
|
621
|
+
process.stdout.write(removed
|
|
622
|
+
? `Removed profile "${selectedProfileName}" from ${tokenStorePath}\n`
|
|
623
|
+
: `No token profile "${selectedProfileName}" exists in ${tokenStorePath}\n`);
|
|
624
|
+
});
|
|
625
|
+
cli
|
|
626
|
+
.command('remove-profile <name>', 'Remove a saved CLI token profile')
|
|
627
|
+
.alias('disconnect-profile')
|
|
628
|
+
.action(async (name) => {
|
|
629
|
+
const profileName = normalizeProfileName(name);
|
|
630
|
+
const removed = await removeStoredToken(profileName);
|
|
631
|
+
process.stdout.write(removed
|
|
632
|
+
? `Removed profile "${profileName}" from ${tokenStorePath}\n`
|
|
633
|
+
: `No token profile "${profileName}" exists in ${tokenStorePath}\n`);
|
|
634
|
+
});
|
|
635
|
+
cli
|
|
636
|
+
.command('profiles', 'List saved CLI token profiles')
|
|
637
|
+
.action(async () => {
|
|
638
|
+
const profiles = await listStoredProfiles();
|
|
639
|
+
process.stdout.write(`${JSON.stringify({
|
|
640
|
+
tokenStorePath,
|
|
641
|
+
selectedProfile: selectedProfileName,
|
|
642
|
+
profiles,
|
|
643
|
+
}, null, 2)}\n`);
|
|
644
|
+
});
|
|
645
|
+
cli
|
|
646
|
+
.command('pair-url', 'Print the current app pairing URL')
|
|
647
|
+
.action(async () => {
|
|
648
|
+
await ensureBridgeRunning();
|
|
649
|
+
process.stdout.write(`${await pairingUrl()}\n`);
|
|
650
|
+
});
|
|
651
|
+
cli
|
|
652
|
+
.command('whoami', 'Show the audience the persisted token resolves to')
|
|
653
|
+
.action(async () => {
|
|
654
|
+
await ensureBridgeRunning();
|
|
655
|
+
const token = await resolveToken();
|
|
656
|
+
if (!token) {
|
|
657
|
+
throw new Error(`No agent token configured for profile "${selectedProfileName}". `
|
|
658
|
+
+ `Run \`yarn agent --profile ${selectedProfileName} connect\` first.`);
|
|
659
|
+
}
|
|
660
|
+
const info = await whoamiWithToken(token);
|
|
661
|
+
process.stdout.write(`${JSON.stringify(info, null, 2)}\n`);
|
|
662
|
+
});
|
|
663
|
+
cli
|
|
664
|
+
.command('ping', wireDescription('ping'))
|
|
665
|
+
.action(async () => {
|
|
666
|
+
await printPing();
|
|
667
|
+
});
|
|
668
|
+
cli
|
|
669
|
+
.command('status', 'Show bridge status (clients, commands)')
|
|
670
|
+
.action(async () => {
|
|
671
|
+
await ensureBridgeRunning();
|
|
672
|
+
const status = await readBridgeStatus();
|
|
673
|
+
process.stdout.write(`${JSON.stringify(status, null, 2)}\n`);
|
|
674
|
+
});
|
|
675
|
+
cli
|
|
676
|
+
.command('reload', 'Hard-reload the app tab and wait for it to reconnect')
|
|
677
|
+
.action(async () => {
|
|
678
|
+
await ensureBridgeRunning();
|
|
679
|
+
const info = await reloadAppAndWait();
|
|
680
|
+
process.stdout.write(`${JSON.stringify({ ok: true, reconnected: info }, null, 2)}\n`);
|
|
681
|
+
});
|
|
682
|
+
cli
|
|
683
|
+
.command('navigate <hash>', 'Set window.location.hash (with or without leading #)')
|
|
684
|
+
.action(async (hash) => {
|
|
685
|
+
await ensureBridgeRunning();
|
|
686
|
+
await navigateAppHash(hash);
|
|
687
|
+
process.stdout.write(`${JSON.stringify({
|
|
688
|
+
ok: true,
|
|
689
|
+
hash: hash.startsWith('#') ? hash : `#${hash}`,
|
|
690
|
+
}, null, 2)}\n`);
|
|
691
|
+
});
|
|
692
|
+
// ----- Bridge-fronting commands -------------------------------------
|
|
693
|
+
cli
|
|
694
|
+
.command('runtime-summary', wireDescription('runtime-summary'))
|
|
695
|
+
.action(async () => {
|
|
696
|
+
await runAndPrint({ type: 'runtime-summary' });
|
|
697
|
+
});
|
|
698
|
+
cli
|
|
699
|
+
.command('describe-runtime', wireDescription('describe-runtime'))
|
|
700
|
+
.option('--actions <text>', 'Filter actions (repeatable)')
|
|
701
|
+
.option('--facets <text>', 'Filter facets (repeatable)')
|
|
702
|
+
.option('--guide, --guides <id>', 'Show specific guide(s) (repeatable)')
|
|
703
|
+
.option('--modules <text>', 'Filter modules (repeatable)')
|
|
704
|
+
.option('--components <text>', 'Filter components (repeatable)')
|
|
705
|
+
.option('--storage', 'Include storage diagnostics')
|
|
706
|
+
.option('--full', 'Force full output even when --guide is set')
|
|
707
|
+
.action(async (options) => {
|
|
708
|
+
const actions = toStringArray(options.actions);
|
|
709
|
+
const facets = toStringArray(options.facets);
|
|
710
|
+
const guides = toStringArray(options.guide);
|
|
711
|
+
const modules = toStringArray(options.modules);
|
|
712
|
+
const components = toStringArray(options.components);
|
|
713
|
+
const storage = Boolean(options.storage);
|
|
714
|
+
const fullRequested = Boolean(options.full);
|
|
715
|
+
// Brief by default whenever --guide was the agent's intent and they
|
|
716
|
+
// didn't opt into other heavy sections.
|
|
717
|
+
const heavyFilterPresent = actions.length > 0
|
|
718
|
+
|| facets.length > 0
|
|
719
|
+
|| modules.length > 0
|
|
720
|
+
|| components.length > 0;
|
|
721
|
+
const briefImplied = guides.length > 0 && !heavyFilterPresent && !fullRequested;
|
|
722
|
+
await runAndPrint({
|
|
723
|
+
type: 'describe-runtime',
|
|
724
|
+
...(actions.length > 0 ? { actions } : {}),
|
|
725
|
+
...(facets.length > 0 ? { facets } : {}),
|
|
726
|
+
...(guides.length > 0 ? { guides } : {}),
|
|
727
|
+
...(modules.length > 0 ? { modules } : {}),
|
|
728
|
+
...(components.length > 0 ? { components } : {}),
|
|
729
|
+
...(storage ? { storage: true } : {}),
|
|
730
|
+
...(briefImplied ? { brief: true } : {}),
|
|
731
|
+
});
|
|
732
|
+
});
|
|
733
|
+
cli
|
|
734
|
+
.command('sql <mode> <sql> [paramsJson]', wireDescription('sql'))
|
|
735
|
+
.action(async (mode, sql, paramsJson) => {
|
|
736
|
+
// Parse mode + params through the schemas so an invalid `--mode`
|
|
737
|
+
// or non-array params fails fast with a clear error instead of
|
|
738
|
+
// round-tripping to the bridge for a less specific rejection.
|
|
739
|
+
const parsedMode = sqlModeSchema.safeParse(mode);
|
|
740
|
+
if (!parsedMode.success) {
|
|
741
|
+
throw new Error(`sql mode must be one of: all|get|optional|execute (got "${mode}")`);
|
|
742
|
+
}
|
|
743
|
+
const params = paramsJson ? parseJson(paramsJson, 'paramsJson') : [];
|
|
744
|
+
if (!Array.isArray(params)) {
|
|
745
|
+
throw new Error('paramsJson must be a JSON array');
|
|
746
|
+
}
|
|
747
|
+
await runAndPrint({ type: 'sql', mode: parsedMode.data, sql, params });
|
|
748
|
+
});
|
|
749
|
+
cli
|
|
750
|
+
.command('get-block <id>', wireDescription('get-block'))
|
|
751
|
+
.action(async (id) => {
|
|
752
|
+
await runAndPrint({ type: 'get-block', id });
|
|
753
|
+
});
|
|
754
|
+
cli
|
|
755
|
+
.command('subtree <rootId>', wireDescription('get-subtree'))
|
|
756
|
+
.option('--include-root', 'Include the root block itself in the response')
|
|
757
|
+
.action(async (rootId, options) => {
|
|
758
|
+
await runAndPrint({
|
|
759
|
+
type: 'get-subtree',
|
|
760
|
+
rootId,
|
|
761
|
+
includeRoot: Boolean(options.includeRoot),
|
|
762
|
+
});
|
|
763
|
+
});
|
|
764
|
+
cli
|
|
765
|
+
.command('create-block <json>', wireDescription('create-block'))
|
|
766
|
+
.action(async (json) => {
|
|
767
|
+
const parsed = parseJson(json, 'create-block json');
|
|
768
|
+
await runAndPrint({ type: 'create-block', ...parsed });
|
|
769
|
+
});
|
|
770
|
+
cli
|
|
771
|
+
.command('update-block <json>', wireDescription('update-block'))
|
|
772
|
+
.action(async (json) => {
|
|
773
|
+
const parsed = parseJson(json, 'update-block json');
|
|
774
|
+
await runAndPrint({ type: 'update-block', ...parsed });
|
|
775
|
+
});
|
|
776
|
+
cli
|
|
777
|
+
.command('install-extension <file> [...label]', wireDescription('install-extension'))
|
|
778
|
+
.option('--verify', 'Verify the extension shape and report what it contributes')
|
|
779
|
+
.option('--description <text>', 'Human-readable description')
|
|
780
|
+
.action(async (file, label, options) => {
|
|
781
|
+
const source = await fs.readFile(file, 'utf8');
|
|
782
|
+
const basename = path.basename(file).replace(/\.[^.]+$/, '');
|
|
783
|
+
const labelText = label.join(' ').trim();
|
|
784
|
+
await runAndPrint({
|
|
785
|
+
type: 'install-extension',
|
|
786
|
+
source,
|
|
787
|
+
label: labelText || basename,
|
|
788
|
+
...(options.verify ? { verify: true } : {}),
|
|
789
|
+
...(options.description !== undefined ? { description: options.description } : {}),
|
|
790
|
+
});
|
|
791
|
+
});
|
|
792
|
+
cli
|
|
793
|
+
.command('enable-extension <handle>', wireDescription('enable-extension'))
|
|
794
|
+
.action(async (handle) => {
|
|
795
|
+
await runAndPrint({ type: 'enable-extension', ...extensionHandle(handle) });
|
|
796
|
+
});
|
|
797
|
+
cli
|
|
798
|
+
.command('disable-extension <handle>', wireDescription('disable-extension'))
|
|
799
|
+
.action(async (handle) => {
|
|
800
|
+
await runAndPrint({ type: 'disable-extension', ...extensionHandle(handle) });
|
|
801
|
+
});
|
|
802
|
+
cli
|
|
803
|
+
.command('uninstall-extension <handle>', wireDescription('uninstall-extension'))
|
|
804
|
+
.action(async (handle) => {
|
|
805
|
+
await runAndPrint({ type: 'uninstall-extension', ...extensionHandle(handle) });
|
|
806
|
+
});
|
|
807
|
+
cli
|
|
808
|
+
.command('run-action <id> [depsJson]', wireDescription('run-action'))
|
|
809
|
+
.action(async (id, depsJson) => {
|
|
810
|
+
const dependencies = depsJson ? parseJson(depsJson, 'depsJson') : {};
|
|
811
|
+
if (typeof dependencies !== 'object' || dependencies === null || Array.isArray(dependencies)) {
|
|
812
|
+
throw new Error('depsJson must be a JSON object');
|
|
813
|
+
}
|
|
814
|
+
await runAndPrint({
|
|
815
|
+
type: 'run-action',
|
|
816
|
+
id,
|
|
817
|
+
dependencies: dependencies,
|
|
818
|
+
});
|
|
819
|
+
});
|
|
820
|
+
cli
|
|
821
|
+
.command('eval [...code]', wireDescription('eval'))
|
|
822
|
+
.option('--raw', 'Print the wire-format response instead of friendly output')
|
|
823
|
+
.option('--file <path>', 'Read the code from a file instead of <code>')
|
|
824
|
+
.option('--data <path>', 'Read JSON from a file and bind it as `data` in the eval scope')
|
|
825
|
+
.option('--data-json <json>', 'Inline JSON to bind as `data` in the eval scope (mutually exclusive with --data)')
|
|
826
|
+
.action(async (code, options) => {
|
|
827
|
+
if (options.data !== undefined && options.dataJson !== undefined) {
|
|
828
|
+
throw new Error('Pass either --data <path> or --data-json <json>, not both.');
|
|
829
|
+
}
|
|
830
|
+
const codeText = options.file
|
|
831
|
+
? await fs.readFile(options.file, 'utf8')
|
|
832
|
+
: code.join(' ');
|
|
833
|
+
const dataValue = options.data !== undefined
|
|
834
|
+
? parseJson(await fs.readFile(options.data, 'utf8'), `--data ${options.data}`)
|
|
835
|
+
: options.dataJson !== undefined
|
|
836
|
+
? parseJson(options.dataJson, '--data-json')
|
|
837
|
+
: undefined;
|
|
838
|
+
await ensureBridgeRunning();
|
|
839
|
+
const command = options.data !== undefined || options.dataJson !== undefined
|
|
840
|
+
? { type: 'eval', code: codeText, data: dataValue }
|
|
841
|
+
: { type: 'eval', code: codeText };
|
|
842
|
+
const value = await runCommand(command);
|
|
843
|
+
process.stdout.write(`${formatEvalOutput(value, Boolean(options.raw))}\n`);
|
|
844
|
+
});
|
|
845
|
+
cli
|
|
846
|
+
.command('raw <json>', 'Send a raw JSON command envelope to the bridge')
|
|
847
|
+
.action(async (json) => {
|
|
848
|
+
// `raw` is the typed-discrimination escape hatch — the user
|
|
849
|
+
// explicitly wants to send whatever they wrote, including future
|
|
850
|
+
// command types the CLI doesn't know about yet. The cast lets
|
|
851
|
+
// them through; the bridge / kernel still rejects malformed
|
|
852
|
+
// bodies.
|
|
853
|
+
const command = parseJson(json, 'raw json');
|
|
854
|
+
await runAndPrint(command);
|
|
855
|
+
});
|
|
856
|
+
cli
|
|
857
|
+
.command('types [outDir]', 'Write compiled TypeScript declarations for Knowledge Medium @/ modules to a directory.')
|
|
858
|
+
.option('--out-dir <path>', 'Directory to write declarations into')
|
|
859
|
+
.option('--module <spec>', 'Print the compiled declaration for one @/ module instead of writing the tree')
|
|
860
|
+
.option('--force', 'Replace a non-empty output directory')
|
|
861
|
+
.action(async (outDirArg, options) => {
|
|
862
|
+
if (outDirArg && options.outDir) {
|
|
863
|
+
throw new Error('Pass either [outDir] or --out-dir, not both.');
|
|
864
|
+
}
|
|
865
|
+
if (options.module) {
|
|
866
|
+
if (outDirArg || options.outDir) {
|
|
867
|
+
throw new Error('Pass --module by itself; it prints a single declaration to stdout.');
|
|
868
|
+
}
|
|
869
|
+
process.stdout.write(await readKernelTypeModuleDeclaration(options.module));
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
const outDir = path.resolve(options.outDir ?? outDirArg ?? 'agent-extensions/kernel-types');
|
|
873
|
+
const result = await writeKernelTypes(outDir, { force: Boolean(options.force) });
|
|
874
|
+
process.stdout.write(renderKernelTypesInstallSummary({
|
|
875
|
+
outDir,
|
|
876
|
+
fileCount: result.fileCount,
|
|
877
|
+
pathsTarget: result.pathsTarget,
|
|
878
|
+
}));
|
|
879
|
+
});
|
|
880
|
+
cli.version(pkgVersion);
|
|
881
|
+
cli.help();
|
|
882
|
+
const main = async () => {
|
|
883
|
+
// Two-phase parse so we can resolve `--profile` (a global option)
|
|
884
|
+
// before any matched action reads `selectedProfileName` for token
|
|
885
|
+
// lookup or error messages.
|
|
886
|
+
cli.parse(process.argv, { run: false });
|
|
887
|
+
const profileOption = cli.options.profile;
|
|
888
|
+
if (profileOption !== undefined) {
|
|
889
|
+
selectedProfileName = normalizeProfileName(String(profileOption));
|
|
890
|
+
}
|
|
891
|
+
// When --help / -h or --version / -v is set, cac has already
|
|
892
|
+
// printed the appropriate output during parse — we just bail.
|
|
893
|
+
if (cli.options.help || cli.options.version)
|
|
894
|
+
return;
|
|
895
|
+
// No command matched (bare `kmagent` or an unknown verb): show the
|
|
896
|
+
// global help instead of erroring, matching the old behaviour where
|
|
897
|
+
// the hand-written usage was printed.
|
|
898
|
+
if (!cli.matchedCommand) {
|
|
899
|
+
cli.outputHelp();
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
await cli.runMatchedCommand();
|
|
903
|
+
};
|
|
904
|
+
main().catch((error) => {
|
|
905
|
+
process.stderr.write(`${errorMessage(error)}\n`);
|
|
906
|
+
process.exitCode = 1;
|
|
907
|
+
});
|
|
908
|
+
//# sourceMappingURL=cli.js.map
|