@opencode-ai/protocol 0.0.0-dev-18226 → 0.0.0-dev-18229

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.
@@ -11,7 +11,16 @@ export declare const CredentialGroup: HttpApiGroup.HttpApiGroup<"server.credenti
11
11
  }>>;
12
12
  }>>, Schema.toCodecJson<Schema.Struct<{
13
13
  readonly label: Schema.String;
14
- }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
14
+ }>>, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.activate", "POST", "/api/credential/:credentialID/activate", Schema.toCodecStringTree<Schema.Struct<{
15
+ credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
16
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
17
+ };
18
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
19
+ readonly location: Schema.optional<Schema.Struct<{
20
+ readonly directory: Schema.optional<Schema.String>;
21
+ readonly workspace: Schema.optional<Schema.String>;
22
+ }>>;
23
+ }>>, never, never, Schema.toCodecJson<HttpApiSchema.NoContent>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"credential.remove", "DELETE", "/api/credential/:credentialID", Schema.toCodecStringTree<Schema.Struct<{
15
24
  credentialID: Schema.brand<Schema.String, "Credential.ID"> & {
16
25
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
17
26
  };
@@ -16,6 +16,17 @@ export const CredentialGroup = HttpApiGroup.make("server.credential")
16
16
  description: "Update a stored credential label.",
17
17
  })))
18
18
  .annotateMerge(OpenApi.annotations({ title: "credential" }))
19
+ .add(HttpApiEndpoint.post("credential.activate", "/api/credential/:credentialID/activate", {
20
+ params: { credentialID: Credential.ID },
21
+ query: LocationQuery,
22
+ success: HttpApiSchema.NoContent,
23
+ })
24
+ .annotateMerge(locationQueryOpenApi)
25
+ .annotateMerge(OpenApi.annotations({
26
+ identifier: "v2.credential.activate",
27
+ summary: "Activate credential",
28
+ description: "Activate a stored integration credential.",
29
+ })))
19
30
  .add(HttpApiEndpoint.delete("credential.remove", "/api/credential/:credentialID", {
20
31
  params: { credentialID: Credential.ID },
21
32
  query: LocationQuery,
@@ -69,7 +69,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
69
69
  };
70
70
  readonly created: Schema.Finite;
71
71
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
72
- readonly type: Schema.Literal<"integration.updated">;
72
+ readonly type: Schema.Literal<"credential.updated">;
73
73
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
74
74
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
75
75
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
@@ -91,7 +91,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
91
91
  }>>, never, never>;
92
92
  readonly data: Schema.Struct<{}>;
93
93
  }> & {
94
- type: "integration.updated";
94
+ type: "credential.updated";
95
95
  durability: "ephemeral";
96
96
  durable: undefined;
97
97
  data: Schema.Struct<{}>;
@@ -101,7 +101,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
101
101
  };
102
102
  readonly created: Schema.Finite;
103
103
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
104
- readonly type: Schema.Literal<"integration.connection.updated">;
104
+ readonly type: Schema.Literal<"credential.switched">;
105
105
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
106
106
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
107
107
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
@@ -123,14 +123,52 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
123
123
  }>>, never, never>;
124
124
  readonly data: Schema.Struct<{
125
125
  readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
126
+ readonly credentialID: Schema.NullOr<Schema.brand<Schema.String, "Credential.ID"> & {
127
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
128
+ }>;
126
129
  }>;
127
130
  }> & {
128
- type: "integration.connection.updated";
131
+ type: "credential.switched";
129
132
  durability: "ephemeral";
130
133
  durable: undefined;
131
134
  data: Schema.Struct<{
132
135
  readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
136
+ readonly credentialID: Schema.NullOr<Schema.brand<Schema.String, "Credential.ID"> & {
137
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
138
+ }>;
133
139
  }>;
140
+ }, Schema.Struct<{
141
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
142
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
143
+ };
144
+ readonly created: Schema.Finite;
145
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
146
+ readonly type: Schema.Literal<"integration.updated">;
147
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
148
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
149
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
150
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
151
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
152
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
153
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
154
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
155
+ }>, never, never>;
156
+ }>>>, Schema.optionalKey<Schema.Struct<{
157
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
158
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
159
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
160
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
161
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
162
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
163
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
164
+ }>, never, never>;
165
+ }>>, never, never>;
166
+ readonly data: Schema.Struct<{}>;
167
+ }> & {
168
+ type: "integration.updated";
169
+ durability: "ephemeral";
170
+ durable: undefined;
171
+ data: Schema.Struct<{}>;
134
172
  }, Schema.Struct<{
135
173
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
136
174
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
@@ -6014,7 +6052,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6014
6052
  } | {
6015
6053
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6016
6054
  readonly data: {};
6017
- readonly type: "integration.updated";
6055
+ readonly type: "credential.updated";
6018
6056
  readonly created: number;
6019
6057
  readonly location?: {
6020
6058
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
@@ -6027,8 +6065,21 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
6027
6065
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6028
6066
  readonly data: {
6029
6067
  readonly integrationID: string & import("effect/Brand").Brand<"Integration.ID">;
6068
+ readonly credentialID: (string & import("effect/Brand").Brand<"Credential.ID">) | null;
6030
6069
  };
6031
- readonly type: "integration.connection.updated";
6070
+ readonly type: "credential.switched";
6071
+ readonly created: number;
6072
+ readonly location?: {
6073
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
6074
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
6075
+ } | undefined;
6076
+ readonly metadata?: {
6077
+ readonly [x: string]: unknown;
6078
+ } | undefined;
6079
+ } | {
6080
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
6081
+ readonly data: {};
6082
+ readonly type: "integration.updated";
6032
6083
  readonly created: number;
6033
6084
  readonly location?: {
6034
6085
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
@@ -7907,7 +7958,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
7907
7958
  };
7908
7959
  readonly created: Schema.Finite;
7909
7960
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
7910
- readonly type: Schema.Literal<"integration.updated">;
7961
+ readonly type: Schema.Literal<"credential.updated">;
7911
7962
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
7912
7963
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
7913
7964
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
@@ -7929,7 +7980,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
7929
7980
  }>>, never, never>;
7930
7981
  readonly data: Schema.Struct<{}>;
7931
7982
  }> & {
7932
- type: "integration.updated";
7983
+ type: "credential.updated";
7933
7984
  durability: "ephemeral";
7934
7985
  durable: undefined;
7935
7986
  data: Schema.Struct<{}>;
@@ -7939,7 +7990,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
7939
7990
  };
7940
7991
  readonly created: Schema.Finite;
7941
7992
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
7942
- readonly type: Schema.Literal<"integration.connection.updated">;
7993
+ readonly type: Schema.Literal<"credential.switched">;
7943
7994
  readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
7944
7995
  readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
7945
7996
  readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
@@ -7961,14 +8012,52 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
7961
8012
  }>>, never, never>;
7962
8013
  readonly data: Schema.Struct<{
7963
8014
  readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
8015
+ readonly credentialID: Schema.NullOr<Schema.brand<Schema.String, "Credential.ID"> & {
8016
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
8017
+ }>;
7964
8018
  }>;
7965
8019
  }> & {
7966
- type: "integration.connection.updated";
8020
+ type: "credential.switched";
7967
8021
  durability: "ephemeral";
7968
8022
  durable: undefined;
7969
8023
  data: Schema.Struct<{
7970
8024
  readonly integrationID: Schema.brand<Schema.String, "Integration.ID">;
8025
+ readonly credentialID: Schema.NullOr<Schema.brand<Schema.String, "Credential.ID"> & {
8026
+ create: () => string & import("effect/Brand").Brand<"Credential.ID">;
8027
+ }>;
7971
8028
  }>;
8029
+ }, Schema.Struct<{
8030
+ readonly id: Schema.brand<Schema.String, "Event.ID"> & {
8031
+ create: () => string & import("effect/Brand").Brand<"Event.ID">;
8032
+ };
8033
+ readonly created: Schema.Finite;
8034
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
8035
+ readonly type: Schema.Literal<"integration.updated">;
8036
+ readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
8037
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
8038
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
8039
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8040
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8041
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
8042
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8043
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8044
+ }>, never, never>;
8045
+ }>>>, Schema.optionalKey<Schema.Struct<{
8046
+ readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
8047
+ readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
8048
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8049
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8050
+ }>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
8051
+ ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
8052
+ create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
8053
+ }>, never, never>;
8054
+ }>>, never, never>;
8055
+ readonly data: Schema.Struct<{}>;
8056
+ }> & {
8057
+ type: "integration.updated";
8058
+ durability: "ephemeral";
8059
+ durable: undefined;
8060
+ data: Schema.Struct<{}>;
7972
8061
  }, Schema.Struct<{
7973
8062
  readonly id: Schema.brand<Schema.String, "Event.ID"> & {
7974
8063
  create: () => string & import("effect/Brand").Brand<"Event.ID">;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/protocol",
4
- "version": "0.0.0-dev-18226",
4
+ "version": "0.0.0-dev-18229",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "typecheck": "tsgo --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@opencode-ai/schema": "0.0.0-dev-18226",
35
+ "@opencode-ai/schema": "0.0.0-dev-18229",
36
36
  "effect": "4.0.0-rc.111"
37
37
  },
38
38
  "devDependencies": {