feat(simulation): control arbitrary tool lifecycles (#37816)
This commit is contained in:
parent
925c2423de
commit
6d32bc9cb0
13 changed files with 1567 additions and 80 deletions
|
|
@ -95,6 +95,21 @@ describe("ToolRegistry", () => {
|
|||
}),
|
||||
)
|
||||
|
||||
it.effect("validates a registration batch before installing any tools", () =>
|
||||
Effect.gen(function* () {
|
||||
const service = yield* ToolRegistry.Service
|
||||
const error = yield* service
|
||||
.registerBatch([
|
||||
{ tools: { first: make() }, options: { codemode: false } },
|
||||
{ tools: { second: make() }, options: { namespace: "invalid..namespace", codemode: false } },
|
||||
])
|
||||
.pipe(Effect.flip)
|
||||
|
||||
expect(error).toBeInstanceOf(Tool.RegistrationError)
|
||||
expect((yield* service.materialize()).definitions).toEqual([])
|
||||
}),
|
||||
)
|
||||
|
||||
it.effect("filters disabled tools with edit aliases and ordered wildcard precedence", () =>
|
||||
Effect.gen(function* () {
|
||||
const service = yield* ToolRegistry.Service
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue