@qlever-llc/trellis 0.10.22 → 0.11.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/auth/mod.d.ts +1 -1
- package/esm/auth/mod.d.ts.map +1 -1
- package/esm/auth/mod.js +1 -1
- package/esm/auth/protocol.d.ts +55 -0
- package/esm/auth/protocol.d.ts.map +1 -1
- package/esm/browser.d.ts +3 -3
- package/esm/browser.d.ts.map +1 -1
- package/esm/browser.js +1 -1
- package/esm/client_connect.d.ts +12 -3
- package/esm/client_connect.d.ts.map +1 -1
- package/esm/client_connect.js +112 -7
- package/esm/codec.d.ts +7 -6
- package/esm/codec.d.ts.map +1 -1
- package/esm/codec.js +125 -6
- package/esm/contract_support/canonical.d.ts +3 -0
- package/esm/contract_support/canonical.d.ts.map +1 -1
- package/esm/contract_support/canonical.js +3 -0
- package/esm/contract_support/mod.d.ts +125 -10
- package/esm/contract_support/mod.d.ts.map +1 -1
- package/esm/contract_support/mod.js +159 -5
- package/esm/contract_support/protocol.d.ts +92 -7
- package/esm/contract_support/protocol.d.ts.map +1 -1
- package/esm/contract_support/protocol.js +41 -7
- package/esm/contract_support/runtime.d.ts +4 -1
- package/esm/contract_support/runtime.d.ts.map +1 -1
- package/esm/errors/SchemaValidationError.d.ts +49 -0
- package/esm/errors/SchemaValidationError.d.ts.map +1 -0
- package/esm/errors/SchemaValidationError.js +67 -0
- package/esm/errors/index.d.ts +38 -9
- package/esm/errors/index.d.ts.map +1 -1
- package/esm/errors/index.js +16 -0
- package/esm/generated-sdk/auth/api.d.ts +33 -605
- package/esm/generated-sdk/auth/api.d.ts.map +1 -1
- package/esm/generated-sdk/auth/api.js +6 -1
- package/esm/generated-sdk/auth/client.d.ts +129 -134
- package/esm/generated-sdk/auth/client.d.ts.map +1 -1
- package/esm/generated-sdk/auth/contract.d.ts +2 -601
- package/esm/generated-sdk/auth/contract.d.ts.map +1 -1
- package/esm/generated-sdk/auth/contract.js +310 -93
- package/esm/generated-sdk/auth/mod.d.ts +1 -1
- package/esm/generated-sdk/auth/mod.d.ts.map +1 -1
- package/esm/generated-sdk/auth/owned_api.d.ts +88 -86
- package/esm/generated-sdk/auth/owned_api.d.ts.map +1 -1
- package/esm/generated-sdk/auth/owned_api.js +6 -0
- package/esm/generated-sdk/auth/schemas.d.ts +284 -136
- package/esm/generated-sdk/auth/schemas.d.ts.map +1 -1
- package/esm/generated-sdk/auth/schemas.js +231 -92
- package/esm/generated-sdk/auth/types.d.ts +565 -89
- package/esm/generated-sdk/auth/types.d.ts.map +1 -1
- package/esm/generated-sdk/auth/types.js +1 -1
- package/esm/generated-sdk/health/api.d.ts +29 -18
- package/esm/generated-sdk/health/api.d.ts.map +1 -1
- package/esm/generated-sdk/health/client.d.ts +7 -21
- package/esm/generated-sdk/health/client.d.ts.map +1 -1
- package/esm/generated-sdk/health/contract.d.ts +2 -15
- package/esm/generated-sdk/health/contract.d.ts.map +1 -1
- package/esm/generated-sdk/health/contract.js +2 -10
- package/esm/generated-sdk/health/mod.d.ts +1 -1
- package/esm/generated-sdk/health/mod.d.ts.map +1 -1
- package/esm/generated-sdk/health/owned_api.d.ts +2 -2
- package/esm/generated-sdk/health/schemas.d.ts +1 -14
- package/esm/generated-sdk/health/schemas.d.ts.map +1 -1
- package/esm/generated-sdk/health/schemas.js +1 -9
- package/esm/generated-sdk/health/types.d.ts +10 -5
- package/esm/generated-sdk/health/types.d.ts.map +1 -1
- package/esm/generated-sdk/health/types.js +1 -2
- package/esm/generated-sdk/jobs/api.d.ts +29 -109
- package/esm/generated-sdk/jobs/api.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/client.d.ts +21 -33
- package/esm/generated-sdk/jobs/client.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/contract.d.ts +2 -106
- package/esm/generated-sdk/jobs/contract.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/contract.js +268 -1
- package/esm/generated-sdk/jobs/mod.d.ts +1 -1
- package/esm/generated-sdk/jobs/mod.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/owned_api.d.ts +22 -9
- package/esm/generated-sdk/jobs/owned_api.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/owned_api.js +20 -1
- package/esm/generated-sdk/jobs/schemas.d.ts +437 -0
- package/esm/generated-sdk/jobs/schemas.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/schemas.js +211 -0
- package/esm/generated-sdk/jobs/types.d.ts +195 -12
- package/esm/generated-sdk/jobs/types.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/types.js +1 -1
- package/esm/generated-sdk/state/api.d.ts +29 -68
- package/esm/generated-sdk/state/api.d.ts.map +1 -1
- package/esm/generated-sdk/state/client.d.ts +17 -31
- package/esm/generated-sdk/state/client.d.ts.map +1 -1
- package/esm/generated-sdk/state/contract.d.ts +1 -64
- package/esm/generated-sdk/state/contract.d.ts.map +1 -1
- package/esm/generated-sdk/state/mod.d.ts +1 -1
- package/esm/generated-sdk/state/mod.d.ts.map +1 -1
- package/esm/generated-sdk/state/owned_api.d.ts +7 -7
- package/esm/generated-sdk/state/types.d.ts +52 -9
- package/esm/generated-sdk/state/types.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/api.d.ts +33 -45
- package/esm/generated-sdk/trellis-core/api.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/api.js +6 -1
- package/esm/generated-sdk/trellis-core/client.d.ts +31 -20
- package/esm/generated-sdk/trellis-core/client.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/contract.d.ts +2 -41
- package/esm/generated-sdk/trellis-core/contract.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/contract.js +91 -1
- package/esm/generated-sdk/trellis-core/mod.d.ts +1 -1
- package/esm/generated-sdk/trellis-core/mod.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/owned_api.d.ts +4 -4
- package/esm/generated-sdk/trellis-core/schemas.d.ts +113 -0
- package/esm/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/schemas.js +81 -0
- package/esm/generated-sdk/trellis-core/types.d.ts +54 -7
- package/esm/generated-sdk/trellis-core/types.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/types.js +1 -1
- package/esm/health.d.ts +1 -1
- package/esm/health.d.ts.map +1 -1
- package/esm/health.js +1 -1
- package/esm/index.d.ts +4 -4
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- package/esm/jobs.d.ts +69 -3
- package/esm/jobs.d.ts.map +1 -1
- package/esm/jobs.js +92 -3
- package/esm/server/health.d.ts +2 -6
- package/esm/server/health.d.ts.map +1 -1
- package/esm/server/health_schemas.d.ts +0 -8
- package/esm/server/health_schemas.d.ts.map +1 -1
- package/esm/server/health_schemas.js +0 -5
- package/esm/server/internal_jobs/bindings.d.ts +11 -0
- package/esm/server/internal_jobs/bindings.d.ts.map +1 -1
- package/esm/server/internal_jobs/job-manager.d.ts +58 -2
- package/esm/server/internal_jobs/job-manager.d.ts.map +1 -1
- package/esm/server/internal_jobs/job-manager.js +429 -55
- package/esm/server/internal_jobs/key-coordinator.d.ts +269 -0
- package/esm/server/internal_jobs/key-coordinator.d.ts.map +1 -0
- package/esm/server/internal_jobs/key-coordinator.js +677 -0
- package/esm/server/internal_jobs/projection.d.ts.map +1 -1
- package/esm/server/internal_jobs/projection.js +2 -0
- package/esm/server/internal_jobs/runtime-worker.d.ts +5 -1
- package/esm/server/internal_jobs/runtime-worker.d.ts.map +1 -1
- package/esm/server/internal_jobs/runtime-worker.js +14 -2
- package/esm/server/internal_jobs/types.d.ts +5 -5
- package/esm/server/internal_jobs/types.d.ts.map +1 -1
- package/esm/server/internal_jobs/types.js +6 -0
- package/esm/server/runtime.d.ts.map +1 -1
- package/esm/server/service.d.ts +81 -112
- package/esm/server/service.d.ts.map +1 -1
- package/esm/server/service.js +372 -130
- package/esm/server.d.ts +3 -3
- package/esm/server.d.ts.map +1 -1
- package/esm/service/deno.d.ts +1 -1
- package/esm/service/deno.d.ts.map +1 -1
- package/esm/service/drizzle.d.ts +52 -0
- package/esm/service/drizzle.d.ts.map +1 -0
- package/esm/service/drizzle.js +108 -0
- package/esm/service/mod.d.ts +3 -3
- package/esm/service/mod.d.ts.map +1 -1
- package/esm/service/mod.js +2 -2
- package/esm/service/node.d.ts +1 -1
- package/esm/service/node.d.ts.map +1 -1
- package/esm/service/outbox_inbox.d.ts +76 -22
- package/esm/service/outbox_inbox.d.ts.map +1 -1
- package/esm/service/outbox_inbox.js +231 -70
- package/esm/telemetry/metrics.d.ts +55 -0
- package/esm/telemetry/metrics.d.ts.map +1 -1
- package/esm/telemetry/metrics.js +86 -0
- package/esm/telemetry/mod.d.ts +2 -1
- package/esm/telemetry/mod.d.ts.map +1 -1
- package/esm/telemetry/mod.js +1 -1
- package/esm/trellis.d.ts +62 -30
- package/esm/trellis.d.ts.map +1 -1
- package/esm/trellis.js +125 -42
- package/package.json +14 -2
- package/script/auth/mod.d.ts +1 -1
- package/script/auth/mod.d.ts.map +1 -1
- package/script/auth/mod.js +11 -4
- package/script/auth/protocol.d.ts +55 -0
- package/script/auth/protocol.d.ts.map +1 -1
- package/script/browser.d.ts +3 -3
- package/script/browser.d.ts.map +1 -1
- package/script/browser.js +3 -2
- package/script/client_connect.d.ts +12 -3
- package/script/client_connect.d.ts.map +1 -1
- package/script/client_connect.js +111 -6
- package/script/codec.d.ts +7 -6
- package/script/codec.d.ts.map +1 -1
- package/script/codec.js +124 -5
- package/script/contract_support/canonical.d.ts +3 -0
- package/script/contract_support/canonical.d.ts.map +1 -1
- package/script/contract_support/canonical.js +3 -0
- package/script/contract_support/mod.d.ts +125 -10
- package/script/contract_support/mod.d.ts.map +1 -1
- package/script/contract_support/mod.js +165 -5
- package/script/contract_support/protocol.d.ts +92 -7
- package/script/contract_support/protocol.d.ts.map +1 -1
- package/script/contract_support/protocol.js +42 -8
- package/script/contract_support/runtime.d.ts +4 -1
- package/script/contract_support/runtime.d.ts.map +1 -1
- package/script/errors/SchemaValidationError.d.ts +49 -0
- package/script/errors/SchemaValidationError.d.ts.map +1 -0
- package/script/errors/SchemaValidationError.js +74 -0
- package/script/errors/index.d.ts +38 -9
- package/script/errors/index.d.ts.map +1 -1
- package/script/errors/index.js +20 -1
- package/script/generated-sdk/auth/api.d.ts +33 -605
- package/script/generated-sdk/auth/api.d.ts.map +1 -1
- package/script/generated-sdk/auth/api.js +6 -1
- package/script/generated-sdk/auth/client.d.ts +129 -134
- package/script/generated-sdk/auth/client.d.ts.map +1 -1
- package/script/generated-sdk/auth/contract.d.ts +2 -601
- package/script/generated-sdk/auth/contract.d.ts.map +1 -1
- package/script/generated-sdk/auth/contract.js +310 -93
- package/script/generated-sdk/auth/mod.d.ts +1 -1
- package/script/generated-sdk/auth/mod.d.ts.map +1 -1
- package/script/generated-sdk/auth/owned_api.d.ts +88 -86
- package/script/generated-sdk/auth/owned_api.d.ts.map +1 -1
- package/script/generated-sdk/auth/owned_api.js +6 -0
- package/script/generated-sdk/auth/schemas.d.ts +284 -136
- package/script/generated-sdk/auth/schemas.d.ts.map +1 -1
- package/script/generated-sdk/auth/schemas.js +231 -92
- package/script/generated-sdk/auth/types.d.ts +565 -89
- package/script/generated-sdk/auth/types.d.ts.map +1 -1
- package/script/generated-sdk/auth/types.js +1 -1
- package/script/generated-sdk/health/api.d.ts +29 -18
- package/script/generated-sdk/health/api.d.ts.map +1 -1
- package/script/generated-sdk/health/client.d.ts +7 -21
- package/script/generated-sdk/health/client.d.ts.map +1 -1
- package/script/generated-sdk/health/contract.d.ts +2 -15
- package/script/generated-sdk/health/contract.d.ts.map +1 -1
- package/script/generated-sdk/health/contract.js +2 -10
- package/script/generated-sdk/health/mod.d.ts +1 -1
- package/script/generated-sdk/health/mod.d.ts.map +1 -1
- package/script/generated-sdk/health/owned_api.d.ts +2 -2
- package/script/generated-sdk/health/schemas.d.ts +1 -14
- package/script/generated-sdk/health/schemas.d.ts.map +1 -1
- package/script/generated-sdk/health/schemas.js +1 -9
- package/script/generated-sdk/health/types.d.ts +10 -5
- package/script/generated-sdk/health/types.d.ts.map +1 -1
- package/script/generated-sdk/health/types.js +1 -2
- package/script/generated-sdk/jobs/api.d.ts +29 -109
- package/script/generated-sdk/jobs/api.d.ts.map +1 -1
- package/script/generated-sdk/jobs/client.d.ts +21 -33
- package/script/generated-sdk/jobs/client.d.ts.map +1 -1
- package/script/generated-sdk/jobs/contract.d.ts +2 -106
- package/script/generated-sdk/jobs/contract.d.ts.map +1 -1
- package/script/generated-sdk/jobs/contract.js +268 -1
- package/script/generated-sdk/jobs/mod.d.ts +1 -1
- package/script/generated-sdk/jobs/mod.d.ts.map +1 -1
- package/script/generated-sdk/jobs/owned_api.d.ts +22 -9
- package/script/generated-sdk/jobs/owned_api.d.ts.map +1 -1
- package/script/generated-sdk/jobs/owned_api.js +19 -0
- package/script/generated-sdk/jobs/schemas.d.ts +437 -0
- package/script/generated-sdk/jobs/schemas.d.ts.map +1 -1
- package/script/generated-sdk/jobs/schemas.js +212 -1
- package/script/generated-sdk/jobs/types.d.ts +195 -12
- package/script/generated-sdk/jobs/types.d.ts.map +1 -1
- package/script/generated-sdk/jobs/types.js +1 -1
- package/script/generated-sdk/state/api.d.ts +29 -68
- package/script/generated-sdk/state/api.d.ts.map +1 -1
- package/script/generated-sdk/state/client.d.ts +17 -31
- package/script/generated-sdk/state/client.d.ts.map +1 -1
- package/script/generated-sdk/state/contract.d.ts +1 -64
- package/script/generated-sdk/state/contract.d.ts.map +1 -1
- package/script/generated-sdk/state/mod.d.ts +1 -1
- package/script/generated-sdk/state/mod.d.ts.map +1 -1
- package/script/generated-sdk/state/owned_api.d.ts +7 -7
- package/script/generated-sdk/state/types.d.ts +52 -9
- package/script/generated-sdk/state/types.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/api.d.ts +33 -45
- package/script/generated-sdk/trellis-core/api.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/api.js +6 -1
- package/script/generated-sdk/trellis-core/client.d.ts +31 -20
- package/script/generated-sdk/trellis-core/client.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/contract.d.ts +2 -41
- package/script/generated-sdk/trellis-core/contract.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/contract.js +91 -1
- package/script/generated-sdk/trellis-core/mod.d.ts +1 -1
- package/script/generated-sdk/trellis-core/mod.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/owned_api.d.ts +4 -4
- package/script/generated-sdk/trellis-core/schemas.d.ts +113 -0
- package/script/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/schemas.js +81 -0
- package/script/generated-sdk/trellis-core/types.d.ts +54 -7
- package/script/generated-sdk/trellis-core/types.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/types.js +1 -1
- package/script/health.d.ts +1 -1
- package/script/health.d.ts.map +1 -1
- package/script/health.js +1 -2
- package/script/index.d.ts +4 -4
- package/script/index.d.ts.map +1 -1
- package/script/index.js +2 -2
- package/script/jobs.d.ts +69 -3
- package/script/jobs.d.ts.map +1 -1
- package/script/jobs.js +93 -3
- package/script/server/health.d.ts +2 -6
- package/script/server/health.d.ts.map +1 -1
- package/script/server/health_schemas.d.ts +0 -8
- package/script/server/health_schemas.d.ts.map +1 -1
- package/script/server/health_schemas.js +1 -6
- package/script/server/internal_jobs/bindings.d.ts +11 -0
- package/script/server/internal_jobs/bindings.d.ts.map +1 -1
- package/script/server/internal_jobs/job-manager.d.ts +58 -2
- package/script/server/internal_jobs/job-manager.d.ts.map +1 -1
- package/script/server/internal_jobs/job-manager.js +429 -54
- package/script/server/internal_jobs/key-coordinator.d.ts +269 -0
- package/script/server/internal_jobs/key-coordinator.d.ts.map +1 -0
- package/script/server/internal_jobs/key-coordinator.js +690 -0
- package/script/server/internal_jobs/projection.d.ts.map +1 -1
- package/script/server/internal_jobs/projection.js +2 -0
- package/script/server/internal_jobs/runtime-worker.d.ts +5 -1
- package/script/server/internal_jobs/runtime-worker.d.ts.map +1 -1
- package/script/server/internal_jobs/runtime-worker.js +14 -2
- package/script/server/internal_jobs/types.d.ts +5 -5
- package/script/server/internal_jobs/types.d.ts.map +1 -1
- package/script/server/internal_jobs/types.js +6 -0
- package/script/server/runtime.d.ts.map +1 -1
- package/script/server/service.d.ts +81 -112
- package/script/server/service.d.ts.map +1 -1
- package/script/server/service.js +369 -127
- package/script/server.d.ts +3 -3
- package/script/server.d.ts.map +1 -1
- package/script/service/deno.d.ts +1 -1
- package/script/service/deno.d.ts.map +1 -1
- package/script/service/drizzle.d.ts +52 -0
- package/script/service/drizzle.d.ts.map +1 -0
- package/script/service/drizzle.js +113 -0
- package/script/service/mod.d.ts +3 -3
- package/script/service/mod.d.ts.map +1 -1
- package/script/service/mod.js +4 -3
- package/script/service/node.d.ts +1 -1
- package/script/service/node.d.ts.map +1 -1
- package/script/service/outbox_inbox.d.ts +76 -22
- package/script/service/outbox_inbox.d.ts.map +1 -1
- package/script/service/outbox_inbox.js +233 -70
- package/script/telemetry/metrics.d.ts +55 -0
- package/script/telemetry/metrics.d.ts.map +1 -1
- package/script/telemetry/metrics.js +88 -0
- package/script/telemetry/mod.d.ts +2 -1
- package/script/telemetry/mod.d.ts.map +1 -1
- package/script/telemetry/mod.js +3 -1
- package/script/trellis.d.ts +62 -30
- package/script/trellis.d.ts.map +1 -1
- package/script/trellis.js +124 -41
- package/src/auth/mod.ts +7 -0
- package/src/browser.ts +5 -7
- package/src/client_connect.ts +200 -12
- package/src/codec.ts +186 -11
- package/src/contract_support/canonical.ts +3 -0
- package/src/contract_support/mod.ts +380 -9
- package/src/contract_support/protocol.ts +57 -10
- package/src/contract_support/runtime.ts +7 -0
- package/src/errors/SchemaValidationError.ts +67 -0
- package/src/errors/index.ts +28 -0
- package/src/health.ts +0 -1
- package/src/index.ts +7 -8
- package/src/jobs.ts +138 -1
- package/src/sdk/_generated/auth/api.ts +38 -7
- package/src/sdk/_generated/auth/client.ts +168 -530
- package/src/sdk/_generated/auth/contract.ts +310 -93
- package/src/sdk/_generated/auth/mod.ts +0 -1
- package/src/sdk/_generated/auth/owned_api.ts +92 -86
- package/src/sdk/_generated/auth/schemas.ts +231 -92
- package/src/sdk/_generated/auth/types.ts +1069 -273
- package/src/sdk/_generated/core/api.ts +38 -7
- package/src/sdk/_generated/core/client.ts +47 -73
- package/src/sdk/_generated/core/contract.ts +91 -1
- package/src/sdk/_generated/core/mod.ts +0 -1
- package/src/sdk/_generated/core/owned_api.ts +4 -4
- package/src/sdk/_generated/core/schemas.ts +81 -0
- package/src/sdk/_generated/core/types.ts +79 -15
- package/src/sdk/_generated/health/api.ts +29 -5
- package/src/sdk/_generated/health/client.ts +11 -58
- package/src/sdk/_generated/health/contract.ts +2 -10
- package/src/sdk/_generated/health/mod.ts +0 -1
- package/src/sdk/_generated/health/owned_api.ts +2 -2
- package/src/sdk/_generated/health/schemas.ts +1 -9
- package/src/sdk/_generated/health/types.ts +23 -2
- package/src/sdk/_generated/jobs/api.ts +29 -5
- package/src/sdk/_generated/jobs/client.ts +25 -109
- package/src/sdk/_generated/jobs/contract.ts +269 -1
- package/src/sdk/_generated/jobs/mod.ts +0 -1
- package/src/sdk/_generated/jobs/owned_api.ts +30 -9
- package/src/sdk/_generated/jobs/schemas.ts +213 -0
- package/src/sdk/_generated/jobs/types.ts +252 -18
- package/src/sdk/_generated/state/api.ts +29 -5
- package/src/sdk/_generated/state/client.ts +18 -95
- package/src/sdk/_generated/state/mod.ts +0 -1
- package/src/sdk/_generated/state/owned_api.ts +7 -7
- package/src/sdk/_generated/state/types.ts +91 -15
- package/src/server/health.ts +2 -6
- package/src/server/health_schemas.ts +0 -6
- package/src/server/internal_jobs/bindings.ts +11 -0
- package/src/server/internal_jobs/job-manager.ts +553 -24
- package/src/server/internal_jobs/key-coordinator.ts +1080 -0
- package/src/server/internal_jobs/projection.ts +2 -0
- package/src/server/internal_jobs/runtime-worker.ts +17 -1
- package/src/server/internal_jobs/types.ts +6 -0
- package/src/server/runtime.ts +4 -0
- package/src/server/service.ts +645 -625
- package/src/server.ts +14 -7
- package/src/service/deno.ts +0 -5
- package/src/service/drizzle.ts +184 -0
- package/src/service/mod.ts +17 -7
- package/src/service/node.ts +0 -5
- package/src/service/outbox_inbox.ts +354 -88
- package/src/telemetry/metrics.ts +198 -1
- package/src/telemetry/mod.ts +6 -0
- package/src/trellis.ts +286 -105
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
// Generated from ./generated/contracts/manifests/trellis.core@v1.json
|
|
2
2
|
import { OWNED_API } from "./owned_api.js";
|
|
3
|
+
import { OWNED_API as HealthApi } from "../health/mod.js";
|
|
3
4
|
|
|
4
5
|
export { OWNED_API };
|
|
5
6
|
|
|
7
|
+
type __TrellisGeneratedOptionalOperationProgress<TDesc> = TDesc extends
|
|
8
|
+
{ progress: infer TProgress } ? { progress?: TProgress }
|
|
9
|
+
: { progress?: undefined };
|
|
10
|
+
type __TrellisGeneratedOptionalOperationOutput<TDesc> = TDesc extends
|
|
11
|
+
{ output: infer TOutput } ? { output?: TOutput }
|
|
12
|
+
: { output?: undefined };
|
|
13
|
+
type __TrellisGeneratedOptionalOperationIO<TDesc> = TDesc extends
|
|
14
|
+
{ input: infer TInput } ?
|
|
15
|
+
& Omit<TDesc, "input" | "progress" | "output">
|
|
16
|
+
& {
|
|
17
|
+
input: TInput;
|
|
18
|
+
}
|
|
19
|
+
& __TrellisGeneratedOptionalOperationProgress<TDesc>
|
|
20
|
+
& __TrellisGeneratedOptionalOperationOutput<TDesc>
|
|
21
|
+
: TDesc;
|
|
22
|
+
type __TrellisGeneratedOperationApi<TApi> = {
|
|
23
|
+
readonly [K in keyof TApi]: __TrellisGeneratedOptionalOperationIO<TApi[K]>;
|
|
24
|
+
};
|
|
25
|
+
|
|
6
26
|
export type UsedApi = {
|
|
7
27
|
rpc: {};
|
|
8
28
|
operations: {};
|
|
9
|
-
events: {
|
|
29
|
+
events: {
|
|
30
|
+
readonly "Health.Heartbeat": typeof HealthApi.events["Health.Heartbeat"];
|
|
31
|
+
};
|
|
10
32
|
feeds: {};
|
|
11
33
|
subjects: {};
|
|
12
34
|
};
|
|
@@ -14,12 +36,18 @@ export type UsedApi = {
|
|
|
14
36
|
export const USED_API: UsedApi = {
|
|
15
37
|
rpc: {},
|
|
16
38
|
operations: {},
|
|
17
|
-
events: {
|
|
39
|
+
events: {
|
|
40
|
+
get "Health.Heartbeat"() {
|
|
41
|
+
return HealthApi.events["Health.Heartbeat"];
|
|
42
|
+
},
|
|
43
|
+
},
|
|
18
44
|
feeds: {},
|
|
19
45
|
subjects: {},
|
|
20
46
|
};
|
|
21
47
|
|
|
22
|
-
export type OwnedApi = typeof OWNED_API
|
|
48
|
+
export type OwnedApi = Omit<typeof OWNED_API, "operations"> & {
|
|
49
|
+
operations: __TrellisGeneratedOperationApi<typeof OWNED_API["operations"]>;
|
|
50
|
+
};
|
|
23
51
|
export type Api = {
|
|
24
52
|
rpc: OwnedApi["rpc"] & UsedApi["rpc"];
|
|
25
53
|
operations: OwnedApi["operations"] & UsedApi["operations"];
|
|
@@ -28,9 +56,12 @@ export type Api = {
|
|
|
28
56
|
subjects: OwnedApi["subjects"] & UsedApi["subjects"];
|
|
29
57
|
};
|
|
30
58
|
|
|
31
|
-
export
|
|
59
|
+
export type ApiViews = {
|
|
60
|
+
owned: OwnedApi;
|
|
61
|
+
used: UsedApi;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const API: ApiViews = {
|
|
32
65
|
owned: OWNED_API,
|
|
33
66
|
used: USED_API,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export type ApiViews = typeof API;
|
|
67
|
+
};
|
|
@@ -15,13 +15,11 @@ import type {
|
|
|
15
15
|
OperationRef,
|
|
16
16
|
OperationRefData,
|
|
17
17
|
OperationRuntimeHandle,
|
|
18
|
-
OperationTransferHandle,
|
|
19
18
|
PreparedTrellisEvent,
|
|
20
19
|
ReceiveTransferGrant,
|
|
21
20
|
ReceiveTransferHandle,
|
|
22
21
|
RequestOpts,
|
|
23
22
|
Result,
|
|
24
|
-
RpcHandlerContext,
|
|
25
23
|
SendTransferGrant,
|
|
26
24
|
SendTransferHandle,
|
|
27
25
|
TerminalOperation,
|
|
@@ -33,8 +31,7 @@ import type {
|
|
|
33
31
|
} from "../../../index.js";
|
|
34
32
|
import type { API, Api } from "./api.js";
|
|
35
33
|
import type * as Types from "./types.js";
|
|
36
|
-
|
|
37
|
-
type WithDeps<TDeps> = [TDeps] extends [undefined] ? {} : { deps: TDeps };
|
|
34
|
+
import type * as HealthSdk from "../health/mod.js";
|
|
38
35
|
|
|
39
36
|
type EventCallback<TMessage> = {
|
|
40
37
|
bivarianceHack(
|
|
@@ -43,46 +40,10 @@ type EventCallback<TMessage> = {
|
|
|
43
40
|
): MaybeAsync<void, BaseError>;
|
|
44
41
|
}["bivarianceHack"];
|
|
45
42
|
|
|
46
|
-
type
|
|
47
|
-
args:
|
|
48
|
-
& { event: TEvent; context: EventListenerContext; client: HandlerClient }
|
|
49
|
-
& WithDeps<TDeps>,
|
|
43
|
+
type DependencyServiceEventHandler<TEvent> = (
|
|
44
|
+
args: { event: TEvent; context: EventListenerContext; client: HandlerClient },
|
|
50
45
|
) => MaybeAsync<void, BaseError>;
|
|
51
46
|
|
|
52
|
-
type RpcHandler<TInput, TOutput, TDeps = undefined> = (
|
|
53
|
-
args:
|
|
54
|
-
& { input: TInput; context: RpcHandlerContext; client: HandlerClient }
|
|
55
|
-
& WithDeps<TDeps>,
|
|
56
|
-
) => MaybeAsync<TOutput, BaseError>;
|
|
57
|
-
|
|
58
|
-
type FeedHandler<TInput, TEvent, TDeps = undefined> = (
|
|
59
|
-
context: {
|
|
60
|
-
input: TInput;
|
|
61
|
-
caller: unknown;
|
|
62
|
-
signal: AbortSignal;
|
|
63
|
-
emit(event: TEvent): AsyncResult<void, ValidationError | UnexpectedError>;
|
|
64
|
-
client: HandlerClient;
|
|
65
|
-
} & WithDeps<TDeps>,
|
|
66
|
-
) => unknown | Promise<unknown>;
|
|
67
|
-
|
|
68
|
-
type OperationHandler<
|
|
69
|
-
TInput,
|
|
70
|
-
TProgress,
|
|
71
|
-
TOutput,
|
|
72
|
-
TTransfer,
|
|
73
|
-
TDeps = undefined,
|
|
74
|
-
> = (
|
|
75
|
-
context:
|
|
76
|
-
& {
|
|
77
|
-
input: TInput;
|
|
78
|
-
op: OperationRuntimeHandle<TProgress, TOutput>;
|
|
79
|
-
caller: unknown;
|
|
80
|
-
client: HandlerClient;
|
|
81
|
-
}
|
|
82
|
-
& TTransfer
|
|
83
|
-
& WithDeps<TDeps>,
|
|
84
|
-
) => unknown | Promise<unknown>;
|
|
85
|
-
|
|
86
47
|
export type TrellisCoreState = {};
|
|
87
48
|
|
|
88
49
|
export interface TrellisCoreClient {
|
|
@@ -110,7 +71,26 @@ export interface TrellisCoreClient {
|
|
|
110
71
|
): AsyncResult<Types.TrellisSurfaceStatusOutput, BaseError>;
|
|
111
72
|
};
|
|
112
73
|
};
|
|
113
|
-
readonly event: {
|
|
74
|
+
readonly event: {
|
|
75
|
+
readonly health: {
|
|
76
|
+
heartbeat: {
|
|
77
|
+
publish(
|
|
78
|
+
event: HealthSdk.HealthHeartbeatEvent,
|
|
79
|
+
): AsyncResult<void, ValidationError | UnexpectedError>;
|
|
80
|
+
prepare(
|
|
81
|
+
event: HealthSdk.HealthHeartbeatEvent,
|
|
82
|
+
): Result<
|
|
83
|
+
PreparedTrellisEvent<HealthSdk.HealthHeartbeatEvent>,
|
|
84
|
+
ValidationError | UnexpectedError
|
|
85
|
+
>;
|
|
86
|
+
listen(
|
|
87
|
+
handler: EventCallback<HealthSdk.HealthHeartbeatEvent>,
|
|
88
|
+
subjectData?: Record<string, unknown>,
|
|
89
|
+
opts?: EventOpts,
|
|
90
|
+
): AsyncResult<void, ValidationError | UnexpectedError>;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
114
94
|
readonly feed: {};
|
|
115
95
|
readonly operation: {};
|
|
116
96
|
wait(): AsyncResult<void, BaseError>;
|
|
@@ -118,41 +98,35 @@ export interface TrellisCoreClient {
|
|
|
118
98
|
|
|
119
99
|
export interface Service extends TrellisCoreClient {
|
|
120
100
|
readonly handle: ServiceHandle;
|
|
121
|
-
with<TDeps>(deps: TDeps): ServiceWithDeps<TDeps>;
|
|
122
101
|
}
|
|
123
102
|
|
|
124
|
-
export
|
|
125
|
-
readonly
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
103
|
+
export interface ServiceEventSurface {
|
|
104
|
+
readonly health: {
|
|
105
|
+
heartbeat: {
|
|
106
|
+
publish(
|
|
107
|
+
event: HealthSdk.HealthHeartbeatEvent,
|
|
108
|
+
): AsyncResult<void, ValidationError | UnexpectedError>;
|
|
109
|
+
prepare(
|
|
110
|
+
event: HealthSdk.HealthHeartbeatEvent,
|
|
111
|
+
): Result<
|
|
112
|
+
PreparedTrellisEvent<HealthSdk.HealthHeartbeatEvent>,
|
|
113
|
+
ValidationError | UnexpectedError
|
|
114
|
+
>;
|
|
115
|
+
listen(
|
|
116
|
+
handler: DependencyServiceEventHandler<HealthSdk.HealthHeartbeatEvent>,
|
|
117
|
+
subjectData?: Record<string, unknown>,
|
|
118
|
+
opts?: EventOpts,
|
|
119
|
+
): AsyncResult<void, ValidationError | UnexpectedError>;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
}
|
|
131
123
|
|
|
132
|
-
export interface ServiceHandle
|
|
124
|
+
export interface ServiceHandle {
|
|
133
125
|
readonly rpc: {
|
|
134
126
|
readonly trellis: {
|
|
135
|
-
catalog(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
Types.TrellisCatalogOutput,
|
|
139
|
-
TDeps
|
|
140
|
-
>,
|
|
141
|
-
): Promise<void>;
|
|
142
|
-
contractGet(
|
|
143
|
-
handler: RpcHandler<
|
|
144
|
-
Types.TrellisContractGetInput,
|
|
145
|
-
Types.TrellisContractGetOutput,
|
|
146
|
-
TDeps
|
|
147
|
-
>,
|
|
148
|
-
): Promise<void>;
|
|
149
|
-
surfaceStatus(
|
|
150
|
-
handler: RpcHandler<
|
|
151
|
-
Types.TrellisSurfaceStatusInput,
|
|
152
|
-
Types.TrellisSurfaceStatusOutput,
|
|
153
|
-
TDeps
|
|
154
|
-
>,
|
|
155
|
-
): Promise<void>;
|
|
127
|
+
catalog(handler: Types.TrellisCatalogHandler): Promise<void>;
|
|
128
|
+
contractGet(handler: Types.TrellisContractGetHandler): Promise<void>;
|
|
129
|
+
surfaceStatus(handler: Types.TrellisSurfaceStatusHandler): Promise<void>;
|
|
156
130
|
};
|
|
157
131
|
};
|
|
158
132
|
readonly feed: {};
|
|
@@ -13,7 +13,7 @@ const CONTRACT_MODULE_METADATA = Symbol.for(
|
|
|
13
13
|
|
|
14
14
|
export const CONTRACT_ID = "trellis.core@v1" as const;
|
|
15
15
|
export const CONTRACT_DIGEST =
|
|
16
|
-
"
|
|
16
|
+
"1vbZgyhBkgKDSkzqvkwItxObBfaLNdysxFBeTT-Ng2c" as const;
|
|
17
17
|
export const CONTRACT = {
|
|
18
18
|
"capabilities": {
|
|
19
19
|
"trellis.core::catalog.read": {
|
|
@@ -170,6 +170,41 @@ export const CONTRACT = {
|
|
|
170
170
|
"type": "integer",
|
|
171
171
|
},
|
|
172
172
|
"dlq": { "type": "boolean" },
|
|
173
|
+
"keyConcurrency": {
|
|
174
|
+
"properties": {
|
|
175
|
+
"heartbeatIntervalMs": {
|
|
176
|
+
"minimum": 1,
|
|
177
|
+
"type": "integer",
|
|
178
|
+
},
|
|
179
|
+
"heartbeatTtlMs": {
|
|
180
|
+
"minimum": 1,
|
|
181
|
+
"type": "integer",
|
|
182
|
+
},
|
|
183
|
+
"key": {
|
|
184
|
+
"items": { "minLength": 1, "type": "string" },
|
|
185
|
+
"minItems": 1,
|
|
186
|
+
"type": "array",
|
|
187
|
+
},
|
|
188
|
+
"maxActive": {
|
|
189
|
+
"minimum": 1,
|
|
190
|
+
"type": "integer",
|
|
191
|
+
},
|
|
192
|
+
"stalePolicy": {
|
|
193
|
+
"anyOf": [{
|
|
194
|
+
"const": "fail-stale",
|
|
195
|
+
"type": "string",
|
|
196
|
+
}, { "const": "block", "type": "string" }],
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
"required": [
|
|
200
|
+
"key",
|
|
201
|
+
"maxActive",
|
|
202
|
+
"heartbeatIntervalMs",
|
|
203
|
+
"heartbeatTtlMs",
|
|
204
|
+
"stalePolicy",
|
|
205
|
+
],
|
|
206
|
+
"type": "object",
|
|
207
|
+
},
|
|
173
208
|
"logs": { "type": "boolean" },
|
|
174
209
|
"maxDeliver": { "minimum": 1, "type": "integer" },
|
|
175
210
|
"payload": {
|
|
@@ -184,6 +219,26 @@ export const CONTRACT = {
|
|
|
184
219
|
"minLength": 1,
|
|
185
220
|
"type": "string",
|
|
186
221
|
},
|
|
222
|
+
"queue": {
|
|
223
|
+
"properties": {
|
|
224
|
+
"maxQueuedPerKey": {
|
|
225
|
+
"minimum": 0,
|
|
226
|
+
"type": "integer",
|
|
227
|
+
},
|
|
228
|
+
"whenFull": {
|
|
229
|
+
"anyOf": [
|
|
230
|
+
{ "const": "reject", "type": "string" },
|
|
231
|
+
{ "const": "coalesce", "type": "string" },
|
|
232
|
+
{
|
|
233
|
+
"const": "replace-oldest",
|
|
234
|
+
"type": "string",
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
"required": ["maxQueuedPerKey", "whenFull"],
|
|
240
|
+
"type": "object",
|
|
241
|
+
},
|
|
187
242
|
"queueType": { "minLength": 1, "type": "string" },
|
|
188
243
|
"result": {
|
|
189
244
|
"properties": {
|
|
@@ -478,6 +533,29 @@ export const CONTRACT = {
|
|
|
478
533
|
"required": ["markdown"],
|
|
479
534
|
"type": "object",
|
|
480
535
|
},
|
|
536
|
+
"keyConcurrency": {
|
|
537
|
+
"properties": {
|
|
538
|
+
"heartbeatIntervalMs": {
|
|
539
|
+
"minimum": 1,
|
|
540
|
+
"type": "integer",
|
|
541
|
+
},
|
|
542
|
+
"heartbeatTtlMs": { "minimum": 1, "type": "integer" },
|
|
543
|
+
"key": {
|
|
544
|
+
"items": { "minLength": 1, "type": "string" },
|
|
545
|
+
"minItems": 1,
|
|
546
|
+
"type": "array",
|
|
547
|
+
},
|
|
548
|
+
"maxActive": { "minimum": 1, "type": "integer" },
|
|
549
|
+
"stalePolicy": {
|
|
550
|
+
"anyOf": [
|
|
551
|
+
{ "const": "fail-stale", "type": "string" },
|
|
552
|
+
{ "const": "block", "type": "string" },
|
|
553
|
+
],
|
|
554
|
+
},
|
|
555
|
+
},
|
|
556
|
+
"required": ["key"],
|
|
557
|
+
"type": "object",
|
|
558
|
+
},
|
|
481
559
|
"logs": { "type": "boolean" },
|
|
482
560
|
"maxDeliver": { "minimum": 1, "type": "integer" },
|
|
483
561
|
"payload": {
|
|
@@ -488,6 +566,18 @@ export const CONTRACT = {
|
|
|
488
566
|
"type": "object",
|
|
489
567
|
},
|
|
490
568
|
"progress": { "type": "boolean" },
|
|
569
|
+
"queue": {
|
|
570
|
+
"properties": {
|
|
571
|
+
"maxQueuedPerKey": { "minimum": 0, "type": "integer" },
|
|
572
|
+
"whenFull": {
|
|
573
|
+
"anyOf": [{ "const": "reject", "type": "string" }, {
|
|
574
|
+
"const": "coalesce",
|
|
575
|
+
"type": "string",
|
|
576
|
+
}, { "const": "replace-oldest", "type": "string" }],
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
"type": "object",
|
|
580
|
+
},
|
|
491
581
|
"result": {
|
|
492
582
|
"properties": {
|
|
493
583
|
"schema": { "minLength": 1, "type": "string" },
|
|
@@ -23,7 +23,7 @@ export const OWNED_API = {
|
|
|
23
23
|
output: schema<Types.TrellisBindingsGetOutput>(
|
|
24
24
|
TrellisBindingsGetResponseSchema,
|
|
25
25
|
),
|
|
26
|
-
callerCapabilities: ["service"],
|
|
26
|
+
callerCapabilities: ["service"] as const,
|
|
27
27
|
errors: ["UnexpectedError", "ValidationError"] as const,
|
|
28
28
|
declaredErrorTypes: ["UnexpectedError", "ValidationError"] as const,
|
|
29
29
|
},
|
|
@@ -31,7 +31,7 @@ export const OWNED_API = {
|
|
|
31
31
|
subject: "rpc.v1.Trellis.Catalog",
|
|
32
32
|
input: schema<Types.TrellisCatalogInput>(TrellisCatalogRequestSchema),
|
|
33
33
|
output: schema<Types.TrellisCatalogOutput>(TrellisCatalogResponseSchema),
|
|
34
|
-
callerCapabilities: ["trellis.core::catalog.read"],
|
|
34
|
+
callerCapabilities: ["trellis.core::catalog.read"] as const,
|
|
35
35
|
errors: ["UnexpectedError", "ValidationError"] as const,
|
|
36
36
|
declaredErrorTypes: ["UnexpectedError", "ValidationError"] as const,
|
|
37
37
|
},
|
|
@@ -43,7 +43,7 @@ export const OWNED_API = {
|
|
|
43
43
|
output: schema<Types.TrellisContractGetOutput>(
|
|
44
44
|
TrellisContractGetResponseSchema,
|
|
45
45
|
),
|
|
46
|
-
callerCapabilities: ["trellis.core::contract.read"],
|
|
46
|
+
callerCapabilities: ["trellis.core::contract.read"] as const,
|
|
47
47
|
errors: ["UnexpectedError", "ValidationError"] as const,
|
|
48
48
|
declaredErrorTypes: ["UnexpectedError", "ValidationError"] as const,
|
|
49
49
|
},
|
|
@@ -55,7 +55,7 @@ export const OWNED_API = {
|
|
|
55
55
|
output: schema<Types.TrellisSurfaceStatusOutput>(
|
|
56
56
|
TrellisSurfaceStatusResponseSchema,
|
|
57
57
|
),
|
|
58
|
-
callerCapabilities: ["trellis.core::catalog.read"],
|
|
58
|
+
callerCapabilities: ["trellis.core::catalog.read"] as const,
|
|
59
59
|
errors: ["UnexpectedError", "ValidationError"] as const,
|
|
60
60
|
declaredErrorTypes: ["UnexpectedError", "ValidationError"] as const,
|
|
61
61
|
},
|
|
@@ -75,6 +75,38 @@ export const TrellisBindingsGetResponseSchema = {
|
|
|
75
75
|
"type": "integer",
|
|
76
76
|
},
|
|
77
77
|
"dlq": { "type": "boolean" },
|
|
78
|
+
"keyConcurrency": {
|
|
79
|
+
"properties": {
|
|
80
|
+
"heartbeatIntervalMs": {
|
|
81
|
+
"minimum": 1,
|
|
82
|
+
"type": "integer",
|
|
83
|
+
},
|
|
84
|
+
"heartbeatTtlMs": {
|
|
85
|
+
"minimum": 1,
|
|
86
|
+
"type": "integer",
|
|
87
|
+
},
|
|
88
|
+
"key": {
|
|
89
|
+
"items": { "minLength": 1, "type": "string" },
|
|
90
|
+
"minItems": 1,
|
|
91
|
+
"type": "array",
|
|
92
|
+
},
|
|
93
|
+
"maxActive": { "minimum": 1, "type": "integer" },
|
|
94
|
+
"stalePolicy": {
|
|
95
|
+
"anyOf": [{
|
|
96
|
+
"const": "fail-stale",
|
|
97
|
+
"type": "string",
|
|
98
|
+
}, { "const": "block", "type": "string" }],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
"required": [
|
|
102
|
+
"key",
|
|
103
|
+
"maxActive",
|
|
104
|
+
"heartbeatIntervalMs",
|
|
105
|
+
"heartbeatTtlMs",
|
|
106
|
+
"stalePolicy",
|
|
107
|
+
],
|
|
108
|
+
"type": "object",
|
|
109
|
+
},
|
|
78
110
|
"logs": { "type": "boolean" },
|
|
79
111
|
"maxDeliver": { "minimum": 1, "type": "integer" },
|
|
80
112
|
"payload": {
|
|
@@ -86,6 +118,23 @@ export const TrellisBindingsGetResponseSchema = {
|
|
|
86
118
|
},
|
|
87
119
|
"progress": { "type": "boolean" },
|
|
88
120
|
"publishPrefix": { "minLength": 1, "type": "string" },
|
|
121
|
+
"queue": {
|
|
122
|
+
"properties": {
|
|
123
|
+
"maxQueuedPerKey": {
|
|
124
|
+
"minimum": 0,
|
|
125
|
+
"type": "integer",
|
|
126
|
+
},
|
|
127
|
+
"whenFull": {
|
|
128
|
+
"anyOf": [
|
|
129
|
+
{ "const": "reject", "type": "string" },
|
|
130
|
+
{ "const": "coalesce", "type": "string" },
|
|
131
|
+
{ "const": "replace-oldest", "type": "string" },
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
"required": ["maxQueuedPerKey", "whenFull"],
|
|
136
|
+
"type": "object",
|
|
137
|
+
},
|
|
89
138
|
"queueType": { "minLength": 1, "type": "string" },
|
|
90
139
|
"result": {
|
|
91
140
|
"properties": {
|
|
@@ -381,6 +430,26 @@ export const TrellisContractGetResponseSchema = {
|
|
|
381
430
|
"required": ["markdown"],
|
|
382
431
|
"type": "object",
|
|
383
432
|
},
|
|
433
|
+
"keyConcurrency": {
|
|
434
|
+
"properties": {
|
|
435
|
+
"heartbeatIntervalMs": { "minimum": 1, "type": "integer" },
|
|
436
|
+
"heartbeatTtlMs": { "minimum": 1, "type": "integer" },
|
|
437
|
+
"key": {
|
|
438
|
+
"items": { "minLength": 1, "type": "string" },
|
|
439
|
+
"minItems": 1,
|
|
440
|
+
"type": "array",
|
|
441
|
+
},
|
|
442
|
+
"maxActive": { "minimum": 1, "type": "integer" },
|
|
443
|
+
"stalePolicy": {
|
|
444
|
+
"anyOf": [{ "const": "fail-stale", "type": "string" }, {
|
|
445
|
+
"const": "block",
|
|
446
|
+
"type": "string",
|
|
447
|
+
}],
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
"required": ["key"],
|
|
451
|
+
"type": "object",
|
|
452
|
+
},
|
|
384
453
|
"logs": { "type": "boolean" },
|
|
385
454
|
"maxDeliver": { "minimum": 1, "type": "integer" },
|
|
386
455
|
"payload": {
|
|
@@ -391,6 +460,18 @@ export const TrellisContractGetResponseSchema = {
|
|
|
391
460
|
"type": "object",
|
|
392
461
|
},
|
|
393
462
|
"progress": { "type": "boolean" },
|
|
463
|
+
"queue": {
|
|
464
|
+
"properties": {
|
|
465
|
+
"maxQueuedPerKey": { "minimum": 0, "type": "integer" },
|
|
466
|
+
"whenFull": {
|
|
467
|
+
"anyOf": [{ "const": "reject", "type": "string" }, {
|
|
468
|
+
"const": "coalesce",
|
|
469
|
+
"type": "string",
|
|
470
|
+
}, { "const": "replace-oldest", "type": "string" }],
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
"type": "object",
|
|
474
|
+
},
|
|
394
475
|
"result": {
|
|
395
476
|
"properties": {
|
|
396
477
|
"schema": { "minLength": 1, "type": "string" },
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
// Generated from ./generated/contracts/manifests/trellis.core@v1.json
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type {
|
|
3
|
+
HandlerTrellis,
|
|
4
|
+
Result,
|
|
5
|
+
RpcHandlerContext,
|
|
6
|
+
TrellisErrorInstance,
|
|
7
|
+
} from "../../../index.js";
|
|
8
|
+
|
|
9
|
+
import type { Api } from "./api.js";
|
|
10
|
+
|
|
11
|
+
export type HandlerClient = HandlerTrellis<Api>;
|
|
4
12
|
|
|
5
13
|
export const CONTRACT_ID = "trellis.core@v1" as const;
|
|
6
14
|
export const CONTRACT_DIGEST =
|
|
7
|
-
"
|
|
15
|
+
"1vbZgyhBkgKDSkzqvkwItxObBfaLNdysxFBeTT-Ng2c" as const;
|
|
8
16
|
|
|
9
17
|
export type TrellisBindingsGetInput = { contractId?: string; digest?: string };
|
|
10
18
|
export type TrellisBindingsGetOutput = {
|
|
@@ -35,11 +43,22 @@ export type TrellisBindingsGetOutput = {
|
|
|
35
43
|
consumerName: string;
|
|
36
44
|
defaultDeadlineMs?: number;
|
|
37
45
|
dlq: boolean;
|
|
46
|
+
keyConcurrency?: {
|
|
47
|
+
heartbeatIntervalMs: number;
|
|
48
|
+
heartbeatTtlMs: number;
|
|
49
|
+
key: Array<string>;
|
|
50
|
+
maxActive: number;
|
|
51
|
+
stalePolicy: "fail-stale" | "block";
|
|
52
|
+
};
|
|
38
53
|
logs: boolean;
|
|
39
54
|
maxDeliver: number;
|
|
40
55
|
payload: { schema: string };
|
|
41
56
|
progress: boolean;
|
|
42
57
|
publishPrefix: string;
|
|
58
|
+
queue?: {
|
|
59
|
+
maxQueuedPerKey: number;
|
|
60
|
+
whenFull: "reject" | "coalesce" | "replace-oldest";
|
|
61
|
+
};
|
|
43
62
|
queueType: string;
|
|
44
63
|
result?: { schema: string };
|
|
45
64
|
workSubject: string;
|
|
@@ -138,10 +157,21 @@ export type TrellisContractGetOutput = {
|
|
|
138
157
|
defaultDeadlineMs?: number;
|
|
139
158
|
dlq?: boolean;
|
|
140
159
|
docs?: { markdown: string; summary?: string };
|
|
160
|
+
keyConcurrency?: {
|
|
161
|
+
heartbeatIntervalMs?: number;
|
|
162
|
+
heartbeatTtlMs?: number;
|
|
163
|
+
key: Array<string>;
|
|
164
|
+
maxActive?: number;
|
|
165
|
+
stalePolicy?: "fail-stale" | "block";
|
|
166
|
+
};
|
|
141
167
|
logs?: boolean;
|
|
142
168
|
maxDeliver?: number;
|
|
143
169
|
payload: { schema: string };
|
|
144
170
|
progress?: boolean;
|
|
171
|
+
queue?: {
|
|
172
|
+
maxQueuedPerKey?: number;
|
|
173
|
+
whenFull?: "reject" | "coalesce" | "replace-oldest";
|
|
174
|
+
};
|
|
145
175
|
result?: { schema: string };
|
|
146
176
|
};
|
|
147
177
|
};
|
|
@@ -228,22 +258,56 @@ export interface RpcMap {
|
|
|
228
258
|
};
|
|
229
259
|
}
|
|
230
260
|
|
|
231
|
-
export type
|
|
232
|
-
|
|
233
|
-
|
|
261
|
+
export type TrellisBindingsGetHandlerError = TrellisErrorInstance;
|
|
262
|
+
export type TrellisBindingsGetHandlerResult = Result<
|
|
263
|
+
TrellisBindingsGetOutput,
|
|
264
|
+
TrellisBindingsGetHandlerError
|
|
234
265
|
>;
|
|
235
|
-
export type
|
|
236
|
-
|
|
237
|
-
|
|
266
|
+
export type TrellisBindingsGetHandler = (
|
|
267
|
+
args: {
|
|
268
|
+
input: TrellisBindingsGetInput;
|
|
269
|
+
context: RpcHandlerContext;
|
|
270
|
+
client: HandlerClient;
|
|
271
|
+
},
|
|
272
|
+
) => TrellisBindingsGetHandlerResult | Promise<TrellisBindingsGetHandlerResult>;
|
|
273
|
+
export type TrellisCatalogHandlerError = TrellisErrorInstance;
|
|
274
|
+
export type TrellisCatalogHandlerResult = Result<
|
|
275
|
+
TrellisCatalogOutput,
|
|
276
|
+
TrellisCatalogHandlerError
|
|
238
277
|
>;
|
|
239
|
-
export type
|
|
240
|
-
|
|
241
|
-
|
|
278
|
+
export type TrellisCatalogHandler = (
|
|
279
|
+
args: {
|
|
280
|
+
input: TrellisCatalogInput;
|
|
281
|
+
context: RpcHandlerContext;
|
|
282
|
+
client: HandlerClient;
|
|
283
|
+
},
|
|
284
|
+
) => TrellisCatalogHandlerResult | Promise<TrellisCatalogHandlerResult>;
|
|
285
|
+
export type TrellisContractGetHandlerError = TrellisErrorInstance;
|
|
286
|
+
export type TrellisContractGetHandlerResult = Result<
|
|
287
|
+
TrellisContractGetOutput,
|
|
288
|
+
TrellisContractGetHandlerError
|
|
242
289
|
>;
|
|
243
|
-
export type
|
|
244
|
-
|
|
245
|
-
|
|
290
|
+
export type TrellisContractGetHandler = (
|
|
291
|
+
args: {
|
|
292
|
+
input: TrellisContractGetInput;
|
|
293
|
+
context: RpcHandlerContext;
|
|
294
|
+
client: HandlerClient;
|
|
295
|
+
},
|
|
296
|
+
) => TrellisContractGetHandlerResult | Promise<TrellisContractGetHandlerResult>;
|
|
297
|
+
export type TrellisSurfaceStatusHandlerError = TrellisErrorInstance;
|
|
298
|
+
export type TrellisSurfaceStatusHandlerResult = Result<
|
|
299
|
+
TrellisSurfaceStatusOutput,
|
|
300
|
+
TrellisSurfaceStatusHandlerError
|
|
246
301
|
>;
|
|
302
|
+
export type TrellisSurfaceStatusHandler = (
|
|
303
|
+
args: {
|
|
304
|
+
input: TrellisSurfaceStatusInput;
|
|
305
|
+
context: RpcHandlerContext;
|
|
306
|
+
client: HandlerClient;
|
|
307
|
+
},
|
|
308
|
+
) =>
|
|
309
|
+
| TrellisSurfaceStatusHandlerResult
|
|
310
|
+
| Promise<TrellisSurfaceStatusHandlerResult>;
|
|
247
311
|
|
|
248
312
|
export interface EventMap {
|
|
249
313
|
}
|