// src/contexts/StudioConfigContext.tsx
import { createContext, useContext } from "react";

// src/lib/capability-shape.ts
var DEFAULT_STUDIO_CAPABILITIES = {
  files: {
    read: true,
    proposeChanges: true
  },
  deploys: {
    read: true,
    promote: true
  },
  evals: {
    read: true,
    run: true
  },
  secrets: {
    read: true,
    write: true
  },
  automations: {
    read: true,
    run: true
  },
  setup: {
    read: true,
    run: true
  },
  memory: {
    read: true,
    write: true
  },
  feedback: {
    read: true,
    review: true
  }
};
function mergeStudioCapabilities(input) {
  if (!input) return DEFAULT_STUDIO_CAPABILITIES;
  return {
    files: {
      ...DEFAULT_STUDIO_CAPABILITIES.files,
      ...input.files
    },
    deploys: {
      ...DEFAULT_STUDIO_CAPABILITIES.deploys,
      ...input.deploys
    },
    evals: {
      ...DEFAULT_STUDIO_CAPABILITIES.evals,
      ...input.evals
    },
    secrets: {
      ...DEFAULT_STUDIO_CAPABILITIES.secrets,
      ...input.secrets
    },
    automations: {
      ...DEFAULT_STUDIO_CAPABILITIES.automations,
      ...input.automations
    },
    setup: {
      ...DEFAULT_STUDIO_CAPABILITIES.setup,
      ...input.setup
    },
    memory: {
      ...DEFAULT_STUDIO_CAPABILITIES.memory,
      ...input.memory
    },
    feedback: {
      ...DEFAULT_STUDIO_CAPABILITIES.feedback,
      ...input.feedback
    }
  };
}

// src/contexts/StudioConfigContext.tsx
var StudioConfigContext = createContext({
  agentName: "Agent",
  runtimeUrl: "http://localhost:3847",
  agentId: "default",
  registryUrl: "https://api.amodalai.com",
  capabilities: DEFAULT_STUDIO_CAPABILITIES
});
function useStudioConfig() {
  return useContext(StudioConfigContext);
}
function useStudioCapabilities() {
  return mergeStudioCapabilities(useStudioConfig().capabilities);
}
export {
  StudioConfigContext,
  useStudioCapabilities,
  useStudioConfig
};
/**
 * @license
 * Copyright 2026 Amodal Labs, Inc.
 * SPDX-License-Identifier: MIT
 */
//# sourceMappingURL=config.js.map
