@jini-ai/integrations 0.3.6 → 0.4.0
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/CHANGELOG.md +84 -0
- package/README.md +72 -24
- package/dist/args.d.ts +8 -0
- package/dist/args.js +10 -0
- package/dist/argument-error.d.ts +9 -0
- package/dist/argument-error.js +7 -0
- package/dist/credentialed-http/auth-schemes.d.ts +29 -0
- package/dist/credentialed-http/auth-schemes.js +60 -0
- package/dist/credentialed-http/credentialed-request.d.ts +132 -0
- package/dist/credentialed-http/credentialed-request.js +365 -0
- package/dist/credentialed-http/index.d.ts +4 -0
- package/dist/credentialed-http/index.js +4 -0
- package/dist/credentialed-http/ports.d.ts +42 -0
- package/dist/credentialed-http/ports.js +2 -0
- package/dist/media-providers/capability-registry.d.ts +12 -4
- package/dist/media-providers/capability-registry.js +6 -6
- package/dist/media-providers/dispatch/async-operation-store.d.ts +25 -8
- package/dist/media-providers/dispatch/async-operation-store.js +12 -32
- package/dist/media-providers/dispatch/context.d.ts +7 -2
- package/dist/media-providers/dispatch/context.js +1 -1
- package/dist/media-providers/dispatch/credentials.d.ts +4 -1
- package/dist/media-providers/dispatch/credentials.js +1 -1
- package/dist/media-providers/dispatch/engine.d.ts +5 -2
- package/dist/media-providers/dispatch/engine.js +23 -15
- package/dist/media-providers/dispatch/index.d.ts +4 -1
- package/dist/media-providers/dispatch/index.js +4 -2
- package/dist/media-providers/dispatch/openai-compatible.d.ts +12 -2
- package/dist/media-providers/dispatch/openai-compatible.js +9 -5
- package/dist/media-providers/dispatch/operation-runtime.d.ts +16 -8
- package/dist/media-providers/dispatch/operation-runtime.js +93 -76
- package/dist/media-providers/dispatch/outbound.d.ts +31 -0
- package/dist/media-providers/dispatch/outbound.js +54 -0
- package/dist/media-providers/dispatch/polling-adapter.d.ts +26 -8
- package/dist/media-providers/dispatch/polling-adapter.js +2 -2
- package/dist/media-providers/dispatch/providers/aihubmix-shared.d.ts +2 -2
- package/dist/media-providers/dispatch/providers/aihubmix-shared.js +2 -2
- package/dist/media-providers/dispatch/providers/aihubmix.d.ts +8 -2
- package/dist/media-providers/dispatch/providers/aihubmix.js +15 -15
- package/dist/media-providers/dispatch/providers/custom-image.d.ts +11 -2
- package/dist/media-providers/dispatch/providers/custom-image.js +9 -8
- package/dist/media-providers/dispatch/providers/elevenlabs.d.ts +8 -2
- package/dist/media-providers/dispatch/providers/elevenlabs.js +13 -13
- package/dist/media-providers/dispatch/providers/fishaudio.d.ts +4 -1
- package/dist/media-providers/dispatch/providers/fishaudio.js +7 -7
- package/dist/media-providers/dispatch/providers/grok.d.ts +11 -3
- package/dist/media-providers/dispatch/providers/grok.js +16 -16
- package/dist/media-providers/dispatch/providers/imagerouter-video-async.d.ts +1 -1
- package/dist/media-providers/dispatch/providers/imagerouter-video-async.js +23 -22
- package/dist/media-providers/dispatch/providers/imagerouter.d.ts +12 -3
- package/dist/media-providers/dispatch/providers/imagerouter.js +18 -18
- package/dist/media-providers/dispatch/providers/minimax.d.ts +4 -1
- package/dist/media-providers/dispatch/providers/minimax.js +6 -6
- package/dist/media-providers/dispatch/providers/nanobanana.d.ts +4 -1
- package/dist/media-providers/dispatch/providers/nanobanana.js +7 -7
- package/dist/media-providers/dispatch/providers/openai.d.ts +8 -2
- package/dist/media-providers/dispatch/providers/openai.js +20 -27
- package/dist/media-providers/dispatch/providers/openrouter.d.ts +7 -2
- package/dist/media-providers/dispatch/providers/openrouter.js +11 -11
- package/dist/media-providers/dispatch/providers/senseaudio.d.ts +8 -2
- package/dist/media-providers/dispatch/providers/senseaudio.js +13 -13
- package/dist/media-providers/dispatch/providers/volcengine.d.ts +4 -1
- package/dist/media-providers/dispatch/providers/volcengine.js +8 -8
- package/dist/media-providers/dispatch/response-parsers.d.ts +21 -7
- package/dist/media-providers/dispatch/response-parsers.js +15 -11
- package/dist/media-providers/dispatch/sqlite-async-operation-store.d.ts +3 -1
- package/dist/media-providers/dispatch/sqlite-async-operation-store.js +30 -28
- package/dist/media-providers/dispatch/ssrf-guard.d.ts +27 -14
- package/dist/media-providers/dispatch/ssrf-guard.js +46 -105
- package/dist/media-providers/dispatch/stub.d.ts +7 -2
- package/dist/media-providers/dispatch/stub.js +4 -3
- package/dist/media-providers/dispatch/types.d.ts +17 -13
- package/dist/media-providers/dispatch/vendor-adapter.d.ts +22 -5
- package/dist/media-providers/dispatch/vendor-adapter.js +13 -10
- package/dist/media-providers/dispatch/vendor-registry.d.ts +14 -4
- package/dist/media-providers/dispatch/vendor-registry.js +3 -3
- package/dist/media-providers/index.d.ts +1 -1
- package/dist/media-providers/index.js +1 -1
- package/dist/media-providers/policy.d.ts +3 -2
- package/dist/media-providers/policy.js +4 -2
- package/dist/media-providers/providers.d.ts +12 -4
- package/dist/media-providers/providers.js +3 -3
- package/dist/media-providers/staging.d.ts +8 -2
- package/dist/media-providers/staging.js +13 -4
- package/dist/media-providers/task-store.d.ts +2 -2
- package/dist/media-providers/task-store.js +2 -2
- package/dist/media-providers/tokens.js +3 -3
- package/dist/media-providers/types.d.ts +4 -4
- package/dist/media-providers/types.js +1 -1
- package/dist/media-providers/video-request.d.ts +32 -9
- package/dist/media-providers/video-request.js +15 -15
- package/dist/webhooks/delivery.d.ts +76 -0
- package/dist/webhooks/delivery.js +222 -0
- package/dist/webhooks/index.d.ts +7 -0
- package/dist/webhooks/index.js +7 -0
- package/dist/webhooks/ports.d.ts +113 -0
- package/dist/webhooks/ports.js +2 -0
- package/dist/webhooks/signing.d.ts +38 -0
- package/dist/webhooks/signing.js +83 -0
- package/dist/webhooks/signing.keyring.d.ts +8 -0
- package/dist/webhooks/signing.keyring.js +18 -0
- package/dist/webhooks/subscriptions.d.ts +78 -0
- package/dist/webhooks/subscriptions.js +139 -0
- package/dist/webhooks/types.d.ts +103 -0
- package/dist/webhooks/types.js +2 -0
- package/package.json +29 -18
- package/dist/composio/bounded-data.d.ts.map +0 -1
- package/dist/composio/bounded-data.js.map +0 -1
- package/dist/composio/catalog.d.ts.map +0 -1
- package/dist/composio/catalog.js.map +0 -1
- package/dist/composio/composio-config.d.ts.map +0 -1
- package/dist/composio/composio-config.js.map +0 -1
- package/dist/composio/composio-descriptions.d.ts.map +0 -1
- package/dist/composio/composio-descriptions.js.map +0 -1
- package/dist/composio/composio.d.ts.map +0 -1
- package/dist/composio/composio.js.map +0 -1
- package/dist/composio/errors.d.ts.map +0 -1
- package/dist/composio/errors.js.map +0 -1
- package/dist/composio/file-lock.d.ts.map +0 -1
- package/dist/composio/file-lock.js.map +0 -1
- package/dist/composio/index.d.ts.map +0 -1
- package/dist/composio/index.js.map +0 -1
- package/dist/composio/json-schema.d.ts.map +0 -1
- package/dist/composio/json-schema.js.map +0 -1
- package/dist/composio/output-protection.d.ts.map +0 -1
- package/dist/composio/output-protection.js.map +0 -1
- package/dist/composio/service.d.ts.map +0 -1
- package/dist/composio/service.js.map +0 -1
- package/dist/media-providers/capability-registry.d.ts.map +0 -1
- package/dist/media-providers/capability-registry.js.map +0 -1
- package/dist/media-providers/catalog.d.ts.map +0 -1
- package/dist/media-providers/catalog.js.map +0 -1
- package/dist/media-providers/dispatch/async-operation-store.d.ts.map +0 -1
- package/dist/media-providers/dispatch/async-operation-store.js.map +0 -1
- package/dist/media-providers/dispatch/context.d.ts.map +0 -1
- package/dist/media-providers/dispatch/context.js.map +0 -1
- package/dist/media-providers/dispatch/credentials.d.ts.map +0 -1
- package/dist/media-providers/dispatch/credentials.js.map +0 -1
- package/dist/media-providers/dispatch/engine.d.ts.map +0 -1
- package/dist/media-providers/dispatch/engine.js.map +0 -1
- package/dist/media-providers/dispatch/index.d.ts.map +0 -1
- package/dist/media-providers/dispatch/index.js.map +0 -1
- package/dist/media-providers/dispatch/openai-compatible.d.ts.map +0 -1
- package/dist/media-providers/dispatch/openai-compatible.js.map +0 -1
- package/dist/media-providers/dispatch/operation-runtime.d.ts.map +0 -1
- package/dist/media-providers/dispatch/operation-runtime.js.map +0 -1
- package/dist/media-providers/dispatch/polling-adapter.d.ts.map +0 -1
- package/dist/media-providers/dispatch/polling-adapter.js.map +0 -1
- package/dist/media-providers/dispatch/providers/aihubmix-shared.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/aihubmix-shared.js.map +0 -1
- package/dist/media-providers/dispatch/providers/aihubmix.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/aihubmix.js.map +0 -1
- package/dist/media-providers/dispatch/providers/custom-image.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/custom-image.js.map +0 -1
- package/dist/media-providers/dispatch/providers/elevenlabs.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/elevenlabs.js.map +0 -1
- package/dist/media-providers/dispatch/providers/fishaudio.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/fishaudio.js.map +0 -1
- package/dist/media-providers/dispatch/providers/grok.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/grok.js.map +0 -1
- package/dist/media-providers/dispatch/providers/imagerouter-video-async.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/imagerouter-video-async.js.map +0 -1
- package/dist/media-providers/dispatch/providers/imagerouter.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/imagerouter.js.map +0 -1
- package/dist/media-providers/dispatch/providers/minimax.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/minimax.js.map +0 -1
- package/dist/media-providers/dispatch/providers/nanobanana.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/nanobanana.js.map +0 -1
- package/dist/media-providers/dispatch/providers/openai.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/openai.js.map +0 -1
- package/dist/media-providers/dispatch/providers/openrouter.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/openrouter.js.map +0 -1
- package/dist/media-providers/dispatch/providers/senseaudio.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/senseaudio.js.map +0 -1
- package/dist/media-providers/dispatch/providers/volcengine.d.ts.map +0 -1
- package/dist/media-providers/dispatch/providers/volcengine.js.map +0 -1
- package/dist/media-providers/dispatch/response-parsers.d.ts.map +0 -1
- package/dist/media-providers/dispatch/response-parsers.js.map +0 -1
- package/dist/media-providers/dispatch/sqlite-async-operation-store.d.ts.map +0 -1
- package/dist/media-providers/dispatch/sqlite-async-operation-store.js.map +0 -1
- package/dist/media-providers/dispatch/ssrf-guard.d.ts.map +0 -1
- package/dist/media-providers/dispatch/ssrf-guard.js.map +0 -1
- package/dist/media-providers/dispatch/stub.d.ts.map +0 -1
- package/dist/media-providers/dispatch/stub.js.map +0 -1
- package/dist/media-providers/dispatch/types.d.ts.map +0 -1
- package/dist/media-providers/dispatch/types.js.map +0 -1
- package/dist/media-providers/dispatch/vendor-adapter.d.ts.map +0 -1
- package/dist/media-providers/dispatch/vendor-adapter.js.map +0 -1
- package/dist/media-providers/dispatch/vendor-registry.d.ts.map +0 -1
- package/dist/media-providers/dispatch/vendor-registry.js.map +0 -1
- package/dist/media-providers/index.d.ts.map +0 -1
- package/dist/media-providers/index.js.map +0 -1
- package/dist/media-providers/policy.d.ts.map +0 -1
- package/dist/media-providers/policy.js.map +0 -1
- package/dist/media-providers/providers.d.ts.map +0 -1
- package/dist/media-providers/providers.js.map +0 -1
- package/dist/media-providers/seed.d.ts.map +0 -1
- package/dist/media-providers/seed.js.map +0 -1
- package/dist/media-providers/sqlite-task-store.d.ts.map +0 -1
- package/dist/media-providers/sqlite-task-store.js.map +0 -1
- package/dist/media-providers/staging.d.ts.map +0 -1
- package/dist/media-providers/staging.js.map +0 -1
- package/dist/media-providers/task-store.d.ts.map +0 -1
- package/dist/media-providers/task-store.js.map +0 -1
- package/dist/media-providers/tokens.d.ts.map +0 -1
- package/dist/media-providers/tokens.js.map +0 -1
- package/dist/media-providers/types.d.ts.map +0 -1
- package/dist/media-providers/types.js.map +0 -1
- package/dist/media-providers/video-request.d.ts.map +0 -1
- package/dist/media-providers/video-request.js.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RequiredArgs, OptionalArgs } from '../args.js';
|
|
1
2
|
/**
|
|
2
3
|
* `MediaPolicy` — a host-injected gate on media generation. Generalized from
|
|
3
4
|
* OD's `apps/daemon/src/media/policy.ts`, which is a thin wrapper
|
|
@@ -37,7 +38,7 @@ export declare const DEFAULT_MEDIA_EXECUTION_POLICY: MediaExecutionPolicy;
|
|
|
37
38
|
* dispatching generation and honors a non-null denial.
|
|
38
39
|
*/
|
|
39
40
|
export interface MediaPolicy {
|
|
40
|
-
evaluate(
|
|
41
|
+
evaluate(required: RequiredArgs<MediaPolicyTarget>, optional?: OptionalArgs<MediaPolicyTarget>): MediaPolicyDenial | null;
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
44
|
* Reference `MediaPolicy`: an enabled/disabled + surface/model allowlist
|
|
@@ -45,5 +46,5 @@ export interface MediaPolicy {
|
|
|
45
46
|
* missing/empty `allowedSurfaces`/`allowedModels` means "no restriction on
|
|
46
47
|
* that dimension" (matches the origin's `Array.isArray(...) && length > 0` guard).
|
|
47
48
|
*/
|
|
48
|
-
export declare function createAllowlistMediaPolicy(
|
|
49
|
+
export declare function createAllowlistMediaPolicy(_required: Record<string, never>, optional?: Partial<MediaExecutionPolicy>): MediaPolicy;
|
|
49
50
|
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -10,9 +10,11 @@ export const DEFAULT_MEDIA_EXECUTION_POLICY = { mode: 'disabled' };
|
|
|
10
10
|
* missing/empty `allowedSurfaces`/`allowedModels` means "no restriction on
|
|
11
11
|
* that dimension" (matches the origin's `Array.isArray(...) && length > 0` guard).
|
|
12
12
|
*/
|
|
13
|
-
export function createAllowlistMediaPolicy(
|
|
13
|
+
export function createAllowlistMediaPolicy(_required, optional = {}) {
|
|
14
|
+
const policy = { ...DEFAULT_MEDIA_EXECUTION_POLICY, ...optional };
|
|
14
15
|
return {
|
|
15
|
-
evaluate(
|
|
16
|
+
evaluate(required, optional = {}) {
|
|
17
|
+
const target = { ...required, ...optional };
|
|
16
18
|
if (policy.mode === 'disabled') {
|
|
17
19
|
return { code: 'MEDIA_EXECUTION_DISABLED', message: 'media generation is disabled for this run' };
|
|
18
20
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* `apps/daemon/src/media/models.ts`; every provider id/label/hint here names
|
|
5
5
|
* a real third-party vendor (OpenAI, Fal.ai, ElevenLabs, ...), not an OD
|
|
6
6
|
* concept, so per the AGENTS.md boundary rule (no product-identity strings)
|
|
7
|
-
* it ports as data. See `
|
|
7
|
+
* it ports as data. See `archived provenance ledger` for exactly what was dropped.
|
|
8
8
|
*/
|
|
9
9
|
import type { AudioKind, MediaModel, MediaProvider, MediaSurface } from './types.js';
|
|
10
10
|
export declare const MEDIA_PROVIDERS: readonly MediaProvider[];
|
|
@@ -15,11 +15,19 @@ export declare const MEDIA_ASPECTS: readonly string[];
|
|
|
15
15
|
export declare const VIDEO_LENGTHS_SEC: readonly number[];
|
|
16
16
|
export declare const AUDIO_DURATIONS_SEC: readonly number[];
|
|
17
17
|
/** Finds a model by id across every surface (image, video, and all three audio kinds). */
|
|
18
|
-
export declare function findMediaModel(id
|
|
18
|
+
export declare function findMediaModel({ id }: {
|
|
19
|
+
id: string;
|
|
20
|
+
}): MediaModel | null;
|
|
19
21
|
/** Finds a provider by id in `MEDIA_PROVIDERS`. */
|
|
20
|
-
export declare function findProvider(id
|
|
22
|
+
export declare function findProvider({ id }: {
|
|
23
|
+
id: string;
|
|
24
|
+
}): MediaProvider | null;
|
|
21
25
|
/** Returns the model list for a surface; `audioKind` selects which audio sub-list (defaults to `'music'`). */
|
|
22
|
-
export declare function modelsForSurface(surface
|
|
26
|
+
export declare function modelsForSurface({ surface }: {
|
|
27
|
+
surface: MediaSurface;
|
|
28
|
+
}, { audioKind }?: {
|
|
29
|
+
audioKind?: AudioKind | undefined;
|
|
30
|
+
}): readonly MediaModel[];
|
|
23
31
|
/**
|
|
24
32
|
* Standard (non-product-scoped) credential env var names each provider's own
|
|
25
33
|
* SDK/docs recognize, in priority order. De-branded from OD's
|
|
@@ -140,7 +140,7 @@ export const MEDIA_ASPECTS = ['1:1', '16:9', '9:16', '4:3', '3:4'];
|
|
|
140
140
|
export const VIDEO_LENGTHS_SEC = [3, 5, 8, 10, 15, 30];
|
|
141
141
|
export const AUDIO_DURATIONS_SEC = [5, 10, 15, 30, 60, 120];
|
|
142
142
|
/** Finds a model by id across every surface (image, video, and all three audio kinds). */
|
|
143
|
-
export function findMediaModel(id) {
|
|
143
|
+
export function findMediaModel({ id }) {
|
|
144
144
|
const all = [
|
|
145
145
|
...IMAGE_MODELS,
|
|
146
146
|
...VIDEO_MODELS,
|
|
@@ -151,11 +151,11 @@ export function findMediaModel(id) {
|
|
|
151
151
|
return all.find((m) => m.id === id) ?? null;
|
|
152
152
|
}
|
|
153
153
|
/** Finds a provider by id in `MEDIA_PROVIDERS`. */
|
|
154
|
-
export function findProvider(id) {
|
|
154
|
+
export function findProvider({ id }) {
|
|
155
155
|
return MEDIA_PROVIDERS.find((p) => p.id === id) ?? null;
|
|
156
156
|
}
|
|
157
157
|
/** Returns the model list for a surface; `audioKind` selects which audio sub-list (defaults to `'music'`). */
|
|
158
|
-
export function modelsForSurface(surface, audioKind) {
|
|
158
|
+
export function modelsForSurface({ surface }, { audioKind } = {}) {
|
|
159
159
|
if (surface === 'image')
|
|
160
160
|
return IMAGE_MODELS;
|
|
161
161
|
if (surface === 'video')
|
|
@@ -22,8 +22,14 @@ export interface AttachmentStagingOptions {
|
|
|
22
22
|
* prunes staged files older than `maxAgeMs` on each call.
|
|
23
23
|
*/
|
|
24
24
|
export interface AttachmentStaging {
|
|
25
|
-
stage(
|
|
25
|
+
stage(required: {
|
|
26
|
+
imagePaths: readonly string[];
|
|
27
|
+
}, optional?: {
|
|
28
|
+
uploadRoot?: string | null | undefined;
|
|
29
|
+
}): Promise<string[]>;
|
|
26
30
|
}
|
|
27
31
|
/** Creates a filesystem-backed `AttachmentStaging` rooted at `cwd`. */
|
|
28
|
-
export declare function createFsAttachmentStaging(cwd
|
|
32
|
+
export declare function createFsAttachmentStaging({ cwd }: {
|
|
33
|
+
cwd: string;
|
|
34
|
+
}, options?: AttachmentStagingOptions): AttachmentStaging;
|
|
29
35
|
//# sourceMappingURL=staging.d.ts.map
|
|
@@ -16,6 +16,10 @@ const DEFAULT_STAGING_DIRNAME = '.media-attachments';
|
|
|
16
16
|
const DEFAULT_MAX_AGE_MS = 24 * 60 * 60 * 1000;
|
|
17
17
|
const DEFAULT_MAX_ITEMS = 50;
|
|
18
18
|
const DEFAULT_MAX_BYTES_PER_FILE = 100 * 1024 * 1024;
|
|
19
|
+
// Authorization failures must escape the advisory-file catch below; otherwise
|
|
20
|
+
// a missing containment boundary looks like an ordinary missing attachment.
|
|
21
|
+
class MissingUploadRootError extends Error {
|
|
22
|
+
}
|
|
19
23
|
function isWithinRoot(root, candidate) {
|
|
20
24
|
const relativePath = path.relative(root, candidate);
|
|
21
25
|
return relativePath === '' || (relativePath.length > 0 && !relativePath.startsWith('..') && !path.isAbsolute(relativePath));
|
|
@@ -55,7 +59,7 @@ async function pruneStagedAttachments(stagingDir, maxAgeMs) {
|
|
|
55
59
|
}));
|
|
56
60
|
}
|
|
57
61
|
/** Creates a filesystem-backed `AttachmentStaging` rooted at `cwd`. */
|
|
58
|
-
export function createFsAttachmentStaging(cwd, options = {}) {
|
|
62
|
+
export function createFsAttachmentStaging({ cwd }, options = {}) {
|
|
59
63
|
const stagingDirName = options.stagingDirName ?? DEFAULT_STAGING_DIRNAME;
|
|
60
64
|
assertSafeStagingDirName(stagingDirName);
|
|
61
65
|
const maxAgeMs = options.maxAgeMs ?? DEFAULT_MAX_AGE_MS;
|
|
@@ -64,7 +68,7 @@ export function createFsAttachmentStaging(cwd, options = {}) {
|
|
|
64
68
|
const root = path.resolve(cwd);
|
|
65
69
|
const stagingDir = path.join(root, stagingDirName);
|
|
66
70
|
return {
|
|
67
|
-
async stage(imagePaths, uploadRoot) {
|
|
71
|
+
async stage({ imagePaths }, { uploadRoot } = {}) {
|
|
68
72
|
if (!Array.isArray(imagePaths) || imagePaths.length === 0)
|
|
69
73
|
return [];
|
|
70
74
|
if (imagePaths.length > maxItems) {
|
|
@@ -121,7 +125,10 @@ export function createFsAttachmentStaging(cwd, options = {}) {
|
|
|
121
125
|
}
|
|
122
126
|
// Outside cwd: this is the "copy an external file into staging"
|
|
123
127
|
// path, which requires an authorized uploadRoot — deny by default.
|
|
124
|
-
if (uploadRootReal == null
|
|
128
|
+
if (uploadRootReal == null) {
|
|
129
|
+
throw new MissingUploadRootError('attachment staging: files outside cwd require an uploadRoot');
|
|
130
|
+
}
|
|
131
|
+
if (!isWithinRoot(uploadRootReal, real))
|
|
125
132
|
continue;
|
|
126
133
|
if (stat.size > maxBytesPerFile)
|
|
127
134
|
continue;
|
|
@@ -130,7 +137,9 @@ export function createFsAttachmentStaging(cwd, options = {}) {
|
|
|
130
137
|
await fs.promises.copyFile(real, destination);
|
|
131
138
|
staged.push(destination);
|
|
132
139
|
}
|
|
133
|
-
catch {
|
|
140
|
+
catch (error) {
|
|
141
|
+
if (error instanceof MissingUploadRootError)
|
|
142
|
+
throw error;
|
|
134
143
|
// Ignore malformed or missing files; attachments are advisory input.
|
|
135
144
|
}
|
|
136
145
|
}
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* (queued → running → done|failed|interrupted, boot-time reconciliation of
|
|
12
12
|
* orphaned in-flight tasks, TTL-based terminal-task pruning) without a SQL
|
|
13
13
|
* schema or an OD project reference. A durable adapter (a future
|
|
14
|
-
* `@jini-ai/sqlite` addition) implements the same interface — see
|
|
15
|
-
* `
|
|
14
|
+
* `@jini-ai/sqlite-chat` addition) implements the same interface — see
|
|
15
|
+
* `archived provenance ledger`.
|
|
16
16
|
*/
|
|
17
17
|
export type MediaTaskStatus = 'queued' | 'running' | 'done' | 'failed' | 'interrupted';
|
|
18
18
|
export interface MediaTaskError {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* (queued → running → done|failed|interrupted, boot-time reconciliation of
|
|
12
12
|
* orphaned in-flight tasks, TTL-based terminal-task pruning) without a SQL
|
|
13
13
|
* schema or an OD project reference. A durable adapter (a future
|
|
14
|
-
* `@jini-ai/sqlite` addition) implements the same interface — see
|
|
15
|
-
* `
|
|
14
|
+
* `@jini-ai/sqlite-chat` addition) implements the same interface — see
|
|
15
|
+
* `archived provenance ledger`.
|
|
16
16
|
*/
|
|
17
17
|
const VALID_STATUSES = new Set([
|
|
18
18
|
'queued',
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* in this codebase's actual precedent).
|
|
8
8
|
*/
|
|
9
9
|
import { token } from '@jini-ai/core';
|
|
10
|
-
export const CapabilityRegistryToken = token('jini.media.capabilityRegistry');
|
|
11
|
-
export const MediaTaskStoreToken = token('jini.media.taskStore');
|
|
12
|
-
export const MediaPolicyToken = token('jini.media.policy');
|
|
10
|
+
export const CapabilityRegistryToken = token({ id: 'jini.media.capabilityRegistry' });
|
|
11
|
+
export const MediaTaskStoreToken = token({ id: 'jini.media.taskStore' });
|
|
12
|
+
export const MediaPolicyToken = token({ id: 'jini.media.policy' });
|
|
13
13
|
//# sourceMappingURL=tokens.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Ported from OD's `apps/daemon/src/media/models.ts` (catalogue
|
|
6
6
|
* shape) and `apps/daemon/src/media-adapters/types.ts` (capability +
|
|
7
|
-
* request-builder shape) — see `
|
|
7
|
+
* request-builder shape) — see `archived provenance ledger` for the full provenance.
|
|
8
8
|
* Neither origin file carries any OD domain noun; this is a product-neutral
|
|
9
9
|
* multi-vendor media-generation type system, not an OD concept.
|
|
10
10
|
*/
|
|
@@ -44,14 +44,14 @@ export interface MediaModel {
|
|
|
44
44
|
readonly label: string;
|
|
45
45
|
readonly hint: string;
|
|
46
46
|
readonly provider: string;
|
|
47
|
-
/** Capability tags, e.g. `t2i`/`i2i`/`inpaint`/`t2v`/`i2v`/`tts`. Open-ended by design — see `
|
|
47
|
+
/** Capability tags, e.g. `t2i`/`i2i`/`inpaint`/`t2v`/`i2v`/`tts`. Open-ended by design — see `archived provenance ledger`. */
|
|
48
48
|
readonly caps: readonly string[];
|
|
49
49
|
readonly default?: boolean;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Request-shape family, keyed off the resolved upstream model name. Each
|
|
53
53
|
* family is a distinct wire shape a real vendor gateway expects — see
|
|
54
|
-
* `video-request.ts` for the branching logic and `
|
|
54
|
+
* `video-request.ts` for the branching logic and `archived provenance ledger` for the
|
|
55
55
|
* vendor-verification notes this was ported with.
|
|
56
56
|
*/
|
|
57
57
|
export type MediaFamily = 'seedance' | 'wan' | 'veo' | 'generic';
|
|
@@ -67,7 +67,7 @@ export interface ExtraBodyParamDef {
|
|
|
67
67
|
* Per-model capability description — the data a `CapabilityRegistry` holds.
|
|
68
68
|
* Field names deliberately align with OpenRouter's `GET /api/v1/videos/models`
|
|
69
69
|
* shape so a future remote-fetched catalogue is a data-source swap, not a
|
|
70
|
-
* reshape (see `
|
|
70
|
+
* reshape (see `archived provenance ledger`).
|
|
71
71
|
*/
|
|
72
72
|
export interface ModelCapability {
|
|
73
73
|
/** Catalogue id (vendor-aggregator prefixes stripped — see `normalizeModelId`). */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Ported from OD's `apps/daemon/src/media/models.ts` (catalogue
|
|
6
6
|
* shape) and `apps/daemon/src/media-adapters/types.ts` (capability +
|
|
7
|
-
* request-builder shape) — see `
|
|
7
|
+
* request-builder shape) — see `archived provenance ledger` for the full provenance.
|
|
8
8
|
* Neither origin file carries any OD domain noun; this is a product-neutral
|
|
9
9
|
* multi-vendor media-generation type system, not an OD concept.
|
|
10
10
|
*/
|
|
@@ -14,21 +14,31 @@
|
|
|
14
14
|
* `seconds` MUST be a number and the only size hint is `size`.
|
|
15
15
|
* • `generic` (Sora and similar) — flat JSON with `seconds` as a string.
|
|
16
16
|
*
|
|
17
|
-
* See `
|
|
17
|
+
* See `archived provenance ledger` for the vendor-verification notes each snapping
|
|
18
18
|
* function was ported with — they encode real, tested API quirks, not
|
|
19
19
|
* arbitrary defaults.
|
|
20
20
|
*/
|
|
21
21
|
import type { BuiltVideoRequest, MediaFamily, ModelCapability, NormalizedVideoResponse, VideoBuildInput } from './types.js';
|
|
22
22
|
/** Resolves the upstream model name: the i2v variant when a reference image is present. */
|
|
23
|
-
export declare function resolveWireModel(cap
|
|
23
|
+
export declare function resolveWireModel({ cap, hasReference }: {
|
|
24
|
+
cap: ModelCapability;
|
|
25
|
+
hasReference: boolean;
|
|
26
|
+
}): string;
|
|
24
27
|
/** Derives the request family from the resolved upstream model name (or an explicit `cap.family` override). */
|
|
25
|
-
export declare function deriveVideoFamily(wireModel
|
|
28
|
+
export declare function deriveVideoFamily({ wireModel }: {
|
|
29
|
+
wireModel: string;
|
|
30
|
+
}, { cap }?: {
|
|
31
|
+
cap?: ModelCapability | undefined;
|
|
32
|
+
}): MediaFamily;
|
|
26
33
|
/**
|
|
27
34
|
* Snaps a requested duration to the model's allowed set (e.g. Veo 4/6/8, wan
|
|
28
35
|
* 5/10). Falls back to a 3-12 clamp when the model declares no constraint.
|
|
29
36
|
* Ties prefer the shorter value (array order wins on an exact tie distance).
|
|
30
37
|
*/
|
|
31
|
-
export declare function snapDuration(cap
|
|
38
|
+
export declare function snapDuration({ cap, requested }: {
|
|
39
|
+
cap: ModelCapability;
|
|
40
|
+
requested: number | undefined;
|
|
41
|
+
}): number;
|
|
32
42
|
/**
|
|
33
43
|
* Seedance and wan accept resolution only as a quality token
|
|
34
44
|
* (`480p`/`720p`/`1080p`), never a `WxH` pixel string. Normalizes whichever
|
|
@@ -36,27 +46,40 @@ export declare function snapDuration(cap: ModelCapability, requested: number | u
|
|
|
36
46
|
* (720→720p, 1080→1080p, ...); defaults to `720p` when nothing usable is
|
|
37
47
|
* supplied. (The `wan` family upper-cases the result itself.)
|
|
38
48
|
*/
|
|
39
|
-
export declare function snapResolutionToken(resolution
|
|
49
|
+
export declare function snapResolutionToken({ resolution, size }: {
|
|
50
|
+
resolution: string | undefined;
|
|
51
|
+
size: string | undefined;
|
|
52
|
+
}): string;
|
|
40
53
|
/**
|
|
41
54
|
* Veo (via the verified gateway's Gemini predictLongRunning shim) only
|
|
42
55
|
* accepts a handful of `size` values — anything mapping outside 720p/1080p
|
|
43
56
|
* (e.g. a 1:1 `1024x1024`) 400s. Snaps to the nearest valid Veo size by
|
|
44
57
|
* orientation; defaults to landscape 720p.
|
|
45
58
|
*/
|
|
46
|
-
export declare function snapVeoSize(size
|
|
59
|
+
export declare function snapVeoSize({ size }: {
|
|
60
|
+
size: string | undefined;
|
|
61
|
+
}): string;
|
|
47
62
|
/**
|
|
48
63
|
* Snaps a requested `size` to the model's declared `supportedSizes` by
|
|
49
64
|
* orientation (portrait matches portrait, else landscape). Returns the size
|
|
50
65
|
* unchanged when the model declares no constraint; falls back to the first
|
|
51
66
|
* supported size when the input is missing/unparseable.
|
|
52
67
|
*/
|
|
53
|
-
export declare function snapSizeToSupported(size
|
|
68
|
+
export declare function snapSizeToSupported({ size, supported }: {
|
|
69
|
+
size: string | undefined;
|
|
70
|
+
supported: readonly string[] | undefined;
|
|
71
|
+
}): string | undefined;
|
|
54
72
|
/**
|
|
55
73
|
* Builds the upstream video request body for a model. Pure: no fetch, no
|
|
56
74
|
* auth. Caller: `POST \`${baseUrl}${pathSuffix}\`` with auth headers +
|
|
57
75
|
* `JSON.stringify(body)`.
|
|
58
76
|
*/
|
|
59
|
-
export declare function buildVideoRequest(cap
|
|
77
|
+
export declare function buildVideoRequest({ cap, input }: {
|
|
78
|
+
cap: ModelCapability;
|
|
79
|
+
input: VideoBuildInput;
|
|
80
|
+
}): BuiltVideoRequest;
|
|
60
81
|
/** Best-effort normalization of an async-submit / poll response across vendor families. */
|
|
61
|
-
export declare function normalizeVideoResponse(raw
|
|
82
|
+
export declare function normalizeVideoResponse({ raw }: {
|
|
83
|
+
raw: unknown;
|
|
84
|
+
}): NormalizedVideoResponse;
|
|
62
85
|
//# sourceMappingURL=video-request.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Resolves the upstream model name: the i2v variant when a reference image is present. */
|
|
2
|
-
export function resolveWireModel(cap, hasReference) {
|
|
2
|
+
export function resolveWireModel({ cap, hasReference }) {
|
|
3
3
|
return hasReference && cap.apiModelI2V ? cap.apiModelI2V : cap.apiModel;
|
|
4
4
|
}
|
|
5
5
|
/** Derives the request family from the resolved upstream model name (or an explicit `cap.family` override). */
|
|
6
|
-
export function deriveVideoFamily(wireModel, cap) {
|
|
6
|
+
export function deriveVideoFamily({ wireModel }, { cap } = {}) {
|
|
7
7
|
if (cap?.family)
|
|
8
8
|
return cap.family;
|
|
9
9
|
const m = wireModel.toLowerCase();
|
|
@@ -20,7 +20,7 @@ export function deriveVideoFamily(wireModel, cap) {
|
|
|
20
20
|
* 5/10). Falls back to a 3-12 clamp when the model declares no constraint.
|
|
21
21
|
* Ties prefer the shorter value (array order wins on an exact tie distance).
|
|
22
22
|
*/
|
|
23
|
-
export function snapDuration(cap, requested) {
|
|
23
|
+
export function snapDuration({ cap, requested }) {
|
|
24
24
|
const req = Number.isFinite(requested) ? requested : 5;
|
|
25
25
|
const allowed = cap.supportedDurations;
|
|
26
26
|
if (!allowed || allowed.length === 0) {
|
|
@@ -35,7 +35,7 @@ export function snapDuration(cap, requested) {
|
|
|
35
35
|
* (720→720p, 1080→1080p, ...); defaults to `720p` when nothing usable is
|
|
36
36
|
* supplied. (The `wan` family upper-cases the result itself.)
|
|
37
37
|
*/
|
|
38
|
-
export function snapResolutionToken(resolution, size) {
|
|
38
|
+
export function snapResolutionToken({ resolution, size }) {
|
|
39
39
|
const token = (resolution || '').trim().toLowerCase();
|
|
40
40
|
if (/^(480|720|1080)p$/.test(token))
|
|
41
41
|
return token;
|
|
@@ -57,7 +57,7 @@ const VEO_VALID_SIZES = new Set(['1280x720', '720x1280', '1920x1080', '1080x1920
|
|
|
57
57
|
* (e.g. a 1:1 `1024x1024`) 400s. Snaps to the nearest valid Veo size by
|
|
58
58
|
* orientation; defaults to landscape 720p.
|
|
59
59
|
*/
|
|
60
|
-
export function snapVeoSize(size) {
|
|
60
|
+
export function snapVeoSize({ size }) {
|
|
61
61
|
const s = (size || '').trim().toLowerCase().replace('×', 'x');
|
|
62
62
|
if (VEO_VALID_SIZES.has(s))
|
|
63
63
|
return s;
|
|
@@ -72,7 +72,7 @@ export function snapVeoSize(size) {
|
|
|
72
72
|
* unchanged when the model declares no constraint; falls back to the first
|
|
73
73
|
* supported size when the input is missing/unparseable.
|
|
74
74
|
*/
|
|
75
|
-
export function snapSizeToSupported(size, supported) {
|
|
75
|
+
export function snapSizeToSupported({ size, supported }) {
|
|
76
76
|
if (!supported || supported.length === 0)
|
|
77
77
|
return size;
|
|
78
78
|
const norm = (v) => v.trim().toLowerCase().replace('×', 'x');
|
|
@@ -120,11 +120,11 @@ function buildSeedanceContent(input) {
|
|
|
120
120
|
* auth. Caller: `POST \`${baseUrl}${pathSuffix}\`` with auth headers +
|
|
121
121
|
* `JSON.stringify(body)`.
|
|
122
122
|
*/
|
|
123
|
-
export function buildVideoRequest(cap, input) {
|
|
123
|
+
export function buildVideoRequest({ cap, input }) {
|
|
124
124
|
const hasReference = Boolean(input.imageRef?.dataUrl);
|
|
125
|
-
const wireModel = resolveWireModel(cap, hasReference);
|
|
126
|
-
const family = deriveVideoFamily(wireModel, cap);
|
|
127
|
-
const seconds = snapDuration(cap, input.durationSeconds);
|
|
125
|
+
const wireModel = resolveWireModel({ cap: cap, hasReference: hasReference });
|
|
126
|
+
const family = deriveVideoFamily({ wireModel: wireModel }, { cap: cap });
|
|
127
|
+
const seconds = snapDuration({ cap: cap, requested: input.durationSeconds });
|
|
128
128
|
let body;
|
|
129
129
|
if (family === 'seedance') {
|
|
130
130
|
body = {
|
|
@@ -132,7 +132,7 @@ export function buildVideoRequest(cap, input) {
|
|
|
132
132
|
prompt: input.prompt,
|
|
133
133
|
duration: seconds,
|
|
134
134
|
content: buildSeedanceContent(input),
|
|
135
|
-
resolution: snapResolutionToken(input.resolution, input.size),
|
|
135
|
+
resolution: snapResolutionToken({ resolution: input.resolution, size: input.size }),
|
|
136
136
|
};
|
|
137
137
|
if (input.aspectRatio)
|
|
138
138
|
body.ratio = input.aspectRatio;
|
|
@@ -147,7 +147,7 @@ export function buildVideoRequest(cap, input) {
|
|
|
147
147
|
wanInput.media = [{ type: 'first_frame', url: input.imageRef.dataUrl }];
|
|
148
148
|
}
|
|
149
149
|
const parameters = {
|
|
150
|
-
resolution: snapResolutionToken(input.resolution, input.size).toUpperCase(),
|
|
150
|
+
resolution: snapResolutionToken({ resolution: input.resolution, size: input.size }).toUpperCase(),
|
|
151
151
|
duration: seconds,
|
|
152
152
|
prompt_extend: true,
|
|
153
153
|
watermark: false,
|
|
@@ -163,7 +163,7 @@ export function buildVideoRequest(cap, input) {
|
|
|
163
163
|
model: wireModel,
|
|
164
164
|
prompt: input.prompt,
|
|
165
165
|
seconds,
|
|
166
|
-
size: snapVeoSize(input.size),
|
|
166
|
+
size: snapVeoSize({ size: input.size }),
|
|
167
167
|
};
|
|
168
168
|
if (typeof input.generateAudio === 'boolean')
|
|
169
169
|
body.generate_audio = input.generateAudio;
|
|
@@ -176,7 +176,7 @@ export function buildVideoRequest(cap, input) {
|
|
|
176
176
|
prompt: input.prompt,
|
|
177
177
|
seconds: String(seconds),
|
|
178
178
|
};
|
|
179
|
-
const genericSize = snapSizeToSupported(input.size, cap.supportedSizes);
|
|
179
|
+
const genericSize = snapSizeToSupported({ size: input.size, supported: cap.supportedSizes });
|
|
180
180
|
if (genericSize)
|
|
181
181
|
body.size = genericSize;
|
|
182
182
|
if (input.resolution)
|
|
@@ -192,7 +192,7 @@ export function buildVideoRequest(cap, input) {
|
|
|
192
192
|
return { wireModel, family, pathSuffix: '/videos', contentType: 'application/json', body, hasReference };
|
|
193
193
|
}
|
|
194
194
|
/** Best-effort normalization of an async-submit / poll response across vendor families. */
|
|
195
|
-
export function normalizeVideoResponse(raw) {
|
|
195
|
+
export function normalizeVideoResponse({ raw }) {
|
|
196
196
|
const d = (raw ?? {});
|
|
197
197
|
const data = d.data;
|
|
198
198
|
const dataArray = Array.isArray(d.data) ? d.data : undefined;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { IntegrationError } from "../argument-error.js";
|
|
2
|
+
import type { Clock, IdGenerator, ISODateTime, JsonObject, UUID } from "@jini-ai/core/primitives";
|
|
3
|
+
import type { DeliveryEnvelopeStorePort, WebhookHeaderVocabulary } from "./ports.js";
|
|
4
|
+
import type { HttpClientPort } from "@jini-ai/core/primitives";
|
|
5
|
+
import type { WebhookDeliveryRepoPort, WebhookSubscriptionRepoPort } from "./ports.js";
|
|
6
|
+
import type { WebhookSigner } from "./signing.js";
|
|
7
|
+
import type { WebhookBeforeDispatchHook, WebhookDeliveryRecord, WebhookTopic } from "./types.js";
|
|
8
|
+
export declare const MAX_DELIVERY_ATTEMPTS = 8;
|
|
9
|
+
/**
|
|
10
|
+
* attempts is one-based after the failing attempt. Equal jitter stays between half and all of
|
|
11
|
+
* min(6 hours, 5 minutes * 2^(attempts-1)), preventing zero-delay retry herds while staying inside
|
|
12
|
+
* the exponential envelope. For attempts 1..8, the half-step lower bounds are approximately
|
|
13
|
+
* 2.5, 5, 10, 20, 40, 80, 160 and 180 minutes. Inject random for deterministic decisions.
|
|
14
|
+
*/
|
|
15
|
+
/** Compute equal-jitter backoff capped at six hours; the optional random port controls jitter. */
|
|
16
|
+
export declare function computeBackoffMs(required: {
|
|
17
|
+
attempts: number;
|
|
18
|
+
}, optional?: {
|
|
19
|
+
random?: (() => number) | undefined;
|
|
20
|
+
}): number;
|
|
21
|
+
export declare class WebhookDeliveryVetoedError extends IntegrationError {
|
|
22
|
+
}
|
|
23
|
+
export interface WebhookSourceEvent {
|
|
24
|
+
id: UUID;
|
|
25
|
+
name: WebhookTopic;
|
|
26
|
+
workspaceId: UUID;
|
|
27
|
+
occurredAt: ISODateTime;
|
|
28
|
+
payload: JsonObject;
|
|
29
|
+
}
|
|
30
|
+
export interface EnqueueDeliveryDeps {
|
|
31
|
+
subscriptionRepo: WebhookSubscriptionRepoPort;
|
|
32
|
+
deliveryRepo: WebhookDeliveryRepoPort;
|
|
33
|
+
envelopeStore: DeliveryEnvelopeStorePort;
|
|
34
|
+
idGenerator: IdGenerator;
|
|
35
|
+
clock: Clock;
|
|
36
|
+
}
|
|
37
|
+
export interface EnqueueDeliveryRequired {
|
|
38
|
+
deps: EnqueueDeliveryDeps;
|
|
39
|
+
input: {
|
|
40
|
+
event: WebhookSourceEvent;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface EnqueueDeliveryOptional {
|
|
44
|
+
}
|
|
45
|
+
/** Fan out an event to active matching subscriptions, preserving existing event/subscription deduplication. Durable adapters must enforce uniqueness atomically. */
|
|
46
|
+
export declare function enqueueDelivery(required: EnqueueDeliveryRequired, _optional?: EnqueueDeliveryOptional): Promise<{
|
|
47
|
+
enqueued: WebhookDeliveryRecord[];
|
|
48
|
+
}>;
|
|
49
|
+
export interface ProcessDueDeliveriesDeps {
|
|
50
|
+
deliveryRepo: WebhookDeliveryRepoPort;
|
|
51
|
+
subscriptionRepo: WebhookSubscriptionRepoPort;
|
|
52
|
+
envelopeStore: DeliveryEnvelopeStorePort;
|
|
53
|
+
httpClient: HttpClientPort;
|
|
54
|
+
signer: WebhookSigner;
|
|
55
|
+
headers: WebhookHeaderVocabulary;
|
|
56
|
+
clock: Clock;
|
|
57
|
+
}
|
|
58
|
+
export interface ProcessDueDeliveriesRequired {
|
|
59
|
+
deps: ProcessDueDeliveriesDeps;
|
|
60
|
+
}
|
|
61
|
+
export interface ProcessDueDeliveriesOptional {
|
|
62
|
+
batchSize?: number;
|
|
63
|
+
hooks?: readonly WebhookBeforeDispatchHook[];
|
|
64
|
+
requestTimeoutMs?: number;
|
|
65
|
+
maxAttempts?: number;
|
|
66
|
+
random?: (() => number) | undefined;
|
|
67
|
+
}
|
|
68
|
+
export interface ProcessDueDeliveriesResult {
|
|
69
|
+
processed: number;
|
|
70
|
+
delivered: number;
|
|
71
|
+
failed: number;
|
|
72
|
+
dead: number;
|
|
73
|
+
}
|
|
74
|
+
/** Claim and process a bounded batch; hooks fail closed and unsuccessful attempts back off or dead-letter. */
|
|
75
|
+
export declare function processDueDeliveries(required: ProcessDueDeliveriesRequired, optional?: ProcessDueDeliveriesOptional): Promise<ProcessDueDeliveriesResult>;
|
|
76
|
+
//# sourceMappingURL=delivery.d.ts.map
|