@dexto/core 1.5.3 → 1.5.5
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/agent/DextoAgent.cjs +190 -1
- package/dist/agent/DextoAgent.d.ts +71 -0
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +181 -1
- package/dist/agent/schemas.d.ts +51 -21
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/context/compaction/overflow.cjs +6 -10
- package/dist/context/compaction/overflow.d.ts +14 -11
- package/dist/context/compaction/overflow.d.ts.map +1 -1
- package/dist/context/compaction/overflow.js +6 -10
- package/dist/context/compaction/providers/reactive-overflow-provider.cjs +15 -0
- package/dist/context/compaction/providers/reactive-overflow-provider.d.ts +15 -0
- package/dist/context/compaction/providers/reactive-overflow-provider.d.ts.map +1 -1
- package/dist/context/compaction/providers/reactive-overflow-provider.js +15 -0
- package/dist/context/compaction/schemas.cjs +22 -2
- package/dist/context/compaction/schemas.d.ts +45 -0
- package/dist/context/compaction/schemas.d.ts.map +1 -1
- package/dist/context/compaction/schemas.js +22 -2
- package/dist/context/compaction/strategies/reactive-overflow.cjs +168 -26
- package/dist/context/compaction/strategies/reactive-overflow.d.ts +22 -0
- package/dist/context/compaction/strategies/reactive-overflow.d.ts.map +1 -1
- package/dist/context/compaction/strategies/reactive-overflow.js +168 -26
- package/dist/context/compaction/types.d.ts +13 -1
- package/dist/context/compaction/types.d.ts.map +1 -1
- package/dist/context/manager.cjs +278 -31
- package/dist/context/manager.d.ts +192 -5
- package/dist/context/manager.d.ts.map +1 -1
- package/dist/context/manager.js +285 -32
- package/dist/context/types.d.ts +6 -0
- package/dist/context/types.d.ts.map +1 -1
- package/dist/context/utils.cjs +77 -11
- package/dist/context/utils.d.ts +86 -8
- package/dist/context/utils.d.ts.map +1 -1
- package/dist/context/utils.js +71 -11
- package/dist/errors/types.cjs +0 -2
- package/dist/errors/types.d.ts +1 -5
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/errors/types.js +0 -2
- package/dist/events/index.cjs +2 -0
- package/dist/events/index.d.ts +21 -6
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +2 -0
- package/dist/llm/executor/stream-processor.cjs +104 -28
- package/dist/llm/executor/stream-processor.d.ts +7 -0
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +104 -28
- package/dist/llm/executor/turn-executor.cjs +147 -30
- package/dist/llm/executor/turn-executor.d.ts +28 -10
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +147 -30
- package/dist/llm/formatters/vercel.cjs +36 -28
- package/dist/llm/formatters/vercel.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.js +36 -28
- package/dist/llm/services/factory.cjs +3 -2
- package/dist/llm/services/factory.d.ts +3 -1
- package/dist/llm/services/factory.d.ts.map +1 -1
- package/dist/llm/services/factory.js +3 -2
- package/dist/llm/services/vercel.cjs +31 -6
- package/dist/llm/services/vercel.d.ts +18 -3
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +31 -6
- package/dist/session/chat-session.cjs +29 -13
- package/dist/session/chat-session.d.ts +6 -4
- package/dist/session/chat-session.d.ts.map +1 -1
- package/dist/session/chat-session.js +29 -13
- package/dist/session/session-manager.cjs +11 -0
- package/dist/session/session-manager.d.ts +7 -0
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +11 -0
- package/dist/session/title-generator.cjs +2 -2
- package/dist/session/title-generator.js +2 -2
- package/dist/systemPrompt/in-built-prompts.cjs +36 -0
- package/dist/systemPrompt/in-built-prompts.d.ts +18 -1
- package/dist/systemPrompt/in-built-prompts.d.ts.map +1 -1
- package/dist/systemPrompt/in-built-prompts.js +25 -0
- package/dist/systemPrompt/manager.cjs +22 -0
- package/dist/systemPrompt/manager.d.ts +10 -0
- package/dist/systemPrompt/manager.d.ts.map +1 -1
- package/dist/systemPrompt/manager.js +22 -0
- package/dist/systemPrompt/registry.cjs +2 -1
- package/dist/systemPrompt/registry.d.ts +1 -1
- package/dist/systemPrompt/registry.d.ts.map +1 -1
- package/dist/systemPrompt/registry.js +2 -1
- package/dist/systemPrompt/schemas.cjs +7 -0
- package/dist/systemPrompt/schemas.d.ts +13 -13
- package/dist/systemPrompt/schemas.d.ts.map +1 -1
- package/dist/systemPrompt/schemas.js +7 -0
- package/dist/telemetry/telemetry.cjs +12 -5
- package/dist/telemetry/telemetry.d.ts.map +1 -1
- package/dist/telemetry/telemetry.js +12 -5
- package/dist/utils/index.cjs +3 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +15 -5
- package/dist/filesystem/error-codes.cjs +0 -53
- package/dist/filesystem/error-codes.d.ts +0 -31
- package/dist/filesystem/error-codes.d.ts.map +0 -1
- package/dist/filesystem/error-codes.js +0 -30
- package/dist/filesystem/errors.cjs +0 -303
- package/dist/filesystem/errors.d.ts +0 -109
- package/dist/filesystem/errors.d.ts.map +0 -1
- package/dist/filesystem/errors.js +0 -280
- package/dist/filesystem/filesystem-service.cjs +0 -534
- package/dist/filesystem/filesystem-service.d.ts +0 -97
- package/dist/filesystem/filesystem-service.d.ts.map +0 -1
- package/dist/filesystem/filesystem-service.js +0 -501
- package/dist/filesystem/index.cjs +0 -37
- package/dist/filesystem/index.d.ts +0 -11
- package/dist/filesystem/index.d.ts.map +0 -1
- package/dist/filesystem/index.js +0 -11
- package/dist/filesystem/path-validator.cjs +0 -250
- package/dist/filesystem/path-validator.d.ts +0 -103
- package/dist/filesystem/path-validator.d.ts.map +0 -1
- package/dist/filesystem/path-validator.js +0 -217
- package/dist/filesystem/types.cjs +0 -16
- package/dist/filesystem/types.d.ts +0 -175
- package/dist/filesystem/types.d.ts.map +0 -1
- package/dist/filesystem/types.js +0 -0
- package/dist/process/command-validator.cjs +0 -554
- package/dist/process/command-validator.d.ts +0 -49
- package/dist/process/command-validator.d.ts.map +0 -1
- package/dist/process/command-validator.js +0 -531
- package/dist/process/error-codes.cjs +0 -47
- package/dist/process/error-codes.d.ts +0 -25
- package/dist/process/error-codes.d.ts.map +0 -1
- package/dist/process/error-codes.js +0 -24
- package/dist/process/errors.cjs +0 -244
- package/dist/process/errors.d.ts +0 -87
- package/dist/process/errors.d.ts.map +0 -1
- package/dist/process/errors.js +0 -221
- package/dist/process/index.cjs +0 -37
- package/dist/process/index.d.ts +0 -11
- package/dist/process/index.d.ts.map +0 -1
- package/dist/process/index.js +0 -11
- package/dist/process/process-service.cjs +0 -497
- package/dist/process/process-service.d.ts +0 -69
- package/dist/process/process-service.d.ts.map +0 -1
- package/dist/process/process-service.js +0 -464
- package/dist/process/types.cjs +0 -16
- package/dist/process/types.d.ts +0 -107
- package/dist/process/types.d.ts.map +0 -1
- package/dist/process/types.js +0 -0
|
@@ -3,6 +3,30 @@ async function getCurrentDate(_context) {
|
|
|
3
3
|
const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
4
4
|
return `<date>Current date: ${date}</date>`;
|
|
5
5
|
}
|
|
6
|
+
async function getEnvironmentInfo(_context) {
|
|
7
|
+
if (typeof process === "undefined" || !process.cwd) {
|
|
8
|
+
return "<environment>Environment info not available in browser context</environment>";
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const [{ existsSync }, { platform }, { join }] = await Promise.all([
|
|
12
|
+
import("fs"),
|
|
13
|
+
import("os"),
|
|
14
|
+
import("path")
|
|
15
|
+
]);
|
|
16
|
+
const cwd = process.cwd();
|
|
17
|
+
const os = platform();
|
|
18
|
+
const isGitRepo = existsSync(join(cwd, ".git"));
|
|
19
|
+
const shell = process.env.SHELL || (os === "win32" ? "cmd.exe" : "/bin/sh");
|
|
20
|
+
return `<environment>
|
|
21
|
+
<cwd>${cwd}</cwd>
|
|
22
|
+
<platform>${os}</platform>
|
|
23
|
+
<is_git_repo>${isGitRepo}</is_git_repo>
|
|
24
|
+
<shell>${shell}</shell>
|
|
25
|
+
</environment>`;
|
|
26
|
+
} catch {
|
|
27
|
+
return "<environment>Environment info not available</environment>";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
6
30
|
async function getResourceData(context) {
|
|
7
31
|
const resources = await context.mcpManager.listAllResources();
|
|
8
32
|
if (!resources || resources.length === 0) {
|
|
@@ -34,5 +58,6 @@ ${parts.join("\n")}
|
|
|
34
58
|
}
|
|
35
59
|
export {
|
|
36
60
|
getCurrentDate,
|
|
61
|
+
getEnvironmentInfo,
|
|
37
62
|
getResourceData
|
|
38
63
|
};
|
|
@@ -112,6 +112,28 @@ class SystemPromptManager {
|
|
|
112
112
|
getContributors() {
|
|
113
113
|
return this.contributors;
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Add a contributor dynamically after construction.
|
|
117
|
+
* The contributor will be inserted in priority order.
|
|
118
|
+
*/
|
|
119
|
+
addContributor(contributor) {
|
|
120
|
+
this.contributors.push(contributor);
|
|
121
|
+
this.contributors.sort((a, b) => a.priority - b.priority);
|
|
122
|
+
this.logger.debug(
|
|
123
|
+
`Added contributor: ${contributor.id} (priority: ${contributor.priority})`
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Remove a contributor by ID.
|
|
128
|
+
* Returns true if removed, false if not found.
|
|
129
|
+
*/
|
|
130
|
+
removeContributor(id) {
|
|
131
|
+
const index = this.contributors.findIndex((c) => c.id === id);
|
|
132
|
+
if (index === -1) return false;
|
|
133
|
+
this.contributors.splice(index, 1);
|
|
134
|
+
this.logger.debug(`Removed contributor: ${id}`);
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
115
137
|
}
|
|
116
138
|
// Annotate the CommonJS export names for ESM import in node:
|
|
117
139
|
0 && (module.exports = {
|
|
@@ -21,5 +21,15 @@ export declare class SystemPromptManager {
|
|
|
21
21
|
* Expose current list of contributors (for inspection or testing).
|
|
22
22
|
*/
|
|
23
23
|
getContributors(): SystemPromptContributor[];
|
|
24
|
+
/**
|
|
25
|
+
* Add a contributor dynamically after construction.
|
|
26
|
+
* The contributor will be inserted in priority order.
|
|
27
|
+
*/
|
|
28
|
+
addContributor(contributor: SystemPromptContributor): void;
|
|
29
|
+
/**
|
|
30
|
+
* Remove a contributor by ID.
|
|
31
|
+
* Returns true if removed, false if not found.
|
|
32
|
+
*/
|
|
33
|
+
removeContributor(id: string): boolean;
|
|
24
34
|
}
|
|
25
35
|
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAA8B,MAAM,cAAc,CAAC;AAG5F,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D;;;GAGG;AACH,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,MAAM,CAAe;gBAIzB,MAAM,EAAE,2BAA2B,EACnC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,uBAAuB,GAAG,SAAS,EACnD,MAAM,EAAE,YAAY;IAsCxB,OAAO,CAAC,iBAAiB;IAkCzB;;OAEG;IACG,KAAK,CAAC,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAa5D;;OAEG;IACH,eAAe,IAAI,uBAAuB,EAAE;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAA8B,MAAM,cAAc,CAAC;AAG5F,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D;;;GAGG;AACH,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,MAAM,CAAe;gBAIzB,MAAM,EAAE,2BAA2B,EACnC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,uBAAuB,GAAG,SAAS,EACnD,MAAM,EAAE,YAAY;IAsCxB,OAAO,CAAC,iBAAiB;IAkCzB;;OAEG;IACG,KAAK,CAAC,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAa5D;;OAEG;IACH,eAAe,IAAI,uBAAuB,EAAE;IAI5C;;;OAGG;IACH,cAAc,CAAC,WAAW,EAAE,uBAAuB,GAAG,IAAI;IAQ1D;;;OAGG;IACH,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;CAOzC"}
|
|
@@ -90,6 +90,28 @@ class SystemPromptManager {
|
|
|
90
90
|
getContributors() {
|
|
91
91
|
return this.contributors;
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Add a contributor dynamically after construction.
|
|
95
|
+
* The contributor will be inserted in priority order.
|
|
96
|
+
*/
|
|
97
|
+
addContributor(contributor) {
|
|
98
|
+
this.contributors.push(contributor);
|
|
99
|
+
this.contributors.sort((a, b) => a.priority - b.priority);
|
|
100
|
+
this.logger.debug(
|
|
101
|
+
`Added contributor: ${contributor.id} (priority: ${contributor.priority})`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Remove a contributor by ID.
|
|
106
|
+
* Returns true if removed, false if not found.
|
|
107
|
+
*/
|
|
108
|
+
removeContributor(id) {
|
|
109
|
+
const index = this.contributors.findIndex((c) => c.id === id);
|
|
110
|
+
if (index === -1) return false;
|
|
111
|
+
this.contributors.splice(index, 1);
|
|
112
|
+
this.logger.debug(`Removed contributor: ${id}`);
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
93
115
|
}
|
|
94
116
|
export {
|
|
95
117
|
SystemPromptManager
|
|
@@ -34,9 +34,10 @@ __export(registry_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(registry_exports);
|
|
36
36
|
var handlers = __toESM(require("./in-built-prompts.js"), 1);
|
|
37
|
-
const PROMPT_GENERATOR_SOURCES = ["date", "resources"];
|
|
37
|
+
const PROMPT_GENERATOR_SOURCES = ["date", "env", "resources"];
|
|
38
38
|
const PROMPT_GENERATOR_REGISTRY = {
|
|
39
39
|
date: handlers.getCurrentDate,
|
|
40
|
+
env: handlers.getEnvironmentInfo,
|
|
40
41
|
resources: handlers.getResourceData
|
|
41
42
|
};
|
|
42
43
|
function getPromptGenerator(source) {
|
|
@@ -3,7 +3,7 @@ import { DynamicContributorContext } from './types.js';
|
|
|
3
3
|
* This file contains the registry of all the functions that can generate dynamic prompt pieces at runtime.
|
|
4
4
|
*/
|
|
5
5
|
export type DynamicPromptGenerator = (context: DynamicContributorContext) => Promise<string>;
|
|
6
|
-
export declare const PROMPT_GENERATOR_SOURCES: readonly ["date", "resources"];
|
|
6
|
+
export declare const PROMPT_GENERATOR_SOURCES: readonly ["date", "env", "resources"];
|
|
7
7
|
export type PromptGeneratorSource = (typeof PROMPT_GENERATOR_SOURCES)[number];
|
|
8
8
|
export declare const PROMPT_GENERATOR_REGISTRY: Record<PromptGeneratorSource, DynamicPromptGenerator>;
|
|
9
9
|
export declare function getPromptGenerator(source: PromptGeneratorSource): DynamicPromptGenerator | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAG7F,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,yBAAyB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAG7F,eAAO,MAAM,wBAAwB,uCAAwC,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAG9E,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,qBAAqB,EAAE,sBAAsB,CAI3F,CAAC;AAGF,wBAAgB,kBAAkB,CAC9B,MAAM,EAAE,qBAAqB,GAC9B,sBAAsB,GAAG,SAAS,CAEpC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "../chunk-PTJYTZNU.js";
|
|
2
2
|
import * as handlers from "./in-built-prompts.js";
|
|
3
|
-
const PROMPT_GENERATOR_SOURCES = ["date", "resources"];
|
|
3
|
+
const PROMPT_GENERATOR_SOURCES = ["date", "env", "resources"];
|
|
4
4
|
const PROMPT_GENERATOR_REGISTRY = {
|
|
5
5
|
date: handlers.getCurrentDate,
|
|
6
|
+
env: handlers.getEnvironmentInfo,
|
|
6
7
|
resources: handlers.getResourceData
|
|
7
8
|
};
|
|
8
9
|
function getPromptGenerator(source) {
|
|
@@ -102,6 +102,13 @@ const SystemPromptContributorsSchema = import_zod.z.object({
|
|
|
102
102
|
source: "date",
|
|
103
103
|
enabled: true
|
|
104
104
|
},
|
|
105
|
+
{
|
|
106
|
+
id: "env",
|
|
107
|
+
type: "dynamic",
|
|
108
|
+
priority: 15,
|
|
109
|
+
source: "env",
|
|
110
|
+
enabled: true
|
|
111
|
+
},
|
|
105
112
|
{
|
|
106
113
|
id: "resources",
|
|
107
114
|
type: "dynamic",
|
|
@@ -24,18 +24,18 @@ export declare const ContributorConfigSchema: z.ZodDiscriminatedUnion<"type", [z
|
|
|
24
24
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
25
25
|
} & {
|
|
26
26
|
type: z.ZodLiteral<"dynamic">;
|
|
27
|
-
source: z.ZodEnum<["date", "resources"]>;
|
|
27
|
+
source: z.ZodEnum<["date", "env", "resources"]>;
|
|
28
28
|
}, "strict", z.ZodTypeAny, {
|
|
29
29
|
type: "dynamic";
|
|
30
30
|
enabled: boolean;
|
|
31
31
|
id: string;
|
|
32
32
|
priority: number;
|
|
33
|
-
source: "date" | "resources";
|
|
33
|
+
source: "date" | "env" | "resources";
|
|
34
34
|
}, {
|
|
35
35
|
type: "dynamic";
|
|
36
36
|
id: string;
|
|
37
37
|
priority: number;
|
|
38
|
-
source: "date" | "resources";
|
|
38
|
+
source: "date" | "env" | "resources";
|
|
39
39
|
enabled?: boolean | undefined;
|
|
40
40
|
}>, z.ZodObject<{
|
|
41
41
|
id: z.ZodString;
|
|
@@ -118,18 +118,18 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
118
118
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
119
119
|
} & {
|
|
120
120
|
type: z.ZodLiteral<"dynamic">;
|
|
121
|
-
source: z.ZodEnum<["date", "resources"]>;
|
|
121
|
+
source: z.ZodEnum<["date", "env", "resources"]>;
|
|
122
122
|
}, "strict", z.ZodTypeAny, {
|
|
123
123
|
type: "dynamic";
|
|
124
124
|
enabled: boolean;
|
|
125
125
|
id: string;
|
|
126
126
|
priority: number;
|
|
127
|
-
source: "date" | "resources";
|
|
127
|
+
source: "date" | "env" | "resources";
|
|
128
128
|
}, {
|
|
129
129
|
type: "dynamic";
|
|
130
130
|
id: string;
|
|
131
131
|
priority: number;
|
|
132
|
-
source: "date" | "resources";
|
|
132
|
+
source: "date" | "env" | "resources";
|
|
133
133
|
enabled?: boolean | undefined;
|
|
134
134
|
}>, z.ZodObject<{
|
|
135
135
|
id: z.ZodString;
|
|
@@ -196,7 +196,7 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
196
196
|
enabled: boolean;
|
|
197
197
|
id: string;
|
|
198
198
|
priority: number;
|
|
199
|
-
source: "date" | "resources";
|
|
199
|
+
source: "date" | "env" | "resources";
|
|
200
200
|
} | {
|
|
201
201
|
type: "file";
|
|
202
202
|
options: {
|
|
@@ -222,7 +222,7 @@ export declare const SystemPromptContributorsSchema: z.ZodObject<{
|
|
|
222
222
|
type: "dynamic";
|
|
223
223
|
id: string;
|
|
224
224
|
priority: number;
|
|
225
|
-
source: "date" | "resources";
|
|
225
|
+
source: "date" | "env" | "resources";
|
|
226
226
|
enabled?: boolean | undefined;
|
|
227
227
|
} | {
|
|
228
228
|
type: "file";
|
|
@@ -273,18 +273,18 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
273
273
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
274
274
|
} & {
|
|
275
275
|
type: z.ZodLiteral<"dynamic">;
|
|
276
|
-
source: z.ZodEnum<["date", "resources"]>;
|
|
276
|
+
source: z.ZodEnum<["date", "env", "resources"]>;
|
|
277
277
|
}, "strict", z.ZodTypeAny, {
|
|
278
278
|
type: "dynamic";
|
|
279
279
|
enabled: boolean;
|
|
280
280
|
id: string;
|
|
281
281
|
priority: number;
|
|
282
|
-
source: "date" | "resources";
|
|
282
|
+
source: "date" | "env" | "resources";
|
|
283
283
|
}, {
|
|
284
284
|
type: "dynamic";
|
|
285
285
|
id: string;
|
|
286
286
|
priority: number;
|
|
287
|
-
source: "date" | "resources";
|
|
287
|
+
source: "date" | "env" | "resources";
|
|
288
288
|
enabled?: boolean | undefined;
|
|
289
289
|
}>, z.ZodObject<{
|
|
290
290
|
id: z.ZodString;
|
|
@@ -351,7 +351,7 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
351
351
|
enabled: boolean;
|
|
352
352
|
id: string;
|
|
353
353
|
priority: number;
|
|
354
|
-
source: "date" | "resources";
|
|
354
|
+
source: "date" | "env" | "resources";
|
|
355
355
|
} | {
|
|
356
356
|
type: "file";
|
|
357
357
|
options: {
|
|
@@ -377,7 +377,7 @@ export declare const SystemPromptConfigSchema: z.ZodBranded<z.ZodUnion<[z.ZodEff
|
|
|
377
377
|
type: "dynamic";
|
|
378
378
|
id: string;
|
|
379
379
|
priority: number;
|
|
380
|
-
source: "date" | "resources";
|
|
380
|
+
source: "date" | "env" | "resources";
|
|
381
381
|
enabled?: boolean | undefined;
|
|
382
382
|
} | {
|
|
383
383
|
type: "file";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0FxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkB/B,CAAC;AAGN,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAElF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/systemPrompt/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0FxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkB/B,CAAC;AAGN,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAElF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8B9B,CAAC;AAGd,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAUM,CAAC;AAG5C,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -123,15 +123,18 @@ class Telemetry {
|
|
|
123
123
|
if (enabled) {
|
|
124
124
|
let NodeSDK;
|
|
125
125
|
let Resource;
|
|
126
|
-
let
|
|
126
|
+
let HttpInstrumentation;
|
|
127
|
+
let UndiciInstrumentation;
|
|
127
128
|
let ATTR_SERVICE_NAME;
|
|
128
129
|
try {
|
|
129
130
|
const sdkModule = await import("@opentelemetry/sdk-node");
|
|
130
131
|
NodeSDK = sdkModule.NodeSDK;
|
|
131
132
|
const resourcesModule = await import("@opentelemetry/resources");
|
|
132
133
|
Resource = resourcesModule.Resource;
|
|
133
|
-
const
|
|
134
|
-
|
|
134
|
+
const httpInstModule = await import("@opentelemetry/instrumentation-http");
|
|
135
|
+
HttpInstrumentation = httpInstModule.HttpInstrumentation;
|
|
136
|
+
const undiciInstModule = await import("@opentelemetry/instrumentation-undici");
|
|
137
|
+
UndiciInstrumentation = undiciInstModule.UndiciInstrumentation;
|
|
135
138
|
const semanticModule = await import("@opentelemetry/semantic-conventions");
|
|
136
139
|
ATTR_SERVICE_NAME = semanticModule.ATTR_SERVICE_NAME;
|
|
137
140
|
} catch (importError) {
|
|
@@ -139,7 +142,8 @@ class Telemetry {
|
|
|
139
142
|
if (err.code === "ERR_MODULE_NOT_FOUND") {
|
|
140
143
|
throw import_errors.TelemetryError.dependencyNotInstalled([
|
|
141
144
|
"@opentelemetry/sdk-node",
|
|
142
|
-
"@opentelemetry/
|
|
145
|
+
"@opentelemetry/instrumentation-http",
|
|
146
|
+
"@opentelemetry/instrumentation-undici",
|
|
143
147
|
"@opentelemetry/resources",
|
|
144
148
|
"@opentelemetry/semantic-conventions",
|
|
145
149
|
"@opentelemetry/sdk-trace-base",
|
|
@@ -158,7 +162,10 @@ class Telemetry {
|
|
|
158
162
|
sdk = new NodeSDK({
|
|
159
163
|
resource,
|
|
160
164
|
traceExporter,
|
|
161
|
-
instrumentations: [
|
|
165
|
+
instrumentations: [
|
|
166
|
+
new HttpInstrumentation(),
|
|
167
|
+
new UndiciInstrumentation()
|
|
168
|
+
]
|
|
162
169
|
});
|
|
163
170
|
await sdk.start();
|
|
164
171
|
const sigterm = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry/telemetry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAYtD,OAAO,CAAC,MAAM,CAAC;IACX,IAAI,aAAa,EAAE,SAAS,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,qBAAa,SAAS;IACX,MAAM,EAAE,MAAM,CAA4B;IACjD,IAAI,EAAE,MAAM,CAAmB;IAC/B,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,IAAI,CAAC,CAA0B;IACvC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAiC;IAC7D,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAA0D;IAEzF,OAAO;mBAYc,kBAAkB;IA0DvC;;;;;OAKG;WACU,IAAI,CACb,MAAM,GAAE,iBAAsB,EAC9B,QAAQ,CAAC,EAAE,OAAO,+BAA+B,EAAE,YAAY,GAChE,OAAO,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry/telemetry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAYtD,OAAO,CAAC,MAAM,CAAC;IACX,IAAI,aAAa,EAAE,SAAS,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,qBAAa,SAAS;IACX,MAAM,EAAE,MAAM,CAA4B;IACjD,IAAI,EAAE,MAAM,CAAmB;IAC/B,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,IAAI,CAAC,CAA0B;IACvC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAiC;IAC7D,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAA0D;IAEzF,OAAO;mBAYc,kBAAkB;IA0DvC;;;;;OAKG;WACU,IAAI,CACb,MAAM,GAAE,iBAAsB,EAC9B,QAAQ,CAAC,EAAE,OAAO,+BAA+B,EAAE,YAAY,GAChE,OAAO,CAAC,SAAS,CAAC;IA8HrB,MAAM,CAAC,aAAa;IAKpB;;;;OAIG;IACH,MAAM,CAAC,GAAG,IAAI,SAAS;IAOvB;;;OAGG;IACH,MAAM,CAAC,iBAAiB,IAAI,OAAO;IAInC;;;;;OAKG;WACU,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5C;;;OAGG;IACI,aAAa,IAAI,OAAO;IAI/B,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,GAAE,OAA8B;IAc5F,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI;IAI/C;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAUxC;;;;;;;;;OASG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CA8BzC"}
|
|
@@ -91,15 +91,18 @@ class Telemetry {
|
|
|
91
91
|
if (enabled) {
|
|
92
92
|
let NodeSDK;
|
|
93
93
|
let Resource;
|
|
94
|
-
let
|
|
94
|
+
let HttpInstrumentation;
|
|
95
|
+
let UndiciInstrumentation;
|
|
95
96
|
let ATTR_SERVICE_NAME;
|
|
96
97
|
try {
|
|
97
98
|
const sdkModule = await import("@opentelemetry/sdk-node");
|
|
98
99
|
NodeSDK = sdkModule.NodeSDK;
|
|
99
100
|
const resourcesModule = await import("@opentelemetry/resources");
|
|
100
101
|
Resource = resourcesModule.Resource;
|
|
101
|
-
const
|
|
102
|
-
|
|
102
|
+
const httpInstModule = await import("@opentelemetry/instrumentation-http");
|
|
103
|
+
HttpInstrumentation = httpInstModule.HttpInstrumentation;
|
|
104
|
+
const undiciInstModule = await import("@opentelemetry/instrumentation-undici");
|
|
105
|
+
UndiciInstrumentation = undiciInstModule.UndiciInstrumentation;
|
|
103
106
|
const semanticModule = await import("@opentelemetry/semantic-conventions");
|
|
104
107
|
ATTR_SERVICE_NAME = semanticModule.ATTR_SERVICE_NAME;
|
|
105
108
|
} catch (importError) {
|
|
@@ -107,7 +110,8 @@ class Telemetry {
|
|
|
107
110
|
if (err.code === "ERR_MODULE_NOT_FOUND") {
|
|
108
111
|
throw TelemetryError.dependencyNotInstalled([
|
|
109
112
|
"@opentelemetry/sdk-node",
|
|
110
|
-
"@opentelemetry/
|
|
113
|
+
"@opentelemetry/instrumentation-http",
|
|
114
|
+
"@opentelemetry/instrumentation-undici",
|
|
111
115
|
"@opentelemetry/resources",
|
|
112
116
|
"@opentelemetry/semantic-conventions",
|
|
113
117
|
"@opentelemetry/sdk-trace-base",
|
|
@@ -126,7 +130,10 @@ class Telemetry {
|
|
|
126
130
|
sdk = new NodeSDK({
|
|
127
131
|
resource,
|
|
128
132
|
traceExporter,
|
|
129
|
-
instrumentations: [
|
|
133
|
+
instrumentations: [
|
|
134
|
+
new HttpInstrumentation(),
|
|
135
|
+
new UndiciInstrumentation()
|
|
136
|
+
]
|
|
130
137
|
});
|
|
131
138
|
await sdk.start();
|
|
132
139
|
const sigterm = () => {
|
package/dist/utils/index.cjs
CHANGED
|
@@ -27,6 +27,7 @@ __reExport(utils_exports, require("./debug.js"), module.exports);
|
|
|
27
27
|
__reExport(utils_exports, require("./safe-stringify.js"), module.exports);
|
|
28
28
|
__reExport(utils_exports, require("./api-key-resolver.js"), module.exports);
|
|
29
29
|
__reExport(utils_exports, require("./defer.js"), module.exports);
|
|
30
|
+
__reExport(utils_exports, require("./async-context.js"), module.exports);
|
|
30
31
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31
32
|
0 && (module.exports = {
|
|
32
33
|
...require("./path.js"),
|
|
@@ -40,5 +41,6 @@ __reExport(utils_exports, require("./defer.js"), module.exports);
|
|
|
40
41
|
...require("./debug.js"),
|
|
41
42
|
...require("./safe-stringify.js"),
|
|
42
43
|
...require("./api-key-resolver.js"),
|
|
43
|
-
...require("./defer.js")
|
|
44
|
+
...require("./defer.js"),
|
|
45
|
+
...require("./async-context.js")
|
|
44
46
|
});
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAKA,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAKA,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,15 +43,22 @@
|
|
|
43
43
|
"zod-to-json-schema": "^3.24.6"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
+
"@opentelemetry/instrumentation-http": "^0.210.0",
|
|
47
|
+
"@opentelemetry/instrumentation-undici": "^0.20.0",
|
|
48
|
+
"@opentelemetry/resources": "^1.28.0",
|
|
49
|
+
"@opentelemetry/sdk-node": "^0.55.0",
|
|
50
|
+
"@opentelemetry/sdk-trace-base": "^1.28.0",
|
|
51
|
+
"@opentelemetry/semantic-conventions": "^1.28.0",
|
|
46
52
|
"@types/diff": "^8.0.0",
|
|
47
53
|
"@types/json-schema": "^7.0.15",
|
|
48
54
|
"zod": "^3.25.0"
|
|
49
55
|
},
|
|
50
56
|
"peerDependencies": {
|
|
51
|
-
"@opentelemetry/auto-instrumentations-node": "^0.52.1",
|
|
52
57
|
"@opentelemetry/core": "^1.28.0",
|
|
53
58
|
"@opentelemetry/exporter-trace-otlp-grpc": "^0.55.0",
|
|
54
59
|
"@opentelemetry/exporter-trace-otlp-http": "^0.55.0",
|
|
60
|
+
"@opentelemetry/instrumentation-http": "^0.210.0",
|
|
61
|
+
"@opentelemetry/instrumentation-undici": "^0.20.0",
|
|
55
62
|
"@opentelemetry/resources": "^1.28.0",
|
|
56
63
|
"@opentelemetry/sdk-node": "^0.55.0",
|
|
57
64
|
"@opentelemetry/sdk-trace-base": "^1.28.0",
|
|
@@ -63,9 +70,6 @@
|
|
|
63
70
|
"zod": "^3.25.0"
|
|
64
71
|
},
|
|
65
72
|
"peerDependenciesMeta": {
|
|
66
|
-
"@opentelemetry/auto-instrumentations-node": {
|
|
67
|
-
"optional": true
|
|
68
|
-
},
|
|
69
73
|
"@opentelemetry/core": {
|
|
70
74
|
"optional": true
|
|
71
75
|
},
|
|
@@ -75,6 +79,12 @@
|
|
|
75
79
|
"@opentelemetry/exporter-trace-otlp-http": {
|
|
76
80
|
"optional": true
|
|
77
81
|
},
|
|
82
|
+
"@opentelemetry/instrumentation-http": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"@opentelemetry/instrumentation-undici": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
78
88
|
"@opentelemetry/resources": {
|
|
79
89
|
"optional": true
|
|
80
90
|
},
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var error_codes_exports = {};
|
|
20
|
-
__export(error_codes_exports, {
|
|
21
|
-
FileSystemErrorCode: () => FileSystemErrorCode
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(error_codes_exports);
|
|
24
|
-
var FileSystemErrorCode = /* @__PURE__ */ ((FileSystemErrorCode2) => {
|
|
25
|
-
FileSystemErrorCode2["FILE_NOT_FOUND"] = "FILESYSTEM_FILE_NOT_FOUND";
|
|
26
|
-
FileSystemErrorCode2["DIRECTORY_NOT_FOUND"] = "FILESYSTEM_DIRECTORY_NOT_FOUND";
|
|
27
|
-
FileSystemErrorCode2["PERMISSION_DENIED"] = "FILESYSTEM_PERMISSION_DENIED";
|
|
28
|
-
FileSystemErrorCode2["PATH_NOT_ALLOWED"] = "FILESYSTEM_PATH_NOT_ALLOWED";
|
|
29
|
-
FileSystemErrorCode2["PATH_BLOCKED"] = "FILESYSTEM_PATH_BLOCKED";
|
|
30
|
-
FileSystemErrorCode2["INVALID_PATH"] = "FILESYSTEM_INVALID_PATH";
|
|
31
|
-
FileSystemErrorCode2["PATH_TRAVERSAL_DETECTED"] = "FILESYSTEM_PATH_TRAVERSAL_DETECTED";
|
|
32
|
-
FileSystemErrorCode2["INVALID_FILE_EXTENSION"] = "FILESYSTEM_INVALID_FILE_EXTENSION";
|
|
33
|
-
FileSystemErrorCode2["INVALID_ENCODING"] = "FILESYSTEM_INVALID_ENCODING";
|
|
34
|
-
FileSystemErrorCode2["FILE_TOO_LARGE"] = "FILESYSTEM_FILE_TOO_LARGE";
|
|
35
|
-
FileSystemErrorCode2["TOO_MANY_RESULTS"] = "FILESYSTEM_TOO_MANY_RESULTS";
|
|
36
|
-
FileSystemErrorCode2["READ_FAILED"] = "FILESYSTEM_READ_FAILED";
|
|
37
|
-
FileSystemErrorCode2["WRITE_FAILED"] = "FILESYSTEM_WRITE_FAILED";
|
|
38
|
-
FileSystemErrorCode2["BACKUP_FAILED"] = "FILESYSTEM_BACKUP_FAILED";
|
|
39
|
-
FileSystemErrorCode2["EDIT_FAILED"] = "FILESYSTEM_EDIT_FAILED";
|
|
40
|
-
FileSystemErrorCode2["STRING_NOT_UNIQUE"] = "FILESYSTEM_STRING_NOT_UNIQUE";
|
|
41
|
-
FileSystemErrorCode2["STRING_NOT_FOUND"] = "FILESYSTEM_STRING_NOT_FOUND";
|
|
42
|
-
FileSystemErrorCode2["GLOB_FAILED"] = "FILESYSTEM_GLOB_FAILED";
|
|
43
|
-
FileSystemErrorCode2["SEARCH_FAILED"] = "FILESYSTEM_SEARCH_FAILED";
|
|
44
|
-
FileSystemErrorCode2["INVALID_PATTERN"] = "FILESYSTEM_INVALID_PATTERN";
|
|
45
|
-
FileSystemErrorCode2["REGEX_TIMEOUT"] = "FILESYSTEM_REGEX_TIMEOUT";
|
|
46
|
-
FileSystemErrorCode2["INVALID_CONFIG"] = "FILESYSTEM_INVALID_CONFIG";
|
|
47
|
-
FileSystemErrorCode2["SERVICE_NOT_INITIALIZED"] = "FILESYSTEM_SERVICE_NOT_INITIALIZED";
|
|
48
|
-
return FileSystemErrorCode2;
|
|
49
|
-
})(FileSystemErrorCode || {});
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
FileSystemErrorCode
|
|
53
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FileSystem Service Error Codes
|
|
3
|
-
*
|
|
4
|
-
* Standardized error codes for file system operations
|
|
5
|
-
*/
|
|
6
|
-
export declare enum FileSystemErrorCode {
|
|
7
|
-
FILE_NOT_FOUND = "FILESYSTEM_FILE_NOT_FOUND",
|
|
8
|
-
DIRECTORY_NOT_FOUND = "FILESYSTEM_DIRECTORY_NOT_FOUND",
|
|
9
|
-
PERMISSION_DENIED = "FILESYSTEM_PERMISSION_DENIED",
|
|
10
|
-
PATH_NOT_ALLOWED = "FILESYSTEM_PATH_NOT_ALLOWED",
|
|
11
|
-
PATH_BLOCKED = "FILESYSTEM_PATH_BLOCKED",
|
|
12
|
-
INVALID_PATH = "FILESYSTEM_INVALID_PATH",
|
|
13
|
-
PATH_TRAVERSAL_DETECTED = "FILESYSTEM_PATH_TRAVERSAL_DETECTED",
|
|
14
|
-
INVALID_FILE_EXTENSION = "FILESYSTEM_INVALID_FILE_EXTENSION",
|
|
15
|
-
INVALID_ENCODING = "FILESYSTEM_INVALID_ENCODING",
|
|
16
|
-
FILE_TOO_LARGE = "FILESYSTEM_FILE_TOO_LARGE",
|
|
17
|
-
TOO_MANY_RESULTS = "FILESYSTEM_TOO_MANY_RESULTS",
|
|
18
|
-
READ_FAILED = "FILESYSTEM_READ_FAILED",
|
|
19
|
-
WRITE_FAILED = "FILESYSTEM_WRITE_FAILED",
|
|
20
|
-
BACKUP_FAILED = "FILESYSTEM_BACKUP_FAILED",
|
|
21
|
-
EDIT_FAILED = "FILESYSTEM_EDIT_FAILED",
|
|
22
|
-
STRING_NOT_UNIQUE = "FILESYSTEM_STRING_NOT_UNIQUE",
|
|
23
|
-
STRING_NOT_FOUND = "FILESYSTEM_STRING_NOT_FOUND",
|
|
24
|
-
GLOB_FAILED = "FILESYSTEM_GLOB_FAILED",
|
|
25
|
-
SEARCH_FAILED = "FILESYSTEM_SEARCH_FAILED",
|
|
26
|
-
INVALID_PATTERN = "FILESYSTEM_INVALID_PATTERN",
|
|
27
|
-
REGEX_TIMEOUT = "FILESYSTEM_REGEX_TIMEOUT",
|
|
28
|
-
INVALID_CONFIG = "FILESYSTEM_INVALID_CONFIG",
|
|
29
|
-
SERVICE_NOT_INITIALIZED = "FILESYSTEM_SERVICE_NOT_INITIALIZED"
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=error-codes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/filesystem/error-codes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oBAAY,mBAAmB;IAE3B,cAAc,8BAA8B;IAC5C,mBAAmB,mCAAmC;IAGtD,iBAAiB,iCAAiC;IAClD,gBAAgB,gCAAgC;IAChD,YAAY,4BAA4B;IAGxC,YAAY,4BAA4B;IACxC,uBAAuB,uCAAuC;IAC9D,sBAAsB,sCAAsC;IAC5D,gBAAgB,gCAAgC;IAGhD,cAAc,8BAA8B;IAC5C,gBAAgB,gCAAgC;IAGhD,WAAW,2BAA2B;IACtC,YAAY,4BAA4B;IACxC,aAAa,6BAA6B;IAC1C,WAAW,2BAA2B;IACtC,iBAAiB,iCAAiC;IAClD,gBAAgB,gCAAgC;IAGhD,WAAW,2BAA2B;IACtC,aAAa,6BAA6B;IAC1C,eAAe,+BAA+B;IAC9C,aAAa,6BAA6B;IAG1C,cAAc,8BAA8B;IAC5C,uBAAuB,uCAAuC;CACjE"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import "../chunk-PTJYTZNU.js";
|
|
2
|
-
var FileSystemErrorCode = /* @__PURE__ */ ((FileSystemErrorCode2) => {
|
|
3
|
-
FileSystemErrorCode2["FILE_NOT_FOUND"] = "FILESYSTEM_FILE_NOT_FOUND";
|
|
4
|
-
FileSystemErrorCode2["DIRECTORY_NOT_FOUND"] = "FILESYSTEM_DIRECTORY_NOT_FOUND";
|
|
5
|
-
FileSystemErrorCode2["PERMISSION_DENIED"] = "FILESYSTEM_PERMISSION_DENIED";
|
|
6
|
-
FileSystemErrorCode2["PATH_NOT_ALLOWED"] = "FILESYSTEM_PATH_NOT_ALLOWED";
|
|
7
|
-
FileSystemErrorCode2["PATH_BLOCKED"] = "FILESYSTEM_PATH_BLOCKED";
|
|
8
|
-
FileSystemErrorCode2["INVALID_PATH"] = "FILESYSTEM_INVALID_PATH";
|
|
9
|
-
FileSystemErrorCode2["PATH_TRAVERSAL_DETECTED"] = "FILESYSTEM_PATH_TRAVERSAL_DETECTED";
|
|
10
|
-
FileSystemErrorCode2["INVALID_FILE_EXTENSION"] = "FILESYSTEM_INVALID_FILE_EXTENSION";
|
|
11
|
-
FileSystemErrorCode2["INVALID_ENCODING"] = "FILESYSTEM_INVALID_ENCODING";
|
|
12
|
-
FileSystemErrorCode2["FILE_TOO_LARGE"] = "FILESYSTEM_FILE_TOO_LARGE";
|
|
13
|
-
FileSystemErrorCode2["TOO_MANY_RESULTS"] = "FILESYSTEM_TOO_MANY_RESULTS";
|
|
14
|
-
FileSystemErrorCode2["READ_FAILED"] = "FILESYSTEM_READ_FAILED";
|
|
15
|
-
FileSystemErrorCode2["WRITE_FAILED"] = "FILESYSTEM_WRITE_FAILED";
|
|
16
|
-
FileSystemErrorCode2["BACKUP_FAILED"] = "FILESYSTEM_BACKUP_FAILED";
|
|
17
|
-
FileSystemErrorCode2["EDIT_FAILED"] = "FILESYSTEM_EDIT_FAILED";
|
|
18
|
-
FileSystemErrorCode2["STRING_NOT_UNIQUE"] = "FILESYSTEM_STRING_NOT_UNIQUE";
|
|
19
|
-
FileSystemErrorCode2["STRING_NOT_FOUND"] = "FILESYSTEM_STRING_NOT_FOUND";
|
|
20
|
-
FileSystemErrorCode2["GLOB_FAILED"] = "FILESYSTEM_GLOB_FAILED";
|
|
21
|
-
FileSystemErrorCode2["SEARCH_FAILED"] = "FILESYSTEM_SEARCH_FAILED";
|
|
22
|
-
FileSystemErrorCode2["INVALID_PATTERN"] = "FILESYSTEM_INVALID_PATTERN";
|
|
23
|
-
FileSystemErrorCode2["REGEX_TIMEOUT"] = "FILESYSTEM_REGEX_TIMEOUT";
|
|
24
|
-
FileSystemErrorCode2["INVALID_CONFIG"] = "FILESYSTEM_INVALID_CONFIG";
|
|
25
|
-
FileSystemErrorCode2["SERVICE_NOT_INITIALIZED"] = "FILESYSTEM_SERVICE_NOT_INITIALIZED";
|
|
26
|
-
return FileSystemErrorCode2;
|
|
27
|
-
})(FileSystemErrorCode || {});
|
|
28
|
-
export {
|
|
29
|
-
FileSystemErrorCode
|
|
30
|
-
};
|