Merge branch 'v2' into directory-attachment-expansion

This commit is contained in:
Kit Langton 2026-07-02 16:04:24 -04:00 committed by GitHub
commit a695827dc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
174 changed files with 10362 additions and 8342 deletions

View file

@ -38,7 +38,7 @@ export const Info = Schema.Struct({
empty: (id: ID) =>
schema.make({
id,
request: { headers: {}, body: {} },
request: { settings: {}, headers: {}, body: {} },
mode: "all",
hidden: false,
permissions: [

View file

@ -1,9 +1,12 @@
export * as Command from "./command.js"
import { Schema } from "effect"
import { define, inventory } from "./event.js"
import { optional } from "./schema.js"
import { Model } from "./model.js"
const Updated = define({ type: "command.updated", schema: {} })
export interface Info extends Schema.Schema.Type<typeof Info> {}
export const Info = Schema.Struct({
name: Schema.String,
@ -13,3 +16,8 @@ export const Info = Schema.Struct({
model: Model.Ref.pipe(optional),
subtask: Schema.Boolean.pipe(optional),
}).annotate({ identifier: "CommandV2.Info" })
export const Event = {
Updated,
Definitions: inventory(Updated),
}

View file

@ -2,6 +2,7 @@ export * as EventManifest from "./event-manifest.js"
import { Agent } from "./agent.js"
import { Catalog } from "./catalog.js"
import { Command } from "./command.js"
import { Durable } from "./durable-event-manifest.js"
import { Event } from "./event.js"
import { FileSystem } from "./filesystem.js"
@ -53,6 +54,7 @@ const featureDefinitions = Event.inventory(
...Permission.Event.Definitions,
...Plugin.Event.Definitions,
...ProjectDirectories.Event.Definitions,
...Command.Event.Definitions,
...Skill.Event.Definitions,
...FileSystemWatcher.Event.Definitions,
...Pty.Event.Definitions,

View file

@ -94,7 +94,7 @@ export const Info = Schema.Struct({
name: modelID,
api: { id: modelID, type: "native", settings: {} },
capabilities: { tools: false, input: [], output: [] },
request: { headers: {}, body: {} },
request: { settings: {}, headers: {}, body: {} },
variants: [],
time: { released: 0 },
cost: [],

View file

@ -1,6 +1,6 @@
export * as Provider from "./provider.js"
import { Schema } from "effect"
import { Effect, Schema } from "effect"
import { optional } from "./schema.js"
import { Integration } from "./integration.js"
import { statics } from "./schema.js"
@ -43,8 +43,12 @@ export const Api = Schema.Union([AISDK, Native])
.annotate({ identifier: "Provider.Api" })
export type Api = typeof Api.Type
export const Settings = Schema.Record(Schema.String, Schema.Unknown).annotate({ identifier: "Provider.Settings" })
export type Settings = typeof Settings.Type
export interface Request extends Schema.Schema.Type<typeof Request> {}
export const Request = Schema.Struct({
settings: Settings.pipe(Schema.withConstructorDefault(Effect.succeed({}))),
headers: Schema.Record(Schema.String, Schema.String),
body: Schema.Record(Schema.String, Schema.Json),
}).annotate({ identifier: "Provider.Request" })
@ -66,7 +70,7 @@ export const Info = Schema.Struct({
id,
name: id,
api: { type: "native", settings: {} },
request: { headers: {}, body: {} },
request: { settings: {}, headers: {}, body: {} },
}),
})),
)

View file

@ -0,0 +1,20 @@
export * as SessionContextEntry from "./session-context-entry.js"
import { Schema } from "effect"
/**
* Slash-free client-facing key for one API-managed context entry. The server
* derives the namespaced SystemContext key as `api/<key>`, keeping the
* `api/*` namespace enforced by construction.
*/
export const Key = Schema.String.check(Schema.isPattern(/^[a-z0-9][a-z0-9._-]*$/)).annotate({
identifier: "SessionContextEntry.Key",
description: "Context entry key (lowercase alphanumerics plus . _ -)",
})
export type Key = typeof Key.Type
export const Info = Schema.Struct({
key: Key,
value: Schema.Json.annotate({ description: "JSON value attached to the session's system context" }),
}).annotate({ identifier: "SessionContextEntry.Info" })
export interface Info extends Schema.Schema.Type<typeof Info> {}

View file

@ -133,6 +133,16 @@ export const PromptAdmitted = Event.define({
})
export type PromptAdmitted = typeof PromptAdmitted.Type
export const ExecutionSettled = Event.define({
type: "session.next.execution.settled",
schema: {
...Base,
outcome: Schema.Literals(["success", "failure", "interrupted"]),
error: UnknownError.pipe(optional),
},
})
export type ExecutionSettled = typeof ExecutionSettled.Type
export const ContextUpdated = Event.define({
type: "session.next.context.updated",
...options,
@ -538,6 +548,7 @@ export const Definitions = Event.inventory(
Forked,
Prompted,
PromptAdmitted,
ExecutionSettled,
ContextUpdated,
Synthetic,
Skill.Activated,