@dev-sergeev/datalab-kit 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +23 -5
- package/THIRD_PARTY_NOTICES.md +6 -2
- package/dist/extension.js +8 -1
- package/dist/recap.d.ts +2 -0
- package/dist/recap.js +31 -0
- package/docs/adr/0002-package-delivery.md +2 -0
- package/node_modules/@pi-plugins/elapsed/LICENSE +21 -0
- package/node_modules/@pi-plugins/elapsed/README.md +45 -0
- package/node_modules/@pi-plugins/elapsed/dist/index.d.mts +8 -0
- package/node_modules/@pi-plugins/elapsed/dist/index.d.mts.map +1 -0
- package/node_modules/@pi-plugins/elapsed/dist/index.mjs +47 -0
- package/node_modules/@pi-plugins/elapsed/dist/index.mjs.map +1 -0
- package/node_modules/@pi-plugins/elapsed/package.json +65 -0
- package/node_modules/@tifan/pi-recap/README.md +61 -0
- package/node_modules/@tifan/pi-recap/package.json +43 -0
- package/node_modules/@tifan/pi-recap/src/index.ts +584 -0
- package/node_modules/@tifan/pi-recap/src/model-picker.ts +233 -0
- package/node_modules/@tifan/pi-recap/src/models.ts +183 -0
- package/node_modules/@tifan/pi-recap/src/sanitize.ts +119 -0
- package/node_modules/@tifan/pi-recap/src/tui.ts +155 -0
- package/node_modules/@zigai/pi-extension-internals/README.md +24 -0
- package/node_modules/@zigai/pi-extension-internals/dist/editor-enhancer-registry.d.ts +21 -0
- package/node_modules/@zigai/pi-extension-internals/dist/editor-enhancer-registry.js +233 -0
- package/node_modules/@zigai/pi-extension-internals/dist/index.d.ts +6 -0
- package/node_modules/@zigai/pi-extension-internals/dist/index.js +3 -0
- package/node_modules/@zigai/pi-extension-internals/dist/linked-method-patch.d.ts +34 -0
- package/node_modules/@zigai/pi-extension-internals/dist/linked-method-patch.js +272 -0
- package/node_modules/@zigai/pi-extension-internals/dist/pi-internal-import.d.ts +11 -0
- package/node_modules/@zigai/pi-extension-internals/dist/pi-internal-import.js +139 -0
- package/node_modules/@zigai/pi-extension-internals/package.json +41 -0
- package/node_modules/@zigai/pi-extension-settings/LICENSE +21 -0
- package/node_modules/@zigai/pi-extension-settings/README.md +36 -0
- package/node_modules/@zigai/pi-extension-settings/dist/artifacts.d.ts +23 -0
- package/node_modules/@zigai/pi-extension-settings/dist/artifacts.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/artifacts.js +75 -0
- package/node_modules/@zigai/pi-extension-settings/dist/artifacts.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/cli-entry.d.ts +3 -0
- package/node_modules/@zigai/pi-extension-settings/dist/cli-entry.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/cli-entry.js +5 -0
- package/node_modules/@zigai/pi-extension-settings/dist/cli-entry.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/cli.d.ts +6 -0
- package/node_modules/@zigai/pi-extension-settings/dist/cli.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/cli.js +87 -0
- package/node_modules/@zigai/pi-extension-settings/dist/cli.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/definition-marker.d.ts +2 -0
- package/node_modules/@zigai/pi-extension-settings/dist/definition-marker.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/definition-marker.js +2 -0
- package/node_modules/@zigai/pi-extension-settings/dist/definition-marker.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/definition.d.ts +159 -0
- package/node_modules/@zigai/pi-extension-settings/dist/definition.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/definition.js +248 -0
- package/node_modules/@zigai/pi-extension-settings/dist/definition.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/file-system.d.ts +10 -0
- package/node_modules/@zigai/pi-extension-settings/dist/file-system.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/file-system.js +115 -0
- package/node_modules/@zigai/pi-extension-settings/dist/file-system.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/index.d.ts +2 -0
- package/node_modules/@zigai/pi-extension-settings/dist/index.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/index.js +2 -0
- package/node_modules/@zigai/pi-extension-settings/dist/index.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/json-value.d.ts +18 -0
- package/node_modules/@zigai/pi-extension-settings/dist/json-value.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/json-value.js +56 -0
- package/node_modules/@zigai/pi-extension-settings/dist/json-value.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/paths.d.ts +11 -0
- package/node_modules/@zigai/pi-extension-settings/dist/paths.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/paths.js +23 -0
- package/node_modules/@zigai/pi-extension-settings/dist/paths.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi-host-paths.d.ts +5 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi-host-paths.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi-host-paths.js +21 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi-host-paths.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi.d.ts +106 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi.js +122 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi.ts +2537 -0
- package/node_modules/@zigai/pi-extension-settings/dist/pi.ts.map +7 -0
- package/node_modules/@zigai/pi-extension-settings/dist/projects.d.ts +10 -0
- package/node_modules/@zigai/pi-extension-settings/dist/projects.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/projects.js +177 -0
- package/node_modules/@zigai/pi-extension-settings/dist/projects.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/runtime.d.ts +40 -0
- package/node_modules/@zigai/pi-extension-settings/dist/runtime.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/runtime.js +158 -0
- package/node_modules/@zigai/pi-extension-settings/dist/runtime.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/runtime.ts +158 -0
- package/node_modules/@zigai/pi-extension-settings/dist/runtime.ts.map +7 -0
- package/node_modules/@zigai/pi-extension-settings/dist/schema-document.d.ts +19 -0
- package/node_modules/@zigai/pi-extension-settings/dist/schema-document.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/schema-document.js +168 -0
- package/node_modules/@zigai/pi-extension-settings/dist/schema-document.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-documentation.d.ts +9 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-documentation.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-documentation.js +242 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-documentation.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-layer.d.ts +59 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-layer.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-layer.js +98 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-layer.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-loader.d.ts +80 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-loader.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-loader.js +144 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-loader.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-merge.d.ts +5 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-merge.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-merge.js +30 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-merge.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-revision.d.ts +10 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-revision.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-revision.js +16 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-revision.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-transaction.d.ts +54 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-transaction.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-transaction.js +202 -0
- package/node_modules/@zigai/pi-extension-settings/dist/settings-transaction.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/typebox-runtime.d.ts +5 -0
- package/node_modules/@zigai/pi-extension-settings/dist/typebox-runtime.d.ts.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/dist/typebox-runtime.js +9 -0
- package/node_modules/@zigai/pi-extension-settings/dist/typebox-runtime.js.map +1 -0
- package/node_modules/@zigai/pi-extension-settings/docs/generation.md +71 -0
- package/node_modules/@zigai/pi-extension-settings/docs/manual-setup.md +98 -0
- package/node_modules/@zigai/pi-extension-settings/docs/runtime.md +100 -0
- package/node_modules/@zigai/pi-extension-settings/docs/ui-controls.md +31 -0
- package/node_modules/@zigai/pi-extension-settings/package.json +97 -0
- package/node_modules/@zigai/pi-mention-anything/README.md +113 -0
- package/node_modules/@zigai/pi-mention-anything/config.schema.json +313 -0
- package/node_modules/@zigai/pi-mention-anything/docs/command-protocol.md +106 -0
- package/node_modules/@zigai/pi-mention-anything/docs/providers.md +128 -0
- package/node_modules/@zigai/pi-mention-anything/examples/query-command.mjs +96 -0
- package/node_modules/@zigai/pi-mention-anything/examples/recursive-tree.ts +28 -0
- package/node_modules/@zigai/pi-mention-anything/examples/static.ts +28 -0
- package/node_modules/@zigai/pi-mention-anything/examples/tmux.ts +90 -0
- package/node_modules/@zigai/pi-mention-anything/examples/tree-settings.json +25 -0
- package/node_modules/@zigai/pi-mention-anything/package.json +58 -0
- package/node_modules/@zigai/pi-mention-anything/src/api.ts +75 -0
- package/node_modules/@zigai/pi-mention-anything/src/autocomplete.ts +231 -0
- package/node_modules/@zigai/pi-mention-anything/src/chain-autocomplete.ts +596 -0
- package/node_modules/@zigai/pi-mention-anything/src/chain-syntax.ts +345 -0
- package/node_modules/@zigai/pi-mention-anything/src/command-provider.ts +291 -0
- package/node_modules/@zigai/pi-mention-anything/src/configured-source.ts +66 -0
- package/node_modules/@zigai/pi-mention-anything/src/editor.ts +180 -0
- package/node_modules/@zigai/pi-mention-anything/src/expand-mentions.ts +162 -0
- package/node_modules/@zigai/pi-mention-anything/src/index.ts +54 -0
- package/node_modules/@zigai/pi-mention-anything/src/initial-suggestions.ts +190 -0
- package/node_modules/@zigai/pi-mention-anything/src/list-provider.ts +71 -0
- package/node_modules/@zigai/pi-mention-anything/src/mention-hub.ts +307 -0
- package/node_modules/@zigai/pi-mention-anything/src/mention-resolution.ts +374 -0
- package/node_modules/@zigai/pi-mention-anything/src/mention-syntax.ts +105 -0
- package/node_modules/@zigai/pi-mention-anything/src/register-mention.ts +89 -0
- package/node_modules/@zigai/pi-mention-anything/src/rendering.ts +53 -0
- package/node_modules/@zigai/pi-mention-anything/src/selected-items.ts +21 -0
- package/node_modules/@zigai/pi-mention-anything/src/selection-history.ts +135 -0
- package/node_modules/@zigai/pi-mention-anything/src/settings-input.ts +317 -0
- package/node_modules/@zigai/pi-mention-anything/src/settings.prevalidated.ts +57 -0
- package/node_modules/@zigai/pi-mention-anything/src/settings.ts +52 -0
- package/node_modules/@zigai/pi-mention-anything/src/source-contract.ts +174 -0
- package/node_modules/@zigai/pi-mention-anything/src/source-controller.ts +1070 -0
- package/node_modules/@zigai/pi-mention-anything/src/source-runtime.ts +99 -0
- package/node_modules/@zigai/pi-mention-skill/README.md +60 -0
- package/node_modules/@zigai/pi-mention-skill/config.schema.json +81 -0
- package/node_modules/@zigai/pi-mention-skill/package.json +56 -0
- package/node_modules/@zigai/pi-mention-skill/src/index.ts +60 -0
- package/node_modules/@zigai/pi-mention-skill/src/settings-input.ts +74 -0
- package/node_modules/@zigai/pi-mention-skill/src/settings.prevalidated.ts +18 -0
- package/node_modules/@zigai/pi-mention-skill/src/settings.ts +54 -0
- package/node_modules/@zigai/pi-mention-skill/src/skill-commands.ts +18 -0
- package/node_modules/@zigai/pi-mention-skill/src/skill-content.ts +60 -0
- package/node_modules/@zigai/pi-mention-skill/src/skill-provider.ts +105 -0
- package/node_modules/@zigai/pi-mention-skill/src/slash-skill-filter.ts +29 -0
- package/node_modules/argparse/LICENSE +21 -0
- package/node_modules/argparse/README.md +257 -0
- package/node_modules/argparse/index.js +3 -0
- package/node_modules/argparse/lib/action/append/constant.js +47 -0
- package/node_modules/argparse/lib/action/append.js +53 -0
- package/node_modules/argparse/lib/action/count.js +40 -0
- package/node_modules/argparse/lib/action/help.js +47 -0
- package/node_modules/argparse/lib/action/store/constant.js +43 -0
- package/node_modules/argparse/lib/action/store/false.js +27 -0
- package/node_modules/argparse/lib/action/store/true.js +26 -0
- package/node_modules/argparse/lib/action/store.js +50 -0
- package/node_modules/argparse/lib/action/subparsers.js +149 -0
- package/node_modules/argparse/lib/action/version.js +47 -0
- package/node_modules/argparse/lib/action.js +146 -0
- package/node_modules/argparse/lib/action_container.js +482 -0
- package/node_modules/argparse/lib/argparse.js +14 -0
- package/node_modules/argparse/lib/argument/error.js +50 -0
- package/node_modules/argparse/lib/argument/exclusive.js +54 -0
- package/node_modules/argparse/lib/argument/group.js +75 -0
- package/node_modules/argparse/lib/argument_parser.js +1161 -0
- package/node_modules/argparse/lib/const.js +21 -0
- package/node_modules/argparse/lib/help/added_formatters.js +87 -0
- package/node_modules/argparse/lib/help/formatter.js +795 -0
- package/node_modules/argparse/lib/namespace.js +76 -0
- package/node_modules/argparse/lib/utils.js +57 -0
- package/node_modules/argparse/package.json +34 -0
- package/node_modules/esprima/LICENSE.BSD +21 -0
- package/node_modules/esprima/README.md +46 -0
- package/node_modules/esprima/bin/esparse.js +139 -0
- package/node_modules/esprima/bin/esvalidate.js +236 -0
- package/node_modules/esprima/dist/esprima.js +6709 -0
- package/node_modules/esprima/package.json +112 -0
- package/node_modules/extend-shallow/LICENSE +21 -0
- package/node_modules/extend-shallow/README.md +61 -0
- package/node_modules/extend-shallow/index.js +33 -0
- package/node_modules/extend-shallow/package.json +56 -0
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/README.md +143 -0
- package/node_modules/graceful-fs/clone.js +23 -0
- package/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/graceful-fs/package.json +53 -0
- package/node_modules/graceful-fs/polyfills.js +355 -0
- package/node_modules/gray-matter/LICENSE +21 -0
- package/node_modules/gray-matter/README.md +565 -0
- package/node_modules/gray-matter/gray-matter.d.ts +114 -0
- package/node_modules/gray-matter/index.js +228 -0
- package/node_modules/gray-matter/lib/defaults.js +18 -0
- package/node_modules/gray-matter/lib/engine.js +30 -0
- package/node_modules/gray-matter/lib/engines.js +54 -0
- package/node_modules/gray-matter/lib/excerpt.js +32 -0
- package/node_modules/gray-matter/lib/parse.js +13 -0
- package/node_modules/gray-matter/lib/stringify.js +56 -0
- package/node_modules/gray-matter/lib/to-file.js +43 -0
- package/node_modules/gray-matter/lib/utils.js +66 -0
- package/node_modules/gray-matter/package.json +127 -0
- package/node_modules/is-extendable/LICENSE +21 -0
- package/node_modules/is-extendable/README.md +72 -0
- package/node_modules/is-extendable/index.js +13 -0
- package/node_modules/is-extendable/package.json +51 -0
- package/node_modules/js-yaml/LICENSE +21 -0
- package/node_modules/js-yaml/README.md +302 -0
- package/node_modules/js-yaml/bin/js-yaml.js +132 -0
- package/node_modules/js-yaml/dist/js-yaml.js +4024 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
- package/node_modules/js-yaml/index.js +7 -0
- package/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
- package/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
- package/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
- package/node_modules/js-yaml/lib/js-yaml/loader.js +1679 -0
- package/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
- package/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
- package/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
- package/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
- package/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
- package/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
- package/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
- package/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
- package/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
- package/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
- package/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
- package/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
- package/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
- package/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
- package/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
- package/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
- package/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
- package/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
- package/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
- package/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
- package/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
- package/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
- package/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
- package/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
- package/node_modules/js-yaml/lib/js-yaml.js +39 -0
- package/node_modules/js-yaml/package.json +52 -0
- package/node_modules/kind-of/LICENSE +21 -0
- package/node_modules/kind-of/README.md +367 -0
- package/node_modules/kind-of/index.js +129 -0
- package/node_modules/kind-of/package.json +88 -0
- package/node_modules/pi-toggle-skills/README.md +213 -0
- package/node_modules/pi-toggle-skills/package.json +60 -0
- package/node_modules/pi-toggle-skills/src/index.ts +112 -0
- package/node_modules/pi-toggle-skills/src/skill-discovery.ts +258 -0
- package/node_modules/pi-toggle-skills/src/skill-selector.ts +435 -0
- package/node_modules/pi-toggle-skills/toggle-skills.ts +316 -0
- package/node_modules/pi-toggle-skills/vitest.config.ts +15 -0
- package/node_modules/proper-lockfile/LICENSE +21 -0
- package/node_modules/proper-lockfile/README.md +183 -0
- package/node_modules/proper-lockfile/index.js +40 -0
- package/node_modules/proper-lockfile/lib/adapter.js +85 -0
- package/node_modules/proper-lockfile/lib/lockfile.js +342 -0
- package/node_modules/proper-lockfile/lib/mtime-precision.js +55 -0
- package/node_modules/proper-lockfile/node_modules/retry/.npmignore +3 -0
- package/node_modules/proper-lockfile/node_modules/retry/.travis.yml +15 -0
- package/node_modules/proper-lockfile/node_modules/retry/License +21 -0
- package/node_modules/proper-lockfile/node_modules/retry/Makefile +18 -0
- package/node_modules/proper-lockfile/node_modules/retry/README.md +227 -0
- package/node_modules/proper-lockfile/node_modules/retry/equation.gif +0 -0
- package/node_modules/proper-lockfile/node_modules/retry/example/dns.js +31 -0
- package/node_modules/proper-lockfile/node_modules/retry/example/stop.js +40 -0
- package/node_modules/proper-lockfile/node_modules/retry/index.js +1 -0
- package/node_modules/proper-lockfile/node_modules/retry/lib/retry.js +100 -0
- package/node_modules/proper-lockfile/node_modules/retry/lib/retry_operation.js +158 -0
- package/node_modules/proper-lockfile/node_modules/retry/package.json +32 -0
- package/node_modules/proper-lockfile/node_modules/retry/test/common.js +10 -0
- package/node_modules/proper-lockfile/node_modules/retry/test/integration/test-forever.js +24 -0
- package/node_modules/proper-lockfile/node_modules/retry/test/integration/test-retry-operation.js +258 -0
- package/node_modules/proper-lockfile/node_modules/retry/test/integration/test-retry-wrap.js +101 -0
- package/node_modules/proper-lockfile/node_modules/retry/test/integration/test-timeouts.js +69 -0
- package/node_modules/proper-lockfile/package.json +71 -0
- package/node_modules/section-matter/LICENSE +21 -0
- package/node_modules/section-matter/README.md +236 -0
- package/node_modules/section-matter/index.js +136 -0
- package/node_modules/section-matter/package.json +55 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +39 -0
- package/node_modules/signal-exit/index.js +202 -0
- package/node_modules/signal-exit/package.json +38 -0
- package/node_modules/signal-exit/signals.js +53 -0
- package/node_modules/sprintf-js/.npmignore +1 -0
- package/node_modules/sprintf-js/LICENSE +24 -0
- package/node_modules/sprintf-js/README.md +88 -0
- package/node_modules/sprintf-js/bower.json +14 -0
- package/node_modules/sprintf-js/demo/angular.html +20 -0
- package/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
- package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
- package/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
- package/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
- package/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
- package/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
- package/node_modules/sprintf-js/gruntfile.js +36 -0
- package/node_modules/sprintf-js/package.json +22 -0
- package/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
- package/node_modules/sprintf-js/src/sprintf.js +208 -0
- package/node_modules/sprintf-js/test/test.js +82 -0
- package/node_modules/strip-bom-string/LICENSE +21 -0
- package/node_modules/strip-bom-string/README.md +66 -0
- package/node_modules/strip-bom-string/index.js +15 -0
- package/node_modules/strip-bom-string/package.json +60 -0
- package/package.json +13 -4
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zigai/pi-extension-settings",
|
|
3
|
+
"version": "0.5.3",
|
|
4
|
+
"description": "TypeBox-first configuration runtime and artifact tooling for Pi extensions.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"configuration",
|
|
7
|
+
"json-schema",
|
|
8
|
+
"pi-coding-agent",
|
|
9
|
+
"pi-extension",
|
|
10
|
+
"typebox",
|
|
11
|
+
"typescript"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/zigai/pi-extension-settings#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/zigai/pi-extension-settings/issues"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "zigai",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/zigai/pi-extension-settings.git"
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"pi-extension-settings": "dist/cli-entry.js"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"docs",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"type": "module",
|
|
33
|
+
"main": "dist/index.js",
|
|
34
|
+
"types": "dist/index.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"import": "./dist/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./pi": {
|
|
41
|
+
"types": "./dist/pi.d.ts",
|
|
42
|
+
"import": "./dist/pi.ts"
|
|
43
|
+
},
|
|
44
|
+
"./runtime": {
|
|
45
|
+
"types": "./dist/runtime.d.ts",
|
|
46
|
+
"import": "./dist/runtime.ts"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
54
|
+
"build": "npm run clean && tsc -p tsconfig.build.json && node scripts/build-pi-runtime.ts",
|
|
55
|
+
"lint": "oxlint -c ./oxlint.config.ts .",
|
|
56
|
+
"lint:fix": "oxlint -c ./oxlint.config.ts . --fix",
|
|
57
|
+
"format": "oxfmt .",
|
|
58
|
+
"format:check": "oxfmt --check .",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"test:package": "node scripts/package-check.ts",
|
|
61
|
+
"coverage": "vitest run --coverage",
|
|
62
|
+
"typecheck": "tsc --noEmit",
|
|
63
|
+
"check": "npm run format:check && npm run lint && npm run typecheck && npm run build && npm run coverage && npm run test:package",
|
|
64
|
+
"verify": "npm run check",
|
|
65
|
+
"prepack": "npm run check"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"proper-lockfile": "4.1.2"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@earendil-works/pi-coding-agent": "^0.84.2",
|
|
72
|
+
"@types/node": "^22.19.0",
|
|
73
|
+
"@types/proper-lockfile": "4.1.4",
|
|
74
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
75
|
+
"esbuild": "^0.28.1",
|
|
76
|
+
"oxfmt": "^0.44.0",
|
|
77
|
+
"oxlint": "^1.74.0",
|
|
78
|
+
"oxlint-rules": "latest",
|
|
79
|
+
"oxlint-tsgolint": "^7.0.2001",
|
|
80
|
+
"typebox": "^1.3.11",
|
|
81
|
+
"typescript": "^6.0.3",
|
|
82
|
+
"vitest": "^4.1.9"
|
|
83
|
+
},
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
86
|
+
"typebox": "*"
|
|
87
|
+
},
|
|
88
|
+
"peerDependenciesMeta": {
|
|
89
|
+
"@earendil-works/pi-coding-agent": {
|
|
90
|
+
"optional": true
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"engines": {
|
|
94
|
+
"node": ">=22.19.0 <27"
|
|
95
|
+
},
|
|
96
|
+
"packageManager": "npm@11.19.0"
|
|
97
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Pi Mention Anything
|
|
2
|
+
|
|
3
|
+
Custom mention pickers for Pi, from simple lists to chained selections. Available through settings and a TypeScript API.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pi install npm:@zigai/pi-mention-anything
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Selections become mentions in the editor and expand into context for the model. Chained selections open successive pickers.
|
|
12
|
+
|
|
13
|
+
<!-- pi-extension-settings:start -->
|
|
14
|
+
## Configuration
|
|
15
|
+
|
|
16
|
+
Global settings are stored in `~/.pi/agent/extension-settings/pi-mention-anything.json`.
|
|
17
|
+
|
|
18
|
+
| Option | Type | Default | Description |
|
|
19
|
+
| --- | --- | --- | --- |
|
|
20
|
+
| `mentions` | MentionDefinition[] | `[]` | Mention sources enabled in Pi. |
|
|
21
|
+
|
|
22
|
+
### Defaults
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"$schema": "./schemas/pi-mention-anything.schema.json",
|
|
27
|
+
"mentions": []
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Advanced example
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"$schema": "./schemas/pi-mention-anything.schema.json",
|
|
36
|
+
"mentions": [
|
|
37
|
+
{
|
|
38
|
+
"id": "environments",
|
|
39
|
+
"trigger": "%",
|
|
40
|
+
"completionSuffix": " ",
|
|
41
|
+
"source": {
|
|
42
|
+
"type": "static",
|
|
43
|
+
"items": [
|
|
44
|
+
{
|
|
45
|
+
"name": "staging",
|
|
46
|
+
"description": "Staging environment"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "production",
|
|
50
|
+
"description": "Production environment"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"initialSuggestions": {
|
|
55
|
+
"strategy": "frecency",
|
|
56
|
+
"pinned": []
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "tickets",
|
|
61
|
+
"trigger": "ticket:",
|
|
62
|
+
"completionSuffix": " ",
|
|
63
|
+
"source": {
|
|
64
|
+
"type": "command",
|
|
65
|
+
"mode": "array",
|
|
66
|
+
"command": "list-my-tickets",
|
|
67
|
+
"args": [
|
|
68
|
+
"--json"
|
|
69
|
+
],
|
|
70
|
+
"cache": true,
|
|
71
|
+
"refreshOnStartup": true,
|
|
72
|
+
"cacheTtlMs": 300000
|
|
73
|
+
},
|
|
74
|
+
"initialSuggestions": {
|
|
75
|
+
"strategy": "frecency",
|
|
76
|
+
"pinned": []
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
<!-- pi-extension-settings:end -->
|
|
83
|
+
|
|
84
|
+
## TypeScript API
|
|
85
|
+
|
|
86
|
+
`registerMention` connects a provider to Pi’s pickers and context expansion:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
90
|
+
import { createListProvider, registerMention } from "@zigai/pi-mention-anything/api";
|
|
91
|
+
|
|
92
|
+
export default function (pi: ExtensionAPI): void {
|
|
93
|
+
registerMention(pi, {
|
|
94
|
+
id: "environments",
|
|
95
|
+
configuration: () => ({ trigger: "%" }),
|
|
96
|
+
provider: () => createListProvider(async () => [
|
|
97
|
+
{ id: "staging", label: "Staging", segment: "staging", selectable: true, navigable: false, replacement: "environment:staging" },
|
|
98
|
+
{ id: "production", label: "Production", segment: "production", selectable: true, navigable: false, replacement: "environment:production" },
|
|
99
|
+
]),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Documentation
|
|
105
|
+
|
|
106
|
+
- [Provider contracts, chained navigation, and cache options](docs/providers.md)
|
|
107
|
+
- [Versioned command protocol](docs/command-protocol.md)
|
|
108
|
+
- [Example: Recursive tree](examples/recursive-tree.ts)
|
|
109
|
+
- [Example: tmux sessions, windows, and panes](examples/tmux.ts)
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
[MIT](../../LICENSE)
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/zigai/pi-tweaks/master/packages/pi-mention-anything/config.schema.json",
|
|
4
|
+
"title": "Pi Mention Anything settings",
|
|
5
|
+
"description": "Define custom mention sources and triggers.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "./schemas/pi-mention-anything.schema.json",
|
|
12
|
+
"description": "JSON Schema used by editors for this settings file."
|
|
13
|
+
},
|
|
14
|
+
"mentions": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": [
|
|
19
|
+
"id",
|
|
20
|
+
"trigger",
|
|
21
|
+
"source"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
28
|
+
"description": "Stable identifier used for diagnostics and selection history."
|
|
29
|
+
},
|
|
30
|
+
"trigger": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"pattern": "^[^/\\s]+$",
|
|
34
|
+
"description": "One or more non-whitespace, non-slash characters that start the mention."
|
|
35
|
+
},
|
|
36
|
+
"separator": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"minLength": 1,
|
|
39
|
+
"maxLength": 1,
|
|
40
|
+
"pattern": "^[^\\s\"\\\\]$",
|
|
41
|
+
"description": "Separator between chained mention segments."
|
|
42
|
+
},
|
|
43
|
+
"expansionPolicy": {
|
|
44
|
+
"anyOf": [
|
|
45
|
+
{
|
|
46
|
+
"type": "string",
|
|
47
|
+
"const": "selected-only"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "string",
|
|
51
|
+
"const": "selected-or-resolved"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"default": "selected-or-resolved",
|
|
55
|
+
"description": "Expand only picker selections, or also resolve manually typed mentions."
|
|
56
|
+
},
|
|
57
|
+
"replacementTemplate": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "Replacement template. Allowed fields: {{id}}, {{label}}, {{segment}}, {{path}}, {{ids}}. Provider data is never implicitly included."
|
|
60
|
+
},
|
|
61
|
+
"completionSuffix": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"default": " ",
|
|
64
|
+
"description": "Text inserted after a completed mention."
|
|
65
|
+
},
|
|
66
|
+
"source": {
|
|
67
|
+
"anyOf": [
|
|
68
|
+
{
|
|
69
|
+
"type": "object",
|
|
70
|
+
"required": [
|
|
71
|
+
"type",
|
|
72
|
+
"items"
|
|
73
|
+
],
|
|
74
|
+
"properties": {
|
|
75
|
+
"type": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"const": "static"
|
|
78
|
+
},
|
|
79
|
+
"items": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"required": [
|
|
84
|
+
"name"
|
|
85
|
+
],
|
|
86
|
+
"properties": {
|
|
87
|
+
"name": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1,
|
|
90
|
+
"description": "Name selected and written after the trigger."
|
|
91
|
+
},
|
|
92
|
+
"id": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"minLength": 1,
|
|
95
|
+
"description": "Stable identity within the parent path. Defaults to name for simple lists."
|
|
96
|
+
},
|
|
97
|
+
"segment": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1,
|
|
100
|
+
"description": "Text inserted as this path segment. Defaults to name."
|
|
101
|
+
},
|
|
102
|
+
"searchText": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Text used for searching instead of the name and description."
|
|
105
|
+
},
|
|
106
|
+
"insertionText": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1,
|
|
109
|
+
"description": "Complete editor text for a selected terminal target."
|
|
110
|
+
},
|
|
111
|
+
"parentPath": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1
|
|
116
|
+
},
|
|
117
|
+
"description": "Ancestor IDs, from root to parent. Omit for root items."
|
|
118
|
+
},
|
|
119
|
+
"selectable": {
|
|
120
|
+
"type": "boolean",
|
|
121
|
+
"description": "Allow selecting this item as a completed target. Defaults to false for navigable items and true otherwise."
|
|
122
|
+
},
|
|
123
|
+
"navigable": {
|
|
124
|
+
"type": "boolean",
|
|
125
|
+
"description": "Open a child picker when this item is selected. Defaults to false."
|
|
126
|
+
},
|
|
127
|
+
"description": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"description": "Secondary text shown in autocomplete."
|
|
130
|
+
},
|
|
131
|
+
"replacement": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"description": "Text sent to the model in place of the mention. Defaults to the name."
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"title": "MentionItem"
|
|
138
|
+
},
|
|
139
|
+
"maxItems": 10000,
|
|
140
|
+
"description": "Candidates offered by this mention source."
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"title": "StaticMentionSource"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "object",
|
|
148
|
+
"required": [
|
|
149
|
+
"type",
|
|
150
|
+
"command",
|
|
151
|
+
"args"
|
|
152
|
+
],
|
|
153
|
+
"properties": {
|
|
154
|
+
"type": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"const": "command"
|
|
157
|
+
},
|
|
158
|
+
"mode": {
|
|
159
|
+
"anyOf": [
|
|
160
|
+
{
|
|
161
|
+
"type": "string",
|
|
162
|
+
"const": "array"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"type": "string",
|
|
166
|
+
"const": "protocol"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"default": "array",
|
|
170
|
+
"description": "array prints a flat item array; protocol uses version 1 JSON requests on stdin for discovery and exact resolution."
|
|
171
|
+
},
|
|
172
|
+
"filtering": {
|
|
173
|
+
"anyOf": [
|
|
174
|
+
{
|
|
175
|
+
"type": "string",
|
|
176
|
+
"const": "local"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"type": "string",
|
|
180
|
+
"const": "provider"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"default": "provider",
|
|
184
|
+
"description": "Protocol result ranking owner. Array commands always use local filtering."
|
|
185
|
+
},
|
|
186
|
+
"maxOutputBytes": {
|
|
187
|
+
"type": "integer",
|
|
188
|
+
"minimum": 1024,
|
|
189
|
+
"maximum": 16777216,
|
|
190
|
+
"default": 1048576,
|
|
191
|
+
"description": "Maximum combined standard output and standard error size in bytes."
|
|
192
|
+
},
|
|
193
|
+
"refreshIntervalMs": {
|
|
194
|
+
"type": "integer",
|
|
195
|
+
"minimum": 1000,
|
|
196
|
+
"description": "Periodic refresh interval for active cache entries. Requires caching."
|
|
197
|
+
},
|
|
198
|
+
"watchFiles": {
|
|
199
|
+
"type": "array",
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"minLength": 1
|
|
203
|
+
},
|
|
204
|
+
"maxItems": 32,
|
|
205
|
+
"description": "Files whose changes invalidate cached results. Requires caching."
|
|
206
|
+
},
|
|
207
|
+
"persistentCache": {
|
|
208
|
+
"type": "boolean",
|
|
209
|
+
"description": "Local disk caching, scoped by configuration, working directory, and trust."
|
|
210
|
+
},
|
|
211
|
+
"command": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"minLength": 1,
|
|
214
|
+
"description": "Executable that returns candidates in the selected command mode."
|
|
215
|
+
},
|
|
216
|
+
"args": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
},
|
|
221
|
+
"default": [],
|
|
222
|
+
"description": "Arguments passed directly to the executable without shell interpretation."
|
|
223
|
+
},
|
|
224
|
+
"debounceMs": {
|
|
225
|
+
"type": "integer",
|
|
226
|
+
"minimum": 0,
|
|
227
|
+
"default": 100,
|
|
228
|
+
"description": "Delay before starting the command so superseded autocomplete requests can cancel."
|
|
229
|
+
},
|
|
230
|
+
"timeoutMs": {
|
|
231
|
+
"type": "integer",
|
|
232
|
+
"minimum": 1,
|
|
233
|
+
"default": 5000,
|
|
234
|
+
"description": "Maximum command runtime in milliseconds."
|
|
235
|
+
},
|
|
236
|
+
"refreshOnStartup": {
|
|
237
|
+
"type": "boolean",
|
|
238
|
+
"description": "Background root discovery at session startup. Requires caching."
|
|
239
|
+
},
|
|
240
|
+
"cacheTtlMs": {
|
|
241
|
+
"type": "integer",
|
|
242
|
+
"minimum": 1,
|
|
243
|
+
"description": "Cache lifetime in milliseconds. Expired results remain available during refresh. Without a lifetime, results last for the session."
|
|
244
|
+
},
|
|
245
|
+
"cache": {
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"default": false,
|
|
248
|
+
"description": "Caching of successful command results."
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"additionalProperties": false,
|
|
252
|
+
"title": "CommandMentionSource"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"description": "Where this mention gets its candidates."
|
|
256
|
+
},
|
|
257
|
+
"initialSuggestions": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"required": [
|
|
260
|
+
"strategy",
|
|
261
|
+
"pinned"
|
|
262
|
+
],
|
|
263
|
+
"properties": {
|
|
264
|
+
"strategy": {
|
|
265
|
+
"anyOf": [
|
|
266
|
+
{
|
|
267
|
+
"type": "string",
|
|
268
|
+
"const": "frecency"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"type": "string",
|
|
272
|
+
"const": "recent"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"type": "string",
|
|
276
|
+
"const": "frequent"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"type": "string",
|
|
280
|
+
"const": "alphabetical"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"type": "string",
|
|
284
|
+
"const": "sourceOrder"
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"default": "frecency",
|
|
288
|
+
"description": "Ordering used before any query text is entered."
|
|
289
|
+
},
|
|
290
|
+
"pinned": {
|
|
291
|
+
"type": "array",
|
|
292
|
+
"items": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"minLength": 1
|
|
295
|
+
},
|
|
296
|
+
"default": [],
|
|
297
|
+
"uniqueItems": true,
|
|
298
|
+
"description": "Candidate names placed first, in this order, before the configured strategy."
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"default": {},
|
|
302
|
+
"additionalProperties": false,
|
|
303
|
+
"description": "Controls the entries shown immediately after the trigger."
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"additionalProperties": false,
|
|
307
|
+
"title": "MentionDefinition"
|
|
308
|
+
},
|
|
309
|
+
"default": [],
|
|
310
|
+
"description": "Mention sources enabled in Pi."
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Command sources
|
|
2
|
+
|
|
3
|
+
Command sources return candidates as JSON. Commands run directly with arguments, without a shell.
|
|
4
|
+
|
|
5
|
+
| Property | Default |
|
|
6
|
+
| ---------------------------------------- | ----------------------------- |
|
|
7
|
+
| Timeout (`timeoutMs`) | 5 seconds |
|
|
8
|
+
| Combined output limit (`maxOutputBytes`) | 1 MiB |
|
|
9
|
+
| Standard output | One JSON value |
|
|
10
|
+
| Diagnostics | Exclude raw stdout and stderr |
|
|
11
|
+
|
|
12
|
+
## Array mode
|
|
13
|
+
|
|
14
|
+
Array mode is the default. The command receives no stdin and returns a list of settings items:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
[{ "name": "server", "description": "SSH target", "replacement": "SSH host alias server" }]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Items may also supply `id`, `segment`, `searchText`, `parentPath` (ancestor IDs), `selectable`, and `navigable`. Simple items default ID and segment to `name`. Array mode uses local filtering and is intended for bounded enumerable collections.
|
|
21
|
+
|
|
22
|
+
## Protocol mode
|
|
23
|
+
|
|
24
|
+
`mode: "protocol"` supports search, pagination, and chains. Each invocation receives one newline-terminated JSON request on stdin, followed by EOF, and returns one JSON response.
|
|
25
|
+
|
|
26
|
+
Example configuration:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mentions": [
|
|
31
|
+
{
|
|
32
|
+
"id": "tickets",
|
|
33
|
+
"trigger": "ticket:",
|
|
34
|
+
"source": {
|
|
35
|
+
"type": "command",
|
|
36
|
+
"mode": "protocol",
|
|
37
|
+
"command": "node",
|
|
38
|
+
"args": ["/absolute/path/query-command.mjs"],
|
|
39
|
+
"filtering": "provider",
|
|
40
|
+
"cache": true,
|
|
41
|
+
"cacheTtlMs": 30000
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Discovery request:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"version": 1,
|
|
53
|
+
"method": "discover",
|
|
54
|
+
"sourceId": "tickets",
|
|
55
|
+
"cwd": "/work/project",
|
|
56
|
+
"trusted": true,
|
|
57
|
+
"query": "12",
|
|
58
|
+
"path": [],
|
|
59
|
+
"limit": 100
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Discovery response:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"version": 1,
|
|
68
|
+
"method": "discover",
|
|
69
|
+
"result": {
|
|
70
|
+
"items": [
|
|
71
|
+
{
|
|
72
|
+
"id": "123",
|
|
73
|
+
"label": "Ticket 123",
|
|
74
|
+
"segment": "123",
|
|
75
|
+
"selectable": true,
|
|
76
|
+
"navigable": false,
|
|
77
|
+
"replacement": "issue tracker ticket #123"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"nextCursor": "next-page-token"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Subsequent page requests include `cursor`; the final response omits `nextCursor`. `filtering: "provider"` preserves source ranking.
|
|
86
|
+
|
|
87
|
+
Chains have a `separator` in the mention definition. Their discovery `path` contains selected ancestors, including stable IDs and optional JSON data.
|
|
88
|
+
|
|
89
|
+
Exact resolution request:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"version": 1,
|
|
94
|
+
"method": "resolve",
|
|
95
|
+
"sourceId": "tickets",
|
|
96
|
+
"cwd": "/work/project",
|
|
97
|
+
"trusted": true,
|
|
98
|
+
"segments": ["123"]
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Resolution responses use the same version and method envelope. A resolved `result` contains `status: "resolved"`, the candidate `path` from root to target, and an optional whole-target `replacement`. An unresolved result contains `status: "unresolved"` and a reason, such as `"missing"`.
|
|
103
|
+
|
|
104
|
+
Exact resolution works independently of previously loaded pages.
|
|
105
|
+
|
|
106
|
+
Reference: [query command example](../examples/query-command.mjs), `CommandRequestV1`, and `CommandResponseV1`.
|