@opencode/schema 0.0.0-dev-1344 → 0.0.0-dev-1345

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.
package/dist/agent.d.ts CHANGED
@@ -107,6 +107,19 @@ export declare const Info: Schema.Struct<{
107
107
  readonly body: Schema.$Record<Schema.String, Schema.Any>;
108
108
  }>;
109
109
  readonly system: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
110
+ /**
111
+ * Added to the default prompt while the agent is selected, without replacing it like `system`. A string is
112
+ * introduced as this agent's instructions, and core tells the model when they stop applying. `{ selected, unselected }`
113
+ * sends both texts exactly as written: `selected` while the agent is selected, `unselected` once when the session
114
+ * switches away.
115
+ */
116
+ readonly instructions: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.String, Schema.Struct<{
117
+ readonly selected: Schema.String;
118
+ readonly unselected: Schema.String;
119
+ }>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Struct<{
120
+ readonly selected: Schema.String;
121
+ readonly unselected: Schema.String;
122
+ }>]>>, never, never>;
110
123
  readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
111
124
  readonly mode: Schema.Literals<readonly ["subagent", "primary", "all"]>;
112
125
  readonly hidden: Schema.Boolean;
package/dist/agent.js CHANGED
@@ -16,6 +16,13 @@ export const Info = Schema.Struct({
16
16
  model: Model.Ref.pipe(optional),
17
17
  request: Provider.Request,
18
18
  system: Schema.String.pipe(optional),
19
+ /**
20
+ * Added to the default prompt while the agent is selected, without replacing it like `system`. A string is
21
+ * introduced as this agent's instructions, and core tells the model when they stop applying. `{ selected, unselected }`
22
+ * sends both texts exactly as written: `selected` while the agent is selected, `unselected` once when the session
23
+ * switches away.
24
+ */
25
+ instructions: Schema.Union([Schema.String, Schema.Struct({ selected: Schema.String, unselected: Schema.String })]).pipe(optional),
19
26
  description: Schema.String.pipe(optional),
20
27
  mode: Schema.Literals(["subagent", "primary", "all"]),
21
28
  hidden: Schema.Boolean,
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-1344",
4
+ "version": "0.0.0-dev-1345",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {