veryfront 0.1.599 → 0.1.601

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.
Files changed (68) hide show
  1. package/esm/cli/commands/init/catalog.d.ts.map +1 -1
  2. package/esm/cli/commands/init/catalog.js +0 -1
  3. package/esm/cli/commands/init/init-command.d.ts.map +1 -1
  4. package/esm/cli/commands/init/init-command.js +0 -1
  5. package/esm/cli/templates/integration-loader.d.ts.map +1 -1
  6. package/esm/cli/templates/integration-loader.js +0 -1
  7. package/esm/cli/templates/manifest.d.ts +0 -13
  8. package/esm/cli/templates/manifest.js +2 -15
  9. package/esm/deno.js +1 -1
  10. package/esm/src/agent/hosted/durable-child-fork-execution.d.ts.map +1 -1
  11. package/esm/src/agent/hosted/durable-child-fork-execution.js +3 -0
  12. package/esm/src/agent/testing/index.d.ts +2 -2
  13. package/esm/src/agent/testing/index.d.ts.map +1 -1
  14. package/esm/src/agent/testing/index.js +2 -2
  15. package/esm/src/agent/types.d.ts +11 -0
  16. package/esm/src/agent/types.d.ts.map +1 -1
  17. package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
  18. package/esm/src/discovery/import-rewriter.js +216 -30
  19. package/esm/src/discovery/transpiler.d.ts.map +1 -1
  20. package/esm/src/discovery/transpiler.js +8 -0
  21. package/esm/src/embedding/index.d.ts +1 -4
  22. package/esm/src/embedding/index.d.ts.map +1 -1
  23. package/esm/src/embedding/index.js +1 -4
  24. package/esm/src/extensions/index.d.ts +1 -5
  25. package/esm/src/extensions/index.d.ts.map +1 -1
  26. package/esm/src/extensions/index.js +1 -5
  27. package/esm/src/integrations/_data.d.ts.map +1 -1
  28. package/esm/src/integrations/_data.js +1 -3
  29. package/esm/src/integrations/schema.d.ts +4 -4
  30. package/esm/src/integrations/schema.d.ts.map +1 -1
  31. package/esm/src/integrations/schema.js +0 -1
  32. package/esm/src/internal-agents/run-stream.d.ts +8 -0
  33. package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
  34. package/esm/src/internal-agents/run-stream.js +86 -3
  35. package/esm/src/jobs/index.d.ts +1 -9
  36. package/esm/src/jobs/index.d.ts.map +1 -1
  37. package/esm/src/jobs/index.js +1 -9
  38. package/esm/src/observability/index.d.ts +1 -2
  39. package/esm/src/observability/index.d.ts.map +1 -1
  40. package/esm/src/observability/index.js +1 -2
  41. package/esm/src/provider/index.d.ts +1 -4
  42. package/esm/src/provider/index.d.ts.map +1 -1
  43. package/esm/src/provider/index.js +1 -4
  44. package/esm/src/sandbox/index.d.ts +1 -4
  45. package/esm/src/sandbox/index.d.ts.map +1 -1
  46. package/esm/src/sandbox/index.js +1 -4
  47. package/esm/src/sandbox/lazy-sandbox.d.ts +14 -0
  48. package/esm/src/sandbox/lazy-sandbox.d.ts.map +1 -1
  49. package/esm/src/sandbox/lazy-sandbox.js +46 -4
  50. package/esm/src/schemas/index.d.ts +1 -7
  51. package/esm/src/schemas/index.d.ts.map +1 -1
  52. package/esm/src/schemas/index.js +1 -7
  53. package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
  54. package/esm/src/server/handlers/request/agent-stream.handler.js +12 -5
  55. package/esm/src/server/index.d.ts +1 -4
  56. package/esm/src/server/index.d.ts.map +1 -1
  57. package/esm/src/server/index.js +1 -4
  58. package/esm/src/testing/index.d.ts +1 -2
  59. package/esm/src/testing/index.d.ts.map +1 -1
  60. package/esm/src/testing/index.js +1 -2
  61. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/transform.d.ts.map +1 -1
  62. package/esm/src/transforms/pipeline/stages/ssr-vf-modules/transform.js +158 -18
  63. package/esm/src/utils/index.d.ts +1 -2
  64. package/esm/src/utils/index.d.ts.map +1 -1
  65. package/esm/src/utils/index.js +1 -2
  66. package/esm/src/utils/version-constant.d.ts +1 -1
  67. package/esm/src/utils/version-constant.js +1 -1
  68. package/package.json +1 -1
@@ -5,6 +5,6 @@
5
5
  */
6
6
  import "../../../_dnt.polyfills.js";
7
7
  export { assertCompleted, assertContains, assertToolCalled, printTestResults, testAgent, type TestCase, type TestResult, type TestSuite, } from "./agent-tester.js";
8
- export { assertCompleted as assertDurableRunCanaryCompleted, assertNoMalformedCreateFileToolCalls, collectAssistantText, createDurableRunCanaryApiClient, createDurableRunCanaryRunner, DEFAULT_DURABLE_RUN_CANARY_TIMEOUT_MS, type DurableRunCanaryApiClient, type DurableRunCanaryApiConfig, type DurableRunCanaryCase, type DurableRunCanaryCliCaseFactoryInput, type DurableRunCanaryCreateRootRunInput, type DurableRunCanaryEnvironment, type DurableRunCanaryMessage, type DurableRunCanaryPreparedCase, type DurableRunCanaryResult, type DurableRunCanaryRunnerConfig, durableRunCanaryRunnerInternals, type DurableRunCanaryRunSummary, type DurableRunCanarySendUserMessageInput, type DurableRunCanaryStartRunInput, findAssistantMessage, getDurableRunCanaryMessageSchema, parseDurableRunCanaryRunSummary, resolveDurableRunCanaryEnvironment, runDurableRunCanaryCli, type RunDurableRunCanaryCliInput, stringifyUnknown, } from "./durable-run-canaries/index.js";
9
- export { buildFailureSuffix, buildLiveEvalCaseMetadata, type BuildLiveEvalCaseMetadataInput, buildLiveEvalCaseTagSummary, buildLiveEvalRequestBody, type BuildLiveEvalRequestBodyInput, buildLiveEvalRuntimeSummary, buildLiveEvalStatusSummary, buildProgressLine, buildRuntimePerformanceSummary, cancelLiveEvalInputRequest, containsOrderedSubsequence, containsSkillLoad, countStepStartedEvents, createFailedEvalResult, createLiveEvalApiClient, createLiveEvalCaseSupport, createLiveEvalConversation, createLiveEvalProjectUploadFixture, createLiveEvalRelease, createPassedEvalResult, createPlainTextPdf, createSkippedEvalResult, DEFAULT_LIVE_EVAL_AREA_TAG_RULES, DEFAULT_LIVE_EVAL_ENDPOINT, DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES, deleteLiveEvalConversation, deleteLiveEvalProjectFile, evaluateRuntimeConfidenceEnv, getLiveEvalProjectFile, hasEveryLiveEvalTag, hasFinished, listOpenLiveEvalInputRequests, type LiveEvalApiClient, type LiveEvalApiContext, type LiveEvalCase, type LiveEvalCaseMetadata, type LiveEvalCaseMetadataOptions, type LiveEvalCaseSelectionInput, type LiveEvalCaseSurface, type LiveEvalCaseTagRule, type LiveEvalCliCaseFactoryInput, type LiveEvalCliCaseGroups, type LiveEvalContext, type LiveEvalConversationInput, type LiveEvalCreateConversationInput, type LiveEvalCreateReleaseInput, type LiveEvalEnvironment, type LiveEvalInputRequestInput, type LiveEvalInputRequestRecord, type LiveEvalInputResponseValues, type LiveEvalProjectFile, type LiveEvalProjectFileInput, type LiveEvalProjectFileReaderInput, type LiveEvalProjectUploadFixtureInput, type LiveEvalRequestBody, type LiveEvalRequestTimeoutInput, type LiveEvalResultForPerformance, type LiveEvalResultForReport, type LiveEvalResultRecord, type LiveEvalRunnerConfig, liveEvalRunnerInternals, type LiveEvalRuntime, type LiveEvalSubmitInputResponseInput, type LiveEvalWaitForOpenInputRequestInput, type PreparedLiveEvalInput, printRuntimeConfidencePreflight, resolveLiveEvalEnvironment, resolveLiveEvalRequestedCaseIds, runLiveEvalCli, type RunLiveEvalCliInput, type RuntimeConfidencePreflightResult, type RuntimePerformanceSummary, selectLiveEvalCases, submitLiveEvalInputResponse, waitForOpenLiveEvalInputRequest, withLiveEvalMetadata, } from "./live-evals/index.js";
8
+ export { assertCompleted as assertDurableRunCanaryCompleted, assertNoMalformedCreateFileToolCalls, collectAssistantText, createDurableRunCanaryApiClient, createDurableRunCanaryRunner, DEFAULT_DURABLE_RUN_CANARY_TIMEOUT_MS, type DurableRunCanaryApiClient, type DurableRunCanaryApiConfig, type DurableRunCanaryCase, type DurableRunCanaryCliCaseFactoryInput, type DurableRunCanaryCreateRootRunInput, type DurableRunCanaryEnvironment, type DurableRunCanaryMessage, type DurableRunCanaryPreparedCase, type DurableRunCanaryResult, type DurableRunCanaryRunnerConfig, type DurableRunCanaryRunSummary, type DurableRunCanarySendUserMessageInput, type DurableRunCanaryStartRunInput, findAssistantMessage, getDurableRunCanaryMessageSchema, parseDurableRunCanaryRunSummary, resolveDurableRunCanaryEnvironment, runDurableRunCanaryCli, type RunDurableRunCanaryCliInput, stringifyUnknown, } from "./durable-run-canaries/index.js";
9
+ export { buildFailureSuffix, buildLiveEvalCaseMetadata, type BuildLiveEvalCaseMetadataInput, buildLiveEvalCaseTagSummary, buildLiveEvalRequestBody, type BuildLiveEvalRequestBodyInput, buildLiveEvalRuntimeSummary, buildLiveEvalStatusSummary, buildProgressLine, buildRuntimePerformanceSummary, cancelLiveEvalInputRequest, containsOrderedSubsequence, containsSkillLoad, countStepStartedEvents, createFailedEvalResult, createLiveEvalApiClient, createLiveEvalCaseSupport, createLiveEvalConversation, createLiveEvalProjectUploadFixture, createLiveEvalRelease, createPassedEvalResult, createPlainTextPdf, createSkippedEvalResult, DEFAULT_LIVE_EVAL_AREA_TAG_RULES, DEFAULT_LIVE_EVAL_ENDPOINT, DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES, deleteLiveEvalConversation, deleteLiveEvalProjectFile, evaluateRuntimeConfidenceEnv, getLiveEvalProjectFile, hasEveryLiveEvalTag, hasFinished, listOpenLiveEvalInputRequests, type LiveEvalApiClient, type LiveEvalApiContext, type LiveEvalCase, type LiveEvalCaseMetadata, type LiveEvalCaseMetadataOptions, type LiveEvalCaseSelectionInput, type LiveEvalCaseSurface, type LiveEvalCaseTagRule, type LiveEvalCliCaseFactoryInput, type LiveEvalCliCaseGroups, type LiveEvalContext, type LiveEvalConversationInput, type LiveEvalCreateConversationInput, type LiveEvalCreateReleaseInput, type LiveEvalEnvironment, type LiveEvalInputRequestInput, type LiveEvalInputRequestRecord, type LiveEvalInputResponseValues, type LiveEvalProjectFile, type LiveEvalProjectFileInput, type LiveEvalProjectFileReaderInput, type LiveEvalProjectUploadFixtureInput, type LiveEvalRequestBody, type LiveEvalRequestTimeoutInput, type LiveEvalResultForPerformance, type LiveEvalResultForReport, type LiveEvalResultRecord, type LiveEvalRunnerConfig, type LiveEvalRuntime, type LiveEvalSubmitInputResponseInput, type LiveEvalWaitForOpenInputRequestInput, type PreparedLiveEvalInput, printRuntimeConfidencePreflight, resolveLiveEvalEnvironment, resolveLiveEvalRequestedCaseIds, runLiveEvalCli, type RunLiveEvalCliInput, type RuntimeConfidencePreflightResult, type RuntimePerformanceSummary, selectLiveEvalCases, submitLiveEvalInputResponse, waitForOpenLiveEvalInputRequest, withLiveEvalMetadata, } from "./live-evals/index.js";
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/testing/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,4BAA4B,CAAC;AAGpC,OAAO,EACL,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,IAAI,+BAA+B,EAClD,oCAAoC,EACpC,oBAAoB,EACpB,+BAA+B,EAC/B,4BAA4B,EAC5B,qCAAqC,EACrC,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,+BAA+B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,6BAA6B,EAClC,oBAAoB,EACpB,gCAAgC,EAChC,+BAA+B,EAC/B,kCAAkC,EAClC,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,8BAA8B,EACnC,2BAA2B,EAC3B,wBAAwB,EACxB,KAAK,6BAA6B,E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+B,EAC/B,oBAAoB,GACrB,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/testing/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,4BAA4B,CAAC;AAGpC,OAAO,EACL,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,IAAI,+BAA+B,EAClD,oCAAoC,EACpC,oBAAoB,EACpB,+BAA+B,EAC/B,4BAA4B,EAC5B,qCAAqC,EACrC,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,6BAA6B,EAClC,oBAAoB,EACpB,gCAAgC,EAChC,+BAA+B,EAC/B,kCAAkC,EAClC,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,8BAA8B,EACnC,2BAA2B,EAC3B,wBAAwB,EACxB,KAAK,6BAA6B,EAClC,2BAA2B,EAC3B,0BAA0B,EAC1B,iBAAiB,EACjB,8BAA8B,EAC9B,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,8CAA8C,EAC9C,0BAA0B,EAC1B,yBAAyB,EACzB,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,6BAA6B,EAC7B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,iCAAiC,EACtC,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,gCAAgC,EACrC,KAAK,oCAAoC,EACzC,KAAK,qBAAqB,EAC1B,+BAA+B,EAC/B,0BAA0B,EAC1B,+BAA+B,EAC/B,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,gCAAgC,EACrC,KAAK,yBAAyB,EAC9B,mBAAmB,EACnB,2BAA2B,EAC3B,+BAA+B,EAC/B,oBAAoB,GACrB,MAAM,uBAAuB,CAAC"}
@@ -5,5 +5,5 @@
5
5
  */
6
6
  import "../../../_dnt.polyfills.js";
7
7
  export { assertCompleted, assertContains, assertToolCalled, printTestResults, testAgent, } from "./agent-tester.js";
8
- export { assertCompleted as assertDurableRunCanaryCompleted, assertNoMalformedCreateFileToolCalls, collectAssistantText, createDurableRunCanaryApiClient, createDurableRunCanaryRunner, DEFAULT_DURABLE_RUN_CANARY_TIMEOUT_MS, durableRunCanaryRunnerInternals, findAssistantMessage, getDurableRunCanaryMessageSchema, parseDurableRunCanaryRunSummary, resolveDurableRunCanaryEnvironment, runDurableRunCanaryCli, stringifyUnknown, } from "./durable-run-canaries/index.js";
9
- export { buildFailureSuffix, buildLiveEvalCaseMetadata, buildLiveEvalCaseTagSummary, buildLiveEvalRequestBody, buildLiveEvalRuntimeSummary, buildLiveEvalStatusSummary, buildProgressLine, buildRuntimePerformanceSummary, cancelLiveEvalInputRequest, containsOrderedSubsequence, containsSkillLoad, countStepStartedEvents, createFailedEvalResult, createLiveEvalApiClient, createLiveEvalCaseSupport, createLiveEvalConversation, createLiveEvalProjectUploadFixture, createLiveEvalRelease, createPassedEvalResult, createPlainTextPdf, createSkippedEvalResult, DEFAULT_LIVE_EVAL_AREA_TAG_RULES, DEFAULT_LIVE_EVAL_ENDPOINT, DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES, deleteLiveEvalConversation, deleteLiveEvalProjectFile, evaluateRuntimeConfidenceEnv, getLiveEvalProjectFile, hasEveryLiveEvalTag, hasFinished, listOpenLiveEvalInputRequests, liveEvalRunnerInternals, printRuntimeConfidencePreflight, resolveLiveEvalEnvironment, resolveLiveEvalRequestedCaseIds, runLiveEvalCli, selectLiveEvalCases, submitLiveEvalInputResponse, waitForOpenLiveEvalInputRequest, withLiveEvalMetadata, } from "./live-evals/index.js";
8
+ export { assertCompleted as assertDurableRunCanaryCompleted, assertNoMalformedCreateFileToolCalls, collectAssistantText, createDurableRunCanaryApiClient, createDurableRunCanaryRunner, DEFAULT_DURABLE_RUN_CANARY_TIMEOUT_MS, findAssistantMessage, getDurableRunCanaryMessageSchema, parseDurableRunCanaryRunSummary, resolveDurableRunCanaryEnvironment, runDurableRunCanaryCli, stringifyUnknown, } from "./durable-run-canaries/index.js";
9
+ export { buildFailureSuffix, buildLiveEvalCaseMetadata, buildLiveEvalCaseTagSummary, buildLiveEvalRequestBody, buildLiveEvalRuntimeSummary, buildLiveEvalStatusSummary, buildProgressLine, buildRuntimePerformanceSummary, cancelLiveEvalInputRequest, containsOrderedSubsequence, containsSkillLoad, countStepStartedEvents, createFailedEvalResult, createLiveEvalApiClient, createLiveEvalCaseSupport, createLiveEvalConversation, createLiveEvalProjectUploadFixture, createLiveEvalRelease, createPassedEvalResult, createPlainTextPdf, createSkippedEvalResult, DEFAULT_LIVE_EVAL_AREA_TAG_RULES, DEFAULT_LIVE_EVAL_ENDPOINT, DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES, deleteLiveEvalConversation, deleteLiveEvalProjectFile, evaluateRuntimeConfidenceEnv, getLiveEvalProjectFile, hasEveryLiveEvalTag, hasFinished, listOpenLiveEvalInputRequests, printRuntimeConfidencePreflight, resolveLiveEvalEnvironment, resolveLiveEvalRequestedCaseIds, runLiveEvalCli, selectLiveEvalCases, submitLiveEvalInputResponse, waitForOpenLiveEvalInputRequest, withLiveEvalMetadata, } from "./live-evals/index.js";
@@ -57,6 +57,17 @@ export interface AgentConfig {
57
57
  model?: ModelString;
58
58
  system: string | (() => string) | (() => Promise<string>);
59
59
  tools?: true | Record<string, Tool | boolean>;
60
+ /**
61
+ * Optional sandbox selection for runtime-owned sandbox tools such as `bash`.
62
+ * `id` attaches to an existing sandbox session and detaches on run cleanup.
63
+ * When omitted, sandbox tools lazily create a request/project-scoped session.
64
+ */
65
+ sandbox?: {
66
+ id?: string;
67
+ sandboxId?: string;
68
+ sessionId?: string;
69
+ projectId?: string;
70
+ };
60
71
  remoteTools?: RemoteToolSource[];
61
72
  /**
62
73
  * Optional remote tool name allowlist. When set, only matching tools from
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/agent/types.ts"],"names":[],"mappings":"AAAA;;4BAE4B;AAE5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,oBAAoB,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AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EACvC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAyKjB"}
1
+ {"version":3,"file":"import-rewriter.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/import-rewriter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,eAAO,MAAM,kCAAkC,kLASrC,CAAC;AAEX,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;AAkHD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CA2BR;AA+ED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EACvC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CA2PjB"}
@@ -60,6 +60,51 @@ function rewriteDenoCompiledVeryfrontImports(code) {
60
60
  }
61
61
  return transformed;
62
62
  }
63
+ /**
64
+ * True for bare npm imports that need an `npm:` prefix for Deno to resolve
65
+ * them when the discovery module is loaded from a temp directory. Excludes
66
+ * relative paths, absolute URLs, Node built-ins, and the veryfront package
67
+ * (handled by the dedicated rewrites above).
68
+ */
69
+ function isUnprefixedNpmSpecifier(specifier) {
70
+ if (!specifier)
71
+ return false;
72
+ if (specifier.startsWith(".") || specifier.startsWith("/"))
73
+ return false;
74
+ if (specifier.startsWith("npm:") || specifier.startsWith("jsr:"))
75
+ return false;
76
+ if (specifier.startsWith("node:"))
77
+ return false;
78
+ if (specifier.startsWith("file:") ||
79
+ specifier.startsWith("http:") ||
80
+ specifier.startsWith("https:"))
81
+ return false;
82
+ if (specifier === "veryfront" || specifier.startsWith("veryfront/"))
83
+ return false;
84
+ return true;
85
+ }
86
+ // `import type` / `export type` lines reference types only; they get erased
87
+ // by TypeScript and must not trigger filesystem resolution.
88
+ const TYPE_ONLY_STATIC_RE = /(?:^|[\s;{}])(?:import|export)\s+type\b/;
89
+ function rewriteBareNpmImportsForDeno(code) {
90
+ return code
91
+ // `import x from "spec"`, `export { x } from "spec"`, `export * from "spec"`.
92
+ // The leading-context capture lets us skip `import type` / `export type`.
93
+ .replace(/(^|[\s;{}])((?:import|export)\b[^"']*?\bfrom\s+)["']([^"']+)["']/g, (match, lead, head, specifier) => {
94
+ if (TYPE_ONLY_STATIC_RE.test(lead + head))
95
+ return match;
96
+ return isUnprefixedNpmSpecifier(specifier) ? `${lead}${head}"npm:${specifier}"` : match;
97
+ })
98
+ .replace(/import\s*\(\s*["']([^"']+)["']\s*\)/g, (match, specifier) => {
99
+ return isUnprefixedNpmSpecifier(specifier) ? `import("npm:${specifier}")` : match;
100
+ })
101
+ // Side-effect-only imports: `import "reflect-metadata";`, `import "dotenv/config";`.
102
+ .replace(/(^|[\n;{}])(\s*)import\s+["']([^"']+)["'](\s*;?)/g, (match, lead, indent, specifier, tail) => {
103
+ return isUnprefixedNpmSpecifier(specifier)
104
+ ? `${lead}${indent}import "npm:${specifier}"${tail}`
105
+ : match;
106
+ });
107
+ }
63
108
  /**
64
109
  * Rewrite imports for Deno runtime
65
110
  * - Converts npm package imports to npm: specifier format
@@ -67,14 +112,7 @@ function rewriteDenoCompiledVeryfrontImports(code) {
67
112
  * - For compiled binaries, rewrites veryfront imports to use globals
68
113
  */
69
114
  export function rewriteForDeno(code, fileDir, options = {}) {
70
- const npmReplacements = [
71
- [/from\s+["']zod["']/g, 'from "npm:zod"'],
72
- [/import\s*\(\s*["']zod["']\s*\)/g, 'import("npm:zod")'],
73
- ];
74
115
  let transformed = code;
75
- for (const [pattern, replacement] of npmReplacements) {
76
- transformed = transformed.replace(pattern, replacement);
77
- }
78
116
  // Handle relative imports
79
117
  transformed = transformed.replace(/from\s+["'](\.\.\/[^"']+)["']/g, (_match, relativePath) => `from "file://${pathHelper.resolve(fileDir, relativePath)}"`);
80
118
  // For compiled binaries, rewrite veryfront imports to use globals
@@ -85,8 +123,89 @@ export function rewriteForDeno(code, fileDir, options = {}) {
85
123
  else {
86
124
  transformed = rewriteDenoPublicVeryfrontImports(transformed, options.resolveSpecifier ?? ((specifier) => globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).resolve(specifier)));
87
125
  }
126
+ // Prefix any remaining bare npm specifiers with `npm:` so Deno can resolve
127
+ // them from the temp directory the discovery module is loaded from. Covers
128
+ // `zod` plus arbitrary npm packages a tool/agent depends on, after the
129
+ // discovery bundler externalizes them via `packages: "external"`.
130
+ transformed = rewriteBareNpmImportsForDeno(transformed);
88
131
  return transformed;
89
132
  }
133
+ // Memoizes resolved bare-specifier → file:// URL lookups across all
134
+ // `rewriteDiscoveryImports` calls. Keyed by `${projectDir}::${specifier}`.
135
+ // Most projects re-resolve the same handful of packages (react, zod,
136
+ // pdf-parse, …) across every discovered tool/agent file — without this
137
+ // cache, each discovery pass re-reads the same package.json files.
138
+ const resolvedSpecifierCache = new Map();
139
+ // Split `react/jsx-runtime` → { name: "react", subpath: "./jsx-runtime" } and
140
+ // `@scope/pkg/sub/path` → { name: "@scope/pkg", subpath: "./sub/path" }.
141
+ function splitPackageSubpath(specifier) {
142
+ const parts = specifier.split("/");
143
+ const segments = specifier.startsWith("@") ? parts.slice(0, 2) : parts.slice(0, 1);
144
+ const name = segments.join("/");
145
+ const rest = parts.slice(segments.length).join("/");
146
+ return { name, subpath: rest ? `./${rest}` : "." };
147
+ }
148
+ // Pick the relative file path from a `package.json#exports` entry, which can
149
+ // be a string, a conditional object (`{ import, default, ... }`), or an
150
+ // array of those.
151
+ function pickExportEntry(entry) {
152
+ if (typeof entry === "string")
153
+ return entry;
154
+ if (Array.isArray(entry)) {
155
+ for (const e of entry) {
156
+ const v = pickExportEntry(e);
157
+ if (v)
158
+ return v;
159
+ }
160
+ return null;
161
+ }
162
+ if (entry && typeof entry === "object") {
163
+ const obj = entry;
164
+ const candidate = obj.import ?? obj.node ?? obj.default;
165
+ return candidate ? pickExportEntry(candidate) : null;
166
+ }
167
+ return null;
168
+ }
169
+ // Resolve a subpath (`.` or `./foo/bar`) against a `package.json#exports`
170
+ // map. Honors literal keys first, then matches `./*`-style glob patterns
171
+ // where the trailing `*` is substituted with the captured remainder.
172
+ // Returns the resolved relative path (e.g. `./debounce.js`) or null when
173
+ // no entry matches.
174
+ function resolveExportPath(exports, subpath) {
175
+ if (!exports || typeof exports !== "object")
176
+ return null;
177
+ const map = exports;
178
+ // Literal key (covers "." and exact subpaths like "./jsx-runtime").
179
+ if (subpath in map)
180
+ return pickExportEntry(map[subpath]);
181
+ // Glob keys like "./*", "./feature/*", "./lib/*.js". Pick the longest
182
+ // matching prefix so more specific patterns win over `./*`.
183
+ let bestKey = null;
184
+ let bestPrefixLen = -1;
185
+ for (const key of Object.keys(map)) {
186
+ const star = key.indexOf("*");
187
+ if (star === -1)
188
+ continue;
189
+ const prefix = key.slice(0, star);
190
+ const suffix = key.slice(star + 1);
191
+ if (!subpath.startsWith(prefix) || !subpath.endsWith(suffix))
192
+ continue;
193
+ if (subpath.length < prefix.length + suffix.length)
194
+ continue;
195
+ if (prefix.length > bestPrefixLen) {
196
+ bestKey = key;
197
+ bestPrefixLen = prefix.length;
198
+ }
199
+ }
200
+ if (!bestKey)
201
+ return null;
202
+ const star = bestKey.indexOf("*");
203
+ const captured = subpath.slice(bestKey.slice(0, star).length, subpath.length - bestKey.slice(star + 1).length);
204
+ const template = pickExportEntry(map[bestKey]);
205
+ if (!template)
206
+ return null;
207
+ return template.replaceAll("*", captured);
208
+ }
90
209
  /**
91
210
  * Rewrite imports for Node.js runtime
92
211
  * - Resolves relative imports to file:// URLs
@@ -99,20 +218,47 @@ export async function rewriteDiscoveryImports(code, projectDir, fs, fileDir) {
99
218
  const { pathToFileURL } = await import("node:url");
100
219
  // Handle relative imports
101
220
  transformed = transformed.replace(/from\s+["'](\.\.\/[^"']+)["']/g, (_match, relativePath) => `from "${pathToFileURL(pathHelper.resolve(fileDir, relativePath)).href}"`);
102
- // Resolve npm package to file URL
103
- const resolvePackageToFileUrl = async (packageName) => {
221
+ // Resolve a bare specifier (optionally with subpath) to a file:// URL,
222
+ // honoring the package's `exports` map for subpath imports such as
223
+ // `react/jsx-runtime` or `lodash-es/debounce`. Successful resolutions
224
+ // are memoized per (projectDir, specifier); failures are NOT cached
225
+ // so a subsequent `npm install` of the missing dep is picked up
226
+ // without a process restart.
227
+ const resolvePackageToFileUrl = async (specifier) => {
228
+ const cacheKey = `${projectDir}::${specifier}`;
229
+ const cached = resolvedSpecifierCache.get(cacheKey);
230
+ if (cached !== undefined)
231
+ return cached;
232
+ const { name: packageName, subpath } = splitPackageSubpath(specifier);
104
233
  let searchDir = projectDir;
105
234
  for (let i = 0; i < 10; i++) {
106
235
  const packagePath = pathHelper.join(searchDir, "node_modules", packageName);
107
236
  const packageJsonPath = pathHelper.join(packagePath, "package.json");
108
237
  try {
109
238
  const pkgJson = JSON.parse(await fs.readTextFile(packageJsonPath));
110
- const dotExport = pkgJson.exports?.["."];
111
- const entryPoint = (typeof dotExport === "string" ? dotExport : dotExport?.import ?? dotExport?.default) ??
112
- pkgJson.module ??
113
- pkgJson.main ??
114
- "index.js";
115
- return pathToFileURL(pathHelper.join(packagePath, entryPoint)).href;
239
+ const exportPath = resolveExportPath(pkgJson.exports, subpath);
240
+ const entryPoint = exportPath ??
241
+ (subpath === "."
242
+ ? (pkgJson.module ?? pkgJson.main ?? "index.js")
243
+ // No exports entry matched: fall back to joining the subpath
244
+ // onto the package dir (e.g. `dotenv/config.js`).
245
+ : subpath.replace(/^\.\//, ""));
246
+ // Defense in depth: refuse resolved paths that escape the package
247
+ // directory. A malicious package shipping `exports: { ".": "../foo" }`
248
+ // would otherwise yield a `file://` URL outside `node_modules/<pkg>`
249
+ // that the discovery loader would still `import()`. `path.resolve`
250
+ // (unlike `path.join`) normalizes `..` segments, so the prefix
251
+ // check correctly catches escape attempts.
252
+ const normalized = pathHelper.resolve(packagePath, entryPoint);
253
+ const packagePathPrefix = packagePath.endsWith(pathHelper.SEPARATOR)
254
+ ? packagePath
255
+ : packagePath + pathHelper.SEPARATOR;
256
+ if (normalized !== packagePath && !normalized.startsWith(packagePathPrefix)) {
257
+ return null;
258
+ }
259
+ const resolved = pathToFileURL(normalized).href;
260
+ resolvedSpecifierCache.set(cacheKey, resolved);
261
+ return resolved;
116
262
  }
117
263
  catch (_) {
118
264
  /* expected: package.json not found at this level, walk up */
@@ -122,26 +268,66 @@ export async function rewriteDiscoveryImports(code, projectDir, fs, fileDir) {
122
268
  searchDir = parent;
123
269
  }
124
270
  }
271
+ // Intentionally do NOT cache nulls — a missing-then-installed package
272
+ // should be resolvable on the next pass without a process restart.
125
273
  return null;
126
274
  };
127
- // Rewrite package imports
128
- const rewritePackageImports = async (input, pkg) => {
129
- const escapedPkg = pkg.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
130
- const staticImportRegex = new RegExp(`from\\s*["']${escapedPkg}["']`, "g");
275
+ const rewritePackageImports = (input, pkg, resolvedUrl) => {
276
+ const escapedPkg = escapeRegExp(pkg);
277
+ const staticImportRegex = new RegExp(`(^|[\\s;{}])((?:import|export)\\b[^"']*?\\bfrom\\s+)["']${escapedPkg}["']`, "g");
131
278
  const dynamicImportRegex = new RegExp(`import\\s*\\(\\s*["']${escapedPkg}["']\\s*\\)`, "g");
132
- if (!staticImportRegex.test(input) && !dynamicImportRegex.test(input))
133
- return input;
134
- const resolvedUrl = await resolvePackageToFileUrl(pkg);
135
- if (!resolvedUrl)
136
- return input;
279
+ const sideEffectRegex = new RegExp(`(^|[\\n;{}])(\\s*)import\\s+["']${escapedPkg}["'](\\s*;?)`, "g");
137
280
  return input
138
- .replace(staticImportRegex, `from "${resolvedUrl}"`)
139
- .replace(dynamicImportRegex, `import("${resolvedUrl}")`);
281
+ .replace(staticImportRegex, (match, lead, head) => {
282
+ if (TYPE_ONLY_STATIC_RE.test(lead + head))
283
+ return match;
284
+ return `${lead}${head}"${resolvedUrl}"`;
285
+ })
286
+ .replace(dynamicImportRegex, `import("${resolvedUrl}")`)
287
+ .replace(sideEffectRegex, (_m, lead, indent, tail) => `${lead}${indent}import "${resolvedUrl}"${tail}`);
288
+ };
289
+ // Collect every bare specifier the transformed source still imports,
290
+ // then resolve each to a file:// URL in the project's node_modules.
291
+ // With `packages: "external"` in the discovery bundler, npm packages a
292
+ // tool/agent depends on (e.g. `pdf-parse`, `mammoth`, `react/jsx-runtime`)
293
+ // survive as bare imports here and need explicit resolution before the
294
+ // temp module is loaded from outside the project's resolution root.
295
+ const collectBareSpecifiers = (input) => {
296
+ const specifiers = new Set();
297
+ // Matches `import x from "spec"`, `export { x } from "spec"`,
298
+ // `export * from "spec"`. The leading-context capture lets us skip
299
+ // `import type` / `export type` lines, which TypeScript erases at
300
+ // emit time and must not trigger filesystem resolution.
301
+ for (const match of input.matchAll(/(?:^|[\s;{}])((?:import|export)\b[^"']*?\bfrom\s+)["']([^"']+)["']/g)) {
302
+ const head = match[1] ?? "";
303
+ const s = match[2];
304
+ if (TYPE_ONLY_STATIC_RE.test(head))
305
+ continue;
306
+ if (s && isUnprefixedNpmSpecifier(s))
307
+ specifiers.add(s);
308
+ }
309
+ for (const match of input.matchAll(/import\s*\(\s*["']([^"']+)["']\s*\)/g)) {
310
+ const s = match[1];
311
+ if (s && isUnprefixedNpmSpecifier(s))
312
+ specifiers.add(s);
313
+ }
314
+ // Side-effect imports: `import "reflect-metadata";`, `import "dotenv/config";`.
315
+ for (const match of input.matchAll(/(?:^|[\n;{}])\s*import\s+["']([^"']+)["']\s*;?/g)) {
316
+ const s = match[1];
317
+ if (s && isUnprefixedNpmSpecifier(s))
318
+ specifiers.add(s);
319
+ }
320
+ return [...specifiers];
140
321
  };
141
- // Rewrite external package imports
142
- const externalPackages = ["zod"];
143
- for (const pkg of externalPackages) {
144
- transformed = await rewritePackageImports(transformed, pkg);
322
+ // Resolve every bare specifier in parallel — each lookup is independent
323
+ // node_modules I/O. Apply the resulting rewrites sequentially against
324
+ // the same source string.
325
+ const specifiers = collectBareSpecifiers(transformed);
326
+ const resolvedPairs = await Promise.all(specifiers.map(async (pkg) => [pkg, await resolvePackageToFileUrl(pkg)]));
327
+ for (const [pkg, resolvedUrl] of resolvedPairs) {
328
+ if (!resolvedUrl)
329
+ continue;
330
+ transformed = rewritePackageImports(transformed, pkg, resolvedUrl);
145
331
  }
146
332
  const resolveRuntimeSpecifierToFileUrl = (specifier) => {
147
333
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"transpiler.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/transpiler.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAmIvD;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAwFlB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
1
+ {"version":3,"file":"transpiler.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/transpiler.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAmIvD;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAgGlB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
@@ -160,6 +160,14 @@ export async function importModule(file, context) {
160
160
  jsxImportSource: "react",
161
161
  resolveExtensions: [".ts", ".tsx", ".js", ".jsx", ".mjs"],
162
162
  plugins,
163
+ // Externalize all bare-specifier imports so npm packages a tool/agent file
164
+ // depends on (e.g. `pdf-parse`, `mammoth`) are not pulled into the
165
+ // discovery bundle. Discovery only needs the module's exports; the
166
+ // implementation runs server-side at request time and can resolve npm
167
+ // packages natively via the project's node_modules / import map.
168
+ // Without this, esbuild under platform: "neutral" tries to bundle CJS
169
+ // npm packages and fails on their Node built-in references (fs, http, ...).
170
+ packages: "external",
163
171
  external: [
164
172
  "zod",
165
173
  "node:*",
@@ -1,8 +1,5 @@
1
1
  /**
2
- * Embedding — RAG primitives for chunking, embedding, and similarity search.
3
- *
4
- * Provides a facade over the framework's current embedding runtime and
5
- * LangChain text splitting behind veryfront's own API.
2
+ * RAG primitives for chunking, embedding, and similarity search.
6
3
  *
7
4
  * @module embedding
8
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/embedding/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,gBAAgB,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,YAAY,EACZ,SAAS,EACT,eAAe,EACf,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,eAAe,EACf,cAAc,EACd,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/embedding/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,gBAAgB,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,YAAY,EACZ,SAAS,EACT,eAAe,EACf,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,eAAe,EACf,cAAc,EACd,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
@@ -1,8 +1,5 @@
1
1
  /**
2
- * Embedding — RAG primitives for chunking, embedding, and similarity search.
3
- *
4
- * Provides a facade over the framework's current embedding runtime and
5
- * LangChain text splitting behind veryfront's own API.
2
+ * RAG primitives for chunking, embedding, and similarity search.
6
3
  *
7
4
  * @module embedding
8
5
  *
@@ -1,9 +1,5 @@
1
1
  /**
2
- * Public extension API surface.
3
- *
4
- * Types used when authoring extensions (the scaffold template generated by
5
- * `veryfront extension init` imports from this module), plus the runtime
6
- * helpers consumers need to load, validate, and orchestrate extensions.
2
+ * Extension authoring types and runtime helpers.
7
3
  *
8
4
  * @module extensions
9
5
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/extensions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,yBAAyB,CAAC;AAEjC,YAAY,EACV,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGrD,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,eAAe,EACf,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAG3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGrE,OAAO,EAAE,iBAAiB,EAAE,k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AAE,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGhG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,9 +1,5 @@
1
1
  /**
2
- * Public extension API surface.
3
- *
4
- * Types used when authoring extensions (the scaffold template generated by
5
- * `veryfront extension init` imports from this module), plus the runtime
6
- * helpers consumers need to load, validate, and orchestrate extensions.
2
+ * Extension authoring types and runtime helpers.
7
3
  *
8
4
  * @module extensions
9
5
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"_data.d.ts","sourceRoot":"","sources":["../../../src/src/integrations/_data.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,UAAU,EAAE,iBAAiB,EAoCzC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoCxC,CAAC"}
1
+ {"version":3,"file":"_data.d.ts","sourceRoot":"","sources":["../../../src/src/integrations/_data.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,UAAU,EAAE,iBAAiB,EAmCzC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmCxC,CAAC"}