@suveren/gateway 0.3.3 → 0.3.4

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Suveren</title>
7
- <script type="module" crossorigin src="/assets/index-RkZBhIxU.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-mg8gMTzG.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-BUgn3e63.css">
9
9
  </head>
10
10
  <body>
@@ -109,6 +109,8 @@ module.exports = {
109
109
 
110
110
  hebrew: "iso88598",
111
111
  hebrew8: "iso88598",
112
+ iso88598i: "iso88598",
113
+ iso88598e: "iso88598",
112
114
 
113
115
  turkish: "iso88599",
114
116
  turkish8: "iso88599",
@@ -31,7 +31,9 @@ function Utf32Encoder (options, codec) {
31
31
 
32
32
  Utf32Encoder.prototype.write = function (str) {
33
33
  var src = Buffer.from(str, "ucs2")
34
- var dst = Buffer.alloc(src.length * 2)
34
+ // src.length * 2 covers this chunk's code units (4 bytes each); the extra 4 bytes leave room for a
35
+ // high surrogate held over from a previous chunk, which is flushed ahead of this chunk's units.
36
+ var dst = Buffer.alloc(src.length * 2 + 4)
35
37
  var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE
36
38
  var offset = 0
37
39
 
@@ -113,9 +115,9 @@ Utf32Decoder.prototype.write = function (src) {
113
115
  // NOTE: codepoint is a signed int32 and can be negative.
114
116
  // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).
115
117
  if (isLE) {
116
- codepoint = overflow[i] | (overflow[i + 1] << 8) | (overflow[i + 2] << 16) | (overflow[i + 3] << 24)
118
+ codepoint = overflow[0] | (overflow[1] << 8) | (overflow[2] << 16) | (overflow[3] << 24)
117
119
  } else {
118
- codepoint = overflow[i + 3] | (overflow[i + 2] << 8) | (overflow[i + 1] << 16) | (overflow[i] << 24)
120
+ codepoint = overflow[3] | (overflow[2] << 8) | (overflow[1] << 16) | (overflow[0] << 24)
119
121
  }
120
122
  overflow.length = 0
121
123
 
@@ -169,7 +171,12 @@ function _writeCodepoint (dst, offset, codepoint, badChar) {
169
171
  };
170
172
 
171
173
  Utf32Decoder.prototype.end = function () {
174
+ if (this.overflow.length === 0) { return }
175
+
176
+ // A leftover, incomplete 4-byte code unit at the end of the input is ill-formed. Substitute a
177
+ // single U+FFFD (Unicode Standard conformance clause C10) instead of silently dropping the bytes.
172
178
  this.overflow.length = 0
179
+ return String.fromCharCode(this.badChar)
173
180
  }
174
181
 
175
182
  // == UTF-32 Auto codec =============================================================
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iconv-lite",
3
3
  "description": "Convert character encodings in pure javascript.",
4
- "version": "0.7.2",
4
+ "version": "0.7.3",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "iconv",
@@ -46,7 +46,7 @@
46
46
  "stream": false
47
47
  },
48
48
  "devDependencies": {
49
- "@arethetypeswrong/cli": "^0.17.4",
49
+ "@arethetypeswrong/cli": "^0.18.4",
50
50
  "@stylistic/eslint-plugin": "^5.1.0",
51
51
  "@stylistic/eslint-plugin-js": "^4.1.0",
52
52
  "@types/node": "^24.0.12",
@@ -276,6 +276,8 @@ export type Encoding =
276
276
  | "iso88596"
277
277
  | "iso88597"
278
278
  | "iso88598"
279
+ | "iso88598e"
280
+ | "iso88598i"
279
281
  | "iso88599"
280
282
  | "isoceltic"
281
283
  | "isoir100"
@@ -109,6 +109,8 @@ module.exports = {
109
109
 
110
110
  hebrew: "iso88598",
111
111
  hebrew8: "iso88598",
112
+ iso88598i: "iso88598",
113
+ iso88598e: "iso88598",
112
114
 
113
115
  turkish: "iso88599",
114
116
  turkish8: "iso88599",
@@ -31,7 +31,9 @@ function Utf32Encoder (options, codec) {
31
31
 
32
32
  Utf32Encoder.prototype.write = function (str) {
33
33
  var src = Buffer.from(str, "ucs2")
34
- var dst = Buffer.alloc(src.length * 2)
34
+ // src.length * 2 covers this chunk's code units (4 bytes each); the extra 4 bytes leave room for a
35
+ // high surrogate held over from a previous chunk, which is flushed ahead of this chunk's units.
36
+ var dst = Buffer.alloc(src.length * 2 + 4)
35
37
  var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE
36
38
  var offset = 0
37
39
 
@@ -113,9 +115,9 @@ Utf32Decoder.prototype.write = function (src) {
113
115
  // NOTE: codepoint is a signed int32 and can be negative.
114
116
  // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).
115
117
  if (isLE) {
116
- codepoint = overflow[i] | (overflow[i + 1] << 8) | (overflow[i + 2] << 16) | (overflow[i + 3] << 24)
118
+ codepoint = overflow[0] | (overflow[1] << 8) | (overflow[2] << 16) | (overflow[3] << 24)
117
119
  } else {
118
- codepoint = overflow[i + 3] | (overflow[i + 2] << 8) | (overflow[i + 1] << 16) | (overflow[i] << 24)
120
+ codepoint = overflow[3] | (overflow[2] << 8) | (overflow[1] << 16) | (overflow[0] << 24)
119
121
  }
120
122
  overflow.length = 0
121
123
 
@@ -169,7 +171,12 @@ function _writeCodepoint (dst, offset, codepoint, badChar) {
169
171
  };
170
172
 
171
173
  Utf32Decoder.prototype.end = function () {
174
+ if (this.overflow.length === 0) { return }
175
+
176
+ // A leftover, incomplete 4-byte code unit at the end of the input is ill-formed. Substitute a
177
+ // single U+FFFD (Unicode Standard conformance clause C10) instead of silently dropping the bytes.
172
178
  this.overflow.length = 0
179
+ return String.fromCharCode(this.badChar)
173
180
  }
174
181
 
175
182
  // == UTF-32 Auto codec =============================================================
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iconv-lite",
3
3
  "description": "Convert character encodings in pure javascript.",
4
- "version": "0.7.2",
4
+ "version": "0.7.3",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "iconv",
@@ -46,7 +46,7 @@
46
46
  "stream": false
47
47
  },
48
48
  "devDependencies": {
49
- "@arethetypeswrong/cli": "^0.17.4",
49
+ "@arethetypeswrong/cli": "^0.18.4",
50
50
  "@stylistic/eslint-plugin": "^5.1.0",
51
51
  "@stylistic/eslint-plugin-js": "^4.1.0",
52
52
  "@types/node": "^24.0.12",
@@ -276,6 +276,8 @@ export type Encoding =
276
276
  | "iso88596"
277
277
  | "iso88597"
278
278
  | "iso88598"
279
+ | "iso88598e"
280
+ | "iso88598i"
279
281
  | "iso88599"
280
282
  | "isoceltic"
281
283
  | "isoir100"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suveren/gateway",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Suveren gateway — local agent gateway built in compliance with the Human Agency Protocol (HAP). Runs the UI, control plane, and MCP server in one Node process.",
5
5
  "type": "module",
6
6
  "main": "server.js",