langflower 0.0.10 → 0.1.1
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/README.md +96 -70
- package/bin/langflower.js +15 -1
- package/dist/chunk-526FJL62.js +307 -0
- package/dist/chunk-CVTPGIZE.js +344 -0
- package/dist/chunk-EAZMCX37.js +44 -0
- package/dist/chunk-PYLGT66P.js +126 -0
- package/dist/chunk-WQZHA5FM.js +1444 -0
- package/dist/chunk-WV2YWHOC.js +623 -0
- package/dist/chunk-YOTMWWRH.js +2041 -0
- package/dist/index.js +80236 -1
- package/docs/public/README.md +2 -2
- package/docs/public/configuration.md +4 -0
- package/docs/public/extending.md +18 -2
- package/docs/public/getting-started.md +7 -0
- package/docs/public/how-it-works.md +18 -11
- package/docs/public/product.md +35 -25
- package/package.json +1 -8
- package/ui-dist/{chunk-7UMVYN3A.js → chunk-BKIP5WRK.js} +1 -1
- package/ui-dist/chunk-EZTB7Q33.js +4 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/main-X5M7PU3P.js +317 -0
- package/ui-dist/styles-VA3HMZK7.css +1 -0
- package/vendor/node-sdk/dist/node-factory/define-embed/embed-handle.d.ts +25 -0
- package/vendor/node-sdk/dist/node-factory/define-embed/embed-handle.js +25 -0
- package/vendor/node-sdk/dist/node-factory/define-mcp/mcp-handle.d.ts +1 -0
- package/vendor/node-sdk/dist/node-factory/define-mcp/mcp-handle.js +1 -0
- package/vendor/node-sdk/dist/node-factory/define-node/define-node.d.ts +2 -0
- package/vendor/node-sdk/dist/node-factory/define-node/define-node.js +4 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/define-reactive-node.d.ts +4 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/define-reactive-node.js +3 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/io-helpers.d.ts +15 -0
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/io-helpers.js +17 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/port-meta.d.ts +17 -4
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/resolve-secret.d.ts +28 -0
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/resolve-secret.js +76 -0
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/test/samples/delay-node.js +4 -2
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/types.d.ts +11 -6
- package/vendor/node-sdk/dist/testing/create-node-harness.d.ts +34 -0
- package/vendor/node-sdk/dist/testing/create-node-harness.js +73 -0
- package/vendor/node-sdk/package.json +4 -4
- package/vendor/runtime/dist/types.d.ts +1 -1
- package/vendor/server/skeleton/instructions.md +15 -3
- package/vendor/server/skeleton/nodes/hello-embed/README.md +185 -0
- package/vendor/server/skeleton/nodes/hello-embed/hello-embed.nodes.test.ts +181 -0
- package/vendor/server/skeleton/nodes/hello-embed/ingest.ts +126 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/chunk-markdown.test.ts +40 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/chunk-markdown.ts +123 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/ingest-search.test.ts +180 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/ingest.ts +128 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/paths.test.ts +20 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/paths.ts +70 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/schema.ts +21 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/search.ts +254 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/text-embedder.ts +14 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/vectors.ts +126 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/walk-markdown.test.ts +62 -0
- package/vendor/server/skeleton/nodes/hello-embed/lib/walk-markdown.ts +67 -0
- package/vendor/server/skeleton/nodes/hello-embed/package.json +11 -0
- package/vendor/server/skeleton/nodes/hello-embed/search-handle.ts +119 -0
- package/vendor/server/skeleton/nodes/hello-embed/search.ts +98 -0
- package/vendor/server/skeleton/nodes/hello-embed/tsconfig.json +14 -0
- package/vendor/server/skeleton/nodes/my-nodes/README.md +13 -3
- package/vendor/server/skeleton/schemas/langflower-config.schema.json +9 -1
- package/vendor/server/skeleton/skills/langflower-helper/SKILL.md +113 -27
- package/vendor/server/skeleton/skills/langflower-helper/architecture.md +19 -7
- package/vendor/server/skeleton/skills/langflower-helper/layout.md +25 -18
- package/vendor/server/skeleton/skills/langflower-node-writer/SKILL.md +8 -1
- package/vendor/server/skeleton/skills/langflower-workflow-writer/SKILL.md +3 -1
- package/vendor/server/skeleton/workflows/kb-ingest.json +88 -0
- package/vendor/server/skeleton/workflows/kb-manual-search.json +105 -0
- package/vendor/server/skeleton/workflows/kb-rag.json +192 -0
- package/vendor/server/skeleton/workflows/kb-tool.json +111 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -13
- package/dist/create-fake-skill-case-runner.d.ts +0 -9
- package/dist/create-fake-skill-case-runner.js +0 -73
- package/dist/create-fake-skill-case-runner.test.d.ts +0 -1
- package/dist/create-fake-skill-case-runner.test.js +0 -60
- package/dist/eval-command.d.ts +0 -2
- package/dist/eval-command.js +0 -66
- package/dist/index.d.ts +0 -1
- package/dist/start-command.d.ts +0 -5
- package/dist/start-command.js +0 -110
- package/dist/start-command.test.d.ts +0 -1
- package/dist/start-command.test.js +0 -17
- package/ui-dist/chunk-MDGXX73Z.js +0 -4
- package/ui-dist/main-Z7CPFXFA.js +0 -313
- package/ui-dist/styles-2TMDAUD7.css +0 -1
- package/vendor/common-nodes/dist/ai/build-effective-system-prompt.d.ts +0 -9
- package/vendor/common-nodes/dist/ai/build-effective-system-prompt.js +0 -21
- package/vendor/common-nodes/dist/ai/chat-completion-stream.d.ts +0 -53
- package/vendor/common-nodes/dist/ai/chat-completion-stream.js +0 -1
- package/vendor/common-nodes/dist/ai/chat-input/node.d.ts +0 -25
- package/vendor/common-nodes/dist/ai/chat-input/node.js +0 -39
- package/vendor/common-nodes/dist/ai/critique/node.d.ts +0 -588
- package/vendor/common-nodes/dist/ai/critique/node.js +0 -240
- package/vendor/common-nodes/dist/ai/define-llm-node/default-llm-ports.d.ts +0 -28
- package/vendor/common-nodes/dist/ai/define-llm-node/default-llm-ports.js +0 -59
- package/vendor/common-nodes/dist/ai/define-llm-node/define-llm-node.d.ts +0 -45
- package/vendor/common-nodes/dist/ai/define-llm-node/define-llm-node.js +0 -48
- package/vendor/common-nodes/dist/ai/fake-llm/node.d.ts +0 -571
- package/vendor/common-nodes/dist/ai/fake-llm/node.js +0 -207
- package/vendor/common-nodes/dist/ai/fake-mcp-server/node.d.ts +0 -26
- package/vendor/common-nodes/dist/ai/fake-mcp-server/node.js +0 -67
- package/vendor/common-nodes/dist/ai/fake-tool-registration/node.d.ts +0 -26
- package/vendor/common-nodes/dist/ai/fake-tool-registration/node.js +0 -57
- package/vendor/common-nodes/dist/ai/features/chat-completion-stream.d.ts +0 -53
- package/vendor/common-nodes/dist/ai/features/chat-completion-stream.js +0 -1
- package/vendor/common-nodes/dist/ai/features/llm-loop/autokick-recovery.d.ts +0 -13
- package/vendor/common-nodes/dist/ai/features/llm-loop/autokick-recovery.js +0 -17
- package/vendor/common-nodes/dist/ai/features/llm-loop/classify-llm-failure.d.ts +0 -2
- package/vendor/common-nodes/dist/ai/features/llm-loop/classify-llm-failure.js +0 -113
- package/vendor/common-nodes/dist/ai/features/llm-loop/dead-loop-detector.d.ts +0 -28
- package/vendor/common-nodes/dist/ai/features/llm-loop/dead-loop-detector.js +0 -194
- package/vendor/common-nodes/dist/ai/features/llm-loop/live-get-tools.d.ts +0 -9
- package/vendor/common-nodes/dist/ai/features/llm-loop/live-get-tools.js +0 -21
- package/vendor/common-nodes/dist/ai/features/llm-loop/llm-loop-reducer.d.ts +0 -2
- package/vendor/common-nodes/dist/ai/features/llm-loop/llm-loop-reducer.js +0 -204
- package/vendor/common-nodes/dist/ai/features/llm-loop/llm-loop-types.d.ts +0 -120
- package/vendor/common-nodes/dist/ai/features/llm-loop/llm-loop-types.js +0 -39
- package/vendor/common-nodes/dist/ai/features/llm-loop/normalize-llm-recovery-policy.d.ts +0 -2
- package/vendor/common-nodes/dist/ai/features/llm-loop/normalize-llm-recovery-policy.js +0 -59
- package/vendor/common-nodes/dist/ai/features/llm-loop/operators/normalize-tool-result.d.ts +0 -1
- package/vendor/common-nodes/dist/ai/features/llm-loop/operators/normalize-tool-result.js +0 -7
- package/vendor/common-nodes/dist/ai/features/llm-loop/operators/observe-provider-stream.d.ts +0 -43
- package/vendor/common-nodes/dist/ai/features/llm-loop/operators/observe-provider-stream.js +0 -96
- package/vendor/common-nodes/dist/ai/features/llm-loop/run-agent-loop.d.ts +0 -29
- package/vendor/common-nodes/dist/ai/features/llm-loop/run-agent-loop.js +0 -44
- package/vendor/common-nodes/dist/ai/features/llm-loop/run-llm-loop.d.ts +0 -74
- package/vendor/common-nodes/dist/ai/features/llm-loop/run-llm-loop.js +0 -658
- package/vendor/common-nodes/dist/ai/features/llm-role-preset.d.ts +0 -69
- package/vendor/common-nodes/dist/ai/features/llm-role-preset.js +0 -265
- package/vendor/common-nodes/dist/ai/features/llm-session/llm-session-shell.d.ts +0 -141
- package/vendor/common-nodes/dist/ai/features/llm-session/llm-session-shell.js +0 -193
- package/vendor/common-nodes/dist/ai/features/llm-session/run-session-machine.d.ts +0 -21
- package/vendor/common-nodes/dist/ai/features/llm-session/run-session-machine.js +0 -118
- package/vendor/common-nodes/dist/ai/features/openai/context-length-error.d.ts +0 -14
- package/vendor/common-nodes/dist/ai/features/openai/context-length-error.js +0 -63
- package/vendor/common-nodes/dist/ai/features/openai/create-chat-completion-stream.d.ts +0 -19
- package/vendor/common-nodes/dist/ai/features/openai/create-chat-completion-stream.js +0 -182
- package/vendor/common-nodes/dist/ai/features/openai/list-provider-models.d.ts +0 -28
- package/vendor/common-nodes/dist/ai/features/openai/list-provider-models.js +0 -52
- package/vendor/common-nodes/dist/ai/features/openai/llm-context-compaction.d.ts +0 -31
- package/vendor/common-nodes/dist/ai/features/openai/llm-context-compaction.js +0 -326
- package/vendor/common-nodes/dist/ai/features/openai/normalize-compaction-params.d.ts +0 -14
- package/vendor/common-nodes/dist/ai/features/openai/normalize-compaction-params.js +0 -21
- package/vendor/common-nodes/dist/ai/features/openai/prepare-chat-completion.d.ts +0 -30
- package/vendor/common-nodes/dist/ai/features/openai/prepare-chat-completion.js +0 -132
- package/vendor/common-nodes/dist/ai/features/path-choice/control-tools.d.ts +0 -20
- package/vendor/common-nodes/dist/ai/features/path-choice/control-tools.js +0 -70
- package/vendor/common-nodes/dist/ai/features/path-choice/run-reactive-path-choice-loop.d.ts +0 -32
- package/vendor/common-nodes/dist/ai/features/path-choice/run-reactive-path-choice-loop.js +0 -93
- package/vendor/common-nodes/dist/ai/features/prompt/build-effective-system-prompt.d.ts +0 -9
- package/vendor/common-nodes/dist/ai/features/prompt/build-effective-system-prompt.js +0 -21
- package/vendor/common-nodes/dist/ai/features/prompt/normalize-max-iterations.d.ts +0 -13
- package/vendor/common-nodes/dist/ai/features/prompt/normalize-max-iterations.js +0 -23
- package/vendor/common-nodes/dist/ai/features/prompt/resolve-chat-provider-model.d.ts +0 -10
- package/vendor/common-nodes/dist/ai/features/prompt/resolve-chat-provider-model.js +0 -8
- package/vendor/common-nodes/dist/ai/features/run-host-services.d.ts +0 -54
- package/vendor/common-nodes/dist/ai/features/run-host-services.js +0 -29
- package/vendor/common-nodes/dist/ai/features/scripted-chat-completion-stream.d.ts +0 -17
- package/vendor/common-nodes/dist/ai/features/scripted-chat-completion-stream.js +0 -61
- package/vendor/common-nodes/dist/ai/features/sub-agent-protocol.d.ts +0 -40
- package/vendor/common-nodes/dist/ai/features/sub-agent-protocol.js +0 -44
- package/vendor/common-nodes/dist/ai/features/ui-schema/llm-compaction-ui-schema.d.ts +0 -14
- package/vendor/common-nodes/dist/ai/features/ui-schema/llm-compaction-ui-schema.js +0 -18
- package/vendor/common-nodes/dist/ai/features/ui-schema/llm-panel-ui-schema.d.ts +0 -80
- package/vendor/common-nodes/dist/ai/features/ui-schema/llm-panel-ui-schema.js +0 -76
- package/vendor/common-nodes/dist/ai/features/ui-schema/llm-recovery-ui-schema.d.ts +0 -113
- package/vendor/common-nodes/dist/ai/features/ui-schema/llm-recovery-ui-schema.js +0 -131
- package/vendor/common-nodes/dist/ai/features/wait-for-subagent-result.d.ts +0 -7
- package/vendor/common-nodes/dist/ai/features/wait-for-subagent-result.js +0 -31
- package/vendor/common-nodes/dist/ai/filter-enabled-registrations.d.ts +0 -9
- package/vendor/common-nodes/dist/ai/filter-enabled-registrations.js +0 -18
- package/vendor/common-nodes/dist/ai/flatten-mcp-server-configs.d.ts +0 -7
- package/vendor/common-nodes/dist/ai/flatten-mcp-server-configs.js +0 -21
- package/vendor/common-nodes/dist/ai/inventory-tool-round.d.ts +0 -33
- package/vendor/common-nodes/dist/ai/inventory-tool-round.js +0 -215
- package/vendor/common-nodes/dist/ai/llm-compaction-ui-schema.d.ts +0 -14
- package/vendor/common-nodes/dist/ai/llm-compaction-ui-schema.js +0 -18
- package/vendor/common-nodes/dist/ai/llm-loop/autokick-recovery.d.ts +0 -13
- package/vendor/common-nodes/dist/ai/llm-loop/autokick-recovery.js +0 -17
- package/vendor/common-nodes/dist/ai/llm-loop/classify-llm-failure.d.ts +0 -2
- package/vendor/common-nodes/dist/ai/llm-loop/classify-llm-failure.js +0 -113
- package/vendor/common-nodes/dist/ai/llm-loop/dead-loop-detector.d.ts +0 -28
- package/vendor/common-nodes/dist/ai/llm-loop/dead-loop-detector.js +0 -194
- package/vendor/common-nodes/dist/ai/llm-loop/llm-loop-reducer.d.ts +0 -2
- package/vendor/common-nodes/dist/ai/llm-loop/llm-loop-reducer.js +0 -216
- package/vendor/common-nodes/dist/ai/llm-loop/llm-loop-types.d.ts +0 -125
- package/vendor/common-nodes/dist/ai/llm-loop/llm-loop-types.js +0 -39
- package/vendor/common-nodes/dist/ai/llm-loop/normalize-llm-recovery-policy.d.ts +0 -2
- package/vendor/common-nodes/dist/ai/llm-loop/normalize-llm-recovery-policy.js +0 -59
- package/vendor/common-nodes/dist/ai/llm-loop/operators/normalize-tool-result.d.ts +0 -1
- package/vendor/common-nodes/dist/ai/llm-loop/operators/normalize-tool-result.js +0 -7
- package/vendor/common-nodes/dist/ai/llm-loop/operators/observe-provider-stream.d.ts +0 -43
- package/vendor/common-nodes/dist/ai/llm-loop/operators/observe-provider-stream.js +0 -96
- package/vendor/common-nodes/dist/ai/llm-loop/run-agent-loop.d.ts +0 -31
- package/vendor/common-nodes/dist/ai/llm-loop/run-agent-loop.js +0 -57
- package/vendor/common-nodes/dist/ai/llm-loop/run-llm-loop.d.ts +0 -79
- package/vendor/common-nodes/dist/ai/llm-loop/run-llm-loop.js +0 -637
- package/vendor/common-nodes/dist/ai/llm-panel-ui-schema.d.ts +0 -80
- package/vendor/common-nodes/dist/ai/llm-panel-ui-schema.js +0 -76
- package/vendor/common-nodes/dist/ai/llm-recovery-ui-schema.d.ts +0 -113
- package/vendor/common-nodes/dist/ai/llm-recovery-ui-schema.js +0 -131
- package/vendor/common-nodes/dist/ai/llm-role-preset.d.ts +0 -69
- package/vendor/common-nodes/dist/ai/llm-role-preset.js +0 -265
- package/vendor/common-nodes/dist/ai/llm-session/run-session-machine.d.ts +0 -21
- package/vendor/common-nodes/dist/ai/llm-session/run-session-machine.js +0 -118
- package/vendor/common-nodes/dist/ai/llm-session-shell.d.ts +0 -147
- package/vendor/common-nodes/dist/ai/llm-session-shell.js +0 -189
- package/vendor/common-nodes/dist/ai/mcp-server/node.d.ts +0 -26
- package/vendor/common-nodes/dist/ai/mcp-server/node.js +0 -68
- package/vendor/common-nodes/dist/ai/mcp-server-config.d.ts +0 -16
- package/vendor/common-nodes/dist/ai/mcp-server-config.js +0 -2
- package/vendor/common-nodes/dist/ai/mcp-tool-id.d.ts +0 -11
- package/vendor/common-nodes/dist/ai/mcp-tool-id.js +0 -30
- package/vendor/common-nodes/dist/ai/merge-tool-inventory.d.ts +0 -10
- package/vendor/common-nodes/dist/ai/merge-tool-inventory.js +0 -26
- package/vendor/common-nodes/dist/ai/nodes/critique/node.d.ts +0 -588
- package/vendor/common-nodes/dist/ai/nodes/critique/node.js +0 -227
- package/vendor/common-nodes/dist/ai/nodes/fake-llm/node.d.ts +0 -571
- package/vendor/common-nodes/dist/ai/nodes/fake-llm/node.js +0 -201
- package/vendor/common-nodes/dist/ai/nodes/openai-llm/node.d.ts +0 -587
- package/vendor/common-nodes/dist/ai/nodes/openai-llm/node.js +0 -84
- package/vendor/common-nodes/dist/ai/nodes/review/node.d.ts +0 -593
- package/vendor/common-nodes/dist/ai/nodes/review/node.js +0 -227
- package/vendor/common-nodes/dist/ai/nodes/sub-agent/node.d.ts +0 -630
- package/vendor/common-nodes/dist/ai/nodes/sub-agent/node.js +0 -417
- package/vendor/common-nodes/dist/ai/normalize-max-iterations.d.ts +0 -13
- package/vendor/common-nodes/dist/ai/normalize-max-iterations.js +0 -23
- package/vendor/common-nodes/dist/ai/openai/context-length-error.d.ts +0 -14
- package/vendor/common-nodes/dist/ai/openai/context-length-error.js +0 -63
- package/vendor/common-nodes/dist/ai/openai/create-chat-completion-stream.d.ts +0 -19
- package/vendor/common-nodes/dist/ai/openai/create-chat-completion-stream.js +0 -182
- package/vendor/common-nodes/dist/ai/openai/create-embedding.d.ts +0 -18
- package/vendor/common-nodes/dist/ai/openai/create-embedding.js +0 -43
- package/vendor/common-nodes/dist/ai/openai/list-provider-models.d.ts +0 -28
- package/vendor/common-nodes/dist/ai/openai/list-provider-models.js +0 -52
- package/vendor/common-nodes/dist/ai/openai/llm-context-compaction.d.ts +0 -31
- package/vendor/common-nodes/dist/ai/openai/llm-context-compaction.js +0 -326
- package/vendor/common-nodes/dist/ai/openai/normalize-compaction-params.d.ts +0 -14
- package/vendor/common-nodes/dist/ai/openai/normalize-compaction-params.js +0 -21
- package/vendor/common-nodes/dist/ai/openai/prepare-chat-completion.d.ts +0 -30
- package/vendor/common-nodes/dist/ai/openai/prepare-chat-completion.js +0 -132
- package/vendor/common-nodes/dist/ai/openai-llm/node.d.ts +0 -587
- package/vendor/common-nodes/dist/ai/openai-llm/node.js +0 -88
- package/vendor/common-nodes/dist/ai/path-choice/control-tools.d.ts +0 -20
- package/vendor/common-nodes/dist/ai/path-choice/control-tools.js +0 -70
- package/vendor/common-nodes/dist/ai/path-choice/run-path-choice-tool-loop.d.ts +0 -54
- package/vendor/common-nodes/dist/ai/path-choice/run-path-choice-tool-loop.js +0 -242
- package/vendor/common-nodes/dist/ai/path-choice/run-reactive-path-choice-loop.d.ts +0 -35
- package/vendor/common-nodes/dist/ai/path-choice/run-reactive-path-choice-loop.js +0 -106
- package/vendor/common-nodes/dist/ai/resolve-chat-provider-model.d.ts +0 -10
- package/vendor/common-nodes/dist/ai/resolve-chat-provider-model.js +0 -8
- package/vendor/common-nodes/dist/ai/resolve-mcp-inventory.d.ts +0 -8
- package/vendor/common-nodes/dist/ai/resolve-mcp-inventory.js +0 -43
- package/vendor/common-nodes/dist/ai/review/node.d.ts +0 -593
- package/vendor/common-nodes/dist/ai/review/node.js +0 -240
- package/vendor/common-nodes/dist/ai/review/review-control-tools.d.ts +0 -20
- package/vendor/common-nodes/dist/ai/review/review-control-tools.js +0 -70
- package/vendor/common-nodes/dist/ai/review/run-review-tool-loop.d.ts +0 -44
- package/vendor/common-nodes/dist/ai/review/run-review-tool-loop.js +0 -193
- package/vendor/common-nodes/dist/ai/run-host-services.d.ts +0 -32
- package/vendor/common-nodes/dist/ai/run-host-services.js +0 -11
- package/vendor/common-nodes/dist/ai/run-internal-tool-loop.d.ts +0 -39
- package/vendor/common-nodes/dist/ai/run-internal-tool-loop.js +0 -138
- package/vendor/common-nodes/dist/ai/scripted-chat-completion-stream.d.ts +0 -17
- package/vendor/common-nodes/dist/ai/scripted-chat-completion-stream.js +0 -61
- package/vendor/common-nodes/dist/ai/sub-agent/node.d.ts +0 -630
- package/vendor/common-nodes/dist/ai/sub-agent/node.js +0 -302
- package/vendor/common-nodes/dist/ai/sub-agent-protocol.d.ts +0 -39
- package/vendor/common-nodes/dist/ai/sub-agent-protocol.js +0 -43
- package/vendor/common-nodes/dist/ai/tool-handler-context.d.ts +0 -4
- package/vendor/common-nodes/dist/ai/tool-handler-context.js +0 -16
- package/vendor/common-nodes/dist/ai/tool-registration.d.ts +0 -6
- package/vendor/common-nodes/dist/ai/tool-registration.js +0 -33
- package/vendor/common-nodes/dist/ai/wait-for-subagent-result.d.ts +0 -6
- package/vendor/common-nodes/dist/ai/wait-for-subagent-result.js +0 -30
- package/vendor/common-nodes/dist/catalog.d.ts +0 -6
- package/vendor/common-nodes/dist/catalog.js +0 -85
- package/vendor/common-nodes/dist/compile-custom-nodes/node.d.ts +0 -21
- package/vendor/common-nodes/dist/compile-custom-nodes/node.js +0 -45
- package/vendor/common-nodes/dist/crawl/crawl/node.d.ts +0 -99
- package/vendor/common-nodes/dist/crawl/crawl/node.js +0 -120
- package/vendor/common-nodes/dist/crawl/crawl-tools/node.d.ts +0 -20
- package/vendor/common-nodes/dist/crawl/crawl-tools/node.js +0 -13
- package/vendor/common-nodes/dist/crawl/extract-links/node.d.ts +0 -22
- package/vendor/common-nodes/dist/crawl/extract-links/node.js +0 -39
- package/vendor/common-nodes/dist/crawl/fetch-url/node.d.ts +0 -56
- package/vendor/common-nodes/dist/crawl/fetch-url/node.js +0 -80
- package/vendor/common-nodes/dist/crawl/html/extract-links.d.ts +0 -3
- package/vendor/common-nodes/dist/crawl/html/extract-links.js +0 -36
- package/vendor/common-nodes/dist/crawl/html/html-to-text.d.ts +0 -3
- package/vendor/common-nodes/dist/crawl/html/html-to-text.js +0 -36
- package/vendor/common-nodes/dist/crawl/html/index.d.ts +0 -3
- package/vendor/common-nodes/dist/crawl/html/index.js +0 -3
- package/vendor/common-nodes/dist/crawl/save-page/node.d.ts +0 -21
- package/vendor/common-nodes/dist/crawl/save-page/node.js +0 -63
- package/vendor/common-nodes/dist/crawl/tool-defs.d.ts +0 -81
- package/vendor/common-nodes/dist/crawl/tool-defs.js +0 -56
- package/vendor/common-nodes/dist/flow/checkpoint/node.d.ts +0 -23
- package/vendor/common-nodes/dist/flow/checkpoint/node.js +0 -40
- package/vendor/common-nodes/dist/flow/delay/node.d.ts +0 -26
- package/vendor/common-nodes/dist/flow/delay/node.js +0 -42
- package/vendor/common-nodes/dist/flow/loop/node.d.ts +0 -22
- package/vendor/common-nodes/dist/flow/loop/node.js +0 -45
- package/vendor/common-nodes/dist/flow/map-collect-body.d.ts +0 -21
- package/vendor/common-nodes/dist/flow/map-collect-body.js +0 -73
- package/vendor/common-nodes/dist/flow/merge/node.d.ts +0 -17
- package/vendor/common-nodes/dist/flow/merge/node.js +0 -25
- package/vendor/common-nodes/dist/flow/repeat/node.d.ts +0 -20
- package/vendor/common-nodes/dist/flow/repeat/node.js +0 -61
- package/vendor/common-nodes/dist/flow/router/build-router-definition.d.ts +0 -20
- package/vendor/common-nodes/dist/flow/router/build-router-definition.js +0 -23
- package/vendor/common-nodes/dist/flow/router/node.d.ts +0 -17
- package/vendor/common-nodes/dist/flow/router/node.js +0 -14
- package/vendor/common-nodes/dist/flow/router/router-constants.d.ts +0 -2
- package/vendor/common-nodes/dist/flow/router/router-constants.js +0 -2
- package/vendor/common-nodes/dist/hitl/approval-choice/node.d.ts +0 -23
- package/vendor/common-nodes/dist/hitl/approval-choice/node.js +0 -71
- package/vendor/common-nodes/dist/hitl/ask-user/node.d.ts +0 -23
- package/vendor/common-nodes/dist/hitl/ask-user/node.js +0 -40
- package/vendor/common-nodes/dist/hitl/chat-input/node.d.ts +0 -20
- package/vendor/common-nodes/dist/hitl/chat-input/node.js +0 -39
- package/vendor/common-nodes/dist/hitl/hitl-required-role.d.ts +0 -38
- package/vendor/common-nodes/dist/hitl/hitl-required-role.js +0 -21
- package/vendor/common-nodes/dist/hitl/review-gate/node.d.ts +0 -17
- package/vendor/common-nodes/dist/hitl/review-gate/node.js +0 -64
- package/vendor/common-nodes/dist/kb/chunk-text.d.ts +0 -8
- package/vendor/common-nodes/dist/kb/chunk-text.js +0 -52
- package/vendor/common-nodes/dist/kb/cosine.d.ts +0 -3
- package/vendor/common-nodes/dist/kb/cosine.js +0 -21
- package/vendor/common-nodes/dist/kb/kb-apply-curation/node.d.ts +0 -25
- package/vendor/common-nodes/dist/kb/kb-apply-curation/node.js +0 -38
- package/vendor/common-nodes/dist/kb/kb-contradict/node.d.ts +0 -25
- package/vendor/common-nodes/dist/kb/kb-contradict/node.js +0 -70
- package/vendor/common-nodes/dist/kb/kb-dedupe/node.d.ts +0 -25
- package/vendor/common-nodes/dist/kb/kb-dedupe/node.js +0 -61
- package/vendor/common-nodes/dist/kb/kb-delete/node.d.ts +0 -24
- package/vendor/common-nodes/dist/kb/kb-delete/node.js +0 -60
- package/vendor/common-nodes/dist/kb/kb-embed/node.d.ts +0 -26
- package/vendor/common-nodes/dist/kb/kb-embed/node.js +0 -52
- package/vendor/common-nodes/dist/kb/kb-ingest/node.d.ts +0 -25
- package/vendor/common-nodes/dist/kb/kb-ingest/node.js +0 -68
- package/vendor/common-nodes/dist/kb/kb-list/node.d.ts +0 -24
- package/vendor/common-nodes/dist/kb/kb-list/node.js +0 -42
- package/vendor/common-nodes/dist/kb/kb-paths.d.ts +0 -8
- package/vendor/common-nodes/dist/kb/kb-paths.js +0 -19
- package/vendor/common-nodes/dist/kb/kb-search/node.d.ts +0 -24
- package/vendor/common-nodes/dist/kb/kb-search/node.js +0 -60
- package/vendor/common-nodes/dist/kb/kb-store.d.ts +0 -57
- package/vendor/common-nodes/dist/kb/kb-store.js +0 -290
- package/vendor/common-nodes/dist/kb/kb-tools/node.d.ts +0 -25
- package/vendor/common-nodes/dist/kb/kb-tools/node.js +0 -14
- package/vendor/common-nodes/dist/kb/local-embed.d.ts +0 -9
- package/vendor/common-nodes/dist/kb/local-embed.js +0 -41
- package/vendor/common-nodes/dist/kb/parse-string-list.d.ts +0 -3
- package/vendor/common-nodes/dist/kb/parse-string-list.js +0 -25
- package/vendor/common-nodes/dist/kb/tool-defs.d.ts +0 -85
- package/vendor/common-nodes/dist/kb/tool-defs.js +0 -67
- package/vendor/common-nodes/dist/langflower-tools/emit-registration-tools.d.ts +0 -18
- package/vendor/common-nodes/dist/langflower-tools/emit-registration-tools.js +0 -29
- package/vendor/common-nodes/dist/langflower-tools/node.d.ts +0 -20
- package/vendor/common-nodes/dist/langflower-tools/node.js +0 -77
- package/vendor/common-nodes/dist/logic/assert/node.d.ts +0 -20
- package/vendor/common-nodes/dist/logic/assert/node.js +0 -50
- package/vendor/common-nodes/dist/logic/compare/evaluate-compare.d.ts +0 -28
- package/vendor/common-nodes/dist/logic/compare/evaluate-compare.js +0 -60
- package/vendor/common-nodes/dist/logic/compare/node.d.ts +0 -107
- package/vendor/common-nodes/dist/logic/compare/node.js +0 -40
- package/vendor/common-nodes/dist/logic/gate/node.d.ts +0 -17
- package/vendor/common-nodes/dist/logic/gate/node.js +0 -35
- package/vendor/common-nodes/dist/logic/if/node.d.ts +0 -17
- package/vendor/common-nodes/dist/logic/if/node.js +0 -40
- package/vendor/common-nodes/dist/logic/switch/build-switch-definition.d.ts +0 -18
- package/vendor/common-nodes/dist/logic/switch/build-switch-definition.js +0 -30
- package/vendor/common-nodes/dist/logic/switch/node.d.ts +0 -87
- package/vendor/common-nodes/dist/logic/switch/node.js +0 -69
- package/vendor/common-nodes/dist/logic/switch/switch-constants.d.ts +0 -15
- package/vendor/common-nodes/dist/logic/switch/switch-constants.js +0 -24
- package/vendor/common-nodes/dist/logic/switch/switch-rules.d.ts +0 -6
- package/vendor/common-nodes/dist/logic/switch/switch-rules.js +0 -43
- package/vendor/common-nodes/dist/mcp/build-mcp-handle.d.ts +0 -13
- package/vendor/common-nodes/dist/mcp/build-mcp-handle.js +0 -65
- package/vendor/common-nodes/dist/mcp/build-mcp-transport.d.ts +0 -14
- package/vendor/common-nodes/dist/mcp/build-mcp-transport.js +0 -56
- package/vendor/common-nodes/dist/mcp/collect-mcp-tool-registrations.d.ts +0 -7
- package/vendor/common-nodes/dist/mcp/collect-mcp-tool-registrations.js +0 -19
- package/vendor/common-nodes/dist/mcp/create-system-mcp-transports.d.ts +0 -48
- package/vendor/common-nodes/dist/mcp/create-system-mcp-transports.js +0 -124
- package/vendor/common-nodes/dist/mcp/flatten-mcp-handles.d.ts +0 -6
- package/vendor/common-nodes/dist/mcp/flatten-mcp-handles.js +0 -21
- package/vendor/common-nodes/dist/mcp/flatten-mcp-server-configs.d.ts +0 -7
- package/vendor/common-nodes/dist/mcp/flatten-mcp-server-configs.js +0 -21
- package/vendor/common-nodes/dist/mcp/flatten-mcp-transports.d.ts +0 -7
- package/vendor/common-nodes/dist/mcp/flatten-mcp-transports.js +0 -22
- package/vendor/common-nodes/dist/mcp/format-mcp-connect-error.d.ts +0 -10
- package/vendor/common-nodes/dist/mcp/format-mcp-connect-error.js +0 -18
- package/vendor/common-nodes/dist/mcp/mcp-http/node.d.ts +0 -22
- package/vendor/common-nodes/dist/mcp/mcp-http/node.js +0 -102
- package/vendor/common-nodes/dist/mcp/mcp-server/node.d.ts +0 -26
- package/vendor/common-nodes/dist/mcp/mcp-server/node.js +0 -68
- package/vendor/common-nodes/dist/mcp/mcp-server-config.d.ts +0 -2
- package/vendor/common-nodes/dist/mcp/mcp-server-config.js +0 -2
- package/vendor/common-nodes/dist/mcp/mcp-stdio/node.d.ts +0 -22
- package/vendor/common-nodes/dist/mcp/mcp-stdio/node.js +0 -91
- package/vendor/common-nodes/dist/mcp/resolve-agent-mcp-inventory.d.ts +0 -13
- package/vendor/common-nodes/dist/mcp/resolve-agent-mcp-inventory.js +0 -17
- package/vendor/common-nodes/dist/mcp/resolve-mcp-inventory.d.ts +0 -8
- package/vendor/common-nodes/dist/mcp/resolve-mcp-inventory.js +0 -43
- package/vendor/common-nodes/dist/memory/memory/node.d.ts +0 -79
- package/vendor/common-nodes/dist/memory/memory/node.js +0 -76
- package/vendor/common-nodes/dist/memory/memory-tools/node.d.ts +0 -20
- package/vendor/common-nodes/dist/memory/memory-tools/node.js +0 -13
- package/vendor/common-nodes/dist/memory/tool-defs.d.ts +0 -48
- package/vendor/common-nodes/dist/memory/tool-defs.js +0 -45
- package/vendor/common-nodes/dist/obsidian/build-moc/node.d.ts +0 -26
- package/vendor/common-nodes/dist/obsidian/build-moc/node.js +0 -52
- package/vendor/common-nodes/dist/obsidian/build-moc.d.ts +0 -13
- package/vendor/common-nodes/dist/obsidian/build-moc.js +0 -57
- package/vendor/common-nodes/dist/obsidian/frontmatter/node.d.ts +0 -27
- package/vendor/common-nodes/dist/obsidian/frontmatter/node.js +0 -66
- package/vendor/common-nodes/dist/obsidian/frontmatter.d.ts +0 -26
- package/vendor/common-nodes/dist/obsidian/frontmatter.js +0 -142
- package/vendor/common-nodes/dist/obsidian/wikilink-rewrite/node.d.ts +0 -26
- package/vendor/common-nodes/dist/obsidian/wikilink-rewrite/node.js +0 -51
- package/vendor/common-nodes/dist/obsidian/wikilinks.d.ts +0 -22
- package/vendor/common-nodes/dist/obsidian/wikilinks.js +0 -84
- package/vendor/common-nodes/dist/output/finish/node.d.ts +0 -17
- package/vendor/common-nodes/dist/output/finish/node.js +0 -22
- package/vendor/common-nodes/dist/output/preview/node.d.ts +0 -17
- package/vendor/common-nodes/dist/output/preview/node.js +0 -41
- package/vendor/common-nodes/dist/primitives/boolean/node.d.ts +0 -17
- package/vendor/common-nodes/dist/primitives/boolean/node.js +0 -25
- package/vendor/common-nodes/dist/primitives/number/node.d.ts +0 -17
- package/vendor/common-nodes/dist/primitives/number/node.js +0 -25
- package/vendor/common-nodes/dist/primitives/string/node.d.ts +0 -17
- package/vendor/common-nodes/dist/primitives/string/node.js +0 -25
- package/vendor/common-nodes/dist/resolve-workflow-node-definition.d.ts +0 -7
- package/vendor/common-nodes/dist/resolve-workflow-node-definition.js +0 -3
- package/vendor/common-nodes/dist/text/append-file/node.d.ts +0 -20
- package/vendor/common-nodes/dist/text/append-file/node.js +0 -60
- package/vendor/common-nodes/dist/text/concat/node.d.ts +0 -17
- package/vendor/common-nodes/dist/text/concat/node.js +0 -34
- package/vendor/common-nodes/dist/text/read-file/node.d.ts +0 -20
- package/vendor/common-nodes/dist/text/read-file/node.js +0 -51
- package/vendor/common-nodes/dist/text/write-file/node.d.ts +0 -19
- package/vendor/common-nodes/dist/text/write-file/node.js +0 -52
- package/vendor/common-nodes/dist/tools/collect-agent-tool-handles.d.ts +0 -12
- package/vendor/common-nodes/dist/tools/collect-agent-tool-handles.js +0 -42
- package/vendor/common-nodes/dist/tools/filter-enabled-registrations.d.ts +0 -8
- package/vendor/common-nodes/dist/tools/filter-enabled-registrations.js +0 -17
- package/vendor/common-nodes/dist/tools/inventory-tool-round.d.ts +0 -20
- package/vendor/common-nodes/dist/tools/inventory-tool-round.js +0 -91
- package/vendor/common-nodes/dist/tools/merge-tool-inventory.d.ts +0 -10
- package/vendor/common-nodes/dist/tools/merge-tool-inventory.js +0 -26
- package/vendor/common-nodes/dist/tools/run-internal-tool-loop.d.ts +0 -55
- package/vendor/common-nodes/dist/tools/run-internal-tool-loop.js +0 -360
- package/vendor/common-nodes/dist/tools/tool-collection/node.d.ts +0 -20
- package/vendor/common-nodes/dist/tools/tool-collection/node.js +0 -42
- package/vendor/common-nodes/dist/tools/tool-registration.d.ts +0 -6
- package/vendor/common-nodes/dist/tools/tool-registration.js +0 -33
- package/vendor/common-nodes/package.json +0 -44
- package/vendor/compiler/dist/bundle-pack.d.ts +0 -18
- package/vendor/compiler/dist/bundle-pack.js +0 -98
- package/vendor/compiler/dist/cache-key.d.ts +0 -5
- package/vendor/compiler/dist/cache-key.js +0 -35
- package/vendor/compiler/dist/compile-project-nodes.d.ts +0 -14
- package/vendor/compiler/dist/compile-project-nodes.js +0 -143
- package/vendor/compiler/dist/compile-types.d.ts +0 -22
- package/vendor/compiler/dist/compile-types.js +0 -1
- package/vendor/compiler/dist/discover-packs.d.ts +0 -6
- package/vendor/compiler/dist/discover-packs.js +0 -93
- package/vendor/compiler/dist/format-compilation-errors.d.ts +0 -17
- package/vendor/compiler/dist/format-compilation-errors.js +0 -62
- package/vendor/compiler/dist/resolve-host-types.d.ts +0 -27
- package/vendor/compiler/dist/resolve-host-types.js +0 -185
- package/vendor/compiler/dist/typecheck-pack.d.ts +0 -20
- package/vendor/compiler/dist/typecheck-pack.js +0 -102
- package/vendor/compiler/dist/validate-default-export.d.ts +0 -9
- package/vendor/compiler/dist/validate-default-export.js +0 -40
- package/vendor/compiler/dist/write-compilation-errors.d.ts +0 -4
- package/vendor/compiler/dist/write-compilation-errors.js +0 -27
- package/vendor/compiler/package.json +0 -26
- package/vendor/eval/dist/eval-pack-types.d.ts +0 -14
- package/vendor/eval/dist/eval-pack-types.js +0 -1
- package/vendor/eval/dist/load-pack.d.ts +0 -5
- package/vendor/eval/dist/load-pack.js +0 -97
- package/vendor/eval/dist/load-skill-via-read.d.ts +0 -6
- package/vendor/eval/dist/load-skill-via-read.js +0 -14
- package/vendor/eval/dist/run-eval-suite.d.ts +0 -46
- package/vendor/eval/dist/run-eval-suite.js +0 -90
- package/vendor/eval/dist/score-case.d.ts +0 -2
- package/vendor/eval/dist/score-case.js +0 -10
- package/vendor/eval/package.json +0 -21
- package/vendor/server/dist/bootstrap/copy-force.d.ts +0 -7
- package/vendor/server/dist/bootstrap/copy-force.js +0 -18
- package/vendor/server/dist/bootstrap/copy-if-missing.d.ts +0 -7
- package/vendor/server/dist/bootstrap/copy-if-missing.js +0 -32
- package/vendor/server/dist/bootstrap/project-bootstrap.service.d.ts +0 -17
- package/vendor/server/dist/bootstrap/project-bootstrap.service.js +0 -82
- package/vendor/server/dist/bootstrap/project-bootstrap.service.test.d.ts +0 -2
- package/vendor/server/dist/bootstrap/project-bootstrap.service.test.js +0 -20
- package/vendor/server/dist/bootstrap/resolve-skeleton-root.d.ts +0 -8
- package/vendor/server/dist/bootstrap/resolve-skeleton-root.js +0 -34
- package/vendor/server/dist/bootstrap/seed-skeleton.d.ts +0 -15
- package/vendor/server/dist/bootstrap/seed-skeleton.js +0 -55
- package/vendor/server/dist/bridge/attach-langflower-bridge.d.ts +0 -19
- package/vendor/server/dist/bridge/attach-langflower-bridge.js +0 -79
- package/vendor/server/dist/bridge/bind-llm-context.d.ts +0 -13
- package/vendor/server/dist/bridge/bind-llm-context.js +0 -30
- package/vendor/server/dist/bridge/bridge-event-log.d.ts +0 -12
- package/vendor/server/dist/bridge/bridge-event-log.js +0 -114
- package/vendor/server/dist/bridge/bridge-outbound.d.ts +0 -4
- package/vendor/server/dist/bridge/bridge-outbound.js +0 -14
- package/vendor/server/dist/bridge/build-execution-context.d.ts +0 -31
- package/vendor/server/dist/bridge/build-execution-context.js +0 -219
- package/vendor/server/dist/bridge/build-execution-context.test.d.ts +0 -2
- package/vendor/server/dist/bridge/build-execution-context.test.js +0 -126
- package/vendor/server/dist/bridge/build-langflower-config-snapshot.d.ts +0 -6
- package/vendor/server/dist/bridge/build-langflower-config-snapshot.js +0 -17
- package/vendor/server/dist/bridge/client-index.d.ts +0 -5
- package/vendor/server/dist/bridge/client-index.js +0 -16
- package/vendor/server/dist/bridge/emit-bootstrap.d.ts +0 -16
- package/vendor/server/dist/bridge/emit-bootstrap.js +0 -79
- package/vendor/server/dist/bridge/forward-runner-event.d.ts +0 -4
- package/vendor/server/dist/bridge/forward-runner-event.js +0 -12
- package/vendor/server/dist/bridge/forward-runner-event.test.d.ts +0 -2
- package/vendor/server/dist/bridge/forward-runner-event.test.js +0 -91
- package/vendor/server/dist/bridge/get-live-wired-tools.d.ts +0 -13
- package/vendor/server/dist/bridge/get-live-wired-tools.js +0 -83
- package/vendor/server/dist/bridge/inbound-guards.d.ts +0 -2
- package/vendor/server/dist/bridge/inbound-guards.js +0 -4
- package/vendor/server/dist/bridge/langflower-bridge.types.d.ts +0 -4
- package/vendor/server/dist/bridge/langflower-bridge.types.js +0 -1
- package/vendor/server/dist/bridge/langflower-tools-rpc.d.ts +0 -7
- package/vendor/server/dist/bridge/langflower-tools-rpc.js +0 -29
- package/vendor/server/dist/bridge/push-models-catalog.d.ts +0 -12
- package/vendor/server/dist/bridge/push-models-catalog.js +0 -31
- package/vendor/server/dist/bridge/same-canvas-viewport.d.ts +0 -3
- package/vendor/server/dist/bridge/same-canvas-viewport.js +0 -5
- package/vendor/server/dist/bridge/settings-draft-controller.d.ts +0 -14
- package/vendor/server/dist/bridge/settings-draft-controller.js +0 -201
- package/vendor/server/dist/bridge/wire-config-handlers.d.ts +0 -11
- package/vendor/server/dist/bridge/wire-config-handlers.js +0 -49
- package/vendor/server/dist/bridge/wire-custom-palette-handlers.d.ts +0 -5
- package/vendor/server/dist/bridge/wire-custom-palette-handlers.js +0 -8
- package/vendor/server/dist/bridge/wire-editor-handlers.d.ts +0 -12
- package/vendor/server/dist/bridge/wire-editor-handlers.js +0 -240
- package/vendor/server/dist/bridge/wire-models-handlers.d.ts +0 -5
- package/vendor/server/dist/bridge/wire-models-handlers.js +0 -23
- package/vendor/server/dist/bridge/wire-palette-handlers.d.ts +0 -4
- package/vendor/server/dist/bridge/wire-palette-handlers.js +0 -9
- package/vendor/server/dist/bridge/wire-project-bootstrap-handlers.d.ts +0 -9
- package/vendor/server/dist/bridge/wire-project-bootstrap-handlers.js +0 -63
- package/vendor/server/dist/bridge/wire-runner-handlers.d.ts +0 -10
- package/vendor/server/dist/bridge/wire-runner-handlers.js +0 -302
- package/vendor/server/dist/bridge/wire-workflow-handlers.d.ts +0 -5
- package/vendor/server/dist/bridge/wire-workflow-handlers.js +0 -245
- package/vendor/server/dist/bridge/wrap-builtin-tool-handles.d.ts +0 -10
- package/vendor/server/dist/bridge/wrap-builtin-tool-handles.js +0 -42
- package/vendor/server/dist/checkpoint/list-resumable-checkpoints.d.ts +0 -4
- package/vendor/server/dist/checkpoint/list-resumable-checkpoints.js +0 -11
- package/vendor/server/dist/checkpoint/resolve-checkpoint-boundary.d.ts +0 -11
- package/vendor/server/dist/checkpoint/resolve-checkpoint-boundary.js +0 -31
- package/vendor/server/dist/checkpoint/run-checkpoint-session.d.ts +0 -41
- package/vendor/server/dist/checkpoint/run-checkpoint-session.js +0 -170
- package/vendor/server/dist/checkpoint/workflow-checkpoint-store.d.ts +0 -23
- package/vendor/server/dist/checkpoint/workflow-checkpoint-store.js +0 -177
- package/vendor/server/dist/checkpoint/workflow-checkpoint-store.test.d.ts +0 -2
- package/vendor/server/dist/checkpoint/workflow-checkpoint-store.test.js +0 -60
- package/vendor/server/dist/config/config.service.d.ts +0 -9
- package/vendor/server/dist/config/config.service.js +0 -31
- package/vendor/server/dist/config/langflower-config.service.d.ts +0 -35
- package/vendor/server/dist/config/langflower-config.service.js +0 -360
- package/vendor/server/dist/config/langflower-config.service.test.d.ts +0 -2
- package/vendor/server/dist/config/langflower-config.service.test.js +0 -111
- package/vendor/server/dist/config/redact-langflower-config.d.ts +0 -8
- package/vendor/server/dist/config/redact-langflower-config.js +0 -42
- package/vendor/server/dist/config/redact-langflower-config.test.d.ts +0 -2
- package/vendor/server/dist/config/redact-langflower-config.test.js +0 -69
- package/vendor/server/dist/config/resolve-draft-provider-credentials.d.ts +0 -18
- package/vendor/server/dist/config/resolve-draft-provider-credentials.js +0 -60
- package/vendor/server/dist/config/resolve-global-langflower-config-path.d.ts +0 -5
- package/vendor/server/dist/config/resolve-global-langflower-config-path.js +0 -18
- package/vendor/server/dist/config/resolve-provider-credentials.d.ts +0 -20
- package/vendor/server/dist/config/resolve-provider-credentials.js +0 -59
- package/vendor/server/dist/config/resolve-provider-credentials.test.d.ts +0 -2
- package/vendor/server/dist/config/resolve-provider-credentials.test.js +0 -63
- package/vendor/server/dist/crawl/create-crawl-context.d.ts +0 -6
- package/vendor/server/dist/crawl/create-crawl-context.js +0 -33
- package/vendor/server/dist/crawl/create-crawl-context.test.d.ts +0 -2
- package/vendor/server/dist/crawl/create-crawl-context.test.js +0 -30
- package/vendor/server/dist/crawl/create-web-fetch.d.ts +0 -12
- package/vendor/server/dist/crawl/create-web-fetch.js +0 -128
- package/vendor/server/dist/crawl/create-web-fetch.test.d.ts +0 -2
- package/vendor/server/dist/crawl/create-web-fetch.test.js +0 -43
- package/vendor/server/dist/crawl/ssrf-guard.d.ts +0 -13
- package/vendor/server/dist/crawl/ssrf-guard.js +0 -117
- package/vendor/server/dist/crawl/ssrf-guard.test.d.ts +0 -2
- package/vendor/server/dist/crawl/ssrf-guard.test.js +0 -46
- package/vendor/server/dist/create-server.d.ts +0 -10
- package/vendor/server/dist/create-server.js +0 -60
- package/vendor/server/dist/harness/pending-permission-asks.d.ts +0 -14
- package/vendor/server/dist/harness/pending-permission-asks.js +0 -45
- package/vendor/server/dist/harness/permission.d.ts +0 -23
- package/vendor/server/dist/harness/permission.js +0 -31
- package/vendor/server/dist/harness/permission.test.d.ts +0 -2
- package/vendor/server/dist/harness/permission.test.js +0 -50
- package/vendor/server/dist/index.d.ts +0 -4
- package/vendor/server/dist/index.js +0 -4
- package/vendor/server/dist/kb/chunk-text.d.ts +0 -8
- package/vendor/server/dist/kb/chunk-text.js +0 -52
- package/vendor/server/dist/kb/cosine.d.ts +0 -3
- package/vendor/server/dist/kb/cosine.js +0 -21
- package/vendor/server/dist/kb/create-kb-context.d.ts +0 -6
- package/vendor/server/dist/kb/create-kb-context.js +0 -46
- package/vendor/server/dist/kb/kb-paths.d.ts +0 -8
- package/vendor/server/dist/kb/kb-paths.js +0 -19
- package/vendor/server/dist/kb/kb-store.d.ts +0 -41
- package/vendor/server/dist/kb/kb-store.js +0 -250
- package/vendor/server/dist/kb/kb-store.test.d.ts +0 -2
- package/vendor/server/dist/kb/kb-store.test.js +0 -94
- package/vendor/server/dist/kb/local-embed.d.ts +0 -8
- package/vendor/server/dist/kb/local-embed.js +0 -41
- package/vendor/server/dist/listen-http-server.d.ts +0 -6
- package/vendor/server/dist/listen-http-server.js +0 -18
- package/vendor/server/dist/llm/create-chat-completion-stream.d.ts +0 -8
- package/vendor/server/dist/llm/create-chat-completion-stream.js +0 -125
- package/vendor/server/dist/llm/create-chat-completion-stream.test.d.ts +0 -2
- package/vendor/server/dist/llm/create-chat-completion-stream.test.js +0 -72
- package/vendor/server/dist/llm/create-embedding.d.ts +0 -9
- package/vendor/server/dist/llm/create-embedding.js +0 -51
- package/vendor/server/dist/llm/list-provider-models.d.ts +0 -29
- package/vendor/server/dist/llm/list-provider-models.js +0 -55
- package/vendor/server/dist/llm/list-provider-models.test.d.ts +0 -2
- package/vendor/server/dist/llm/list-provider-models.test.js +0 -97
- package/vendor/server/dist/mcp/create-mcp-runtime.d.ts +0 -21
- package/vendor/server/dist/mcp/create-mcp-runtime.js +0 -167
- package/vendor/server/dist/mcp/create-mcp-runtime.test.d.ts +0 -2
- package/vendor/server/dist/mcp/create-mcp-runtime.test.js +0 -69
- package/vendor/server/dist/mcp/mcp-stdio-client.d.ts +0 -32
- package/vendor/server/dist/mcp/mcp-stdio-client.js +0 -183
- package/vendor/server/dist/mcp/mcp-tool-id.d.ts +0 -5
- package/vendor/server/dist/mcp/mcp-tool-id.js +0 -5
- package/vendor/server/dist/mcp/openai-mcp-tool-loop.test.d.ts +0 -2
- package/vendor/server/dist/mcp/openai-mcp-tool-loop.test.js +0 -189
- package/vendor/server/dist/mcp/wrap-harness-with-mcp.d.ts +0 -5
- package/vendor/server/dist/mcp/wrap-harness-with-mcp.js +0 -14
- package/vendor/server/dist/palette/compile-and-hot-swap-custom-nodes.d.ts +0 -10
- package/vendor/server/dist/palette/compile-and-hot-swap-custom-nodes.js +0 -23
- package/vendor/server/dist/palette/custom-node-registry.d.ts +0 -10
- package/vendor/server/dist/palette/custom-node-registry.js +0 -19
- package/vendor/server/dist/palette/custom-palette.service.d.ts +0 -12
- package/vendor/server/dist/palette/custom-palette.service.js +0 -63
- package/vendor/server/dist/palette/palette.service.d.ts +0 -13
- package/vendor/server/dist/palette/palette.service.js +0 -28
- package/vendor/server/dist/server-context.d.ts +0 -18
- package/vendor/server/dist/server-context.js +0 -29
- package/vendor/server/dist/session/build-selected-node-payload.d.ts +0 -9
- package/vendor/server/dist/session/build-selected-node-payload.js +0 -20
- package/vendor/server/dist/session/build-session-bootstrap.d.ts +0 -7
- package/vendor/server/dist/session/build-session-bootstrap.js +0 -22
- package/vendor/server/dist/session/clear-feed-while-running.test.d.ts +0 -2
- package/vendor/server/dist/session/clear-feed-while-running.test.js +0 -41
- package/vendor/server/dist/session/langflower-session.d.ts +0 -36
- package/vendor/server/dist/session/langflower-session.js +0 -90
- package/vendor/server/dist/session/reset-session-execution-feed.d.ts +0 -6
- package/vendor/server/dist/session/reset-session-execution-feed.js +0 -8
- package/vendor/server/dist/session/settings-draft-session.d.ts +0 -24
- package/vendor/server/dist/session/settings-draft-session.js +0 -82
- package/vendor/server/dist/skills/is-safe-skill-id.d.ts +0 -2
- package/vendor/server/dist/skills/is-safe-skill-id.js +0 -7
- package/vendor/server/dist/skills/list-skills.d.ts +0 -2
- package/vendor/server/dist/skills/list-skills.js +0 -36
- package/vendor/server/dist/skills/list-skills.test.d.ts +0 -2
- package/vendor/server/dist/skills/list-skills.test.js +0 -46
- package/vendor/server/dist/skills/parse-skill-markdown.d.ts +0 -7
- package/vendor/server/dist/skills/parse-skill-markdown.js +0 -50
- package/vendor/server/dist/skills/parse-skill-markdown.test.d.ts +0 -2
- package/vendor/server/dist/skills/parse-skill-markdown.test.js +0 -33
- package/vendor/server/dist/skills/read-agents-markdown.d.ts +0 -2
- package/vendor/server/dist/skills/read-agents-markdown.js +0 -13
- package/vendor/server/dist/skills/read-skill-markdown.d.ts +0 -2
- package/vendor/server/dist/skills/read-skill-markdown.js +0 -17
- package/vendor/server/dist/skills/read-skill-markdown.test.d.ts +0 -2
- package/vendor/server/dist/skills/read-skill-markdown.test.js +0 -31
- package/vendor/server/dist/skills/with-skills-catalog.d.ts +0 -3
- package/vendor/server/dist/skills/with-skills-catalog.js +0 -6
- package/vendor/server/dist/skills/with-skills-catalog.test.d.ts +0 -2
- package/vendor/server/dist/skills/with-skills-catalog.test.js +0 -40
- package/vendor/server/dist/utils/parse-jsonc.d.ts +0 -2
- package/vendor/server/dist/utils/parse-jsonc.js +0 -7
- package/vendor/server/dist/workflow/activate-workflow-in-session.d.ts +0 -26
- package/vendor/server/dist/workflow/activate-workflow-in-session.js +0 -69
- package/vendor/server/dist/workflow/apply-editor-mutation.d.ts +0 -67
- package/vendor/server/dist/workflow/apply-editor-mutation.js +0 -521
- package/vendor/server/dist/workflow/apply-editor-mutation.test.d.ts +0 -2
- package/vendor/server/dist/workflow/apply-editor-mutation.test.js +0 -397
- package/vendor/server/dist/workflow/bind-workflow-graph.d.ts +0 -11
- package/vendor/server/dist/workflow/bind-workflow-graph.js +0 -16
- package/vendor/server/dist/workflow/build-save-current-payload.d.ts +0 -3
- package/vendor/server/dist/workflow/build-save-current-payload.js +0 -17
- package/vendor/server/dist/workflow/build-save-current-payload.test.d.ts +0 -2
- package/vendor/server/dist/workflow/build-save-current-payload.test.js +0 -44
- package/vendor/server/dist/workflow/copy-workflow-to-session.d.ts +0 -8
- package/vendor/server/dist/workflow/copy-workflow-to-session.js +0 -32
- package/vendor/server/dist/workflow/copy-workflow-to-session.test.d.ts +0 -2
- package/vendor/server/dist/workflow/copy-workflow-to-session.test.js +0 -72
- package/vendor/server/dist/workflow/create-empty-workflow-in-session.d.ts +0 -4
- package/vendor/server/dist/workflow/create-empty-workflow-in-session.js +0 -34
- package/vendor/server/dist/workflow/create-empty-workflow-in-session.test.d.ts +0 -2
- package/vendor/server/dist/workflow/create-empty-workflow-in-session.test.js +0 -54
- package/vendor/server/dist/workflow/load-workflow-into-session.d.ts +0 -15
- package/vendor/server/dist/workflow/load-workflow-into-session.js +0 -43
- package/vendor/server/dist/workflow/rename-active-workflow.d.ts +0 -14
- package/vendor/server/dist/workflow/rename-active-workflow.js +0 -60
- package/vendor/server/dist/workflow/rename-active-workflow.test.d.ts +0 -2
- package/vendor/server/dist/workflow/rename-active-workflow.test.js +0 -111
- package/vendor/server/dist/workflow/repair-workflow-graph.d.ts +0 -12
- package/vendor/server/dist/workflow/repair-workflow-graph.js +0 -62
- package/vendor/server/dist/workflow/repro-bypass.test.d.ts +0 -2
- package/vendor/server/dist/workflow/repro-bypass.test.js +0 -63
- package/vendor/server/dist/workflow/workflow-document.d.ts +0 -21
- package/vendor/server/dist/workflow/workflow-document.js +0 -58
- package/vendor/server/dist/workflow/workflow-id.d.ts +0 -2
- package/vendor/server/dist/workflow/workflow-id.js +0 -19
- package/vendor/server/dist/workflow/workflow-id.test.d.ts +0 -2
- package/vendor/server/dist/workflow/workflow-id.test.js +0 -23
- package/vendor/server/dist/workflow/workflow-persisted-inputs.d.ts +0 -13
- package/vendor/server/dist/workflow/workflow-persisted-inputs.js +0 -69
- package/vendor/server/dist/workflow/workflow.service.d.ts +0 -37
- package/vendor/server/dist/workflow/workflow.service.js +0 -161
- package/vendor/server/dist/workflow/workflow.service.test.d.ts +0 -2
- package/vendor/server/dist/workflow/workflow.service.test.js +0 -57
- package/vendor/server/package.json +0 -35
- package/vendor/shared/dist/checkpoint/json-value.d.ts +0 -7
- package/vendor/shared/dist/checkpoint/json-value.js +0 -52
- package/vendor/shared/dist/checkpoint/json-value.test.d.ts +0 -1
- package/vendor/shared/dist/checkpoint/json-value.test.js +0 -22
- package/vendor/shared/dist/checkpoint/workflow-fingerprint.d.ts +0 -11
- package/vendor/shared/dist/checkpoint/workflow-fingerprint.js +0 -17
- package/vendor/shared/dist/checkpoint/workflow-fingerprint.test.d.ts +0 -1
- package/vendor/shared/dist/checkpoint/workflow-fingerprint.test.js +0 -54
- package/vendor/shared/dist/constants/defaults.d.ts +0 -16
- package/vendor/shared/dist/constants/defaults.js +0 -25
- package/vendor/shared/dist/execution/derive-run-settle-outcome.d.ts +0 -16
- package/vendor/shared/dist/execution/derive-run-settle-outcome.js +0 -48
- package/vendor/shared/dist/execution/derive-run-settle-outcome.test.d.ts +0 -1
- package/vendor/shared/dist/execution/derive-run-settle-outcome.test.js +0 -46
- package/vendor/shared/dist/langflower-bus-config.d.ts +0 -468
- package/vendor/shared/dist/langflower-bus-config.js +0 -619
- package/vendor/shared/dist/langflower-config/mcp-tool-id.d.ts +0 -23
- package/vendor/shared/dist/langflower-config/mcp-tool-id.js +0 -43
- package/vendor/shared/dist/langflower-config/merge-langflower-config-layers.d.ts +0 -6
- package/vendor/shared/dist/langflower-config/merge-langflower-config-layers.js +0 -18
- package/vendor/shared/dist/langflower-config/merge-langflower-config-layers.test.d.ts +0 -1
- package/vendor/shared/dist/langflower-config/merge-langflower-config-layers.test.js +0 -36
- package/vendor/shared/dist/langflower-config/merge-provider-model-options.d.ts +0 -7
- package/vendor/shared/dist/langflower-config/merge-provider-model-options.js +0 -17
- package/vendor/shared/dist/langflower-config/merge-provider-model-options.test.d.ts +0 -1
- package/vendor/shared/dist/langflower-config/merge-provider-model-options.test.js +0 -22
- package/vendor/shared/dist/langflower-config/parse-default-chat-model.d.ts +0 -14
- package/vendor/shared/dist/langflower-config/parse-default-chat-model.js +0 -38
- package/vendor/shared/dist/langflower-config/parse-default-chat-model.test.d.ts +0 -1
- package/vendor/shared/dist/langflower-config/parse-default-chat-model.test.js +0 -41
- package/vendor/shared/dist/langflower-config/resolve-server-logs-enabled.d.ts +0 -6
- package/vendor/shared/dist/langflower-config/resolve-server-logs-enabled.js +0 -5
- package/vendor/shared/dist/langflower-config/resolve-server-logs-enabled.test.d.ts +0 -1
- package/vendor/shared/dist/langflower-config/resolve-server-logs-enabled.test.js +0 -11
- package/vendor/shared/dist/langflower-config/resolve-ui-schema-options.d.ts +0 -18
- package/vendor/shared/dist/langflower-config/resolve-ui-schema-options.js +0 -61
- package/vendor/shared/dist/langflower-config/resolve-ui-schema-options.test.d.ts +0 -1
- package/vendor/shared/dist/langflower-config/resolve-ui-schema-options.test.js +0 -37
- package/vendor/shared/dist/langflower-config/resolve-wired-tool-options.d.ts +0 -40
- package/vendor/shared/dist/langflower-config/resolve-wired-tool-options.js +0 -139
- package/vendor/shared/dist/langflower-config/resolve-wired-tool-options.test.d.ts +0 -1
- package/vendor/shared/dist/langflower-config/resolve-wired-tool-options.test.js +0 -253
- package/vendor/shared/dist/langflower-config/settings-draft.d.ts +0 -44
- package/vendor/shared/dist/langflower-config/settings-draft.js +0 -143
- package/vendor/shared/dist/langflower-ws-waits.d.ts +0 -58
- package/vendor/shared/dist/langflower-ws-waits.js +0 -121
- package/vendor/shared/dist/langflower.d.ts +0 -30
- package/vendor/shared/dist/langflower.js +0 -13
- package/vendor/shared/dist/types/config.d.ts +0 -4
- package/vendor/shared/dist/types/config.js +0 -1
- package/vendor/shared/dist/types/langflower-bootstrap.d.ts +0 -65
- package/vendor/shared/dist/types/langflower-bootstrap.js +0 -1
- package/vendor/shared/dist/types/langflower-config.d.ts +0 -246
- package/vendor/shared/dist/types/langflower-config.js +0 -1
- package/vendor/shared/dist/types/langflower-custom-palette.d.ts +0 -21
- package/vendor/shared/dist/types/langflower-custom-palette.js +0 -1
- package/vendor/shared/dist/types/langflower-editor.d.ts +0 -96
- package/vendor/shared/dist/types/langflower-editor.js +0 -1
- package/vendor/shared/dist/types/langflower-palette.d.ts +0 -24
- package/vendor/shared/dist/types/langflower-palette.js +0 -1
- package/vendor/shared/dist/types/langflower-project-bootstrap.d.ts +0 -11
- package/vendor/shared/dist/types/langflower-project-bootstrap.js +0 -1
- package/vendor/shared/dist/types/langflower-server.d.ts +0 -4
- package/vendor/shared/dist/types/langflower-server.js +0 -1
- package/vendor/shared/dist/types/langflower-workflow.d.ts +0 -146
- package/vendor/shared/dist/types/langflower-workflow.js +0 -12
- package/vendor/shared/dist/types/workflow-checkpoint.d.ts +0 -60
- package/vendor/shared/dist/types/workflow-checkpoint.js +0 -9
- package/vendor/shared/package.json +0 -74
- package/vendor/tools/dist/builtin-schemas.d.ts +0 -10
- package/vendor/tools/dist/builtin-schemas.js +0 -144
- package/vendor/tools/dist/builtins/apply-post-process.d.ts +0 -1
- package/vendor/tools/dist/builtins/apply-post-process.js +0 -9
- package/vendor/tools/dist/builtins/args.d.ts +0 -3
- package/vendor/tools/dist/builtins/args.js +0 -14
- package/vendor/tools/dist/builtins/bash/tool.d.ts +0 -25
- package/vendor/tools/dist/builtins/bash/tool.js +0 -72
- package/vendor/tools/dist/builtins/catalog.d.ts +0 -228
- package/vendor/tools/dist/builtins/catalog.js +0 -24
- package/vendor/tools/dist/builtins/command-exists.d.ts +0 -5
- package/vendor/tools/dist/builtins/command-exists.js +0 -27
- package/vendor/tools/dist/builtins/create/tool.d.ts +0 -25
- package/vendor/tools/dist/builtins/create/tool.js +0 -56
- package/vendor/tools/dist/builtins/delete/tool.d.ts +0 -21
- package/vendor/tools/dist/builtins/delete/tool.js +0 -44
- package/vendor/tools/dist/builtins/edit/tool.d.ts +0 -29
- package/vendor/tools/dist/builtins/edit/tool.js +0 -68
- package/vendor/tools/dist/builtins/fence.d.ts +0 -4
- package/vendor/tools/dist/builtins/fence.js +0 -6
- package/vendor/tools/dist/builtins/glob/tool.d.ts +0 -33
- package/vendor/tools/dist/builtins/glob/tool.js +0 -77
- package/vendor/tools/dist/builtins/grep/search.d.ts +0 -43
- package/vendor/tools/dist/builtins/grep/search.js +0 -315
- package/vendor/tools/dist/builtins/grep/tool.d.ts +0 -36
- package/vendor/tools/dist/builtins/grep/tool.js +0 -66
- package/vendor/tools/dist/builtins/read/tool.d.ts +0 -41
- package/vendor/tools/dist/builtins/read/tool.js +0 -96
- package/vendor/tools/dist/builtins/spawn-capture.d.ts +0 -15
- package/vendor/tools/dist/builtins/spawn-capture.js +0 -42
- package/vendor/tools/dist/builtins/types.d.ts +0 -16
- package/vendor/tools/dist/builtins/types.js +0 -1
- package/vendor/tools/dist/builtins/walk-files.d.ts +0 -16
- package/vendor/tools/dist/builtins/walk-files.js +0 -100
- package/vendor/tools/dist/builtins/write/tool.d.ts +0 -25
- package/vendor/tools/dist/builtins/write/tool.js +0 -40
- package/vendor/tools/dist/create-crawl-context.d.ts +0 -22
- package/vendor/tools/dist/create-crawl-context.js +0 -34
- package/vendor/tools/dist/create-memory-context.d.ts +0 -12
- package/vendor/tools/dist/create-memory-context.js +0 -84
- package/vendor/tools/dist/create-project-files-context.d.ts +0 -19
- package/vendor/tools/dist/create-project-files-context.js +0 -75
- package/vendor/tools/dist/create-project-harness.d.ts +0 -33
- package/vendor/tools/dist/create-project-harness.js +0 -64
- package/vendor/tools/dist/create-web-fetch.d.ts +0 -27
- package/vendor/tools/dist/create-web-fetch.js +0 -164
- package/vendor/tools/dist/domain/args.d.ts +0 -3
- package/vendor/tools/dist/domain/args.js +0 -22
- package/vendor/tools/dist/domain/create-domain-handlers.d.ts +0 -22
- package/vendor/tools/dist/domain/create-domain-handlers.js +0 -223
- package/vendor/tools/dist/domain/domain-tool-configs.d.ts +0 -30
- package/vendor/tools/dist/domain/domain-tool-configs.js +0 -299
- package/vendor/tools/dist/domain/html.d.ts +0 -4
- package/vendor/tools/dist/domain/html.js +0 -68
- package/vendor/tools/dist/domain/run-bfs-crawl.d.ts +0 -57
- package/vendor/tools/dist/domain/run-bfs-crawl.js +0 -112
- package/vendor/tools/dist/gate-tool-call.d.ts +0 -17
- package/vendor/tools/dist/gate-tool-call.js +0 -35
- package/vendor/tools/dist/gitignore.d.ts +0 -4
- package/vendor/tools/dist/gitignore.js +0 -94
- package/vendor/tools/dist/handlers.d.ts +0 -16
- package/vendor/tools/dist/handlers.js +0 -367
- package/vendor/tools/dist/harness-types.d.ts +0 -33
- package/vendor/tools/dist/harness-types.js +0 -4
- package/vendor/tools/dist/kb/chunk-text.d.ts +0 -8
- package/vendor/tools/dist/kb/chunk-text.js +0 -52
- package/vendor/tools/dist/kb/cosine.d.ts +0 -3
- package/vendor/tools/dist/kb/cosine.js +0 -21
- package/vendor/tools/dist/kb/create-kb-context.d.ts +0 -62
- package/vendor/tools/dist/kb/create-kb-context.js +0 -78
- package/vendor/tools/dist/kb/kb-curation.d.ts +0 -69
- package/vendor/tools/dist/kb/kb-curation.js +0 -364
- package/vendor/tools/dist/kb/kb-paths.d.ts +0 -8
- package/vendor/tools/dist/kb/kb-paths.js +0 -19
- package/vendor/tools/dist/kb/kb-store.d.ts +0 -41
- package/vendor/tools/dist/kb/kb-store.js +0 -246
- package/vendor/tools/dist/kb/local-embed.d.ts +0 -8
- package/vendor/tools/dist/kb/local-embed.js +0 -41
- package/vendor/tools/dist/mcp/build-mcp-handle.d.ts +0 -30
- package/vendor/tools/dist/mcp/build-mcp-handle.js +0 -65
- package/vendor/tools/dist/mcp/create-mcp-runtime.d.ts +0 -29
- package/vendor/tools/dist/mcp/create-mcp-runtime.js +0 -161
- package/vendor/tools/dist/mcp/create-system-mcp-handles.d.ts +0 -49
- package/vendor/tools/dist/mcp/create-system-mcp-handles.js +0 -123
- package/vendor/tools/dist/mcp/env-with-shell-com-spec.d.ts +0 -5
- package/vendor/tools/dist/mcp/env-with-shell-com-spec.js +0 -18
- package/vendor/tools/dist/mcp/format-mcp-connect-error.d.ts +0 -9
- package/vendor/tools/dist/mcp/format-mcp-connect-error.js +0 -13
- package/vendor/tools/dist/mcp/mcp-client-types.d.ts +0 -17
- package/vendor/tools/dist/mcp/mcp-client-types.js +0 -1
- package/vendor/tools/dist/mcp/mcp-http-client.d.ts +0 -31
- package/vendor/tools/dist/mcp/mcp-http-client.js +0 -243
- package/vendor/tools/dist/mcp/mcp-stdio-client.d.ts +0 -19
- package/vendor/tools/dist/mcp/mcp-stdio-client.js +0 -186
- package/vendor/tools/dist/mcp/mcp-stdio-frame-parser.d.ts +0 -7
- package/vendor/tools/dist/mcp/mcp-stdio-frame-parser.js +0 -77
- package/vendor/tools/dist/mcp/mcp-tool-id.d.ts +0 -25
- package/vendor/tools/dist/mcp/mcp-tool-id.js +0 -45
- package/vendor/tools/dist/mcp/require-mcp-server-name.d.ts +0 -5
- package/vendor/tools/dist/mcp/require-mcp-server-name.js +0 -22
- package/vendor/tools/dist/mcp/resolve-shell-option.d.ts +0 -6
- package/vendor/tools/dist/mcp/resolve-shell-option.js +0 -19
- package/vendor/tools/dist/mcp/wrap-harness-with-mcp.d.ts +0 -5
- package/vendor/tools/dist/mcp/wrap-harness-with-mcp.js +0 -27
- package/vendor/tools/dist/memory/atomic-write.d.ts +0 -4
- package/vendor/tools/dist/memory/atomic-write.js +0 -18
- package/vendor/tools/dist/memory/create-memory-store.d.ts +0 -21
- package/vendor/tools/dist/memory/create-memory-store.js +0 -203
- package/vendor/tools/dist/memory/markdown-sections.d.ts +0 -22
- package/vendor/tools/dist/memory/markdown-sections.js +0 -69
- package/vendor/tools/dist/memory/memory-paths.d.ts +0 -9
- package/vendor/tools/dist/memory/memory-paths.js +0 -28
- package/vendor/tools/dist/path-sandbox.d.ts +0 -21
- package/vendor/tools/dist/path-sandbox.js +0 -96
- package/vendor/tools/dist/permission.d.ts +0 -75
- package/vendor/tools/dist/permission.js +0 -264
- package/vendor/tools/dist/post-process.d.ts +0 -9
- package/vendor/tools/dist/post-process.js +0 -36
- package/vendor/tools/dist/ssrf-guard.d.ts +0 -22
- package/vendor/tools/dist/ssrf-guard.js +0 -119
- package/vendor/tools/package.json +0 -73
- package/vendor/websocket-bridge/dist/bridge-codec.d.ts +0 -3
- package/vendor/websocket-bridge/dist/bridge-codec.js +0 -26
- package/vendor/websocket-bridge/dist/bridge-frame.d.ts +0 -11
- package/vendor/websocket-bridge/dist/bridge-frame.js +0 -24
- package/vendor/websocket-bridge/dist/bridge-guards.d.ts +0 -4
- package/vendor/websocket-bridge/dist/bridge-guards.js +0 -17
- package/vendor/websocket-bridge/dist/bridge-subjects.d.ts +0 -10
- package/vendor/websocket-bridge/dist/bridge-subjects.js +0 -38
- package/vendor/websocket-bridge/dist/bridge-types.d.ts +0 -102
- package/vendor/websocket-bridge/dist/bridge-types.js +0 -2
- package/vendor/websocket-bridge/dist/create-client.d.ts +0 -5
- package/vendor/websocket-bridge/dist/create-client.js +0 -152
- package/vendor/websocket-bridge/dist/create-server.d.ts +0 -8
- package/vendor/websocket-bridge/dist/create-server.js +0 -134
- package/vendor/websocket-bridge/dist/testing/expect-type.d.ts +0 -3
- package/vendor/websocket-bridge/dist/testing/expect-type.js +0 -3
- package/vendor/websocket-bridge/dist/testing/sample-diagram-ws-config.d.ts +0 -27
- package/vendor/websocket-bridge/dist/testing/sample-diagram-ws-config.js +0 -12
- package/vendor/websocket-bridge/dist/testing/sample-ping-ws-config.d.ts +0 -17
- package/vendor/websocket-bridge/dist/testing/sample-ping-ws-config.js +0 -10
- package/vendor/websocket-bridge/dist/testing/transport-test-helpers.d.ts +0 -6
- package/vendor/websocket-bridge/dist/testing/transport-test-helpers.js +0 -34
- package/vendor/websocket-bridge/package.json +0 -34
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import { DatabaseSync } from 'node:sqlite';
|
|
3
|
+
import type { TextEmbedder } from './text-embedder.ts';
|
|
4
|
+
import { l2Normalize, loadVecIndex, topCosine } from './vectors.ts';
|
|
5
|
+
|
|
6
|
+
export type SearchHit = {
|
|
7
|
+
readonly path: string;
|
|
8
|
+
readonly heading: string;
|
|
9
|
+
readonly score: number;
|
|
10
|
+
readonly text: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type RunSearchOptions = {
|
|
14
|
+
readonly sqlitePath: string;
|
|
15
|
+
readonly query: string;
|
|
16
|
+
readonly topK: number;
|
|
17
|
+
readonly embedder: TextEmbedder;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
type ChunkRow = {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly path: string;
|
|
23
|
+
readonly heading: string;
|
|
24
|
+
readonly text: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type RankedId = {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const RRF_K = 60;
|
|
32
|
+
|
|
33
|
+
const FTS_TOKEN = /[\p{L}\p{N}_]+/gu;
|
|
34
|
+
|
|
35
|
+
const asChunkRow = (row: unknown): ChunkRow => {
|
|
36
|
+
if (
|
|
37
|
+
row === null ||
|
|
38
|
+
typeof row !== 'object' ||
|
|
39
|
+
!('id' in row) ||
|
|
40
|
+
!('path' in row) ||
|
|
41
|
+
!('heading' in row) ||
|
|
42
|
+
!('text' in row)
|
|
43
|
+
) {
|
|
44
|
+
throw new Error('Unexpected chunk row');
|
|
45
|
+
}
|
|
46
|
+
const id = (row as { id: unknown }).id;
|
|
47
|
+
const path = (row as { path: unknown }).path;
|
|
48
|
+
const heading = (row as { heading: unknown }).heading;
|
|
49
|
+
const text = (row as { text: unknown }).text;
|
|
50
|
+
if (
|
|
51
|
+
typeof id !== 'string' ||
|
|
52
|
+
typeof path !== 'string' ||
|
|
53
|
+
typeof heading !== 'string' ||
|
|
54
|
+
typeof text !== 'string'
|
|
55
|
+
) {
|
|
56
|
+
throw new Error('chunk row has invalid types');
|
|
57
|
+
}
|
|
58
|
+
return { id, path, heading, text };
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
type VecRow = {
|
|
62
|
+
readonly id: string;
|
|
63
|
+
readonly dim: number;
|
|
64
|
+
readonly vector: Uint8Array;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const asVecRow = (row: unknown): VecRow => {
|
|
68
|
+
if (
|
|
69
|
+
row === null ||
|
|
70
|
+
typeof row !== 'object' ||
|
|
71
|
+
!('id' in row) ||
|
|
72
|
+
!('dim' in row) ||
|
|
73
|
+
!('vector' in row)
|
|
74
|
+
) {
|
|
75
|
+
throw new Error('Unexpected chunk_vec row');
|
|
76
|
+
}
|
|
77
|
+
const id = (row as { id: unknown }).id;
|
|
78
|
+
const dimRaw = (row as { dim: unknown }).dim;
|
|
79
|
+
const vector = (row as { vector: unknown }).vector;
|
|
80
|
+
const dim = typeof dimRaw === 'bigint' ? Number(dimRaw) : dimRaw;
|
|
81
|
+
if (
|
|
82
|
+
typeof id !== 'string' ||
|
|
83
|
+
typeof dim !== 'number' ||
|
|
84
|
+
!(vector instanceof Uint8Array)
|
|
85
|
+
) {
|
|
86
|
+
throw new Error('chunk_vec row has invalid types');
|
|
87
|
+
}
|
|
88
|
+
return { id, dim, vector };
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const retrieveCandidateLimit = (topK: number): number => Math.max(topK * 4, 32);
|
|
92
|
+
|
|
93
|
+
/** Quoted FTS5 tokens so chat text cannot inject MATCH operators. */
|
|
94
|
+
export const ftsMatchQuery = (raw: string): string | undefined => {
|
|
95
|
+
const tokens = raw.match(FTS_TOKEN);
|
|
96
|
+
if (tokens === null || tokens.length === 0) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
return tokens.map((token) => `"${token.replaceAll('"', '')}"`).join(' ');
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const reciprocalRankFusion = (
|
|
103
|
+
lists: readonly (readonly RankedId[])[],
|
|
104
|
+
k: number,
|
|
105
|
+
): readonly { readonly id: string; readonly score: number }[] => {
|
|
106
|
+
const scores = new Map<string, number>();
|
|
107
|
+
for (const list of lists) {
|
|
108
|
+
list.forEach((item, index) => {
|
|
109
|
+
const rank = index + 1;
|
|
110
|
+
scores.set(item.id, (scores.get(item.id) ?? 0) + 1 / (k + rank));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return [...scores.entries()]
|
|
114
|
+
.map(([id, score]) => ({ id, score }))
|
|
115
|
+
.sort((left, right) => right.score - left.score);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const formatHitsText = (
|
|
119
|
+
query: string,
|
|
120
|
+
hits: readonly SearchHit[],
|
|
121
|
+
): string => {
|
|
122
|
+
if (hits.length === 0) {
|
|
123
|
+
return `Question:\n${query}\n\nNo hits.`;
|
|
124
|
+
}
|
|
125
|
+
const blocks = hits.map((hit, index) => {
|
|
126
|
+
const heading = hit.heading.length > 0 ? hit.heading : '(intro)';
|
|
127
|
+
const score = hit.score.toFixed(2);
|
|
128
|
+
return `${String(index + 1)}. ${hit.path} — ${heading} (${score})\n${hit.text}`;
|
|
129
|
+
});
|
|
130
|
+
return `Question:\n${query}\n\nContext:\n${blocks.join('\n\n')}`;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const hasFtsTable = (db: DatabaseSync): boolean => {
|
|
134
|
+
const row = db
|
|
135
|
+
.prepare(
|
|
136
|
+
`SELECT 1 AS ok FROM sqlite_master WHERE type = 'table' AND name = 'chunk_fts'`,
|
|
137
|
+
)
|
|
138
|
+
.get() as { ok?: unknown } | undefined;
|
|
139
|
+
return row !== undefined;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const ftsRankedIds = (
|
|
143
|
+
db: DatabaseSync,
|
|
144
|
+
query: string,
|
|
145
|
+
limit: number,
|
|
146
|
+
): readonly RankedId[] => {
|
|
147
|
+
if (!hasFtsTable(db)) {
|
|
148
|
+
return [];
|
|
149
|
+
}
|
|
150
|
+
const match = ftsMatchQuery(query);
|
|
151
|
+
if (match === undefined) {
|
|
152
|
+
return [];
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
const rows = db
|
|
156
|
+
.prepare('SELECT id FROM chunk_fts WHERE chunk_fts MATCH ? LIMIT ?')
|
|
157
|
+
.all(match, limit);
|
|
158
|
+
return rows.flatMap((row) => {
|
|
159
|
+
if (
|
|
160
|
+
row === null ||
|
|
161
|
+
typeof row !== 'object' ||
|
|
162
|
+
!('id' in row) ||
|
|
163
|
+
typeof (row as { id: unknown }).id !== 'string'
|
|
164
|
+
) {
|
|
165
|
+
return [];
|
|
166
|
+
}
|
|
167
|
+
return [{ id: (row as { id: string }).id }];
|
|
168
|
+
});
|
|
169
|
+
} catch {
|
|
170
|
+
return [];
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export const runSearch = async (
|
|
175
|
+
options: RunSearchOptions,
|
|
176
|
+
): Promise<{
|
|
177
|
+
readonly hits: readonly SearchHit[];
|
|
178
|
+
readonly text: string;
|
|
179
|
+
}> => {
|
|
180
|
+
const query = options.query.trim();
|
|
181
|
+
if (!fs.existsSync(options.sqlitePath)) {
|
|
182
|
+
throw new Error(
|
|
183
|
+
`SQLite DB not found: ${options.sqlitePath}. Run kb-ingest first.`,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
if (query.length === 0) {
|
|
187
|
+
return { hits: [], text: formatHitsText(query, []) };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const db = new DatabaseSync(options.sqlitePath);
|
|
191
|
+
try {
|
|
192
|
+
const candidateLimit = retrieveCandidateLimit(options.topK);
|
|
193
|
+
const vecRows = db
|
|
194
|
+
.prepare('SELECT id, dim, vector FROM chunk_vec')
|
|
195
|
+
.all()
|
|
196
|
+
.map((row) => asVecRow(row));
|
|
197
|
+
const mtimeMs = fs.statSync(options.sqlitePath).mtimeMs;
|
|
198
|
+
const index = loadVecIndex(
|
|
199
|
+
options.sqlitePath,
|
|
200
|
+
vecRows.map((row) => ({
|
|
201
|
+
id: row.id,
|
|
202
|
+
dim: row.dim,
|
|
203
|
+
vector: row.vector,
|
|
204
|
+
})),
|
|
205
|
+
mtimeMs,
|
|
206
|
+
);
|
|
207
|
+
let cosineList: readonly RankedId[] = [];
|
|
208
|
+
if (index.dim > 0) {
|
|
209
|
+
const [raw] = await options.embedder.embedTexts([query]);
|
|
210
|
+
if (raw === undefined) {
|
|
211
|
+
throw new Error('Embedding returned no vector');
|
|
212
|
+
}
|
|
213
|
+
if (raw.length !== index.dim) {
|
|
214
|
+
throw new Error(
|
|
215
|
+
`Embedding dim ${String(raw.length)} does not match stored dim ${String(index.dim)}. Re-run ingest after switching models.`,
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
const queryVec = l2Normalize([...raw]);
|
|
219
|
+
cosineList = topCosine(index, queryVec, candidateLimit).map(
|
|
220
|
+
(item) => ({ id: item.id }),
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
const ftsList = ftsRankedIds(db, query, candidateLimit);
|
|
224
|
+
const fused = reciprocalRankFusion(
|
|
225
|
+
[cosineList, ftsList].filter((list) => list.length > 0),
|
|
226
|
+
RRF_K,
|
|
227
|
+
).slice(0, options.topK);
|
|
228
|
+
const byId = new Map(
|
|
229
|
+
db
|
|
230
|
+
.prepare('SELECT id, path, heading, text FROM chunk')
|
|
231
|
+
.all()
|
|
232
|
+
.map((row) => {
|
|
233
|
+
const parsed = asChunkRow(row);
|
|
234
|
+
return [parsed.id, parsed] as const;
|
|
235
|
+
}),
|
|
236
|
+
);
|
|
237
|
+
const hits: SearchHit[] = [];
|
|
238
|
+
for (const item of fused) {
|
|
239
|
+
const chunk = byId.get(item.id);
|
|
240
|
+
if (chunk === undefined) {
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
hits.push({
|
|
244
|
+
path: chunk.path,
|
|
245
|
+
heading: chunk.heading,
|
|
246
|
+
score: item.score,
|
|
247
|
+
text: chunk.text,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return { hits, text: formatHitsText(query, hits) };
|
|
251
|
+
} finally {
|
|
252
|
+
db.close();
|
|
253
|
+
}
|
|
254
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EmbedHandle, EmbedTextRole } from '@langflower/node-sdk';
|
|
2
|
+
|
|
3
|
+
export type TextEmbedder = {
|
|
4
|
+
readonly expectedDim?: number;
|
|
5
|
+
embedTexts: (texts: readonly string[]) => Promise<readonly Float32Array[]>;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const textEmbedderFromHandle = (
|
|
9
|
+
handle: EmbedHandle,
|
|
10
|
+
role: EmbedTextRole,
|
|
11
|
+
): TextEmbedder => ({
|
|
12
|
+
expectedDim: handle.dim,
|
|
13
|
+
embedTexts: (texts) => handle.embedTexts(texts, { role }),
|
|
14
|
+
});
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export const l2Normalize = (values: readonly number[]): Float32Array => {
|
|
2
|
+
const out = new Float32Array(values.length);
|
|
3
|
+
let sumSq = 0;
|
|
4
|
+
for (let i = 0; i < values.length; i += 1) {
|
|
5
|
+
const n = values[i] ?? 0;
|
|
6
|
+
out[i] = n;
|
|
7
|
+
sumSq += n * n;
|
|
8
|
+
}
|
|
9
|
+
const norm = Math.sqrt(sumSq);
|
|
10
|
+
if (norm === 0) {
|
|
11
|
+
return out;
|
|
12
|
+
}
|
|
13
|
+
const scale = 1 / norm;
|
|
14
|
+
for (let i = 0; i < out.length; i += 1) {
|
|
15
|
+
out[i] = (out[i] ?? 0) * scale;
|
|
16
|
+
}
|
|
17
|
+
return out;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const float32ToBlob = (values: Float32Array): Uint8Array => {
|
|
21
|
+
const bytes = new Uint8Array(values.byteLength);
|
|
22
|
+
bytes.set(
|
|
23
|
+
new Uint8Array(values.buffer, values.byteOffset, values.byteLength),
|
|
24
|
+
);
|
|
25
|
+
return bytes;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const blobToFloat32 = (blob: Uint8Array): Float32Array => {
|
|
29
|
+
const copy = new Uint8Array(blob.byteLength);
|
|
30
|
+
copy.set(blob);
|
|
31
|
+
return new Float32Array(copy.buffer);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type VecIndex = {
|
|
35
|
+
readonly sqlitePath: string;
|
|
36
|
+
readonly mtimeMs: number;
|
|
37
|
+
readonly dim: number;
|
|
38
|
+
readonly ids: readonly string[];
|
|
39
|
+
readonly matrix: Float32Array;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const vecCache = new Map<string, VecIndex>();
|
|
43
|
+
|
|
44
|
+
export const loadVecIndex = (
|
|
45
|
+
sqlitePath: string,
|
|
46
|
+
rows: readonly {
|
|
47
|
+
readonly id: string;
|
|
48
|
+
readonly dim: number;
|
|
49
|
+
readonly vector: Uint8Array;
|
|
50
|
+
}[],
|
|
51
|
+
mtimeMs: number,
|
|
52
|
+
): VecIndex => {
|
|
53
|
+
const cached = vecCache.get(sqlitePath);
|
|
54
|
+
if (cached !== undefined && cached.mtimeMs === mtimeMs) {
|
|
55
|
+
return cached;
|
|
56
|
+
}
|
|
57
|
+
if (rows.length === 0) {
|
|
58
|
+
const empty: VecIndex = {
|
|
59
|
+
sqlitePath,
|
|
60
|
+
mtimeMs,
|
|
61
|
+
dim: 0,
|
|
62
|
+
ids: [],
|
|
63
|
+
matrix: new Float32Array(0),
|
|
64
|
+
};
|
|
65
|
+
vecCache.set(sqlitePath, empty);
|
|
66
|
+
return empty;
|
|
67
|
+
}
|
|
68
|
+
const dim = rows[0]?.dim ?? 0;
|
|
69
|
+
const ids: string[] = [];
|
|
70
|
+
const matrix = new Float32Array(rows.length * dim);
|
|
71
|
+
rows.forEach((row, index) => {
|
|
72
|
+
if (row.dim !== dim) {
|
|
73
|
+
throw new Error(
|
|
74
|
+
`chunk_vec dim mismatch: ${String(row.dim)} vs ${String(dim)} at ${row.id}`,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
ids.push(row.id);
|
|
78
|
+
const floats = blobToFloat32(row.vector);
|
|
79
|
+
if (floats.length !== dim) {
|
|
80
|
+
throw new Error(
|
|
81
|
+
`chunk_vec blob length ${String(floats.length)} != dim ${String(dim)} at ${row.id}`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
matrix.set(floats, index * dim);
|
|
85
|
+
});
|
|
86
|
+
const index: VecIndex = {
|
|
87
|
+
sqlitePath,
|
|
88
|
+
mtimeMs,
|
|
89
|
+
dim,
|
|
90
|
+
ids,
|
|
91
|
+
matrix,
|
|
92
|
+
};
|
|
93
|
+
vecCache.set(sqlitePath, index);
|
|
94
|
+
return index;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const topCosine = (
|
|
98
|
+
index: VecIndex,
|
|
99
|
+
query: Float32Array,
|
|
100
|
+
limit: number,
|
|
101
|
+
): readonly { readonly id: string; readonly score: number }[] => {
|
|
102
|
+
if (index.dim === 0 || index.ids.length === 0) {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
if (query.length !== index.dim) {
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
const scored: { id: string; score: number }[] = [];
|
|
109
|
+
for (let row = 0; row < index.ids.length; row += 1) {
|
|
110
|
+
const offset = row * index.dim;
|
|
111
|
+
let sum = 0;
|
|
112
|
+
for (let i = 0; i < index.dim; i += 1) {
|
|
113
|
+
sum += (query[i] ?? 0) * (index.matrix[offset + i] ?? 0);
|
|
114
|
+
}
|
|
115
|
+
const id = index.ids[row];
|
|
116
|
+
if (id !== undefined) {
|
|
117
|
+
scored.push({ id, score: sum });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
scored.sort((a, b) => b.score - a.score);
|
|
121
|
+
return scored.slice(0, Math.max(0, limit));
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export const clearVecCache = (): void => {
|
|
125
|
+
vecCache.clear();
|
|
126
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
|
5
|
+
import { walkMarkdown } from './walk-markdown.ts';
|
|
6
|
+
|
|
7
|
+
describe('walkMarkdown', () => {
|
|
8
|
+
let root: string;
|
|
9
|
+
|
|
10
|
+
beforeEach(async () => {
|
|
11
|
+
root = await fs.mkdtemp(path.join(os.tmpdir(), 'hello-embed-walk-'));
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
afterEach(async () => {
|
|
15
|
+
await fs.rm(root, { recursive: true, force: true });
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('walks recursive md and skips node_modules, .git, and .langflower/.cache', async () => {
|
|
19
|
+
await fs.mkdir(path.join(root, 'docs'), { recursive: true });
|
|
20
|
+
await fs.mkdir(path.join(root, 'node_modules', 'pkg'), {
|
|
21
|
+
recursive: true,
|
|
22
|
+
});
|
|
23
|
+
await fs.mkdir(path.join(root, '.git'), { recursive: true });
|
|
24
|
+
await fs.mkdir(
|
|
25
|
+
path.join(root, '.langflower', '.cache', 'hello-embed'),
|
|
26
|
+
{ recursive: true },
|
|
27
|
+
);
|
|
28
|
+
await fs.mkdir(path.join(root, '.langflower', 'skills'), {
|
|
29
|
+
recursive: true,
|
|
30
|
+
});
|
|
31
|
+
await fs.writeFile(path.join(root, 'README.md'), '# Root\n', 'utf8');
|
|
32
|
+
await fs.writeFile(
|
|
33
|
+
path.join(root, 'docs', 'guide.md'),
|
|
34
|
+
'# Guide\n',
|
|
35
|
+
'utf8',
|
|
36
|
+
);
|
|
37
|
+
await fs.writeFile(
|
|
38
|
+
path.join(root, 'node_modules', 'pkg', 'secret.md'),
|
|
39
|
+
'nope',
|
|
40
|
+
'utf8',
|
|
41
|
+
);
|
|
42
|
+
await fs.writeFile(path.join(root, '.git', 'HEAD.md'), 'nope', 'utf8');
|
|
43
|
+
await fs.writeFile(
|
|
44
|
+
path.join(root, '.langflower', '.cache', 'hello-embed', 'x.md'),
|
|
45
|
+
'nope',
|
|
46
|
+
'utf8',
|
|
47
|
+
);
|
|
48
|
+
await fs.writeFile(
|
|
49
|
+
path.join(root, '.langflower', 'skills', 'SKILL.md'),
|
|
50
|
+
'# Skill\n',
|
|
51
|
+
'utf8',
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const files = await walkMarkdown(root);
|
|
55
|
+
const rels = files.map((file) => file.relPath).sort();
|
|
56
|
+
expect(rels).toEqual([
|
|
57
|
+
'.langflower/skills/SKILL.md',
|
|
58
|
+
'README.md',
|
|
59
|
+
'docs/guide.md',
|
|
60
|
+
]);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import {
|
|
4
|
+
asPosixRelative,
|
|
5
|
+
isCacheRelative,
|
|
6
|
+
MAX_FILE_BYTES,
|
|
7
|
+
SKIP_DIR_NAMES,
|
|
8
|
+
} from './paths.ts';
|
|
9
|
+
|
|
10
|
+
export type MarkdownFile = {
|
|
11
|
+
readonly absPath: string;
|
|
12
|
+
readonly relPath: string;
|
|
13
|
+
readonly text: string;
|
|
14
|
+
readonly skipped?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const isMarkdownName = (name: string): boolean =>
|
|
18
|
+
name.toLowerCase().endsWith('.md');
|
|
19
|
+
|
|
20
|
+
export const walkMarkdown = async (
|
|
21
|
+
rootDir: string,
|
|
22
|
+
): Promise<readonly MarkdownFile[]> => {
|
|
23
|
+
const files: MarkdownFile[] = [];
|
|
24
|
+
|
|
25
|
+
const visit = async (absDir: string, relPosix: string): Promise<void> => {
|
|
26
|
+
const entries = await fs.readdir(absDir, { withFileTypes: true });
|
|
27
|
+
for (const entry of entries) {
|
|
28
|
+
const childRel =
|
|
29
|
+
relPosix.length === 0
|
|
30
|
+
? entry.name
|
|
31
|
+
: `${relPosix}/${entry.name}`;
|
|
32
|
+
const childAbs = path.join(absDir, entry.name);
|
|
33
|
+
if (entry.isDirectory()) {
|
|
34
|
+
if (SKIP_DIR_NAMES.has(entry.name)) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (isCacheRelative(asPosixRelative(childRel))) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
await visit(childAbs, asPosixRelative(childRel));
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (!entry.isFile() || !isMarkdownName(entry.name)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (isCacheRelative(asPosixRelative(childRel))) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const stat = await fs.stat(childAbs);
|
|
50
|
+
const relPath = asPosixRelative(childRel);
|
|
51
|
+
if (stat.size > MAX_FILE_BYTES) {
|
|
52
|
+
files.push({
|
|
53
|
+
absPath: childAbs,
|
|
54
|
+
relPath,
|
|
55
|
+
text: '',
|
|
56
|
+
skipped: `skipped ${relPath} (${String(stat.size)} bytes > ${String(MAX_FILE_BYTES)})`,
|
|
57
|
+
});
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const text = await fs.readFile(childAbs, 'utf8');
|
|
61
|
+
files.push({ absPath: childAbs, relPath, text });
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
await visit(rootDir, '');
|
|
66
|
+
return files;
|
|
67
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineReactiveNode,
|
|
3
|
+
EMBED_HANDLE_WIRE_TYPE,
|
|
4
|
+
isEmbedHandle,
|
|
5
|
+
TOOL_HANDLE_WIRE_TYPE,
|
|
6
|
+
type ToolHandle,
|
|
7
|
+
} from '@langflower/node-sdk';
|
|
8
|
+
import {
|
|
9
|
+
clampTopK,
|
|
10
|
+
DEFAULT_SEARCH_TOP_K,
|
|
11
|
+
DEFAULT_SQLITE_PATH,
|
|
12
|
+
resolveSqlitePath,
|
|
13
|
+
} from './lib/paths.ts';
|
|
14
|
+
import { runSearch } from './lib/search.ts';
|
|
15
|
+
import { textEmbedderFromHandle } from './lib/text-embedder.ts';
|
|
16
|
+
|
|
17
|
+
const asString = (value: unknown, fallback: string): string => {
|
|
18
|
+
if (typeof value === 'string') {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
return fallback;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const buildSearchTool = (
|
|
25
|
+
embedInput: unknown,
|
|
26
|
+
sqlitePath: string,
|
|
27
|
+
): readonly ToolHandle[] => {
|
|
28
|
+
if (!isEmbedHandle(embedInput)) {
|
|
29
|
+
throw new Error(
|
|
30
|
+
'hello-embed-search-handle requires a wired embed input from common-embed-provider.',
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
const embedder = textEmbedderFromHandle(embedInput, 'query');
|
|
34
|
+
return [
|
|
35
|
+
{
|
|
36
|
+
toolId: 'project_search',
|
|
37
|
+
name: 'project_search',
|
|
38
|
+
description:
|
|
39
|
+
'Hybrid search (vector + keyword) over the project markdown index from hello-embed-ingest. Returns Question + Context with full chunk bodies (path, heading, RRF score). Empty only if the index has no chunks or the query is empty.',
|
|
40
|
+
inputSchema: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
properties: {
|
|
43
|
+
query: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'Search phrase.',
|
|
46
|
+
},
|
|
47
|
+
topK: {
|
|
48
|
+
type: 'integer',
|
|
49
|
+
description: 'Max hits (default 8).',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ['query'],
|
|
53
|
+
additionalProperties: false,
|
|
54
|
+
},
|
|
55
|
+
invoke: async (args) => {
|
|
56
|
+
const query = typeof args.query === 'string' ? args.query : '';
|
|
57
|
+
const result = await runSearch({
|
|
58
|
+
sqlitePath,
|
|
59
|
+
query,
|
|
60
|
+
topK: clampTopK(args.topK, DEFAULT_SEARCH_TOP_K),
|
|
61
|
+
embedder,
|
|
62
|
+
});
|
|
63
|
+
return result.text;
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* LLM inventory: project_search over the hello-embed sqlite index.
|
|
71
|
+
*/
|
|
72
|
+
export default defineReactiveNode({
|
|
73
|
+
type: 'hello-embed-search-handle',
|
|
74
|
+
displayName: 'Hello Embed Search Handle',
|
|
75
|
+
category: 'Hello Embed',
|
|
76
|
+
description:
|
|
77
|
+
'Emits project_search (hybrid retrieve, full chunks) for an agent tools port. Wire embed from common-embed-provider. Uses the same sqlitePath default as ingest/search.',
|
|
78
|
+
uiSchema: [
|
|
79
|
+
{
|
|
80
|
+
field: 'sqlitePath',
|
|
81
|
+
type: 'string',
|
|
82
|
+
label: 'SQLite path',
|
|
83
|
+
default: DEFAULT_SQLITE_PATH,
|
|
84
|
+
},
|
|
85
|
+
] as const,
|
|
86
|
+
bind(ctx, { makeInput, configureOutput, combineInputs }) {
|
|
87
|
+
const embed = makeInput<unknown>('embed', {
|
|
88
|
+
name: 'embed',
|
|
89
|
+
wireType: EMBED_HANDLE_WIRE_TYPE,
|
|
90
|
+
required: true,
|
|
91
|
+
description: 'Wire from common-embed-provider (fan-out OK).',
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const tools$ = combineInputs([embed, ctx], ([embedInput, ec]) => {
|
|
95
|
+
const projectDir = String(ec.projectDir ?? '');
|
|
96
|
+
if (projectDir.length === 0) {
|
|
97
|
+
throw new Error(
|
|
98
|
+
'hello-embed-search-handle requires ctx.projectDir.',
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
return buildSearchTool(
|
|
102
|
+
embedInput,
|
|
103
|
+
resolveSqlitePath(
|
|
104
|
+
projectDir,
|
|
105
|
+
asString(ec.params.sqlitePath, DEFAULT_SQLITE_PATH),
|
|
106
|
+
),
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
inputs: [embed],
|
|
112
|
+
outputs: [
|
|
113
|
+
configureOutput('tools', tools$, {
|
|
114
|
+
wireType: TOOL_HANDLE_WIRE_TYPE,
|
|
115
|
+
}),
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
});
|