@opencode-ai/schema
Advanced tools
@@ -87,2 +87,3 @@ export * as ConfigProvider from "./provider.js"; | ||
| readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("../model.js").ReasoningField, import("../model.js").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("../model.js").ReasoningField, import("../model.js").ReasoningField, never, never>>, never, never>; | ||
| readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>; | ||
@@ -93,2 +94,3 @@ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<import("../model.js").ReasoningField, import("../model.js").ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<import("../model.js").ReasoningField, import("../model.js").ReasoningField, never, never>>, never, never>; | ||
| readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>; | ||
@@ -95,0 +97,0 @@ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; |
@@ -44,2 +44,3 @@ export * as Integration from "./integration.js"; | ||
| name: Schema.String, | ||
| metadata: optional(Schema.Record(Schema.String, Schema.Any)), | ||
| }).annotate({ identifier: "Integration.Ref" }); | ||
@@ -49,2 +50,3 @@ export const Info = Schema.Struct({ | ||
| name: Schema.String, | ||
| metadata: optional(Schema.Record(Schema.String, Schema.Any)), | ||
| methods: Schema.Array(Method), | ||
@@ -51,0 +53,0 @@ connections: Schema.Array(Connection.Info), |
+6
-0
@@ -43,2 +43,4 @@ export * as Model from "./model.js"; | ||
| readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>; | ||
| /** Require every assistant message to include its reasoning field, even when empty. */ | ||
| readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>; | ||
@@ -159,2 +161,4 @@ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>; | ||
| /** Require every assistant message to include its reasoning field, even when empty. */ | ||
| readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>; | ||
@@ -165,2 +169,4 @@ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly reasoningField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Codec<ReasoningField, ReasoningField, never, never>>>, Schema.optionalKey<Schema.Codec<ReasoningField, ReasoningField, never, never>>, never, never>; | ||
| /** Require every assistant message to include its reasoning field, even when empty. */ | ||
| readonly requireReasoning: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly maxTokensField: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>>, Schema.optionalKey<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>, never, never>; | ||
@@ -167,0 +173,0 @@ readonly requireFinishReason: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; |
+2
-0
@@ -42,2 +42,4 @@ export * as Model from "./model.js"; | ||
| reasoningField: ReasoningField.pipe(optional), | ||
| /** Require every assistant message to include its reasoning field, even when empty. */ | ||
| requireReasoning: Schema.Boolean.pipe(optional), | ||
| maxTokensField: MaxTokensField.pipe(optional), | ||
@@ -44,0 +46,0 @@ requireFinishReason: Schema.Boolean.pipe(optional), |
+5
-0
@@ -78,2 +78,3 @@ import { Schema } from "effect"; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -196,2 +197,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -209,2 +211,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -234,2 +237,3 @@ readonly start: Schema.Finite; | ||
| readonly name: string & import("effect/Brand").Brand<"Skill.Name">; | ||
| readonly text?: string | undefined; | ||
| readonly mention?: { | ||
@@ -272,2 +276,3 @@ readonly start: number; | ||
| readonly name: string & import("effect/Brand").Brand<"Skill.Name">; | ||
| readonly text?: string | undefined; | ||
| readonly mention?: { | ||
@@ -274,0 +279,0 @@ readonly start: number; |
+1
-0
@@ -43,2 +43,3 @@ import { Schema } from "effect"; | ||
| name: Skill.Name, | ||
| text: Schema.String.pipe(optional), | ||
| mention: PromptMention.pipe(optional), | ||
@@ -45,0 +46,0 @@ }).annotate({ identifier: "Prompt.SkillAttachment" }); |
@@ -113,2 +113,3 @@ export * as SessionInbox from "./session-inbox.js"; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -126,2 +127,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -274,2 +276,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -287,2 +290,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -443,2 +447,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -456,2 +461,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -654,2 +660,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -667,2 +674,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -669,0 +677,0 @@ readonly start: Schema.Finite; |
@@ -434,2 +434,3 @@ export * as SessionTransfer from "./session-transfer.js"; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -447,2 +448,3 @@ readonly start: Schema.Finite; | ||
| readonly name: Schema.brand<Schema.String, "Skill.Name">; | ||
| readonly text: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>; | ||
| readonly mention: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -449,0 +451,0 @@ readonly start: Schema.Finite; |
+22
-0
@@ -130,2 +130,7 @@ export * as Worktree from "./worktree.js"; | ||
| }; | ||
| readonly adopted: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "Project.ID"> & { | ||
| global: string & import("effect/Brand").Brand<"Project.ID">; | ||
| }>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "Project.ID"> & { | ||
| global: string & import("effect/Brand").Brand<"Project.ID">; | ||
| }>>, never, never>; | ||
| }>; | ||
@@ -147,2 +152,7 @@ }> & { | ||
| }; | ||
| readonly adopted: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "Project.ID"> & { | ||
| global: string & import("effect/Brand").Brand<"Project.ID">; | ||
| }>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "Project.ID"> & { | ||
| global: string & import("effect/Brand").Brand<"Project.ID">; | ||
| }>>, never, never>; | ||
| }>; | ||
@@ -229,2 +239,7 @@ }; | ||
| }; | ||
| readonly adopted: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "Project.ID"> & { | ||
| global: string & import("effect/Brand").Brand<"Project.ID">; | ||
| }>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "Project.ID"> & { | ||
| global: string & import("effect/Brand").Brand<"Project.ID">; | ||
| }>>, never, never>; | ||
| }>; | ||
@@ -246,2 +261,7 @@ }> & { | ||
| }; | ||
| readonly adopted: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "Project.ID"> & { | ||
| global: string & import("effect/Brand").Brand<"Project.ID">; | ||
| }>>>, Schema.optionalKey<Schema.$Array<Schema.brand<Schema.String, "Project.ID"> & { | ||
| global: string & import("effect/Brand").Brand<"Project.ID">; | ||
| }>>, never, never>; | ||
| }>; | ||
@@ -253,2 +273,3 @@ }]; | ||
| readonly directory: string; | ||
| readonly workspaceID?: string; | ||
| }, event: { | ||
@@ -258,2 +279,3 @@ readonly projectID: string; | ||
| readonly previous: string; | ||
| readonly adopted?: ReadonlyArray<string>; | ||
| }): { | ||
@@ -260,0 +282,0 @@ projectID: string; |
+23
-8
@@ -43,2 +43,3 @@ export * as Worktree from "./worktree.js"; | ||
| previous: Project.ID, | ||
| adopted: optional(Schema.Array(Project.ID)), | ||
| }, | ||
@@ -48,17 +49,31 @@ }); | ||
| export function adopt(session, event) { | ||
| if (session.projectID !== event.previous && session.projectID !== Project.ID.global) | ||
| if (session.workspaceID) | ||
| return; | ||
| if (session.projectID !== event.previous && | ||
| session.projectID !== Project.ID.global && | ||
| !event.adopted?.includes(session.projectID)) | ||
| return; | ||
| if (session.projectID === event.projectID) | ||
| return; | ||
| const inside = session.directory === event.directory || | ||
| session.directory.startsWith(event.directory + "/") || | ||
| session.directory.startsWith(event.directory + "\\"); | ||
| if (!inside) | ||
| const normalize = (value) => value | ||
| .replaceAll("\\", "/") | ||
| .split("/") | ||
| .reduce((result, segment) => { | ||
| if (!segment || segment === ".") | ||
| return result; | ||
| if (segment === "..") | ||
| return result.slice(0, result.lastIndexOf("/")); | ||
| return `${result}/${segment}`; | ||
| }, ""); | ||
| const directory = normalize(session.directory); | ||
| const root = normalize(event.directory); | ||
| const windows = /^\/[a-z]:/i.test(root); | ||
| const key = windows ? directory.toLowerCase() : directory; | ||
| const parent = windows ? root.toLowerCase() : root; | ||
| if (key !== parent && !key.startsWith(parent + "/")) | ||
| return; | ||
| return { | ||
| projectID: event.projectID, | ||
| subpath: session.directory === event.directory | ||
| ? undefined | ||
| : session.directory.slice(event.directory.length + 1).replaceAll("\\", "/"), | ||
| subpath: key === parent ? undefined : directory.slice(root.length + 1), | ||
| }; | ||
| } |
+1
-1
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/schema", | ||
| "version": "0.0.0-beta-18230", | ||
| "version": "0.0.0-beta-18269", | ||
| "type": "module", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
3589301
0.34%57015
0.21%