@sakupa/mcp 0.7.52 → 0.7.54

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 (3) hide show
  1. package/dist/bin.js +31 -13
  2. package/dist/index.js +31 -13
  3. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -402,7 +402,7 @@ function isFreeSiteAllowanceNetworkReference(value) {
402
402
  }
403
403
 
404
404
  // ../core/dist/domain/version.js
405
- var SAKUPA_MCP_VERSION = "0.7.52";
405
+ var SAKUPA_MCP_VERSION = "0.7.54";
406
406
 
407
407
  // ../core/dist/domain/errors.js
408
408
  var HTTP_STATUS = {
@@ -2758,8 +2758,6 @@ async function diagnoseBinding(input) {
2758
2758
  const layers = `Pipeline: [1] public DNS (checked LIVE above) -> [2] Sakupa ownership verification: ${input.verificationStatus} -> [3] HTTPS certificate & serving: ` + (input.provisioning ? "provisioning (Sakupa's certificate service validates and issues within minutes once the required www record above is OK; run bind status again in about 5 minutes to re-check the provider and advance activation)." : "starts after verification.");
2759
2759
  return { checks, apexResolves, allOk, checklist, layers };
2760
2760
  }
2761
- var DNS_RETRY_AFTER_SECONDS = 300;
2762
- var DNS_MAX_ATTEMPTS = 10;
2763
2761
  function toDnsChecklist(checks) {
2764
2762
  return checks.map((c) => ({
2765
2763
  name: c.record.name,
@@ -2770,13 +2768,12 @@ function toDnsChecklist(checks) {
2770
2768
  }));
2771
2769
  }
2772
2770
  function renderChecklistBlock(diag, fixTail) {
2773
- const cadence = `Re-check every ${DNS_RETRY_AFTER_SECONDS / 60} minutes, up to ${DNS_MAX_ATTEMPTS} times.`;
2774
2771
  return `Live DNS checklist (host values are the SHORT panel form):
2775
2772
  ${diag.checklist}
2776
2773
 
2777
2774
  ${diag.layers}
2778
2775
 
2779
- ` + (diag.allOk ? "All required records are live; certificate issuance completes automatically \u2014 re-check in a few minutes until the binding is active." : `${fixTail} ${cadence}`);
2776
+ ` + (diag.allOk ? "All required records are live. Cloudflare continues certificate issuance; wait about one minute, then run bind status once when the user asks. Do not poll automatically." : `${fixTail} After the user reports the DNS change is complete, run bind status once. Do not poll automatically.`);
2780
2777
  }
2781
2778
 
2782
2779
  // src/version.ts
@@ -4853,12 +4850,14 @@ Once Stripe confirms payment and Sakupa synchronizes the subscription, the curre
4853
4850
  provisioning: res2.bindingStatus === "provisioning"
4854
4851
  });
4855
4852
  const { apexResolves, allOk } = diag;
4853
+ const manualProviderRecheckRequired = res2.bindingStatus === "provisioning" && res2.provisioningPhase !== "waiting_dns";
4854
+ const customerRecheckInstruction = `The customer cannot know whether the certificate is ready. Never use conditional readiness wording or ask the customer to decide the provider state. Tell the customer: "You do not need to judge readiness. After about one minute, reply: check domain status. I will check it once." The AI, not the customer, calls bind status exactly once. During this zero-downtime transition, the previously active domain may still serve. Once this binding becomes active, Sakupa retains only the last bound domain unit: ${apex2} and www.${apex2}.`;
4856
4855
  return text(
4857
- res2.bindingStatus === "active" ? "domain_binding_active" : res2.status === "verified" ? "domain_verification_succeeded" : "domain_verification_pending",
4856
+ res2.bindingStatus === "active" ? "domain_binding_active" : res2.bindingStatus === "provisioning" ? "domain_binding_provisioning" : "domain_verification_pending",
4858
4857
  `Domain binding status for ${apex2}: ${res2.status}
4859
- ${res2.message}
4858
+ ${res2.message}` + (manualProviderRecheckRequired ? `
4860
4859
 
4861
- ` + renderChecklistBlock(
4860
+ ${customerRecheckInstruction}` : "") + "\n\n" + renderChecklistBlock(
4862
4861
  diag,
4863
4862
  "Fix any [MISSING]/[FIX] lines above, then re-run bind status; if still failing after the attempts below, show the user this checklist."
4864
4863
  ),
@@ -4866,6 +4865,7 @@ ${res2.message}
4866
4865
  verificationId: res2.verificationId,
4867
4866
  status: res2.status,
4868
4867
  bindingStatus: res2.bindingStatus,
4868
+ provisioningPhase: res2.provisioningPhase,
4869
4869
  apexDomain: apex2,
4870
4870
  provisioningJobId: res2.provisioningJobId,
4871
4871
  servingTarget: res2.servingTarget,
@@ -4874,11 +4874,29 @@ ${res2.message}
4874
4874
  apexRequired: false,
4875
4875
  requiredServingHostname: `www.${apex2}`,
4876
4876
  optionalApexHostname: apex2,
4877
- retryAfterSeconds: DNS_RETRY_AFTER_SECONDS,
4878
- maxAttempts: DNS_MAX_ATTEMPTS,
4877
+ automaticRetries: 0,
4878
+ manualRecheckOnly: true,
4879
+ backgroundRetry: false,
4880
+ manualStatusCheckRequired: manualProviderRecheckRequired,
4881
+ suggestedRecheckAfterSeconds: manualProviderRecheckRequired ? 60 : void 0,
4882
+ customerReadinessJudgmentRequired: false,
4883
+ customerReplyIntent: manualProviderRecheckRequired ? "check_domain_status" : void 0,
4884
+ customerInstruction: manualProviderRecheckRequired ? customerRecheckInstruction : void 0,
4885
+ transitionMayServePreviousDomain: manualProviderRecheckRequired,
4886
+ finalActiveBindingExclusive: true,
4887
+ postActivationRetainedHostnames: [apex2, `www.${apex2}`],
4888
+ customerLiveConfirmed: res2.bindingStatus === "active",
4879
4889
  message: res2.message
4880
4890
  },
4881
- res2.bindingStatus === "active" ? "completed" : res2.status === "verified" ? "pending_provider" : "waiting_user"
4891
+ res2.bindingStatus === "active" ? "completed" : res2.provisioningPhase === "waiting_dns" || res2.status !== "verified" ? "waiting_user" : res2.bindingStatus === "provisioning" ? "pending_provider" : "waiting_user",
4892
+ res2.bindingStatus === "provisioning" ? [
4893
+ {
4894
+ tool: "bind",
4895
+ arguments: { action: "status" },
4896
+ allowed: true,
4897
+ reasonCode: res2.provisioningPhase === "waiting_dns" ? "after_user_fixes_dns" : "manual_recheck_after_provider_wait"
4898
+ }
4899
+ ] : []
4882
4900
  );
4883
4901
  }
4884
4902
  if (!args.hostname) {
@@ -4925,8 +4943,8 @@ When the user says the TXT is set, run bind "status". It verifies ownership and
4925
4943
  value: res.verificationRecord.value
4926
4944
  }
4927
4945
  ],
4928
- retryAfterSeconds: DNS_RETRY_AFTER_SECONDS,
4929
- maxAttempts: DNS_MAX_ATTEMPTS
4946
+ automaticRetries: 0,
4947
+ manualRecheckOnly: true
4930
4948
  },
4931
4949
  "waiting_user"
4932
4950
  );
package/dist/index.js CHANGED
@@ -147,7 +147,7 @@ function isFreeSiteAllowanceNetworkReference(value) {
147
147
  }
148
148
 
149
149
  // ../core/dist/domain/version.js
150
- var SAKUPA_MCP_VERSION = "0.7.52";
150
+ var SAKUPA_MCP_VERSION = "0.7.54";
151
151
 
152
152
  // ../core/dist/domain/errors.js
153
153
  var HTTP_STATUS = {
@@ -3508,8 +3508,6 @@ async function diagnoseBinding(input) {
3508
3508
  const layers = `Pipeline: [1] public DNS (checked LIVE above) -> [2] Sakupa ownership verification: ${input.verificationStatus} -> [3] HTTPS certificate & serving: ` + (input.provisioning ? "provisioning (Sakupa's certificate service validates and issues within minutes once the required www record above is OK; run bind status again in about 5 minutes to re-check the provider and advance activation)." : "starts after verification.");
3509
3509
  return { checks, apexResolves, allOk, checklist, layers };
3510
3510
  }
3511
- var DNS_RETRY_AFTER_SECONDS = 300;
3512
- var DNS_MAX_ATTEMPTS = 10;
3513
3511
  function toDnsChecklist(checks) {
3514
3512
  return checks.map((c) => ({
3515
3513
  name: c.record.name,
@@ -3520,13 +3518,12 @@ function toDnsChecklist(checks) {
3520
3518
  }));
3521
3519
  }
3522
3520
  function renderChecklistBlock(diag, fixTail) {
3523
- const cadence = `Re-check every ${DNS_RETRY_AFTER_SECONDS / 60} minutes, up to ${DNS_MAX_ATTEMPTS} times.`;
3524
3521
  return `Live DNS checklist (host values are the SHORT panel form):
3525
3522
  ${diag.checklist}
3526
3523
 
3527
3524
  ${diag.layers}
3528
3525
 
3529
- ` + (diag.allOk ? "All required records are live; certificate issuance completes automatically \u2014 re-check in a few minutes until the binding is active." : `${fixTail} ${cadence}`);
3526
+ ` + (diag.allOk ? "All required records are live. Cloudflare continues certificate issuance; wait about one minute, then run bind status once when the user asks. Do not poll automatically." : `${fixTail} After the user reports the DNS change is complete, run bind status once. Do not poll automatically.`);
3530
3527
  }
3531
3528
 
3532
3529
  // src/credential-rotation.ts
@@ -4969,12 +4966,14 @@ Once Stripe confirms payment and Sakupa synchronizes the subscription, the curre
4969
4966
  provisioning: res2.bindingStatus === "provisioning"
4970
4967
  });
4971
4968
  const { apexResolves, allOk } = diag;
4969
+ const manualProviderRecheckRequired = res2.bindingStatus === "provisioning" && res2.provisioningPhase !== "waiting_dns";
4970
+ const customerRecheckInstruction = `The customer cannot know whether the certificate is ready. Never use conditional readiness wording or ask the customer to decide the provider state. Tell the customer: "You do not need to judge readiness. After about one minute, reply: check domain status. I will check it once." The AI, not the customer, calls bind status exactly once. During this zero-downtime transition, the previously active domain may still serve. Once this binding becomes active, Sakupa retains only the last bound domain unit: ${apex2} and www.${apex2}.`;
4972
4971
  return text(
4973
- res2.bindingStatus === "active" ? "domain_binding_active" : res2.status === "verified" ? "domain_verification_succeeded" : "domain_verification_pending",
4972
+ res2.bindingStatus === "active" ? "domain_binding_active" : res2.bindingStatus === "provisioning" ? "domain_binding_provisioning" : "domain_verification_pending",
4974
4973
  `Domain binding status for ${apex2}: ${res2.status}
4975
- ${res2.message}
4974
+ ${res2.message}` + (manualProviderRecheckRequired ? `
4976
4975
 
4977
- ` + renderChecklistBlock(
4976
+ ${customerRecheckInstruction}` : "") + "\n\n" + renderChecklistBlock(
4978
4977
  diag,
4979
4978
  "Fix any [MISSING]/[FIX] lines above, then re-run bind status; if still failing after the attempts below, show the user this checklist."
4980
4979
  ),
@@ -4982,6 +4981,7 @@ ${res2.message}
4982
4981
  verificationId: res2.verificationId,
4983
4982
  status: res2.status,
4984
4983
  bindingStatus: res2.bindingStatus,
4984
+ provisioningPhase: res2.provisioningPhase,
4985
4985
  apexDomain: apex2,
4986
4986
  provisioningJobId: res2.provisioningJobId,
4987
4987
  servingTarget: res2.servingTarget,
@@ -4990,11 +4990,29 @@ ${res2.message}
4990
4990
  apexRequired: false,
4991
4991
  requiredServingHostname: `www.${apex2}`,
4992
4992
  optionalApexHostname: apex2,
4993
- retryAfterSeconds: DNS_RETRY_AFTER_SECONDS,
4994
- maxAttempts: DNS_MAX_ATTEMPTS,
4993
+ automaticRetries: 0,
4994
+ manualRecheckOnly: true,
4995
+ backgroundRetry: false,
4996
+ manualStatusCheckRequired: manualProviderRecheckRequired,
4997
+ suggestedRecheckAfterSeconds: manualProviderRecheckRequired ? 60 : void 0,
4998
+ customerReadinessJudgmentRequired: false,
4999
+ customerReplyIntent: manualProviderRecheckRequired ? "check_domain_status" : void 0,
5000
+ customerInstruction: manualProviderRecheckRequired ? customerRecheckInstruction : void 0,
5001
+ transitionMayServePreviousDomain: manualProviderRecheckRequired,
5002
+ finalActiveBindingExclusive: true,
5003
+ postActivationRetainedHostnames: [apex2, `www.${apex2}`],
5004
+ customerLiveConfirmed: res2.bindingStatus === "active",
4995
5005
  message: res2.message
4996
5006
  },
4997
- res2.bindingStatus === "active" ? "completed" : res2.status === "verified" ? "pending_provider" : "waiting_user"
5007
+ res2.bindingStatus === "active" ? "completed" : res2.provisioningPhase === "waiting_dns" || res2.status !== "verified" ? "waiting_user" : res2.bindingStatus === "provisioning" ? "pending_provider" : "waiting_user",
5008
+ res2.bindingStatus === "provisioning" ? [
5009
+ {
5010
+ tool: "bind",
5011
+ arguments: { action: "status" },
5012
+ allowed: true,
5013
+ reasonCode: res2.provisioningPhase === "waiting_dns" ? "after_user_fixes_dns" : "manual_recheck_after_provider_wait"
5014
+ }
5015
+ ] : []
4998
5016
  );
4999
5017
  }
5000
5018
  if (!args.hostname) {
@@ -5041,8 +5059,8 @@ When the user says the TXT is set, run bind "status". It verifies ownership and
5041
5059
  value: res.verificationRecord.value
5042
5060
  }
5043
5061
  ],
5044
- retryAfterSeconds: DNS_RETRY_AFTER_SECONDS,
5045
- maxAttempts: DNS_MAX_ATTEMPTS
5062
+ automaticRetries: 0,
5063
+ manualRecheckOnly: true
5046
5064
  },
5047
5065
  "waiting_user"
5048
5066
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakupa/mcp",
3
- "version": "0.7.52",
3
+ "version": "0.7.54",
4
4
  "description": "Sakupa MCP server: publish AI-made static sites from your AI tool. AI-made pages, live in seconds.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",