@tpsdev-ai/flair 0.38.0 → 0.39.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.
@@ -8,11 +8,11 @@
8
8
  * otherwise. That is wrong in both directions and was wrong in both directions
9
9
  * on the day it was replaced:
10
10
  *
11
- * - tps.dtrt.harperfabric.com runs Harper 5.1.26 and has NO secrets
11
+ * - tps.dtrt.harperfabric.com runs Harper 5.1.26 and has NO secrets
12
12
  * operations — measured, `set_secret` answers "Operation 'set_secret' not
13
13
  * found", identical to an operation that does not exist at all — and was
14
14
  * selected for the automated mechanism because of its name.
15
- * - a self-hosted Harper 5.2 with the Pro env-secrets component is fully
15
+ * - a self-hosted Harper 5.2 with the Pro env-secrets component is fully
16
16
  * capable and was sent down the manual Fabric Studio path because its
17
17
  * hostname did not match.
18
18
  *
@@ -116,9 +116,26 @@ export async function pushSecrets(opsUrl, authHeader, vars, publicKeyPem, deps =
116
116
  const results = [];
117
117
  for (const [name, value] of Object.entries(vars)) {
118
118
  try {
119
- const r = await opsCall(opsUrl, authHeader, { operation: "set_secret", name, envelope: sealSecret(value, publicKeyPem), tier: PROCESS_ENV_TIER }, fetchImpl);
119
+ const r = await opsCall(opsUrl, authHeader, { operation: "set_secret", name, envelope: sealSecret(value, publicKeyPem), processEnv: true }, fetchImpl);
120
120
  const err = String(r.json?.error ?? "").slice(0, 140);
121
- results.push({ name, ok: r.ok, detail: r.ok ? undefined : `HTTP ${r.status}${err ? `: ${err}` : ""}` });
121
+ if (!r.ok) {
122
+ results.push({ name, ok: false, detail: `HTTP ${r.status}${err ? `: ${err}` : ""}` });
123
+ continue;
124
+ }
125
+ // Read back one pushed row to verify processEnv actually materialised.
126
+ // A 200 from set_secret is not proof — core silently ignores unknown
127
+ // params, so the row can be accepted and still land inert.
128
+ const verify = await opsCall(opsUrl, authHeader, { operation: "search_by_value", database: "system", table: "hdb_secret", search_attribute: "name", search_value: name, get_attributes: ["name", "processEnv"] }, fetchImpl);
129
+ if (!verify.ok) {
130
+ results.push({ name, ok: false, detail: `push returned 200 but verify failed HTTP ${verify.status}` });
131
+ continue;
132
+ }
133
+ const row = Array.isArray(verify.json) ? verify.json[0] : verify.json?.[0];
134
+ if (!row || row.processEnv !== true) {
135
+ results.push({ name, ok: false, detail: `push returned 200 but read-back shows processEnv is ${row?.processEnv ?? "missing"}, not true — secret is inert` });
136
+ continue;
137
+ }
138
+ results.push({ name, ok: true });
122
139
  }
123
140
  catch (err) {
124
141
  results.push({ name, ok: false, detail: String(err?.message ?? err).slice(0, 140) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpsdev-ai/flair",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "packageManager": "bun@1.3.10",
5
5
  "description": "Identity, memory, and soul for AI agents. Cryptographic identity (Ed25519), semantic memory with local embeddings, and persistent personality — all in a single process.",
6
6
  "type": "module",