Sign In

@opencode-ai/schema

Package Overview
Dependencies
Maintainers
2
Versions
969
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/schema - npm Package Compare versions

Comparing version
0.0.0-next-17255
to
0.0.0-next-17263
+15
-0
dist/session-message.js

@@ -5,3 +5,5 @@ export * as SessionMessage from "./session-message.js";

import { Content } from "./tool.js";
import { Location } from "./location.js";
import { Model } from "./model.js";
import { Project } from "./project.js";
import { Prompt } from "./prompt.js";

@@ -43,2 +45,14 @@ import { DateTimeUtcFromMillis, PositiveInt, RelativePath, statics } from "./schema.js";

}).annotate({ identifier: "Session.Message.ModelSelected" });
export const LocationSwitched = Schema.Struct({
...Base,
type: Schema.tag("location-switched"),
location: Location.Ref,
projectID: Project.ID.pipe(optional),
subpath: RelativePath.pipe(optional),
previous: Schema.Struct({
location: Location.Ref,
projectID: Project.ID.pipe(optional),
subpath: RelativePath.pipe(optional),
}).pipe(optional),
}).annotate({ identifier: "Session.Message.LocationSwitched" });
export const User = Schema.Struct({

@@ -186,2 +200,3 @@ ...Base,

ModelSelected,
LocationSwitched,
User,

@@ -188,0 +203,0 @@ Synthetic,

@@ -266,2 +266,63 @@ export * as SessionTransfer from "./session-transfer.js";

}>, Schema.Struct<{
readonly type: Schema.tag<"location-switched">;
readonly location: Schema.Struct<{
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
}>, never, never>;
}>;
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
global: string & import("effect/Brand").Brand<"Project.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
global: string & import("effect/Brand").Brand<"Project.ID">;
}>, never, never>;
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
readonly previous: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
readonly location: Schema.Struct<{
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
}>, never, never>;
}>;
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
global: string & import("effect/Brand").Brand<"Project.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
global: string & import("effect/Brand").Brand<"Project.ID">;
}>, never, never>;
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
}>>>, Schema.optionalKey<Schema.Struct<{
readonly location: Schema.Struct<{
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
}>, never, never>;
}>;
readonly projectID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Project.ID"> & {
global: string & import("effect/Brand").Brand<"Project.ID">;
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Project.ID"> & {
global: string & import("effect/Brand").Brand<"Project.ID">;
}>, never, never>;
readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>;
}>>, never, never>;
readonly id: Schema.brand<Schema.String, "Session.Message.ID"> & {
create: () => string & import("effect/Brand").Brand<"Session.Message.ID">;
fromEvent: (eventID: import("./event.js").ID) => string & import("effect/Brand").Brand<"Session.Message.ID">;
};
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
readonly time: Schema.Struct<{
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
}>;
}>, Schema.Struct<{
readonly text: Schema.String;

@@ -268,0 +329,0 @@ readonly files: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{

+1
-1
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/schema",
"version": "0.0.0-next-17255",
"version": "0.0.0-next-17263",
"type": "module",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display