@opencode/plugin 0.0.0-dev-19400 → 0.0.0-dev-19403

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.
@@ -16,19 +16,25 @@ export interface SessionPrompt {
16
16
  metadata?: Record<string, unknown>;
17
17
  delivery: SessionInbox.Delivery;
18
18
  }
19
- export interface SessionContext {
19
+ /** Request overrides. Typed keys are generation settings; any other key is a provider option. */
20
+ export type SessionRequestOptions = Types.DeepMutable<GenerationOptionsFields> & Record<string, unknown>;
21
+ export interface SessionRequest {
20
22
  readonly sessionID: Session.ID;
21
- readonly agent: Agent.ID;
22
23
  readonly model: Model.Ref;
23
24
  system: Array<SystemPart>;
24
25
  messages: Array<Message>;
26
+ options: SessionRequestOptions;
27
+ }
28
+ export interface SessionContext extends SessionRequest {
29
+ readonly agent: Agent.ID;
25
30
  tools: Record<string, {
26
31
  description: string;
27
32
  input: JsonSchema.JsonSchema;
28
33
  }>;
29
- /** Request overrides; unset fields retain route and model defaults. */
30
- generation: Types.DeepMutable<GenerationOptionsFields>;
31
- providerOptions: Record<string, unknown>;
34
+ }
35
+ export interface SessionTitle extends SessionRequest {
36
+ /** Set to use this title and skip the model request. */
37
+ result?: string;
32
38
  }
33
39
  /**
34
40
  * Why a Session request is being made. Auxiliary requests share the Session's
@@ -75,6 +81,7 @@ export interface SessionRetry {
75
81
  export interface SessionHooks {
76
82
  readonly prompt: SessionPrompt;
77
83
  readonly context: SessionContext;
84
+ readonly title: SessionTitle;
78
85
  readonly "model.request": SessionModelRequest;
79
86
  readonly "http.request": SessionHttpRequest;
80
87
  readonly "http.response": SessionHttpResponse;
@@ -16,19 +16,25 @@ export interface SessionPrompt {
16
16
  metadata?: Record<string, unknown>;
17
17
  delivery: SessionInbox.Delivery;
18
18
  }
19
- export interface SessionContext {
19
+ /** Request overrides. Typed keys are generation settings; any other key is a provider option. */
20
+ export type SessionRequestOptions = Types.DeepMutable<GenerationOptionsFields> & Record<string, unknown>;
21
+ export interface SessionRequest {
20
22
  readonly sessionID: Session.ID;
21
- readonly agent: Agent.ID;
22
23
  readonly model: Model.Ref;
23
24
  system: Array<SystemPart>;
24
25
  messages: Array<Message>;
26
+ options: SessionRequestOptions;
27
+ }
28
+ export interface SessionContext extends SessionRequest {
29
+ readonly agent: Agent.ID;
25
30
  tools: Record<string, {
26
31
  description: string;
27
32
  input: JsonSchema.JsonSchema;
28
33
  }>;
29
- /** Request overrides; unset fields retain route and model defaults. */
30
- generation: Types.DeepMutable<GenerationOptionsFields>;
31
- providerOptions: Record<string, unknown>;
34
+ }
35
+ export interface SessionTitle extends SessionRequest {
36
+ /** Set to use this title and skip the model request. */
37
+ result?: string;
32
38
  }
33
39
  /**
34
40
  * Why a Session request is being made. Auxiliary requests share the Session's
@@ -75,6 +81,7 @@ export interface SessionRetry {
75
81
  export interface SessionHooks {
76
82
  readonly prompt: SessionPrompt;
77
83
  readonly context: SessionContext;
84
+ readonly title: SessionTitle;
78
85
  readonly "model.request": SessionModelRequest;
79
86
  readonly "http.request": SessionHttpRequest;
80
87
  readonly "http.response": SessionHttpResponse;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/plugin",
4
- "version": "0.0.0-dev-19400",
4
+ "version": "0.0.0-dev-19403",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -43,17 +43,17 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@ai-sdk/provider": "3.0.8",
46
- "@opencode/ai": "0.0.0-dev-19400",
47
- "@opencode/client": "0.0.0-dev-19400",
48
- "@opencode/protocol": "0.0.0-dev-19400",
49
- "@opencode/schema": "0.0.0-dev-19400",
50
- "@opencode/util": "0.0.0-dev-19400",
46
+ "@opencode/ai": "0.0.0-dev-19403",
47
+ "@opencode/client": "0.0.0-dev-19403",
48
+ "@opencode/protocol": "0.0.0-dev-19403",
49
+ "@opencode/schema": "0.0.0-dev-19403",
50
+ "@opencode/util": "0.0.0-dev-19403",
51
51
  "@standard-schema/spec": "1.1.0",
52
52
  "effect": "4.0.0-rc.112",
53
53
  "zod": "4.1.8"
54
54
  },
55
55
  "peerDependencies": {
56
- "@opencode/theme": "0.0.0-dev-19400",
56
+ "@opencode/theme": "0.0.0-dev-19403",
57
57
  "@opentui/core": ">=0.5.10",
58
58
  "@opentui/solid": ">=0.5.10",
59
59
  "solid-js": ">=1.9.0"
@@ -73,7 +73,7 @@
73
73
  }
74
74
  },
75
75
  "devDependencies": {
76
- "@opencode/theme": "0.0.0-dev-19400",
76
+ "@opencode/theme": "0.0.0-dev-19403",
77
77
  "@opentui/core": "0.5.10",
78
78
  "@opentui/solid": "0.5.10",
79
79
  "@tsconfig/bun": "1.0.9",