fix(marketplace): close client contract gaps
This commit is contained in:
@@ -121,6 +121,16 @@ describe('Marketplace Release A package contract', () => {
|
||||
expect(Object.isFrozen(definition.tools[0]?.outputSchema)).toBe(true);
|
||||
});
|
||||
|
||||
it('accepts only the canonical asynchronous job execution mode', () => {
|
||||
const job = structuredClone(HOSTED_CAPABILITY) as Record<string, unknown>;
|
||||
(job.tools as Array<Record<string, unknown>>)[0]!.executionMode = 'job';
|
||||
expect(parse(job).tools[0]?.executionMode).toBe('job');
|
||||
|
||||
const accepted = structuredClone(HOSTED_CAPABILITY) as Record<string, unknown>;
|
||||
(accepted.tools as Array<Record<string, unknown>>)[0]!.executionMode = 'accepted';
|
||||
expect(() => parse(accepted)).toThrow(CodingPluginManifestError);
|
||||
});
|
||||
|
||||
it('requires the exact capability manifest path even for direct parsing', () => {
|
||||
const root = structuredClone(ROOT) as Record<string, unknown>;
|
||||
const extensions = root.extensions as Record<string, unknown>;
|
||||
|
||||
Reference in New Issue
Block a user