@wenathlan/saddle 1.8.8 → 1.8.9
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 +15 -15
- package/dist/adapters/forge.d.ts +17 -0
- package/dist/adapters/forge.d.ts.map +1 -0
- package/dist/adapters/forge.js +19 -0
- package/dist/adapters/forge.js.map +1 -0
- package/dist/adapters/forgejo.d.ts +49 -0
- package/dist/adapters/forgejo.d.ts.map +1 -0
- package/{adapters → dist/adapters}/forgejo.js +1 -1
- package/dist/adapters/forgejo.js.map +1 -0
- package/dist/adapters/github.d.ts +12 -0
- package/dist/adapters/github.d.ts.map +1 -0
- package/dist/adapters/github.js +20 -0
- package/dist/adapters/github.js.map +1 -0
- package/dist/adapters/gitlab.d.ts +17 -0
- package/dist/adapters/gitlab.d.ts.map +1 -0
- package/dist/adapters/gitlab.js +10 -0
- package/dist/adapters/gitlab.js.map +1 -0
- package/dist/adapters/huggingface.d.ts +17 -0
- package/dist/adapters/huggingface.d.ts.map +1 -0
- package/{adapters → dist/adapters}/huggingface.js +1 -1
- package/dist/adapters/huggingface.js.map +1 -0
- package/dist/adapters/socket.d.ts +11 -0
- package/dist/adapters/socket.d.ts.map +1 -0
- package/dist/adapters/socket.js +17 -0
- package/dist/adapters/socket.js.map +1 -0
- package/dist/adapters/transport.d.ts +7 -0
- package/dist/adapters/transport.d.ts.map +1 -0
- package/dist/adapters/transport.js +36 -0
- package/dist/adapters/transport.js.map +1 -0
- package/dist/ai/chunk.d.ts +2 -0
- package/dist/ai/chunk.d.ts.map +1 -0
- package/dist/ai/chunk.js +36 -0
- package/dist/ai/chunk.js.map +1 -0
- package/dist/ai/llmstxt.d.ts +6 -0
- package/dist/ai/llmstxt.d.ts.map +1 -0
- package/dist/ai/llmstxt.js +12 -0
- package/dist/ai/llmstxt.js.map +1 -0
- package/dist/ai/provenance.d.ts +22 -0
- package/dist/ai/provenance.d.ts.map +1 -0
- package/dist/ai/provenance.js +25 -0
- package/dist/ai/provenance.js.map +1 -0
- package/dist/ai/rag.d.ts +26 -0
- package/dist/ai/rag.d.ts.map +1 -0
- package/dist/ai/rag.js +22 -0
- package/dist/ai/rag.js.map +1 -0
- package/dist/ai/tokens.d.ts +15 -0
- package/dist/ai/tokens.d.ts.map +1 -0
- package/{ai → dist/ai}/tokens.js +1 -1
- package/dist/ai/tokens.js.map +1 -0
- package/dist/api/auth.d.ts +16 -0
- package/dist/api/auth.d.ts.map +1 -0
- package/dist/api/auth.js +19 -0
- package/dist/api/auth.js.map +1 -0
- package/dist/api/contracts.d.ts +28 -0
- package/dist/api/contracts.d.ts.map +1 -0
- package/{api → dist/api}/contracts.js +3 -6
- package/dist/api/contracts.js.map +1 -0
- package/dist/api/control.d.ts +10 -0
- package/dist/api/control.d.ts.map +1 -0
- package/dist/api/control.js +35 -0
- package/dist/api/control.js.map +1 -0
- package/dist/api/http.d.ts +7 -0
- package/dist/api/http.d.ts.map +1 -0
- package/{api → dist/api}/http.js +5 -5
- package/dist/api/http.js.map +1 -0
- package/dist/api/rate.d.ts +28 -0
- package/dist/api/rate.d.ts.map +1 -0
- package/dist/api/rate.js +36 -0
- package/dist/api/rate.js.map +1 -0
- package/dist/api/security.d.ts +12 -0
- package/dist/api/security.d.ts.map +1 -0
- package/dist/api/security.js +56 -0
- package/dist/api/security.js.map +1 -0
- package/dist/api/service.d.ts +5 -0
- package/dist/api/service.d.ts.map +1 -0
- package/dist/api/service.js +70 -0
- package/dist/api/service.js.map +1 -0
- package/dist/apps/registry.d.ts +33 -0
- package/dist/apps/registry.d.ts.map +1 -0
- package/dist/apps/registry.js +24 -0
- package/dist/apps/registry.js.map +1 -0
- package/dist/binary/build.d.ts +29 -0
- package/dist/binary/build.d.ts.map +1 -0
- package/dist/binary/build.js +17 -0
- package/dist/binary/build.js.map +1 -0
- package/dist/bot/adapter.d.ts +5 -0
- package/dist/bot/adapter.d.ts.map +1 -0
- package/dist/bot/adapter.js +11 -0
- package/dist/bot/adapter.js.map +1 -0
- package/dist/bot/bot.d.ts +28 -0
- package/dist/bot/bot.d.ts.map +1 -0
- package/dist/bot/bot.js +52 -0
- package/dist/bot/bot.js.map +1 -0
- package/dist/bot/commands.d.ts +8 -0
- package/dist/bot/commands.d.ts.map +1 -0
- package/dist/bot/commands.js +19 -0
- package/dist/bot/commands.js.map +1 -0
- package/dist/bot/permissions.d.ts +13 -0
- package/dist/bot/permissions.d.ts.map +1 -0
- package/dist/bot/permissions.js +16 -0
- package/dist/bot/permissions.js.map +1 -0
- package/dist/browser/actions.d.ts +33 -0
- package/dist/browser/actions.d.ts.map +1 -0
- package/dist/browser/actions.js +44 -0
- package/dist/browser/actions.js.map +1 -0
- package/dist/browser/agent.d.ts +21 -0
- package/dist/browser/agent.d.ts.map +1 -0
- package/dist/browser/agent.js +13 -0
- package/dist/browser/agent.js.map +1 -0
- package/dist/browser/context.d.ts +43 -0
- package/dist/browser/context.d.ts.map +1 -0
- package/dist/browser/context.js +54 -0
- package/dist/browser/context.js.map +1 -0
- package/dist/browser/fingerprint.d.ts +4 -0
- package/dist/browser/fingerprint.d.ts.map +1 -0
- package/{browser → dist/browser}/fingerprint.js +4 -4
- package/dist/browser/fingerprint.js.map +1 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{browser → dist/browser}/index.js +1 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/playwright.d.ts +11 -0
- package/dist/browser/playwright.d.ts.map +1 -0
- package/dist/browser/playwright.js +24 -0
- package/dist/browser/playwright.js.map +1 -0
- package/dist/browser/recorder.d.ts +27 -0
- package/dist/browser/recorder.d.ts.map +1 -0
- package/dist/browser/recorder.js +22 -0
- package/dist/browser/recorder.js.map +1 -0
- package/dist/browser/session.d.ts +14 -0
- package/dist/browser/session.d.ts.map +1 -0
- package/dist/browser/session.js +21 -0
- package/dist/browser/session.js.map +1 -0
- package/dist/browser/snapshot.d.ts +57 -0
- package/dist/browser/snapshot.d.ts.map +1 -0
- package/dist/browser/snapshot.js +57 -0
- package/dist/browser/snapshot.js.map +1 -0
- package/dist/captcha/contract.d.ts +35 -0
- package/dist/captcha/contract.d.ts.map +1 -0
- package/dist/captcha/contract.js +17 -0
- package/dist/captcha/contract.js.map +1 -0
- package/dist/captcha/evidence.d.ts +10 -0
- package/dist/captcha/evidence.d.ts.map +1 -0
- package/dist/captcha/evidence.js +9 -0
- package/dist/captcha/evidence.js.map +1 -0
- package/dist/captcha/guard.d.ts +23 -0
- package/dist/captcha/guard.d.ts.map +1 -0
- package/dist/captcha/guard.js +12 -0
- package/dist/captcha/guard.js.map +1 -0
- package/dist/cli/main.d.ts +4 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +46 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/core/errors.d.ts +84 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +54 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/events.d.ts +9 -0
- package/dist/core/events.d.ts.map +1 -0
- package/dist/core/events.js +21 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/hash.d.ts +10 -0
- package/dist/core/hash.d.ts.map +1 -0
- package/dist/core/hash.js +82 -0
- package/dist/core/hash.js.map +1 -0
- package/dist/core/ids.d.ts +10 -0
- package/dist/core/ids.d.ts.map +1 -0
- package/dist/core/ids.js +15 -0
- package/dist/core/ids.js.map +1 -0
- package/dist/deploy/index.d.ts +6 -0
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js +6 -0
- package/dist/deploy/index.js.map +1 -0
- package/dist/dispatch/resumable.d.ts +85 -0
- package/dist/dispatch/resumable.d.ts.map +1 -0
- package/dist/dispatch/resumable.js +39 -0
- package/dist/dispatch/resumable.js.map +1 -0
- package/dist/dispatch/workflow.d.ts +6 -0
- package/dist/dispatch/workflow.d.ts.map +1 -0
- package/dist/dispatch/workflow.js +37 -0
- package/dist/dispatch/workflow.js.map +1 -0
- package/dist/domain/artifacts.d.ts +12 -0
- package/dist/domain/artifacts.d.ts.map +1 -0
- package/dist/domain/artifacts.js +14 -0
- package/dist/domain/artifacts.js.map +1 -0
- package/dist/domain/jobs.d.ts +12 -0
- package/dist/domain/jobs.d.ts.map +1 -0
- package/dist/domain/jobs.js +20 -0
- package/dist/domain/jobs.js.map +1 -0
- package/dist/domain/providers.d.ts +10 -0
- package/dist/domain/providers.d.ts.map +1 -0
- package/{domain → dist/domain}/providers.js +2 -2
- package/dist/domain/providers.js.map +1 -0
- package/dist/domain/runtime.d.ts +14 -0
- package/dist/domain/runtime.d.ts.map +1 -0
- package/{domain → dist/domain}/runtime.js +3 -3
- package/dist/domain/runtime.js.map +1 -0
- package/dist/domain/sessions.d.ts +12 -0
- package/dist/domain/sessions.d.ts.map +1 -0
- package/dist/domain/sessions.js +57 -0
- package/dist/domain/sessions.js.map +1 -0
- package/dist/examples/localjob.d.ts +2 -0
- package/dist/examples/localjob.d.ts.map +1 -0
- package/{examples → dist/examples}/localjob.js +1 -1
- package/dist/examples/localjob.js.map +1 -0
- package/dist/examples/publicapi.d.ts +2 -0
- package/dist/examples/publicapi.d.ts.map +1 -0
- package/{examples → dist/examples}/publicapi.js +1 -1
- package/dist/examples/publicapi.js.map +1 -0
- package/dist/extension/build.d.ts +9 -0
- package/dist/extension/build.d.ts.map +1 -0
- package/dist/extension/build.js +61 -0
- package/dist/extension/build.js.map +1 -0
- package/dist/extension/content.d.ts +6 -0
- package/dist/extension/content.d.ts.map +1 -0
- package/dist/extension/content.js +135 -0
- package/dist/extension/content.js.map +1 -0
- package/dist/extension/index.d.ts +7 -0
- package/dist/extension/index.d.ts.map +1 -0
- package/{extension → dist/extension}/index.js +1 -0
- package/dist/extension/index.js.map +1 -0
- package/dist/extension/pagebridge.d.ts +6 -0
- package/dist/extension/pagebridge.d.ts.map +1 -0
- package/dist/extension/pagebridge.js +42 -0
- package/dist/extension/pagebridge.js.map +1 -0
- package/dist/extension/permissions.d.ts +26 -0
- package/dist/extension/permissions.d.ts.map +1 -0
- package/dist/extension/permissions.js +28 -0
- package/dist/extension/permissions.js.map +1 -0
- package/dist/extension/popup.d.ts +5 -0
- package/dist/extension/popup.d.ts.map +1 -0
- package/dist/extension/popup.js +26 -0
- package/dist/extension/popup.js.map +1 -0
- package/dist/extension/protocol.d.ts +58 -0
- package/dist/extension/protocol.d.ts.map +1 -0
- package/dist/extension/protocol.js +101 -0
- package/dist/extension/protocol.js.map +1 -0
- package/dist/extension/serviceworker.d.ts +25 -0
- package/dist/extension/serviceworker.d.ts.map +1 -0
- package/dist/extension/serviceworker.js +102 -0
- package/dist/extension/serviceworker.js.map +1 -0
- package/dist/extension/worker.d.ts +28 -0
- package/dist/extension/worker.d.ts.map +1 -0
- package/dist/extension/worker.js +22 -0
- package/dist/extension/worker.js.map +1 -0
- package/dist/format/check.d.ts +8 -0
- package/dist/format/check.d.ts.map +1 -0
- package/dist/format/check.js +38 -0
- package/dist/format/check.js.map +1 -0
- package/dist/index.d.ts +117 -0
- package/dist/index.d.ts.map +1 -0
- package/{index.js → dist/index.js} +1 -0
- package/dist/index.js.map +1 -0
- package/dist/library/public.d.ts +53 -0
- package/dist/library/public.d.ts.map +1 -0
- package/dist/library/public.js +83 -0
- package/dist/library/public.js.map +1 -0
- package/dist/mcp/browser.d.ts +9 -0
- package/dist/mcp/browser.d.ts.map +1 -0
- package/dist/mcp/browser.js +13 -0
- package/dist/mcp/browser.js.map +1 -0
- package/dist/mcp/server.d.ts +35 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +40 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/transport.d.ts +7 -0
- package/dist/mcp/transport.d.ts.map +1 -0
- package/dist/mcp/transport.js +17 -0
- package/dist/mcp/transport.js.map +1 -0
- package/dist/memory/bridge.d.ts +14 -0
- package/dist/memory/bridge.d.ts.map +1 -0
- package/dist/memory/bridge.js +16 -0
- package/dist/memory/bridge.js.map +1 -0
- package/dist/memory/engine.d.ts +28 -0
- package/dist/memory/engine.d.ts.map +1 -0
- package/dist/memory/engine.js +59 -0
- package/dist/memory/engine.js.map +1 -0
- package/dist/memory/modes.d.ts +43 -0
- package/dist/memory/modes.d.ts.map +1 -0
- package/dist/memory/modes.js +66 -0
- package/dist/memory/modes.js.map +1 -0
- package/dist/memory/objects.d.ts +21 -0
- package/dist/memory/objects.d.ts.map +1 -0
- package/dist/memory/objects.js +20 -0
- package/dist/memory/objects.js.map +1 -0
- package/dist/memory/targets.d.ts +78 -0
- package/dist/memory/targets.d.ts.map +1 -0
- package/dist/memory/targets.js +29 -0
- package/dist/memory/targets.js.map +1 -0
- package/dist/memory/transforms.d.ts +19 -0
- package/dist/memory/transforms.d.ts.map +1 -0
- package/dist/memory/transforms.js +14 -0
- package/dist/memory/transforms.js.map +1 -0
- package/dist/modes/matrix.d.ts +23 -0
- package/dist/modes/matrix.d.ts.map +1 -0
- package/{modes → dist/modes}/matrix.js +8 -10
- package/dist/modes/matrix.js.map +1 -0
- package/dist/modes/modes.d.ts +33 -0
- package/dist/modes/modes.d.ts.map +1 -0
- package/{modes → dist/modes}/modes.js +3 -4
- package/dist/modes/modes.js.map +1 -0
- package/dist/modes/resolve.d.ts +41 -0
- package/dist/modes/resolve.d.ts.map +1 -0
- package/dist/modes/resolve.js +39 -0
- package/dist/modes/resolve.js.map +1 -0
- package/dist/observability/metrics.d.ts +14 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/metrics.js +18 -0
- package/dist/observability/metrics.js.map +1 -0
- package/dist/packager/manifest.d.ts +49 -0
- package/dist/packager/manifest.d.ts.map +1 -0
- package/dist/packager/manifest.js +49 -0
- package/dist/packager/manifest.js.map +1 -0
- package/dist/packager/publish.d.ts +51 -0
- package/dist/packager/publish.d.ts.map +1 -0
- package/dist/packager/publish.js +18 -0
- package/dist/packager/publish.js.map +1 -0
- package/dist/packager/targetcli.d.ts +7 -0
- package/dist/packager/targetcli.d.ts.map +1 -0
- package/dist/packager/targetcli.js +22 -0
- package/dist/packager/targetcli.js.map +1 -0
- package/dist/persistence/adapter.d.ts +5 -0
- package/dist/persistence/adapter.d.ts.map +1 -0
- package/dist/persistence/adapter.js +11 -0
- package/dist/persistence/adapter.js.map +1 -0
- package/dist/persistence/drizzle.d.ts +2 -0
- package/dist/persistence/drizzle.d.ts.map +1 -0
- package/dist/persistence/drizzle.js +12 -0
- package/dist/persistence/drizzle.js.map +1 -0
- package/dist/persistence/memory.d.ts +2 -0
- package/dist/persistence/memory.d.ts.map +1 -0
- package/dist/persistence/memory.js +27 -0
- package/dist/persistence/memory.js.map +1 -0
- package/dist/persistence/migrations.d.ts +19 -0
- package/dist/persistence/migrations.d.ts.map +1 -0
- package/{persistence → dist/persistence}/migrations.js +4 -5
- package/dist/persistence/migrations.js.map +1 -0
- package/dist/persistence/prisma.d.ts +2 -0
- package/dist/persistence/prisma.d.ts.map +1 -0
- package/dist/persistence/prisma.js +25 -0
- package/dist/persistence/prisma.js.map +1 -0
- package/dist/persistence/schema.d.ts +63 -0
- package/dist/persistence/schema.d.ts.map +1 -0
- package/dist/persistence/schema.js +28 -0
- package/dist/persistence/schema.js.map +1 -0
- package/dist/persistence/sql.d.ts +3 -0
- package/dist/persistence/sql.d.ts.map +1 -0
- package/dist/persistence/sql.js +37 -0
- package/dist/persistence/sql.js.map +1 -0
- package/dist/protocol/blocks.d.ts +10 -0
- package/dist/protocol/blocks.d.ts.map +1 -0
- package/dist/protocol/blocks.js +26 -0
- package/dist/protocol/blocks.js.map +1 -0
- package/dist/protocol/json.d.ts +6 -0
- package/dist/protocol/json.d.ts.map +1 -0
- package/{protocol → dist/protocol}/json.js +1 -0
- package/dist/protocol/json.js.map +1 -0
- package/dist/protocol/ndjson.d.ts +3 -0
- package/dist/protocol/ndjson.d.ts.map +1 -0
- package/dist/protocol/ndjson.js +20 -0
- package/dist/protocol/ndjson.js.map +1 -0
- package/dist/protocol/sse.d.ts +7 -0
- package/dist/protocol/sse.d.ts.map +1 -0
- package/dist/protocol/sse.js +25 -0
- package/dist/protocol/sse.js.map +1 -0
- package/dist/proxy/pool.d.ts +9 -0
- package/dist/proxy/pool.d.ts.map +1 -0
- package/dist/proxy/pool.js +27 -0
- package/dist/proxy/pool.js.map +1 -0
- package/dist/queue/idempotency.d.ts +10 -0
- package/dist/queue/idempotency.d.ts.map +1 -0
- package/dist/queue/idempotency.js +13 -0
- package/dist/queue/idempotency.js.map +1 -0
- package/dist/queue/persistent.d.ts +13 -0
- package/dist/queue/persistent.d.ts.map +1 -0
- package/dist/queue/persistent.js +49 -0
- package/dist/queue/persistent.js.map +1 -0
- package/dist/queue/queue.d.ts +7 -0
- package/dist/queue/queue.d.ts.map +1 -0
- package/dist/queue/queue.js +55 -0
- package/dist/queue/queue.js.map +1 -0
- package/dist/queue/saga.d.ts +5 -0
- package/dist/queue/saga.d.ts.map +1 -0
- package/dist/queue/saga.js +20 -0
- package/dist/queue/saga.js.map +1 -0
- package/dist/release/assets.d.ts +118 -0
- package/dist/release/assets.d.ts.map +1 -0
- package/dist/release/assets.js +69 -0
- package/dist/release/assets.js.map +1 -0
- package/dist/runners/health.d.ts +36 -0
- package/dist/runners/health.d.ts.map +1 -0
- package/dist/runners/health.js +26 -0
- package/dist/runners/health.js.map +1 -0
- package/dist/runners/heartbeat.d.ts +23 -0
- package/dist/runners/heartbeat.d.ts.map +1 -0
- package/dist/runners/heartbeat.js +29 -0
- package/dist/runners/heartbeat.js.map +1 -0
- package/dist/runners/inprocess.d.ts +17 -0
- package/dist/runners/inprocess.d.ts.map +1 -0
- package/dist/runners/inprocess.js +20 -0
- package/dist/runners/inprocess.js.map +1 -0
- package/dist/runners/scheduler.d.ts +5 -0
- package/dist/runners/scheduler.d.ts.map +1 -0
- package/dist/runners/scheduler.js +19 -0
- package/dist/runners/scheduler.js.map +1 -0
- package/dist/runtime/abort.d.ts +8 -0
- package/dist/runtime/abort.d.ts.map +1 -0
- package/dist/runtime/abort.js +13 -0
- package/dist/runtime/abort.js.map +1 -0
- package/dist/runtime/compatibility.d.ts +37 -0
- package/dist/runtime/compatibility.d.ts.map +1 -0
- package/{runtime → dist/runtime}/compatibility.js +1 -4
- package/dist/runtime/compatibility.js.map +1 -0
- package/dist/runtime/detect.d.ts +13 -0
- package/dist/runtime/detect.d.ts.map +1 -0
- package/dist/runtime/detect.js +18 -0
- package/dist/runtime/detect.js.map +1 -0
- package/dist/runtime/engine.d.ts +20 -0
- package/dist/runtime/engine.d.ts.map +1 -0
- package/dist/runtime/engine.js +61 -0
- package/dist/runtime/engine.js.map +1 -0
- package/dist/runtime/retry.d.ts +19 -0
- package/dist/runtime/retry.d.ts.map +1 -0
- package/dist/runtime/retry.js +54 -0
- package/dist/runtime/retry.js.map +1 -0
- package/dist/runtime/worker.d.ts +10 -0
- package/dist/runtime/worker.d.ts.map +1 -0
- package/dist/runtime/worker.js +25 -0
- package/dist/runtime/worker.js.map +1 -0
- package/dist/scrape/cache.d.ts +45 -0
- package/dist/scrape/cache.d.ts.map +1 -0
- package/dist/scrape/cache.js +45 -0
- package/dist/scrape/cache.js.map +1 -0
- package/dist/scrape/crawl.d.ts +47 -0
- package/dist/scrape/crawl.d.ts.map +1 -0
- package/dist/scrape/crawl.js +114 -0
- package/dist/scrape/crawl.js.map +1 -0
- package/dist/scrape/extract.d.ts +63 -0
- package/dist/scrape/extract.d.ts.map +1 -0
- package/dist/scrape/extract.js +47 -0
- package/dist/scrape/extract.js.map +1 -0
- package/dist/scrape/normalize.d.ts +52 -0
- package/dist/scrape/normalize.d.ts.map +1 -0
- package/dist/scrape/normalize.js +102 -0
- package/dist/scrape/normalize.js.map +1 -0
- package/dist/scrape/robots.d.ts +37 -0
- package/dist/scrape/robots.d.ts.map +1 -0
- package/dist/scrape/robots.js +71 -0
- package/dist/scrape/robots.js.map +1 -0
- package/dist/scrape/schema.d.ts +5 -0
- package/dist/scrape/schema.d.ts.map +1 -0
- package/dist/scrape/schema.js +25 -0
- package/dist/scrape/schema.js.map +1 -0
- package/dist/scrape/scraper.d.ts +6 -0
- package/dist/scrape/scraper.d.ts.map +1 -0
- package/dist/scrape/scraper.js +46 -0
- package/dist/scrape/scraper.js.map +1 -0
- package/dist/scrape/semantic.d.ts +25 -0
- package/dist/scrape/semantic.d.ts.map +1 -0
- package/dist/scrape/semantic.js +27 -0
- package/dist/scrape/semantic.js.map +1 -0
- package/dist/server/node.d.ts +7 -0
- package/dist/server/node.d.ts.map +1 -0
- package/dist/server/node.js +38 -0
- package/dist/server/node.js.map +1 -0
- package/dist/sessions/file.d.ts +25 -0
- package/dist/sessions/file.d.ts.map +1 -0
- package/dist/sessions/file.js +13 -0
- package/dist/sessions/file.js.map +1 -0
- package/dist/sessions/replay.d.ts +9 -0
- package/dist/sessions/replay.d.ts.map +1 -0
- package/dist/sessions/replay.js +70 -0
- package/dist/sessions/replay.js.map +1 -0
- package/dist/sessions/store.d.ts +25 -0
- package/dist/sessions/store.d.ts.map +1 -0
- package/dist/sessions/store.js +13 -0
- package/dist/sessions/store.js.map +1 -0
- package/dist/storage/adapter.d.ts +5 -0
- package/dist/storage/adapter.d.ts.map +1 -0
- package/dist/storage/adapter.js +11 -0
- package/dist/storage/adapter.js.map +1 -0
- package/dist/storage/cache.d.ts +23 -0
- package/dist/storage/cache.d.ts.map +1 -0
- package/dist/storage/cache.js +79 -0
- package/dist/storage/cache.js.map +1 -0
- package/dist/storage/checksum.d.ts +3 -0
- package/dist/storage/checksum.d.ts.map +1 -0
- package/dist/storage/checksum.js +19 -0
- package/dist/storage/checksum.js.map +1 -0
- package/dist/storage/chunked.d.ts +21 -0
- package/dist/storage/chunked.d.ts.map +1 -0
- package/dist/storage/chunked.js +67 -0
- package/dist/storage/chunked.js.map +1 -0
- package/dist/storage/content.d.ts +24 -0
- package/dist/storage/content.d.ts.map +1 -0
- package/dist/storage/content.js +44 -0
- package/dist/storage/content.js.map +1 -0
- package/dist/storage/filehosting.d.ts +2 -0
- package/dist/storage/filehosting.d.ts.map +1 -0
- package/dist/storage/filehosting.js +24 -0
- package/dist/storage/filehosting.js.map +1 -0
- package/dist/storage/githubcontents.d.ts +2 -0
- package/dist/storage/githubcontents.d.ts.map +1 -0
- package/dist/storage/githubcontents.js +29 -0
- package/dist/storage/githubcontents.js.map +1 -0
- package/dist/storage/index.d.ts +11 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/{storage → dist/storage}/index.js +1 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/local.d.ts +2 -0
- package/dist/storage/local.d.ts.map +1 -0
- package/dist/storage/local.js +72 -0
- package/dist/storage/local.js.map +1 -0
- package/dist/storage/memory.d.ts +6 -0
- package/dist/storage/memory.d.ts.map +1 -0
- package/dist/storage/memory.js +36 -0
- package/dist/storage/memory.js.map +1 -0
- package/dist/storage/s3compatible.d.ts +2 -0
- package/dist/storage/s3compatible.d.ts.map +1 -0
- package/dist/storage/s3compatible.js +31 -0
- package/dist/storage/s3compatible.js.map +1 -0
- package/dist/storage/sync.d.ts +47 -0
- package/dist/storage/sync.d.ts.map +1 -0
- package/dist/storage/sync.js +75 -0
- package/dist/storage/sync.js.map +1 -0
- package/dist/surfaces/adapters.d.ts +97 -0
- package/dist/surfaces/adapters.d.ts.map +1 -0
- package/dist/surfaces/adapters.js +50 -0
- package/dist/surfaces/adapters.js.map +1 -0
- package/dist/surfaces/controls.d.ts +18 -0
- package/dist/surfaces/controls.d.ts.map +1 -0
- package/dist/surfaces/controls.js +45 -0
- package/dist/surfaces/controls.js.map +1 -0
- package/dist/surfaces/manifest.d.ts +68 -0
- package/dist/surfaces/manifest.d.ts.map +1 -0
- package/dist/surfaces/manifest.js +42 -0
- package/dist/surfaces/manifest.js.map +1 -0
- package/dist/surfaces/n8n.d.ts +25 -0
- package/dist/surfaces/n8n.d.ts.map +1 -0
- package/dist/surfaces/n8n.js +31 -0
- package/dist/surfaces/n8n.js.map +1 -0
- package/dist/surfaces/operations.d.ts +32 -0
- package/dist/surfaces/operations.d.ts.map +1 -0
- package/dist/surfaces/operations.js +53 -0
- package/dist/surfaces/operations.js.map +1 -0
- package/dist/surfaces/targets.d.ts +196 -0
- package/dist/surfaces/targets.d.ts.map +1 -0
- package/dist/surfaces/targets.js +27 -0
- package/dist/surfaces/targets.js.map +1 -0
- package/dist/webhook/delivery.d.ts +18 -0
- package/dist/webhook/delivery.d.ts.map +1 -0
- package/dist/webhook/delivery.js +36 -0
- package/dist/webhook/delivery.js.map +1 -0
- package/dist/webhook/receiver.d.ts +26 -0
- package/dist/webhook/receiver.d.ts.map +1 -0
- package/dist/webhook/receiver.js +24 -0
- package/dist/webhook/receiver.js.map +1 -0
- package/dist/webhook/signature.d.ts +3 -0
- package/dist/webhook/signature.d.ts.map +1 -0
- package/{webhook → dist/webhook}/signature.js +1 -1
- package/dist/webhook/signature.js.map +1 -0
- package/dist/workflow/manifest.d.ts +21 -0
- package/dist/workflow/manifest.d.ts.map +1 -0
- package/dist/workflow/manifest.js +20 -0
- package/dist/workflow/manifest.js.map +1 -0
- package/dist/workflow/registry.d.ts +7 -0
- package/dist/workflow/registry.d.ts.map +1 -0
- package/dist/workflow/registry.js +18 -0
- package/dist/workflow/registry.js.map +1 -0
- package/dist/workflow/templates.d.ts +6 -0
- package/dist/workflow/templates.d.ts.map +1 -0
- package/dist/workflow/templates.js +18 -0
- package/dist/workflow/templates.js.map +1 -0
- package/dist/workflow/triggers.d.ts +36 -0
- package/dist/workflow/triggers.d.ts.map +1 -0
- package/dist/workflow/triggers.js +33 -0
- package/dist/workflow/triggers.js.map +1 -0
- package/docs/enginearchitecture.md +2 -2
- package/docs/gapmatrix.md +2 -2
- package/docs/libraryapi.md +1 -1
- package/docs/release.md +5 -5
- package/docs/releaseassets.md +1 -1
- package/docs/reorganization-1.8.9.md +28 -0
- package/docs/toolchainresearch-1.8.9.md +18 -0
- package/extension/manifest.json +1 -1
- package/package.json +61 -88
- package/adapters/forge.js +0 -16
- package/adapters/github.js +0 -19
- package/adapters/gitlab.js +0 -10
- package/adapters/socket.js +0 -14
- package/adapters/transport.js +0 -30
- package/ai/chunk.js +0 -22
- package/ai/llmstxt.js +0 -12
- package/ai/provenance.js +0 -18
- package/ai/rag.js +0 -14
- package/api/auth.js +0 -13
- package/api/control.js +0 -33
- package/api/rate.js +0 -31
- package/api/security.js +0 -42
- package/api/service.js +0 -36
- package/binary/build.js +0 -17
- package/bot/adapter.js +0 -8
- package/bot/bot.js +0 -39
- package/bot/commands.js +0 -18
- package/bot/permissions.js +0 -16
- package/browser/actions.js +0 -33
- package/browser/agent.js +0 -9
- package/browser/context.js +0 -52
- package/browser/playwright.js +0 -22
- package/browser/recorder.js +0 -21
- package/browser/session.js +0 -19
- package/browser/snapshot.js +0 -57
- package/captcha/contract.js +0 -15
- package/captcha/evidence.js +0 -9
- package/captcha/guard.js +0 -10
- package/cli/main.js +0 -36
- package/core/errors.js +0 -57
- package/core/events.js +0 -21
- package/core/hash.js +0 -73
- package/core/ids.js +0 -15
- package/dispatch/resumable.js +0 -31
- package/dispatch/workflow.js +0 -33
- package/domain/artifacts.js +0 -13
- package/domain/jobs.js +0 -20
- package/domain/sessions.js +0 -46
- package/extension/build.js +0 -46
- package/extension/content.js +0 -127
- package/extension/pagebridge.js +0 -41
- package/extension/permissions.js +0 -22
- package/extension/popup.css +0 -13
- package/extension/popup.html +0 -24
- package/extension/popup.js +0 -25
- package/extension/protocol.js +0 -95
- package/extension/serviceworker.js +0 -109
- package/extension/worker.js +0 -22
- package/format/check.js +0 -21
- package/library/public.js +0 -85
- package/mcp/browser.js +0 -12
- package/mcp/server.js +0 -28
- package/mcp/transport.js +0 -14
- package/memory/bridge.js +0 -16
- package/memory/engine.js +0 -45
- package/memory/modes.js +0 -55
- package/memory/objects.js +0 -18
- package/memory/targets.js +0 -21
- package/memory/transforms.js +0 -15
- package/modes/resolve.js +0 -39
- package/packager/manifest.js +0 -28
- package/packager/publish.js +0 -15
- package/persistence/adapter.js +0 -8
- package/persistence/drizzle.js +0 -10
- package/persistence/memory.js +0 -26
- package/persistence/prisma.js +0 -23
- package/persistence/schema.js +0 -29
- package/persistence/sql.js +0 -30
- package/protocol/blocks.js +0 -18
- package/protocol/ndjson.js +0 -17
- package/protocol/sse.js +0 -22
- package/proxy/pool.js +0 -12
- package/queue/idempotency.js +0 -12
- package/queue/persistent.js +0 -44
- package/queue/queue.js +0 -50
- package/queue/saga.js +0 -13
- package/release/assets.js +0 -70
- package/runners/health.js +0 -23
- package/runners/heartbeat.js +0 -26
- package/runners/inprocess.js +0 -19
- package/runners/scheduler.js +0 -16
- package/runtime/abort.js +0 -10
- package/runtime/detect.js +0 -14
- package/runtime/engine.js +0 -56
- package/runtime/retry.js +0 -27
- package/runtime/worker.js +0 -18
- package/scrape/agent.ts +0 -122
- package/scrape/batch.ts +0 -79
- package/scrape/biome.json +0 -76
- package/scrape/browser.ts +0 -222
- package/scrape/cache.js +0 -14
- package/scrape/cache.ts +0 -84
- package/scrape/chunking.ts +0 -193
- package/scrape/cli.ts +0 -105
- package/scrape/crawl.js +0 -104
- package/scrape/crawler.ts +0 -115
- package/scrape/dev-server.ts +0 -94
- package/scrape/errors.ts +0 -132
- package/scrape/events.ts +0 -26
- package/scrape/extract.js +0 -14
- package/scrape/extract.ts +0 -165
- package/scrape/fetch.ts +0 -105
- package/scrape/formats.ts +0 -85
- package/scrape/headers.ts +0 -71
- package/scrape/index.ts +0 -92
- package/scrape/jsdom.d.ts +0 -6
- package/scrape/llms-txt.ts +0 -84
- package/scrape/middleware.ts +0 -90
- package/scrape/normalize.js +0 -86
- package/scrape/pool.ts +0 -95
- package/scrape/port.ts +0 -18
- package/scrape/proxy.ts +0 -103
- package/scrape/rate-limiter.ts +0 -95
- package/scrape/renderer.ts +0 -194
- package/scrape/retry.ts +0 -64
- package/scrape/robots.js +0 -32
- package/scrape/robots.ts +0 -137
- package/scrape/schema.js +0 -21
- package/scrape/scrape.ts +0 -123
- package/scrape/scraper.js +0 -40
- package/scrape/semantic.js +0 -22
- package/scrape/serialize.ts +0 -310
- package/scrape/server.ts +0 -137
- package/scrape/session.ts +0 -109
- package/scrape/sitemap.ts +0 -131
- package/scrape/tokens.ts +0 -45
- package/scrape/tsconfig.json +0 -28
- package/scrape/types.ts +0 -214
- package/scrape/utils.ts +0 -77
- package/scrape/vite.config.ts +0 -55
- package/scrape/vitest.config.ts +0 -17
- package/server/node.js +0 -34
- package/sessions/file.js +0 -13
- package/sessions/replay.js +0 -61
- package/sessions/store.js +0 -13
- package/storage/adapter.js +0 -8
- package/storage/cache.js +0 -54
- package/storage/checksum.js +0 -17
- package/storage/chunked.js +0 -58
- package/storage/content.js +0 -42
- package/storage/filehosting.js +0 -17
- package/storage/githubcontents.js +0 -18
- package/storage/local.js +0 -35
- package/storage/memory.js +0 -28
- package/storage/s3compatible.js +0 -23
- package/storage/sync.js +0 -55
- package/surfaces/adapters.js +0 -48
- package/surfaces/controls.js +0 -37
- package/surfaces/manifest.js +0 -25
- package/surfaces/n8n.js +0 -24
- package/surfaces/operations.js +0 -43
- package/surfaces/targets.js +0 -16
- package/webhook/delivery.js +0 -26
- package/webhook/receiver.js +0 -20
- package/workflow/manifest.js +0 -20
- package/workflow/registry.js +0 -16
- package/workflow/templates.js +0 -18
- package/workflow/triggers.js +0 -31
package/docs/gapmatrix.md
CHANGED
|
@@ -19,11 +19,11 @@ This matrix turns the supplied README and conclusions into implementation decisi
|
|
|
19
19
|
| Browser agent | Implemented injected action adapter for navigate, click, type, screenshot, DOM, title, scroll and command batches | Vendor-neutral action results and bounded action batches are public; optional Playwright provider is isolated behind `browser-playwright` | P1 | Keep the adapter boundary; browser binaries and credentials remain caller-owned |
|
|
20
20
|
| Browser snapshots | Implemented public contract | Snapshot ids, bounded elements, stable refs, stale checks and diffs are covered by deterministic tests | P0 | Reuse the contract from MCP and extension transport |
|
|
21
21
|
| Session replay | Implemented | Replay restores caller-owned window, tab and frame context before actions; context identifiers are validated and counted | P1 | Keep browser selection and restoration in injected adapters |
|
|
22
|
-
| Extension runtime | Manifest V3
|
|
22
|
+
| Extension runtime | TypeScript-first Manifest V3 source, service worker, content bridge, popup, snapshot diffs, context metadata and deterministic JavaScript build artifact are implemented | Cross-browser manifests remain unbundled | P2 | Keep the compiled MV3 artifact minimal and keep cross-browser profiles caller-owned |
|
|
23
23
|
| Extension messaging | Versioned envelope, correlation id, timeout, sender metadata and error response contract are implemented | Long-lived ports remain caller-owned | P1 | Keep transport-neutral messages and explicit runtime adapters |
|
|
24
24
|
| Service worker resilience | Implemented contract slice | Pending command envelopes, attempt metadata and snapshot summaries persist through injected storage; resume remains explicit and user-owned | P0 | Rehydrate metadata on startup and never replay a command without an explicit caller action |
|
|
25
25
|
| Permissions | Contract slice | `permissionpolicy` keeps the base permissions minimal and optional escalation caller-owned | P0 | Start with `storage` and no broad host permissions; make host access caller-configured |
|
|
26
|
-
| Content isolation | Implemented read-only page-to-extension boundary | The page world cannot invoke extension commands; richer page facts remain bounded | P1 | Keep
|
|
26
|
+
| Content isolation | Implemented read-only page-to-extension boundary | The page world cannot invoke extension commands; richer page facts remain bounded | P1 | Keep the compiled page bridge read-only, token-correlated and caller-controlled |
|
|
27
27
|
| Task agent | Partial | Jobs, workflows and bot commands exist, but no browser task planner or tool registry | P1 | Reuse workflow, trigger and bot contracts; add browser task commands only after snapshots |
|
|
28
28
|
| MCP | Implemented scrape, crawl, batch, extract and serialize tools with JSON-RPC handling | No browser snapshot or browser action MCP tools | P1 | Add browser tools as an optional adapter over the same snapshot/action contracts |
|
|
29
29
|
| API security | Implemented URL protocol and private hostname/IP checks | Request envelopes, optional authorization, security headers, redirect bounds and injected DNS resolution checks are now available | P0 | Keep credentials caller-owned and reject private or rebinding targets before transport |
|
package/docs/libraryapi.md
CHANGED
|
@@ -56,7 +56,7 @@ The `fetcher`, browser adapter, persistence adapter, proxy pool, captcha solver,
|
|
|
56
56
|
|
|
57
57
|
## package surfaces
|
|
58
58
|
|
|
59
|
-
The package exposes explicit subpaths for `./browser`, `./bot`, `./captcha`, `./memory-engine`, and `./deploy`. Desktop, mobile, and n8n contracts are exported from the root entry; the root entry remains the complete JavaScript API for consumers that prefer one import.
|
|
59
|
+
The package exposes explicit subpaths for `./browser`, `./bot`, `./captcha`, `./memory-engine`, and `./deploy`. Desktop, mobile, target-plan and n8n contracts are exported from the root entry; the root entry remains the complete compiled JavaScript API with generated TypeScript declarations for consumers that prefer one import.
|
|
60
60
|
|
|
61
61
|
The `./extension` subpath exposes browser-neutral message, snapshot and service-worker routing contracts. The concrete Manifest V3 files live in `extension/`; they are not imported by the core at runtime and do not require Chrome when the library is used as a Node package. The browser surface also exposes snapshots, tab/frame context, action results, bounded action batches and recording through `./browser`.
|
|
62
62
|
|
package/docs/release.md
CHANGED
|
@@ -6,10 +6,10 @@ The release path is intentionally split into source validation, package validati
|
|
|
6
6
|
|
|
7
7
|
| step | owner | condition |
|
|
8
8
|
|---|---|---|
|
|
9
|
-
| package version | repository | `package.json` matches the release tag, for example `1.8.
|
|
9
|
+
| package version | repository | `package.json` matches the release tag, for example `1.8.9` |
|
|
10
10
|
| quality gate | GitHub Actions | `npm run pack:check` passes |
|
|
11
|
-
| tag | repository owner | tag `v1.8.
|
|
12
|
-
| GitHub release | repository owner | release `v1.8.
|
|
11
|
+
| tag | repository owner | tag `v1.8.9` points to the validated release commit |
|
|
12
|
+
| GitHub release | repository owner | release `v1.8.9` is created from the validated tag |
|
|
13
13
|
| GitHub Packages | GitHub Actions | `publishgithubnpm.yml`, `publishghcr.yml`, `publishmaven.yml`, `publishnuget.yml`, and `publishrubygems.yml` use `GITHUB_TOKEN` |
|
|
14
14
|
| public npmjs | owner-managed GitHub Actions secret | `publishnpmjs.yml` uses `NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}` and derives the version from the release tag or latest release in manual maintenance runs |
|
|
15
15
|
| extension zip | GitHub Actions | `buildextension.yml` derives the version from the release tag, validates the unpacked artifact and attaches `saddle-extension-<version>.zip` |
|
|
@@ -22,8 +22,8 @@ The npm token previously sent in chat is compromised and must not be used. GitHu
|
|
|
22
22
|
|
|
23
23
|
```text
|
|
24
24
|
npm run pack:check
|
|
25
|
-
git tag v1.8.
|
|
26
|
-
git push origin v1.8.
|
|
25
|
+
git tag v1.8.9
|
|
26
|
+
git push origin v1.8.9
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
The release-created event is the publication and extension-asset trigger for the release workflows. A dry-run verifies package shape and local tests, but cannot verify registry ownership, Trusted Publisher configuration, package scope authorization, package visibility or browser-store submission; those remain settings controlled by the owner.
|
package/docs/releaseassets.md
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Reorganization 1.8.9
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Version 1.8.9 converts the active engine and its deterministic test surface to a root-based TypeScript source layout. The source tree does not gain `src/`; generated JavaScript, declarations, source maps and target plans are created in ignored `dist/` or `build/` directories by local scripts and release workflows.
|
|
6
|
+
|
|
7
|
+
## Ownership groups
|
|
8
|
+
|
|
9
|
+
| Group | Canonical source context | Compatibility rule |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Public engine | `index.ts`, `library`, `domain`, `core`, `runtime` | Root exports keep their public names and emit stable `dist/*.js` paths. |
|
|
12
|
+
| Storage and memory | `storage`, `memory`, `persistence` | Physical, vector, remote and in-process adapters remain caller-owned. |
|
|
13
|
+
| Acquisition | `scrape`, `browser`, `captcha`, `proxy` | Scrape, crawl, browser and evidence contracts remain separate where their capabilities differ. |
|
|
14
|
+
| Operations | `queue`, `dispatch`, `workflow`, `runners`, `observability` | Retry, circuit, scheduling and resume contracts stay grouped by lifecycle responsibility. |
|
|
15
|
+
| Delivery | `packager`, `release`, `binary`, `surfaces`, `extension`, `cli` | Delivery modules describe plans or build adapters; they do not own store credentials or signing keys. |
|
|
16
|
+
| Web | `web/App.tsx`, `web/components`, `web/pages`, `web/lib`, `web/contexts`, `web/hooks` | The static React surface remains root based and TypeScript. The dynamic debug collector is an explicit `@ts-nocheck` browser instrumentation boundary. |
|
|
17
|
+
|
|
18
|
+
## Build boundary
|
|
19
|
+
|
|
20
|
+
The project uses a project-local TypeScript 7 compiler. `npm run build:engine` removes and regenerates `dist/`; package `main`, `module`, `browser`, `types`, `bin` and all declared export targets point at that generated output. The npm package includes `dist`, but the Git repository does not commit generated output.
|
|
21
|
+
|
|
22
|
+
## Target boundary
|
|
23
|
+
|
|
24
|
+
Application, computer, desktop, mobile, Android, iOS, browser, extension, web, CLI, binary, LibreOffice, MCP, VSIX and container formats are represented by declarative manifests. The workflow produces plans for each target and uploads them as CI artifacts. Actual Android SDK, Xcode, desktop installer, browser-store, LibreOffice and signing toolchains remain caller-selected adapters because the core cannot safely embed platform credentials or vendor infrastructure.
|
|
25
|
+
|
|
26
|
+
## Verification
|
|
27
|
+
|
|
28
|
+
The active Node contract has 98 passing tests. The preserved legacy scrape TypeScript surface has 69 passing Vitest tests. Web `tsc`, Pages build, format checks, package dry-run and high-severity audit remain release gates. A target plan is accepted only when it contains the release version, canonical compiled entry, output path, caller-managed credentials marker and reproducible metadata.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Toolchain research 1.8.9
|
|
2
|
+
|
|
3
|
+
## Date
|
|
4
|
+
|
|
5
|
+
The migration baseline is **2026-08-13**.
|
|
6
|
+
|
|
7
|
+
## Verified sources
|
|
8
|
+
|
|
9
|
+
| Area | Verified finding | Source |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| TypeScript | The official TypeScript download page states that TypeScript 7.0 is currently available and recommends a project-local npm installation for reproducible lockfiles. | [TypeScript download](https://www.typescriptlang.org/download/) |
|
|
12
|
+
| TypeScript release | The official TypeScript team blog announces TypeScript 7.0 as the current native compiler release. | [Announcing TypeScript 7.0](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/) |
|
|
13
|
+
| Node.js | Node.js 26.7.0 is the current release in the v26 line as of 2026-08-05. | [Node.js 26.7.0](https://nodejs.org/en/blog/release/v26.7.0) |
|
|
14
|
+
| Node.js support | The official release table identifies v26 as Current and v24 as LTS; production targets should remain caller-selectable between supported Current and LTS runtimes. | [Node.js releases](https://nodejs.org/en/about/previous-releases) |
|
|
15
|
+
|
|
16
|
+
## Migration decision
|
|
17
|
+
|
|
18
|
+
The root project will use a project-local TypeScript compiler pinned in `package.json` and `package-lock.json`. The engine target remains Node.js `>=26.7.0`, while target manifests may declare a different runtime only when the target adapter and workflow provide an explicit compatibility contract. Generated JavaScript, declaration files, source maps and bundles remain build output and are not committed as source.
|
package/extension/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "Saddle browser bridge",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.9",
|
|
5
5
|
"description": "User initiated page snapshots through the Saddle browser contract.",
|
|
6
6
|
"minimum_chrome_version": "110",
|
|
7
7
|
"permissions": ["activeTab", "scripting", "storage"],
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenathlan/saddle",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.9",
|
|
4
4
|
"description": "binary computing engine that turns distributed storage into a publishable working set",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "GPL-3.0-only",
|
|
8
8
|
"author": "Wenathlan",
|
|
9
9
|
"sideEffects": false,
|
|
10
|
-
"main": "./index.js",
|
|
11
|
-
"module": "./index.js",
|
|
12
|
-
"browser": "./index.js",
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"browser": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
13
14
|
"packageManager": "npm@12.0.2",
|
|
14
15
|
"publishConfig": {
|
|
15
16
|
"access": "public"
|
|
@@ -42,80 +43,51 @@
|
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
45
|
"bin": {
|
|
45
|
-
"saddle": "./cli/main.js"
|
|
46
|
+
"saddle": "./dist/cli/main.js"
|
|
46
47
|
},
|
|
47
48
|
"exports": {
|
|
48
|
-
".": "./index.js",
|
|
49
|
-
"./memory": "./memory/bridge.js",
|
|
50
|
-
"./memory-node": "./memory/bridge.js",
|
|
51
|
-
"./memory-engine": "./memory/engine.js",
|
|
52
|
-
"./storage": "./storage/index.js",
|
|
53
|
-
"./storage-node": "./storage/local.js",
|
|
54
|
-
"./runners": "./runners/scheduler.js",
|
|
55
|
-
"./sessions": "./domain/sessions.js",
|
|
56
|
-
"./modes": "./modes/resolve.js",
|
|
57
|
-
"./mode": "./modes/matrix.js",
|
|
58
|
-
"./browser": "./browser/index.js",
|
|
59
|
-
"./browser-playwright": "./browser/playwright.js",
|
|
60
|
-
"./bot": "./bot/bot.js",
|
|
61
|
-
"./captcha": "./captcha/contract.js",
|
|
62
|
-
"./deploy": "./deploy/index.js",
|
|
63
|
-
"./extension": "./extension/index.js",
|
|
64
|
-
"./server-node": "./server/node.js",
|
|
65
|
-
"./sessions-file": "./sessions/file.js",
|
|
66
|
-
"./sessions-store": "./sessions/store.js",
|
|
67
|
-
"./queue-persistent": "./queue/persistent.js",
|
|
68
|
-
"./captcha-evidence": "./captcha/evidence.js",
|
|
69
|
-
"./hash": "./core/hash.js",
|
|
70
|
-
"./release-assets": "./release/assets.js",
|
|
71
|
-
"./worker": "./runtime/worker.js"
|
|
49
|
+
".": "./dist/index.js",
|
|
50
|
+
"./memory": "./dist/memory/bridge.js",
|
|
51
|
+
"./memory-node": "./dist/memory/bridge.js",
|
|
52
|
+
"./memory-engine": "./dist/memory/engine.js",
|
|
53
|
+
"./storage": "./dist/storage/index.js",
|
|
54
|
+
"./storage-node": "./dist/storage/local.js",
|
|
55
|
+
"./runners": "./dist/runners/scheduler.js",
|
|
56
|
+
"./sessions": "./dist/domain/sessions.js",
|
|
57
|
+
"./modes": "./dist/modes/resolve.js",
|
|
58
|
+
"./mode": "./dist/modes/matrix.js",
|
|
59
|
+
"./browser": "./dist/browser/index.js",
|
|
60
|
+
"./browser-playwright": "./dist/browser/playwright.js",
|
|
61
|
+
"./bot": "./dist/bot/bot.js",
|
|
62
|
+
"./captcha": "./dist/captcha/contract.js",
|
|
63
|
+
"./deploy": "./dist/deploy/index.js",
|
|
64
|
+
"./extension": "./dist/extension/index.js",
|
|
65
|
+
"./server-node": "./dist/server/node.js",
|
|
66
|
+
"./sessions-file": "./dist/sessions/file.js",
|
|
67
|
+
"./sessions-store": "./dist/sessions/store.js",
|
|
68
|
+
"./queue-persistent": "./dist/queue/persistent.js",
|
|
69
|
+
"./captcha-evidence": "./dist/captcha/evidence.js",
|
|
70
|
+
"./hash": "./dist/core/hash.js",
|
|
71
|
+
"./release-assets": "./dist/release/assets.js",
|
|
72
|
+
"./worker": "./dist/runtime/worker.js"
|
|
72
73
|
},
|
|
73
74
|
"files": [
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"memory",
|
|
77
|
-
"runners",
|
|
78
|
-
"runtime",
|
|
79
|
-
"storage",
|
|
80
|
-
"sessions",
|
|
81
|
-
"modes",
|
|
82
|
-
"adapters",
|
|
83
|
-
"persistence",
|
|
84
|
-
"queue",
|
|
85
|
-
"dispatch",
|
|
86
|
-
"scrape",
|
|
87
|
-
"api",
|
|
88
|
-
"mcp",
|
|
89
|
-
"browser",
|
|
90
|
-
"proxy",
|
|
91
|
-
"captcha",
|
|
92
|
-
"ai",
|
|
93
|
-
"webhook",
|
|
94
|
-
"surfaces",
|
|
95
|
-
"library",
|
|
96
|
-
"server",
|
|
97
|
-
"binary",
|
|
98
|
-
"format",
|
|
99
|
-
"packager",
|
|
100
|
-
"bot",
|
|
101
|
-
"protocol",
|
|
102
|
-
"workflow",
|
|
103
|
-
"cli",
|
|
104
|
-
"extension",
|
|
105
|
-
"release",
|
|
106
|
-
"index.js",
|
|
75
|
+
"dist",
|
|
76
|
+
"extension/manifest.json",
|
|
107
77
|
"docs",
|
|
108
|
-
"examples",
|
|
109
78
|
"README.md",
|
|
110
79
|
"LICENSE"
|
|
111
80
|
],
|
|
112
81
|
"scripts": {
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
82
|
+
"build:engine": "node tests/scripts/buildengine.mjs",
|
|
83
|
+
"check": "npm run build:engine && node --check dist/index.js && node --check dist/runtime/engine.js && node --check dist/cli/main.js && node --check dist/extension/serviceworker.js && node --check dist/release/assets.js",
|
|
84
|
+
"formatcheck": "node --import tsx format/check.ts",
|
|
85
|
+
"test": "npm run build:engine && node --import tsx --test tests/engine.test.ts tests/extension.test.ts tests/package.test.ts tests/release.test.ts",
|
|
86
|
+
"test:legacy": "vitest run tests/agent-utils.test.ts tests/cache.test.ts tests/chunking.test.ts tests/core.test.ts tests/errors.test.ts tests/llms-txt.test.ts tests/middleware.test.ts tests/proxy.test.ts tests/tokens.test.ts",
|
|
87
|
+
"run": "npm run build:engine && node dist/cli/main.js",
|
|
88
|
+
"extension:build": "npm run build:engine && node dist/extension/build.js",
|
|
89
|
+
"release:assets": "npm run build:engine && node dist/release/assets.js",
|
|
90
|
+
"target:manifest": "npm run build:engine && node dist/packager/targetcli.js",
|
|
119
91
|
"pack:check": "npm run check && npm run formatcheck && npm test && npm pack --dry-run",
|
|
120
92
|
"prepublishOnly": "npm run pack:check",
|
|
121
93
|
"web:dev": "vite --config web/vite.config.ts --host",
|
|
@@ -151,17 +123,31 @@
|
|
|
151
123
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
152
124
|
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
153
125
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
126
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
127
|
+
"@tailwindcss/vite": "^4.1.3",
|
|
128
|
+
"@types/express": "4.17.21",
|
|
129
|
+
"@types/google.maps": "^3.58.1",
|
|
130
|
+
"@types/node": "^24.7.0",
|
|
131
|
+
"@types/react": "^19.2.1",
|
|
132
|
+
"@types/react-dom": "^19.2.1",
|
|
133
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
134
|
+
"add": "^2.0.6",
|
|
135
|
+
"autoprefixer": "^10.4.20",
|
|
154
136
|
"axios": "^1.12.0",
|
|
155
137
|
"class-variance-authority": "^0.7.1",
|
|
156
138
|
"clsx": "^2.1.1",
|
|
157
139
|
"cmdk": "^1.1.1",
|
|
158
140
|
"embla-carousel-react": "^8.6.0",
|
|
141
|
+
"esbuild": "^0.25.0",
|
|
159
142
|
"express": "^4.21.2",
|
|
160
143
|
"framer-motion": "^12.23.22",
|
|
161
144
|
"input-otp": "^1.4.2",
|
|
145
|
+
"jsdom": "26.1.0",
|
|
162
146
|
"lucide-react": "^0.453.0",
|
|
163
147
|
"nanoid": "^5.1.5",
|
|
164
148
|
"next-themes": "^0.4.6",
|
|
149
|
+
"postcss": "^8.4.47",
|
|
150
|
+
"prettier": "^3.6.2",
|
|
165
151
|
"react": "^19.2.1",
|
|
166
152
|
"react-day-picker": "^9.11.1",
|
|
167
153
|
"react-dom": "^19.2.1",
|
|
@@ -171,29 +157,16 @@
|
|
|
171
157
|
"sonner": "^2.0.7",
|
|
172
158
|
"streamdown": "^1.4.0",
|
|
173
159
|
"tailwind-merge": "^3.3.1",
|
|
174
|
-
"tailwindcss-animate": "^1.0.7",
|
|
175
|
-
"vaul": "^1.1.2",
|
|
176
|
-
"wouter": "^3.3.5",
|
|
177
|
-
"zod": "^4.1.12",
|
|
178
|
-
"@tailwindcss/typography": "^0.5.15",
|
|
179
|
-
"@tailwindcss/vite": "^4.1.3",
|
|
180
|
-
"@types/express": "4.17.21",
|
|
181
|
-
"@types/google.maps": "^3.58.1",
|
|
182
|
-
"@types/node": "^24.7.0",
|
|
183
|
-
"@types/react": "^19.2.1",
|
|
184
|
-
"@types/react-dom": "^19.2.1",
|
|
185
|
-
"@vitejs/plugin-react": "^5.0.4",
|
|
186
|
-
"add": "^2.0.6",
|
|
187
|
-
"autoprefixer": "^10.4.20",
|
|
188
|
-
"esbuild": "^0.25.0",
|
|
189
|
-
"postcss": "^8.4.47",
|
|
190
|
-
"prettier": "^3.6.2",
|
|
191
160
|
"tailwindcss": "^4.1.14",
|
|
161
|
+
"tailwindcss-animate": "^1.0.7",
|
|
192
162
|
"tsx": "^4.19.1",
|
|
193
163
|
"tw-animate-css": "^1.4.0",
|
|
194
|
-
"typescript": "
|
|
164
|
+
"typescript": "7.0.2",
|
|
165
|
+
"vaul": "^1.1.2",
|
|
195
166
|
"vite": "^7.1.7",
|
|
196
167
|
"vite-plugin-manus-runtime": "^0.0.58",
|
|
197
|
-
"vitest": "^4.1.10"
|
|
168
|
+
"vitest": "^4.1.10",
|
|
169
|
+
"wouter": "^3.3.5",
|
|
170
|
+
"zod": "^4.1.12"
|
|
198
171
|
}
|
|
199
172
|
}
|
package/adapters/forge.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* forge adapter defines the common dispatch and artifact surface for compatible forges.
|
|
3
|
-
*/
|
|
4
|
-
import { transport } from "./transport.js";
|
|
5
|
-
|
|
6
|
-
export function forgeadapter(options = {}) {
|
|
7
|
-
if (!options.baseurl || typeof options.token !== "function") throw new TypeError("forge adapter requires baseurl and token function");
|
|
8
|
-
const client = transport({ fetcher: options.fetcher, attempts: options.attempts, timeout: options.timeout });
|
|
9
|
-
async function call(path, init = {}) { const token = await options.token(); return client.request(new URL(path, options.baseurl), { ...init, headers: { authorization: `Bearer ${token}`, accept: "application/json", ...(init.headers ?? {}) } }); }
|
|
10
|
-
return {
|
|
11
|
-
kind: options.kind ?? "forge",
|
|
12
|
-
async health(path = "/") { const response = await call(path); return { ok: response.ok, status: response.status }; },
|
|
13
|
-
async dispatch(spec) { if (!spec?.path || !spec.ref) throw new TypeError("forge dispatch requires path and ref"); const response = await call(spec.path, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ ref: spec.ref, inputs: spec.inputs ?? {} }) }); return { accepted: response.ok, status: response.status, body: response.json ? await response.json() : undefined }; },
|
|
14
|
-
async upload(spec) { if (!spec?.path || !spec.data) throw new TypeError("forge upload requires path and data"); const response = await call(spec.path, { method: "PUT", headers: { "content-type": spec.contenttype ?? "application/octet-stream" }, body: spec.data }); return { accepted: response.ok, status: response.status }; }
|
|
15
|
-
};
|
|
16
|
-
}
|
package/adapters/github.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* github adapter uses caller supplied credentials and base url configuration.
|
|
3
|
-
*/
|
|
4
|
-
import { transport } from "./transport.js";
|
|
5
|
-
|
|
6
|
-
export function githubadapter(options = {}) {
|
|
7
|
-
if (!options.baseurl || typeof options.token !== "function") throw new TypeError("github adapter requires baseurl and token function");
|
|
8
|
-
const client = transport({ fetcher: options.fetcher, attempts: options.attempts, timeout: options.timeout });
|
|
9
|
-
async function call(path, init = {}) {
|
|
10
|
-
const token = await options.token();
|
|
11
|
-
const headers = { accept: "application/vnd.github+json", authorization: `Bearer ${token}`, "x-github-api-version": options.apiversion ?? "2022-11-28", ...(init.headers ?? {}) };
|
|
12
|
-
return client.request(new URL(path, options.baseurl), { ...init, headers });
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
async health() { const response = await call("/rate_limit"); return { ok: response.ok, status: response.status }; },
|
|
16
|
-
async dispatch(owner, repository, workflow, input = {}) { const response = await call(`/repos/${owner}/${repository}/actions/workflows/${workflow}/dispatches`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ ref: input.ref ?? "main", inputs: input.inputs ?? {} }) }); return { accepted: response.status === 204, status: response.status }; },
|
|
17
|
-
async run(owner, repository, runid) { const response = await call(`/repos/${owner}/${repository}/actions/runs/${runid}`); return response.json(); }
|
|
18
|
-
};
|
|
19
|
-
}
|
package/adapters/gitlab.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* gitlab adapter keeps project addressing and token ownership outside the package.
|
|
3
|
-
*/
|
|
4
|
-
import { forgeadapter } from "./forge.js";
|
|
5
|
-
|
|
6
|
-
export function gitlabadapter(options = {}) {
|
|
7
|
-
const project = encodeURIComponent(options.project ?? "");
|
|
8
|
-
const base = forgeadapter({ ...options, kind: "gitlab" });
|
|
9
|
-
return { ...base, async dispatch(spec) { return base.dispatch({ ...spec, path: spec.path ?? `/api/v4/projects/${project}/pipeline` }); } };
|
|
10
|
-
}
|
package/adapters/socket.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* socket adapter keeps realtime optional and accepts a caller supplied websocket constructor.
|
|
3
|
-
*/
|
|
4
|
-
export function socketadapter(options = {}) {
|
|
5
|
-
const websocket = options.websocket ?? globalThis.WebSocket;
|
|
6
|
-
if (!websocket) throw new Error("websocket implementation is required");
|
|
7
|
-
return {
|
|
8
|
-
connect(url, protocols) {
|
|
9
|
-
if (!url) throw new TypeError("socket url is required");
|
|
10
|
-
const socket = new websocket(url, protocols);
|
|
11
|
-
return { socket, send(value) { socket.send(typeof value === "string" ? value : JSON.stringify(value)); }, close(code, reason) { socket.close(code, reason); } };
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}
|
package/adapters/transport.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* transport centralizes timeout retry and jitter without choosing a host or vendor.
|
|
3
|
-
*/
|
|
4
|
-
export function transport(options = {}) {
|
|
5
|
-
const fetcher = options.fetcher ?? fetch;
|
|
6
|
-
const attempts = options.attempts ?? 3;
|
|
7
|
-
const timeout = options.timeout ?? 30000;
|
|
8
|
-
const retrycodes = new Set(options.retrycodes ?? [408, 409, 429, 500, 502, 503, 504]);
|
|
9
|
-
async function request(url, init = {}) {
|
|
10
|
-
let last;
|
|
11
|
-
for (let attempt = 0; attempt < attempts; attempt += 1) {
|
|
12
|
-
const controller = new AbortController();
|
|
13
|
-
const timer = setTimeout(() => controller.abort(), timeout);
|
|
14
|
-
try {
|
|
15
|
-
const response = await fetcher(url, { ...init, signal: init.signal ?? controller.signal });
|
|
16
|
-
if (response.ok || !retrycodes.has(response.status) || attempt === attempts - 1) return response;
|
|
17
|
-
last = new Error(`request failed with ${response.status}`);
|
|
18
|
-
} catch (error) {
|
|
19
|
-
last = error;
|
|
20
|
-
if (attempt === attempts - 1) throw error;
|
|
21
|
-
} finally { clearTimeout(timer); }
|
|
22
|
-
await delay(backoff(options, attempt));
|
|
23
|
-
}
|
|
24
|
-
throw last ?? new Error("request failed");
|
|
25
|
-
}
|
|
26
|
-
return { request };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function backoff(options, attempt) { const base = options.backoff ?? 250; const jitter = options.jitter ?? 0; return base * 2 ** attempt + Math.floor(Math.random() * jitter); }
|
|
30
|
-
function delay(milliseconds) { return new Promise((resolve) => setTimeout(resolve, milliseconds)); }
|
package/ai/chunk.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* markdown chunking preserves heading paths and uses paragraph boundaries before hard cuts.
|
|
3
|
-
*/
|
|
4
|
-
import { estimatetokens } from "./tokens.js";
|
|
5
|
-
|
|
6
|
-
export function chunkmarkdown(markdown, options = {}) {
|
|
7
|
-
const maxtokens = options.maxtokens ?? 512;
|
|
8
|
-
const overlap = options.overlaptokens ?? 50;
|
|
9
|
-
const lines = String(markdown ?? "").split(/\r?\n/);
|
|
10
|
-
const chunks = [];
|
|
11
|
-
let headingpath = [];
|
|
12
|
-
let buffer = [];
|
|
13
|
-
function flush() { if (!buffer.length) return; const content = buffer.join("\n").trim(); if (content) chunks.push({ content, headingpath: [...headingpath], tokencount: estimatetokens(content, options.model) }); buffer = []; }
|
|
14
|
-
for (const line of lines) {
|
|
15
|
-
const heading = line.match(/^(#{1,6})\s+(.+)$/);
|
|
16
|
-
if (heading) { flush(); const level = heading[1].length; headingpath = headingpath.slice(0, level - 1); headingpath[level - 1] = heading[2].trim(); buffer.push(line); continue; }
|
|
17
|
-
buffer.push(line);
|
|
18
|
-
if (estimatetokens(buffer.join("\n"), options.model) > maxtokens) { const last = buffer.pop(); flush(); const overlaptext = buffer.slice(-overlap).join("\n"); buffer = overlaptext ? [overlaptext, last] : [last]; }
|
|
19
|
-
}
|
|
20
|
-
flush();
|
|
21
|
-
return chunks.map((chunk, index) => ({ ...chunk, id: `chunk${index}` }));
|
|
22
|
-
}
|
package/ai/llmstxt.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* llms text generation creates compact absolute links for agent consumption.
|
|
3
|
-
*/
|
|
4
|
-
export function llmstxt(options = {}) {
|
|
5
|
-
const title = options.title ?? "saddle";
|
|
6
|
-
const description = options.description ?? "binary computing engine and browser automation library";
|
|
7
|
-
const pages = (options.pages ?? []).filter((page) => page?.url && /^https:\/\//.test(page.url)).slice(0, options.limit ?? 100);
|
|
8
|
-
const lines = [`# ${title}`, `> ${description}`, "", "## pages", "", ...pages.map((page) => `- [${page.title ?? page.url}](${page.url}): ${(page.description ?? "").slice(0, 100)}`)];
|
|
9
|
-
return `${lines.join("\n")}\n`;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function llmsfull(options = {}) { return (options.pages ?? []).filter((page) => page?.url && /^https:\/\//.test(page.url)).map((page) => `# ${page.title ?? page.url}\n\nsource: ${page.url}\n\n${page.content ?? ""}`).join("\n\n---\n\n"); }
|
package/ai/provenance.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* context provenance links retrieved chunks to source, query and transformation metadata.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/** Creates a serializable retrieval record for an agent context result. */
|
|
6
|
-
export function provenance(input = {}) {
|
|
7
|
-
if (!input.source && !input.sourceurl) throw new TypeError("provenance requires a source");
|
|
8
|
-
return { version: 1, source: input.source ?? input.sourceurl, sourceurl: input.sourceurl, documentid: input.documentid, query: input.query, retrievedat: Number(input.retrievedat ?? Date.now()), chunks: Array.isArray(input.chunks) ? input.chunks.map((chunk, index) => ({ id: String(chunk.id ?? index), contenthash: chunk.contenthash, score: chunk.score === undefined ? undefined : Number(chunk.score), headingpath: chunk.headingpath, tokencount: chunk.tokencount, citation: chunk.citation ?? input.sourceurl })) : [], metadata: { ...(input.metadata ?? {}) } };
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** Merges provenance records while deduplicating chunk identifiers. */
|
|
12
|
-
export function mergeprovenance(records = []) {
|
|
13
|
-
const valid = records.filter(Boolean);
|
|
14
|
-
const chunks = [];
|
|
15
|
-
const seen = new Set();
|
|
16
|
-
for (const record of valid) for (const chunk of record.chunks ?? []) { const key = `${record.documentid ?? record.source}:${chunk.id}`; if (seen.has(key)) continue; seen.add(key); chunks.push({ ...chunk, source: record.source, documentid: record.documentid }); }
|
|
17
|
-
return { version: 1, sources: [...new Set(valid.map((record) => record.source))], chunks, mergedat: Date.now() };
|
|
18
|
-
}
|
package/ai/rag.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* rag manifests connect chunks to embedding stores without forcing a vendor client.
|
|
3
|
-
*/
|
|
4
|
-
export async function ragmanifest(input = {}) {
|
|
5
|
-
const chunks = input.chunks ?? [];
|
|
6
|
-
const unique = [];
|
|
7
|
-
const hashes = new Set();
|
|
8
|
-
for (const chunk of chunks) { const hash = await hashtext(chunk.content); if (hashes.has(hash)) continue; hashes.add(hash); unique.push({ ...chunk, contenthash: hash, documentid: hash.slice(0, 16), metadata: { ...(input.metadata ?? {}), ...(chunk.metadata ?? {}) } }); }
|
|
9
|
-
return { documentid: (await hashtext(input.source ?? unique.map((chunk) => chunk.content).join("\n"))).slice(0, 16), source: input.source, chunks: unique, embeddingmodel: input.embeddingmodel, embeddingdimensions: input.embeddingdimensions, createdat: Date.now() };
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function vectorrecord(chunk, vector, options = {}) { return { id: `${chunk.documentid}-${chunk.id}`, vector, metadata: { headingpath: chunk.headingpath, contenthash: chunk.contenthash, sourceurl: options.sourceurl, tokencount: chunk.tokencount, contenttype: options.contenttype ?? "text", language: options.language ?? "en", embeddingmodel: options.embeddingmodel, embeddingdimensions: vector?.length } }; }
|
|
13
|
-
|
|
14
|
-
async function hashtext(text) { const bytes = new TextEncoder().encode(String(text)); if (globalThis.crypto?.subtle) { const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes); return [...new Uint8Array(digest)].map((value) => value.toString(16).padStart(2, "0")).join(""); } return Array.from(bytes).map((value) => value.toString(16).padStart(2, "0")).join("").slice(0, 64).padEnd(64, "0"); }
|
package/api/auth.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* api authorization delegates token verification to the caller and never stores credentials.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/** Authorizes a request through an injected verifier or returns an anonymous principal. */
|
|
6
|
-
export async function authorize(request, options = {}) {
|
|
7
|
-
const token = request?.headers?.get?.("authorization")?.replace(/^Bearer\s+/i, "") ?? request?.headers?.get?.("x-api-key");
|
|
8
|
-
if (typeof options.verify !== "function") return { authenticated: false, subject: "anonymous", tokenpresent: Boolean(token) };
|
|
9
|
-
if (!token) return { authenticated: false, subject: "anonymous", tokenpresent: false };
|
|
10
|
-
const principal = await options.verify(token, request);
|
|
11
|
-
if (!principal) { const error = new Error("request is not authorized"); error.code = "UNAUTHORIZED"; throw error; }
|
|
12
|
-
return { authenticated: true, subject: String(principal.subject ?? principal.id ?? "caller"), claims: { ...(principal.claims ?? {}) } };
|
|
13
|
-
}
|
package/api/control.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* control service exposes operator controls through Web Request and Response without selecting a web framework.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { authorize } from "./auth.js";
|
|
6
|
-
import { requestcontext } from "./contracts.js";
|
|
7
|
-
import { errorresponse, jsonresponse } from "./http.js";
|
|
8
|
-
import { controlsurface } from "../surfaces/controls.js";
|
|
9
|
-
|
|
10
|
-
/** Creates a framework-neutral HTTP handler for an injected operator control surface. */
|
|
11
|
-
export function controlservice(options = {}) {
|
|
12
|
-
const controls = options.controls ?? controlsurface({ adapters: options.adapters, audit: options.audit });
|
|
13
|
-
const path = String(options.path ?? "/v1/control");
|
|
14
|
-
if (!path.startsWith("/")) throw new TypeError("control service path must be absolute");
|
|
15
|
-
|
|
16
|
-
async function handle(request) {
|
|
17
|
-
const context = requestcontext(request, { path });
|
|
18
|
-
try {
|
|
19
|
-
await authorize(request, { verify: options.verify });
|
|
20
|
-
const url = new URL(request.url ?? request);
|
|
21
|
-
if (url.pathname !== path) return errorresponse("NOT_FOUND", "control route not found", { status: 404, requestid: context.requestid });
|
|
22
|
-
if (request.method === "GET") return jsonresponse({ ...controls.describe(), requestid: context.requestid });
|
|
23
|
-
if (request.method !== "POST") return errorresponse("METHOD_NOT_ALLOWED", "control route requires GET or POST", { status: 405, requestid: context.requestid });
|
|
24
|
-
const input = typeof request.json === "function" ? await request.json() : {};
|
|
25
|
-
const result = await controls.execute(input);
|
|
26
|
-
return jsonresponse({ requestid: context.requestid, data: result }, { status: result.ok ? 200 : 409 });
|
|
27
|
-
} catch (error) {
|
|
28
|
-
return errorresponse(error?.code ?? "CONTROL_REQUEST_FAILED", error?.message ?? error, { status: error?.code === "UNAUTHORIZED" ? 401 : 400, requestid: context.requestid });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return { path, controls, handle };
|
|
33
|
-
}
|
package/api/rate.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* token bucket rate limiting supports global user and domain keys.
|
|
3
|
-
*/
|
|
4
|
-
export function ratebucket(options = {}) {
|
|
5
|
-
const capacity = options.capacity ?? 10;
|
|
6
|
-
const refill = options.refill ?? capacity;
|
|
7
|
-
const interval = options.interval ?? 60000;
|
|
8
|
-
const buckets = new Map();
|
|
9
|
-
function consume(key, cost = 1) {
|
|
10
|
-
const now = Date.now();
|
|
11
|
-
const previous = buckets.get(key) ?? { tokens: capacity, at: now };
|
|
12
|
-
const tokens = Math.min(capacity, previous.tokens + ((now - previous.at) / interval) * refill);
|
|
13
|
-
if (tokens < cost) return { allowed: false, retryafter: Math.ceil(((cost - tokens) / refill) * interval) };
|
|
14
|
-
buckets.set(key, { tokens: tokens - cost, at: now });
|
|
15
|
-
return { allowed: true, retryafter: 0 };
|
|
16
|
-
}
|
|
17
|
-
return { consume, clear() { buckets.clear(); } };
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function ratelimiter(options = {}) {
|
|
21
|
-
const global = ratebucket(options.global ?? { capacity: 1000, refill: 1000 });
|
|
22
|
-
const user = ratebucket(options.user ?? { capacity: 100, refill: 100 });
|
|
23
|
-
const domain = ratebucket(options.domain ?? { capacity: 10, refill: 10 });
|
|
24
|
-
return {
|
|
25
|
-
check(input = {}) {
|
|
26
|
-
const checks = [[global, "global"], [user, `user:${input.user ?? "anonymous"}`], [domain, `domain:${input.domain ?? "unknown"}`]];
|
|
27
|
-
for (const [bucket, key] of checks) { const result = bucket.consume(key); if (!result.allowed) return { allowed: false, retryafter: result.retryafter, scope: key }; }
|
|
28
|
-
return { allowed: true, retryafter: 0 };
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|