@opencode/protocol 0.0.0-dev-21430 → 0.0.0-dev-21453

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,33 @@
1
1
  import { Context, Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema } from "effect/http-api";
3
3
  import { ConflictError, LocationNotFoundError, PermissionNotFoundError, PermissionSavedNotFoundError, SessionNotFoundError } from "../errors.js";
4
- export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.permission", HttpApiEndpoint.HttpApiEndpoint<"permission.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
4
+ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, SessionLocationId extends HttpApiMiddleware.AnyId, SessionLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, sessionLocationMiddleware: Context.Key<SessionLocationId, SessionLocationService>) => HttpApiGroup.HttpApiGroup<"server.permission", HttpApiEndpoint.HttpApiEndpoint<"permission.saved.remove", "DELETE", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
5
+ id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
6
+ create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
7
+ };
8
+ }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
9
+ id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
10
+ create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
11
+ };
12
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
13
+ readonly action: Schema.optional<Schema.String>;
14
+ readonly resource: Schema.optional<Schema.String>;
15
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
16
+ readonly data: Schema.Struct<{
17
+ readonly id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
18
+ create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
19
+ };
20
+ readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
21
+ global: string & import("effect/Brand").Brand<"Project.ID">;
22
+ };
23
+ readonly action: Schema.String;
24
+ readonly resource: Schema.String;
25
+ readonly time: Schema.Struct<{
26
+ readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
27
+ readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
28
+ }>;
29
+ }>;
30
+ }>>, Schema.toCodecJson<typeof ConflictError | typeof PermissionSavedNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.request.list", "GET", "/api/permission/request", never, Schema.toCodecStringTree<Schema.Struct<{
5
31
  readonly location: Schema.optional<Schema.Struct<{
6
32
  readonly directory: Schema.optional<Schema.String>;
7
33
  }>>;
@@ -51,33 +77,7 @@ export declare const makePermissionGroup: <LocationId extends HttpApiMiddleware.
51
77
  readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
52
78
  }>;
53
79
  }>>;
54
- }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.remove", "DELETE", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
55
- id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
56
- create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
57
- };
58
- }>>, never, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"permission.saved.update", "PATCH", "/api/permission/saved/:id", Schema.toCodecStringTree<Schema.Struct<{
59
- id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
60
- create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
61
- };
62
- }>>, never, Schema.toCodecJson<Schema.Struct<{
63
- readonly action: Schema.optional<Schema.String>;
64
- readonly resource: Schema.optional<Schema.String>;
65
- }>>, never, Schema.toCodecJson<Schema.Struct<{
66
- readonly data: Schema.Struct<{
67
- readonly id: Schema.brand<Schema.String, "PermissionSaved.ID"> & {
68
- create: () => string & import("effect/Brand").Brand<"PermissionSaved.ID">;
69
- };
70
- readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
71
- global: string & import("effect/Brand").Brand<"Project.ID">;
72
- };
73
- readonly action: Schema.String;
74
- readonly resource: Schema.String;
75
- readonly time: Schema.Struct<{
76
- readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
77
- readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
78
- }>;
79
- }>;
80
- }>>, Schema.toCodecJson<typeof ConflictError | typeof PermissionSavedNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.create", "POST", "/api/session/:sessionID/permission", Schema.toCodecStringTree<Schema.Struct<{
80
+ }>>, never, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.permission.create", "POST", "/api/session/:sessionID/permission", Schema.toCodecStringTree<Schema.Struct<{
81
81
  sessionID: Schema.brand<Schema.String, "SessionID"> & {
82
82
  create: () => string & import("effect/Brand").Brand<"SessionID">;
83
83
  descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
@@ -62,7 +62,26 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
62
62
  readonly pid: Schema.Int;
63
63
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
64
64
  }>;
65
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
65
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
66
+ ptyID: Schema.brand<Schema.String, "PtyID"> & {
67
+ create: () => string & import("effect/Brand").Brand<"PtyID">;
68
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
69
+ };
70
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
71
+ readonly location: Schema.optional<Schema.Struct<{
72
+ readonly directory: Schema.optional<Schema.String>;
73
+ }>>;
74
+ }>>, never, Schema.toCodecStringTree<Schema.Struct<{
75
+ readonly "x-opencode-ticket": Schema.optional<Schema.String>;
76
+ }>>, Schema.toCodecJson<Schema.Struct<{
77
+ readonly location: Schema.Struct<{
78
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
79
+ }>;
80
+ readonly data: Schema.Struct<{
81
+ readonly ticket: Schema.String;
82
+ readonly expires_in: Schema.Int;
83
+ }>;
84
+ }>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.create", "POST", "/api/pty", never, Schema.toCodecStringTree<Schema.Struct<{
66
85
  readonly location: Schema.optional<Schema.Struct<{
67
86
  readonly directory: Schema.optional<Schema.String>;
68
87
  }>>;
@@ -124,26 +143,7 @@ export declare const makePtyGroup: <LocationId extends HttpApiMiddleware.AnyId,
124
143
  readonly pid: Schema.Int;
125
144
  readonly exitCode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
126
145
  }>;
127
- }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connectToken", "POST", "/api/pty/:ptyID/connect-token", Schema.toCodecStringTree<Schema.Struct<{
128
- ptyID: Schema.brand<Schema.String, "PtyID"> & {
129
- create: () => string & import("effect/Brand").Brand<"PtyID">;
130
- ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
131
- };
132
- }>>, Schema.toCodecStringTree<Schema.Struct<{
133
- readonly location: Schema.optional<Schema.Struct<{
134
- readonly directory: Schema.optional<Schema.String>;
135
- }>>;
136
- }>>, never, Schema.toCodecStringTree<Schema.Struct<{
137
- readonly "x-opencode-ticket": Schema.optional<Schema.String>;
138
- }>>, Schema.toCodecJson<Schema.Struct<{
139
- readonly location: Schema.Struct<{
140
- readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
141
- }>;
142
- readonly data: Schema.Struct<{
143
- readonly ticket: Schema.String;
144
- readonly expires_in: Schema.Int;
145
- }>;
146
- }>>, Schema.toCodecJson<typeof ForbiddenError | typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connect", "GET", "/api/pty/:ptyID/connect", Schema.toCodecStringTree<Schema.Struct<{
146
+ }>>, Schema.toCodecJson<typeof PtyNotFoundError>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"pty.connect", "GET", "/api/pty/:ptyID/connect", Schema.toCodecStringTree<Schema.Struct<{
147
147
  ptyID: Schema.brand<Schema.String, "PtyID"> & {
148
148
  create: () => string & import("effect/Brand").Brand<"PtyID">;
149
149
  ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
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-21430",
4
+ "version": "0.0.0-dev-21453",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "typecheck": "tsc --noEmit"
34
34
  },
35
35
  "dependencies": {
36
- "@opencode/schema": "0.0.0-dev-21430",
36
+ "@opencode/schema": "0.0.0-dev-21453",
37
37
  "effect": "4.0.1"
38
38
  },
39
39
  "devDependencies": {