@agentshouse/mdruntime-adapter 0.1.0-cd673d02b6e50 → 0.1.0-cd7e4bb187177

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/stream.d.ts CHANGED
@@ -1,24 +1,23 @@
1
- import { type ConversationStream, type RefreshPage, type RoomStreamEvent, type ServiceModeSignal, type StreamReceipts } from '@agentshouse/mdruntime';
1
+ import { type AuthorityChange, type Discovery, type ConversationStream, type RoomStreamEvent, type ServiceModeSignal } from '@agentshouse/mdruntime';
2
2
  import type { TrackedAuthority } from './discovery.js';
3
- import type { HouseDoor, HouseHeldRoom, HouseMode, HouseStreamEntry } from './transport.js';
4
- import { type LogPosition } from './version.js';
5
- export type HeldRevision = (path: string, revision: string) => boolean;
6
- export type StreamedAdvancement = {
7
- page: RefreshPage;
8
- schemas: ReadonlyMap<string, HouseStreamEntry>;
3
+ import { type HouseDoor, type HouseHeldRoom, type HouseMode, type HouseStreamFrame } from './transport.js';
4
+ export type HouseOpeningFrame = Extract<HouseStreamFrame, {
5
+ type: 'opening';
6
+ }>;
7
+ export type HouseAuthorityChangedFrame = Extract<HouseStreamFrame, {
8
+ type: 'authority_changed';
9
+ }>;
10
+ export type HouseDiscovering = {
11
+ opened(frame: HouseOpeningFrame | null): Promise<Discovery | null>;
12
+ changed(frame: HouseAuthorityChangedFrame): AuthorityChange | null;
9
13
  };
10
14
  export type HouseNotifications = {
11
15
  runtime: string;
12
- observe(notify: (event: RoomStreamEvent) => void, receipts: StreamReceipts): () => void;
16
+ observe(notify: (event: RoomStreamEvent) => void): () => void;
13
17
  send(rooms: readonly HouseHeldRoom[]): void;
14
- published(locator: string, at: LogPosition): void;
15
- reopen(): void;
16
18
  track(authorities: readonly TrackedAuthority[]): void;
17
- reach(authority: string, at: LogPosition): void;
18
- edited(tracked: TrackedAuthority, from: LogPosition): readonly string[];
19
- advance(tracked: TrackedAuthority, from: LogPosition, holds?: HeldRevision): Generator<number, StreamedAdvancement | null, void>;
20
19
  conversations: ConversationStream;
21
20
  serviceMode: ServiceModeSignal;
22
21
  };
23
- export declare function houseNotifications(transport: HouseDoor, mode: HouseMode): HouseNotifications;
22
+ export declare function houseNotifications(transport: HouseDoor, mode: HouseMode, discovering: HouseDiscovering): HouseNotifications;
24
23
  //# sourceMappingURL=stream.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,WAAW,EAChB,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAUvD,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EAEb,SAAS,EAET,gBAAgB,EAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AA0C7D,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,EAAE,QAAQ,EAAE,cAAc,GAAG,MAAM,IAAI,CAAC;IACxF,IAAI,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,GAAG,IAAI,CAAC;IAC5C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,GAAG,IAAI,CAAC;IAClD,MAAM,IAAI,IAAI,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