@opencode/schema 2.0.32 → 2.1.0

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.
Files changed (37) hide show
  1. package/dist/config/experimental.d.ts +1 -0
  2. package/dist/config/experimental.js +3 -0
  3. package/dist/config/provider.d.ts +56 -52
  4. package/dist/credential-legacy.d.ts +54 -0
  5. package/dist/credential-legacy.js +19 -0
  6. package/dist/credential.d.ts +0 -4
  7. package/dist/credential.js +0 -2
  8. package/dist/event-manifest.d.ts +1111 -1149
  9. package/dist/event-manifest.js +1 -2
  10. package/dist/form.d.ts +213 -213
  11. package/dist/instruction-entry.d.ts +1 -1
  12. package/dist/integration.d.ts +257 -257
  13. package/dist/model-compatibility.d.ts +3 -0
  14. package/dist/model-compatibility.js +2 -0
  15. package/dist/model.d.ts +76 -74
  16. package/dist/persistent-pty.d.ts +88 -88
  17. package/dist/prompt-input.d.ts +3 -3
  18. package/dist/prompt.d.ts +28 -28
  19. package/dist/provider.d.ts +2 -0
  20. package/dist/session-event.d.ts +5729 -5723
  21. package/dist/session-event.js +20 -13
  22. package/dist/session-inbox.d.ts +20 -20
  23. package/dist/session-legacy.d.ts +7 -0
  24. package/dist/session-legacy.js +118 -0
  25. package/dist/session-message.d.ts +125 -268
  26. package/dist/session-message.js +13 -12
  27. package/dist/session-revert.d.ts +407 -183
  28. package/dist/session-transfer.d.ts +33 -83
  29. package/dist/session.d.ts +109 -1
  30. package/dist/session.js +64 -2
  31. package/dist/v1/permission.d.ts +8 -8
  32. package/dist/v1/session.d.ts +696 -696
  33. package/package.json +4 -4
  34. package/dist/session-compaction-event.d.ts +0 -87
  35. package/dist/session-compaction-event.js +0 -10
  36. package/dist/session-provider-context.d.ts +0 -54
  37. package/dist/session-provider-context.js +0 -17
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": "2.0.32",
4
+ "version": "2.1.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "scripts": {
29
29
  "build": "bun run script/build.ts",
30
30
  "test": "bun test --only-failures",
31
- "typecheck": "tsgo --noEmit"
31
+ "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "dependencies": {
34
34
  "@standard-schema/spec": "1.1.0",
@@ -37,7 +37,7 @@
37
37
  "devDependencies": {
38
38
  "@tsconfig/bun": "1.0.9",
39
39
  "@types/bun": "1.4.0",
40
- "@typescript/native-preview": "7.0.0-dev.20251207.1",
41
- "typescript": "5.8.2"
40
+ "@typescript/native": "npm:typescript@7.0.2",
41
+ "typescript": "npm:@typescript/typescript6@6.0.2"
42
42
  }
43
43
  }
@@ -1,87 +0,0 @@
1
- export * as SessionCompactionEvent from "./session-compaction-event.js";
2
- export declare const Compacted: import("effect/Schema").Struct<{
3
- readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
4
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
5
- };
6
- readonly created: import("effect/Schema").Finite;
7
- readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
8
- readonly type: import("effect/Schema").Literal<"session.compacted">;
9
- readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
10
- readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
11
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
12
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
13
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
14
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
15
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
16
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
17
- }>, never, never>;
18
- }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
19
- readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
20
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
21
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
22
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
23
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
24
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
25
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
26
- }>, never, never>;
27
- }>>, never, never>;
28
- readonly data: import("effect/Schema").Struct<{
29
- readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
30
- create: () => string & import("effect/Brand").Brand<"SessionID">;
31
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
32
- };
33
- }>;
34
- }> & {
35
- type: "session.compacted";
36
- durability: "ephemeral";
37
- durable: undefined;
38
- data: import("effect/Schema").Struct<{
39
- readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
40
- create: () => string & import("effect/Brand").Brand<"SessionID">;
41
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
42
- };
43
- }>;
44
- };
45
- export declare const Definitions: readonly [import("effect/Schema").Struct<{
46
- readonly id: import("effect/Schema").brand<import("effect/Schema").String, "Event.ID"> & {
47
- create: () => string & import("effect/Brand").Brand<"Event.ID">;
48
- };
49
- readonly created: import("effect/Schema").Finite;
50
- readonly metadata: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>>, import("effect/Schema").optionalKey<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Unknown>>, never, never>;
51
- readonly type: import("effect/Schema").Literal<"session.compacted">;
52
- readonly location: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").Struct<{
53
- readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
54
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
55
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
56
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
57
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
58
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
59
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
60
- }>, never, never>;
61
- }>>>, import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
62
- readonly directory: import("effect/Schema").brand<import("effect/Schema").String, "AbsolutePath">;
63
- readonly workspaceID: import("effect/Schema").decodeTo<import("effect/Schema").optional<import("effect/Schema").toType<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
64
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
65
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
66
- }>>, import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "Workspace.ID"> & {
67
- ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
68
- create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
69
- }>, never, never>;
70
- }>>, never, never>;
71
- readonly data: import("effect/Schema").Struct<{
72
- readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
73
- create: () => string & import("effect/Brand").Brand<"SessionID">;
74
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
75
- };
76
- }>;
77
- }> & {
78
- type: "session.compacted";
79
- durability: "ephemeral";
80
- durable: undefined;
81
- data: import("effect/Schema").Struct<{
82
- readonly sessionID: import("effect/Schema").brand<import("effect/Schema").String, "SessionID"> & {
83
- create: () => string & import("effect/Brand").Brand<"SessionID">;
84
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
85
- };
86
- }>;
87
- }];
@@ -1,10 +0,0 @@
1
- export * as SessionCompactionEvent from "./session-compaction-event.js";
2
- import { Event } from "./event.js";
3
- import { SessionID } from "./session-id.js";
4
- export const Compacted = Event.ephemeral({
5
- type: "session.compacted",
6
- schema: {
7
- sessionID: SessionID,
8
- },
9
- });
10
- export const Definitions = Event.inventory(Compacted);
@@ -1,54 +0,0 @@
1
- export * as SessionProviderContext from "./session-provider-context.js";
2
- import { Schema } from "effect";
3
- /** Exact producing model/deployment and route identity, never credentials or a connection ID. */
4
- export interface Provenance extends Schema.Schema.Type<typeof Provenance> {
5
- }
6
- export declare const Provenance: Schema.Struct<{
7
- readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
8
- opencode: string & import("effect/Brand").Brand<"Provider.ID">;
9
- anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
10
- openai: string & import("effect/Brand").Brand<"Provider.ID">;
11
- google: string & import("effect/Brand").Brand<"Provider.ID">;
12
- googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
13
- githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
14
- amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
15
- azure: string & import("effect/Brand").Brand<"Provider.ID">;
16
- openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
17
- mistral: string & import("effect/Brand").Brand<"Provider.ID">;
18
- gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
19
- };
20
- readonly provider: Schema.String;
21
- readonly modelID: Schema.String;
22
- readonly route: Schema.String;
23
- readonly protocol: Schema.String;
24
- /** Digest of the configured endpoint; raw URLs and query values are not persisted. */
25
- readonly endpoint: Schema.String;
26
- }>;
27
- /** Core validates the versioned canonical AI Message[] payload on installation and replay. */
28
- export interface Info extends Schema.Schema.Type<typeof Info> {
29
- }
30
- export declare const Info: Schema.Struct<{
31
- readonly version: Schema.Literal<1>;
32
- readonly provenance: Schema.Struct<{
33
- readonly providerID: Schema.brand<Schema.String, "Provider.ID"> & {
34
- opencode: string & import("effect/Brand").Brand<"Provider.ID">;
35
- anthropic: string & import("effect/Brand").Brand<"Provider.ID">;
36
- openai: string & import("effect/Brand").Brand<"Provider.ID">;
37
- google: string & import("effect/Brand").Brand<"Provider.ID">;
38
- googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
39
- githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
40
- amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
41
- azure: string & import("effect/Brand").Brand<"Provider.ID">;
42
- openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
43
- mistral: string & import("effect/Brand").Brand<"Provider.ID">;
44
- gitlab: string & import("effect/Brand").Brand<"Provider.ID">;
45
- };
46
- readonly provider: Schema.String;
47
- readonly modelID: Schema.String;
48
- readonly route: Schema.String;
49
- readonly protocol: Schema.String;
50
- /** Digest of the configured endpoint; raw URLs and query values are not persisted. */
51
- readonly endpoint: Schema.String;
52
- }>;
53
- readonly messages: Schema.Codec<Schema.Json, Schema.Json, never, never>;
54
- }>;
@@ -1,17 +0,0 @@
1
- export * as SessionProviderContext from "./session-provider-context.js";
2
- import { Schema } from "effect";
3
- import { Provider } from "./provider.js";
4
- export const Provenance = Schema.Struct({
5
- providerID: Provider.ID,
6
- provider: Schema.String,
7
- modelID: Schema.String,
8
- route: Schema.String,
9
- protocol: Schema.String,
10
- /** Digest of the configured endpoint; raw URLs and query values are not persisted. */
11
- endpoint: Schema.String,
12
- }).annotate({ identifier: "Session.ProviderContext.Provenance" });
13
- export const Info = Schema.Struct({
14
- version: Schema.Literal(1),
15
- provenance: Provenance,
16
- messages: Schema.Json,
17
- }).annotate({ identifier: "Session.ProviderContext" });