tiny-http-mcp-server 0.1.58 → 0.1.59

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.
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  "name": "tiny-http-mcp-server",
21
- "version": "0.1.58",
21
+ "version": "0.1.59",
22
22
  "license": "MIT"
23
23
  },
24
24
  {
@@ -61,6 +61,9 @@ The default provider captures client, interaction, callback, landing-page and
61
61
  lock policies when created. Create a new provider to change those settings.
62
62
  Selected callbacks, stores, clocks and AbortSignals remain live host dependencies;
63
63
  aborting the original signal still cancels authorization.
64
+ Native session and client persistence factories also capture file paths, salts,
65
+ Keychain identities, lock locations and selected filesystem/command handles.
66
+ Mutating these settings cannot redirect a later read or write.
64
67
 
65
68
  `createJwksTokenVerifier(options)` accepts:
66
69
 
@@ -12,6 +12,7 @@ const DEFAULT_CLIENT_KEYCHAIN_SERVICE = "poe-code-mcp-oauth-clients";
12
12
  const MAX_JS_DATE_MS = 8_640_000_000_000_000;
13
13
  export function createAuthStoreSessionStore(options = {}, namespace) {
14
14
  assertPersistenceNamespace(namespace);
15
+ options = snapshotPersistenceOptions(options);
15
16
  return {
16
17
  async withLock(resource, operation, lockOptions) {
17
18
  const store = createResourceSecretStore(resource, options, namespace);
@@ -49,6 +50,7 @@ export function createAuthStoreSessionStore(options = {}, namespace) {
49
50
  }
50
51
  export function createAuthStoreClientStore(options, namespace) {
51
52
  assertPersistenceNamespace(namespace);
53
+ options = snapshotPersistenceOptions(options);
52
54
  return {
53
55
  async load(issuer) {
54
56
  const store = createIssuerSecretStore(issuer, options, namespace);
@@ -79,6 +81,14 @@ export function createAuthStoreClientStore(options, namespace) {
79
81
  }
80
82
  };
81
83
  }
84
+ function snapshotPersistenceOptions(options) {
85
+ return {
86
+ ...options,
87
+ ...(options.fileStore === undefined ? {} : { fileStore: { ...options.fileStore } }),
88
+ ...(options.keychainStore === undefined ? {} : { keychainStore: { ...options.keychainStore,
89
+ ...(options.keychainStore.lock === undefined ? {} : { lock: { ...options.keychainStore.lock } }) } })
90
+ };
91
+ }
82
92
  export function createNamedSecretStore(key, options, defaults, namespace) {
83
93
  const hash = crypto.createHash("sha256").update(namespace === undefined ? key : JSON.stringify([namespace, key])).digest("hex");
84
94
  const configuredFilePath = options.fileStore?.filePath;
@@ -4572,6 +4572,7 @@ var DEFAULT_CLIENT_KEYCHAIN_SERVICE = "poe-code-mcp-oauth-clients";
4572
4572
  var MAX_JS_DATE_MS = 864e13;
4573
4573
  function createAuthStoreSessionStore(options = {}, namespace) {
4574
4574
  assertPersistenceNamespace(namespace);
4575
+ options = snapshotPersistenceOptions(options);
4575
4576
  return {
4576
4577
  async withLock(resource, operation, lockOptions) {
4577
4578
  const store = createResourceSecretStore(resource, options, namespace);
@@ -4608,6 +4609,7 @@ function createAuthStoreSessionStore(options = {}, namespace) {
4608
4609
  }
4609
4610
  function createAuthStoreClientStore(options, namespace) {
4610
4611
  assertPersistenceNamespace(namespace);
4612
+ options = snapshotPersistenceOptions(options);
4611
4613
  return {
4612
4614
  async load(issuer) {
4613
4615
  const store = createIssuerSecretStore(issuer, options, namespace);
@@ -4635,6 +4637,16 @@ function createAuthStoreClientStore(options, namespace) {
4635
4637
  }
4636
4638
  };
4637
4639
  }
4640
+ function snapshotPersistenceOptions(options) {
4641
+ return {
4642
+ ...options,
4643
+ ...options.fileStore === void 0 ? {} : { fileStore: { ...options.fileStore } },
4644
+ ...options.keychainStore === void 0 ? {} : { keychainStore: {
4645
+ ...options.keychainStore,
4646
+ ...options.keychainStore.lock === void 0 ? {} : { lock: { ...options.keychainStore.lock } }
4647
+ } }
4648
+ };
4649
+ }
4638
4650
  function createNamedSecretStore(key2, options, defaults, namespace) {
4639
4651
  const hash = crypto2.createHash("sha256").update(namespace === void 0 ? key2 : JSON.stringify([namespace, key2])).digest("hex");
4640
4652
  const configuredFilePath = options.fileStore?.filePath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiny-http-mcp-server",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "description": "Minimal MCP server over HTTP built on tiny-stdio-mcp-server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",