@freedome/client 1.0.0 → 1.2.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.0 (2026-11-17)
4
+
5
+ Against contract 1.2.0, additive; works with a 1.1 server as before.
6
+
7
+ - `client.assistant`: pending physical actions and approvals of the link, as Manager sees them.
8
+ - `content.findAssetByName(name, { type, tag, status })`: the first asset whose `name` equals `name` exactly (case-sensitive),
9
+ or `null`. Narrows on the server with `q`, keeps exact matches, reads more pages while needed.
10
+ - Fake (`/testing`): `listAssets` filters by `type`, `tag`, `status`, `q` (case-insensitive substring of the name) and pages
11
+ with `limit` / `cursor`, as the media server does; without them it still returns every asset.
12
+
13
+ ## 1.1.0 (2026-11-07)
14
+
15
+ Against contract 1.1.0, additive; works with a 1.0 server as before.
16
+
17
+ - `client.contractVersion`, `audio.supportsAudioControl`: what the server offers. Against a 1.0 server the calls below
18
+ reject with `UnsupportedCapabilityError` and send nothing.
19
+ - `audio.pauseSession`, `audio.resumeSession`, `audio.startDeviceSweep`; `roleZones` of `audio.startSession`; the `multi`
20
+ block of `GeneratorSession.start`, and `GeneratorSession.startMulti`.
21
+ - Fake (`/testing`): all of the above, `cancelCalibrationJob`, `applyCalibrationJob`; `fake.contractVersion` (set `1.0.0`
22
+ for a server without them, answering 404 and 422), `fake.audio.estopped`, `fake.audio.sweepPeaks`.
23
+
3
24
  ## 1.0.0 (2026-11-06)
4
25
 
5
26
  - Client on contract 1.0.0: REST, WebSocket, GraphQL, socket.io, repositories, offline cache, codecs, in-memory fake.
@@ -1,4 +1,4 @@
1
- import { FreedomeEvent, ApiOperation, AssetCreateRequest, AssetResource, ServerInfo } from '@freedome/protocol';
1
+ import { FreedomeEvent, ApiOperation, SemVer, AssetCreateRequest, AssetResource, ServerInfo } from '@freedome/protocol';
2
2
  import { F as FreedomeError } from './errors-L_bIF-OR.js';
3
3
  import { e as FreedomeTransport, b as FreedomeResponse, F as FreedomeEndpoint } from './transport-dvmDQyvB.js';
4
4
 
@@ -269,8 +269,19 @@ declare class RepositoryContext {
269
269
  readonly positionHz: number | undefined;
270
270
  readonly onEngineHealth: ((status: string) => void) | undefined;
271
271
  readonly logger: FreedomeLogger | undefined;
272
+ /** Contract version the server reports (undefined = not known yet, or none reported). */
273
+ readonly contractVersion: () => SemVer | undefined;
272
274
  readonly outboxOutcomes: Emitter<OutboxOutcome>;
273
- constructor(api: ApiCaller, hub: EventHub, cache: CacheStore, outbox: OutboxStore | undefined, offline: OfflinePolicy, isOffline: () => boolean, cacheScope: () => string, realtimeUp: () => boolean, positionHz: number | undefined, onEngineHealth: ((status: string) => void) | undefined, logger: FreedomeLogger | undefined);
275
+ constructor(api: ApiCaller, hub: EventHub, cache: CacheStore, outbox: OutboxStore | undefined, offline: OfflinePolicy, isOffline: () => boolean, cacheScope: () => string, realtimeUp: () => boolean, positionHz: number | undefined, onEngineHealth: ((status: string) => void) | undefined, logger: FreedomeLogger | undefined,
276
+ /** Contract version the server reports (undefined = not known yet, or none reported). */
277
+ contractVersion?: () => SemVer | undefined);
278
+ /** Whether the server reports a contract of at least [version]. False while it is not known. */
279
+ contractAtLeast(version: SemVer): boolean;
280
+ /**
281
+ * Whether the server reports a contract older than [version]. False while it is not known: the call is then sent,
282
+ * and the server's answer decides.
283
+ */
284
+ contractBelow(version: SemVer): boolean;
274
285
  log(level: LogLevel, message: string, error?: unknown): void;
275
286
  /** Read through the cache: fresh when reachable, `stale` copy when not (02f §7.4). */
276
287
  cachedRead<R>(name: string, read: () => Promise<[R, unknown]>, stale: (json: unknown, asOf: Date) => R): Promise<R>;
@@ -1,4 +1,4 @@
1
- import { FreedomeEvent, ApiOperation, AssetCreateRequest, AssetResource, ServerInfo } from '@freedome/protocol';
1
+ import { FreedomeEvent, ApiOperation, SemVer, AssetCreateRequest, AssetResource, ServerInfo } from '@freedome/protocol';
2
2
  import { F as FreedomeError } from './errors-L_bIF-OR.cjs';
3
3
  import { e as FreedomeTransport, b as FreedomeResponse, F as FreedomeEndpoint } from './transport-dvmDQyvB.cjs';
4
4
 
@@ -269,8 +269,19 @@ declare class RepositoryContext {
269
269
  readonly positionHz: number | undefined;
270
270
  readonly onEngineHealth: ((status: string) => void) | undefined;
271
271
  readonly logger: FreedomeLogger | undefined;
272
+ /** Contract version the server reports (undefined = not known yet, or none reported). */
273
+ readonly contractVersion: () => SemVer | undefined;
272
274
  readonly outboxOutcomes: Emitter<OutboxOutcome>;
273
- constructor(api: ApiCaller, hub: EventHub, cache: CacheStore, outbox: OutboxStore | undefined, offline: OfflinePolicy, isOffline: () => boolean, cacheScope: () => string, realtimeUp: () => boolean, positionHz: number | undefined, onEngineHealth: ((status: string) => void) | undefined, logger: FreedomeLogger | undefined);
275
+ constructor(api: ApiCaller, hub: EventHub, cache: CacheStore, outbox: OutboxStore | undefined, offline: OfflinePolicy, isOffline: () => boolean, cacheScope: () => string, realtimeUp: () => boolean, positionHz: number | undefined, onEngineHealth: ((status: string) => void) | undefined, logger: FreedomeLogger | undefined,
276
+ /** Contract version the server reports (undefined = not known yet, or none reported). */
277
+ contractVersion?: () => SemVer | undefined);
278
+ /** Whether the server reports a contract of at least [version]. False while it is not known. */
279
+ contractAtLeast(version: SemVer): boolean;
280
+ /**
281
+ * Whether the server reports a contract older than [version]. False while it is not known: the call is then sent,
282
+ * and the server's answer decides.
283
+ */
284
+ contractBelow(version: SemVer): boolean;
274
285
  log(level: LogLevel, message: string, error?: unknown): void;
275
286
  /** Read through the cache: fresh when reachable, `stale` copy when not (02f §7.4). */
276
287
  cachedRead<R>(name: string, read: () => Promise<[R, unknown]>, stale: (json: unknown, asOf: Date) => R): Promise<R>;