New:Socket for Asana Is Now Available.Learn more
Get Started

@opencode-ai/protocol

Package Overview
Dependencies
Maintainers
2
Versions
1452
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/protocol - npm Package Compare versions

Comparing version
0.0.0-dev-18560
to
0.0.0-dev-18562
+27
-1
dist/groups/persistent-pty.d.ts

@@ -7,3 +7,3 @@ import { Schema } from "effect";

export declare function hasPersistentPtyConnectTicketURL(url: URL): boolean;
export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.experimental", HttpApiEndpoint.HttpApiEndpoint<"persistentPty.list", "GET", "/api/experimental/session/:sessionID/terminal", Schema.toCodecStringTree<Schema.Struct<{
export declare const PersistentPtyGroup: HttpApiGroup.HttpApiGroup<"server.experimental", HttpApiEndpoint.HttpApiEndpoint<"persistentPty.read", "GET", "/api/experimental/session/:sessionID/terminal/read", Schema.toCodecStringTree<Schema.Struct<{
sessionID: Schema.brand<Schema.String, "SessionID"> & {

@@ -13,2 +13,28 @@ create: () => string & import("effect/Brand").Brand<"SessionID">;

};
}>>, Schema.toCodecStringTree<Schema.Struct<{
lines: Schema.optional<Schema.compose<Schema.Int, Schema.NumberFromString>>;
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
readonly data: Schema.NullOr<Schema.Struct<{
readonly ptyID: Schema.brand<Schema.String, "PtyID"> & {
create: () => string & import("effect/Brand").Brand<"PtyID">;
ascending: (id?: string) => string & import("effect/Brand").Brand<"PtyID">;
};
readonly title: Schema.String;
readonly cwd: Schema.String;
readonly foregroundProcess: Schema.NullOr<Schema.String>;
readonly screen: Schema.Struct<{
readonly text: Schema.String;
readonly cols: Schema.Int;
readonly rows: Schema.Int;
readonly cursor: Schema.Struct<{
readonly x: Schema.Int;
readonly y: Schema.Int;
}>;
}>;
}>>;
}>>, Schema.toCodecJson<typeof ServiceUnavailableError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"persistentPty.list", "GET", "/api/experimental/session/:sessionID/terminal", Schema.toCodecStringTree<Schema.Struct<{
sessionID: Schema.brand<Schema.String, "SessionID"> & {
create: () => string & import("effect/Brand").Brand<"SessionID">;
descending: (id?: string) => string & import("effect/Brand").Brand<"SessionID">;
};
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{

@@ -15,0 +41,0 @@ readonly data: Schema.$Array<Schema.Struct<{

@@ -17,2 +17,13 @@ import { PersistentPty } from "@opencode-ai/schema/persistent-pty";

export const PersistentPtyGroup = HttpApiGroup.make("server.experimental")
.add(HttpApiEndpoint.get("persistentPty.read", "/api/experimental/session/:sessionID/terminal/read", {
params: { sessionID: Session.ID },
query: {
lines: Schema.NumberFromString.pipe(Schema.decodeTo(PersistentPty.ReadLines), Schema.optional),
},
success: Schema.Struct({ data: Schema.NullOr(PersistentPty.ReadResult) }),
error: [ServiceUnavailableError],
}).annotateMerge(OpenApi.annotations({
summary: "Read the session's most recently controlled terminal",
description: "Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.",
})))
.add(HttpApiEndpoint.get("persistentPty.list", "/api/experimental/session/:sessionID/terminal", {

@@ -19,0 +30,0 @@ params: { sessionID: Session.ID },

+2
-2
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/protocol",
"version": "0.0.0-dev-18560",
"version": "0.0.0-dev-18562",
"type": "module",

@@ -35,3 +35,3 @@ "license": "MIT",

"dependencies": {
"@opencode-ai/schema": "0.0.0-dev-18560",
"@opencode-ai/schema": "0.0.0-dev-18562",
"effect": "4.0.0-rc.112"

@@ -38,0 +38,0 @@ },