@seekrit/cli 1.7.0 → 1.7.1
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/index.js
CHANGED
|
@@ -2174,7 +2174,12 @@ z.object({
|
|
|
2174
2174
|
z.object({
|
|
2175
2175
|
groupId: z.string().min(1),
|
|
2176
2176
|
/** Precedence among an env's groups (higher wins). Appended if omitted. */
|
|
2177
|
-
position: z.number().int().min(0).optional()
|
|
2177
|
+
position: z.number().int().min(0).optional(),
|
|
2178
|
+
/** Client-wrapped group DEK for each sync connection newly reading this group. */
|
|
2179
|
+
syncGrants: z.array(z.object({
|
|
2180
|
+
connectionId: z.string().min(1),
|
|
2181
|
+
wrappedDek: z.string().min(1)
|
|
2182
|
+
})).optional()
|
|
2178
2183
|
});
|
|
2179
2184
|
z.object({
|
|
2180
2185
|
name: nameSchema,
|
|
@@ -5110,7 +5115,7 @@ async function createAgentTaskToken() {
|
|
|
5110
5115
|
}
|
|
5111
5116
|
//#endregion
|
|
5112
5117
|
//#region package.json
|
|
5113
|
-
var version = "1.7.
|
|
5118
|
+
var version = "1.7.1";
|
|
5114
5119
|
//#endregion
|
|
5115
5120
|
//#region ../../packages/api-client/src/index.ts
|
|
5116
5121
|
/**
|
|
@@ -7646,6 +7651,32 @@ function registerEnvDiff(env) {
|
|
|
7646
7651
|
});
|
|
7647
7652
|
}
|
|
7648
7653
|
//#endregion
|
|
7654
|
+
//#region src/group-sync-grants.ts
|
|
7655
|
+
/** Wrap a newly composed group layer for connections already syncing the app env or its branches. */
|
|
7656
|
+
async function syncGrantsForGroupLink(ctx, orgId, envId, envSlug, groupId) {
|
|
7657
|
+
const [{ groups }, { bindings }, { branches }] = await Promise.all([
|
|
7658
|
+
ctx.client.listEnvGroups(orgId, envId),
|
|
7659
|
+
ctx.client.listSyncBindings(orgId),
|
|
7660
|
+
ctx.client.listBranches(orgId, envId)
|
|
7661
|
+
]);
|
|
7662
|
+
if (groups.some((group) => group.groupId === groupId)) return void 0;
|
|
7663
|
+
const targets = /* @__PURE__ */ new Set([envId, ...branches.map((branch) => branch.id)]);
|
|
7664
|
+
const connectionIds = new Set(bindings.filter((binding) => targets.has(binding.environmentId)).map((b) => b.connectionId));
|
|
7665
|
+
if (connectionIds.size === 0) return void 0;
|
|
7666
|
+
const [{ environments }, { connections }] = await Promise.all([ctx.client.listGroupEnvs(orgId, groupId), ctx.client.listSyncConnections(orgId)]);
|
|
7667
|
+
const groupEnv = environments.find((entry) => entry.slug === envSlug);
|
|
7668
|
+
if (!groupEnv) fail(`create a ${envSlug} environment in this group before composing it`);
|
|
7669
|
+
const dek = await getDek(ctx, orgId, groupEnv.id);
|
|
7670
|
+
return Promise.all([...connectionIds].map(async (connectionId) => {
|
|
7671
|
+
const connection = connections.find((entry) => entry.id === connectionId);
|
|
7672
|
+
if (!connection) fail("a sync connection could not be found; refresh and retry");
|
|
7673
|
+
return {
|
|
7674
|
+
connectionId,
|
|
7675
|
+
wrappedDek: await wrapDek(dek, connection.publicKeyJwk)
|
|
7676
|
+
};
|
|
7677
|
+
}));
|
|
7678
|
+
}
|
|
7679
|
+
//#endregion
|
|
7649
7680
|
//#region src/kms.ts
|
|
7650
7681
|
/** Collect a repeatable option into a list. */
|
|
7651
7682
|
function collect$8(value, acc = []) {
|
|
@@ -8308,9 +8339,11 @@ function registerAppCommands(program) {
|
|
|
8308
8339
|
org: options.org,
|
|
8309
8340
|
group: options.group
|
|
8310
8341
|
});
|
|
8342
|
+
const syncGrants = await syncGrantsForGroupLink(ctx, target.orgId, target.envId, target.envSlug, group.id);
|
|
8311
8343
|
await ctx.client.linkEnvGroup(target.orgId, target.envId, {
|
|
8312
8344
|
groupId: group.id,
|
|
8313
|
-
position: options.position === void 0 ? void 0 : Number.parseInt(options.position, 10)
|
|
8345
|
+
position: options.position === void 0 ? void 0 : Number.parseInt(options.position, 10),
|
|
8346
|
+
syncGrants
|
|
8314
8347
|
});
|
|
8315
8348
|
console.error(`composed ${group.slug} into ${target.appSlug}/${target.envSlug}`);
|
|
8316
8349
|
});
|
|
@@ -11848,7 +11881,7 @@ function collect$4(value, acc) {
|
|
|
11848
11881
|
* release-please-config.json), so the pin follows the crate without anyone
|
|
11849
11882
|
* remembering to move it.
|
|
11850
11883
|
*/
|
|
11851
|
-
const PROXY_VERSION = "0.12.
|
|
11884
|
+
const PROXY_VERSION = "0.12.2";
|
|
11852
11885
|
const BIN = "seekrit-proxy";
|
|
11853
11886
|
/**
|
|
11854
11887
|
* Host → Rust target triple.
|
|
@@ -11884,7 +11917,7 @@ function versionPrefix(version) {
|
|
|
11884
11917
|
return version.startsWith("v") ? version : `v${version}`;
|
|
11885
11918
|
}
|
|
11886
11919
|
function resolveVersion(explicit) {
|
|
11887
|
-
return explicit ?? process.env.SEEKRIT_PROXY_VERSION ?? "0.12.
|
|
11920
|
+
return explicit ?? process.env.SEEKRIT_PROXY_VERSION ?? "0.12.2";
|
|
11888
11921
|
}
|
|
11889
11922
|
function resolveBaseUrl(explicit) {
|
|
11890
11923
|
return (explicit ?? process.env.SEEKRIT_PROXY_BASE_URL ?? "https://proxy.seekrit.dev").replace(/\/+$/, "");
|
|
@@ -12042,7 +12075,7 @@ const PLUGIN_BIN = "seekrit-nomad-secrets";
|
|
|
12042
12075
|
* entry in release-please-config.json), so the pin follows the crate without
|
|
12043
12076
|
* anyone remembering to move it — the same arrangement `PROXY_VERSION` has.
|
|
12044
12077
|
*/
|
|
12045
|
-
const NOMAD_PLUGIN_VERSION = "0.2.
|
|
12078
|
+
const NOMAD_PLUGIN_VERSION = "0.2.1";
|
|
12046
12079
|
/** Public artifact host. Mirrors GitHub Releases; public, no egress fees. */
|
|
12047
12080
|
const DEFAULT_BASE_URL = "https://nomad.seekrit.dev";
|
|
12048
12081
|
/** Where the plugin reads its node config, matching `config::DEFAULT_CONFIG_PATH`. */
|
|
@@ -12129,7 +12162,7 @@ async function fetchBytes(url) {
|
|
|
12129
12162
|
* let Nomad fingerprint a half-written executable.
|
|
12130
12163
|
*/
|
|
12131
12164
|
async function installPlugin(pluginDir, options = {}) {
|
|
12132
|
-
const version = options.version ?? "0.2.
|
|
12165
|
+
const version = options.version ?? "0.2.1";
|
|
12133
12166
|
const baseUrl = (options.baseUrl ?? "https://nomad.seekrit.dev").replace(/\/+$/, "");
|
|
12134
12167
|
const { target, exe } = detectTarget();
|
|
12135
12168
|
if (exe !== "") fail("Nomad secret provider plugins are not supported on Windows clients");
|
|
@@ -13834,10 +13867,10 @@ Next:
|
|
|
13834
13867
|
});
|
|
13835
13868
|
console.log(path);
|
|
13836
13869
|
const { target } = detectTarget();
|
|
13837
|
-
process.stderr.write(`seekrit-proxy ${versionPrefix(options.proxyVersion ?? "0.12.
|
|
13870
|
+
process.stderr.write(`seekrit-proxy ${versionPrefix(options.proxyVersion ?? "0.12.2")} (${target})\n`);
|
|
13838
13871
|
});
|
|
13839
13872
|
proxy.command("where").description("show which binary `seekrit proxy run` would use, without fetching it").option("--proxy-version <version>", `version to report (default: ${PROXY_VERSION})`).option("--json", "machine-readable output").action((options) => {
|
|
13840
|
-
const version = options.proxyVersion ?? process.env.SEEKRIT_PROXY_VERSION ?? "0.12.
|
|
13873
|
+
const version = options.proxyVersion ?? process.env.SEEKRIT_PROXY_VERSION ?? "0.12.2";
|
|
13841
13874
|
const override = process.env.SEEKRIT_PROXY_BIN;
|
|
13842
13875
|
const { target, exe } = detectTarget();
|
|
13843
13876
|
const path = override ?? proxyBinaryPath(version, target, exe);
|
|
@@ -13896,7 +13929,7 @@ Next:
|
|
|
13896
13929
|
process.stdout.write(renderComposeSnippet(plan, {
|
|
13897
13930
|
service: options.service,
|
|
13898
13931
|
workload: options.workload,
|
|
13899
|
-
image: options.image ?? `seekritdev/proxy:0.12.
|
|
13932
|
+
image: options.image ?? `seekritdev/proxy:0.12.2`,
|
|
13900
13933
|
publish: Boolean(options.publish)
|
|
13901
13934
|
}));
|
|
13902
13935
|
});
|
|
@@ -15796,7 +15829,7 @@ registerKmsCommands(program);
|
|
|
15796
15829
|
registerRotationCommands(program);
|
|
15797
15830
|
registerRecoveryCommands(program);
|
|
15798
15831
|
program.command("mcp").description("run an MCP server over stdio so AI agents can drive seekrit").action(async () => {
|
|
15799
|
-
const { runMcpServer } = await import("./mcp-
|
|
15832
|
+
const { runMcpServer } = await import("./mcp-ZYu1Q6Ft.js");
|
|
15800
15833
|
await runMcpServer();
|
|
15801
15834
|
});
|
|
15802
15835
|
registerAuditCommands(program);
|
|
@@ -15811,4 +15844,4 @@ program.parseAsync(argv).catch((err) => {
|
|
|
15811
15844
|
fail(describeError(err));
|
|
15812
15845
|
});
|
|
15813
15846
|
//#endregion
|
|
15814
|
-
export {
|
|
15847
|
+
export { signatureKeyRef as A, generateDek as B, createServiceToken as C, importSigningKey as D, generateSigningKeyMaterial as E, generateEncryptKeyMaterial as F, parseBranchTtl as H, kmsBlobKeyRef as I, kmsDecrypt as L, generatePostgresCredential as M, generateMysqlCredential as N, importVerifyingKey as O, generateDataKey as P, kmsEncrypt as R, version as S, parseServiceToken as T, toBase64 as V, getDek as _, kmsResolveRecipient as a, setFailThrows as b, fetchDecryptedSecrets as c, resolveApp as d, resolveAppEnv as f, resolveOrg as g, resolveGroup as h, kmsResolveKey as i, verifyMessage as j, signMessage as k, fetchDecryptedVersion as l, resolveEnvTarget as m, kmsCallerIdentity as n, syncGrantsForGroupLink as o, resolveBranch as p, kmsRecoverMaterial as r, encryptAndSetSecret as s, ensureM2mAdminToken as t, materializeEnv as u, isTokenAuth as v, isServiceToken as w, writeProjectConfig as x, tryBuildContext as y, wrapDek as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as signatureKeyRef, B as generateDek, C as createServiceToken, D as importSigningKey, E as generateSigningKeyMaterial, F as generateEncryptKeyMaterial, H as parseBranchTtl, I as kmsBlobKeyRef, L as kmsDecrypt, M as generatePostgresCredential, N as generateMysqlCredential, O as importVerifyingKey, P as generateDataKey, R as kmsEncrypt, S as version, T as parseServiceToken, V as toBase64, _ as getDek, a as kmsResolveRecipient, b as setFailThrows, c as fetchDecryptedSecrets, d as resolveApp, f as resolveAppEnv, g as resolveOrg, h as resolveGroup, i as kmsResolveKey, j as verifyMessage, k as signMessage, l as fetchDecryptedVersion, m as resolveEnvTarget, n as kmsCallerIdentity, o as syncGrantsForGroupLink, p as resolveBranch, r as kmsRecoverMaterial, s as encryptAndSetSecret, t as ensureM2mAdminToken, u as materializeEnv, v as isTokenAuth, w as isServiceToken, x as writeProjectConfig, y as tryBuildContext, z as wrapDek } from "./index.js";
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -621,9 +621,11 @@ async function runMcpServer(options = {}) {
|
|
|
621
621
|
org,
|
|
622
622
|
group
|
|
623
623
|
});
|
|
624
|
+
const syncGrants = await syncGrantsForGroupLink(ctx, target.orgId, target.envId, target.envSlug, g.id);
|
|
624
625
|
return (await ctx.client.linkEnvGroup(target.orgId, target.envId, {
|
|
625
626
|
groupId: g.id,
|
|
626
|
-
position
|
|
627
|
+
position,
|
|
628
|
+
syncGrants
|
|
627
629
|
})).group;
|
|
628
630
|
});
|
|
629
631
|
tool("uncompose_group", "Remove a composed group from an application environment.", { idempotent: true }, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seekrit/cli",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "End-to-end encrypted secrets manager CLI — inject decrypted secrets into any command.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
26
26
|
"commander": "^15.0.0",
|
|
27
|
-
"zod": "^4.6.
|
|
27
|
+
"zod": "^4.6.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/node": "^26.
|
|
30
|
+
"@types/node": "^26.6.1",
|
|
31
31
|
"tsdown": "^0.23.0",
|
|
32
|
-
"vitest": "^
|
|
32
|
+
"vitest": "^5.0.1",
|
|
33
33
|
"@seekrit/api-client": "0.0.1",
|
|
34
34
|
"@seekrit/core": "0.0.1",
|
|
35
35
|
"@seekrit/crypto": "0.0.1"
|