@inferencesh/app 0.1.16 → 0.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/dist/stream.d.ts CHANGED
@@ -119,7 +119,7 @@ export declare function binaryField(objectSchema: any): string | null;
119
119
  * ```
120
120
  *
121
121
  * A frame that does not fit the input schema is answered with
122
- * `{"error": {"field": ..., "message": ...}}` and skipped; the stream goes on.
122
+ * `{"$error": {"field": ..., "message": ...}}` and skipped; the stream goes on.
123
123
  *
124
124
  * The function may instead be an async generator (`async *talk(inputData, socket)`):
125
125
  * each yield is a cumulative snapshot of the task's output, sent as a task update
package/dist/stream.js CHANGED
@@ -52,7 +52,9 @@ import { findMarker } from "./zod-walk.js";
52
52
  */
53
53
  export const STREAM_SCHEMA_MARKER = Symbol.for("inferencesh.streamSchema");
54
54
  // Control frames. Reserved keys start with `$`, which no field name can, so a
55
- // control frame is never mistaken for an output field.
55
+ // control frame is never mistaken for an output field. sdk-js
56
+ // (src/live/protocol.ts) and sdk-py (inferencesh/models/stream.py) mirror
57
+ // these; change all three together.
56
58
  /** `{"$clear": "audio"}`: drop what has been buffered of a live output field. */
57
59
  export const CLEAR_KEY = "$clear";
58
60
  /**
@@ -173,7 +175,7 @@ function firstIssue(result) {
173
175
  * ```
174
176
  *
175
177
  * A frame that does not fit the input schema is answered with
176
- * `{"error": {"field": ..., "message": ...}}` and skipped; the stream goes on.
178
+ * `{"$error": {"field": ..., "message": ...}}` and skipped; the stream goes on.
177
179
  *
178
180
  * The function may instead be an async generator (`async *talk(inputData, socket)`):
179
181
  * each yield is a cumulative snapshot of the task's output, sent as a task update
package/dist/types.d.ts CHANGED
@@ -44,7 +44,7 @@ export interface OutputMeta {
44
44
  /**
45
45
  * MetaItemType is the type discriminator for MetaItem
46
46
  */
47
- export type MetaItemType = string;
47
+ export type MetaItemType = "text" | "image" | "video" | "audio" | "raw";
48
48
  export declare const MetaItemTypeText: MetaItemType;
49
49
  export declare const MetaItemTypeImage: MetaItemType;
50
50
  export declare const MetaItemTypeVideo: MetaItemType;
@@ -53,7 +53,7 @@ export declare const MetaItemTypeRaw: MetaItemType;
53
53
  /**
54
54
  * VideoResolution represents standard video resolution presets
55
55
  */
56
- export type VideoResolution = string;
56
+ export type VideoResolution = "480p" | "720p" | "1080p" | "1440p" | "4k";
57
57
  export declare const VideoRes480P: VideoResolution;
58
58
  export declare const VideoRes720P: VideoResolution;
59
59
  export declare const VideoRes1080P: VideoResolution;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/app",
3
- "version": "0.1.16",
3
+ "version": "0.2.0",
4
4
  "description": "App framework for building inference.sh apps — File handling, output metadata, storage utilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",