naro-mcp 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -15545,7 +15545,7 @@ var TOOLS = [
15545
15545
  },
15546
15546
  {
15547
15547
  name: "deploy",
15548
- description: "Deploys a local project to Naro (create_deployment): registers the deployment, builds the Next.js app locally, uploads the artifact and waits for the live URL. Preview by default; production:true publishes to the main domain. If the user is not logged in and no NARO_TOKEN is set, a browser window opens for GitHub sign-in \u2014 tell the user to approve it. Local .env files are never uploaded. If the result lists missingEnvKeys, set each one with set_environment_variable before relying on the deployment. If the result has needsTeam, nothing was deployed: show the listed teams, ask the user which one should own the project, and call deploy again with `team` set \u2014 never pick one yourself. When gitConnection.state is 'available', ask the user whether their changes should deploy automatically from now on, and call connect_git_repository if they agree \u2014 do not connect without asking. When it is 'unreachable', tell the user the Naro GitHub App is not installed on gitConnection.repoOwner for this team and that connecting requires installing it there \u2014 do not call connect_git_repository, it will fail.",
15548
+ description: "Deploys a local project to Naro (create_deployment): registers the deployment, builds the Next.js app locally, uploads the artifact and waits for the live URL. Preview by default; production:true publishes to the main domain. If the result has needsLogin, nothing was deployed: this server cannot open a browser, so ask the user to run `naro login` in a terminal and then call deploy again. Local .env files are never uploaded. If the result lists missingEnvKeys, set each one with set_environment_variable before relying on the deployment. If the result has needsTeam, nothing was deployed: show the listed teams, ask the user which one should own the project, and call deploy again with `team` set \u2014 never pick one yourself. When gitConnection.state is 'available', ask the user whether their changes should deploy automatically from now on, and call connect_git_repository if they agree \u2014 do not connect without asking. When it is 'unreachable', tell the user the Naro GitHub App is not installed on gitConnection.repoOwner for this team and that connecting requires installing it there \u2014 do not call connect_git_repository, it will fail.",
15549
15549
  inputSchema: {
15550
15550
  type: "object",
15551
15551
  properties: {
@@ -15578,7 +15578,16 @@ var TOOLS = [
15578
15578
  handler: async (args, deps) => {
15579
15579
  const directory = str(args.directory) ?? deps.cwd();
15580
15580
  const link = readProjectLink(directory);
15581
- const client = await deps.client();
15581
+ let client;
15582
+ try {
15583
+ client = await deps.client();
15584
+ } catch (error51) {
15585
+ if (!isNaroError(error51) || error51.code !== "NOT_LOGGED_IN") throw error51;
15586
+ return {
15587
+ needsLogin: true,
15588
+ message: "Not signed in. Ask the user to run `naro login` in a terminal (this server cannot open a browser), then call deploy again."
15589
+ };
15590
+ }
15582
15591
  const teams = await client.teams.list();
15583
15592
  const requested = str(args.team) ?? link?.teamSlug;
15584
15593
  const team = requested ? teams.find((candidate) => candidate.slug === requested) : void 0;
@@ -15597,6 +15606,8 @@ var TOOLS = [
15597
15606
  projectId: link?.projectId,
15598
15607
  teamSlug: team.slug,
15599
15608
  production: args.production === true,
15609
+ // Never a surprise browser window: this server may be headless.
15610
+ allowLogin: false,
15600
15611
  rootDirectory: str(args.rootDirectory) ?? null,
15601
15612
  branch: str(args.branch)
15602
15613
  // 로컬 dotenv는 읽지 않는다. 누락 키는 결과로 돌려주고
@@ -16038,7 +16049,7 @@ function toolErrorJson(error51) {
16038
16049
  // src/server.ts
16039
16050
  function createServer2(deps) {
16040
16051
  const server = new Server(
16041
- { name: "naro", version: "0.5.0" },
16052
+ { name: "naro", version: "0.5.2" },
16042
16053
  { capabilities: { tools: {} } }
16043
16054
  );
16044
16055
  server.setRequestHandler(ListToolsRequestSchema, () => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naro-mcp",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "naro-mcp": "./dist/index.js"
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@modelcontextprotocol/sdk": "^1.0.0",
17
17
  "@supabase/supabase-js": "2.112.3",
18
- "naro-cli": "0.5.0"
18
+ "naro-cli": "0.5.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "tsup": "8.5.0",