@crvouga/mockingbird-service-bedrock 3.3.0 → 3.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/dist/index.d.ts CHANGED
@@ -534,6 +534,8 @@ type SnapshotDocument = {
534
534
  faults?: unknown;
535
535
  latency?: unknown;
536
536
  virtualTime?: boolean;
537
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
538
+ webhooks?: unknown;
537
539
  };
538
540
  /** Controls for one namespace. */
539
541
  type NamespaceControls = {
@@ -747,6 +749,8 @@ type CredentialRegistry = {
747
749
  }[];
748
750
  };
749
751
 
752
+ type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
753
+
750
754
  /**
751
755
  * A point-in-time copy of everything a service namespace holds.
752
756
  *
@@ -864,8 +868,16 @@ type PublishInput = {
864
868
  id?: string;
865
869
  };
866
870
  type WebhookHub = {
871
+ observeDeliveries(listener: (event: {
872
+ namespace: string;
873
+ state: string;
874
+ deliveryId: string;
875
+ }) => void): () => void;
876
+ setTransportPolicy(policy: OwnedTransport): void;
867
877
  pending(namespace: string): number;
868
878
  snapshot(namespace: string): unknown;
879
+ exportSnapshot(handle: unknown): unknown;
880
+ importSnapshot(namespace: string, document: unknown): unknown;
869
881
  restore(namespace: string, snapshot: unknown): void;
870
882
  publish(input: PublishInput): WebhookMessage;
871
883
  /** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
@@ -878,7 +890,7 @@ type WebhookHub = {
878
890
  /** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
879
891
  flush(): Promise<void>;
880
892
  /** Resolve once nothing is in flight. */
881
- idle(): Promise<void>;
893
+ idle(namespace?: string): Promise<void>;
882
894
  fault(namespace: string, fault: WebhookFault): void;
883
895
  clear(namespace?: string): void;
884
896
  };
@@ -922,6 +934,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
922
934
  /** Opaque in-process checkpoint including records, controls and webhook history. */
923
935
  fleetSnapshot(namespace: string): object;
924
936
  fleetRestore(snapshot: unknown, namespace: string): void;
937
+ fleetExport(snapshot: unknown): SnapshotDocument;
938
+ fleetImport(namespace: string, document: unknown): object;
925
939
  /** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
926
940
  applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
927
941
  /** The instance behind `namespace` (the default one when omitted), created on first use. */
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  supportedOperationIds,
30
30
  titanEmbedding,
31
31
  unwrapSigned
32
- } from "./chunk-6FWIT6U7.js";
32
+ } from "./chunk-UU3IC2CF.js";
33
33
  export {
34
34
  BEDROCK_NAMESPACE,
35
35
  BEDROCK_PRESETS,
package/dist/server.d.ts CHANGED
@@ -445,6 +445,8 @@ type SnapshotDocument$1 = {
445
445
  faults?: unknown;
446
446
  latency?: unknown;
447
447
  virtualTime?: boolean;
448
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
449
+ webhooks?: unknown;
448
450
  };
449
451
  /** Controls for one namespace. */
450
452
  type NamespaceControls$1 = {
@@ -658,6 +660,8 @@ type CredentialRegistry$1 = {
658
660
  }[];
659
661
  };
660
662
 
663
+ type OwnedTransport$1 = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
664
+
661
665
  /**
662
666
  * A point-in-time copy of everything a service namespace holds.
663
667
  *
@@ -775,8 +779,16 @@ type PublishInput$1 = {
775
779
  id?: string;
776
780
  };
777
781
  type WebhookHub$1 = {
782
+ observeDeliveries(listener: (event: {
783
+ namespace: string;
784
+ state: string;
785
+ deliveryId: string;
786
+ }) => void): () => void;
787
+ setTransportPolicy(policy: OwnedTransport$1): void;
778
788
  pending(namespace: string): number;
779
789
  snapshot(namespace: string): unknown;
790
+ exportSnapshot(handle: unknown): unknown;
791
+ importSnapshot(namespace: string, document: unknown): unknown;
780
792
  restore(namespace: string, snapshot: unknown): void;
781
793
  publish(input: PublishInput$1): WebhookMessage$1;
782
794
  /** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
@@ -789,7 +801,7 @@ type WebhookHub$1 = {
789
801
  /** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
790
802
  flush(): Promise<void>;
791
803
  /** Resolve once nothing is in flight. */
792
- idle(): Promise<void>;
804
+ idle(namespace?: string): Promise<void>;
793
805
  fault(namespace: string, fault: WebhookFault$1): void;
794
806
  clear(namespace?: string): void;
795
807
  };
@@ -833,6 +845,8 @@ type ServiceRuntime$1<T extends ServiceInstance$1> = FetchAPI$2 & {
833
845
  /** Opaque in-process checkpoint including records, controls and webhook history. */
834
846
  fleetSnapshot(namespace: string): object;
835
847
  fleetRestore(snapshot: unknown, namespace: string): void;
848
+ fleetExport(snapshot: unknown): SnapshotDocument$1;
849
+ fleetImport(namespace: string, document: unknown): object;
836
850
  /** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
837
851
  applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule$1>): FaultRule$1[];
838
852
  /** The instance behind `namespace` (the default one when omitted), created on first use. */
@@ -925,6 +939,7 @@ type CommonServeOptions = {
925
939
  * `serveTarget`, which is also how `serve --config` finds services by name.
926
940
  */
927
941
  type ServeTarget = {
942
+ packageVersion?: string;
928
943
  name: string;
929
944
  defaultPort: number;
930
945
  /** Serve flags beyond the common ones. */
@@ -1476,6 +1491,8 @@ type SnapshotDocument = {
1476
1491
  faults?: unknown;
1477
1492
  latency?: unknown;
1478
1493
  virtualTime?: boolean;
1494
+ /** Quiescent webhook endpoints, delivery history and fault state. Contains private configuration. */
1495
+ webhooks?: unknown;
1479
1496
  };
1480
1497
  /** Controls for one namespace. */
1481
1498
  type NamespaceControls = {
@@ -1689,6 +1706,8 @@ type CredentialRegistry = {
1689
1706
  }[];
1690
1707
  };
1691
1708
 
1709
+ type OwnedTransport = (request: Request, namespace: string, send: typeof fetch) => Promise<Response>;
1710
+
1692
1711
  /**
1693
1712
  * A point-in-time copy of everything a service namespace holds.
1694
1713
  *
@@ -1806,8 +1825,16 @@ type PublishInput = {
1806
1825
  id?: string;
1807
1826
  };
1808
1827
  type WebhookHub = {
1828
+ observeDeliveries(listener: (event: {
1829
+ namespace: string;
1830
+ state: string;
1831
+ deliveryId: string;
1832
+ }) => void): () => void;
1833
+ setTransportPolicy(policy: OwnedTransport): void;
1809
1834
  pending(namespace: string): number;
1810
1835
  snapshot(namespace: string): unknown;
1836
+ exportSnapshot(handle: unknown): unknown;
1837
+ importSnapshot(namespace: string, document: unknown): unknown;
1811
1838
  restore(namespace: string, snapshot: unknown): void;
1812
1839
  publish(input: PublishInput): WebhookMessage;
1813
1840
  /** Replace a namespace's own endpoints (`PUT /__admin/webhook-endpoints`). */
@@ -1820,7 +1847,7 @@ type WebhookHub = {
1820
1847
  /** Run every pending retry (and release held reordered messages) now, and every retry those attempts schedule, until nothing is pending. */
1821
1848
  flush(): Promise<void>;
1822
1849
  /** Resolve once nothing is in flight. */
1823
- idle(): Promise<void>;
1850
+ idle(namespace?: string): Promise<void>;
1824
1851
  fault(namespace: string, fault: WebhookFault): void;
1825
1852
  clear(namespace?: string): void;
1826
1853
  };
@@ -1864,6 +1891,8 @@ type ServiceRuntime<T extends ServiceInstance> = FetchAPI & {
1864
1891
  /** Opaque in-process checkpoint including records, controls and webhook history. */
1865
1892
  fleetSnapshot(namespace: string): object;
1866
1893
  fleetRestore(snapshot: unknown, namespace: string): void;
1894
+ fleetExport(snapshot: unknown): SnapshotDocument;
1895
+ fleetImport(namespace: string, document: unknown): object;
1867
1896
  /** Expand a named preset into fault rules (and webhook faults) for `namespace`. */
1868
1897
  applyPreset(name: string, namespace?: string, overrides?: Partial<FaultRule>): FaultRule[];
1869
1898
  /** The instance behind `namespace` (the default one when omitted), created on first use. */
package/dist/server.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  createServer,
4
4
  listenH2c,
5
5
  serveTarget
6
- } from "./chunk-GBUDLGDK.js";
7
- import "./chunk-6FWIT6U7.js";
6
+ } from "./chunk-CHZFUB2R.js";
7
+ import "./chunk-UU3IC2CF.js";
8
8
  export {
9
9
  DEFAULT_PORT,
10
10
  createServer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crvouga/mockingbird-service-bedrock",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Stateful, scriptable emulator of AWS Bedrock Runtime (Converse, ConverseStream, InvokeModel incl. Titan embeddings, Nova Sonic bidirectional streams over h2c) and AgentCore InvokeHarness, with exact event-stream framing.",
5
5
  "license": "MIT",
6
6
  "type": "module",