Skip to content

Commit 61df5c2

Browse files
Copilothotlong
andauthored
fix: make handlerReady optional to fix TS2741 build errors in objectql protocol.ts
Agent-Logs-Url: https://github.com/objectstack-ai/spec/sessions/6128126f-f465-4553-b944-72b473de3eb0 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 167ac19 commit 61df5c2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/spec/src/api/discovery.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,12 +783,12 @@ describe('ServiceStatus', () => {
783783
// ==========================================
784784

785785
describe('ServiceInfoSchema (handlerReady field)', () => {
786-
it('should default handlerReady to false', () => {
786+
it('should default handlerReady to undefined when omitted', () => {
787787
const info = ServiceInfoSchema.parse({
788788
enabled: true,
789789
status: 'available',
790790
});
791-
expect(info.handlerReady).toBe(false);
791+
expect(info.handlerReady).toBeUndefined();
792792
});
793793

794794
it('should accept explicit handlerReady: true', () => {

packages/spec/src/api/discovery.zod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ export const ServiceInfoSchema = z.object({
4444
* Clients SHOULD check this flag before displaying a service endpoint in the UI.
4545
* @default false
4646
*/
47-
handlerReady: z.boolean().default(false).describe(
47+
handlerReady: z.boolean().optional().describe(
4848
'Whether the HTTP handler is confirmed to be mounted. '
49-
+ 'false means the route is declared but may return 501.'
49+
+ 'Omitted or false means the route is declared but may return 501.'
5050
),
5151
/** Route path (only present if enabled) */
5252
route: z.string().optional().describe('e.g. /api/v1/analytics'),

0 commit comments

Comments
 (0)