@axiom-lattice/gateway 2.1.104 → 2.1.106

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/gateway@2.1.104 build /home/runner/work/agentic/agentic/packages/gateway
2
+ > @axiom-lattice/gateway@2.1.106 build /home/runner/work/agentic/agentic/packages/gateway
3
3
  > tsup src/index.ts --format cjs,esm --dts --clean --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -18,25 +18,25 @@
18
18
  You need to set the output format to "esm" for "import.meta" to work correctly.
19
19
 
20
20
 
21
- CJS dist/index.js 323.03 KB
22
- CJS dist/index.js.map 662.42 KB
23
- CJS ⚡️ Build success in 364ms
24
21
  ESM dist/index.mjs 271.42 KB
25
22
  ESM dist/sender-PX32VSHB.mjs 873.00 B
26
23
  ESM dist/WechatChannelAdapter-WSDKR4OA.mjs 8.27 KB
27
24
  ESM dist/chunk-6CUQGDJI.mjs 6.42 KB
28
25
  ESM dist/a2a-ERG5RMUW.mjs 15.95 KB
29
- ESM dist/resources-NE6DFF5I.mjs 10.75 KB
30
- ESM dist/chunk-R4ZO3HZ3.mjs 1.44 KB
26
+ ESM dist/resources-HEVGN3JM.mjs 10.92 KB
27
+ ESM dist/chunk-LHQY46YB.mjs 1.46 KB
28
+ ESM dist/index.mjs.map 575.75 KB
31
29
  ESM dist/sender-PX32VSHB.mjs.map 2.07 KB
32
30
  ESM dist/WechatChannelAdapter-WSDKR4OA.mjs.map 16.28 KB
33
31
  ESM dist/chunk-6CUQGDJI.mjs.map 14.04 KB
34
32
  ESM dist/a2a-ERG5RMUW.mjs.map 32.14 KB
35
- ESM dist/resources-NE6DFF5I.mjs.map 19.57 KB
36
- ESM dist/chunk-R4ZO3HZ3.mjs.map 2.35 KB
37
- ESM dist/index.mjs.map 575.75 KB
38
- ESM ⚡️ Build success in 371ms
33
+ ESM dist/resources-HEVGN3JM.mjs.map 19.82 KB
34
+ ESM dist/chunk-LHQY46YB.mjs.map 2.39 KB
35
+ ESM ⚡️ Build success in 519ms
36
+ CJS dist/index.js 323.26 KB
37
+ CJS dist/index.js.map 662.71 KB
38
+ CJS ⚡️ Build success in 520ms
39
39
  DTS Build start
40
- DTS ⚡️ Build success in 16969ms
40
+ DTS ⚡️ Build success in 21723ms
41
41
  DTS dist/index.d.ts 7.57 KB
42
42
  DTS dist/index.d.mts 7.57 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @axiom-lattice/gateway
2
2
 
3
+ ## 2.1.106
4
+
5
+ ### Patch Changes
6
+
7
+ - 2954442: fix issue
8
+ - Updated dependencies [c8749a0]
9
+ - Updated dependencies [2954442]
10
+ - @axiom-lattice/pg-stores@1.0.85
11
+ - @axiom-lattice/core@2.1.94
12
+ - @axiom-lattice/protocols@2.1.48
13
+ - @axiom-lattice/agent-eval@2.1.88
14
+ - @axiom-lattice/queue-redis@1.0.47
15
+
16
+ ## 2.1.105
17
+
18
+ ### Patch Changes
19
+
20
+ - 9608076: fix issues
21
+ - Updated dependencies [9608076]
22
+ - @axiom-lattice/core@2.1.93
23
+ - @axiom-lattice/pg-stores@1.0.84
24
+ - @axiom-lattice/protocols@2.1.47
25
+ - @axiom-lattice/agent-eval@2.1.87
26
+ - @axiom-lattice/queue-redis@1.0.46
27
+
3
28
  ## 2.1.104
4
29
 
5
30
  ### Patch Changes
@@ -1,6 +1,7 @@
1
1
  // src/utils/mime.ts
2
2
  var EXT_TO_MIME = {
3
3
  ".txt": "text/plain",
4
+ ".md": "text/markdown",
4
5
  ".html": "text/html",
5
6
  ".htm": "text/html",
6
7
  ".css": "text/css",
@@ -43,4 +44,4 @@ export {
43
44
  getContentTypeFromFilename,
44
45
  getFilenameFromPath
45
46
  };
46
- //# sourceMappingURL=chunk-R4ZO3HZ3.mjs.map
47
+ //# sourceMappingURL=chunk-LHQY46YB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/mime.ts"],"sourcesContent":["const EXT_TO_MIME: Record<string, string> = {\n \".txt\": \"text/plain\",\n \".md\": \"text/markdown\",\n \".html\": \"text/html\",\n \".htm\": \"text/html\",\n \".css\": \"text/css\",\n \".js\": \"application/javascript\",\n \".mjs\": \"application/javascript\",\n \".json\": \"application/json\",\n \".pdf\": \"application/pdf\",\n \".png\": \"image/png\",\n \".jpg\": \"image/jpeg\",\n \".jpeg\": \"image/jpeg\",\n \".gif\": \"image/gif\",\n \".webp\": \"image/webp\",\n \".svg\": \"image/svg+xml\",\n \".ico\": \"image/x-icon\",\n \".zip\": \"application/zip\",\n \".csv\": \"text/csv\",\n \".xml\": \"application/xml\",\n \".xlsx\": \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n \".xls\": \"application/vnd.ms-excel\",\n \".pptx\": \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \".ppt\": \"application/vnd.ms-powerpoint\",\n \".docx\": \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \".doc\": \"application/msword\",\n \".mp4\": \"video/mp4\",\n \".webm\": \"video/webm\",\n \".mp3\": \"audio/mpeg\",\n \".wav\": \"audio/wav\",\n \".ogg\": \"audio/ogg\",\n};\n\nexport function getContentTypeFromFilename(filename: string): string {\n const ext = filename.includes(\".\")\n ? filename.slice(filename.lastIndexOf(\".\")).toLowerCase()\n : \"\";\n return EXT_TO_MIME[ext] ?? \"application/octet-stream\";\n}\n\nexport function getFilenameFromPath(path: string): string {\n const segments = path.replace(/\\/+$/, \"\").split(\"/\");\n return segments[segments.length - 1] || \"download\";\n}\n"],"mappings":";AAAA,IAAM,cAAsC;AAAA,EAC1C,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AACV;AAEO,SAAS,2BAA2B,UAA0B;AACnE,QAAM,MAAM,SAAS,SAAS,GAAG,IAC7B,SAAS,MAAM,SAAS,YAAY,GAAG,CAAC,EAAE,YAAY,IACtD;AACJ,SAAO,YAAY,GAAG,KAAK;AAC7B;AAEO,SAAS,oBAAoB,MAAsB;AACxD,QAAM,WAAW,KAAK,QAAQ,QAAQ,EAAE,EAAE,MAAM,GAAG;AACnD,SAAO,SAAS,SAAS,SAAS,CAAC,KAAK;AAC1C;","names":[]}
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ var init_mime = __esm({
45
45
  "use strict";
46
46
  EXT_TO_MIME = {
47
47
  ".txt": "text/plain",
48
+ ".md": "text/markdown",
48
49
  ".html": "text/html",
49
50
  ".htm": "text/html",
50
51
  ".css": "text/css",
@@ -1244,7 +1245,7 @@ var init_resources = __esm({
1244
1245
  }
1245
1246
  async updateShare(request, reply) {
1246
1247
  const { token } = request.params;
1247
- const userId = request.user ? request.user.id : void 0;
1248
+ const userId = request.user ? request.user.id ?? "unknown" : "unknown";
1248
1249
  const patch = request.body;
1249
1250
  const record = await this.deps.store.findByToken(token);
1250
1251
  if (!record || record.createdBy !== userId) {
@@ -1258,7 +1259,7 @@ var init_resources = __esm({
1258
1259
  }
1259
1260
  async revokeShare(request, reply) {
1260
1261
  const { token } = request.params;
1261
- const userId = request.user ? request.user.id : void 0;
1262
+ const userId = request.user ? request.user.id ?? "unknown" : "unknown";
1262
1263
  const record = await this.deps.store.findByToken(token);
1263
1264
  if (!record || record.createdBy !== userId) {
1264
1265
  return reply.status(404).send({ error: "Share not found" });
@@ -1337,10 +1338,17 @@ var init_resources = __esm({
1337
1338
  if (!valid) {
1338
1339
  return reply.status(401).send({ error: "Incorrect password" });
1339
1340
  }
1340
- reply.header(
1341
- "Set-Cookie",
1342
- `share_unlock_${token}=1; Max-Age=86400; Path=/s/${token}; SameSite=Lax; HttpOnly; Secure`
1343
- );
1341
+ const cookieOpts = [
1342
+ `share_unlock_${token}=1`,
1343
+ "Max-Age=86400",
1344
+ `Path=/s/${token}`,
1345
+ "SameSite=Lax",
1346
+ "HttpOnly"
1347
+ ];
1348
+ if (request.protocol === "https") {
1349
+ cookieOpts.push("Secure");
1350
+ }
1351
+ reply.header("Set-Cookie", cookieOpts.join("; "));
1344
1352
  return reply.send({ ok: true });
1345
1353
  }
1346
1354
  _isInternalRequest(request) {