"use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkGERCMTPQjs = require('./chunk-GERCMTPQ.js');




var _chunkEOWGKCUZjs = require('./chunk-EOWGKCUZ.js');
require('./chunk-DGUM43GV.js');

// ../api/src/aiPlayground.ts
var _zod = require('zod');
var Rfc6902PatchOp = _zod.z.discriminatedUnion("op", [
  // Standard RFC-6902 operations
  _zod.z.object({
    op: _zod.z.literal("add"),
    path: _zod.z.string(),
    value: _zod.z.unknown()
  }),
  _zod.z.object({
    op: _zod.z.literal("remove"),
    path: _zod.z.string()
  }),
  _zod.z.object({
    op: _zod.z.literal("replace"),
    path: _zod.z.string(),
    value: _zod.z.unknown()
  }),
  _zod.z.object({
    op: _zod.z.literal("move"),
    from: _zod.z.string(),
    path: _zod.z.string()
  }),
  _zod.z.object({
    op: _zod.z.literal("copy"),
    from: _zod.z.string(),
    path: _zod.z.string()
  }),
  // Block-level operations (Phase 2)
  _zod.z.object({
    op: _zod.z.literal("add_block"),
    blockKind: _zod.z.string(),
    afterBlockId: _zod.z.string().nullable(),
    content: _zod.z.record(_zod.z.string(), _zod.z.unknown()),
    rationale: _zod.z.string()
  }),
  _zod.z.object({
    op: _zod.z.literal("delete_block"),
    blockId: _zod.z.string(),
    rationale: _zod.z.string()
  }),
  _zod.z.object({
    op: _zod.z.literal("reorder_block"),
    blockId: _zod.z.string(),
    afterBlockId: _zod.z.string().nullable(),
    rationale: _zod.z.string()
  })
]);
var PatchEnvelope = _zod.z.object({
  blockId: _zod.z.string(),
  blockKind: _zod.z.string().optional(),
  blockPurpose: _zod.z.string().optional().nullable(),
  ops: _zod.z.array(Rfc6902PatchOp),
  rationale: _zod.z.string(),
  currentContent: _zod.z.record(_zod.z.string(), _zod.z.unknown()).optional()
});
var ContentUpdateResponse = _zod.z.object({
  patches: _zod.z.array(PatchEnvelope),
  assistantMessage: _zod.z.string()
});
var PlaygroundProposeRequest = _zod.z.object({
  request: _zod.z.string().min(1).max(2e3)
});
var PlaygroundProposeResponse = _zod.z.object({
  patches: _zod.z.array(PatchEnvelope),
  assistantMessage: _zod.z.string(),
  validation: _zod.z.object({
    valid: _zod.z.boolean(),
    issues: _zod.z.array(_zod.z.string()),
    filtered: _zod.z.number()
  })
});
var MultiPagePatchEnvelope = _zod.z.object({
  pageId: _zod.z.string(),
  blockId: _zod.z.string().optional(),
  // Not present for page-level ops
  blockKind: _zod.z.string().optional(),
  blockPurpose: _zod.z.string().optional().nullable(),
  ops: _zod.z.array(Rfc6902PatchOp),
  rationale: _zod.z.string(),
  currentContent: _zod.z.record(_zod.z.string(), _zod.z.unknown()).optional()
});
var MultiPageUpdateResponse = _zod.z.object({
  patches: _zod.z.array(MultiPagePatchEnvelope),
  assistantMessage: _zod.z.string(),
  pagesModified: _zod.z.number(),
  toolCallsUsed: _zod.z.number()
});





exports.API_ENDPOINTS = _chunkEOWGKCUZjs.API_ENDPOINTS; exports.SYSTEM_BLOCK_KINDS = _chunkGERCMTPQjs.SYSTEM_BLOCK_KINDS; exports.buildEndpointURL = _chunkEOWGKCUZjs.buildEndpointURL; exports.createRiverbankClient = _chunkEOWGKCUZjs.createRiverbankClient;
//# sourceMappingURL=index.js.map