@opencode-ai/protocol
Advanced tools
@@ -20,2 +20,3 @@ import { Location } from "@opencode-ai/schema/location"; | ||
| readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>; | ||
| readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>; | ||
@@ -60,9 +61,8 @@ readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{ | ||
| }>>, never, Schema.toCodecJson<Schema.Struct<{ | ||
| readonly id: Schema.optional<Schema.brand<Schema.String, "Permission.ID"> & { | ||
| create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">; | ||
| }>; | ||
| readonly agent: Schema.optional<Schema.brand<Schema.String, "Agent.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 action: Schema.String; | ||
| readonly resources: Schema.$Array<Schema.String>; | ||
| readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>; | ||
| 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 opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{ | ||
@@ -77,3 +77,5 @@ readonly type: Schema.Literal<"tool">; | ||
| }>]>>, never, never>; | ||
| readonly agent: Schema.optional<Schema.brand<Schema.String, "Agent.ID">>; | ||
| readonly id: Schema.optional<Schema.brand<Schema.String, "Permission.ID"> & { | ||
| create: (id?: string) => string & import("effect/Brand").Brand<"Permission.ID">; | ||
| }>; | ||
| }>>, never, Schema.toCodecJson<Schema.Struct<{ | ||
@@ -100,2 +102,3 @@ readonly data: Schema.Struct<{ | ||
| readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>; | ||
| readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>; | ||
@@ -132,2 +135,3 @@ readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{ | ||
| readonly save: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>; | ||
| readonly opaque: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>; | ||
| readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>; | ||
@@ -134,0 +138,0 @@ readonly source: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Struct<{ |
@@ -7,3 +7,3 @@ import { Agent } from "@opencode-ai/schema/agent"; | ||
| import { Session } from "@opencode-ai/schema/session"; | ||
| import { Context, Schema } from "effect"; | ||
| import { Context, Schema, Struct } from "effect"; | ||
| import { HttpApiEndpoint, HttpApiGroup, HttpApiMiddleware, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"; | ||
@@ -45,7 +45,3 @@ import { PermissionNotFoundError, SessionNotFoundError } from "../errors.js"; | ||
| id: Permission.ID.pipe(Schema.optional), | ||
| action: Permission.Request.fields.action, | ||
| resources: Permission.Request.fields.resources, | ||
| save: Permission.Request.fields.save, | ||
| metadata: Permission.Request.fields.metadata, | ||
| source: Permission.Request.fields.source, | ||
| ...Struct.omit(Permission.Request.fields, ["id", "sessionID"]), | ||
| agent: Agent.ID.pipe(Schema.optional), | ||
@@ -52,0 +48,0 @@ }), |
+2
-2
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/protocol", | ||
| "version": "0.0.0-next-17403", | ||
| "version": "0.0.0-next-17428", | ||
| "type": "module", | ||
@@ -35,3 +35,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@opencode-ai/schema": "0.0.0-next-17403", | ||
| "@opencode-ai/schema": "0.0.0-next-17428", | ||
| "effect": "4.0.0-beta.101" | ||
@@ -38,0 +38,0 @@ }, |
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.
1938875
0.05%31147
0.02%+ Added
- Removed