@syntica/mcp 2.0.0 → 2.1.1

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.
package/dist/index.js CHANGED
@@ -33132,7 +33132,7 @@ var require_http_exception = __commonJS({
33132
33132
  exports2.HttpException = void 0;
33133
33133
  var shared_utils_1 = require_shared_utils();
33134
33134
  var intrinsic_exception_1 = require_intrinsic_exception();
33135
- var HttpException = class extends intrinsic_exception_1.IntrinsicException {
33135
+ var HttpException2 = class extends intrinsic_exception_1.IntrinsicException {
33136
33136
  /**
33137
33137
  * Instantiate a plain HTTP Exception.
33138
33138
  *
@@ -33241,7 +33241,7 @@ var require_http_exception = __commonJS({
33241
33241
  };
33242
33242
  }
33243
33243
  };
33244
- exports2.HttpException = HttpException;
33244
+ exports2.HttpException = HttpException2;
33245
33245
  }
33246
33246
  });
33247
33247
 
@@ -33967,7 +33967,7 @@ var require_service_unavailable_exception = __commonJS({
33967
33967
  exports2.ServiceUnavailableException = void 0;
33968
33968
  var http_status_enum_1 = require_http_status_enum();
33969
33969
  var http_exception_1 = require_http_exception();
33970
- var ServiceUnavailableException3 = class extends http_exception_1.HttpException {
33970
+ var ServiceUnavailableException5 = class extends http_exception_1.HttpException {
33971
33971
  /**
33972
33972
  * Instantiate a `ServiceUnavailableException` Exception.
33973
33973
  *
@@ -33997,7 +33997,7 @@ var require_service_unavailable_exception = __commonJS({
33997
33997
  super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.SERVICE_UNAVAILABLE), http_status_enum_1.HttpStatus.SERVICE_UNAVAILABLE, httpExceptionOptions);
33998
33998
  }
33999
33999
  };
34000
- exports2.ServiceUnavailableException = ServiceUnavailableException3;
34000
+ exports2.ServiceUnavailableException = ServiceUnavailableException5;
34001
34001
  }
34002
34002
  });
34003
34003
 
@@ -34009,7 +34009,7 @@ var require_unauthorized_exception = __commonJS({
34009
34009
  exports2.UnauthorizedException = void 0;
34010
34010
  var http_status_enum_1 = require_http_status_enum();
34011
34011
  var http_exception_1 = require_http_exception();
34012
- var UnauthorizedException5 = class extends http_exception_1.HttpException {
34012
+ var UnauthorizedException4 = class extends http_exception_1.HttpException {
34013
34013
  /**
34014
34014
  * Instantiate an `UnauthorizedException` Exception.
34015
34015
  *
@@ -34039,7 +34039,7 @@ var require_unauthorized_exception = __commonJS({
34039
34039
  super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNAUTHORIZED), http_status_enum_1.HttpStatus.UNAUTHORIZED, httpExceptionOptions);
34040
34040
  }
34041
34041
  };
34042
- exports2.UnauthorizedException = UnauthorizedException5;
34042
+ exports2.UnauthorizedException = UnauthorizedException4;
34043
34043
  }
34044
34044
  });
34045
34045
 
@@ -34649,7 +34649,7 @@ var require_logger_service = __commonJS({
34649
34649
  day: "2-digit",
34650
34650
  month: "2-digit"
34651
34651
  });
34652
- var Logger4 = Logger_1 = class Logger {
34652
+ var Logger5 = Logger_1 = class Logger {
34653
34653
  constructor(context, options = {}) {
34654
34654
  this.context = context;
34655
34655
  this.options = options;
@@ -34763,10 +34763,10 @@ var require_logger_service = __commonJS({
34763
34763
  return this.localInstanceRef;
34764
34764
  }
34765
34765
  };
34766
- exports2.Logger = Logger4;
34767
- Logger4.logBuffer = new Array();
34768
- Logger4.staticInstanceRef = DEFAULT_LOGGER;
34769
- Logger4.WrapBuffer = (target, propertyKey, descriptor) => {
34766
+ exports2.Logger = Logger5;
34767
+ Logger5.logBuffer = new Array();
34768
+ Logger5.staticInstanceRef = DEFAULT_LOGGER;
34769
+ Logger5.WrapBuffer = (target, propertyKey, descriptor) => {
34770
34770
  const originalFn = descriptor.value;
34771
34771
  descriptor.value = function(...args) {
34772
34772
  if (Logger_1.isBufferAttached) {
@@ -34780,83 +34780,83 @@ var require_logger_service = __commonJS({
34780
34780
  };
34781
34781
  };
34782
34782
  tslib_1.__decorate([
34783
- Logger4.WrapBuffer,
34783
+ Logger5.WrapBuffer,
34784
34784
  tslib_1.__metadata("design:type", Function),
34785
34785
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34786
34786
  tslib_1.__metadata("design:returntype", void 0)
34787
- ], Logger4.prototype, "error", null);
34787
+ ], Logger5.prototype, "error", null);
34788
34788
  tslib_1.__decorate([
34789
- Logger4.WrapBuffer,
34789
+ Logger5.WrapBuffer,
34790
34790
  tslib_1.__metadata("design:type", Function),
34791
34791
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34792
34792
  tslib_1.__metadata("design:returntype", void 0)
34793
- ], Logger4.prototype, "log", null);
34793
+ ], Logger5.prototype, "log", null);
34794
34794
  tslib_1.__decorate([
34795
- Logger4.WrapBuffer,
34795
+ Logger5.WrapBuffer,
34796
34796
  tslib_1.__metadata("design:type", Function),
34797
34797
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34798
34798
  tslib_1.__metadata("design:returntype", void 0)
34799
- ], Logger4.prototype, "warn", null);
34799
+ ], Logger5.prototype, "warn", null);
34800
34800
  tslib_1.__decorate([
34801
- Logger4.WrapBuffer,
34801
+ Logger5.WrapBuffer,
34802
34802
  tslib_1.__metadata("design:type", Function),
34803
34803
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34804
34804
  tslib_1.__metadata("design:returntype", void 0)
34805
- ], Logger4.prototype, "debug", null);
34805
+ ], Logger5.prototype, "debug", null);
34806
34806
  tslib_1.__decorate([
34807
- Logger4.WrapBuffer,
34807
+ Logger5.WrapBuffer,
34808
34808
  tslib_1.__metadata("design:type", Function),
34809
34809
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34810
34810
  tslib_1.__metadata("design:returntype", void 0)
34811
- ], Logger4.prototype, "verbose", null);
34811
+ ], Logger5.prototype, "verbose", null);
34812
34812
  tslib_1.__decorate([
34813
- Logger4.WrapBuffer,
34813
+ Logger5.WrapBuffer,
34814
34814
  tslib_1.__metadata("design:type", Function),
34815
34815
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34816
34816
  tslib_1.__metadata("design:returntype", void 0)
34817
- ], Logger4.prototype, "fatal", null);
34817
+ ], Logger5.prototype, "fatal", null);
34818
34818
  tslib_1.__decorate([
34819
- Logger4.WrapBuffer,
34819
+ Logger5.WrapBuffer,
34820
34820
  tslib_1.__metadata("design:type", Function),
34821
34821
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34822
34822
  tslib_1.__metadata("design:returntype", void 0)
34823
- ], Logger4, "error", null);
34823
+ ], Logger5, "error", null);
34824
34824
  tslib_1.__decorate([
34825
- Logger4.WrapBuffer,
34825
+ Logger5.WrapBuffer,
34826
34826
  tslib_1.__metadata("design:type", Function),
34827
34827
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34828
34828
  tslib_1.__metadata("design:returntype", void 0)
34829
- ], Logger4, "log", null);
34829
+ ], Logger5, "log", null);
34830
34830
  tslib_1.__decorate([
34831
- Logger4.WrapBuffer,
34831
+ Logger5.WrapBuffer,
34832
34832
  tslib_1.__metadata("design:type", Function),
34833
34833
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34834
34834
  tslib_1.__metadata("design:returntype", void 0)
34835
- ], Logger4, "warn", null);
34835
+ ], Logger5, "warn", null);
34836
34836
  tslib_1.__decorate([
34837
- Logger4.WrapBuffer,
34837
+ Logger5.WrapBuffer,
34838
34838
  tslib_1.__metadata("design:type", Function),
34839
34839
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34840
34840
  tslib_1.__metadata("design:returntype", void 0)
34841
- ], Logger4, "debug", null);
34841
+ ], Logger5, "debug", null);
34842
34842
  tslib_1.__decorate([
34843
- Logger4.WrapBuffer,
34843
+ Logger5.WrapBuffer,
34844
34844
  tslib_1.__metadata("design:type", Function),
34845
34845
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34846
34846
  tslib_1.__metadata("design:returntype", void 0)
34847
- ], Logger4, "verbose", null);
34847
+ ], Logger5, "verbose", null);
34848
34848
  tslib_1.__decorate([
34849
- Logger4.WrapBuffer,
34849
+ Logger5.WrapBuffer,
34850
34850
  tslib_1.__metadata("design:type", Function),
34851
34851
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
34852
34852
  tslib_1.__metadata("design:returntype", void 0)
34853
- ], Logger4, "fatal", null);
34854
- exports2.Logger = Logger4 = Logger_1 = tslib_1.__decorate([
34853
+ ], Logger5, "fatal", null);
34854
+ exports2.Logger = Logger5 = Logger_1 = tslib_1.__decorate([
34855
34855
  (0, core_1.Injectable)(),
34856
34856
  tslib_1.__param(0, (0, core_1.Optional)()),
34857
34857
  tslib_1.__param(1, (0, core_1.Optional)()),
34858
34858
  tslib_1.__metadata("design:paramtypes", [String, Object])
34859
- ], Logger4);
34859
+ ], Logger5);
34860
34860
  }
34861
34861
  });
34862
34862
 
@@ -55998,6 +55998,7 @@ var StdioServerTransport = class {
55998
55998
  };
55999
55999
 
56000
56000
  // node_modules/.pnpm/@hono+node-server@1.19.12_hono@4.12.10/node_modules/@hono/node-server/dist/index.mjs
56001
+ var import_http = require("http");
56001
56002
  var import_http2 = require("http2");
56002
56003
  var import_http22 = require("http2");
56003
56004
  var import_stream = require("stream");
@@ -57562,6 +57563,214 @@ var UpstreamRequestError = class extends Error {
57562
57563
  }
57563
57564
  };
57564
57565
 
57566
+ // libs/shared/src/types/connector.ts
57567
+ var CONNECTORS = [
57568
+ {
57569
+ id: "microsoft-365",
57570
+ name: "Microsoft 365",
57571
+ category: "Email",
57572
+ tone: "violet",
57573
+ blurb: "Send mail as a shared mailbox in a customer\u2019s Microsoft 365 tenant.",
57574
+ long: "Sends mail through Microsoft Graph using an app registration in the customer's own Entra tenant, so the sending domain, its reputation and the mailbox all stay with them. The application receives four variables at deploy time and calls Graph directly \u2014 two HTTPS requests, no dependency, in any language. Because the registration is theirs, leaving the platform costs nothing: the same variables set anywhere else keep the mail flowing. Pair it with an ApplicationAccessPolicy so the registration can only send as the one shared mailbox, never as anyone in the tenant.",
57575
+ vars: ["GRAPH_TENANT_ID", "GRAPH_CLIENT_ID", "GRAPH_CLIENT_SECRET", "MAIL_FROM"],
57576
+ steps: [
57577
+ "Create an app registration in the customer's Entra tenant.",
57578
+ "Grant it the Mail.Send application permission and admin consent, nothing wider.",
57579
+ "Add an ApplicationAccessPolicy so it can send only as the one shared mailbox, never as anyone else in the tenant. The platform cannot do this for you, and does not check it.",
57580
+ "Generate a client secret and hand it to the platform once; it is never shown again."
57581
+ ],
57582
+ docsUrl: "https://learn.microsoft.com/graph/api/user-sendmail",
57583
+ attestation: {
57584
+ label: "An ApplicationAccessPolicy limits this registration to the one mailbox",
57585
+ detail: "Without it, a registration holding Mail.Send can send as any mailbox in the tenant. The policy lives in your tenant, so the platform cannot create it or check that it exists."
57586
+ }
57587
+ },
57588
+ {
57589
+ id: "smtp",
57590
+ name: "SMTP",
57591
+ category: "Email",
57592
+ tone: "apricot",
57593
+ blurb: "Send mail through any SMTP account \u2014 a hosting provider, or your own server.",
57594
+ long: "The ordinary SMTP path, for the many applications that do not run on Microsoft 365 \u2014 a hosting provider's mailbox, a relay, or your own server. The account stays the customer's; the platform holds the password and injects it at deploy time, so it never reaches the repository. Use the library your language already has: nodemailer, smtplib, whatever is idiomatic. Note that SMTP_SECURE arrives as a string: implicit TLS on 465, STARTTLS everywhere else. Prefer a dedicated send-only mailbox, since with most providers the same password also opens the inbox.",
57595
+ vars: ["SMTP_HOST", "SMTP_PORT", "SMTP_SECURE", "SMTP_USER", "SMTP_PASS", "MAIL_FROM"],
57596
+ steps: [
57597
+ "Create or pick a send-only mailbox with the provider.",
57598
+ "Note the host, port, username and password.",
57599
+ "Prefer a dedicated mailbox: with most providers the same password also grants inbox access."
57600
+ ],
57601
+ docsUrl: "https://nodemailer.com/smtp/"
57602
+ },
57603
+ {
57604
+ id: "microsoft-entra-id",
57605
+ name: "Microsoft Entra ID",
57606
+ category: "Auth",
57607
+ tone: "violet",
57608
+ blurb: "Sign users in with their work account.",
57609
+ long: "Signs an application's end users in against the customer's own Entra tenant, so accounts, password policy and MFA remain theirs and nobody maintains a second user list. The application receives the tenant, the client id, a secret and its redirect URI. What it does NOT receive is a login screen: the variables configure an OIDC client \u2014 an oauth2-proxy sidecar, or your framework's own \u2014 and that piece still has to exist in the application. Creating the app registration needs Application Administrator plus admin consent, which is usually the client's IT rather than the consultant.",
57610
+ vars: ["ENTRA_TENANT_ID", "ENTRA_CLIENT_ID", "ENTRA_CLIENT_SECRET", "ENTRA_REDIRECT_URI"],
57611
+ steps: [
57612
+ "Create a service account or application in the vendor console.",
57613
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57614
+ "Generate a key and hand it to the platform once; it is never shown again."
57615
+ ],
57616
+ docsUrl: "https://learn.microsoft.com/entra/identity-platform/"
57617
+ },
57618
+ {
57619
+ id: "sap-odata",
57620
+ name: "SAP OData",
57621
+ category: "ERP",
57622
+ tone: "blue",
57623
+ blurb: "Read and write SAP business data over an OData service.",
57624
+ long: "Reads and writes business data in SAP through an OData service: sales orders, materials, business partners, whatever the endpoint exposes. This is the connector that turns a hosted app into something a functional consultant can actually deliver, because an application that cannot see the system of record is a demo. OData is self describing, so the service metadata tells you the real entity sets and field names rather than leaving you to guess them. Phase one is public endpoints, meaning S/4HANA Cloud, Sales Cloud and Service Cloud reached over ordinary HTTPS. Anything behind a firewall needs connectivity we do not have yet, and this connector will not reach it.",
57625
+ vars: ["SAP_ODATA_URL", "SAP_CLIENT", "SAP_USER", "SAP_PASSWORD"],
57626
+ steps: [
57627
+ "Create a communication user, or an OAuth client, restricted to the services the application needs.",
57628
+ "Expose the OData service and note its full base URL, up to the service root.",
57629
+ "Note the SAP client number, usually three digits such as 100.",
57630
+ "Give it read-only authorisations unless the application genuinely writes back."
57631
+ ],
57632
+ docsUrl: "https://help.sap.com/docs/SAP_NETWEAVER_750/68bf513362174d54b58cddec28794093/"
57633
+ },
57634
+ {
57635
+ id: "sharepoint",
57636
+ name: "SharePoint",
57637
+ category: "Storage",
57638
+ tone: "violet",
57639
+ blurb: "Read and write documents in a customer\u2019s SharePoint site.",
57640
+ long: "Reads and writes documents in a customer's SharePoint site \u2014 the place most organisations already keep the files an application needs, rather than a bucket nobody governs. Uses a Graph app registration scoped with Sites.Selected and granted access to one site, so the application can reach that library and nothing else in the tenant. Its variables carry the SHAREPOINT_ prefix rather than GRAPH_, because this is a different registration from the mail one and an application commonly holds both.",
57641
+ vars: ["SHAREPOINT_TENANT_ID", "SHAREPOINT_CLIENT_ID", "SHAREPOINT_CLIENT_SECRET", "SHAREPOINT_SITE_ID"],
57642
+ steps: [
57643
+ "Create an app registration in the customer's Entra tenant \u2014 a separate one from mail, since the permissions differ.",
57644
+ "Add the Sites.Selected application permission and grant admin consent.",
57645
+ "Grant that registration access to the specific site, not the whole tenant.",
57646
+ "Create a client secret, and note the site id from the site URL."
57647
+ ],
57648
+ docsUrl: "https://learn.microsoft.com/graph/api/resources/sharepoint"
57649
+ },
57650
+ {
57651
+ id: "microsoft-teams",
57652
+ name: "Microsoft Teams",
57653
+ category: "Messaging",
57654
+ tone: "violet",
57655
+ blurb: "Adaptive cards and alerts in a Teams channel.",
57656
+ long: "Posts messages into a Teams channel through an incoming webhook \u2014 deployment notices, an approval that needs a human, an alert worth interrupting someone for. The webhook URL is the credential: anyone holding it can post to that channel, which is exactly why it belongs in the platform rather than in a repository. One URL is one channel, so an application that posts to two channels holds two connections, the second under a prefix.",
57657
+ vars: ["TEAMS_WEBHOOK_URL"],
57658
+ steps: [
57659
+ "Create a service account or application in the vendor console.",
57660
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57661
+ "Generate a key and hand it to the platform once; it is never shown again."
57662
+ ],
57663
+ docsUrl: "https://learn.microsoft.com/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook"
57664
+ },
57665
+ {
57666
+ id: "slack",
57667
+ name: "Slack",
57668
+ category: "Messaging",
57669
+ tone: "violet",
57670
+ blurb: "Post notifications into a customer\u2019s workspace.",
57671
+ long: "Posts to Slack as a bot, and verifies the requests Slack sends back. The bot token identifies the app, the signing secret proves an incoming webhook really came from Slack, and the channel id is where messages land. Scope the token to the channels it needs: a bot token is not read-only, and one granted broadly can read far more of a workspace than the feature requires.",
57672
+ vars: ["SLACK_BOT_TOKEN", "SLACK_SIGNING_SECRET", "SLACK_CHANNEL_ID"],
57673
+ steps: [
57674
+ "Create a service account or application in the vendor console.",
57675
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57676
+ "Generate a key and hand it to the platform once; it is never shown again."
57677
+ ],
57678
+ docsUrl: "https://api.slack.com/docs"
57679
+ },
57680
+ {
57681
+ id: "stripe",
57682
+ name: "Stripe",
57683
+ category: "Payments",
57684
+ tone: "violet",
57685
+ blurb: "Charges, subscriptions and webhooks.",
57686
+ long: "Takes payments and receives Stripe's webhooks. Three variables: the secret key the server signs calls with, the webhook secret that proves an event is genuinely from Stripe, and the publishable key the browser may safely see. A test key and a live key are two connections, not one \u2014 name them so the difference is obvious, and grant the test one to dev and the live one to production. Verifying the webhook signature is the application's job; the platform supplies the secret, not the check.",
57687
+ vars: ["STRIPE_SECRET_KEY", "STRIPE_WEBHOOK_SECRET", "STRIPE_PUBLISHABLE_KEY"],
57688
+ steps: [
57689
+ "Create a service account or application in the vendor console.",
57690
+ "Grant it only the scopes this connector lists \u2014 nothing wider.",
57691
+ "Generate a key and hand it to the platform once; it is never shown again."
57692
+ ],
57693
+ docsUrl: "https://docs.stripe.com/api"
57694
+ },
57695
+ {
57696
+ id: "supabase",
57697
+ name: "Supabase",
57698
+ category: "Database",
57699
+ tone: "green",
57700
+ blurb: "Postgres, auth and storage from a customer\u2019s Supabase project.",
57701
+ long: "Connects an application to a Supabase project the customer owns \u2014 the Postgres database, its auto-generated REST API, auth and storage. Three variables: the project URL, the anon key the browser may hold, and the service_role key that bypasses Row Level Security and must only ever be read server-side. The project stays the customer's, on their own Supabase account and billing, so leaving the platform costs nothing: the same three variables set anywhere else keep the app running. This is also the natural landing place for an app built elsewhere against Supabase \u2014 point it at the same project and the data never moves.",
57702
+ vars: ["SUPABASE_URL", "SUPABASE_ANON_KEY", "SUPABASE_SERVICE_ROLE_KEY"],
57703
+ steps: [
57704
+ "Create or open the project in the customer's own Supabase account \u2014 never one owned by an individual consultant.",
57705
+ "Copy the project URL and the anon (publishable) key from the project's API settings.",
57706
+ "Copy the service_role (secret) key. It bypasses Row Level Security, so it belongs only in this platform and the customer's password manager \u2014 never in a repository or a browser.",
57707
+ "Enable Row Level Security on every table the application exposes. The anon key is only as safe as the policies behind it."
57708
+ ],
57709
+ docsUrl: "https://supabase.com/docs/guides/api",
57710
+ attestation: {
57711
+ label: "Row Level Security is enabled on every table the anon key can reach",
57712
+ detail: "The anon key is designed to be public, so it is only as safe as the policies behind it: without RLS, anyone holding it can read and write every exposed table through the auto-generated API. RLS lives in the customer's Supabase project, so the platform cannot enable it or check that it is on."
57713
+ }
57714
+ },
57715
+ {
57716
+ id: "google-gemini",
57717
+ name: "Google Gemini",
57718
+ category: "AI",
57719
+ tone: "blue",
57720
+ blurb: "Gemini models through the customer\u2019s own Google AI key.",
57721
+ long: "Calls Gemini through an API key the customer owns, created in Google AI Studio on their own Google account and billing. One variable: the key, injected server-side at deploy time, so it never reaches a repository or a browser. This is also where an app built against a hosted AI gateway lands. Point the same calls at the Gemini API with a key the customer holds, and the feature keeps working with no platform in the middle. Usage is billed by Google on the customer's account: set a spend limit in the console before the first deploy, not after the first invoice.",
57722
+ vars: ["GEMINI_API_KEY"],
57723
+ steps: [
57724
+ "Create an API key in Google AI Studio, on the customer's own Google account, never a consultant's personal one.",
57725
+ "Set a spend limit on the project in the Google console. Usage lands on the customer's bill, not the platform's.",
57726
+ "Hand the key to the platform once. It is never shown again."
57727
+ ],
57728
+ docsUrl: "https://ai.google.dev/gemini-api/docs"
57729
+ },
57730
+ {
57731
+ id: "openai",
57732
+ name: "OpenAI",
57733
+ category: "AI",
57734
+ tone: "green",
57735
+ blurb: "GPT models through the customer\u2019s own OpenAI key.",
57736
+ long: "Calls the OpenAI API with a key the customer owns. One variable, injected server-side at deploy time, so the key never reaches a repository or a browser, and never a client bundle, where a pasted key is public within the hour. Create the key in a project of its own so it can be revoked without touching anything else, and give it the least permission that works: a key that calls models does not need to manage the account. Usage is billed by OpenAI on the customer's account: set a monthly budget in the console before the first deploy.",
57737
+ vars: ["OPENAI_API_KEY"],
57738
+ steps: [
57739
+ "Create a project for the application on the customer's OpenAI account, so its key can be revoked on its own.",
57740
+ "Create an API key in that project, with the least permission that works.",
57741
+ "Set a monthly budget on the project. Usage lands on the customer's bill, not the platform's.",
57742
+ "Hand the key to the platform once. It is never shown again."
57743
+ ],
57744
+ docsUrl: "https://platform.openai.com/docs/api-reference"
57745
+ },
57746
+ {
57747
+ id: "anthropic",
57748
+ name: "Anthropic Claude",
57749
+ category: "AI",
57750
+ tone: "apricot",
57751
+ blurb: "Claude models through the customer\u2019s own Anthropic key.",
57752
+ long: "Calls Claude with an API key the customer owns, created in the Anthropic Console on their own account and billing. One variable, injected server-side at deploy time, so the key never reaches a repository or a browser. Claude may also be the model behind the coding agent that built the application, but this key is a different thing: it is the application's own runtime access, spending the customer's budget, so it belongs in a workspace of its own with a spend limit of its own. Usage is billed by Anthropic on the customer's account.",
57753
+ vars: ["ANTHROPIC_API_KEY"],
57754
+ steps: [
57755
+ "Create a workspace for the application on the customer's Anthropic account, so its spend and limits stand alone.",
57756
+ "Create an API key in that workspace and set a monthly spend limit.",
57757
+ "Hand the key to the platform once. It is never shown again."
57758
+ ],
57759
+ docsUrl: "https://docs.claude.com/en/api/overview"
57760
+ }
57761
+ ];
57762
+ var CONNECTOR_CATEGORIES = Array.from(new Set(CONNECTORS.map((c) => c.category)));
57763
+
57764
+ // libs/shared/src/entitlements/catalog.ts
57765
+ var MB = 1024 * 1024;
57766
+ var LOG_TIER_LIMITS = {
57767
+ free: { retentionDays: 3, dailyBytes: 100 * MB },
57768
+ basic: { retentionDays: 7, dailyBytes: 500 * MB },
57769
+ standard: { retentionDays: 30, dailyBytes: 1024 * MB },
57770
+ advanced: { retentionDays: 90, dailyBytes: 2048 * MB }
57771
+ };
57772
+ var FREE_LIMITS = { retentionDays: 3, dailyBytes: 100 * MB };
57773
+
57565
57774
  // libs/shared/src/controllers/health.controller.ts
57566
57775
  var import_common2 = __toESM(require_common2());
57567
57776
 
@@ -57589,7 +57798,7 @@ HealthController = __decorateClass([
57589
57798
  ], HealthController);
57590
57799
 
57591
57800
  // libs/shared/src/guards/validate-request.guard.ts
57592
- var import_common4 = __toESM(require_common2());
57801
+ var import_common5 = __toESM(require_common2());
57593
57802
  var import_jsonwebtoken = __toESM(require_jsonwebtoken());
57594
57803
 
57595
57804
  // libs/shared/src/utils/auth-public-key.ts
@@ -57612,12 +57821,12 @@ var AuthPublicKeyCache = class _AuthPublicKeyCache {
57612
57821
  return this.publicKey;
57613
57822
  }
57614
57823
  if (this.publicKey === null && throttled) {
57615
- throw new import_common3.UnauthorizedException("auth-service returned no usable public key");
57824
+ throw new import_common3.ServiceUnavailableException("Cannot verify the session right now: waiting before retrying auth-service");
57616
57825
  }
57617
57826
  const authServiceUrl = process.env["AUTH_SERVICE_URL"] ?? "";
57618
57827
  if (authServiceUrl === "") {
57619
57828
  _AuthPublicKeyCache.logger.error("AUTH_SERVICE_URL is not set \u2014 no JWT can be verified, every user request will 401");
57620
- throw new import_common3.UnauthorizedException("AUTH_SERVICE_URL is not set");
57829
+ throw new import_common3.ServiceUnavailableException("Cannot verify the session: AUTH_SERVICE_URL is not set");
57621
57830
  }
57622
57831
  this.lastFetchAtMs = Date.now();
57623
57832
  let key;
@@ -57658,7 +57867,7 @@ var AuthPublicKeyCache = class _AuthPublicKeyCache {
57658
57867
  return this.publicKey;
57659
57868
  }
57660
57869
  _AuthPublicKeyCache.logger.error(`${reason}; no cached key to fall back to`);
57661
- throw new import_common3.UnauthorizedException("auth-service returned no usable public key");
57870
+ throw new import_common3.ServiceUnavailableException("Cannot verify the session right now: no auth-service public key available");
57662
57871
  }
57663
57872
  /** Parse it rather than pattern-match it: a truncated or corrupted PEM can carry the header and still be unusable. */
57664
57873
  isUsablePublicKey(key) {
@@ -57685,22 +57894,96 @@ function mayBeStaleKey(err) {
57685
57894
  return !["jwt malformed", "jwt must be provided", "invalid token", "jwt signature is required"].includes(message);
57686
57895
  }
57687
57896
 
57897
+ // libs/shared/src/utils/revocation-cache.ts
57898
+ var import_common4 = __toESM(require_common2());
57899
+ var RevocationCache = class _RevocationCache {
57900
+ constructor() {
57901
+ this.answers = /* @__PURE__ */ new Map();
57902
+ }
57903
+ static {
57904
+ this.logger = new import_common4.Logger(_RevocationCache.name);
57905
+ }
57906
+ static {
57907
+ /** How long an answer is trusted, reachable or not. */
57908
+ this.TTL_MS = 6e4;
57909
+ }
57910
+ /**
57911
+ * @param jti the token's id, already taken from a signature-verified token
57912
+ * @param token the token itself — introspection authenticates with it, so no
57913
+ * service needs an internal key or a Redis connection to ask
57914
+ */
57915
+ async isRevoked(jti, token) {
57916
+ const cached2 = this.answers.get(jti);
57917
+ const age = cached2 ? Date.now() - cached2.fetchedAtMs : Infinity;
57918
+ if (cached2 && age < _RevocationCache.TTL_MS) {
57919
+ return cached2.revoked;
57920
+ }
57921
+ const authServiceUrl = process.env["AUTH_SERVICE_URL"] ?? "";
57922
+ if (authServiceUrl === "") {
57923
+ _RevocationCache.logger.error("AUTH_SERVICE_URL is not set \u2014 cannot check whether a token has been revoked");
57924
+ throw new import_common4.ServiceUnavailableException("Cannot verify the session right now");
57925
+ }
57926
+ try {
57927
+ const res = await fetch(`${authServiceUrl}/auth/introspect`, {
57928
+ method: "POST",
57929
+ headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" }
57930
+ });
57931
+ if (!res.ok) {
57932
+ if (res.status === 401) {
57933
+ this.answers.set(jti, { revoked: true, fetchedAtMs: Date.now() });
57934
+ return true;
57935
+ }
57936
+ throw new Error(`introspect returned ${String(res.status)}`);
57937
+ }
57938
+ const body = await res.json();
57939
+ const revoked = body.data?.revoked === true;
57940
+ this.answers.set(jti, { revoked, fetchedAtMs: Date.now() });
57941
+ this.evictStale();
57942
+ return revoked;
57943
+ } catch (err) {
57944
+ const staleness = cached2 ? ` \u2014 cached answer is ${String(Math.round(age / 1e3))}s old` : " \u2014 nothing cached";
57945
+ _RevocationCache.logger.warn(
57946
+ `revocation check failed (${err instanceof Error ? err.message : String(err)})${staleness}`
57947
+ );
57948
+ throw new import_common4.ServiceUnavailableException("Cannot verify the session right now");
57949
+ }
57950
+ }
57951
+ evictStale() {
57952
+ const cutoff = Date.now() - _RevocationCache.TTL_MS;
57953
+ for (const [key, entry] of this.answers) {
57954
+ if (entry.fetchedAtMs < cutoff) {
57955
+ this.answers.delete(key);
57956
+ }
57957
+ }
57958
+ }
57959
+ };
57960
+
57688
57961
  // libs/shared/src/guards/validate-request.guard.ts
57689
57962
  var ValidateRequestGuard = class {
57690
57963
  constructor() {
57691
57964
  this.publicKeyCache = new AuthPublicKeyCache();
57965
+ this.revocationCache = new RevocationCache();
57692
57966
  }
57693
57967
  async canActivate(context) {
57694
57968
  const req = context.switchToHttp().getRequest();
57695
57969
  const authHeader = req.headers.authorization;
57696
57970
  if (authHeader?.startsWith("Bearer ")) {
57697
57971
  const token = authHeader.slice(7);
57972
+ let auth;
57698
57973
  try {
57699
- req.auth = await this.verifyWithRetry(token);
57700
- return true;
57701
- } catch {
57702
- throw new import_common4.UnauthorizedException("Invalid or expired token");
57974
+ auth = await this.verifyWithRetry(token);
57975
+ } catch (err) {
57976
+ if (err instanceof import_common5.HttpException && err.getStatus() === 503) {
57977
+ throw err;
57978
+ }
57979
+ throw new import_common5.UnauthorizedException("Invalid or expired token");
57703
57980
  }
57981
+ const jti = auth.kind === "user" ? auth.payload["jti"] : void 0;
57982
+ if (typeof jti === "string" && await this.revocationCache.isRevoked(jti, token)) {
57983
+ throw new import_common5.UnauthorizedException("Token has been revoked");
57984
+ }
57985
+ req.auth = auth;
57986
+ return true;
57704
57987
  }
57705
57988
  const internalServiceKey = process.env["INTERNAL_SERVICE_KEY"];
57706
57989
  const sentKey = req.headers["x-internal-secret"] ?? req.headers["x-service-key"];
@@ -57708,7 +57991,7 @@ var ValidateRequestGuard = class {
57708
57991
  req.auth = { kind: "internal" };
57709
57992
  return true;
57710
57993
  }
57711
- throw new import_common4.UnauthorizedException("Missing or invalid Authorization header");
57994
+ throw new import_common5.UnauthorizedException("Missing or invalid Authorization header");
57712
57995
  }
57713
57996
  /** Verify with the cached key, then once more with a force-refetched key (a
57714
57997
  * stale key after an auth-service keypair change is the common false negative). */
@@ -57728,11 +58011,11 @@ var ValidateRequestGuard = class {
57728
58011
  }
57729
58012
  };
57730
58013
  ValidateRequestGuard = __decorateClass([
57731
- (0, import_common4.Injectable)()
58014
+ (0, import_common5.Injectable)()
57732
58015
  ], ValidateRequestGuard);
57733
58016
 
57734
58017
  // libs/shared/src/guards/admin.guard.ts
57735
- var import_common5 = __toESM(require_common2());
58018
+ var import_common6 = __toESM(require_common2());
57736
58019
  var import_jsonwebtoken2 = __toESM(require_jsonwebtoken());
57737
58020
  var AdminGuard = class {
57738
58021
  constructor() {
@@ -57747,13 +58030,13 @@ var AdminGuard = class {
57747
58030
  try {
57748
58031
  payload = await this.verifyWithRetry(token);
57749
58032
  } catch {
57750
- throw new import_common5.UnauthorizedException("Invalid or expired token");
58033
+ throw new import_common6.UnauthorizedException("Invalid or expired token");
57751
58034
  }
57752
58035
  if (payload.service === true) {
57753
58036
  return true;
57754
58037
  }
57755
58038
  if (payload.role !== "super_admin") {
57756
- throw new import_common5.ForbiddenException("Admin access required");
58039
+ throw new import_common6.ForbiddenException("Admin access required");
57757
58040
  }
57758
58041
  return true;
57759
58042
  }
@@ -57762,7 +58045,7 @@ var AdminGuard = class {
57762
58045
  if (internalServiceKey && serviceKey === internalServiceKey) {
57763
58046
  return true;
57764
58047
  }
57765
- throw new import_common5.UnauthorizedException("Missing or invalid Authorization header");
58048
+ throw new import_common6.UnauthorizedException("Missing or invalid Authorization header");
57766
58049
  }
57767
58050
  /** Verify with the cached key, then once more with a force-refetched key, so a
57768
58051
  * keypair change on auth-service self-heals instead of 401'ing until restart. */
@@ -57778,7 +58061,7 @@ var AdminGuard = class {
57778
58061
  }
57779
58062
  };
57780
58063
  AdminGuard = __decorateClass([
57781
- (0, import_common5.Injectable)()
58064
+ (0, import_common6.Injectable)()
57782
58065
  ], AdminGuard);
57783
58066
 
57784
58067
  // libs/shared/src/utils/jwt-lifetime.ts
@@ -57809,10 +58092,10 @@ function isTokenDueForRefresh(token, nowMs = Date.now()) {
57809
58092
  }
57810
58093
 
57811
58094
  // libs/shared/src/agent-policy/assert.ts
57812
- var import_common6 = __toESM(require_common2());
58095
+ var import_common7 = __toESM(require_common2());
57813
58096
 
57814
58097
  // libs/shared/src/agent-policy/enforce.ts
57815
- var import_common7 = __toESM(require_common2());
58098
+ var import_common8 = __toESM(require_common2());
57816
58099
 
57817
58100
  // libs/shared/src/clients/authClient.ts
57818
58101
  var AuthClient = class {
@@ -57857,6 +58140,39 @@ var AuthClient = class {
57857
58140
  return false;
57858
58141
  }
57859
58142
  }
58143
+ /**
58144
+ * Refuse every token this person already holds (#939).
58145
+ *
58146
+ * For withdrawing access, which `revoke` cannot express: nobody is holding a
58147
+ * departed member's tokens, so there is no id to deny. Fail-soft like
58148
+ * `revoke` — a blocked user must stay blocked even if this call does not
58149
+ * land, and the gateway's own check still refuses them within its cache
58150
+ * window.
58151
+ */
58152
+ async revokeUser(userId, serviceKey) {
58153
+ return this.postInternal("revoke-user", { userId }, serviceKey);
58154
+ }
58155
+ /**
58156
+ * Refuse every token scoped to this organisation (#939).
58157
+ *
58158
+ * Org, not user: a member who also belongs to another org keeps that org's
58159
+ * tokens. Destroying those too is the mistake #633 was filed for.
58160
+ */
58161
+ async revokeOrg(orgId, serviceKey) {
58162
+ return this.postInternal("revoke-org", { orgId }, serviceKey);
58163
+ }
58164
+ async postInternal(path, body, serviceKey) {
58165
+ try {
58166
+ const res = await fetch(`${this.baseUrl}/auth/${path}`, {
58167
+ method: "POST",
58168
+ headers: { "Content-Type": "application/json", "x-internal-secret": serviceKey },
58169
+ body: JSON.stringify(body)
58170
+ });
58171
+ return res.ok;
58172
+ } catch {
58173
+ return false;
58174
+ }
58175
+ }
57860
58176
  /** Re-scope the caller's token to `orgId` (must be one of their memberships). */
57861
58177
  async selectOrg(options) {
57862
58178
  try {
@@ -58090,12 +58406,12 @@ var DeployClient = class {
58090
58406
  * a failure just leaves the (low-sensitivity, display-only) name; the person is
58091
58407
  * already gone so there's nothing to retry against.
58092
58408
  */
58093
- async anonymiseBuilds(appIds, triggeredBy) {
58409
+ async anonymiseBuilds(appIds, triggeredBy, userId) {
58094
58410
  try {
58095
58411
  await fetch(`${this.baseUrl}/internal/erase/orgs/builds/anonymise`, {
58096
58412
  method: "POST",
58097
58413
  headers: this.internalHeaders,
58098
- body: JSON.stringify({ appIds, triggeredBy })
58414
+ body: JSON.stringify({ appIds, triggeredBy, userId })
58099
58415
  });
58100
58416
  } catch {
58101
58417
  }
@@ -58241,6 +58557,12 @@ var ApplicationClient = class {
58241
58557
  const json = await res.json();
58242
58558
  return json.data ?? [];
58243
58559
  }
58560
+ /**
58561
+ * Throws rather than returning null on failure: the backend distinguishes a
58562
+ * name held by a trashed application from a storage limit from an invalid
58563
+ * name, and collapsing all of them into `null` left the only caller guessing
58564
+ * — it blamed the subscription for every one of them.
58565
+ */
58244
58566
  async createApplication(options) {
58245
58567
  const res = await fetch(`${this.baseUrl}/applications`, {
58246
58568
  method: "POST",
@@ -58248,9 +58570,17 @@ var ApplicationClient = class {
58248
58570
  body: JSON.stringify(options)
58249
58571
  });
58250
58572
  if (!res.ok) {
58251
- return null;
58573
+ const body = await res.json().catch(() => ({}));
58574
+ throw new UpstreamRequestError(
58575
+ "APP_CREATE_FAILED",
58576
+ body.error ?? body.message ?? `Request failed with status ${String(res.status)}`,
58577
+ res.status
58578
+ );
58252
58579
  }
58253
58580
  const json = await res.json();
58581
+ if (json.data === null) {
58582
+ throw new UpstreamRequestError("APP_CREATE_FAILED", "Application was not created", res.status);
58583
+ }
58254
58584
  return json.data;
58255
58585
  }
58256
58586
  async getApplication(id) {
@@ -58578,17 +58908,20 @@ var AccountClient = class {
58578
58908
  };
58579
58909
 
58580
58910
  // libs/shared/src/utils/validate-identifier.ts
58581
- var import_common8 = __toESM(require_common2());
58911
+ var import_common9 = __toESM(require_common2());
58582
58912
 
58583
58913
  // libs/shared/src/utils/environment.ts
58584
58914
  var ENVIRONMENT_NAMES = ["dev", "staging", "production"];
58585
58915
 
58586
58916
  // libs/shared/src/utils/org-ownership.ts
58587
- var import_common9 = __toESM(require_common2());
58917
+ var import_common10 = __toESM(require_common2());
58588
58918
 
58589
58919
  // libs/shared/src/utils/rate-limit.ts
58590
- var import_common10 = __toESM(require_common2());
58591
- var logger = new import_common10.Logger("RateLimiter");
58920
+ var import_common11 = __toESM(require_common2());
58921
+ var logger = new import_common11.Logger("RateLimiter");
58922
+
58923
+ // libs/shared/src/utils/session-store.ts
58924
+ var import_crypto4 = require("crypto");
58592
58925
 
58593
58926
  // libs/shared/src/notifications/registry.ts
58594
58927
  function v(vars, k) {
@@ -58743,6 +59076,79 @@ var NOTIFICATION_TYPES = {
58743
59076
  body: (x) => `A payment of ${v(x, "amount")} failed. Update your payment method to avoid suspension.`,
58744
59077
  target: invoicesTarget
58745
59078
  },
59079
+ // The check could not reach the application twice in a row. Free on every
59080
+ // plan: a platform that knows an application is unreachable and does not
59081
+ // mention it is worse than one that never looked.
59082
+ "app.unreachable": {
59083
+ key: "app.unreachable",
59084
+ category: "deploy",
59085
+ severity: "error",
59086
+ audience: "members",
59087
+ inAppDefault: true,
59088
+ emailDefault: true,
59089
+ emailTemplateId: "app-unreachable",
59090
+ title: (x) => `${v(x, "appName")} is not responding`,
59091
+ body: (x) => `${v(x, "appName")} (${v(x, "environment")}) did not answer two checks in a row: ${v(x, "detail")}. A sleeping environment is never reported this way, so this is the application itself.`,
59092
+ target: () => null
59093
+ },
59094
+ // A log-based alert rule tripped. One type for every rule rather than one
59095
+ // per key: the rule already words itself, and a per-key type would mean a
59096
+ // registry entry and an email template for each new rule.
59097
+ //
59098
+ // Email is off by default — a rule with a low threshold can trip often, and
59099
+ // an inbox is the wrong place for that. Slack, Teams and webhooks carry the
59100
+ // urgent path; this is the record.
59101
+ "app.alert_rule": {
59102
+ key: "app.alert_rule",
59103
+ category: "deploy",
59104
+ severity: "warning",
59105
+ audience: "members",
59106
+ inAppDefault: true,
59107
+ emailDefault: false,
59108
+ emailTemplateId: null,
59109
+ title: (x) => `${v(x, "appName")}: ${v(x, "ruleLabel")}`,
59110
+ body: (x) => `${v(x, "detail")} on ${v(x, "environment")}.`,
59111
+ target: () => null
59112
+ },
59113
+ "app.recovered": {
59114
+ key: "app.recovered",
59115
+ category: "deploy",
59116
+ severity: "success",
59117
+ audience: "members",
59118
+ inAppDefault: true,
59119
+ emailDefault: true,
59120
+ emailTemplateId: "app-recovered",
59121
+ title: (x) => `${v(x, "appName")} is responding again`,
59122
+ body: (x) => `${v(x, "appName")} (${v(x, "environment")}) is answering again after ${v(x, "downFor")}.`,
59123
+ target: () => null
59124
+ },
59125
+ // The application has shipped most of, or all of, what its log tier allows
59126
+ // today. Worth saying out loud: passing the cap stops RETENTION, and a user
59127
+ // who does not know that reads the gap as lost logs rather than a limit.
59128
+ "usage.logs.nearing": {
59129
+ key: "usage.logs.nearing",
59130
+ category: "usage",
59131
+ severity: "warning",
59132
+ audience: "members",
59133
+ inAppDefault: true,
59134
+ emailDefault: false,
59135
+ emailTemplateId: null,
59136
+ title: (x) => `${v(x, "appId")} is near its daily log allowance`,
59137
+ body: (x) => `${v(x, "appId")} (${v(x, "environment")}) has used most of today's log allowance. Past it, new logs are not retained until tomorrow \u2014 the live tail keeps working either way.`,
59138
+ target: () => null
59139
+ },
59140
+ "usage.logs.reached": {
59141
+ key: "usage.logs.reached",
59142
+ category: "usage",
59143
+ severity: "warning",
59144
+ audience: "members",
59145
+ inAppDefault: true,
59146
+ emailDefault: false,
59147
+ emailTemplateId: null,
59148
+ title: (x) => `${v(x, "appId")} reached its daily log allowance`,
59149
+ body: (x) => `${v(x, "appId")} (${v(x, "environment")}) has used today's log allowance, so new logs are not retained until tomorrow. The live tail is unaffected. If this happens often the application is probably logging in a loop, or the tier is too small for it.`,
59150
+ target: () => null
59151
+ },
58746
59152
  // Owner/admin confirmation that the org is scheduled for deletion, with the window.
58747
59153
  "org.erasure.scheduled": {
58748
59154
  key: "org.erasure.scheduled",
@@ -58769,6 +59175,21 @@ var NOTIFICATION_TYPES = {
58769
59175
  body: (x) => `Your access to the organisation "${v(x, "orgName")}" has been suspended because it is scheduled for deletion.`,
58770
59176
  target: () => null
58771
59177
  },
59178
+ // A developer has asked for a connection on one of their environments. Admins
59179
+ // only, because they are the ones who can act on it — and it is the moment the
59180
+ // governed path either stays faster than pasting a credential, or does not.
59181
+ "connection.requested": {
59182
+ key: "connection.requested",
59183
+ category: "connection",
59184
+ severity: "info",
59185
+ audience: "admins",
59186
+ inAppDefault: true,
59187
+ emailDefault: true,
59188
+ emailTemplateId: "connection-requested",
59189
+ title: (x) => `${v(x, "connectorName")} requested for ${v(x, "applicationName")}`,
59190
+ body: (x) => `${v(x, "requestedBy")} asked for a ${v(x, "connectorName")} connection on ${v(x, "environment")} of "${v(x, "applicationName")}". Grant it from Connections, or decline with a reason they can read.`,
59191
+ target: () => "connections"
59192
+ },
58772
59193
  // Confirmation to the person that their account is scheduled for deletion (userId-targeted).
58773
59194
  "user.erasure.scheduled": {
58774
59195
  key: "user.erasure.scheduled",
@@ -58932,6 +59353,9 @@ var tools = [
58932
59353
  function authHeaders(token) {
58933
59354
  return { Authorization: `Bearer ${token}`, "Content-Type": "application/json" };
58934
59355
  }
59356
+ function ok(data) {
59357
+ return { content: [{ type: "text", text: JSON.stringify({ success: true, data, error: null }) }] };
59358
+ }
58935
59359
  function notAuthenticatedResult() {
58936
59360
  return fail({ status: 401, message: "Please sign in first. Use org_request_otp and org_verify_otp to authenticate." });
58937
59361
  }
@@ -59170,9 +59594,20 @@ async function handleAppCreate(args) {
59170
59594
  orgId: args["orgId"],
59171
59595
  ...args["templateId"] !== void 0 ? { templateId: args["templateId"] } : {}
59172
59596
  };
59173
- const app = await appClient(token).createApplication(createOptions);
59174
- if (!app) {
59175
- return fail({ code: "APP_CREATE_FAILED", message: "Failed to create application.", hint: "Usually a plan limit (check org_get_subscription) or an invalid name (lowercase letters, numbers, hyphens only)." });
59597
+ let app;
59598
+ try {
59599
+ app = await appClient(token).createApplication(createOptions);
59600
+ } catch (err) {
59601
+ if (err instanceof UpstreamRequestError) {
59602
+ const planLimited = /plan allows|upgrade/i.test(err.message);
59603
+ return fail({
59604
+ ...err.status !== void 0 ? { status: err.status } : {},
59605
+ code: "APP_CREATE_FAILED",
59606
+ message: err.message,
59607
+ ...planLimited ? { hint: "This is a plan limit \u2014 check the subscription with org_get_subscription." } : {}
59608
+ });
59609
+ }
59610
+ throw err;
59176
59611
  }
59177
59612
  const billing = await describeApplicationCharge(createOptions.orgId, token);
59178
59613
  return {
@@ -59216,8 +59651,8 @@ var appDeleteTool = {
59216
59651
  };
59217
59652
  async function handleAppDelete(args) {
59218
59653
  const id = args["applicationId"];
59219
- const ok3 = await appClient(args["token"]).deleteApplication(id);
59220
- if (!ok3) {
59654
+ const ok2 = await appClient(args["token"]).deleteApplication(id);
59655
+ if (!ok2) {
59221
59656
  return fail({ code: "APP_DELETE_FAILED", message: `Could not delete application ${id}.`, hint: "Check the application ID and that you own it. It may already be deleted." });
59222
59657
  }
59223
59658
  return {
@@ -59492,6 +59927,111 @@ var tools5 = [
59492
59927
  { definition: appDeleteConfigTool, handle: handleAppDeleteConfig }
59493
59928
  ];
59494
59929
 
59930
+ // apps/mcp-server/src/tools/connections.ts
59931
+ var appDescribeConnectionsTool = {
59932
+ name: "app_describe_connections",
59933
+ description: "Describe the platform connections granted to an application environment \u2014 mail, storage, databases, payments, AI and the rest of the connector catalogue. Returns each granted connection's connector, its name, and the environment variable NAMES the platform injects at deploy time. Never returns a credential. ALWAYS call this before writing or changing code that talks to an external system: write against the injected variables, never hardcode a credential, and never add a client library that contradicts the granted connector. If nothing is granted, say so and point the user at Connections rather than inventing a path of your own.",
59934
+ annotations: { readOnlyHint: true, destructiveHint: false },
59935
+ inputSchema: {
59936
+ type: "object",
59937
+ properties: {
59938
+ token: { type: "string", description: "JWT session token from org_verify_otp" },
59939
+ applicationId: { type: "string", description: "The application UUID" },
59940
+ environment: {
59941
+ type: "string",
59942
+ enum: [...ENVIRONMENT_NAMES],
59943
+ description: "Environment to describe \u2014 a grant in production does not imply one in dev"
59944
+ }
59945
+ },
59946
+ required: ["token", "applicationId", "environment"]
59947
+ }
59948
+ };
59949
+ async function handleAppDescribeConnections(args) {
59950
+ const token = typeof args["token"] === "string" ? args["token"] : "";
59951
+ if (!token) {
59952
+ return notAuthenticatedResult();
59953
+ }
59954
+ const applicationId = typeof args["applicationId"] === "string" ? args["applicationId"] : "";
59955
+ const environment = typeof args["environment"] === "string" ? args["environment"] : "";
59956
+ try {
59957
+ const url = `${config2.services.applicationServiceUrl}/applications/${encodeURIComponent(applicationId)}/connections?environment=${encodeURIComponent(environment)}`;
59958
+ const res = await fetch(url, { headers: authHeaders(token) });
59959
+ const json = await res.json();
59960
+ if (!res.ok) {
59961
+ return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
59962
+ }
59963
+ return { content: [{ type: "text", text: JSON.stringify({ connections: json.data }, null, 2) }] };
59964
+ } catch (err) {
59965
+ return fromCatch(err);
59966
+ }
59967
+ }
59968
+ var appRequestConnectionTool = {
59969
+ name: "app_request_connection",
59970
+ description: 'Ask an organisation admin for a connection on one application environment. Use this when app_describe_connections returns nothing for the system you need \u2014 instead of asking the user for a credential or telling them to go and configure one. Names a connector from the catalogue (e.g. "smtp", "stripe", "slack"); the admin decides which of their connections satisfies it and is notified in the platform and by email. Repeating a request that is already pending returns the open one rather than queueing another.',
59971
+ annotations: { readOnlyHint: false, destructiveHint: false },
59972
+ inputSchema: {
59973
+ type: "object",
59974
+ properties: {
59975
+ token: { type: "string", description: "JWT session token from org_verify_otp" },
59976
+ applicationId: { type: "string", description: "The application UUID" },
59977
+ environment: {
59978
+ type: "string",
59979
+ enum: [...ENVIRONMENT_NAMES],
59980
+ description: "Environment the connection is needed in"
59981
+ },
59982
+ connectorId: {
59983
+ type: "string",
59984
+ description: 'A connector id as returned by app_describe_connections, e.g. "smtp" or "stripe"'
59985
+ },
59986
+ note: {
59987
+ type: "string",
59988
+ description: "One line on what it is for \u2014 the admin reads this when deciding"
59989
+ }
59990
+ },
59991
+ required: ["token", "applicationId", "environment", "connectorId"]
59992
+ }
59993
+ };
59994
+ async function handleAppRequestConnection(args) {
59995
+ const token = typeof args["token"] === "string" ? args["token"] : "";
59996
+ if (!token) {
59997
+ return notAuthenticatedResult();
59998
+ }
59999
+ const applicationId = typeof args["applicationId"] === "string" ? args["applicationId"] : "";
60000
+ try {
60001
+ const res = await fetch(
60002
+ `${config2.services.applicationServiceUrl}/applications/${encodeURIComponent(applicationId)}/connection-requests`,
60003
+ {
60004
+ method: "POST",
60005
+ headers: { ...authHeaders(token), "Content-Type": "application/json" },
60006
+ body: JSON.stringify({
60007
+ environment: args["environment"],
60008
+ connectorId: args["connectorId"],
60009
+ note: typeof args["note"] === "string" ? args["note"] : ""
60010
+ })
60011
+ }
60012
+ );
60013
+ const json = await res.json();
60014
+ if (!res.ok) {
60015
+ return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
60016
+ }
60017
+ return {
60018
+ content: [
60019
+ { type: "text", text: JSON.stringify(json.data, null, 2) },
60020
+ {
60021
+ type: "text",
60022
+ text: "Requested. An admin has been notified. Write the code against the variables now \u2014 they arrive at the next deploy once the request is granted."
60023
+ }
60024
+ ]
60025
+ };
60026
+ } catch (err) {
60027
+ return fromCatch(err);
60028
+ }
60029
+ }
60030
+ var tools6 = [
60031
+ { definition: appDescribeConnectionsTool, handle: handleAppDescribeConnections },
60032
+ { definition: appRequestConnectionTool, handle: handleAppRequestConnection }
60033
+ ];
60034
+
59495
60035
  // apps/mcp-server/src/tools/database.ts
59496
60036
  var appDbQueryTool = {
59497
60037
  name: "app_db_query",
@@ -59585,7 +60125,7 @@ async function handleAppDbAudit(args) {
59585
60125
  const isError = !res.ok || json.success === false;
59586
60126
  return { content: [{ type: "text", text: JSON.stringify(json) }], isError };
59587
60127
  }
59588
- var tools6 = [
60128
+ var tools7 = [
59589
60129
  { definition: appDbQueryTool, handle: handleAppDbQuery },
59590
60130
  { definition: appDbAuditTool, handle: handleAppDbAudit }
59591
60131
  ];
@@ -59818,7 +60358,7 @@ async function handleOrgDeployCancel(args) {
59818
60358
  }]
59819
60359
  };
59820
60360
  }
59821
- var tools7 = [
60361
+ var tools8 = [
59822
60362
  { definition: orgDeployTool, handle: handleOrgDeploy },
59823
60363
  { definition: orgPromoteTool, handle: handleOrgPromote },
59824
60364
  { definition: orgDeployStatusTool, handle: handleOrgDeployStatus },
@@ -59944,7 +60484,7 @@ function formatLogTail(log) {
59944
60484
  Log${lines.length > 100 ? " (last 100 lines)" : ""}:
59945
60485
  ${tail}`;
59946
60486
  }
59947
- var tools8 = [
60487
+ var tools9 = [
59948
60488
  { definition: appDevSyncTool, handle: handleAppDevSync }
59949
60489
  ];
59950
60490
 
@@ -60083,7 +60623,7 @@ async function handleOrgListGitCredentials(args) {
60083
60623
  return fail({ code: "UPSTREAM_ERROR", message: "Failed to connect to user service", hint: "The user service is unreachable. Retry shortly." });
60084
60624
  }
60085
60625
  }
60086
- var tools9 = [
60626
+ var tools10 = [
60087
60627
  { definition: orgSetupGitCredentialsTool, handle: handleOrgSetupGitCredentials },
60088
60628
  { definition: orgRevokeGitCredentialsTool, handle: handleOrgRevokeGitCredentials },
60089
60629
  { definition: orgListGitCredentialsTool, handle: handleOrgListGitCredentials }
@@ -60212,7 +60752,7 @@ async function handleAppReplaceInstance(args) {
60212
60752
  { confirm }
60213
60753
  );
60214
60754
  }
60215
- var tools10 = [
60755
+ var tools11 = [
60216
60756
  { definition: appRestartInstanceTool, handle: handleAppRestartInstance },
60217
60757
  { definition: appStopInstanceTool, handle: handleAppStopInstance },
60218
60758
  { definition: appStartInstanceTool, handle: handleAppStartInstance },
@@ -60221,15 +60761,9 @@ var tools10 = [
60221
60761
  ];
60222
60762
 
60223
60763
  // apps/mcp-server/src/tools/node-tiers.ts
60224
- function authHeaders2(token) {
60225
- return { "Content-Type": "application/json", Authorization: `Bearer ${token}` };
60226
- }
60227
- function ok(data) {
60228
- return { content: [{ type: "text", text: JSON.stringify({ success: true, data, error: null }) }] };
60229
- }
60230
60764
  async function getJson(url, token) {
60231
60765
  try {
60232
- const res = await fetch(url, { headers: authHeaders2(token) });
60766
+ const res = await fetch(url, { headers: authHeaders(token) });
60233
60767
  if (!res.ok) {
60234
60768
  return null;
60235
60769
  }
@@ -60335,7 +60869,7 @@ async function handleAppSetNodeTier(args) {
60335
60869
  try {
60336
60870
  res = await fetch(`${config2.services.applicationServiceUrl}/applications/${encodeURIComponent(applicationId)}/nodes`, {
60337
60871
  method: "POST",
60338
- headers: authHeaders2(token),
60872
+ headers: authHeaders(token),
60339
60873
  body: JSON.stringify({ environment, nodeTierId, regionId })
60340
60874
  });
60341
60875
  } catch (err) {
@@ -60352,7 +60886,7 @@ async function handleAppSetNodeTier(args) {
60352
60886
  }
60353
60887
  return ok({ applicationId, environment, nodeTierId, regionId, status: "set" });
60354
60888
  }
60355
- var tools11 = [
60889
+ var tools12 = [
60356
60890
  { definition: appListNodeTiersTool, handle: handleAppListNodeTiers },
60357
60891
  { definition: appSetNodeTierTool, handle: handleAppSetNodeTier }
60358
60892
  ];
@@ -60454,7 +60988,7 @@ async function handleOrgGetBilling(args) {
60454
60988
  };
60455
60989
  return { content: [{ type: "text", text: JSON.stringify({ success: true, data, error: null }) }] };
60456
60990
  }
60457
- var tools12 = [
60991
+ var tools13 = [
60458
60992
  { definition: orgListMembersTool, handle: handleOrgListMembers },
60459
60993
  { definition: orgListPlansTool, handle: handleOrgListPlans },
60460
60994
  { definition: orgGetSubscriptionTool, handle: handleOrgGetSubscription },
@@ -60491,7 +61025,7 @@ async function handleOrgRefreshToken(args) {
60491
61025
  content: [{ type: "text", text: JSON.stringify({ success: true, data: result, error: null }) }]
60492
61026
  };
60493
61027
  }
60494
- var tools13 = [
61028
+ var tools14 = [
60495
61029
  { definition: orgRefreshTokenTool, handle: handleOrgRefreshToken }
60496
61030
  ];
60497
61031
 
@@ -60735,13 +61269,137 @@ async function handleAppServiceLogs(args) {
60735
61269
  isError: !res.ok
60736
61270
  };
60737
61271
  }
60738
- var tools14 = [
61272
+ var appSearchLogsTool = {
61273
+ name: "app_search_logs",
61274
+ description: `Search an application's RETAINED logs \u2014 including logs from containers that have since restarted, and from nodes that are stopped. Use this rather than app_service_logs when investigating something that already happened: "what did it say at 3am", "has this error appeared before", "what changed after the deploy". Matches a substring by default, or a regular expression with regex: true. Returns newest first.`,
61275
+ annotations: { readOnlyHint: true, destructiveHint: false },
61276
+ inputSchema: {
61277
+ type: "object",
61278
+ properties: {
61279
+ token: { type: "string", description: "JWT session token from org_verify_otp" },
61280
+ applicationId: { type: "string", description: "The application UUID" },
61281
+ environment: { type: "string", enum: [...ENVIRONMENT_NAMES], description: "Environment to search" },
61282
+ query: { type: "string", description: "Substring to match, or a regular expression when regex is true. Omit to return everything in the window." },
61283
+ regex: { type: "boolean", description: "Treat query as a regular expression" },
61284
+ service: { type: "string", description: "Limit to one compose service" },
61285
+ minutes: { type: "number", description: "How far back to search, in minutes. Defaults to 60." },
61286
+ limit: { type: "number", description: "Maximum lines to return, up to 1000. Defaults to 200." }
61287
+ },
61288
+ required: ["token", "applicationId", "environment"]
61289
+ }
61290
+ };
61291
+ var appRecentErrorsTool = {
61292
+ name: "app_recent_errors",
61293
+ description: "The most recent error lines from an application environment, across every service, from retained logs. Use this first when a user reports something is broken, when a deploy has just gone out, or before claiming an application is healthy. Matches common error markers (error, exception, fatal, traceback, unhandled) case-insensitively.",
61294
+ annotations: { readOnlyHint: true, destructiveHint: false },
61295
+ inputSchema: {
61296
+ type: "object",
61297
+ properties: {
61298
+ token: { type: "string", description: "JWT session token from org_verify_otp" },
61299
+ applicationId: { type: "string", description: "The application UUID" },
61300
+ environment: { type: "string", enum: [...ENVIRONMENT_NAMES], description: "Environment to inspect" },
61301
+ minutes: { type: "number", description: "How far back to look, in minutes. Defaults to 60." }
61302
+ },
61303
+ required: ["token", "applicationId", "environment"]
61304
+ }
61305
+ };
61306
+ var ERROR_PATTERN = "(?i)(error|exception|fatal|traceback|unhandled|panic:)";
61307
+ async function searchRetained(args, overrides = {}) {
61308
+ const token = args["token"];
61309
+ if (!token) {
61310
+ return notAuthenticatedResult();
61311
+ }
61312
+ const applicationId = args["applicationId"];
61313
+ const environment = args["environment"];
61314
+ const app = await resolveApp2(applicationId, token);
61315
+ if (!app) {
61316
+ return appNotFoundResult(applicationId);
61317
+ }
61318
+ const minutes = typeof args["minutes"] === "number" ? args["minutes"] : 60;
61319
+ const to = Date.now();
61320
+ const from = to - Math.max(1, minutes) * 6e4;
61321
+ const params = new URLSearchParams({ from: String(from), to: String(to) });
61322
+ const query = overrides.query ?? (typeof args["query"] === "string" ? args["query"] : "");
61323
+ if (query !== "") {
61324
+ params.set("q", query);
61325
+ }
61326
+ if ((overrides.regex ?? args["regex"]) === true) {
61327
+ params.set("regex", "true");
61328
+ }
61329
+ if (typeof args["service"] === "string" && args["service"] !== "") {
61330
+ params.set("service", args["service"]);
61331
+ }
61332
+ if (typeof args["limit"] === "number") {
61333
+ params.set("limit", String(args["limit"]));
61334
+ }
61335
+ const url = agentUrl2(app.orgId, app.id, environment, `/logs/search?${params.toString()}`);
61336
+ const res = await fetch(url, { headers: authHeaders(token) });
61337
+ const json = await res.json();
61338
+ if (!res.ok) {
61339
+ return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
61340
+ }
61341
+ const hits = json.data?.hits ?? [];
61342
+ if (hits.length === 0) {
61343
+ return {
61344
+ content: [{
61345
+ type: "text",
61346
+ text: `No matching lines in the last ${String(minutes)} minutes. Retained logs only reach back as far as this application's retention window, so an older event may simply be gone.`
61347
+ }]
61348
+ };
61349
+ }
61350
+ const rendered = hits.map((h) => `${new Date(h.ts).toISOString()} [${h.service}] ${h.line}`).join("\n");
61351
+ return {
61352
+ content: [
61353
+ { type: "text", text: JSON.stringify({ matches: hits.length, truncated: json.data?.truncated ?? false }) },
61354
+ { type: "text", text: untrustedBlock(rendered, "retained container logs") }
61355
+ ]
61356
+ };
61357
+ }
61358
+ async function handleAppSearchLogs(args) {
61359
+ return searchRetained(args);
61360
+ }
61361
+ async function handleAppRecentErrors(args) {
61362
+ return searchRetained(args, { query: ERROR_PATTERN, regex: true });
61363
+ }
61364
+ var appHealthTool = {
61365
+ name: "app_health",
61366
+ description: `What the platform's uptime check last saw for each of an application's environments: up, down, asleep or unknown, since when, and the last error. Use before claiming an application is healthy, and when a user says "it is broken" \u2014 an environment reported asleep was stopped deliberately to save money and is not an outage.`,
61367
+ annotations: { readOnlyHint: true, destructiveHint: false },
61368
+ inputSchema: {
61369
+ type: "object",
61370
+ properties: {
61371
+ token: { type: "string", description: "JWT session token from org_verify_otp" },
61372
+ applicationId: { type: "string", description: "The application UUID" }
61373
+ },
61374
+ required: ["token", "applicationId"]
61375
+ }
61376
+ };
61377
+ async function handleAppHealth(args) {
61378
+ const token = args["token"];
61379
+ if (!token) {
61380
+ return notAuthenticatedResult();
61381
+ }
61382
+ const applicationId = args["applicationId"];
61383
+ const res = await fetch(
61384
+ `${config2.services.applicationServiceUrl}/applications/${encodeURIComponent(applicationId)}/health`,
61385
+ { headers: authHeaders(token) }
61386
+ );
61387
+ const json = await res.json();
61388
+ if (!res.ok) {
61389
+ return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
61390
+ }
61391
+ return { content: [{ type: "text", text: JSON.stringify(json.data, null, 2) }] };
61392
+ }
61393
+ var tools15 = [
60739
61394
  { definition: appServicesListTool, handle: handleAppServicesList },
60740
61395
  { definition: appServiceStartTool, handle: handleAppServiceStart },
60741
61396
  { definition: appServiceStopTool, handle: handleAppServiceStop },
60742
61397
  { definition: appServiceRestartTool, handle: handleAppServiceRestart },
60743
61398
  { definition: appServiceLogsTool, handle: handleAppServiceLogs },
60744
- { definition: appServiceTailLogsTool, handle: handleAppServiceTailLogs }
61399
+ { definition: appServiceTailLogsTool, handle: handleAppServiceTailLogs },
61400
+ { definition: appSearchLogsTool, handle: handleAppSearchLogs },
61401
+ { definition: appRecentErrorsTool, handle: handleAppRecentErrors },
61402
+ { definition: appHealthTool, handle: handleAppHealth }
60745
61403
  ];
60746
61404
 
60747
61405
  // apps/mcp-server/src/tools/templates.ts
@@ -60801,15 +61459,15 @@ async function handleOrgApplyTemplate(args) {
60801
61459
  if (!appId || !templateId) {
60802
61460
  return fail({ status: 400, message: "appId and templateId are required." });
60803
61461
  }
60804
- const ok3 = await appClient2(token).applyTemplate(appId, templateId);
60805
- if (!ok3) {
61462
+ const ok2 = await appClient2(token).applyTemplate(appId, templateId);
61463
+ if (!ok2) {
60806
61464
  return fail({ code: "TEMPLATE_APPLY_FAILED", message: "Failed to apply template.", hint: "Check that the application ID and template ID are correct." });
60807
61465
  }
60808
61466
  return {
60809
61467
  content: [{ type: "text", text: JSON.stringify({ success: true, data: null, error: null }) }]
60810
61468
  };
60811
61469
  }
60812
- var tools15 = [
61470
+ var tools16 = [
60813
61471
  { definition: orgListTemplatesTool, handle: handleOrgListTemplates },
60814
61472
  { definition: orgApplyTemplateTool, handle: handleOrgApplyTemplate }
60815
61473
  ];
@@ -60818,9 +61476,6 @@ var tools15 = [
60818
61476
  function appClient3(token) {
60819
61477
  return new ApplicationClient(config2.services.applicationServiceUrl, token);
60820
61478
  }
60821
- function ok2(data) {
60822
- return { content: [{ type: "text", text: JSON.stringify({ success: true, data, error: null }) }] };
60823
- }
60824
61479
  var appSetUpstreamTool = {
60825
61480
  name: "app_set_upstream",
60826
61481
  description: "Point an application at a git repository you host yourself, using a remote repository connection you have already created. Create that connection first with org_add_git_connection, and find its id with org_list_git_connections \u2014 the credential lives on the connection, so this call takes only the repository path within its host and the branch. WARNING: this is destructive to the platform-hosted repository. On the next deploy the platform force-fetches your repository over its mirror, so any commit that exists only in the platform-hosted repository is lost. Afterwards pushes to it are refused and templates can no longer be applied \u2014 push to your own repository instead. Returns the list of branches found in the repository.",
@@ -60870,7 +61525,7 @@ async function handleAppSetUpstream(args) {
60870
61525
  }
60871
61526
  try {
60872
61527
  const result = await appClient3(token).setUpstream(applicationId, { connectionId, path, branch });
60873
- return ok2(result);
61528
+ return ok(result);
60874
61529
  } catch (err) {
60875
61530
  if (err instanceof UpstreamRequestError) {
60876
61531
  return fail(upstreamFailureDetail(err));
@@ -60956,7 +61611,7 @@ async function handleOrgAddGitConnection(args) {
60956
61611
  ...args["username"] !== void 0 ? { username: args["username"] } : {},
60957
61612
  ...args["accessToken"] !== void 0 ? { token: args["accessToken"] } : {}
60958
61613
  });
60959
- return ok2(connection);
61614
+ return ok(connection);
60960
61615
  } catch (err) {
60961
61616
  if (err instanceof UpstreamRequestError) {
60962
61617
  return fail(upstreamFailureDetail(err));
@@ -60990,7 +61645,7 @@ async function handleAppClearUpstream(args) {
60990
61645
  if (!okResult) {
60991
61646
  return fail({ code: "NOT_FOUND", message: "Could not clear the upstream for that application.", hint: "Check the applicationId with app_list." });
60992
61647
  }
60993
- return ok2(null);
61648
+ return ok(null);
60994
61649
  }
60995
61650
  var orgListGitConnectionsTool = {
60996
61651
  name: "org_list_git_connections",
@@ -61015,9 +61670,9 @@ async function handleOrgListGitConnections(args) {
61015
61670
  return fail({ code: "INVALID_INPUT", message: "orgId is required", hint: "Use the orgId from org_verify_otp." });
61016
61671
  }
61017
61672
  const connections = await appClient3(token).listGitConnections(orgId);
61018
- return ok2(connections);
61673
+ return ok(connections);
61019
61674
  }
61020
- var tools16 = [
61675
+ var tools17 = [
61021
61676
  { definition: appSetUpstreamTool, handle: handleAppSetUpstream },
61022
61677
  { definition: appClearUpstreamTool, handle: handleAppClearUpstream },
61023
61678
  { definition: orgListGitConnectionsTool, handle: handleOrgListGitConnections },
@@ -61218,7 +61873,7 @@ async function handleValidationDeletePrompt(args) {
61218
61873
  }
61219
61874
  return { content: [{ type: "text", text: `Deleted prompt ${id}` }] };
61220
61875
  }
61221
- var tools17 = [
61876
+ var tools18 = [
61222
61877
  { definition: appGetPrevalidationPromptsTool, handle: handleAppGetPrevalidationPrompts },
61223
61878
  { definition: validationGetGenericPromptsTool, handle: handleValidationGetGenericPrompts },
61224
61879
  { definition: validationListPromptsTool, handle: handleValidationListPrompts },
@@ -61230,22 +61885,23 @@ var tools17 = [
61230
61885
  // apps/mcp-server/src/tools/index.ts
61231
61886
  var allTools = [
61232
61887
  ...tools4,
61233
- ...tools13,
61888
+ ...tools14,
61234
61889
  ...tools,
61235
61890
  ...tools3,
61891
+ ...tools13,
61892
+ ...tools10,
61893
+ ...tools17,
61894
+ ...tools2,
61236
61895
  ...tools12,
61237
- ...tools9,
61238
61896
  ...tools16,
61239
- ...tools2,
61240
- ...tools11,
61241
- ...tools15,
61242
- ...tools7,
61243
- ...tools17,
61244
- ...tools5,
61245
- ...tools14,
61246
- ...tools10,
61247
61897
  ...tools8,
61248
- ...tools6
61898
+ ...tools18,
61899
+ ...tools5,
61900
+ ...tools6,
61901
+ ...tools15,
61902
+ ...tools11,
61903
+ ...tools9,
61904
+ ...tools7
61249
61905
  ];
61250
61906
 
61251
61907
  // apps/mcp-server/src/index.ts