@mcp-abap-adt/core 19.1.0 → 19.2.0

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 (107) hide show
  1. package/README.md +13 -1
  2. package/bin/mcp-abap-adt.js +7 -2
  3. package/dist/auth/index.d.ts +5 -12
  4. package/dist/auth/index.d.ts.map +1 -1
  5. package/dist/auth/index.js +20 -34
  6. package/dist/auth/index.js.map +1 -1
  7. package/dist/coreVersion.d.ts +2 -12
  8. package/dist/coreVersion.d.ts.map +1 -1
  9. package/dist/coreVersion.js +5 -2
  10. package/dist/coreVersion.js.map +1 -1
  11. package/dist/index.d.ts +14 -6
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +33 -17
  14. package/dist/index.js.map +1 -1
  15. package/dist/launcher.d.ts +18 -134
  16. package/dist/launcher.d.ts.map +1 -1
  17. package/dist/launcher.js +32 -689
  18. package/dist/launcher.js.map +1 -1
  19. package/package.json +5 -15
  20. package/dist/StdioServer.d.ts +0 -87
  21. package/dist/StdioServer.d.ts.map +0 -1
  22. package/dist/StdioServer.js +0 -132
  23. package/dist/StdioServer.js.map +0 -1
  24. package/dist/auth/IAuthBrokerFactory.d.ts +0 -62
  25. package/dist/auth/IAuthBrokerFactory.d.ts.map +0 -1
  26. package/dist/auth/IAuthBrokerFactory.js +0 -8
  27. package/dist/auth/IAuthBrokerFactory.js.map +0 -1
  28. package/dist/auth/IAuthBrokerFactoryConfig.d.ts +0 -90
  29. package/dist/auth/IAuthBrokerFactoryConfig.d.ts.map +0 -1
  30. package/dist/auth/IAuthBrokerFactoryConfig.js +0 -8
  31. package/dist/auth/IAuthBrokerFactoryConfig.js.map +0 -1
  32. package/dist/auth/brokerFactory.d.ts +0 -93
  33. package/dist/auth/brokerFactory.d.ts.map +0 -1
  34. package/dist/auth/brokerFactory.js +0 -341
  35. package/dist/auth/brokerFactory.js.map +0 -1
  36. package/dist/auth/browser.d.ts +0 -60
  37. package/dist/auth/browser.d.ts.map +0 -1
  38. package/dist/auth/browser.js +0 -116
  39. package/dist/auth/browser.js.map +0 -1
  40. package/dist/auth/countedProvider.d.ts +0 -43
  41. package/dist/auth/countedProvider.d.ts.map +0 -1
  42. package/dist/auth/countedProvider.js +0 -105
  43. package/dist/auth/countedProvider.js.map +0 -1
  44. package/dist/auth/destinationFailure.d.ts +0 -69
  45. package/dist/auth/destinationFailure.d.ts.map +0 -1
  46. package/dist/auth/destinationFailure.js +0 -183
  47. package/dist/auth/destinationFailure.js.map +0 -1
  48. package/dist/auth/destinationStores.d.ts +0 -55
  49. package/dist/auth/destinationStores.d.ts.map +0 -1
  50. package/dist/auth/destinationStores.js +0 -158
  51. package/dist/auth/destinationStores.js.map +0 -1
  52. package/dist/auth/handlers/basic.d.ts +0 -3
  53. package/dist/auth/handlers/basic.d.ts.map +0 -1
  54. package/dist/auth/handlers/basic.js +0 -8
  55. package/dist/auth/handlers/basic.js.map +0 -1
  56. package/dist/auth/handlers/index.d.ts +0 -15
  57. package/dist/auth/handlers/index.d.ts.map +0 -1
  58. package/dist/auth/handlers/index.js +0 -32
  59. package/dist/auth/handlers/index.js.map +0 -1
  60. package/dist/auth/handlers/jwtAuthorizationCode.d.ts +0 -8
  61. package/dist/auth/handlers/jwtAuthorizationCode.d.ts.map +0 -1
  62. package/dist/auth/handlers/jwtAuthorizationCode.js +0 -32
  63. package/dist/auth/handlers/jwtAuthorizationCode.js.map +0 -1
  64. package/dist/auth/handlers/snc.d.ts +0 -3
  65. package/dist/auth/handlers/snc.d.ts.map +0 -1
  66. package/dist/auth/handlers/snc.js +0 -14
  67. package/dist/auth/handlers/snc.js.map +0 -1
  68. package/dist/auth/handlers/types.d.ts +0 -30
  69. package/dist/auth/handlers/types.d.ts.map +0 -1
  70. package/dist/auth/handlers/types.js +0 -3
  71. package/dist/auth/handlers/types.js.map +0 -1
  72. package/dist/auth/serverLogin.d.ts +0 -75
  73. package/dist/auth/serverLogin.d.ts.map +0 -1
  74. package/dist/auth/serverLogin.js +0 -138
  75. package/dist/auth/serverLogin.js.map +0 -1
  76. package/dist/auth/serverSentences.d.ts +0 -39
  77. package/dist/auth/serverSentences.d.ts.map +0 -1
  78. package/dist/auth/serverSentences.js +0 -49
  79. package/dist/auth/serverSentences.js.map +0 -1
  80. package/dist/auth/vocabulary.d.ts +0 -28
  81. package/dist/auth/vocabulary.d.ts.map +0 -1
  82. package/dist/auth/vocabulary.js +0 -67
  83. package/dist/auth/vocabulary.js.map +0 -1
  84. package/dist/config/coreParameters.d.ts +0 -125
  85. package/dist/config/coreParameters.d.ts.map +0 -1
  86. package/dist/config/coreParameters.js +0 -331
  87. package/dist/config/coreParameters.js.map +0 -1
  88. package/dist/config/envFileContext.d.ts +0 -26
  89. package/dist/config/envFileContext.d.ts.map +0 -1
  90. package/dist/config/envFileContext.js +0 -90
  91. package/dist/config/envFileContext.js.map +0 -1
  92. package/dist/config/envResolver.d.ts +0 -6
  93. package/dist/config/envResolver.d.ts.map +0 -1
  94. package/dist/config/envResolver.js +0 -81
  95. package/dist/config/envResolver.js.map +0 -1
  96. package/dist/config/platformPaths.d.ts +0 -28
  97. package/dist/config/platformPaths.d.ts.map +0 -1
  98. package/dist/config/platformPaths.js +0 -152
  99. package/dist/config/platformPaths.js.map +0 -1
  100. package/dist/destinationSource.d.ts +0 -26
  101. package/dist/destinationSource.d.ts.map +0 -1
  102. package/dist/destinationSource.js +0 -43
  103. package/dist/destinationSource.js.map +0 -1
  104. package/dist/shutdown.d.ts +0 -97
  105. package/dist/shutdown.d.ts.map +0 -1
  106. package/dist/shutdown.js +0 -136
  107. package/dist/shutdown.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"launcher.js","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":";;;AA4PA,4BAYC;AAyBD,oBA+BC;AA2FD,0DAWC;AASD,wDAeC;AAmBD,kDAWC;AAQD,8CAuCC;AAwBD,wDAEC;AAKD,oEAEC;AAMD,0FAIC;AAMD,kEAEC;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S,CAAC,CAAC,CAAC;AACjD,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,MAAe;IAChD,OAAO,0BAA0B,IAAI,CAAC,SAAS,CAAC,IAAA,uBAAS,EAAC,IAAA,sBAAQ,EAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AACrG,CAAC;AAED,0EAA0E;AAC1E,2EAA2E"}
1
+ {"version":3,"file":"launcher.js","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkCA,oBAKC;AAED,wBAMC;AA/CD;;;;;;;;;;;GAWG;AACH,8DAM4C;AAC5C,qDAAgD;AAEhD,qEAAmD;AASnD,SAAS,WAAW,CAAC,OAAwB;IAC3C,OAAO,EAAE,GAAG,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,6BAAY,EAAE,CAAC;AAC1E,CAAC;AAEM,KAAK,UAAU,IAAI,CACxB,OAAwB,EACxB,KAA0B;IAE1B,OAAO,IAAA,YAAW,EAAC,WAAW,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC;AAEM,KAAK,UAAU,MAAM,CAC1B,MAA2C,EAC3C,OAAwB,EACxB,IAAkB;IAElB,OAAO,IAAA,cAAa,EAAC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;AAC3D,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/core",
3
3
  "mcpName": "io.github.fr0ster/mcp-abap-adt",
4
- "version": "19.1.0",
4
+ "version": "19.2.0",
5
5
  "description": "Standalone MCP server for SAP ABAP ADT over stdio: one destination through the auth broker (service keys, sessions, the browser login); connects to the system over HTTP, RFC or SNC (passwordless). RFC and SNC need the SAP NW RFC SDK at install time. Streamable HTTP is @mcp-abap-adt/http, SSE @mcp-abap-adt/sse; the compact variant is @mcp-abap-adt/compact.",
6
6
  "license": "AGPL-3.0-only",
7
7
  "publishConfig": {
@@ -77,20 +77,10 @@
77
77
  "prepublishOnly": "npm run build"
78
78
  },
79
79
  "dependencies": {
80
- "@mcp-abap-adt/auth-broker": "^5.0.6",
81
- "@mcp-abap-adt/auth-errors": "^2.2.1",
82
- "@mcp-abap-adt/auth-providers": "^6.0.2",
83
- "@mcp-abap-adt/auth-stores": "^5.0.1",
84
- "@mcp-abap-adt/connection": "^18.0.1",
85
- "@mcp-abap-adt/interfaces-auth": "^7.5.0",
86
- "@mcp-abap-adt/interfaces-auth-broker": "^1.3.0",
87
- "@mcp-abap-adt/interfaces-utils": "^1.1.1",
88
- "@mcp-abap-adt/background-runs-memory": "^19.1.0",
89
- "@mcp-abap-adt/lib": "^19.1.0",
90
- "@mcp-abap-adt/logger": "^0.4.1",
91
- "@mcp-abap-adt/responsible-rules": "^19.1.0",
92
- "@modelcontextprotocol/sdk": "^1.32.0",
93
- "dotenv": "^18.0.5"
80
+ "@mcp-abap-adt/background-runs-memory": "^19.2.0",
81
+ "@mcp-abap-adt/lib": "^19.2.0",
82
+ "@mcp-abap-adt/responsible-rules": "^19.2.0",
83
+ "@mcp-abap-adt/server-runtime": "^19.2.0"
94
84
  },
95
85
  "devDependencies": {
96
86
  "@types/jest": "*",
@@ -1,87 +0,0 @@
1
- import type { AbapConnection } from '@mcp-abap-adt/connection';
2
- import type { IAuthProviderError } from '@mcp-abap-adt/interfaces-auth';
3
- import { type ReadFailure } from '@mcp-abap-adt/lib/auth';
4
- import { BaseMcpServer, type IBackgroundRuns, type InstanceBatch, type LeftoverSessions, type ResolvedConnection, type StartedConnection } from '@mcp-abap-adt/lib/embeddable';
5
- import type { IHandlersRegistry } from '@mcp-abap-adt/lib/handlers';
6
- import { type StateLogger } from '@mcp-abap-adt/lib/state';
7
- import type { Logger } from '@mcp-abap-adt/logger';
8
- import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
9
- import type { IDestinations } from './auth/IAuthBrokerFactory.js';
10
- export interface StdioServerOptions {
11
- name?: string;
12
- version?: string;
13
- logger?: Logger;
14
- /** The idle bound on held state, in minutes (at least 30, default 30). */
15
- stateIdleMinutes?: number;
16
- /** Where the state's lifecycle lines go; default stderr, always on. */
17
- stateLogger?: StateLogger;
18
- /** The server's own sentence beside a chain failure: the factory's `sentenceFor`. */
19
- sentenceFor?: (error: IAuthProviderError) => string | undefined;
20
- /**
21
- * The owner of the process's runtime session files (the launcher's): the
22
- * SAP sessions this server holds, kept until their logoff completed (written and answered), and
23
- * the leftover-session tools. Absent: none kept, the tools not available.
24
- */
25
- leftoverSessions?: LeftoverSessions;
26
- /**
27
- * Where background runs and their answers are kept (the launcher's
28
- * `InMemoryBackgroundRuns` of
29
- * `@mcp-abap-adt/background-runs-memory`). Absent: `background: true` is refused.
30
- */
31
- backgroundRuns?: IBackgroundRuns;
32
- /**
33
- * The owner of this instance's batch state (the launcher's, one for the
34
- * process's one instance). Absent: the batch tools answer
35
- * `batch_mode_unavailable`.
36
- */
37
- batch?: InstanceBatch;
38
- }
39
- /**
40
- * The stdio server: one instance, one destination. Its source is the
41
- * destination (`destinationSource`), set once at startup; the settings and
42
- * the provider come from `IDestinations` — the factory — per request. The
43
- * launcher has its connection born before the transport opens
44
- * (`connectAtStart`): the destination's one leftover session taken up, or a
45
- * logon, and the system information with it.
46
- * Without destinations the server is in inspection-only mode: the tools are
47
- * listed, and a tool call answers the server's own `inspection_only` refusal
48
- * before any connection is built.
49
- */
50
- export declare class StdioServer extends BaseMcpServer {
51
- private readonly handlersRegistry;
52
- private readonly destinations;
53
- private readonly sentenceFor;
54
- /** The destination served, named by a refusal whose error does not carry it. */
55
- private destination;
56
- constructor(handlersRegistry: IHandlersRegistry, destinations: IDestinations | undefined, opts?: StdioServerOptions);
57
- /** The destination layer's failures first, then lib's reader. */
58
- protected readFailure(thrown: unknown): ReadFailure | undefined;
59
- /**
60
- * The connection to `destination` born before the transport opens: the
61
- * destination's one leftover session taken up, or a logon (an interactive
62
- * login included: its prompts go to stderr), and the system information
63
- * (BaseMcpServer's `bornAtStart`). Rejects with what failed; the
64
- * launcher ends the process with it. The start's own signal, aborted once
65
- * the birth ended, as the startup check's.
66
- */
67
- connectAtStart(destination: string): Promise<StartedConnection>;
68
- /**
69
- * Serves `destination` (none: inspection-only mode) over `transport` —
70
- * stdio unless a host passes its own. Its connection is the one
71
- * `connectAtStart` made, when the launcher called it; otherwise the first
72
- * tool call makes it.
73
- */
74
- start(destination: string | undefined, transport?: Transport): Promise<void>;
75
- /** The destination's source, set once. */
76
- private serve;
77
- /**
78
- * Inspection-only mode refuses here, before any connection is built. A
79
- * login ends with its result, the server (the bound, the shutdown) or the
80
- * session — never by another call's cancel, since a tool call cannot be
81
- * cancelled — so nothing is retried.
82
- */
83
- protected getConnection(signal: AbortSignal): Promise<AbapConnection>;
84
- /** Inspection-only mode refuses the leftover-session tools too, before anything is read. */
85
- protected resolveCaller(signal: AbortSignal): Promise<ResolvedConnection>;
86
- }
87
- //# sourceMappingURL=StdioServer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StdioServer.d.ts","sourceRoot":"","sources":["../src/StdioServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,wBAAwB,CAAC;AACzE,OAAO,EACL,aAAa,EACb,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OA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1C,OAAO,CAAC,KAAK;IAkBb;;;;;OAKG;cACsB,aAAa,CACpC,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,cAAc,CAAC;IAK1B,4FAA4F;cACzE,aAAa,CAC9B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,kBAAkB,CAAC;CAI/B"}
@@ -1,132 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StdioServer = void 0;
4
- const auth_1 = require("@mcp-abap-adt/lib/auth");
5
- const embeddable_1 = require("@mcp-abap-adt/lib/embeddable");
6
- const logger_1 = require("@mcp-abap-adt/lib/logger");
7
- const request_context_1 = require("@mcp-abap-adt/lib/request-context");
8
- const state_1 = require("@mcp-abap-adt/lib/state");
9
- const responsible_rules_1 = require("@mcp-abap-adt/responsible-rules");
10
- const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
11
- const destinationFailure_1 = require("./auth/destinationFailure");
12
- const coreVersion_js_1 = require("./coreVersion.js");
13
- const destinationSource_js_1 = require("./destinationSource.js");
14
- /**
15
- * The stdio server: one instance, one destination. Its source is the
16
- * destination (`destinationSource`), set once at startup; the settings and
17
- * the provider come from `IDestinations` — the factory — per request. The
18
- * launcher has its connection born before the transport opens
19
- * (`connectAtStart`): the destination's one leftover session taken up, or a
20
- * logon, and the system information with it.
21
- * Without destinations the server is in inspection-only mode: the tools are
22
- * listed, and a tool call answers the server's own `inspection_only` refusal
23
- * before any connection is built.
24
- */
25
- class StdioServer extends embeddable_1.BaseMcpServer {
26
- handlersRegistry;
27
- destinations;
28
- sentenceFor;
29
- /** The destination served, named by a refusal whose error does not carry it. */
30
- destination;
31
- constructor(handlersRegistry, destinations, opts) {
32
- super({
33
- name: opts?.name ?? 'mcp-abap-adt',
34
- version: opts?.version ?? coreVersion_js_1.CORE_VERSION,
35
- logger: opts?.logger ?? logger_1.noopLogger,
36
- stateIdleMinutes: opts?.stateIdleMinutes,
37
- // From the options as given: the silent default above is never the state's.
38
- stateLogger: (0, state_1.stateLoggerOf)(opts ?? {}),
39
- ...(opts?.leftoverSessions !== undefined && {
40
- leftoverSessions: opts.leftoverSessions,
41
- }),
42
- ...(opts?.backgroundRuns !== undefined && {
43
- backgroundRuns: opts.backgroundRuns,
44
- }),
45
- ...(opts?.batch !== undefined && { batch: opts.batch }),
46
- // The responsible rules, once, at the start (`connectAtStart`).
47
- systemContextResolver: request_context_1.defaultSystemContextResolver,
48
- systemContextRules: responsible_rules_1.responsibleRules,
49
- });
50
- this.handlersRegistry = handlersRegistry;
51
- this.destinations = destinations;
52
- this.sentenceFor = opts?.sentenceFor;
53
- }
54
- /** The destination layer's failures first, then lib's reader. */
55
- readFailure(thrown) {
56
- return (0, destinationFailure_1.destinationFailureOf)(thrown, {
57
- sentenceFor: this.sentenceFor,
58
- ...(this.destination !== undefined && { destination: this.destination }),
59
- });
60
- }
61
- /**
62
- * The connection to `destination` born before the transport opens: the
63
- * destination's one leftover session taken up, or a logon (an interactive
64
- * login included: its prompts go to stderr), and the system information
65
- * (BaseMcpServer's `bornAtStart`). Rejects with what failed; the
66
- * launcher ends the process with it. The start's own signal, aborted once
67
- * the birth ended, as the startup check's.
68
- */
69
- async connectAtStart(destination) {
70
- if (!this.destinations)
71
- throw new auth_1.ServerRefusal('inspection_only');
72
- this.serve(destination);
73
- const startup = new AbortController();
74
- try {
75
- return await this.bornAtStart(startup.signal);
76
- }
77
- finally {
78
- startup.abort();
79
- }
80
- }
81
- /**
82
- * Serves `destination` (none: inspection-only mode) over `transport` —
83
- * stdio unless a host passes its own. Its connection is the one
84
- * `connectAtStart` made, when the launcher called it; otherwise the first
85
- * tool call makes it.
86
- */
87
- async start(destination, transport = new stdio_js_1.StdioServerTransport()) {
88
- if (destination !== undefined && this.destinations) {
89
- this.serve(destination);
90
- }
91
- this.registerHandlers(this.handlersRegistry);
92
- await this.connect(transport);
93
- }
94
- /** The destination's source, set once. */
95
- serve(destination) {
96
- if (this.destination !== undefined || !this.destinations)
97
- return;
98
- this.destination = destination;
99
- this.setConnectionContext({
100
- kind: 'built',
101
- // The user is fixed for the process: getProvider answers the same
102
- // provider while the session is renewed (refresh, or a new login when
103
- // the refresh fails) and written back, so the connection is replaced
104
- // only when SAP lost its session.
105
- source: (0, destinationSource_js_1.destinationSource)(destination, this.destinations),
106
- sessionId: destination,
107
- // Who calls, for the leftover sessions: on stdio the destination —
108
- // its user and credential are fixed for the process.
109
- destination,
110
- metadata: { destination },
111
- });
112
- }
113
- /**
114
- * Inspection-only mode refuses here, before any connection is built. A
115
- * login ends with its result, the server (the bound, the shutdown) or the
116
- * session — never by another call's cancel, since a tool call cannot be
117
- * cancelled — so nothing is retried.
118
- */
119
- async getConnection(signal) {
120
- if (!this.destinations)
121
- throw new auth_1.ServerRefusal('inspection_only');
122
- return super.getConnection(signal);
123
- }
124
- /** Inspection-only mode refuses the leftover-session tools too, before anything is read. */
125
- resolveCaller(signal) {
126
- if (!this.destinations)
127
- throw new auth_1.ServerRefusal('inspection_only');
128
- return super.resolveCaller(signal);
129
- }
130
- }
131
- exports.StdioServer = StdioServer;
132
- //# sourceMappingURL=StdioServer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StdioServer.js","sourceRoot":"","sources":["../src/StdioServer.ts"],"names":[],"mappings":";;;AAEA,iDAAyE;AACzE,6DAOsC;AAEtC,qDAAsD;AACtD,uEAAiF;AACjF,mDAA0E;AAE1E,uEAAmE;AACnE,wEAAiF;AAEjF,kEAAiE;AAEjE,qDAAgD;AAChD,iEAA2D;AAgC3D;;;;;;;;;;GAUG;AACH,MAAa,WAAY,SAAQ,0BAAa;IAQzB;IACA;IARF,WAAW,CAEd;IACd,gFAAgF;IACxE,WAAW,CAAqB;IAExC,YACmB,gBAAmC,EACnC,YAAuC,EACxD,IAAyB;QAEzB,KAAK,CAAC;YACJ,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,cAAc;YAClC,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,6BAAY;YACtC,MAAM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AAI,CAAC,YAAY;YAAE,MAAM,IAAI,oBAAa,CAAC,iBAAiB,CAAC,CAAC;QACnE,OAAO,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACF;AApHD,kCAoHC"}
@@ -1,62 +0,0 @@
1
- /**
2
- * What core's stdio server needs from the destinations, and the factory's
3
- * whole surface. `DestinationSystemContext` stays lib's: the sources fill it,
4
- * and lib's server reads it for each call's scope.
5
- */
6
- import type { AuthBroker } from '@mcp-abap-adt/auth-broker';
7
- import type { SapConfig } from '@mcp-abap-adt/connection';
8
- import type { IAuthProvider } from '@mcp-abap-adt/interfaces-auth';
9
- import type { DestinationSystemContext } from '@mcp-abap-adt/lib/auth';
10
- export interface IDestinations {
11
- /** The connector's settings: URL, client, auth type, connection type — no secret. */
12
- settingsFor(destination: string): Promise<SapConfig>;
13
- /**
14
- * The destination's provider, counted while it works. Asked per request,
15
- * with the request's `signal`: the broker answers its cached provider while
16
- * the destination is unchanged, and the signal releases this caller alone.
17
- */
18
- getProvider(destination: string, options?: {
19
- readonly signal?: AbortSignal | undefined;
20
- }): Promise<IAuthProvider>;
21
- /**
22
- * The responsible and master system the destination's own `.env` states
23
- * (the `--env` file, or `sessions/<destination>.env`). Optional: a server
24
- * whose destinations do not answer it falls back to the process
25
- * configuration.
26
- */
27
- systemContextFor?(destination: string): Promise<DestinationSystemContext>;
28
- }
29
- /** What `settle` found. */
30
- export interface SettleReport {
31
- /**
32
- * `"<destination>": <reason>` for each session secret not stored, the
33
- * reason auth-errors' `classify(entry, 'persisting-tokens')`.
34
- */
35
- notStored: string[];
36
- }
37
- export interface IAuthBrokerFactory extends IDestinations {
38
- /** The destination the process serves when a request names none. */
39
- readonly defaultDestination: string | undefined;
40
- /**
41
- * One broker per destination, built on first use, then cached.
42
- * A consumer that connects must use `getProvider` instead: the broker's own
43
- * `getProvider` is not counted and bypasses the shutdown gate.
44
- */
45
- getBroker(destination: string): Promise<AuthBroker>;
46
- /**
47
- * The shutdown began (in the latch's tick): no interactive login starts
48
- * from here on, and an `aborted` login is answered with the shutdown
49
- * sentence. The gate stays open: a tool still running is authorized with
50
- * the credential held, a refresh included.
51
- */
52
- beginShutdown(): void;
53
- /**
54
- * Closes the gate on provider calls, disposes the login strategies it
55
- * composed, waits for the calls in progress — no deadline — then
56
- * `flush({ signal })`es every broker built.
57
- */
58
- settle(options?: {
59
- readonly signal?: AbortSignal | undefined;
60
- }): Promise<SettleReport>;
61
- }
62
- //# sourceMappingURL=IAuthBrokerFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAuthBrokerFactory.d.ts","sourceRoot":"","sources":["../../src/auth/IAuthBrokerFactory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC5B,qFAAqF;IACrF,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACrD;;;;OAIG;IACH,WAAW,CACT,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;KAAE,GACtD,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1B;;;;;OAKG;IACH,gBAAgB,CAAC,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC3E;AAED,2BAA2B;AAC3B,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,oEAAoE;IACpE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD;;;;OAIG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACpD;;;;;OAKG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE;QACf,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;KAC3C,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC3B"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * What core's stdio server needs from the destinations, and the factory's
4
- * whole surface. `DestinationSystemContext` stays lib's: the sources fill it,
5
- * and lib's server reads it for each call's scope.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- //# sourceMappingURL=IAuthBrokerFactory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAuthBrokerFactory.js","sourceRoot":"","sources":["../../src/auth/IAuthBrokerFactory.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,90 +0,0 @@
1
- /**
2
- * Configuration of `AuthBrokerFactory`: where destinations live and what an
3
- * interactive login needs. The launcher builds it from the parameters; the
4
- * factory adds no default collaborator.
5
- */
6
- import type { IAuthorizationStrategy, IBrowser } from '@mcp-abap-adt/interfaces-auth';
7
- import type { ILogger } from '@mcp-abap-adt/interfaces-utils';
8
- import type { RenewalMode } from './serverSentences.js';
9
- /** What the login strategy is built from: auth-providers' `CallbackStrategyOptions`. */
10
- export interface LoginStrategyOptions {
11
- /** The browser that opens the URL; absent: the URL is shown on stderr. */
12
- browser?: IBrowser;
13
- /** The callback port; absent: the strategy's own (61001). */
14
- port?: number;
15
- }
16
- export interface IAuthBrokerFactoryConfig {
17
- /**
18
- * The `.env` file served as the destination `default`, and the parameter it
19
- * came from as the user gave it (`--env`, `--env-path`, `MCP_ENV_PATH`, the
20
- * YAML key): the source names the refusal of a
21
- * file that does not exist. No default: whoever sets the path knows where it
22
- * came from.
23
- */
24
- envFile?: {
25
- path: string;
26
- source: string;
27
- };
28
- /** `--mcp=X`: the destination served when a request names none. */
29
- mcpDestination?: string;
30
- /** Base of `service-keys/` and `sessions/` (`--auth-broker-path`). */
31
- authBrokerPath?: string;
32
- /** Whether a named destination's secret is written to `sessions/`. */
33
- unsafe: boolean;
34
- /**
35
- * The browser of an interactive login (`--browser`, `--browser-program`,
36
- * mapped by `browserFor`); absent: none — the URL on stderr.
37
- */
38
- browser?: IBrowser;
39
- /**
40
- * `--browser` names a browser this platform has none of (`browserFor`'s
41
- * `unavailable` words): a `jwt` / `authorization_code` destination is
42
- * refused for it at the startup check; the others never log in.
43
- */
44
- browserUnavailable?: string;
45
- /** The callback port of an interactive login; the strategy's default when absent. */
46
- browserAuthPort?: number;
47
- /** How the connector reaches the system (`--connection-type`). */
48
- connectionType?: 'http' | 'rfc';
49
- /**
50
- * RFC through a message server and a logon group (`--mshost`, `--msserv`,
51
- * `--sysid`, `--group`, `--saprouter` and their `SAP_*` / YAML forms):
52
- * each reaches the destination's `SapConfig` as configured; an absent one
53
- * has no key. No default and no check here — connection's.
54
- */
55
- mshost?: string;
56
- msserv?: string;
57
- sysid?: string;
58
- group?: string;
59
- saprouter?: string;
60
- /** `--renewal`; absent: `refresh-then-login`. */
61
- renewal?: RenewalMode;
62
- /**
63
- * `--login-timeout` in milliseconds: each browser login is ended
64
- * `aborted` once it has run this long. Absent: no bound — a login ends on
65
- * its result, the user's refusal or its request's end.
66
- */
67
- loginTimeoutMs?: number;
68
- /**
69
- * How the bound was set, as the login-bound sentence names it — the launcher's form
70
- * as the user gave it (`` `--login-timeout=300` ``). Absent: the option
71
- * itself, `` `loginTimeoutMs: <ms>` ``.
72
- */
73
- loginTimeoutStated?: string;
74
- /**
75
- * `--auth-debug`: the brokers are built with `authDebug: true`, so a
76
- * refused token request's debug line names its secrets' first and last four
77
- * characters. Absent: off. The caller routes `logger` to stderr with it.
78
- */
79
- authDebug?: boolean;
80
- /**
81
- * Builds the login strategy of the `authorization_code` handler. The
82
- * launcher passes auth-providers' `browserCallbackStrategy`; there is no
83
- * default here. The factory wraps it in `serverLogin`.
84
- */
85
- browserStrategy: (options: LoginStrategyOptions) => IAuthorizationStrategy<string>;
86
- /** The logger a login prompts through (`promptLogger`: `info` on stderr). */
87
- promptLogger: ILogger;
88
- logger?: ILogger;
89
- }
90
- //# sourceMappingURL=IAuthBrokerFactoryConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAuthBrokerFactoryConfig.d.ts","sourceRoot":"","sources":["../../src/auth/IAuthBrokerFactoryConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,QAAQ,EACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,wFAAwF;AACxF,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qFAAqF;IACrF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAChC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,eAAe,EAAE,CACf,OAAO,EAAE,oBAAoB,KAC1B,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACpC,6EAA6E;IAC7E,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * Configuration of `AuthBrokerFactory`: where destinations live and what an
4
- * interactive login needs. The launcher builds it from the parameters; the
5
- * factory adds no default collaborator.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- //# sourceMappingURL=IAuthBrokerFactoryConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAuthBrokerFactoryConfig.js","sourceRoot":"","sources":["../../src/auth/IAuthBrokerFactoryConfig.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,93 +0,0 @@
1
- /**
2
- * AuthBrokerFactory — one broker per destination, built on first use.
3
- *
4
- * Building a destination's broker decides three things, each before anything
5
- * is built: is what the destination states well formed (`vetMeans`), is
6
- * there a handler for it (`handlerFor`), and then the broker with exactly the
7
- * destination's stores, the options the server states for every destination
8
- * (`renewal`, `onWriteFailure` by store, `authDebug`) and that handler's
9
- * options. A failure reaches the caller as the error it is.
10
- *
11
- * Its providers are handed out counted, behind one gate: `settle` closes the
12
- * gate, disposes the logins it composed, waits for the calls already
13
- * running, then flushes every broker.
14
- *
15
- * The settings are read once per process; the provider is asked of the
16
- * broker on every call, with the caller's signal — the factory keeps no
17
- * provider cache, the broker does.
18
- */
19
- import { AuthBroker, type BrokerCallOptions } from '@mcp-abap-adt/auth-broker';
20
- import type { SapConfig } from '@mcp-abap-adt/connection';
21
- import type { IAuthProvider, IAuthProviderError } from '@mcp-abap-adt/interfaces-auth';
22
- import { type DestinationSystemContext } from '@mcp-abap-adt/lib/auth';
23
- import type { IAuthBrokerFactory, SettleReport } from './IAuthBrokerFactory.js';
24
- import type { IAuthBrokerFactoryConfig } from './IAuthBrokerFactoryConfig.js';
25
- export declare class AuthBrokerFactory implements IAuthBrokerFactory {
26
- readonly defaultDestination: string | undefined;
27
- private readonly config;
28
- private readonly context;
29
- private readonly gate;
30
- /** The shutdown began: no interactive login starts, `aborted` is the shutdown's. */
31
- private shutdownBegan;
32
- private readonly renewal;
33
- /** `--login-timeout`: the bound every composed login runs under. */
34
- private readonly bound;
35
- /** The build of each destination, set before its first await. */
36
- private readonly built;
37
- /** One counted wrapper per inner provider the brokers answered. */
38
- private readonly counted;
39
- /** Every login strategy composed, disposed at shutdown. */
40
- private readonly logins;
41
- private readonly settings;
42
- private readonly systemContexts;
43
- constructor(config: IAuthBrokerFactoryConfig);
44
- /**
45
- * The server's own sentence for a chain failure, keyed on its
46
- * `kind` and this factory's state: the renewal it was started with, and
47
- * whether the shutdown closed its gate.
48
- */
49
- sentenceFor(error: IAuthProviderError): string | undefined;
50
- /** The server's own state a sentence is keyed on. */
51
- private state;
52
- /**
53
- * The destination's broker. A consumer that connects must use
54
- * `getProvider` instead: the broker's own provider is not counted and
55
- * bypasses the shutdown gate that `settle` closes.
56
- */
57
- getBroker(destination: string): Promise<AuthBroker>;
58
- /**
59
- * The destination's settings, read once per process like its provider:
60
- * a change to the files applies on restart. A failed read is dropped, so
61
- * fixing the file lets the next call answer.
62
- */
63
- settingsFor(destination: string): Promise<SapConfig>;
64
- /** The message-server fields the server was started with, each only when set. */
65
- private messageServer;
66
- private readSettings;
67
- /**
68
- * The responsible, the login and the master system the destination's own
69
- * `.env` states, read once per process like its settings. The process environment is not
70
- * read here: it is the server's fallback, after the destination.
71
- */
72
- systemContextFor(destination: string): Promise<DestinationSystemContext>;
73
- /**
74
- * The destination's provider, asked of its broker on every call with the
75
- * caller's `signal` (the broker answers its cached provider while the
76
- * destination is unchanged), handed out counted: one wrapper per inner
77
- * provider, so the same inner answers the same wrapper.
78
- */
79
- getProvider(destination: string, options?: BrokerCallOptions): Promise<IAuthProvider>;
80
- beginShutdown(): void;
81
- /**
82
- * Every login composed ends (`disposed`): its listener is released, and a
83
- * call waiting on it answers. A shutdown before the transport opened calls
84
- * it beside its logoffs: the start's own login ends with it.
85
- */
86
- endLogins(): Promise<void>;
87
- settle(options?: BrokerCallOptions): Promise<SettleReport>;
88
- /** The build of a destination, cached as a promise; a failed one is dropped. */
89
- private buildOf;
90
- private build;
91
- private modeOf;
92
- }
93
- //# sourceMappingURL=brokerFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brokerFactory.d.ts","sourceRoot":"","sources":["../../src/auth/brokerFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAEV,aAAa,EACb,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,wBAAwB,CAAC;AAkBhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAgE9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