@signetai/core 0.204.1 → 0.204.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/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6676 -1444
- package/dist/keyring.linux-x64-gnu-0wbgnj90.node +0 -0
- package/dist/keyring.linux-x64-musl-gxd42x54.node +0 -0
- package/dist/llm-model-catalog.js +14 -0
- package/dist/pipeline-providers.js +14 -0
- package/dist/recall.js +14 -0
- package/dist/secrets-keyring.d.ts +18 -0
- package/dist/secrets-keyring.d.ts.map +1 -0
- package/dist/secrets.d.ts +101 -0
- package/dist/secrets.d.ts.map +1 -0
- package/package.json +4 -1
|
Binary file
|
|
Binary file
|
|
@@ -30,6 +30,20 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
30
30
|
return to;
|
|
31
31
|
};
|
|
32
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __returnValue = (v) => v;
|
|
34
|
+
function __exportSetter(name, newValue) {
|
|
35
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
+
}
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, {
|
|
40
|
+
get: all[name],
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
set: __exportSetter.bind(all, name)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
33
47
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
34
48
|
|
|
35
49
|
// src/llm-model-catalog.ts
|
|
@@ -30,6 +30,20 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
30
30
|
return to;
|
|
31
31
|
};
|
|
32
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __returnValue = (v) => v;
|
|
34
|
+
function __exportSetter(name, newValue) {
|
|
35
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
+
}
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, {
|
|
40
|
+
get: all[name],
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
set: __exportSetter.bind(all, name)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
33
47
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
34
48
|
|
|
35
49
|
// src/llm-model-catalog.ts
|
package/dist/recall.js
CHANGED
|
@@ -30,6 +30,20 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
30
30
|
return to;
|
|
31
31
|
};
|
|
32
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __returnValue = (v) => v;
|
|
34
|
+
function __exportSetter(name, newValue) {
|
|
35
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
+
}
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, {
|
|
40
|
+
get: all[name],
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
set: __exportSetter.bind(all, name)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
33
47
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
34
48
|
|
|
35
49
|
// src/recall.ts
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type SecretKeyringState = "found" | "missing" | "locked" | "unavailable" | "permission-denied" | "corrupt" | "unsupported";
|
|
2
|
+
export interface SecretKeyringResult {
|
|
3
|
+
readonly state: SecretKeyringState;
|
|
4
|
+
readonly value?: string;
|
|
5
|
+
readonly message?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SecretKeyringAdapter {
|
|
8
|
+
readonly platform: string;
|
|
9
|
+
readonly service: string;
|
|
10
|
+
readonly account: string;
|
|
11
|
+
get(): Promise<SecretKeyringResult>;
|
|
12
|
+
set(value: string): Promise<SecretKeyringResult>;
|
|
13
|
+
getStatus?(): SecretKeyringResult;
|
|
14
|
+
}
|
|
15
|
+
export declare function getSecretKeyring(workspace: string): SecretKeyringAdapter;
|
|
16
|
+
export declare function setSecretKeyringForTests(adapter: SecretKeyringAdapter | null): void;
|
|
17
|
+
export declare function resetSecretKeyringModuleForTests(): void;
|
|
18
|
+
//# sourceMappingURL=secrets-keyring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets-keyring.d.ts","sourceRoot":"","sources":["../src/secrets-keyring.ts"],"names":[],"mappings":"AAKA,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,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACpC,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACjD,SAAS,CAAC,IAAI,mBAAmB,CAAC;CAClC;AA4ID,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,CAExE;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI,CAInF;AAED,wBAAgB,gCAAgC,IAAI,IAAI,CAGvD"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared secrets storage and execution primitives.
|
|
3
|
+
*
|
|
4
|
+
* This module is intentionally daemon-independent so the CLI can use the same
|
|
5
|
+
* encrypted store when no daemon is running.
|
|
6
|
+
*/
|
|
7
|
+
import { type SecretKeyringAdapter, type SecretKeyringResult, type SecretKeyringState } from "./secrets-keyring.js";
|
|
8
|
+
export type SecretEventRecorder = (event: string, data: Record<string, unknown>) => void;
|
|
9
|
+
export declare function setSecretEventRecorder(recorder: SecretEventRecorder | null): void;
|
|
10
|
+
export interface ExecResult {
|
|
11
|
+
stdout: string;
|
|
12
|
+
stderr: string;
|
|
13
|
+
code: number;
|
|
14
|
+
timedOut?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface SecretExecOptions {
|
|
17
|
+
timeoutMs?: number;
|
|
18
|
+
maxOutputBytes?: number;
|
|
19
|
+
}
|
|
20
|
+
export type SecretExecJobStatus = "queued" | "running" | "completed" | "failed";
|
|
21
|
+
export interface SecretExecJob {
|
|
22
|
+
id: string;
|
|
23
|
+
status: SecretExecJobStatus;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
startedAt?: string;
|
|
26
|
+
completedAt?: string;
|
|
27
|
+
timeoutMs: number;
|
|
28
|
+
result?: ExecResult;
|
|
29
|
+
error?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface SecretContextV1 {
|
|
32
|
+
readonly agentId?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface SecretDescriptorV1 {
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly ref: string;
|
|
37
|
+
readonly providerId: string;
|
|
38
|
+
readonly created: string;
|
|
39
|
+
readonly updated: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ResolvedSecretV1 {
|
|
42
|
+
readonly ref: string;
|
|
43
|
+
readonly providerId: string;
|
|
44
|
+
readonly value: string;
|
|
45
|
+
}
|
|
46
|
+
export interface SecretProviderHealthV1 {
|
|
47
|
+
readonly status: "healthy" | "degraded" | "unhealthy";
|
|
48
|
+
readonly message?: string;
|
|
49
|
+
readonly checkedAt: string;
|
|
50
|
+
}
|
|
51
|
+
export interface SecretProviderV1 {
|
|
52
|
+
readonly id: string;
|
|
53
|
+
list(ctx: SecretContextV1): Promise<readonly SecretDescriptorV1[]>;
|
|
54
|
+
put(name: string, value: string, ctx: SecretContextV1): Promise<void>;
|
|
55
|
+
delete(name: string, ctx: SecretContextV1): Promise<boolean>;
|
|
56
|
+
resolve(ref: string, ctx: SecretContextV1): Promise<ResolvedSecretV1>;
|
|
57
|
+
health(ctx: SecretContextV1): Promise<SecretProviderHealthV1>;
|
|
58
|
+
}
|
|
59
|
+
type MachineIdResolver = () => string | undefined;
|
|
60
|
+
export declare class SecretKeyringError extends Error {
|
|
61
|
+
readonly state: SecretKeyringState;
|
|
62
|
+
readonly retryable: boolean;
|
|
63
|
+
constructor(result: SecretKeyringResult);
|
|
64
|
+
}
|
|
65
|
+
export declare function setMachineIdResolverForTests(resolver: MachineIdResolver | null): void;
|
|
66
|
+
export declare function setSecretKeyringAdapterForTests(adapter: SecretKeyringAdapter | null): void;
|
|
67
|
+
type SecretStoreWriteStage = "after-write" | "before-close";
|
|
68
|
+
type SecretStoreWriteHookForTests = (stage: SecretStoreWriteStage, fd?: number) => void;
|
|
69
|
+
/** @internal Inject a failure or process kill while testing atomic store replacement. */
|
|
70
|
+
export declare function __setSecretStoreWriteHookForTests(hook: SecretStoreWriteHookForTests | null): void;
|
|
71
|
+
type SecretStoreLockHookStage = "after-acquire" | "after-stale-check";
|
|
72
|
+
type SecretStoreLockHookForTests = (stage: SecretStoreLockHookStage) => void;
|
|
73
|
+
/** @internal Pause an acquired lock in a child-process race regression test. */
|
|
74
|
+
export declare function __setSecretStoreLockHookForTests(hook: SecretStoreLockHookForTests | null): void;
|
|
75
|
+
export declare function putLocalSecret(name: string, value: string): Promise<void>;
|
|
76
|
+
export declare function getLocalSecretValue(name: string): Promise<string>;
|
|
77
|
+
export declare function hasLocalSecret(name: string): boolean;
|
|
78
|
+
export declare function hasSecret(name: string): boolean;
|
|
79
|
+
export declare function listLocalSecretNames(options?: {
|
|
80
|
+
includeInternal?: boolean;
|
|
81
|
+
}): string[];
|
|
82
|
+
export declare function deleteLocalSecret(name: string): Promise<boolean>;
|
|
83
|
+
export type LocalSecretProviderV1 = SecretProviderV1;
|
|
84
|
+
export declare const localSecretProvider: LocalSecretProviderV1;
|
|
85
|
+
export declare function getLocalSecretProviderHealth(): SecretProviderHealthV1;
|
|
86
|
+
/**
|
|
87
|
+
* Spawn a subprocess with one or more secrets injected as environment
|
|
88
|
+
* variables. The agent only supplies references (env var names), never
|
|
89
|
+
* the actual values.
|
|
90
|
+
*
|
|
91
|
+
* Uses direct argv execution (no shell) to eliminate glob/tilde/pipe
|
|
92
|
+
* expansion. The command string is parsed into argv tokens.
|
|
93
|
+
*
|
|
94
|
+
* @param command Command string to execute (parsed as argv, no shell)
|
|
95
|
+
* @param secretRefs Map of env var name → secret name, e.g. { OPENAI_API_KEY: "OPENAI_API_KEY" }
|
|
96
|
+
*/
|
|
97
|
+
export declare function execWithSecrets(command: string, secretRefs: Record<string, string>, options?: SecretExecOptions): Promise<ExecResult>;
|
|
98
|
+
export declare function normalizeSecretExecTimeoutMs(value: unknown): number;
|
|
99
|
+
export declare function parseLocalSecretName(ref: string): string;
|
|
100
|
+
export {};
|
|
101
|
+
//# sourceMappingURL=secrets.d.ts.map
|
|
@@ -0,0 +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,k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,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,OAAO,GAAE,iBAAsB,GAC7B,OAAO,CAAC,UAAU,CAAC,CAsLrB;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGnE;AAmBD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIxD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/core",
|
|
3
|
-
"version": "0.204.
|
|
3
|
+
"version": "0.204.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Core library for Signet - portable AI agent identity",
|
|
6
6
|
"type": "module",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"typecheck": "tsc --noEmit"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@napi-rs/keyring": "1.3.0",
|
|
41
|
+
"libsodium-wrappers": "^0.8.2",
|
|
40
42
|
"sqlite-vec": "^0.1.7-alpha.2",
|
|
41
43
|
"yaml": "^2.6.0"
|
|
42
44
|
},
|
|
@@ -50,6 +52,7 @@
|
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
54
|
"@types/better-sqlite3": "^7.6.0",
|
|
55
|
+
"@types/libsodium-wrappers": "^0.8.2",
|
|
53
56
|
"@types/node": "^22.0.0",
|
|
54
57
|
"typescript": "^5.7.0",
|
|
55
58
|
"@signet/native": "workspace:*"
|