@opencode-ai/schema 0.0.0-next-17074 → 0.0.0-next-17077

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.
@@ -6,37 +6,14 @@ import { Connection } from "./connection.js";
6
6
  import { ascending } from "./identifier.js";
7
7
  import { statics } from "./schema.js";
8
8
  import { IntegrationID, IntegrationMethodID } from "./integration-id.js";
9
+ import { Form } from "./form.js";
9
10
  export const ID = IntegrationID;
10
11
  export const MethodID = IntegrationMethodID;
11
- export const When = Schema.Struct({
12
- key: Schema.String,
13
- op: Schema.Literals(["eq", "neq"]),
14
- value: Schema.String,
15
- }).annotate({ identifier: "Integration.When" });
16
- export const TextPrompt = Schema.Struct({
17
- type: Schema.Literal("text"),
18
- key: Schema.String,
19
- message: Schema.String,
20
- placeholder: optional(Schema.String),
21
- when: optional(When),
22
- }).annotate({ identifier: "Integration.TextPrompt" });
23
- export const SelectPrompt = Schema.Struct({
24
- type: Schema.Literal("select"),
25
- key: Schema.String,
26
- message: Schema.String,
27
- options: Schema.Array(Schema.Struct({
28
- label: Schema.String,
29
- value: Schema.String,
30
- hint: optional(Schema.String),
31
- })),
32
- when: optional(When),
33
- }).annotate({ identifier: "Integration.SelectPrompt" });
34
- export const Prompt = Schema.Union([TextPrompt, SelectPrompt]).pipe(Schema.toTaggedUnion("type"));
35
12
  export const OAuthMethod = Schema.Struct({
36
13
  id: MethodID,
37
14
  type: Schema.Literal("oauth"),
38
15
  label: Schema.String,
39
- prompts: optional(Schema.Array(Prompt)),
16
+ form: optional(Form.Fields),
40
17
  }).annotate({ identifier: "Integration.OAuthMethod" });
41
18
  export const CommandMethod = Schema.Struct({
42
19
  id: MethodID,
@@ -47,6 +24,7 @@ export const CommandMethod = Schema.Struct({
47
24
  export const KeyMethod = Schema.Struct({
48
25
  type: Schema.Literal("key"),
49
26
  label: optional(Schema.String),
27
+ form: optional(Form.Fields),
50
28
  }).annotate({ identifier: "Integration.KeyMethod" });
51
29
  export const EnvMethod = Schema.Struct({
52
30
  type: Schema.Literal("env"),
@@ -55,7 +33,6 @@ export const EnvMethod = Schema.Struct({
55
33
  export const Method = Schema.Union([OAuthMethod, CommandMethod, KeyMethod, EnvMethod])
56
34
  .pipe(Schema.toTaggedUnion("type"))
57
35
  .annotate({ identifier: "Integration.Method" });
58
- export const Inputs = Schema.Record(Schema.String, Schema.String).annotate({ identifier: "Integration.Inputs" });
59
36
  const Updated = ephemeral({
60
37
  type: "integration.updated",
61
38
  schema: {},
@@ -18,8 +18,8 @@ export declare const FileAttachment: Schema.Struct<{
18
18
  }> & {
19
19
  create: (input: FileAttachment) => {
20
20
  readonly uri: string;
21
- readonly name?: string | undefined;
22
21
  readonly description?: string | undefined;
22
+ readonly name?: string | undefined;
23
23
  readonly mention?: {
24
24
  readonly start: number;
25
25
  readonly end: number;
@@ -61,8 +61,8 @@ export declare const Prompt: Schema.Struct<{
61
61
  }> & {
62
62
  create: (input: FileAttachment) => {
63
63
  readonly uri: string;
64
- readonly name?: string | undefined;
65
64
  readonly description?: string | undefined;
65
+ readonly name?: string | undefined;
66
66
  readonly mention?: {
67
67
  readonly start: number;
68
68
  readonly end: number;
@@ -85,8 +85,8 @@ export declare const Prompt: Schema.Struct<{
85
85
  }> & {
86
86
  create: (input: FileAttachment) => {
87
87
  readonly uri: string;
88
- readonly name?: string | undefined;
89
88
  readonly description?: string | undefined;
89
+ readonly name?: string | undefined;
90
90
  readonly mention?: {
91
91
  readonly start: number;
92
92
  readonly end: number;
package/dist/prompt.d.ts CHANGED
@@ -47,8 +47,8 @@ export declare const FileAttachment: Schema.Struct<{
47
47
  readonly uri: string;
48
48
  };
49
49
  readonly mime: string;
50
- readonly name?: string | undefined;
51
50
  readonly description?: string | undefined;
51
+ readonly name?: string | undefined;
52
52
  readonly mention?: {
53
53
  readonly start: number;
54
54
  readonly end: number;
@@ -120,8 +120,8 @@ export declare const Prompt: Schema.Struct<{
120
120
  readonly uri: string;
121
121
  };
122
122
  readonly mime: string;
123
- readonly name?: string | undefined;
124
123
  readonly description?: string | undefined;
124
+ readonly name?: string | undefined;
125
125
  readonly mention?: {
126
126
  readonly start: number;
127
127
  readonly end: number;
@@ -158,8 +158,8 @@ export declare const Prompt: Schema.Struct<{
158
158
  readonly uri: string;
159
159
  };
160
160
  readonly mime: string;
161
- readonly name?: string | undefined;
162
161
  readonly description?: string | undefined;
162
+ readonly name?: string | undefined;
163
163
  readonly mention?: {
164
164
  readonly start: number;
165
165
  readonly end: number;
@@ -247,8 +247,8 @@ export declare const Prompt: Schema.Struct<{
247
247
  readonly uri: string;
248
248
  };
249
249
  readonly mime: string;
250
- readonly name?: string | undefined;
251
250
  readonly description?: string | undefined;
251
+ readonly name?: string | undefined;
252
252
  readonly mention?: {
253
253
  readonly start: number;
254
254
  readonly end: number;
@@ -285,8 +285,8 @@ export declare const Prompt: Schema.Struct<{
285
285
  readonly uri: string;
286
286
  };
287
287
  readonly mime: string;
288
- readonly name?: string | undefined;
289
288
  readonly description?: string | undefined;
289
+ readonly name?: string | undefined;
290
290
  readonly mention?: {
291
291
  readonly start: number;
292
292
  readonly end: number;
@@ -905,8 +905,8 @@ export declare const InputAdmitted: Schema.Struct<{
905
905
  readonly uri: string;
906
906
  };
907
907
  readonly mime: string;
908
- readonly name?: string | undefined;
909
908
  readonly description?: string | undefined;
909
+ readonly name?: string | undefined;
910
910
  readonly mention?: {
911
911
  readonly start: number;
912
912
  readonly end: number;
@@ -943,8 +943,8 @@ export declare const InputAdmitted: Schema.Struct<{
943
943
  readonly uri: string;
944
944
  };
945
945
  readonly mime: string;
946
- readonly name?: string | undefined;
947
946
  readonly description?: string | undefined;
947
+ readonly name?: string | undefined;
948
948
  readonly mention?: {
949
949
  readonly start: number;
950
950
  readonly end: number;
@@ -1065,8 +1065,8 @@ export declare const InputAdmitted: Schema.Struct<{
1065
1065
  readonly uri: string;
1066
1066
  };
1067
1067
  readonly mime: string;
1068
- readonly name?: string | undefined;
1069
1068
  readonly description?: string | undefined;
1069
+ readonly name?: string | undefined;
1070
1070
  readonly mention?: {
1071
1071
  readonly start: number;
1072
1072
  readonly end: number;
@@ -1103,8 +1103,8 @@ export declare const InputAdmitted: Schema.Struct<{
1103
1103
  readonly uri: string;
1104
1104
  };
1105
1105
  readonly mime: string;
1106
- readonly name?: string | undefined;
1107
1106
  readonly description?: string | undefined;
1107
+ readonly name?: string | undefined;
1108
1108
  readonly mention?: {
1109
1109
  readonly start: number;
1110
1110
  readonly end: number;
@@ -4561,8 +4561,8 @@ export declare const Definitions: readonly [Schema.Struct<{
4561
4561
  readonly uri: string;
4562
4562
  };
4563
4563
  readonly mime: string;
4564
- readonly name?: string | undefined;
4565
4564
  readonly description?: string | undefined;
4565
+ readonly name?: string | undefined;
4566
4566
  readonly mention?: {
4567
4567
  readonly start: number;
4568
4568
  readonly end: number;
@@ -4599,8 +4599,8 @@ export declare const Definitions: readonly [Schema.Struct<{
4599
4599
  readonly uri: string;
4600
4600
  };
4601
4601
  readonly mime: string;
4602
- readonly name?: string | undefined;
4603
4602
  readonly description?: string | undefined;
4603
+ readonly name?: string | undefined;
4604
4604
  readonly mention?: {
4605
4605
  readonly start: number;
4606
4606
  readonly end: number;
@@ -4721,8 +4721,8 @@ export declare const Definitions: readonly [Schema.Struct<{
4721
4721
  readonly uri: string;
4722
4722
  };
4723
4723
  readonly mime: string;
4724
- readonly name?: string | undefined;
4725
4724
  readonly description?: string | undefined;
4725
+ readonly name?: string | undefined;
4726
4726
  readonly mention?: {
4727
4727
  readonly start: number;
4728
4728
  readonly end: number;
@@ -4759,8 +4759,8 @@ export declare const Definitions: readonly [Schema.Struct<{
4759
4759
  readonly uri: string;
4760
4760
  };
4761
4761
  readonly mime: string;
4762
- readonly name?: string | undefined;
4763
4762
  readonly description?: string | undefined;
4763
+ readonly name?: string | undefined;
4764
4764
  readonly mention?: {
4765
4765
  readonly start: number;
4766
4766
  readonly end: number;
@@ -8052,8 +8052,8 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
8052
8052
  readonly uri: string;
8053
8053
  };
8054
8054
  readonly mime: string;
8055
- readonly name?: string | undefined;
8056
8055
  readonly description?: string | undefined;
8056
+ readonly name?: string | undefined;
8057
8057
  readonly mention?: {
8058
8058
  readonly start: number;
8059
8059
  readonly end: number;
@@ -8090,8 +8090,8 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
8090
8090
  readonly uri: string;
8091
8091
  };
8092
8092
  readonly mime: string;
8093
- readonly name?: string | undefined;
8094
8093
  readonly description?: string | undefined;
8094
+ readonly name?: string | undefined;
8095
8095
  readonly mention?: {
8096
8096
  readonly start: number;
8097
8097
  readonly end: number;
@@ -8212,8 +8212,8 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
8212
8212
  readonly uri: string;
8213
8213
  };
8214
8214
  readonly mime: string;
8215
- readonly name?: string | undefined;
8216
8215
  readonly description?: string | undefined;
8216
+ readonly name?: string | undefined;
8217
8217
  readonly mention?: {
8218
8218
  readonly start: number;
8219
8219
  readonly end: number;
@@ -8250,8 +8250,8 @@ export declare const DurableDefinitions: readonly [...((Schema.Struct<{
8250
8250
  readonly uri: string;
8251
8251
  };
8252
8252
  readonly mime: string;
8253
- readonly name?: string | undefined;
8254
8253
  readonly description?: string | undefined;
8254
+ readonly name?: string | undefined;
8255
8255
  readonly mention?: {
8256
8256
  readonly start: number;
8257
8257
  readonly end: number;
@@ -11686,8 +11686,8 @@ export declare const Durable: Schema.Union<readonly [...((Schema.Struct<{
11686
11686
  readonly uri: string;
11687
11687
  };
11688
11688
  readonly mime: string;
11689
- readonly name?: string | undefined;
11690
11689
  readonly description?: string | undefined;
11690
+ readonly name?: string | undefined;
11691
11691
  readonly mention?: {
11692
11692
  readonly start: number;
11693
11693
  readonly end: number;
@@ -11724,8 +11724,8 @@ export declare const Durable: Schema.Union<readonly [...((Schema.Struct<{
11724
11724
  readonly uri: string;
11725
11725
  };
11726
11726
  readonly mime: string;
11727
- readonly name?: string | undefined;
11728
11727
  readonly description?: string | undefined;
11728
+ readonly name?: string | undefined;
11729
11729
  readonly mention?: {
11730
11730
  readonly start: number;
11731
11731
  readonly end: number;
@@ -11846,8 +11846,8 @@ export declare const Durable: Schema.Union<readonly [...((Schema.Struct<{
11846
11846
  readonly uri: string;
11847
11847
  };
11848
11848
  readonly mime: string;
11849
- readonly name?: string | undefined;
11850
11849
  readonly description?: string | undefined;
11850
+ readonly name?: string | undefined;
11851
11851
  readonly mention?: {
11852
11852
  readonly start: number;
11853
11853
  readonly end: number;
@@ -11884,8 +11884,8 @@ export declare const Durable: Schema.Union<readonly [...((Schema.Struct<{
11884
11884
  readonly uri: string;
11885
11885
  };
11886
11886
  readonly mime: string;
11887
- readonly name?: string | undefined;
11888
11887
  readonly description?: string | undefined;
11888
+ readonly name?: string | undefined;
11889
11889
  readonly mention?: {
11890
11890
  readonly start: number;
11891
11891
  readonly end: number;
@@ -14994,8 +14994,8 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Union<re
14994
14994
  readonly uri: string;
14995
14995
  };
14996
14996
  readonly mime: string;
14997
- readonly name?: string | undefined;
14998
14997
  readonly description?: string | undefined;
14998
+ readonly name?: string | undefined;
14999
14999
  readonly mention?: {
15000
15000
  readonly start: number;
15001
15001
  readonly end: number;
@@ -15032,8 +15032,8 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Union<re
15032
15032
  readonly uri: string;
15033
15033
  };
15034
15034
  readonly mime: string;
15035
- readonly name?: string | undefined;
15036
15035
  readonly description?: string | undefined;
15036
+ readonly name?: string | undefined;
15037
15037
  readonly mention?: {
15038
15038
  readonly start: number;
15039
15039
  readonly end: number;
@@ -15154,8 +15154,8 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Union<re
15154
15154
  readonly uri: string;
15155
15155
  };
15156
15156
  readonly mime: string;
15157
- readonly name?: string | undefined;
15158
15157
  readonly description?: string | undefined;
15158
+ readonly name?: string | undefined;
15159
15159
  readonly mention?: {
15160
15160
  readonly start: number;
15161
15161
  readonly end: number;
@@ -15192,8 +15192,8 @@ export declare const All: Schema.toTaggedUnion<"type", readonly [Schema.Union<re
15192
15192
  readonly uri: string;
15193
15193
  };
15194
15194
  readonly mime: string;
15195
- readonly name?: string | undefined;
15196
15195
  readonly description?: string | undefined;
15196
+ readonly name?: string | undefined;
15197
15197
  readonly mention?: {
15198
15198
  readonly start: number;
15199
15199
  readonly end: number;
@@ -137,8 +137,8 @@ export declare const User: Schema.Struct<{
137
137
  readonly uri: string;
138
138
  };
139
139
  readonly mime: string;
140
- readonly name?: string | undefined;
141
140
  readonly description?: string | undefined;
141
+ readonly name?: string | undefined;
142
142
  readonly mention?: {
143
143
  readonly start: number;
144
144
  readonly end: number;
@@ -175,8 +175,8 @@ export declare const User: Schema.Struct<{
175
175
  readonly uri: string;
176
176
  };
177
177
  readonly mime: string;
178
- readonly name?: string | undefined;
179
178
  readonly description?: string | undefined;
179
+ readonly name?: string | undefined;
180
180
  readonly mention?: {
181
181
  readonly start: number;
182
182
  readonly end: number;
@@ -990,8 +990,8 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
990
990
  readonly uri: string;
991
991
  };
992
992
  readonly mime: string;
993
- readonly name?: string | undefined;
994
993
  readonly description?: string | undefined;
994
+ readonly name?: string | undefined;
995
995
  readonly mention?: {
996
996
  readonly start: number;
997
997
  readonly end: number;
@@ -1028,8 +1028,8 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
1028
1028
  readonly uri: string;
1029
1029
  };
1030
1030
  readonly mime: string;
1031
- readonly name?: string | undefined;
1032
1031
  readonly description?: string | undefined;
1032
+ readonly name?: string | undefined;
1033
1033
  readonly mention?: {
1034
1034
  readonly start: number;
1035
1035
  readonly end: number;
@@ -38,8 +38,8 @@ export declare const UserData: Schema.Struct<{
38
38
  readonly uri: string;
39
39
  };
40
40
  readonly mime: string;
41
- readonly name?: string | undefined;
42
41
  readonly description?: string | undefined;
42
+ readonly name?: string | undefined;
43
43
  readonly mention?: {
44
44
  readonly start: number;
45
45
  readonly end: number;
@@ -76,8 +76,8 @@ export declare const UserData: Schema.Struct<{
76
76
  readonly uri: string;
77
77
  };
78
78
  readonly mime: string;
79
- readonly name?: string | undefined;
80
79
  readonly description?: string | undefined;
80
+ readonly name?: string | undefined;
81
81
  readonly mention?: {
82
82
  readonly start: number;
83
83
  readonly end: number;
@@ -180,8 +180,8 @@ export declare const UserMessage: Schema.Struct<{
180
180
  readonly uri: string;
181
181
  };
182
182
  readonly mime: string;
183
- readonly name?: string | undefined;
184
183
  readonly description?: string | undefined;
184
+ readonly name?: string | undefined;
185
185
  readonly mention?: {
186
186
  readonly start: number;
187
187
  readonly end: number;
@@ -218,8 +218,8 @@ export declare const UserMessage: Schema.Struct<{
218
218
  readonly uri: string;
219
219
  };
220
220
  readonly mime: string;
221
- readonly name?: string | undefined;
222
221
  readonly description?: string | undefined;
222
+ readonly name?: string | undefined;
223
223
  readonly mention?: {
224
224
  readonly start: number;
225
225
  readonly end: number;
@@ -326,8 +326,8 @@ export declare const Message: Schema.Union<readonly [Schema.Struct<{
326
326
  readonly uri: string;
327
327
  };
328
328
  readonly mime: string;
329
- readonly name?: string | undefined;
330
329
  readonly description?: string | undefined;
330
+ readonly name?: string | undefined;
331
331
  readonly mention?: {
332
332
  readonly start: number;
333
333
  readonly end: number;
@@ -364,8 +364,8 @@ export declare const Message: Schema.Union<readonly [Schema.Struct<{
364
364
  readonly uri: string;
365
365
  };
366
366
  readonly mime: string;
367
- readonly name?: string | undefined;
368
367
  readonly description?: string | undefined;
368
+ readonly name?: string | undefined;
369
369
  readonly mention?: {
370
370
  readonly start: number;
371
371
  readonly end: number;
@@ -472,8 +472,8 @@ export declare const User: Schema.Struct<{
472
472
  readonly uri: string;
473
473
  };
474
474
  readonly mime: string;
475
- readonly name?: string | undefined;
476
475
  readonly description?: string | undefined;
476
+ readonly name?: string | undefined;
477
477
  readonly mention?: {
478
478
  readonly start: number;
479
479
  readonly end: number;
@@ -510,8 +510,8 @@ export declare const User: Schema.Struct<{
510
510
  readonly uri: string;
511
511
  };
512
512
  readonly mime: string;
513
- readonly name?: string | undefined;
514
513
  readonly description?: string | undefined;
514
+ readonly name?: string | undefined;
515
515
  readonly mention?: {
516
516
  readonly start: number;
517
517
  readonly end: number;
@@ -650,8 +650,8 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
650
650
  readonly uri: string;
651
651
  };
652
652
  readonly mime: string;
653
- readonly name?: string | undefined;
654
653
  readonly description?: string | undefined;
654
+ readonly name?: string | undefined;
655
655
  readonly mention?: {
656
656
  readonly start: number;
657
657
  readonly end: number;
@@ -688,8 +688,8 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
688
688
  readonly uri: string;
689
689
  };
690
690
  readonly mime: string;
691
- readonly name?: string | undefined;
692
691
  readonly description?: string | undefined;
692
+ readonly name?: string | undefined;
693
693
  readonly mention?: {
694
694
  readonly start: number;
695
695
  readonly end: number;
@@ -293,8 +293,8 @@ export declare const Data: Schema.Struct<{
293
293
  readonly uri: string;
294
294
  };
295
295
  readonly mime: string;
296
- readonly name?: string | undefined;
297
296
  readonly description?: string | undefined;
297
+ readonly name?: string | undefined;
298
298
  readonly mention?: {
299
299
  readonly start: number;
300
300
  readonly end: number;
@@ -331,8 +331,8 @@ export declare const Data: Schema.Struct<{
331
331
  readonly uri: string;
332
332
  };
333
333
  readonly mime: string;
334
- readonly name?: string | undefined;
335
334
  readonly description?: string | undefined;
335
+ readonly name?: string | undefined;
336
336
  readonly mention?: {
337
337
  readonly start: number;
338
338
  readonly end: number;
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-17074",
4
+ "version": "0.0.0-next-17077",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {