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/mcp-factories.js
CHANGED
|
@@ -4209,9 +4209,9 @@ var init_transport_probe = __esm(() => {
|
|
|
4209
4209
|
init_capability();
|
|
4210
4210
|
});
|
|
4211
4211
|
|
|
4212
|
-
// ../../packages/core/src/storage/vault-crypto.ts
|
|
4212
|
+
// ../../packages/core/src/storage/vault-crypto-core.ts
|
|
4213
4213
|
import { createCipheriv, createDecipheriv, createHash, randomBytes as randomBytes3 } from "crypto";
|
|
4214
|
-
function encryptionKey(masterKey
|
|
4214
|
+
function encryptionKey(masterKey) {
|
|
4215
4215
|
return createHash("sha256").update("otium-vault-value-v1\x00", "utf8").update(masterKey, "utf8").digest().subarray(0, KEY_BYTES);
|
|
4216
4216
|
}
|
|
4217
4217
|
function aad(userId, key) {
|
|
@@ -4220,7 +4220,7 @@ function aad(userId, key) {
|
|
|
4220
4220
|
function isEncryptedVaultValue(value2) {
|
|
4221
4221
|
return value2.startsWith(ENVELOPE_PREFIX);
|
|
4222
4222
|
}
|
|
4223
|
-
function
|
|
4223
|
+
function encryptVaultValueWithKey(userId, key, value2, masterKey) {
|
|
4224
4224
|
const iv = randomBytes3(IV_BYTES);
|
|
4225
4225
|
const cipher = createCipheriv("aes-256-gcm", encryptionKey(masterKey), iv);
|
|
4226
4226
|
cipher.setAAD(aad(userId, key));
|
|
@@ -4228,7 +4228,7 @@ function encryptVaultValue(userId, key, value2, masterKey = VAULT_MASTER_KEY) {
|
|
|
4228
4228
|
const tag = cipher.getAuthTag();
|
|
4229
4229
|
return `${ENVELOPE_PREFIX}${iv.toString("base64url")}.${ciphertext.toString("base64url")}.${tag.toString("base64url")}`;
|
|
4230
4230
|
}
|
|
4231
|
-
function
|
|
4231
|
+
function decryptVaultValueWithKey(userId, key, storedValue, masterKey) {
|
|
4232
4232
|
if (!isEncryptedVaultValue(storedValue)) {
|
|
4233
4233
|
return { value: storedValue, legacyPlaintext: true };
|
|
4234
4234
|
}
|
|
@@ -4250,8 +4250,18 @@ function decryptVaultValue(userId, key, storedValue, masterKey = VAULT_MASTER_KE
|
|
|
4250
4250
|
return { value: plaintext.toString("utf8"), legacyPlaintext: false };
|
|
4251
4251
|
}
|
|
4252
4252
|
var ENVELOPE_PREFIX = "otium-vault:v1:", IV_BYTES = 12, KEY_BYTES = 32;
|
|
4253
|
+
var init_vault_crypto_core = () => {};
|
|
4254
|
+
|
|
4255
|
+
// ../../packages/core/src/storage/vault-crypto.ts
|
|
4256
|
+
function encryptVaultValue(userId, key, value2, masterKey = VAULT_MASTER_KEY) {
|
|
4257
|
+
return encryptVaultValueWithKey(userId, key, value2, masterKey);
|
|
4258
|
+
}
|
|
4259
|
+
function decryptVaultValue(userId, key, storedValue, masterKey = VAULT_MASTER_KEY) {
|
|
4260
|
+
return decryptVaultValueWithKey(userId, key, storedValue, masterKey);
|
|
4261
|
+
}
|
|
4253
4262
|
var init_vault_crypto = __esm(() => {
|
|
4254
4263
|
init_config();
|
|
4264
|
+
init_vault_crypto_core();
|
|
4255
4265
|
});
|
|
4256
4266
|
|
|
4257
4267
|
// ../../packages/core/src/storage/vault.ts
|
|
@@ -7677,7 +7687,7 @@ var init_claude_provider = __esm(async () => {
|
|
|
7677
7687
|
});
|
|
7678
7688
|
|
|
7679
7689
|
// ../../packages/core/src/version.ts
|
|
7680
|
-
var NEGOTIUM_VERSION = "0.2.
|
|
7690
|
+
var NEGOTIUM_VERSION = "0.2.2";
|
|
7681
7691
|
|
|
7682
7692
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
7683
7693
|
import { spawn as spawn6 } from "child_process";
|
|
@@ -19322,4 +19332,4 @@ export {
|
|
|
19322
19332
|
createAgentHealthMcpServer
|
|
19323
19333
|
};
|
|
19324
19334
|
|
|
19325
|
-
//# debugId=
|
|
19335
|
+
//# debugId=37FBE4A6B405392964756E2164756E21
|