@signetai/core 0.226.9 → 0.226.14
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 +1328 -1799
- package/dist/llm-model-catalog.js +11 -9
- package/dist/migrations/154-transcript-capture-source-identity.d.ts +3 -0
- package/dist/migrations/154-transcript-capture-source-identity.d.ts.map +1 -0
- package/dist/migrations/155-source-sync-failures.d.ts +4 -0
- package/dist/migrations/155-source-sync-failures.d.ts.map +1 -0
- package/dist/migrations/156-embedding-repair-checkpoints.d.ts +10 -0
- package/dist/migrations/156-embedding-repair-checkpoints.d.ts.map +1 -0
- package/dist/migrations/157-embedding-repair-progress.d.ts +8 -0
- package/dist/migrations/157-embedding-repair-progress.d.ts.map +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/pipeline-providers.js +15 -13
- package/dist/recall.js +17 -15
- package/dist/secrets-keyring-child.d.ts +2 -0
- package/dist/secrets-keyring-child.d.ts.map +1 -0
- package/dist/secrets-keyring-child.js +209 -0
- package/dist/secrets-keyring.d.ts +9 -3
- package/dist/secrets-keyring.d.ts.map +1 -1
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/keyring.linux-x64-gnu-0wbgnj90.node +0 -0
- package/dist/keyring.linux-x64-musl-gxd42x54.node +0 -0
|
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
if (canCache)
|
|
29
31
|
cache.set(mod, to);
|
|
30
32
|
return to;
|
|
@@ -130,8 +132,8 @@ function modelDefaultForProvider(provider) {
|
|
|
130
132
|
return MODEL_DEFAULTS[provider];
|
|
131
133
|
}
|
|
132
134
|
export {
|
|
133
|
-
|
|
134
|
-
modelDefaultForProvider,
|
|
135
|
+
MODEL_DEFAULTS,
|
|
135
136
|
PIPELINE_MODEL_CATALOG,
|
|
136
|
-
|
|
137
|
+
modelDefaultForProvider,
|
|
138
|
+
modelPresetsForProvider
|
|
137
139
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"154-transcript-capture-source-identity.d.ts","sourceRoot":"","sources":["../../src/migrations/154-transcript-capture-source-identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAQ9C,wBAAgB,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAsBxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"155-source-sync-failures.d.ts","sourceRoot":"","sources":["../../src/migrations/155-source-sync-failures.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,wBAAgB,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAsBxC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MigrationDb } from "./contract";
|
|
2
|
+
/**
|
|
3
|
+
* Durable operation state for bounded, resumable embedding repairs.
|
|
4
|
+
*
|
|
5
|
+
* The embedding repair lease serializes provider work; this table keeps the
|
|
6
|
+
* caller-visible operation state across daemon restarts so a full sweep can
|
|
7
|
+
* resume without replaying an unbounded request.
|
|
8
|
+
*/
|
|
9
|
+
export declare function up(db: MigrationDb): void;
|
|
10
|
+
//# sourceMappingURL=156-embedding-repair-checkpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"156-embedding-repair-checkpoints.d.ts","sourceRoot":"","sources":["../../src/migrations/156-embedding-repair-checkpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAoBxC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MigrationDb } from "./contract";
|
|
2
|
+
/**
|
|
3
|
+
* Splits agent-visible repair progress from the singleton provider admission
|
|
4
|
+
* budget. The lease and hourly window remain global, while completion
|
|
5
|
+
* diagnostics are keyed by the agent whose memories were repaired.
|
|
6
|
+
*/
|
|
7
|
+
export declare function up(db: MigrationDb): void;
|
|
8
|
+
//# sourceMappingURL=157-embedding-repair-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"157-embedding-repair-progress.d.ts","sourceRoot":"","sources":["../../src/migrations/157-embedding-repair-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAmBxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAsB,WAAW,EAAE,MAAM,YAAY,CAAC;AA4J7E,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7E,oEAAoE;AACpE,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EAqwC1C,CAAC;AA6MF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAiB7D;AAED,6CAA6C;AAC7C,eAAO,MAAM,qBAAqB,QAAkD,CAAC;AAsBrF;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAiDnD"}
|
|
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
if (canCache)
|
|
29
31
|
cache.set(mod, to);
|
|
30
32
|
return to;
|
|
@@ -160,12 +162,12 @@ function defaultPipelineModel(provider) {
|
|
|
160
162
|
return modelDefaultForProvider(provider);
|
|
161
163
|
}
|
|
162
164
|
export {
|
|
163
|
-
|
|
164
|
-
isPipelineProvider,
|
|
165
|
-
defaultPipelineModel,
|
|
166
|
-
SYNTHESIS_PROVIDER_CHOICES,
|
|
167
|
-
PIPELINE_PROVIDER_CHOICES,
|
|
168
|
-
OPENCODE_PIPELINE_SYSTEM_PROMPT,
|
|
165
|
+
DEFAULT_PIPELINE_TIMEOUT_MS,
|
|
169
166
|
OPENCODE_PIPELINE_AGENT,
|
|
170
|
-
|
|
167
|
+
OPENCODE_PIPELINE_SYSTEM_PROMPT,
|
|
168
|
+
PIPELINE_PROVIDER_CHOICES,
|
|
169
|
+
SYNTHESIS_PROVIDER_CHOICES,
|
|
170
|
+
defaultPipelineModel,
|
|
171
|
+
isPipelineProvider,
|
|
172
|
+
isSynthesisProvider
|
|
171
173
|
};
|
package/dist/recall.js
CHANGED
|
@@ -19,12 +19,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
28
30
|
if (canCache)
|
|
29
31
|
cache.set(mod, to);
|
|
30
32
|
return to;
|
|
@@ -322,14 +324,14 @@ function emptyHookRecallResponse(query, extras) {
|
|
|
322
324
|
};
|
|
323
325
|
}
|
|
324
326
|
export {
|
|
325
|
-
|
|
326
|
-
partitionRecallRows,
|
|
327
|
-
parseRecallPayload,
|
|
328
|
-
parseRecallMeta,
|
|
329
|
-
normalizeStructuredMemoryPayload,
|
|
330
|
-
formatRecallText,
|
|
331
|
-
emptyHookRecallResponse,
|
|
332
|
-
buildRememberRequestBody,
|
|
327
|
+
applyRecallScoreThreshold,
|
|
333
328
|
buildRecallRequestBody,
|
|
334
|
-
|
|
329
|
+
buildRememberRequestBody,
|
|
330
|
+
emptyHookRecallResponse,
|
|
331
|
+
formatRecallText,
|
|
332
|
+
normalizeStructuredMemoryPayload,
|
|
333
|
+
parseRecallMeta,
|
|
334
|
+
parseRecallPayload,
|
|
335
|
+
partitionRecallRows,
|
|
336
|
+
withHookRecallCompat
|
|
335
337
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets-keyring-child.d.ts","sourceRoot":"","sources":["../src/secrets-keyring-child.ts"],"names":[],"mappings":"AA0FA,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAO3D"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
12
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
20
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (canCache)
|
|
31
|
+
cache.set(mod, to);
|
|
32
|
+
return to;
|
|
33
|
+
};
|
|
34
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
35
|
+
var __returnValue = (v) => v;
|
|
36
|
+
function __exportSetter(name, newValue) {
|
|
37
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
38
|
+
}
|
|
39
|
+
var __export = (target, all) => {
|
|
40
|
+
for (var name in all)
|
|
41
|
+
__defProp(target, name, {
|
|
42
|
+
get: all[name],
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
set: __exportSetter.bind(all, name)
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
49
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
50
|
+
|
|
51
|
+
// src/secrets-keyring-child.ts
|
|
52
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
53
|
+
|
|
54
|
+
// src/child-process.ts
|
|
55
|
+
import {
|
|
56
|
+
execFile as nodeExecFile,
|
|
57
|
+
execFileSync as nodeExecFileSync,
|
|
58
|
+
execSync as nodeExecSync,
|
|
59
|
+
spawn as nodeSpawn,
|
|
60
|
+
spawnSync as nodeSpawnSync
|
|
61
|
+
} from "node:child_process";
|
|
62
|
+
import { promisify } from "node:util";
|
|
63
|
+
function withWindowsHide(options) {
|
|
64
|
+
return {
|
|
65
|
+
...options ?? {},
|
|
66
|
+
windowsHide: options?.windowsHide ?? true
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function isOptions(value) {
|
|
70
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
71
|
+
}
|
|
72
|
+
function withWindowsHideArgument(args, firstOptionIndex) {
|
|
73
|
+
const normalized = [...args];
|
|
74
|
+
const optionIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && isOptions(value));
|
|
75
|
+
if (optionIndex >= 0) {
|
|
76
|
+
normalized[optionIndex] = withWindowsHide(normalized[optionIndex]);
|
|
77
|
+
return normalized;
|
|
78
|
+
}
|
|
79
|
+
const placeholderIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && (value === undefined || value === null));
|
|
80
|
+
if (placeholderIndex >= 0) {
|
|
81
|
+
normalized[placeholderIndex] = withWindowsHide(undefined);
|
|
82
|
+
return normalized;
|
|
83
|
+
}
|
|
84
|
+
const callbackIndex = normalized.findIndex((value, index) => index >= firstOptionIndex && typeof value === "function");
|
|
85
|
+
normalized.splice(callbackIndex >= 0 ? callbackIndex : normalized.length, 0, { windowsHide: true });
|
|
86
|
+
return normalized;
|
|
87
|
+
}
|
|
88
|
+
function withSpawnDefaults(options) {
|
|
89
|
+
if (options?.shell !== undefined && options.shell !== false) {
|
|
90
|
+
throw new TypeError("spawnHidden does not allow shell execution");
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
...withWindowsHide(options),
|
|
94
|
+
shell: false
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
var spawnHidden = (command, argsOrOptions, options) => {
|
|
98
|
+
if (Array.isArray(argsOrOptions))
|
|
99
|
+
return nodeSpawn(command, argsOrOptions, withSpawnDefaults(options));
|
|
100
|
+
return nodeSpawn(command, withSpawnDefaults(options ?? argsOrOptions));
|
|
101
|
+
};
|
|
102
|
+
var spawnSyncHidden = (command, argsOrOptions, options) => {
|
|
103
|
+
if (Array.isArray(argsOrOptions))
|
|
104
|
+
return nodeSpawnSync(command, argsOrOptions, withSpawnDefaults(options));
|
|
105
|
+
return nodeSpawnSync(command, withSpawnDefaults(options ?? argsOrOptions));
|
|
106
|
+
};
|
|
107
|
+
var nodeExecFileAsync = promisify(nodeExecFile);
|
|
108
|
+
var execFileHiddenImpl = (...args) => Reflect.apply(nodeExecFile, undefined, withWindowsHideArgument(args, 1));
|
|
109
|
+
Object.defineProperty(execFileHiddenImpl, promisify.custom, {
|
|
110
|
+
value: (...args) => Reflect.apply(nodeExecFileAsync, undefined, withWindowsHideArgument(args, 1))
|
|
111
|
+
});
|
|
112
|
+
var execFileHidden = execFileHiddenImpl;
|
|
113
|
+
var execSyncHidden = (...args) => Reflect.apply(nodeExecSync, undefined, withWindowsHideArgument(args, 1));
|
|
114
|
+
var execFileSyncHidden = (...args) => Reflect.apply(nodeExecFileSync, undefined, withWindowsHideArgument(args, 1));
|
|
115
|
+
|
|
116
|
+
// src/secrets-keyring-child.ts
|
|
117
|
+
var MAX_REQUEST_BYTES = 64 * 1024;
|
|
118
|
+
var require2 = createRequire2(import.meta.url);
|
|
119
|
+
function safeError(error) {
|
|
120
|
+
return (error instanceof Error ? error.message : String(error)).replace(/[\r\n\0]/g, " ").slice(0, 500);
|
|
121
|
+
}
|
|
122
|
+
function classify(error) {
|
|
123
|
+
const detail = safeError(error).toLowerCase();
|
|
124
|
+
if (/noentry|no entry|no such item|item.*not found|credential.*missing|does not exist/.test(detail))
|
|
125
|
+
return "missing";
|
|
126
|
+
if (/locked|interaction|required|authfailed|authentication|islocked|prompt/.test(detail))
|
|
127
|
+
return "locked";
|
|
128
|
+
if (/permission|access denied|denied/.test(detail))
|
|
129
|
+
return "permission-denied";
|
|
130
|
+
if (/unsupported|not implemented|dbus|secret service|keyutils|connection|unavailable|no such file/.test(detail))
|
|
131
|
+
return "unavailable";
|
|
132
|
+
return "corrupt";
|
|
133
|
+
}
|
|
134
|
+
function loadModule() {
|
|
135
|
+
const override = process.env.SIGNET_KEYRING_NATIVE_MODULE_PATH?.trim();
|
|
136
|
+
if (override !== undefined && override.length > 0) {
|
|
137
|
+
const absolute = override.startsWith("/") || /^\\\\[^\\]+\\[^\\]+/.test(override) || /^[A-Za-z]:[\\/]/.test(override);
|
|
138
|
+
if (!absolute)
|
|
139
|
+
throw new Error("Native keyring module path must be absolute");
|
|
140
|
+
return require2(override);
|
|
141
|
+
}
|
|
142
|
+
return require2("@napi-rs/keyring");
|
|
143
|
+
}
|
|
144
|
+
function linuxAvailability() {
|
|
145
|
+
if (process.platform !== "linux")
|
|
146
|
+
return null;
|
|
147
|
+
if (process.env.SIGNET_SECRETS_LINUX_KEYRING === "keyutils")
|
|
148
|
+
return { state: "unsupported", message: "Linux keyutils is not an implicit Signet secrets backend" };
|
|
149
|
+
if (!process.env.DBUS_SESSION_BUS_ADDRESS)
|
|
150
|
+
return { state: "unavailable", message: "Linux Secret Service requires a user D-Bus session" };
|
|
151
|
+
try {
|
|
152
|
+
execFileSyncHidden("busctl", ["--user", "status", "org.freedesktop.secrets"], {
|
|
153
|
+
stdio: "ignore",
|
|
154
|
+
timeout: 1000
|
|
155
|
+
});
|
|
156
|
+
return null;
|
|
157
|
+
} catch {
|
|
158
|
+
return { state: "unavailable", message: "Linux Secret Service is not registered on the user D-Bus session" };
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function parseRequest(raw) {
|
|
162
|
+
const value = JSON.parse(raw);
|
|
163
|
+
if (value.op !== "get" && value.op !== "set" && value.op !== "status")
|
|
164
|
+
throw new Error("Invalid keyring operation");
|
|
165
|
+
if (typeof value.service !== "string" || value.service.length === 0 || value.service.length > 512)
|
|
166
|
+
throw new Error("Invalid keyring service");
|
|
167
|
+
if (typeof value.account !== "string" || value.account.length === 0 || value.account.length > 512)
|
|
168
|
+
throw new Error("Invalid keyring account");
|
|
169
|
+
if (value.op === "set" && (typeof value.value !== "string" || value.value.length > 16 * 1024))
|
|
170
|
+
throw new Error("Invalid keyring value");
|
|
171
|
+
return value;
|
|
172
|
+
}
|
|
173
|
+
async function readRequest() {
|
|
174
|
+
let raw = "";
|
|
175
|
+
for await (const chunk of process.stdin) {
|
|
176
|
+
raw += String(chunk);
|
|
177
|
+
if (Buffer.byteLength(raw, "utf8") > MAX_REQUEST_BYTES)
|
|
178
|
+
throw new Error("Keyring request exceeds its limit");
|
|
179
|
+
}
|
|
180
|
+
return parseRequest(raw.trim());
|
|
181
|
+
}
|
|
182
|
+
async function execute(request) {
|
|
183
|
+
const unavailable = linuxAvailability();
|
|
184
|
+
if (unavailable !== null)
|
|
185
|
+
return unavailable;
|
|
186
|
+
const module = loadModule();
|
|
187
|
+
const entry = new module.AsyncEntry(request.service, request.account);
|
|
188
|
+
if (request.op === "set") {
|
|
189
|
+
await entry.setPassword(request.value ?? "");
|
|
190
|
+
return { state: "found", value: request.value ?? "" };
|
|
191
|
+
}
|
|
192
|
+
const value = await entry.getPassword();
|
|
193
|
+
return value === undefined || value === null || value.length === 0 ? { state: "missing" } : { state: "found", value };
|
|
194
|
+
}
|
|
195
|
+
async function runSecretKeyringChild() {
|
|
196
|
+
try {
|
|
197
|
+
const result = await execute(await readRequest());
|
|
198
|
+
process.stdout.write(`${JSON.stringify({ ok: true, result })}
|
|
199
|
+
`);
|
|
200
|
+
} catch (error) {
|
|
201
|
+
process.stdout.write(`${JSON.stringify({ ok: false, state: classify(error), message: safeError(error) })}
|
|
202
|
+
`);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (__require.main == __require.module)
|
|
206
|
+
await runSecretKeyringChild();
|
|
207
|
+
export {
|
|
208
|
+
runSecretKeyringChild
|
|
209
|
+
};
|
|
@@ -8,11 +8,17 @@ export interface SecretKeyringAdapter {
|
|
|
8
8
|
readonly platform: string;
|
|
9
9
|
readonly service: string;
|
|
10
10
|
readonly account: string;
|
|
11
|
-
get()
|
|
12
|
-
set(value: string)
|
|
13
|
-
getStatus
|
|
11
|
+
readonly get: () => Promise<SecretKeyringResult>;
|
|
12
|
+
readonly set: (value: string) => Promise<SecretKeyringResult>;
|
|
13
|
+
readonly getStatus?: () => Promise<SecretKeyringResult>;
|
|
14
|
+
}
|
|
15
|
+
interface SecretKeyringHelperOverride {
|
|
16
|
+
readonly entryPath: string;
|
|
17
|
+
readonly deadlineMs: number;
|
|
14
18
|
}
|
|
15
19
|
export declare function getSecretKeyring(workspace: string): SecretKeyringAdapter;
|
|
16
20
|
export declare function setSecretKeyringForTests(adapter: SecretKeyringAdapter | null): void;
|
|
21
|
+
export declare function setSecretKeyringHelperForTests(override: SecretKeyringHelperOverride | null): void;
|
|
17
22
|
export declare function resetSecretKeyringModuleForTests(): void;
|
|
23
|
+
export {};
|
|
18
24
|
//# sourceMappingURL=secrets-keyring.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets-keyring.d.ts","sourceRoot":"","sources":["../src/secrets-keyring.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secrets-keyring.d.ts","sourceRoot":"","sources":["../src/secrets-keyring.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,kBAAkB,GAC3B,OAAO,GACP,SAAS,GACT,QAAQ,GACR,aAAa,GACb,mBAAmB,GACnB,SAAS,GACT,aAAa,CAAC;AAEjB,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACjD,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC9D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACxD;AAED,UAAU,2BAA2B;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B;AAqKD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,CAExE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI,CAEnF;AAED,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,2BAA2B,GAAG,IAAI,GAAG,IAAI,CAEjG;AAED,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD"}
|
package/dist/secrets.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ export declare function listLocalSecretNames(options?: {
|
|
|
82
82
|
export declare function deleteLocalSecret(name: string): Promise<boolean>;
|
|
83
83
|
export type LocalSecretProviderV1 = SecretProviderV1;
|
|
84
84
|
export declare const localSecretProvider: LocalSecretProviderV1;
|
|
85
|
-
export declare function getLocalSecretProviderHealth(): SecretProviderHealthV1
|
|
85
|
+
export declare function getLocalSecretProviderHealth(): Promise<SecretProviderHealthV1>;
|
|
86
86
|
/**
|
|
87
87
|
* Spawn a subprocess with one or more secrets injected as environment
|
|
88
88
|
* variables. The agent only supplies references (env var names), never
|
package/dist/secrets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsBH,OAAO,EAGN,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;AAEzF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAEjF;AAyCD,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,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226.
|
|
3
|
+
"version": "0.226.14",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Core library for Signet - portable AI agent identity",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"!dist/**/__tests__/**"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "bun build ./src/index.ts ./src/pipeline-providers.ts ./src/llm-model-catalog.ts ./src/recall.ts --outdir ./dist --target node --external better-sqlite3 && bun run build:types",
|
|
33
|
+
"build": "bun build ./src/index.ts ./src/pipeline-providers.ts ./src/llm-model-catalog.ts ./src/recall.ts ./src/secrets-keyring-child.ts --outdir ./dist --target node --external better-sqlite3 && bun run build:types",
|
|
34
34
|
"build:types": "tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
35
35
|
"dev": "bun --watch src/index.ts",
|
|
36
36
|
"test": "bun test",
|
|
Binary file
|
|
Binary file
|