negotium 0.2.0 → 0.2.2
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/dist/agent-helpers.js +16 -6
- package/dist/agent-helpers.js.map +6 -5
- package/dist/browser-runtime.js +13 -5
- package/dist/browser-runtime.js.map +5 -4
- package/dist/hosted-agent.js +14 -6
- package/dist/hosted-agent.js.map +6 -5
- package/dist/main.js +185 -31
- package/dist/main.js.map +7 -6
- package/dist/mcp-factories.js +16 -6
- package/dist/mcp-factories.js.map +6 -5
- package/dist/runtime/cron/mcp-server.ts +1 -1
- package/dist/runtime/src/migration/single-user.ts +213 -29
- package/dist/runtime/src/storage/vault-crypto-core.ts +65 -0
- package/dist/runtime/src/storage/vault-crypto.ts +8 -48
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/storage/vault-crypto-core.d.ts +6 -0
- package/dist/types/packages/core/src/storage/vault-crypto.d.ts +2 -1
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/dist/vault.js +13 -5
- package/dist/vault.js.map +5 -4
- package/package.json +1 -1
package/dist/agent-helpers.js
CHANGED
|
@@ -2972,9 +2972,9 @@ var init_mcp_config = __esm(() => {
|
|
|
2972
2972
|
nodeMcpEntries = [];
|
|
2973
2973
|
});
|
|
2974
2974
|
|
|
2975
|
-
// ../../packages/core/src/storage/vault-crypto.ts
|
|
2975
|
+
// ../../packages/core/src/storage/vault-crypto-core.ts
|
|
2976
2976
|
import { createCipheriv, createDecipheriv, createHash, randomBytes as randomBytes4 } from "crypto";
|
|
2977
|
-
function encryptionKey(masterKey
|
|
2977
|
+
function encryptionKey(masterKey) {
|
|
2978
2978
|
return createHash("sha256").update("otium-vault-value-v1\x00", "utf8").update(masterKey, "utf8").digest().subarray(0, KEY_BYTES);
|
|
2979
2979
|
}
|
|
2980
2980
|
function aad(userId, key) {
|
|
@@ -2983,7 +2983,7 @@ function aad(userId, key) {
|
|
|
2983
2983
|
function isEncryptedVaultValue(value) {
|
|
2984
2984
|
return value.startsWith(ENVELOPE_PREFIX);
|
|
2985
2985
|
}
|
|
2986
|
-
function
|
|
2986
|
+
function encryptVaultValueWithKey(userId, key, value, masterKey) {
|
|
2987
2987
|
const iv = randomBytes4(IV_BYTES);
|
|
2988
2988
|
const cipher = createCipheriv("aes-256-gcm", encryptionKey(masterKey), iv);
|
|
2989
2989
|
cipher.setAAD(aad(userId, key));
|
|
@@ -2991,7 +2991,7 @@ function encryptVaultValue(userId, key, value, masterKey = VAULT_MASTER_KEY) {
|
|
|
2991
2991
|
const tag = cipher.getAuthTag();
|
|
2992
2992
|
return `${ENVELOPE_PREFIX}${iv.toString("base64url")}.${ciphertext.toString("base64url")}.${tag.toString("base64url")}`;
|
|
2993
2993
|
}
|
|
2994
|
-
function
|
|
2994
|
+
function decryptVaultValueWithKey(userId, key, storedValue, masterKey) {
|
|
2995
2995
|
if (!isEncryptedVaultValue(storedValue)) {
|
|
2996
2996
|
return { value: storedValue, legacyPlaintext: true };
|
|
2997
2997
|
}
|
|
@@ -3013,8 +3013,18 @@ function decryptVaultValue(userId, key, storedValue, masterKey = VAULT_MASTER_KE
|
|
|
3013
3013
|
return { value: plaintext.toString("utf8"), legacyPlaintext: false };
|
|
3014
3014
|
}
|
|
3015
3015
|
var ENVELOPE_PREFIX = "otium-vault:v1:", IV_BYTES = 12, KEY_BYTES = 32;
|
|
3016
|
+
var init_vault_crypto_core = () => {};
|
|
3017
|
+
|
|
3018
|
+
// ../../packages/core/src/storage/vault-crypto.ts
|
|
3019
|
+
function encryptVaultValue(userId, key, value, masterKey = VAULT_MASTER_KEY) {
|
|
3020
|
+
return encryptVaultValueWithKey(userId, key, value, masterKey);
|
|
3021
|
+
}
|
|
3022
|
+
function decryptVaultValue(userId, key, storedValue, masterKey = VAULT_MASTER_KEY) {
|
|
3023
|
+
return decryptVaultValueWithKey(userId, key, storedValue, masterKey);
|
|
3024
|
+
}
|
|
3016
3025
|
var init_vault_crypto = __esm(() => {
|
|
3017
3026
|
init_config();
|
|
3027
|
+
init_vault_crypto_core();
|
|
3018
3028
|
});
|
|
3019
3029
|
|
|
3020
3030
|
// ../../packages/core/src/storage/vault.ts
|
|
@@ -3775,7 +3785,7 @@ var init_claude_provider = __esm(async () => {
|
|
|
3775
3785
|
});
|
|
3776
3786
|
|
|
3777
3787
|
// ../../packages/core/src/version.ts
|
|
3778
|
-
var NEGOTIUM_VERSION = "0.2.
|
|
3788
|
+
var NEGOTIUM_VERSION = "0.2.2";
|
|
3779
3789
|
|
|
3780
3790
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
3781
3791
|
import { spawn as spawn3 } from "child_process";
|
|
@@ -17967,4 +17977,4 @@ export {
|
|
|
17967
17977
|
DEFAULT_SELF_CONFIG_PRODUCT
|
|
17968
17978
|
};
|
|
17969
17979
|
|
|
17970
|
-
//# debugId=
|
|
17980
|
+
//# debugId=B714AC03F638E5C364756E2164756E21
|