Deploy multi-file Hub workflows (#3128)
* feat(hub): deploy canonical workflow bundles Keep CLI deployment aligned with Hub's authored bundle boundary so validation and activation receive the same deterministic source files. Public documentation now teaches that boundary as the only configuration format. * test(hub): assert validation diagnostics directly * refactor(hub): deepen HTTP client module * feat(hub): validate named agent configurations * docs(hub): align Claude mode example
This commit is contained in:
@@ -66,6 +66,34 @@ const PreviousHubAgentCreateWithAutoArchiveRequestSchema =
|
||||
});
|
||||
|
||||
describe("Hub session protocol", () => {
|
||||
test("round-trips named-agent validation", () => {
|
||||
const request = {
|
||||
type: "hub.execution.agent.validate.request" as const,
|
||||
requestId: "validate-codex",
|
||||
provider: "codex",
|
||||
model: "gpt-5.5",
|
||||
thinkingOptionId: "xhigh",
|
||||
providerOptions: {
|
||||
sandbox_workspace_write: {
|
||||
writable_roots: ["/var/cache/npm"],
|
||||
network_access: false,
|
||||
},
|
||||
},
|
||||
};
|
||||
const response = {
|
||||
type: "hub.execution.agent.validate.response" as const,
|
||||
payload: {
|
||||
requestId: request.requestId,
|
||||
valid: true,
|
||||
issues: [],
|
||||
error: null,
|
||||
},
|
||||
};
|
||||
|
||||
expect(SessionInboundMessageSchema.parse(request)).toEqual(request);
|
||||
expect(SessionOutboundMessageSchema.parse(response)).toEqual(response);
|
||||
});
|
||||
|
||||
test("accepts the Hub execution create request", () => {
|
||||
const message = {
|
||||
type: "hub.execution.agent.create.request",
|
||||
|
||||
Reference in New Issue
Block a user