@opencode/protocol 0.0.0-dev-1335 → 0.0.0-dev-1337

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.
@@ -1,7 +1,7 @@
1
1
  import { Generate } from "@opencode/schema/generate";
2
2
  import { Schema } from "effect";
3
3
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
4
- import { ForbiddenError, VideoNotFoundError, InvalidRequestError, LocationNotFoundError, ModelNotFoundError, ProviderNotFoundError, ProviderRequestError, ServiceUnavailableError, UnsupportedModelError } from "../errors.js";
4
+ import { VideoNotFoundError, InvalidRequestError, LocationNotFoundError, ModelNotFoundError, ProviderNotFoundError, ProviderRequestError, ServiceUnavailableError, UnsupportedModelError } from "../errors.js";
5
5
  export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate", HttpApiEndpoint.HttpApiEndpoint<"generate.decisions", "POST", "/api/experimental/generate/decisions", never, never, Schema.toCodecJson<Schema.Struct<{
6
6
  readonly model: Schema.Struct<{
7
7
  readonly id: Schema.brand<Schema.String, "Model.ID">;
@@ -296,7 +296,7 @@ export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate",
296
296
  };
297
297
  readonly status: Schema.Literal<"running">;
298
298
  }>;
299
- }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof InvalidRequestError | typeof ServiceUnavailableError | typeof ProviderNotFoundError | typeof ForbiddenError | typeof ModelNotFoundError | typeof UnsupportedModelError | typeof ProviderRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"generate.video.get", "GET", "/api/experimental/generate/video/:id", Schema.toCodecStringTree<Schema.Struct<{
299
+ }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof InvalidRequestError | typeof ServiceUnavailableError | typeof ProviderNotFoundError | typeof ModelNotFoundError | typeof UnsupportedModelError | typeof ProviderRequestError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"generate.video.get", "GET", "/api/experimental/generate/video/:id", Schema.toCodecStringTree<Schema.Struct<{
300
300
  id: Schema.brand<Schema.String, "Generate.VideoID"> & {
301
301
  create: () => string & import("effect/Brand").Brand<"Generate.VideoID">;
302
302
  };
@@ -326,4 +326,4 @@ export declare const GenerateGroup: HttpApiGroup.HttpApiGroup<"server.generate",
326
326
  readonly error: Schema.String;
327
327
  readonly reason: Schema.Literals<readonly ["failed", "cancelled", "expired", "unknown"]>;
328
328
  }>]>;
329
- }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof ForbiddenError | typeof VideoNotFoundError>, never, never>, false>;
329
+ }>>, Schema.toCodecJson<typeof LocationNotFoundError | typeof VideoNotFoundError>, never, never>, false>;
@@ -2,7 +2,7 @@ import { Generate } from "@opencode/schema/generate";
2
2
  import { Model } from "@opencode/schema/model";
3
3
  import { Schema } from "effect";
4
4
  import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
5
- import { ForbiddenError, VideoNotFoundError, InvalidRequestError, LocationNotFoundError, ModelNotFoundError, ProviderNotFoundError, ProviderRequestError, ServiceUnavailableError, UnsupportedModelError, } from "../errors.js";
5
+ import { VideoNotFoundError, InvalidRequestError, LocationNotFoundError, ModelNotFoundError, ProviderNotFoundError, ProviderRequestError, ServiceUnavailableError, UnsupportedModelError, } from "../errors.js";
6
6
  const errors = [
7
7
  InvalidRequestError,
8
8
  ProviderNotFoundError,
@@ -47,20 +47,20 @@ export const GenerateGroup = HttpApiGroup.make("server.generate")
47
47
  .add(HttpApiEndpoint.post("generate.video.create", "/api/experimental/generate/video", {
48
48
  payload: Generate.VideoRequest,
49
49
  success: Schema.Struct({ data: Generate.VideoRunning }).annotate({ identifier: "GenerateVideoCreateResponse" }),
50
- error: [...errors, ForbiddenError],
50
+ error: errors,
51
51
  }).annotateMerge(OpenApi.annotations({
52
52
  identifier: "experimental.generate.video.create",
53
53
  summary: "Create a video generation",
54
- description: "Submit a video job to a video model using the server's base configuration and return its ID once the provider accepted it. The server polls the job and stores the finished videos as blobs; read the job with GET /api/experimental/generate/video/:id and the video with GET /api/experimental/blob/:id. Behind the video_generate flag. Experimental: may change without compatibility guarantees.",
54
+ description: "Submit a video job to a video model using the server's base configuration and return its ID once the provider accepted it. The server polls the job and stores the finished videos as blobs; read the job with GET /api/experimental/generate/video/:id and the video with GET /api/experimental/blob/:id. Experimental: may change without compatibility guarantees.",
55
55
  })))
56
56
  .add(HttpApiEndpoint.get("generate.video.get", "/api/experimental/generate/video/:id", {
57
57
  params: { id: Generate.VideoID },
58
58
  success: Schema.Struct({ data: Generate.VideoJob }).annotate({ identifier: "GenerateVideoGetResponse" }),
59
- error: [VideoNotFoundError, ForbiddenError, LocationNotFoundError],
59
+ error: [VideoNotFoundError, LocationNotFoundError],
60
60
  }).annotateMerge(OpenApi.annotations({
61
61
  identifier: "experimental.generate.video.get",
62
62
  summary: "Read a video generation",
63
- description: "Read a video job: running, completed with its videos' blobs, or error with a reason. Jobs survive a server restart, which resumes polling running ones. A job is not found 24 hours after it finished, or once none of its blobs remain. Behind the video_generate flag. Experimental: may change without compatibility guarantees.",
63
+ description: "Read a video job: running, completed with its videos' blobs, or error with a reason. Jobs survive a server restart, which resumes polling running ones. A job is not found 24 hours after it finished, or once none of its blobs remain. Experimental: may change without compatibility guarantees.",
64
64
  })))
65
65
  .add(HttpApiEndpoint.post("generate.decisions", "/api/experimental/generate/decisions", {
66
66
  payload: Generate.DecisionRequest,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/protocol",
4
- "version": "0.0.0-dev-1335",
4
+ "version": "0.0.0-dev-1337",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "typecheck:tsc": "tsc --noEmit"
36
36
  },
37
37
  "dependencies": {
38
- "@opencode/schema": "0.0.0-dev-1335",
38
+ "@opencode/schema": "0.0.0-dev-1337",
39
39
  "effect": "4.1.0"
40
40
  },
41
41
  "devDependencies": {