ai-remote 0.5.0 → 0.6.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.
@@ -53,7 +53,7 @@ async function parsePrivateKey(text, comment = "") {
53
53
  async function parseOpenSshKey(body, comment) {
54
54
  const magic = new TextDecoder().decode(body.subarray(0, OPENSSH_MAGIC.length));
55
55
  if (magic !== OPENSSH_MAGIC) throw new Error("this is not an OpenSSH private key");
56
- const reader = new SshReader(body, OPENSSH_MAGIC.length);
56
+ const reader = new SshReader(body.slice(), OPENSSH_MAGIC.length);
57
57
  const cipher = reader.string();
58
58
  reader.string();
59
59
  reader.stringBytes();
@@ -171,7 +171,7 @@ async function ecdsaIdentity(keyBlob, curve, point, d, comment) {
171
171
  const x = point.subarray(1, 1 + spec.size);
172
172
  const y = point.subarray(1 + spec.size, 1 + spec.size * 2);
173
173
  const key = await importJwk(
174
- { kty: "EC", crv: spec.jwk, x: b64u(x), y: b64u(y), d: b64u(padStart(d, spec.size)) },
174
+ { kty: "EC", crv: spec.jwk, x: b64u(x), y: b64u(y), d: b64u(padStart(d.slice(), spec.size)) },
175
175
  { name: "ECDSA", namedCurve: spec.jwk }
176
176
  );
177
177
  const algorithm = `ecdsa-sha2-${curve}`;
@@ -231,8 +231,8 @@ async function fromPkcs8(der, comment) {
231
231
  const [name, spec] = curve;
232
232
  const point = concatBytes(
233
233
  new Uint8Array([4]),
234
- padStart(from(jwk.x), spec.size),
235
- padStart(from(jwk.y), spec.size)
234
+ padStart(from(jwk.x).slice(), spec.size),
235
+ padStart(from(jwk.y).slice(), spec.size)
236
236
  );
237
237
  return ecdsaIdentity(new Uint8Array(0), name, point, from(jwk.d), comment);
238
238
  }
@@ -0,0 +1,12 @@
1
+ import {
2
+ checkHostKey,
3
+ forgetHostKey,
4
+ hostAddress,
5
+ knownHosts
6
+ } from "./cli-chunk-WWORJ2NE.mjs";
7
+ export {
8
+ checkHostKey,
9
+ forgetHostKey,
10
+ hostAddress,
11
+ knownHosts
12
+ };
@@ -198,7 +198,7 @@ function savedSecrets() {
198
198
  if (!seen.has(entry.key)) seen.set(entry.key, entry);
199
199
  }
200
200
  }
201
- return [...seen.values()].map(({ key, backend, savedAt }) => ({ key, backend, savedAt })).sort((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0);
201
+ return [...seen.values()].map(({ key, backend, savedAt }) => ({ key, backend, savedAt })).toSorted((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0);
202
202
  }
203
203
  async function forgetAll() {
204
204
  const keys = savedSecrets().map((entry) => entry.key);
@@ -0,0 +1,11 @@
1
+ import {
2
+ Shell,
3
+ bareUsername
4
+ } from "./cli-chunk-L6E2YYPQ.mjs";
5
+ import "./cli-chunk-UD2YES3P.mjs";
6
+ import "./cli-chunk-XT2FISR5.mjs";
7
+ import "./cli-chunk-WWORJ2NE.mjs";
8
+ export {
9
+ Shell,
10
+ bareUsername
11
+ };
@@ -4,8 +4,8 @@ import {
4
4
  openWindow,
5
5
  readCurrentDisplaySize,
6
6
  runWindow
7
- } from "./cli-chunk-F2TSY3YW.mjs";
8
- import "./cli-chunk-OZG2CODR.mjs";
7
+ } from "./cli-chunk-P4645KKB.mjs";
8
+ import "./cli-chunk-TKKENOSJ.mjs";
9
9
  export {
10
10
  detectCurrentDisplaySize,
11
11
  nativeWindowAvailable,