@promptev/context-engine 0.0.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.
- package/LICENSE.md +202 -0
- package/NOTICE +17 -0
- package/README.md +112 -0
- package/dist/cli.js +11998 -0
- package/dist/cli.js.map +1 -0
- package/dist/config-Bl9U789m.d.cts +174 -0
- package/dist/config-Bt9bUQqU.d.ts +174 -0
- package/dist/embeddings-B-jZ42mk.d.cts +67 -0
- package/dist/embeddings-DaSdAZN3.d.ts +67 -0
- package/dist/express.cjs +3173 -0
- package/dist/express.cjs.map +1 -0
- package/dist/express.d.cts +24 -0
- package/dist/express.d.ts +24 -0
- package/dist/express.js +3170 -0
- package/dist/express.js.map +1 -0
- package/dist/fastify.cjs +3184 -0
- package/dist/fastify.cjs.map +1 -0
- package/dist/fastify.d.cts +16 -0
- package/dist/fastify.d.ts +16 -0
- package/dist/fastify.js +3181 -0
- package/dist/fastify.js.map +1 -0
- package/dist/governance-BDkcv4qZ.d.cts +79 -0
- package/dist/governance-XIScatRO.d.ts +79 -0
- package/dist/graph/index.cjs +1428 -0
- package/dist/graph/index.cjs.map +1 -0
- package/dist/graph/index.d.cts +104 -0
- package/dist/graph/index.d.ts +104 -0
- package/dist/graph/index.js +1413 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/hono.cjs +3183 -0
- package/dist/hono.cjs.map +1 -0
- package/dist/hono.d.cts +39 -0
- package/dist/hono.d.ts +39 -0
- package/dist/hono.js +3179 -0
- package/dist/hono.js.map +1 -0
- package/dist/index.cjs +11731 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +851 -0
- package/dist/index.d.ts +851 -0
- package/dist/index.js +11676 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp.cjs +181 -0
- package/dist/mcp.cjs.map +1 -0
- package/dist/mcp.d.cts +26 -0
- package/dist/mcp.d.ts +26 -0
- package/dist/mcp.js +179 -0
- package/dist/mcp.js.map +1 -0
- package/dist/migrations/sql/0001.sql +119 -0
- package/dist/migrations/sql/0002_graph.sql +48 -0
- package/dist/migrations/sql/0003_tools.sql +61 -0
- package/dist/migrations/sql/0004_acl_indexes.sql +4 -0
- package/dist/redaction-BmDSWJ7h.d.cts +98 -0
- package/dist/redaction-BmDSWJ7h.d.ts +98 -0
- package/dist/redaction-presidio.cjs +79 -0
- package/dist/redaction-presidio.cjs.map +1 -0
- package/dist/redaction-presidio.d.cts +22 -0
- package/dist/redaction-presidio.d.ts +22 -0
- package/dist/redaction-presidio.js +73 -0
- package/dist/redaction-presidio.js.map +1 -0
- package/dist/router-CrxZ2y_Z.d.ts +82 -0
- package/dist/router-OPgSoYAB.d.cts +82 -0
- package/dist/skills/context-engine/SKILL.md +160 -0
- package/package.json +184 -0
- package/src/migrations/sql/0001.sql +119 -0
- package/src/migrations/sql/0002_graph.sql +48 -0
- package/src/migrations/sql/0003_tools.sql +61 -0
- package/src/migrations/sql/0004_acl_indexes.sql +4 -0
- package/src/skills/context-engine/SKILL.md +160 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Pool } from 'pg';
|
|
2
|
+
import { C as ContextEngineConfig } from './config-Bl9U789m.cjs';
|
|
3
|
+
import { H as Hooks } from './redaction-BmDSWJ7h.cjs';
|
|
4
|
+
|
|
5
|
+
type ToolKind = "http" | "db" | "mcp" | "function";
|
|
6
|
+
interface ToolConfigInit {
|
|
7
|
+
id?: string | null;
|
|
8
|
+
name: string;
|
|
9
|
+
kind: ToolKind;
|
|
10
|
+
description?: string;
|
|
11
|
+
config?: Record<string, unknown>;
|
|
12
|
+
sourceId?: string | null;
|
|
13
|
+
source_id?: string | null;
|
|
14
|
+
acl?: string[] | null;
|
|
15
|
+
requiresApproval?: boolean;
|
|
16
|
+
requires_approval?: boolean;
|
|
17
|
+
approvalPolicy?: Record<string, unknown>;
|
|
18
|
+
approval_policy?: Record<string, unknown>;
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Caller-facing shape for registering a tool. Kind-specific `config` is
|
|
23
|
+
* opaque here and encrypted at rest by governance when it holds secrets.
|
|
24
|
+
*/
|
|
25
|
+
declare class ToolConfig {
|
|
26
|
+
id: string | null;
|
|
27
|
+
name: string;
|
|
28
|
+
kind: ToolKind;
|
|
29
|
+
description: string;
|
|
30
|
+
config: Record<string, unknown>;
|
|
31
|
+
sourceId: string | null;
|
|
32
|
+
acl: string[] | null;
|
|
33
|
+
requiresApproval: boolean;
|
|
34
|
+
approvalPolicy: Record<string, unknown>;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
constructor(init: ToolConfigInit);
|
|
37
|
+
static fromUnknown(body: unknown): ToolConfig;
|
|
38
|
+
}
|
|
39
|
+
declare function configSchema(kind: ToolKind): Record<string, unknown>;
|
|
40
|
+
|
|
41
|
+
type ToolHttpClient = {
|
|
42
|
+
request(init: {
|
|
43
|
+
method: string;
|
|
44
|
+
url: string;
|
|
45
|
+
headers?: Record<string, string>;
|
|
46
|
+
params?: Record<string, unknown>;
|
|
47
|
+
json?: unknown;
|
|
48
|
+
content?: string;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
status: number;
|
|
51
|
+
headers: Record<string, string>;
|
|
52
|
+
json(): Promise<unknown>;
|
|
53
|
+
text(): Promise<string>;
|
|
54
|
+
}>;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
interface CanonicalTool {
|
|
58
|
+
id: string | null;
|
|
59
|
+
kind: ToolKind;
|
|
60
|
+
callName: string;
|
|
61
|
+
displayName: string;
|
|
62
|
+
description: string;
|
|
63
|
+
paramsSchema: Record<string, unknown>;
|
|
64
|
+
requiresApproval: boolean;
|
|
65
|
+
approvalPolicy: Record<string, unknown>;
|
|
66
|
+
sourceId: string | null;
|
|
67
|
+
acl: string[] | null;
|
|
68
|
+
raw: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type ToolEngine = {
|
|
72
|
+
pool: Pool;
|
|
73
|
+
config: ContextEngineConfig;
|
|
74
|
+
hooks?: Hooks | null;
|
|
75
|
+
_functionTools?: Record<string, CanonicalTool>;
|
|
76
|
+
_toolHttpClient?: ToolHttpClient | null;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { type CanonicalTool as C, type ToolEngine as T, ToolConfig as a, type ToolHttpClient as b, type ToolKind as c, configSchema as d };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Pool } from 'pg';
|
|
2
|
+
import { C as ContextEngineConfig } from './config-Bt9bUQqU.js';
|
|
3
|
+
import { H as Hooks } from './redaction-BmDSWJ7h.js';
|
|
4
|
+
|
|
5
|
+
type ToolKind = "http" | "db" | "mcp" | "function";
|
|
6
|
+
interface ToolConfigInit {
|
|
7
|
+
id?: string | null;
|
|
8
|
+
name: string;
|
|
9
|
+
kind: ToolKind;
|
|
10
|
+
description?: string;
|
|
11
|
+
config?: Record<string, unknown>;
|
|
12
|
+
sourceId?: string | null;
|
|
13
|
+
source_id?: string | null;
|
|
14
|
+
acl?: string[] | null;
|
|
15
|
+
requiresApproval?: boolean;
|
|
16
|
+
requires_approval?: boolean;
|
|
17
|
+
approvalPolicy?: Record<string, unknown>;
|
|
18
|
+
approval_policy?: Record<string, unknown>;
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Caller-facing shape for registering a tool. Kind-specific `config` is
|
|
23
|
+
* opaque here and encrypted at rest by governance when it holds secrets.
|
|
24
|
+
*/
|
|
25
|
+
declare class ToolConfig {
|
|
26
|
+
id: string | null;
|
|
27
|
+
name: string;
|
|
28
|
+
kind: ToolKind;
|
|
29
|
+
description: string;
|
|
30
|
+
config: Record<string, unknown>;
|
|
31
|
+
sourceId: string | null;
|
|
32
|
+
acl: string[] | null;
|
|
33
|
+
requiresApproval: boolean;
|
|
34
|
+
approvalPolicy: Record<string, unknown>;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
constructor(init: ToolConfigInit);
|
|
37
|
+
static fromUnknown(body: unknown): ToolConfig;
|
|
38
|
+
}
|
|
39
|
+
declare function configSchema(kind: ToolKind): Record<string, unknown>;
|
|
40
|
+
|
|
41
|
+
type ToolHttpClient = {
|
|
42
|
+
request(init: {
|
|
43
|
+
method: string;
|
|
44
|
+
url: string;
|
|
45
|
+
headers?: Record<string, string>;
|
|
46
|
+
params?: Record<string, unknown>;
|
|
47
|
+
json?: unknown;
|
|
48
|
+
content?: string;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
status: number;
|
|
51
|
+
headers: Record<string, string>;
|
|
52
|
+
json(): Promise<unknown>;
|
|
53
|
+
text(): Promise<string>;
|
|
54
|
+
}>;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
interface CanonicalTool {
|
|
58
|
+
id: string | null;
|
|
59
|
+
kind: ToolKind;
|
|
60
|
+
callName: string;
|
|
61
|
+
displayName: string;
|
|
62
|
+
description: string;
|
|
63
|
+
paramsSchema: Record<string, unknown>;
|
|
64
|
+
requiresApproval: boolean;
|
|
65
|
+
approvalPolicy: Record<string, unknown>;
|
|
66
|
+
sourceId: string | null;
|
|
67
|
+
acl: string[] | null;
|
|
68
|
+
raw: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type ToolEngine = {
|
|
72
|
+
pool: Pool;
|
|
73
|
+
config: ContextEngineConfig;
|
|
74
|
+
hooks?: Hooks | null;
|
|
75
|
+
_functionTools?: Record<string, CanonicalTool>;
|
|
76
|
+
_toolHttpClient?: ToolHttpClient | null;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { type CanonicalTool as C, type ToolEngine as T, ToolConfig as a, type ToolHttpClient as b, type ToolKind as c, configSchema as d };
|