@veryfront/ext-content-mdx 0.1.1245 → 0.1.1246-rc.13460

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/esm/deno.d.ts CHANGED
@@ -36,6 +36,7 @@ declare namespace _default {
36
36
  "./channels/invoke": string;
37
37
  "./tool": string;
38
38
  "./workflow": string;
39
+ "./workflow/registry": string;
39
40
  "./workflow/blob": string;
40
41
  "./workflow/worker": string;
41
42
  "./workflow/claude-code": string;
@@ -144,6 +145,7 @@ declare namespace _default {
144
145
  "veryfront/agent/react": string;
145
146
  "veryfront/agent/middleware": string;
146
147
  "veryfront/workflow/react": string;
148
+ "veryfront/workflow/registry": string;
147
149
  "veryfront/workflow/executor": string;
148
150
  "veryfront/workflow/blob": string;
149
151
  "veryfront/workflow/runtime": string;
@@ -402,6 +404,7 @@ declare namespace _default {
402
404
  release: string;
403
405
  test: string;
404
406
  "test:unit": string;
407
+ "test:file": string;
405
408
  "test:unit:parallel": string;
406
409
  "test:unit:cwd": string;
407
410
  "test:unit:cwd-exclusion": string;
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.1245",
3
+ "version": "0.1.1246-rc.13460",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -106,6 +106,7 @@ export default {
106
106
  "./channels/invoke": "./src/channels/invoke.ts",
107
107
  "./tool": "./src/tool/index.ts",
108
108
  "./workflow": "./src/workflow/index.ts",
109
+ "./workflow/registry": "./src/workflow/registry-public.ts",
109
110
  "./workflow/blob": "./src/workflow/blob/index.ts",
110
111
  "./workflow/worker": "./src/workflow/worker/index.ts",
111
112
  "./workflow/claude-code": "./src/workflow/claude-code/index.ts",
@@ -214,6 +215,7 @@ export default {
214
215
  "veryfront/agent/react": "./src/agent/react/index.ts",
215
216
  "veryfront/agent/middleware": "./src/agent/middleware/index.ts",
216
217
  "veryfront/workflow/react": "./src/workflow/react/index.ts",
218
+ "veryfront/workflow/registry": "./src/workflow/registry-public.ts",
217
219
  "veryfront/workflow/executor": "./src/workflow/executor/index.ts",
218
220
  "veryfront/workflow/blob": "./src/workflow/blob/index.ts",
219
221
  "veryfront/workflow/runtime": "./src/workflow/runtime/index.ts",
@@ -476,18 +478,19 @@ export default {
476
478
  "build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno task lint:dnt-meta-properties && deno run --config=scripts/test.deno.json --frozen -A scripts/build/build-npm-dnt.ts",
477
479
  "verify:dist": "deno task build && deno task build:npm",
478
480
  "release": "deno run -A scripts/release.ts",
479
- "test": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts,scripts' --unstable-worker-options --unstable-net",
481
+ "test": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --deny-net=api.openai.com,api.anthropic.com,generativelanguage.googleapis.com,api.mistral.ai,api.groq.com,api.deepseek.com,openrouter.ai '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts,scripts' --unstable-worker-options --unstable-net",
480
482
  "test:unit": "deno task generate && deno task test:unit:parallel && deno task test:unit:cwd && deno task test:unit:cwd-exclusion",
481
- "test:unit:parallel": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net $(find src cli templates -name '*.test.ts*' ! -name '*.integration.test.ts*' ! -path 'src/workflow/__tests__/*' ! -path 'cli/router.test.ts' ! -path 'cli/app/operations/project-creation.test.ts' ! -path 'cli/commands/schedule/handler.test.ts' ! -path 'cli/commands/skills/validate.test.ts' ! -path 'cli/commands/webhook/handler.test.ts' ! -path 'src/platform/compat/process.test.ts' ! -path 'src/testing/cwd.test.ts' ! -path 'src/testing/cwd-exclusion-a.test.ts' ! -path 'src/testing/cwd-exclusion-b.test.ts')",
482
- "test:unit:cwd": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --allow-all --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net cli/router.test.ts cli/app/operations/project-creation.test.ts cli/commands/schedule/handler.test.ts cli/commands/skills/validate.test.ts cli/commands/webhook/handler.test.ts src/platform/compat/process.test.ts src/testing/cwd.test.ts",
483
- "test:unit:cwd-exclusion": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net src/testing/cwd-exclusion-a.test.ts src/testing/cwd-exclusion-b.test.ts",
483
+ "test:file": "deno run --allow-run=deno --allow-env scripts/test/run-test-file.ts",
484
+ "test:unit:parallel": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --deny-net=api.openai.com,api.anthropic.com,generativelanguage.googleapis.com,api.mistral.ai,api.groq.com,api.deepseek.com,openrouter.ai --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net $(find src cli templates -name '*.test.ts*' ! -name '*.integration.test.ts*' ! -path 'src/workflow/__tests__/*' ! -path 'cli/router.test.ts' ! -path 'cli/app/operations/project-creation.test.ts' ! -path 'cli/commands/schedule/handler.test.ts' ! -path 'cli/commands/skills/validate.test.ts' ! -path 'cli/commands/webhook/handler.test.ts' ! -path 'src/platform/compat/process.test.ts' ! -path 'src/testing/cwd.test.ts' ! -path 'src/testing/cwd-exclusion-a.test.ts' ! -path 'src/testing/cwd-exclusion-b.test.ts')",
485
+ "test:unit:cwd": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --allow-all --deny-net=api.openai.com,api.anthropic.com,generativelanguage.googleapis.com,api.mistral.ai,api.groq.com,api.deepseek.com,openrouter.ai --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net cli/router.test.ts cli/app/operations/project-creation.test.ts cli/commands/schedule/handler.test.ts cli/commands/skills/validate.test.ts cli/commands/webhook/handler.test.ts src/platform/compat/process.test.ts src/testing/cwd.test.ts",
486
+ "test:unit:cwd-exclusion": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --deny-net=api.openai.com,api.anthropic.com,generativelanguage.googleapis.com,api.mistral.ai,api.groq.com,api.deepseek.com,openrouter.ai --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net src/testing/cwd-exclusion-a.test.ts src/testing/cwd-exclusion-b.test.ts",
484
487
  "test:integration": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net",
485
488
  "test:integration:cli": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all --unstable-worker-options --unstable-net $(find cli -name '*.integration.test.ts')",
486
489
  "test:local-inference": "deno run -A src/provider/_openai-compatible-smoke-test.ts",
487
490
  "test:record": "VCR=record deno test --no-check --allow-all $(find cli -name '*.integration.test.ts' -path '*/commands/*')",
488
- "test:coverage": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net || exit 1",
489
- "test:coverage:unit": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests,src/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli templates -name '*.test.ts*' ! -name '*.integration.test.ts*') || exit 1",
490
- "test:coverage:integration": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net || exit 1",
491
+ "test:coverage": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --deny-net=api.openai.com,api.anthropic.com,generativelanguage.googleapis.com,api.mistral.ai,api.groq.com,api.deepseek.com,openrouter.ai --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net || exit 1",
492
+ "test:coverage:unit": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --deny-net=api.openai.com,api.anthropic.com,generativelanguage.googleapis.com,api.mistral.ai,api.groq.com,api.deepseek.com,openrouter.ai --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests,src/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli templates -name '*.test.ts*' ! -name '*.integration.test.ts*') || exit 1",
493
+ "test:coverage:integration": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --deny-net=api.openai.com,api.anthropic.com,generativelanguage.googleapis.com,api.mistral.ai,api.groq.com,api.deepseek.com,openrouter.ai --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net || exit 1",
491
494
  "coverage:report": "deno coverage coverage --include=src/ --exclude=tests '--exclude=src/**/*_test.ts' '--exclude=src/**/*_test.tsx' '--exclude=src/**/*.test.ts' '--exclude=src/**/*.test.tsx' --lcov > coverage/lcov.info && deno run --allow-read scripts/lint/check-coverage.ts 80",
492
495
  "coverage:gate": "deno coverage coverage --include=src/ --exclude=tests '--exclude=src/**/*_test.ts' '--exclude=src/**/*_test.tsx' '--exclude=src/**/*.test.ts' '--exclude=src/**/*.test.tsx' --lcov > coverage/lcov.info && deno run --allow-read scripts/lint/check-coverage.ts 80",
493
496
  "coverage:ci:shard": "deno run --allow-read --allow-write --allow-run --allow-env scripts/test/coverage-ci.ts shard",
@@ -555,7 +558,7 @@ export default {
555
558
  "lint:anti-slop": "deno run --allow-read scripts/lint/audit-anti-slop.ts",
556
559
  "lint:render-mode-defaults": "deno run --allow-read scripts/lint/audit-render-mode-defaults.ts",
557
560
  "lint:dnt-meta-properties": "deno run --config=scripts/test.deno.json --frozen --allow-read scripts/build/dnt-meta-property-safety.ts",
558
- "test:scripts": "deno test --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run scripts/build/feature-files-detection.test.ts scripts/ci/prepare-rc-build.test.ts scripts/ci/publish-npm-packages.test.ts scripts/ci/setup-deno-workflow.test.ts scripts/build/compile-binary.test.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.test.ts scripts/build/generate-sbom.test.ts scripts/build/generated-artifact-checks.test.ts scripts/build/npm-dependency-sources.test.ts scripts/build/npm-extension-package-metadata.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/npm-react-shims.test.ts scripts/build/npm-runtime-helper-contract.test.ts scripts/build/prepare-framework-sources.test.ts scripts/build/report-artifact-sizes.test.ts scripts/build/run-generate.test.ts scripts/docs/docs-coverage.test.ts scripts/docs/generate-api-reference.test.ts scripts/docs/guide-validation.test.ts scripts/lint/audit-chat-composability.test.ts scripts/lint/audit-rfc-status.test.ts scripts/lint/audit-core-deps.test.ts scripts/lint/audit-cwd-relative-test-reads.test.ts scripts/lint/audit-cross-runtime-jsr.test.ts scripts/lint/audit-dependency-boundaries.test.ts scripts/lint/audit-extension-capabilities.test.ts scripts/lint/audit-extension-contracts.test.ts scripts/lint/audit-deps.test.ts scripts/lint/check-module-boundaries.test.ts scripts/lint/lint-config.test.ts scripts/lint/ban-test-only.test.ts scripts/lint/check-sanitizer-baseline.test.ts scripts/lint/check-skipped-tests-baseline.test.ts scripts/lint/audit-anti-slop.test.ts scripts/lint/audit-render-mode-defaults.test.ts scripts/lint/check-test-typecheck-baseline.test.ts scripts/lint/check-coverage.test.ts scripts/security/audit-npm.test.ts scripts/security/secret-scanning-config.test.ts scripts/security/submit-dependency-snapshot.test.ts scripts/test/template-runtime-e2e.test.ts && deno task test:tool-search-live",
561
+ "test:scripts": "deno test --config=scripts/test.deno.json --no-check --allow-read --allow-write --allow-run scripts/build/feature-files-detection.test.ts scripts/ci/prepare-rc-build.test.ts scripts/ci/publish-npm-packages.test.ts scripts/ci/setup-deno-workflow.test.ts scripts/test/coverage-ci.test.ts scripts/test/run-test-file.test.ts scripts/build/compile-binary.test.ts scripts/build/dnt-meta-property-safety.test.ts scripts/build/dnt-polyfill.test.ts scripts/build/generate-sbom.test.ts scripts/build/generated-artifact-checks.test.ts scripts/build/npm-dependency-sources.test.ts scripts/build/npm-extension-package-metadata.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/npm-react-shims.test.ts scripts/build/npm-runtime-helper-contract.test.ts scripts/build/prepare-framework-sources.test.ts scripts/build/report-artifact-sizes.test.ts scripts/build/run-generate.test.ts scripts/docs/docs-coverage.test.ts scripts/docs/generate-api-reference.test.ts scripts/docs/guide-validation.test.ts scripts/lint/audit-chat-composability.test.ts scripts/lint/audit-rfc-status.test.ts scripts/lint/audit-core-deps.test.ts scripts/lint/audit-cwd-relative-test-reads.test.ts scripts/lint/audit-cross-runtime-jsr.test.ts scripts/lint/audit-dependency-boundaries.test.ts scripts/lint/audit-extension-capabilities.test.ts scripts/lint/audit-extension-contracts.test.ts scripts/lint/audit-deps.test.ts scripts/lint/check-module-boundaries.test.ts scripts/lint/lint-config.test.ts scripts/lint/ban-test-only.test.ts scripts/lint/check-sanitizer-baseline.test.ts scripts/lint/check-skipped-tests-baseline.test.ts scripts/lint/audit-anti-slop.test.ts scripts/lint/audit-render-mode-defaults.test.ts scripts/lint/check-test-typecheck-baseline.test.ts scripts/lint/check-coverage.test.ts scripts/security/audit-npm.test.ts scripts/security/secret-scanning-config.test.ts scripts/security/submit-dependency-snapshot.test.ts scripts/test/template-runtime-e2e.test.ts && deno task test:tool-search-live",
559
562
  "test:sentry-runtime-packages": "deno test --config=scripts/test.deno.json --no-check --no-lock --allow-read --allow-write --allow-run --allow-env=DENO_DIR,HOME,XDG_CACHE_HOME,LOCALAPPDATA,USERPROFILE scripts/build/sentry-runtime-packages.test.ts",
560
563
  "test:tool-search-live": "VF_DISABLE_LRU_INTERVAL=1 deno test --no-check -A tests/agent/verify-tool-search-live.test.ts",
561
564
  "test:cross-runtime": "deno run --allow-all src/platform/compat/cross-runtime.test.ts",
@@ -6,6 +6,12 @@ export declare const ORCHESTRATION_ERROR: import("../types.js").RegisteredError;
6
6
  export declare const COST_LIMIT_EXCEEDED: import("../types.js").RegisteredError;
7
7
  export declare const TOOL_ID_CONFLICT: import("../types.js").RegisteredError;
8
8
  export declare const DURABLE_RUN_EVENT_PERSISTENCE_FAILED: import("../types.js").RegisteredError;
9
+ /**
10
+ * The default model's provider has no credential while a different provider
11
+ * does. Resolution stays deterministic rather than silently substituting
12
+ * whichever key happens to be present on this machine.
13
+ */
14
+ export declare const DEFAULT_MODEL_CREDENTIAL_MISMATCH: import("../types.js").RegisteredError;
9
15
  /** Registry fragment for AGENT errors (slug → definition). */
10
16
  export declare const AGENT_REGISTRY: {
11
17
  readonly "agent-error": import("../types.js").RegisteredError;
@@ -16,5 +22,6 @@ export declare const AGENT_REGISTRY: {
16
22
  readonly "cost-limit-exceeded": import("../types.js").RegisteredError;
17
23
  readonly "tool-id-conflict": import("../types.js").RegisteredError;
18
24
  readonly "durable-run-event-persistence-failed": import("../types.js").RegisteredError;
25
+ readonly "default-model-credential-mismatch": import("../types.js").RegisteredError;
19
26
  };
20
27
  //# sourceMappingURL=agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/agent.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,oCAAoC,uCAO/C,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC"}
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/src/errors/error-registry/agent.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,uCAMtB,CAAC;AAEH,eAAO,MAAM,eAAe,uCAM1B,CAAC;AAEH,eAAO,MAAM,aAAa,uCAMxB,CAAC;AAEH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,mBAAmB,uCAM9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,uCAM3B,CAAC;AAEH,eAAO,MAAM,oCAAoC,uCAO/C,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,uCAM5C,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC"}
@@ -55,6 +55,18 @@ export const DURABLE_RUN_EVENT_PERSISTENCE_FAILED = defineError({
55
55
  title: "Durable run event persistence failed",
56
56
  suggestion: "Correct invalid or oversized event data, or retry after durable event storage recovers",
57
57
  });
58
+ /**
59
+ * The default model's provider has no credential while a different provider
60
+ * does. Resolution stays deterministic rather than silently substituting
61
+ * whichever key happens to be present on this machine.
62
+ */
63
+ export const DEFAULT_MODEL_CREDENTIAL_MISMATCH = defineError({
64
+ slug: "default-model-credential-mismatch",
65
+ category: "AGENT",
66
+ status: 400,
67
+ title: "Default model has no matching provider credential",
68
+ suggestion: 'Set the agent\'s model to a provider you have a key for, or use model: "auto"',
69
+ });
58
70
  /** Registry fragment for AGENT errors (slug → definition). */
59
71
  export const AGENT_REGISTRY = {
60
72
  "agent-error": AGENT_ERROR,
@@ -65,4 +77,5 @@ export const AGENT_REGISTRY = {
65
77
  "cost-limit-exceeded": COST_LIMIT_EXCEEDED,
66
78
  "tool-id-conflict": TOOL_ID_CONFLICT,
67
79
  "durable-run-event-persistence-failed": DURABLE_RUN_EVENT_PERSISTENCE_FAILED,
80
+ "default-model-credential-mismatch": DEFAULT_MODEL_CREDENTIAL_MISMATCH,
68
81
  };
@@ -144,6 +144,7 @@ export declare const ERROR_REGISTRY: Readonly<{
144
144
  readonly "cost-limit-exceeded": import("./types.js").RegisteredError;
145
145
  readonly "tool-id-conflict": import("./types.js").RegisteredError;
146
146
  readonly "durable-run-event-persistence-failed": import("./types.js").RegisteredError;
147
+ readonly "default-model-credential-mismatch": import("./types.js").RegisteredError;
147
148
  }>;
148
149
  export type ErrorSlug = keyof typeof ERROR_REGISTRY;
149
150
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"error-registry.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAgBhD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,cAAc,CAAC;AAEpD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,wCAE7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,0CAE1D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,SAAS,EAAE,CAEzC"}
1
+ {"version":3,"file":"error-registry.d.ts","sourceRoot":"","sources":["../../../src/src/errors/error-registry.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAgBhD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,cAAc,CAAC;AAEpD;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,wCAE7C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,0CAE1D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,SAAS,EAAE,CAEzC"}
@@ -29,6 +29,7 @@ export declare function isOTLPEnabled(): boolean;
29
29
  export declare function initializeOTLPWithApis(): Promise<void>;
30
30
  export type WithSpanOptions = {
31
31
  kind?: SpanKind;
32
+ errorStatus?: (error: unknown) => unknown;
32
33
  };
33
34
  /** Applies span. */
34
35
  export declare function withSpan<T>(name: string, fn: (span: Span) => Promise<T>, attributes?: Record<string, AttributeValue>, options?: WithSpanOptions): Promise<T>;
@@ -51,6 +52,8 @@ export declare function setSpanAttributes(span: unknown, attributes: Record<stri
51
52
  export declare function addSpanEvent(span: unknown, name: string, attributes?: Record<string, AttributeValue>): void;
52
53
  /** Sets active span attributes. */
53
54
  export declare function setActiveSpanAttributes(attributes: Record<string, AttributeValue>): void;
55
+ /** Records an event on the currently active span, if there is one. */
56
+ export declare function addActiveSpanEvent(name: string, attributes?: Record<string, AttributeValue>): void;
54
57
  /** Marks the active span as failed. */
55
58
  export declare function setActiveSpanErrorStatus(error: unknown): void;
56
59
  /** Context for with. */
@@ -1 +1 @@
1
- {"version":3,"file":"otlp-setup.d.ts","sourceRoot":"","sources":["../../../../src/src/observability/tracing/otlp-setup.ts"],"names":[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wB;AACxB,wBAAsB,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAM3F;AAED,6BAA6B;AAC7B,wBAAgB,eAAe,IAAI;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAUvE"}
@@ -198,12 +198,31 @@ function startSpanWithFallback(name, attributes, options) {
198
198
  return { span, context: spanContext };
199
199
  }
200
200
  function setSpanErrorStatus(span, error) {
201
- const telemetryError = sanitizeErrorForTelemetry(error);
201
+ // Sanitization runs on caller-supplied values on every error path, so it is guarded
202
+ // like the span calls are: a throw here would turn a handled failure into a thrown one,
203
+ // and telemetry must never change the outcome it reports on. Defence in depth -- probing
204
+ // throwing proxy traps, accessors and toString found no input that actually throws.
205
+ let telemetryError;
206
+ runTelemetryOperation(() => {
207
+ telemetryError = sanitizeErrorForTelemetry(error);
208
+ }, "Failed to sanitize error for telemetry");
209
+ if (!telemetryError)
210
+ return;
211
+ const sanitized = telemetryError;
202
212
  runTelemetryOperation(() => span.setStatus({
203
213
  code: SpanStatusCode.ERROR,
204
- message: telemetryError.message,
214
+ message: sanitized.message,
205
215
  }), "Failed to set span error status");
206
- runTelemetryOperation(() => span.recordException(telemetryError), "Failed to record span exception");
216
+ runTelemetryOperation(() => span.recordException(sanitized), "Failed to record span exception");
217
+ }
218
+ function spanErrorStatus(error, options) {
219
+ if (!options?.errorStatus)
220
+ return error;
221
+ let statusError = error;
222
+ runTelemetryOperation(() => {
223
+ statusError = options.errorStatus?.(error) ?? error;
224
+ }, "Failed to derive span error status");
225
+ return statusError;
207
226
  }
208
227
  /** Applies span. */
209
228
  export async function withSpan(name, fn, attributes, options) {
@@ -213,7 +232,7 @@ export async function withSpan(name, fn, attributes, options) {
213
232
  return result;
214
233
  }
215
234
  catch (error) {
216
- setSpanErrorStatus(span, error);
235
+ setSpanErrorStatus(span, spanErrorStatus(error, options));
217
236
  throw error;
218
237
  }
219
238
  finally {
@@ -229,7 +248,7 @@ export function withSpanSync(name, fn, attributes, options) {
229
248
  return result;
230
249
  }
231
250
  catch (error) {
232
- setSpanErrorStatus(span, error);
251
+ setSpanErrorStatus(span, spanErrorStatus(error, options));
233
252
  throw error;
234
253
  }
235
254
  finally {
@@ -333,6 +352,10 @@ export function setActiveSpanAttributes(attributes) {
333
352
  runTelemetryOperation(() => span.setAttribute(key, value), "Failed to set active span attribute");
334
353
  }
335
354
  }
355
+ /** Records an event on the currently active span, if there is one. */
356
+ export function addActiveSpanEvent(name, attributes) {
357
+ addSpanEvent(shimTrace.getActiveSpan?.(), name, attributes);
358
+ }
336
359
  /** Marks the active span as failed. */
337
360
  export function setActiveSpanErrorStatus(error) {
338
361
  const span = shimTrace.getActiveSpan?.();
@@ -107,6 +107,18 @@ export declare function writeStdoutAsync(data: Uint8Array): Promise<number>;
107
107
  * Returns null in environments where prompt is not available (e.g., Node.js ESM).
108
108
  */
109
109
  export declare function promptSync(message?: string): string | null;
110
+ /** @internal Minimal `node:fs` surface used for synchronous stdin reads. */
111
+ export interface NodeReadSyncFs {
112
+ readSync(fd: number, buffer: Uint8Array, offset: number, length: number, position: null): number;
113
+ }
114
+ /**
115
+ * @internal Exported for tests: the Node branch of {@link readStdinByteSync}.
116
+ *
117
+ * libuv puts a raw-mode TTY in non-blocking mode, so `readSync` throws EAGAIN
118
+ * every time the user has not typed yet. That means "nothing ready", not EOF —
119
+ * treating it as EOF ends the read before a single keystroke arrives.
120
+ */
121
+ export declare function testReadStdinByteSyncNode(fs: NodeReadSyncFs, buf: Uint8Array, sleep?: (ms: number) => void): number | null;
110
122
  /**
111
123
  * Read a single byte from stdin synchronously.
112
124
  * Requires raw mode to be enabled for character-by-character reading.
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/process/lifecycle.ts"],"names":[],"mappings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AAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG1D;AAED,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,IAAI,GACb,MAAM,CAAC;CACX;AAeD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,cAAc,EAClB,GAAG,EAAE,UAAU,EACf,KAAK,GAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAgB,GACtC,MAAM,GAAG,IAAI,CAgBf;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAkCjD"}
@@ -374,6 +374,42 @@ export function promptSync(message) {
374
374
  return null;
375
375
  return globalThis.prompt(message ?? "") ?? null;
376
376
  }
377
+ const STDIN_FD = 0;
378
+ /** How long to park before re-reading a raw TTY that has no byte ready yet. */
379
+ const STDIN_EAGAIN_SLEEP_MS = 5;
380
+ function sleepSync(ms) {
381
+ try {
382
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
383
+ }
384
+ catch {
385
+ // SharedArrayBuffer is unavailable under some sandboxes; spin instead.
386
+ }
387
+ }
388
+ /**
389
+ * @internal Exported for tests: the Node branch of {@link readStdinByteSync}.
390
+ *
391
+ * libuv puts a raw-mode TTY in non-blocking mode, so `readSync` throws EAGAIN
392
+ * every time the user has not typed yet. That means "nothing ready", not EOF —
393
+ * treating it as EOF ends the read before a single keystroke arrives.
394
+ */
395
+ export function testReadStdinByteSyncNode(fs, buf, sleep = sleepSync) {
396
+ while (true) {
397
+ try {
398
+ const n = fs.readSync(STDIN_FD, buf, 0, 1, null);
399
+ return n ? buf[0] ?? null : null;
400
+ }
401
+ catch (e) {
402
+ const code = e.code;
403
+ if (code === "EAGAIN") {
404
+ sleep(STDIN_EAGAIN_SLEEP_MS);
405
+ continue;
406
+ }
407
+ // Windows reports a closed stdin as EOF. Any other error leaves us with
408
+ // no way to read a byte, and null is how this reader says "stop".
409
+ return null;
410
+ }
411
+ }
412
+ }
377
413
  /**
378
414
  * Read a single byte from stdin synchronously.
379
415
  * Requires raw mode to be enabled for character-by-character reading.
@@ -397,5 +433,14 @@ export function readStdinByteSync() {
397
433
  }
398
434
  return null;
399
435
  }
400
- return null;
436
+ // Node: `node:fs` is resolved lazily so this module stays importable in
437
+ // runtimes without it. getBuiltinModule needs Node 22.3+, which the npm
438
+ // CLI entrypoint already requires before loading the bundled JS.
439
+ const getBuiltinModule = runtimeProcess?.getBuiltinModule;
440
+ if (typeof getBuiltinModule !== "function")
441
+ return null;
442
+ const fs = getBuiltinModule.call(runtimeProcess, "node:fs");
443
+ if (typeof fs?.readSync !== "function")
444
+ return null;
445
+ return testReadStdinByteSyncNode(fs, buf);
401
446
  }
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.1245";
2
+ export declare const VERSION = "0.1.1246-rc.13460";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version-constant.d.ts","sourceRoot":"","sources":["../../../src/src/utils/version-constant.ts"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,eAAO,MAAM,OAAO,aAAa,CAAC"}
1
+ {"version":3,"file":"version-constant.d.ts","sourceRoot":"","sources":["../../../src/src/utils/version-constant.ts"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,eAAO,MAAM,OAAO,sBAAsB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.1245";
4
+ export const VERSION = "0.1.1246-rc.13460";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-content-mdx",
3
- "version": "0.1.1245",
3
+ "version": "0.1.1246-rc.13460",
4
4
  "description": "Veryfront first-party extension package for ext-content-mdx",
5
5
  "keywords": [
6
6
  "veryfront",
@@ -67,7 +67,7 @@
67
67
  "vfile": "6.0.3"
68
68
  },
69
69
  "peerDependencies": {
70
- "veryfront": "^0.1.1245"
70
+ "veryfront": "^0.1.1246-rc.13460"
71
71
  },
72
72
  "type": "module",
73
73
  "types": "./esm/extensions/ext-content-mdx/src/index.d.ts",