Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions extensions/capabilities/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ test("the gateway does not add an ineffective resident adoption guideline", () =
assert.equal(h.tool().promptGuidelines, undefined);
});

test("the gateway exposes a provider-portable string enum for capability groups", () => {
const parameters = JSON.parse(JSON.stringify(harness().tool().parameters));

assert.deepEqual(parameters.properties.groups.items, {
type: "string",
enum: ["search", "delegate", "workflow", "background", "session"],
});
});

test("the gateway stays within its compact provider-surface budget", () => {
const tool = harness().tool();
const serialized = JSON.stringify({
Expand Down
5 changes: 4 additions & 1 deletion extensions/capabilities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import {
resetOpenPiToolSurface,
} from "../shared/tool-surface.ts";

const CapabilitySchema = Type.Enum(OPENPI_CAPABILITY_NAMES);
const CapabilitySchema = Type.Unsafe<OpenPiCapability>({
type: "string",
enum: OPENPI_CAPABILITY_NAMES,
});

const OpenPiLoadToolsParameters = Type.Object({
groups: Type.Optional(
Expand Down
Loading