@opencode/schema 2.1.3 → 2.2.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 (50) hide show
  1. package/dist/agent.d.ts +5 -0
  2. package/dist/config/experimental.d.ts +2 -0
  3. package/dist/config/experimental.js +6 -0
  4. package/dist/config/provider.d.ts +73 -7
  5. package/dist/config/provider.js +10 -15
  6. package/dist/event-manifest.d.ts +128 -366
  7. package/dist/file-diff.d.ts +2 -0
  8. package/dist/file-diff.js +2 -0
  9. package/dist/generate.d.ts +355 -0
  10. package/dist/generate.js +134 -0
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/mcp.d.ts +1 -0
  14. package/dist/mcp.js +2 -0
  15. package/dist/model-compatibility.d.ts +15 -4
  16. package/dist/model-compatibility.js +15 -4
  17. package/dist/model.d.ts +53 -2
  18. package/dist/model.js +9 -7
  19. package/dist/permission.d.ts +0 -9
  20. package/dist/persistent-pty.d.ts +0 -20
  21. package/dist/plugin.d.ts +15 -0
  22. package/dist/plugin.js +11 -1
  23. package/dist/prompt-input.d.ts +3 -36
  24. package/dist/prompt-input.js +2 -6
  25. package/dist/prompt.d.ts +96 -0
  26. package/dist/prompt.js +17 -1
  27. package/dist/provider.d.ts +40 -0
  28. package/dist/provider.js +14 -3
  29. package/dist/session-event.d.ts +320 -852
  30. package/dist/session-event.js +0 -7
  31. package/dist/session-fork.d.ts +2 -2
  32. package/dist/session-id.d.ts +0 -1
  33. package/dist/session-id.js +3 -7
  34. package/dist/session-inbox.d.ts +721 -101
  35. package/dist/session-inbox.js +10 -1
  36. package/dist/session-message.d.ts +998 -31
  37. package/dist/session-message.js +19 -2
  38. package/dist/session-revert.d.ts +64 -27
  39. package/dist/session-status-event.d.ts +0 -8
  40. package/dist/session-transfer.d.ts +23 -24
  41. package/dist/session.d.ts +12 -22
  42. package/dist/usage-limits.d.ts +227 -0
  43. package/dist/usage-limits.js +59 -0
  44. package/dist/v1/legacy-event.d.ts +0 -4
  45. package/dist/v1/permission.d.ts +0 -10
  46. package/dist/v1/session.d.ts +0 -177
  47. package/dist/vcs.d.ts +3 -0
  48. package/dist/vcs.js +2 -0
  49. package/dist/workspace-id.js +0 -2
  50. package/package.json +5 -3
@@ -24,13 +24,6 @@ import { SessionInbox } from "./session-inbox.js";
24
24
  import { Project } from "./project.js";
25
25
  import { SessionFork } from "./session-fork.js";
26
26
  import { Permission } from "./permission.js";
27
- export const Source = Schema.Struct({
28
- start: NonNegativeInt,
29
- end: NonNegativeInt,
30
- text: Schema.String,
31
- }).annotate({
32
- identifier: "Session.Event.Source",
33
- });
34
27
  const Base = {
35
28
  sessionID: SessionID,
36
29
  };
@@ -4,13 +4,13 @@ export declare const Boundary: Schema.Union<readonly [Schema.Struct<{
4
4
  readonly type: Schema.Literal<"before">;
5
5
  readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
6
6
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
7
- fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
7
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
8
8
  };
9
9
  }>, Schema.Struct<{
10
10
  readonly type: Schema.Literal<"through">;
11
11
  readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & {
12
12
  create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
13
- fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
13
+ fromEvent: (eventID: string) => string & import("effect/Brand").Brand<"Session.Message.ID">;
14
14
  };
15
15
  }>]>;
16
16
  export type Boundary = typeof Boundary.Type;
@@ -1,6 +1,5 @@
1
1
  import { Schema } from "effect";
2
2
  export declare const SessionID: Schema.brand<Schema.String, "SessionID"> & {
3
3
  create: () => string & import("effect/Brand").Brand<"SessionID">;
4
- descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
5
4
  };
6
5
  export type SessionID = typeof SessionID.Type;
@@ -1,10 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { descending } from "./identifier.js";
3
3
  import { statics } from "./schema.js";
4
- export const SessionID = Schema.String.check(Schema.isStartingWith("ses")).pipe(Schema.brand("SessionID"), Schema.annotate({ identifier: "Session.ID" }), statics((schema) => {
5
- const create = () => schema.make("ses_" + descending());
6
- return {
7
- create,
8
- descending: (id) => (id === undefined ? create() : schema.make(id)),
9
- };
10
- }));
4
+ export const SessionID = Schema.String.check(Schema.isStartingWith("ses")).pipe(Schema.brand("SessionID"), Schema.annotate({ identifier: "Session.ID" }), statics((schema) => ({
5
+ create: () => schema.make("ses_" + descending()),
6
+ })));