@opencode/schema 0.0.0-dev-1322 → 0.0.0-dev-1323

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.
@@ -103,10 +103,12 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
103
103
  readonly automations: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
104
104
  readonly console_watches: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
105
105
  readonly full_codemode: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
106
+ readonly home_memory: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
106
107
  readonly machines: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
107
108
  readonly mcp_events: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
108
109
  readonly media_blob: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
109
110
  readonly recommended_api: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
111
+ readonly sqlite_fts: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
110
112
  readonly todo: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
111
113
  }>, {}>;
112
114
  export declare class Info extends Info_base {
@@ -16,6 +16,8 @@ export declare const registry: {
16
16
  readonly recommended_api: "Use each model's recommended API from models.dev instead of the first API it lists.";
17
17
  readonly full_codemode: "Enable the full Code Mode work in progress.";
18
18
  readonly machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.";
19
+ readonly home_memory: "Give sessions in the home folder a persistent memory/, docs/ and scripts/ workspace the agent can use freely, tidied by a daily maintenance session that reads the day's home-folder conversations.";
20
+ readonly sqlite_fts: "Build an SQLite full-text index of session titles and message text, once, in the background. It covers every session in the database and starts while any loaded location enables it; SQLite keeps it current from then on, also after this is turned off. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=sqlite_fts or experimental.sqlite_fts: true.";
19
21
  };
20
22
  export type Key = keyof typeof registry;
21
23
  export declare const optInOnly: ReadonlySet<Key>;
@@ -16,8 +16,10 @@ export const registry = {
16
16
  recommended_api: "Use each model's recommended API from models.dev instead of the first API it lists.",
17
17
  full_codemode: "Enable the full Code Mode work in progress.",
18
18
  machines: "Let a tool path name a machine, as in gpu:/work/train.py, and act on that machine's files and processes.",
19
+ home_memory: "Give sessions in the home folder a persistent memory/, docs/ and scripts/ workspace the agent can use freely, tidied by a daily maintenance session that reads the day's home-folder conversations.",
20
+ sqlite_fts: "Build an SQLite full-text index of session titles and message text, once, in the background. It covers every session in the database and starts while any loaded location enables it; SQLite keeps it current from then on, also after this is turned off. Off by default in every build, including local and dev; opt in with OPENCODE_FLAGS=sqlite_fts or experimental.sqlite_fts: true.",
19
21
  };
20
- export const optInOnly = new Set(["todo"]);
22
+ export const optInOnly = new Set(["todo", "sqlite_fts"]);
21
23
  /** Earlier names of a flag, still read from `experimental.<name>` and `OPENCODE_FLAGS` when the new key is unset. */
22
24
  export const aliases = {
23
25
  schedules: "automations",
@@ -185,6 +185,7 @@ export declare const User: Schema.Struct<{
185
185
  readonly time: Schema.Struct<{
186
186
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
187
187
  }>;
188
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
188
189
  readonly text: Schema.String;
189
190
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
190
191
  readonly data: Schema.String;
@@ -327,6 +328,7 @@ export declare const MediaUser: Schema.Struct<{
327
328
  readonly time: Schema.Struct<{
328
329
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
329
330
  }>;
331
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
330
332
  readonly text: Schema.String;
331
333
  readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
332
334
  readonly name: Schema.String;
@@ -772,6 +774,7 @@ export interface AssistantText extends Schema.Schema.Type<typeof AssistantText>
772
774
  }
773
775
  export declare const AssistantText: Schema.Struct<{
774
776
  readonly type: Schema.tag<"text">;
777
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
775
778
  readonly text: Schema.String;
776
779
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
777
780
  }>;
@@ -791,6 +794,7 @@ export declare const AssistantReasoning: Schema.Struct<{
791
794
  }>;
792
795
  export declare const AssistantContent: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
793
796
  readonly type: Schema.tag<"text">;
797
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
794
798
  readonly text: Schema.String;
795
799
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
796
800
  }>, Schema.Struct<{
@@ -872,6 +876,7 @@ export declare const AssistantContent: Schema.toTaggedUnion<"type", readonly [Sc
872
876
  export type AssistantContent = AssistantText | AssistantReasoning | AssistantTool;
873
877
  export declare const AssistantContentEncoded: Schema.toEncoded<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
874
878
  readonly type: Schema.tag<"text">;
879
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
875
880
  readonly text: Schema.String;
876
881
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
877
882
  }>, Schema.Struct<{
@@ -1002,8 +1007,10 @@ export declare const Assistant: Schema.Struct<{
1002
1007
  readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1003
1008
  };
1004
1009
  };
1010
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
1005
1011
  readonly content: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
1006
1012
  readonly type: Schema.tag<"text">;
1013
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
1007
1014
  readonly text: Schema.String;
1008
1015
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1009
1016
  }>, Schema.Struct<{
@@ -1173,6 +1180,7 @@ export declare const Assistant: Schema.Struct<{
1173
1180
  readonly firstToken: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
1174
1181
  /** When the provider response body ended, before tool settlement. */
1175
1182
  readonly streamed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
1183
+ /** The session search index waits for this before indexing the message (`search-index.ts`). */
1176
1184
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
1177
1185
  }>;
1178
1186
  }>;
@@ -1277,6 +1285,7 @@ export declare const CompactionCompleted: Schema.Struct<{
1277
1285
  }>, never, never>;
1278
1286
  /** A provider compaction stores its replacement window in `native.messages`, replayed instead of `summary`. */
1279
1287
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1288
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
1280
1289
  readonly summary: Schema.String;
1281
1290
  }>;
1282
1291
  export interface CompactionFailed extends Schema.Schema.Type<typeof CompactionFailed> {
@@ -1423,6 +1432,7 @@ export declare const Compaction: Schema.Union<readonly [Schema.Struct<{
1423
1432
  }>, never, never>;
1424
1433
  /** A provider compaction stores its replacement window in `native.messages`, replayed instead of `summary`. */
1425
1434
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1435
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
1426
1436
  readonly summary: Schema.String;
1427
1437
  }>, Schema.Struct<{
1428
1438
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
@@ -1674,6 +1684,7 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
1674
1684
  readonly time: Schema.Struct<{
1675
1685
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
1676
1686
  }>;
1687
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
1677
1688
  readonly text: Schema.String;
1678
1689
  readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
1679
1690
  readonly data: Schema.String;
@@ -1903,8 +1914,10 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
1903
1914
  readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
1904
1915
  };
1905
1916
  };
1917
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
1906
1918
  readonly content: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
1907
1919
  readonly type: Schema.tag<"text">;
1920
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
1908
1921
  readonly text: Schema.String;
1909
1922
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
1910
1923
  }>, Schema.Struct<{
@@ -2074,6 +2087,7 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
2074
2087
  readonly firstToken: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
2075
2088
  /** When the provider response body ended, before tool settlement. */
2076
2089
  readonly streamed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
2090
+ /** The session search index waits for this before indexing the message (`search-index.ts`). */
2077
2091
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
2078
2092
  }>;
2079
2093
  }>, Schema.Union<readonly [Schema.Struct<{
@@ -2172,6 +2186,7 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
2172
2186
  }>, never, never>;
2173
2187
  /** A provider compaction stores its replacement window in `native.messages`, replayed instead of `summary`. */
2174
2188
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2189
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
2175
2190
  readonly summary: Schema.String;
2176
2191
  }>, Schema.Struct<{
2177
2192
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
@@ -2417,6 +2432,7 @@ export declare const MediaInfo: Schema.Union<readonly [Schema.Struct<{
2417
2432
  readonly time: Schema.Struct<{
2418
2433
  readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
2419
2434
  }>;
2435
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
2420
2436
  readonly text: Schema.String;
2421
2437
  readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
2422
2438
  readonly name: Schema.String;
@@ -2692,8 +2708,10 @@ export declare const MediaInfo: Schema.Union<readonly [Schema.Struct<{
2692
2708
  readonly variant?: (string & import("effect/Brand").Brand<"Model.VariantID">) | undefined;
2693
2709
  };
2694
2710
  };
2711
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
2695
2712
  readonly content: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
2696
2713
  readonly type: Schema.tag<"text">;
2714
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
2697
2715
  readonly text: Schema.String;
2698
2716
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2699
2717
  }>, Schema.Struct<{
@@ -2863,6 +2881,7 @@ export declare const MediaInfo: Schema.Union<readonly [Schema.Struct<{
2863
2881
  readonly firstToken: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
2864
2882
  /** When the provider response body ended, before tool settlement. */
2865
2883
  readonly streamed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
2884
+ /** The session search index waits for this before indexing the message (`search-index.ts`). */
2866
2885
  readonly completed: Schema.decodeTo<Schema.optional<Schema.toType<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>>, Schema.optionalKey<Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>>, never, never>;
2867
2886
  }>;
2868
2887
  }>, Schema.Union<readonly [Schema.Struct<{
@@ -2961,6 +2980,7 @@ export declare const MediaInfo: Schema.Union<readonly [Schema.Struct<{
2961
2980
  }>, never, never>;
2962
2981
  /** A provider compaction stores its replacement window in `native.messages`, replayed instead of `summary`. */
2963
2982
  readonly native: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
2983
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
2964
2984
  readonly summary: Schema.String;
2965
2985
  }>, Schema.Struct<{
2966
2986
  readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
@@ -58,6 +58,7 @@ export const LocationSwitched = Schema.Struct({
58
58
  }).annotate({ identifier: "Session.Message.LocationSwitched" });
59
59
  export const User = Schema.Struct({
60
60
  ...Base,
61
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
61
62
  text: Prompt.fields.text,
62
63
  files: Prompt.fields.files,
63
64
  agents: Prompt.fields.agents,
@@ -140,6 +141,7 @@ export const AssistantTool = Schema.Struct({
140
141
  }).annotate({ identifier: "Session.Message.Assistant.Tool" });
141
142
  export const AssistantText = Schema.Struct({
142
143
  type: Schema.tag("text"),
144
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
143
145
  text: Schema.String,
144
146
  native: Native.pipe(optional),
145
147
  }).annotate({ identifier: "Session.Message.Assistant.Text" });
@@ -166,6 +168,7 @@ export const Assistant = Schema.Struct({
166
168
  type: Schema.tag("assistant"),
167
169
  agent: Agent.ID,
168
170
  model: Model.Ref,
171
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
169
172
  content: AssistantContent.pipe(Schema.Array),
170
173
  snapshot: Schema.Struct({
171
174
  start: Snapshot.ID.pipe(optional),
@@ -186,6 +189,7 @@ export const Assistant = Schema.Struct({
186
189
  firstToken: DateTimeUtcFromMillis.pipe(optional),
187
190
  /** When the provider response body ended, before tool settlement. */
188
191
  streamed: DateTimeUtcFromMillis.pipe(optional),
192
+ /** The session search index waits for this before indexing the message (`search-index.ts`). */
189
193
  completed: DateTimeUtcFromMillis.pipe(optional),
190
194
  }),
191
195
  }).annotate({ identifier: "Session.Message.Assistant" });
@@ -208,6 +212,7 @@ export const CompactionCompleted = Schema.Struct({
208
212
  model: Model.Ref.pipe(optional),
209
213
  /** A provider compaction stores its replacement window in `native.messages`, replayed instead of `summary`. */
210
214
  native: Native.pipe(optional),
215
+ /** Read by the session search index's SQL (`packages/core/src/session/search-index.ts`); a rename needs its `Version` bumped. */
211
216
  summary: Schema.String,
212
217
  ...CompactionUsage,
213
218
  }).annotate({ identifier: "Session.Message.Compaction.Completed" });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/schema",
4
- "version": "0.0.0-dev-1322",
4
+ "version": "0.0.0-dev-1323",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {