@opencode-ai/schema 0.0.0-next-15624 → 0.0.0-next-15626

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.
@@ -155,6 +155,14 @@ export declare const OAuthMethod: Schema.Struct<{
155
155
  }>>, never, never>;
156
156
  }>]>>>, never, never>;
157
157
  }>;
158
+ export interface CommandMethod extends Schema.Schema.Type<typeof CommandMethod> {
159
+ }
160
+ export declare const CommandMethod: Schema.Struct<{
161
+ readonly id: Schema.brand<Schema.String, "Integration.MethodID">;
162
+ readonly type: Schema.Literal<"command">;
163
+ readonly label: Schema.String;
164
+ readonly command: Schema.$Array<Schema.String>;
165
+ }>;
158
166
  export interface KeyMethod extends Schema.Schema.Type<typeof KeyMethod> {
159
167
  }
160
168
  export declare const KeyMethod: Schema.Struct<{
@@ -236,6 +244,11 @@ export declare const Method: Schema.Union<readonly [Schema.Struct<{
236
244
  readonly value: Schema.String;
237
245
  }>>, never, never>;
238
246
  }>]>>>, never, never>;
247
+ }>, Schema.Struct<{
248
+ readonly id: Schema.brand<Schema.String, "Integration.MethodID">;
249
+ readonly type: Schema.Literal<"command">;
250
+ readonly label: Schema.String;
251
+ readonly command: Schema.$Array<Schema.String>;
239
252
  }>, Schema.Struct<{
240
253
  readonly type: Schema.Literal<"key">;
241
254
  readonly label: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -465,6 +478,11 @@ export declare const Info: Schema.Struct<{
465
478
  readonly value: Schema.String;
466
479
  }>>, never, never>;
467
480
  }>]>>>, never, never>;
481
+ }>, Schema.Struct<{
482
+ readonly id: Schema.brand<Schema.String, "Integration.MethodID">;
483
+ readonly type: Schema.Literal<"command">;
484
+ readonly label: Schema.String;
485
+ readonly command: Schema.$Array<Schema.String>;
468
486
  }>, Schema.Struct<{
469
487
  readonly type: Schema.Literal<"key">;
470
488
  readonly label: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
@@ -530,3 +548,42 @@ export declare const AttemptStatus: Schema.Union<readonly [Schema.Struct<{
530
548
  }>;
531
549
  }>]>;
532
550
  export type AttemptStatus = typeof AttemptStatus.Type;
551
+ export interface CommandAttempt extends Schema.Schema.Type<typeof CommandAttempt> {
552
+ }
553
+ export declare const CommandAttempt: Schema.Struct<{
554
+ readonly attemptID: Schema.brand<Schema.String, "Integration.AttemptID"> & {
555
+ create: () => string & import("effect/Brand").Brand<"Integration.AttemptID">;
556
+ };
557
+ readonly time: Schema.Struct<{
558
+ readonly created: Schema.Number;
559
+ readonly expires: Schema.Number;
560
+ }>;
561
+ }>;
562
+ export declare const CommandAttemptStatus: Schema.Union<readonly [Schema.Struct<{
563
+ readonly status: Schema.Literal<"pending">;
564
+ readonly message: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
565
+ readonly time: Schema.Struct<{
566
+ readonly created: Schema.Number;
567
+ readonly expires: Schema.Number;
568
+ }>;
569
+ }>, Schema.Struct<{
570
+ readonly status: Schema.Literal<"complete">;
571
+ readonly time: Schema.Struct<{
572
+ readonly created: Schema.Number;
573
+ readonly expires: Schema.Number;
574
+ }>;
575
+ }>, Schema.Struct<{
576
+ readonly status: Schema.Literal<"failed">;
577
+ readonly message: Schema.String;
578
+ readonly time: Schema.Struct<{
579
+ readonly created: Schema.Number;
580
+ readonly expires: Schema.Number;
581
+ }>;
582
+ }>, Schema.Struct<{
583
+ readonly status: Schema.Literal<"expired">;
584
+ readonly time: Schema.Struct<{
585
+ readonly created: Schema.Number;
586
+ readonly expires: Schema.Number;
587
+ }>;
588
+ }>]>;
589
+ export type CommandAttemptStatus = typeof CommandAttemptStatus.Type;
@@ -38,6 +38,12 @@ export const OAuthMethod = Schema.Struct({
38
38
  label: Schema.String,
39
39
  prompts: optional(Schema.Array(Prompt)),
40
40
  }).annotate({ identifier: "Integration.OAuthMethod" });
41
+ export const CommandMethod = Schema.Struct({
42
+ id: MethodID,
43
+ type: Schema.Literal("command"),
44
+ label: Schema.String,
45
+ command: Schema.Array(Schema.String),
46
+ }).annotate({ identifier: "Integration.CommandMethod" });
41
47
  export const KeyMethod = Schema.Struct({
42
48
  type: Schema.Literal("key"),
43
49
  label: optional(Schema.String),
@@ -46,7 +52,7 @@ export const EnvMethod = Schema.Struct({
46
52
  type: Schema.Literal("env"),
47
53
  names: Schema.Array(Schema.String),
48
54
  }).annotate({ identifier: "Integration.EnvMethod" });
49
- export const Method = Schema.Union([OAuthMethod, KeyMethod, EnvMethod])
55
+ export const Method = Schema.Union([OAuthMethod, CommandMethod, KeyMethod, EnvMethod])
50
56
  .pipe(Schema.toTaggedUnion("type"))
51
57
  .annotate({ identifier: "Integration.Method" });
52
58
  export const Inputs = Schema.Record(Schema.String, Schema.String).annotate({ identifier: "Integration.Inputs" });
@@ -90,3 +96,15 @@ export const AttemptStatus = Schema.Union([
90
96
  ])
91
97
  .pipe(Schema.toTaggedUnion("status"))
92
98
  .annotate({ identifier: "Integration.AttemptStatus" });
99
+ export const CommandAttempt = Schema.Struct({
100
+ attemptID: AttemptID,
101
+ time: AttemptTime,
102
+ }).annotate({ identifier: "Integration.CommandAttempt" });
103
+ export const CommandAttemptStatus = Schema.Union([
104
+ Schema.Struct({ status: Schema.Literal("pending"), message: optional(Schema.String), time: AttemptTime }),
105
+ Schema.Struct({ status: Schema.Literal("complete"), time: AttemptTime }),
106
+ Schema.Struct({ status: Schema.Literal("failed"), message: Schema.String, time: AttemptTime }),
107
+ Schema.Struct({ status: Schema.Literal("expired"), time: AttemptTime }),
108
+ ])
109
+ .pipe(Schema.toTaggedUnion("status"))
110
+ .annotate({ identifier: "Integration.CommandAttemptStatus" });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/schema",
4
- "version": "0.0.0-next-15624",
4
+ "version": "0.0.0-next-15626",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {