poe-code 3.0.116 → 3.0.117
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 -0
- package/dist/cli/commands/auth.js +25 -34
- package/dist/cli/commands/auth.js.map +1 -1
- package/dist/cli/commands/experiment.d.ts +3 -0
- package/dist/cli/commands/experiment.js +567 -0
- package/dist/cli/commands/experiment.js.map +1 -0
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/models.js +1 -1
- package/dist/cli/commands/models.js.map +1 -1
- package/dist/cli/commands/pipeline.js +6 -4
- package/dist/cli/commands/pipeline.js.map +1 -1
- package/dist/cli/commands/ralph.js +12 -6
- package/dist/cli/commands/ralph.js.map +1 -1
- package/dist/cli/commands/usage.d.ts +24 -0
- package/dist/cli/commands/usage.js +26 -4
- package/dist/cli/commands/usage.js.map +1 -1
- package/dist/cli/error-logger.js +3 -1
- package/dist/cli/error-logger.js.map +1 -1
- package/dist/cli/oauth-login.js +4 -2
- package/dist/cli/oauth-login.js.map +1 -1
- package/dist/cli/program.js +26 -11
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/service-registry.js +3 -2
- package/dist/cli/service-registry.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11335 -29907
- package/dist/index.js.map +4 -4
- package/dist/providers/poe-agent.js +10 -2
- package/dist/providers/poe-agent.js.map +2 -2
- package/dist/sdk/experiment.d.ts +10 -0
- package/dist/sdk/experiment.js +59 -0
- package/dist/sdk/experiment.js.map +1 -0
- package/dist/sdk/spawn-core.js +3 -2
- package/dist/sdk/spawn-core.js.map +1 -1
- package/package.json +7 -3
|
@@ -1420,7 +1420,12 @@ function defaultMachineIdentity() {
|
|
|
1420
1420
|
async function deriveEncryptionKey(getMachineIdentity, salt) {
|
|
1421
1421
|
const machineIdentity = await getMachineIdentity();
|
|
1422
1422
|
const secret = `${machineIdentity.hostname}:${machineIdentity.username}`;
|
|
1423
|
-
|
|
1423
|
+
const cacheKey = `${secret}:${salt}`;
|
|
1424
|
+
const cached = derivedKeyCache.get(cacheKey);
|
|
1425
|
+
if (cached) {
|
|
1426
|
+
return cached;
|
|
1427
|
+
}
|
|
1428
|
+
const keyPromise = new Promise((resolve, reject) => {
|
|
1424
1429
|
scrypt(secret, salt, ENCRYPTION_KEY_BYTES, (error, derivedKey) => {
|
|
1425
1430
|
if (error) {
|
|
1426
1431
|
reject(error);
|
|
@@ -1429,6 +1434,8 @@ async function deriveEncryptionKey(getMachineIdentity, salt) {
|
|
|
1429
1434
|
resolve(Buffer.from(derivedKey));
|
|
1430
1435
|
});
|
|
1431
1436
|
});
|
|
1437
|
+
derivedKeyCache.set(cacheKey, keyPromise);
|
|
1438
|
+
return keyPromise;
|
|
1432
1439
|
}
|
|
1433
1440
|
function parseEncryptedDocument(raw) {
|
|
1434
1441
|
try {
|
|
@@ -1460,10 +1467,11 @@ function isNotFoundError(error) {
|
|
|
1460
1467
|
error && typeof error === "object" && "code" in error && error.code === "ENOENT"
|
|
1461
1468
|
);
|
|
1462
1469
|
}
|
|
1463
|
-
var ENCRYPTION_ALGORITHM, ENCRYPTION_VERSION, ENCRYPTION_KEY_BYTES, ENCRYPTION_IV_BYTES, ENCRYPTION_AUTH_TAG_BYTES, ENCRYPTION_FILE_MODE, EncryptedFileStore;
|
|
1470
|
+
var derivedKeyCache, ENCRYPTION_ALGORITHM, ENCRYPTION_VERSION, ENCRYPTION_KEY_BYTES, ENCRYPTION_IV_BYTES, ENCRYPTION_AUTH_TAG_BYTES, ENCRYPTION_FILE_MODE, EncryptedFileStore;
|
|
1464
1471
|
var init_encrypted_file_store = __esm({
|
|
1465
1472
|
"packages/auth-store/src/encrypted-file-store.ts"() {
|
|
1466
1473
|
"use strict";
|
|
1474
|
+
derivedKeyCache = /* @__PURE__ */ new Map();
|
|
1467
1475
|
ENCRYPTION_ALGORITHM = "aes-256-gcm";
|
|
1468
1476
|
ENCRYPTION_VERSION = 1;
|
|
1469
1477
|
ENCRYPTION_KEY_BYTES = 32;
|