@bluestep-systems/b6p-core 1.8.0 → 1.8.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/README.md +10 -2
- package/dist/B6PCore.js +21 -2
- package/dist/B6PCore.js.map +1 -1
- package/dist/cache/OrgCache.js +5 -4
- package/dist/cache/OrgCache.js.map +1 -1
- package/dist/gateway/GatewayService.d.ts +17 -4
- package/dist/gateway/GatewayService.js +34 -8
- package/dist/gateway/GatewayService.js.map +1 -1
- package/dist/persistence/PublicPersistanceMap.js +17 -9
- package/dist/persistence/PublicPersistanceMap.js.map +1 -1
- package/dist/providers.d.ts +10 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -48,6 +48,12 @@ await core.script.push({ rootPath, snapshot: true, message: "Update script" });
|
|
|
48
48
|
const audit = await core.script.audit({ filePath, workspacePath });
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
`silent: true` in the providers makes a session write nothing of its own: core then uses a logger and a progress
|
|
52
|
+
provider that output nothing (progress still runs every task) for itself and everything it builds, so a warning
|
|
53
|
+
about a malformed cache entry or stored credential never reaches the consumer's stderr. For a consumer whose output
|
|
54
|
+
is read by a program, such as an MCP client's header helper. The caches' background loads never reject: a stored
|
|
55
|
+
entry that does not revive leaves its map empty, and a startup warning quoting an error has token shapes replaced.
|
|
56
|
+
|
|
51
57
|
### Command surface
|
|
52
58
|
|
|
53
59
|
`B6PCore` is a composition root, not a flat command bag. It owns the platform-facing singletons —
|
|
@@ -237,7 +243,7 @@ An MCP client (Claude Code's `headersHelper`, Codex's `http_headers_helper`) can
|
|
|
237
243
|
|
|
238
244
|
```typescript
|
|
239
245
|
const headers = await core.gateway.mcpHeaders({ url: process.env.CLAUDE_CODE_MCP_SERVER_URL }); // { Authorization: "Bearer b6pt_…" }
|
|
240
|
-
const check = await core.gateway.mcpCheck(); // { accepted, problem, scope, status, token: { alias, scopes, expiresAt, refreshable } | null }
|
|
246
|
+
const check = await core.gateway.mcpCheck(); // { accepted, problem, scope, status, token: { alias, scopes, expiresAt, refreshable } | null, scopes: { mcp, "kb:read" } }
|
|
241
247
|
```
|
|
242
248
|
|
|
243
249
|
- `mcpHeaders` is offline and caches nothing: it reads the stored token on every call, so a rotated
|
|
@@ -251,7 +257,9 @@ const check = await core.gateway.mcpCheck(); // { accepted, problem, scope, stat
|
|
|
251
257
|
`mcp`) or `not-permitted`. `/mcp`'s scope filter passes a token that is not live through, so a `ping` alone
|
|
252
258
|
proves nothing: liveness comes first from `GET /api/v1/tokens` (401 is `token-invalid`; a 403 for want of
|
|
253
259
|
`tokens:self` still shows the token is live), then one JSON-RPC `ping` checks the `mcp` scope; only a 2xx is
|
|
254
|
-
acceptance.
|
|
260
|
+
acceptance. `scopes` says whether the same token holds `mcp` and `kb:read` (`kb:read` from its row, or, without
|
|
261
|
+
`tokens:self`, from `GET /api/v1/knowledge-bases`, a 403 for the scope being no); `null` where it cannot be told.
|
|
262
|
+
Every request runs as one queue entry on one token read. When the token holds `tokens:self`, `token` is its
|
|
255
263
|
own row, so a consumer can warn before `expiresAt` and say whether a rotation can renew it (`refreshable`).
|
|
256
264
|
A verdict that cannot be established (404, 429, 5xx, network, a redirect, from either request) is thrown.
|
|
257
265
|
|
package/dist/B6PCore.js
CHANGED
|
@@ -83,6 +83,25 @@ function gatewayTokenStoreFrom(auth) {
|
|
|
83
83
|
},
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* The logger a {@link B6PProviders.silent} session uses: every level writes nothing.
|
|
88
|
+
* @lastreviewed null
|
|
89
|
+
*/
|
|
90
|
+
const SILENT_LOGGER = { info() { }, warn() { }, error() { }, debug() { } };
|
|
91
|
+
/**
|
|
92
|
+
* The progress provider a {@link B6PProviders.silent} session uses: runs every task in order, as the contract
|
|
93
|
+
* says, and shows nothing.
|
|
94
|
+
* @lastreviewed null
|
|
95
|
+
*/
|
|
96
|
+
const SILENT_PROGRESS = {
|
|
97
|
+
async withProgress(tasks) {
|
|
98
|
+
const results = [];
|
|
99
|
+
for (const task of tasks) {
|
|
100
|
+
results.push(await task.execute());
|
|
101
|
+
}
|
|
102
|
+
return results;
|
|
103
|
+
},
|
|
104
|
+
};
|
|
86
105
|
/**
|
|
87
106
|
* Headless SDK entry point for the BlueStep platform.
|
|
88
107
|
*
|
|
@@ -156,8 +175,8 @@ class B6PCore {
|
|
|
156
175
|
this.fs = providers.fs;
|
|
157
176
|
this.persistence = providers.persistence;
|
|
158
177
|
this.prompt = providers.prompt;
|
|
159
|
-
this.logger = providers.logger;
|
|
160
|
-
this.progress = providers.progress;
|
|
178
|
+
this.logger = providers.silent === true ? SILENT_LOGGER : providers.logger;
|
|
179
|
+
this.progress = providers.silent === true ? SILENT_PROGRESS : providers.progress;
|
|
161
180
|
this._isDebugMode = providers.isDebugMode ?? (() => false);
|
|
162
181
|
this.auth = providers.auth ?? new BearerAuthProvider_1.BearerAuthProvider(this.persistence, this.prompt, this.logger);
|
|
163
182
|
this.sessionManager = new SessionManager_1.SessionManager(this.persistence, this.logger, this.auth, this._isDebugMode, this.prompt, providers.fetchFn);
|
package/dist/B6PCore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"B6PCore.js","sourceRoot":"","sources":["../src/B6PCore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,MAAM,oCAAgB;AAClC,2CAAwC;AACxC,kEAA+D;AAC/D,6DAA0D;
|
|
1
|
+
{"version":3,"file":"B6PCore.js","sourceRoot":"","sources":["../src/B6PCore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,MAAM,oCAAgB;AAClC,2CAAwC;AACxC,kEAA+D;AAC/D,6DAA0D;AAY1D,qEAAkE;AAClE,+CAAmE;AACnE,mEAAgE;AAChE,qEAAkE;AAClE,iEAAyD;AACzD,mEAA2D;AAC3D,+EAA4E;A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-6,6 +6,7 @@ const OrgWorker_1 = require("../data/OrgWorker");
|
|
|
6
6
|
const HttpClient_1 = require("../network/HttpClient");
|
|
7
7
|
const Err_1 = require("../Err");
|
|
8
8
|
const persistence_1 = require("../persistence");
|
|
9
|
+
const GatewayToken_1 = require("../gateway/GatewayToken");
|
|
9
10
|
/**
|
|
10
11
|
* A cache of org URLs associated with U values.
|
|
11
12
|
* @lastreviewed null
|
|
@@ -53,7 +54,7 @@ class OrgCache {
|
|
|
53
54
|
// Nothing awaits `ready` at construction time, so a rejection here would be
|
|
54
55
|
// an unhandled rejection that takes the process down — and would then make
|
|
55
56
|
// every gated method reject for the rest of the process's life.
|
|
56
|
-
this.logger.warn(`OrgCache initial cleanup failed; continuing with the loaded cache: ${String(e)}`);
|
|
57
|
+
this.logger.warn((0, GatewayToken_1.redactTokenShapes)(`OrgCache initial cleanup failed; continuing with the loaded cache: ${String(e)}`));
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
60
|
/**
|
|
@@ -146,7 +147,7 @@ class OrgCache {
|
|
|
146
147
|
await this.cleanupOldEntries();
|
|
147
148
|
}
|
|
148
149
|
catch (e) {
|
|
149
|
-
this.logger.warn(`OrgCache scheduled cleanup failed; the cache is unchanged: ${String(e)}`);
|
|
150
|
+
this.logger.warn((0, GatewayToken_1.redactTokenShapes)(`OrgCache scheduled cleanup failed; the cache is unchanged: ${String(e)}`));
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
153
|
/**
|
|
@@ -164,7 +165,7 @@ class OrgCache {
|
|
|
164
165
|
if (uniqueHosts.has(element.host)) {
|
|
165
166
|
if (throwIfDuplicateExists) {
|
|
166
167
|
this.isDebugMode() &&
|
|
167
|
-
console.error(`OrgCache contains duplicate host ${element.host}
|
|
168
|
+
console.error((0, GatewayToken_1.redactTokenShapes)(`OrgCache contains duplicate host ${element.host} ${JSON.stringify(this.orgCacheMap.toJSON())}`));
|
|
168
169
|
this.prompt?.error(`OrgCache is invalid!`);
|
|
169
170
|
throw new Err_1.Err.AlreadyAlertedError(`OrgCache contains duplicate host ${element.host}`);
|
|
170
171
|
}
|
|
@@ -203,7 +204,7 @@ class OrgCache {
|
|
|
203
204
|
const orgWorker = OrgWorker_1.OrgWorker.fromHost(element.host, HttpClient_1.HttpClient.getInstance().fetch.bind(HttpClient_1.HttpClient.getInstance()));
|
|
204
205
|
if (!(await orgWorker.verifyU(u))) {
|
|
205
206
|
this.isDebugMode() &&
|
|
206
|
-
console.error(`OrgCache entry for U ${u} with host ${element.host} is invalid
|
|
207
|
+
console.error((0, GatewayToken_1.redactTokenShapes)(`OrgCache entry for U ${u} with host ${element.host} is invalid ${JSON.stringify(this.orgCacheMap.toJSON())}`));
|
|
207
208
|
removalSet.add(element.host);
|
|
208
209
|
}
|
|
209
210
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgCache.js","sourceRoot":"","sources":["../../src/cache/OrgCache.ts"],"names":[],"mappings":";;;AACA,4CAAuD;AACvD,iDAA8C;AAC9C,sDAAmD;AACnD,gCAA6B;AAC7B,gDAAkE;
|
|
1
|
+
{"version":3,"file":"OrgCache.js","sourceRoot":"","sources":["../../src/cache/OrgCache.ts"],"names":[],"mappings":";;;AACA,4CAAuD;AACvD,iDAA8C;AAC9C,sDAAmD;AACnD,gCAA6B;AAC7B,gDAAkE;AAElE,0DAA4D;AAsB5D;;;GAGG;AACH;IAuBqB,MAAM;IACN,QAAQ;IACR,WAAW;IACX,MAAM;IAzBR,WAAW,CAA0C;IAC9D,aAAa,GAAyC,IAAI,CAAC;IAC3D,SAAS,GAAG,KAAK,CAAC;IAE1B;;OAEG;IACI,SAAS,GAAwB,IAAI,CAAC;IAE7C;;;;;;;;OAQG;IACc,KAAK,CAAgB;IAEtC,YACE,WAAwB,EACP,MAAc,EACd,QAA0B,EAC1B,WAA0B,EAC1B,MAAe;sBAHf,MAAM;wBACN,QAAQ;2BACR,WAAW;sBACX,MAAM;QAEvB,IAAI,CAAC,WAAW,GAAG,I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W,EAAE,CAAC;YACjD,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;gBACnC,IAAI,WAAW,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC;oBACjC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;oBAChC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;oBACtC,OAAO,CAAC,CAAC;gBACX,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACjC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC5B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -64,6 +64,18 @@ export interface GatewayMcpCheck {
|
|
|
64
64
|
* @lastreviewed null
|
|
65
65
|
*/
|
|
66
66
|
token: GatewayMcpTokenInfo | null;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the same token holds the scopes BlueStep's tools need, `null` where it could not be told (the token
|
|
69
|
+
* is missing, malformed or not live; `/mcp` refused it for another reason):
|
|
70
|
+
* - `mcp`: `/mcp` took it (`true`) or refused it for the `mcp` scope (`false`);
|
|
71
|
+
* - `kb:read`: from the token's own row when it may be read, else from a knowledge-base listing (refused for its
|
|
72
|
+
* scope = `false`).
|
|
73
|
+
* @lastreviewed null
|
|
74
|
+
*/
|
|
75
|
+
scopes: {
|
|
76
|
+
mcp: boolean | null;
|
|
77
|
+
"kb:read": boolean | null;
|
|
78
|
+
};
|
|
67
79
|
}
|
|
68
80
|
/**
|
|
69
81
|
* The gateway subsystem: web-global's gateway (`gateway.bluestep.net`), reached for knowledge bases
|
|
@@ -124,12 +136,13 @@ export declare class GatewayService {
|
|
|
124
136
|
* `/mcp`'s scope filter passes a token that is not live through (the tool then refuses it), so a `ping` alone
|
|
125
137
|
* proves nothing. Liveness comes from `GET /api/v1/tokens`, whose authenticator checks the token: `401` is
|
|
126
138
|
* `token-invalid`; `200` is live, with the token's own row (expiry, refreshable); a `403` (no `tokens:self`) is
|
|
127
|
-
* live too, the row unknown.
|
|
128
|
-
*
|
|
129
|
-
*
|
|
139
|
+
* live too, the row unknown. Whether it holds `kb:read` comes from that row, or, without one, from `GET
|
|
140
|
+
* /api/v1/knowledge-bases` (a 403 for the scope = no). Only then is `/mcp` asked whether it refuses the token's
|
|
141
|
+
* scope. Every request runs as ONE queue entry with ONE token read, so the verdict, the row and the scopes
|
|
142
|
+
* describe the same token. The token is in no message.
|
|
130
143
|
*
|
|
131
144
|
* @throws {Err.GatewayError} the verdict could not be established: a 404, 429, 5xx, network failure, redirect
|
|
132
|
-
* or any other answer from
|
|
145
|
+
* or any other answer from any request (`GatewayUnavailableError` for 502/503/504 and the network)
|
|
133
146
|
* @lastreviewed null
|
|
134
147
|
*/
|
|
135
148
|
mcpCheck(): Promise<GatewayMcpCheck>;
|
|
@@ -7,6 +7,8 @@ const GatewayKb_1 = require("./GatewayKb");
|
|
|
7
7
|
const GatewayMarketplace_1 = require("./GatewayMarketplace");
|
|
8
8
|
const GatewayTokenService_1 = require("./GatewayTokenService");
|
|
9
9
|
const Err_1 = require("../Err");
|
|
10
|
+
const Gateway_1 = require("../constants/Gateway");
|
|
11
|
+
const Http_1 = require("../constants/Http");
|
|
10
12
|
/**
|
|
11
13
|
* The gateway subsystem: web-global's gateway (`gateway.bluestep.net`), reached for knowledge bases
|
|
12
14
|
* and marketplace repos. It sits beside `core.script` as `core.gateway`.
|
|
@@ -68,16 +70,17 @@ class GatewayService {
|
|
|
68
70
|
* `/mcp`'s scope filter passes a token that is not live through (the tool then refuses it), so a `ping` alone
|
|
69
71
|
* proves nothing. Liveness comes from `GET /api/v1/tokens`, whose authenticator checks the token: `401` is
|
|
70
72
|
* `token-invalid`; `200` is live, with the token's own row (expiry, refreshable); a `403` (no `tokens:self`) is
|
|
71
|
-
* live too, the row unknown.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
73
|
+
* live too, the row unknown. Whether it holds `kb:read` comes from that row, or, without one, from `GET
|
|
74
|
+
* /api/v1/knowledge-bases` (a 403 for the scope = no). Only then is `/mcp` asked whether it refuses the token's
|
|
75
|
+
* scope. Every request runs as ONE queue entry with ONE token read, so the verdict, the row and the scopes
|
|
76
|
+
* describe the same token. The token is in no message.
|
|
74
77
|
*
|
|
75
78
|
* @throws {Err.GatewayError} the verdict could not be established: a 404, 429, 5xx, network failure, redirect
|
|
76
|
-
* or any other answer from
|
|
79
|
+
* or any other answer from any request (`GatewayUnavailableError` for 502/503/504 and the network)
|
|
77
80
|
* @lastreviewed null
|
|
78
81
|
*/
|
|
79
82
|
mcpCheck() {
|
|
80
|
-
const refused = (problem, status, scope = null) => ({ accepted: false, problem, scope, status, token: null });
|
|
83
|
+
const refused = (problem, status, scope = null, scopes = { mcp: null, "kb:read": null }) => ({ accepted: false, problem, scope, status, token: null, scopes });
|
|
81
84
|
return this.client.sequence(async (seq) => {
|
|
82
85
|
try {
|
|
83
86
|
await seq.token();
|
|
@@ -104,17 +107,40 @@ class GatewayService {
|
|
|
104
107
|
throw error;
|
|
105
108
|
}
|
|
106
109
|
}
|
|
110
|
+
// kb:read under the same token: the row says, else a listing is asked (the same seq, so the same token).
|
|
111
|
+
let kbRead;
|
|
112
|
+
if (token !== null) {
|
|
113
|
+
kbRead = token.scopes.includes("kb:read");
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
try {
|
|
117
|
+
await seq.request(Http_1.Http.Methods.GET, Gateway_1.Gateway.Paths.KNOWLEDGE_BASES);
|
|
118
|
+
kbRead = true;
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
if (error instanceof Err_1.Err.GatewayAuthError) {
|
|
122
|
+
return refused("token-invalid", error.status);
|
|
123
|
+
}
|
|
124
|
+
if (!(error instanceof Err_1.Err.GatewayScopeError)) {
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
kbRead = false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
107
130
|
const { refusal, status } = await this.client.mcpProbe(seq);
|
|
108
131
|
if (refusal instanceof Err_1.Err.GatewayAuthError) {
|
|
109
132
|
return refused("token-invalid", status);
|
|
110
133
|
}
|
|
111
134
|
if (refusal instanceof Err_1.Err.GatewayScopeError) {
|
|
112
|
-
return refused("scope-missing", status, refusal.scope
|
|
135
|
+
return refused("scope-missing", status, refusal.scope, {
|
|
136
|
+
mcp: refusal.scope === null || refusal.scope === "mcp" ? false : null,
|
|
137
|
+
"kb:read": kbRead,
|
|
138
|
+
});
|
|
113
139
|
}
|
|
114
140
|
if (refusal !== null) {
|
|
115
|
-
return refused("not-permitted", status);
|
|
141
|
+
return refused("not-permitted", status, null, { mcp: null, "kb:read": kbRead });
|
|
116
142
|
}
|
|
117
|
-
return { accepted: true, problem: null, scope: null, status, token };
|
|
143
|
+
return { accepted: true, problem: null, scope: null, status, token, scopes: { mcp: true, "kb:read": kbRead } };
|
|
118
144
|
});
|
|
119
145
|
}
|
|
120
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GatewayService.js","sourceRoot":"","sources":["../../src/gateway/GatewayService.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,6CAA0C;AAC1C,2CAAwC;AAExC,6DAA0D;AAE1D,+DAAqE;AACrE,gCAA6B;
|
|
1
|
+
{"version":3,"file":"GatewayService.js","sourceRoot":"","sources":["../../src/gateway/GatewayService.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,6CAA0C;AAC1C,2CAAwC;AAExC,6DAA0D;AAE1D,+DAAqE;AACrE,gCAA6B;AAC7B,kDAA+C;AAC/C,4CAAyC;AA+EzC;;;;;;;;;GASG;AACH;IACE;;;OAGG;IACM,MAAM,CAAgB;IAE/B;;;OAGG;IACM,GAAG,CAAa;IAEzB;;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AE,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;QACjH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -25,15 +25,23 @@ class PublicPersistanceMap extends PersistablePseudoMap_1.PersistablePseudoMap {
|
|
|
25
25
|
*/
|
|
26
26
|
constructor(key, persistence) {
|
|
27
27
|
super(key, persistence);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
// The revive runs inside the same try as the read: a stored entry that does not revive (a malformed tagged
|
|
29
|
+
// value, which may quote whatever it holds) used to throw from the `then` callback, leaving `ready` rejected
|
|
30
|
+
// with nothing awaiting it at construction: an unhandled rejection printed under `--unhandled-rejections=warn`.
|
|
31
|
+
this.ready = (async () => {
|
|
32
|
+
try {
|
|
33
|
+
const data = await this.persistence.get(this.key);
|
|
34
|
+
this.obj = (0, Serializable_1.revive)(data || {});
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// Leave the map empty on a failed load or revive; treated as "no data yet". The error is not kept: its
|
|
38
|
+
// text may quote stored values.
|
|
39
|
+
}
|
|
40
|
+
finally {
|
|
41
|
+
// The load has settled, so isInitialized() must report true to stay consistent with the resolved `ready`.
|
|
42
|
+
this.initialized = true;
|
|
43
|
+
}
|
|
44
|
+
})();
|
|
37
45
|
}
|
|
38
46
|
/**
|
|
39
47
|
* Checks if the map has finished initializing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicPersistanceMap.js","sourceRoot":"","sources":["../../src/persistence/PublicPersistanceMap.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAG9D,iDAAwC;AAExC;;;GAGG;AACH,0BAA0D,SAAQ,2CAAuB;IAC7E,WAAW,GAAY,KAAK,CAAC;IAEvC;;;;;;;OAOG;IACc,KAAK,CAAgB;IAEtC;;;;OAIG;IACH,YAAY,GAAe,EAAE,WAAwB;QACnD,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"PublicPersistanceMap.js","sourceRoot":"","sources":["../../src/persistence/PublicPersistanceMap.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAG9D,iDAAwC;AAExC;;;GAGG;AACH,0BAA0D,SAAQ,2CAAuB;IAC7E,WAAW,GAAY,KAAK,CAAC;IAEvC;;;;;;;OAOG;IACc,KAAK,CAAgB;IAEtC;;;;OAIG;IACH,YAAY,GAAe,EAAE,WAAwB;QACnD,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QACxB,2GAA2G;QAC3G,6GAA6G;QAC7G,gHAAgH;QAChH,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,IAAI,EAAE;YACvB,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAoB,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrE,IAAI,CAAC,GAAG,GAAG,IAAA,qBAAM,EAAC,IAAI,IAAI,EAAE,CAAC,CAAC;YAChC,CAAC;YAAC,MAAM,CAAC;gBACP,uGAAuG;gBACvG,gCAAgC;YAClC,CAAC;oBAAS,CAAC;gBACT,0GAA0G;gBAC1G,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC;IAED;;OAEG;IACH,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACM,KAAK;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;CACF"}
|
package/dist/providers.d.ts
CHANGED
|
@@ -239,6 +239,16 @@ export interface B6PProviders {
|
|
|
239
239
|
progress: Progress;
|
|
240
240
|
/** Optional debug-mode flag callback. Defaults to `() => false` if not provided. */
|
|
241
241
|
isDebugMode?: () => boolean;
|
|
242
|
+
/**
|
|
243
|
+
* `true` for a session that must write nothing of its own: core then uses a logger and a progress provider that
|
|
244
|
+
* output nothing (progress still runs every task, in order) in place of `logger` and `progress`, for itself and
|
|
245
|
+
* everything it builds (the default auth provider, caches, subsystems). For a caller whose output is consumed by
|
|
246
|
+
* a program and whose stderr must carry only its own fixed lines, such as an MCP client's header helper
|
|
247
|
+
* (`gateway.mcpHeaders`): a warning about a malformed cache entry or stored credential then never reaches it.
|
|
248
|
+
* `prompt` is unchanged. Default `false`.
|
|
249
|
+
* @lastreviewed null
|
|
250
|
+
*/
|
|
251
|
+
silent?: boolean;
|
|
242
252
|
/**
|
|
243
253
|
* Optional authentication scheme. Defaults to `BearerAuthProvider` (this file
|
|
244
254
|
* deliberately imports nothing from `auth/`, so that is a plain reference, not a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluestep-systems/b6p-core",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Core (vscode-free) library for BlueStep B6P script management",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"clean": "rm -rf dist tsconfig.tsbuildinfo && npm run clean -w @bluestep-systems/b6p-core-bsjs-git",
|
|
30
30
|
"format": "prettier --write \"src/**/*.ts\" && npm run format -w @bluestep-systems/b6p-core-bsjs-git",
|
|
31
31
|
"format-check": "prettier --check \"src/**/*.ts\" && npm run format-check -w @bluestep-systems/b6p-core-bsjs-git",
|
|
32
|
-
"test": "npm run compile && npm test -w @bluestep-systems/b6p-core-bsjs-git && node test/B6PUri.test.js && node test/DownstairsPathParser.test.js && node test/AuditIntegrity.test.js && node test/GetSetupUrl.test.js && node test/TsConfigBuildFolder.test.js && node test/JsdocLastReviewed.test.js && node test/PullDivergenceGuard.test.js && node test/ScriptMetaDataStore.test.js && node test/SharedFilePersistence.test.js && node test/OrgCacheReadiness.test.js && node test/BearerAuthProvider.test.js && node test/DestructivePrompts.test.js && node test/GitDraftSync.test.js && node test/ServerVersionFloor.test.js && node test/Gateway.test.js && node test/GatewayGit.test.js && node test/GatewayTokens.test.js && node test/GatewayMarketplace.test.js && node test/GatewayKb.test.js && node test/GatewayKbAdmin.test.js && node test/GatewayKbReadPage.test.js && node test/SchemaService.test.js && node test/GitCredential.test.js",
|
|
32
|
+
"test": "npm run compile && npm test -w @bluestep-systems/b6p-core-bsjs-git && node test/B6PUri.test.js && node test/DownstairsPathParser.test.js && node test/AuditIntegrity.test.js && node test/GetSetupUrl.test.js && node test/TsConfigBuildFolder.test.js && node test/JsdocLastReviewed.test.js && node test/PullDivergenceGuard.test.js && node test/ScriptMetaDataStore.test.js && node test/SharedFilePersistence.test.js && node test/OrgCacheReadiness.test.js && node test/BearerAuthProvider.test.js && node test/DestructivePrompts.test.js && node test/GitDraftSync.test.js && node test/ServerVersionFloor.test.js && node test/Gateway.test.js && node test/GatewayGit.test.js && node test/GatewayTokens.test.js && node test/GatewayMarketplace.test.js && node test/GatewayKb.test.js && node test/GatewayKbAdmin.test.js && node test/GatewayKbReadPage.test.js && node test/SilentSession.test.js && node test/SchemaService.test.js && node test/GitCredential.test.js",
|
|
33
33
|
"prepublishOnly": "npm run clean && npm run format-check && npm run check-types && npm run compile"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|