apcore-js 0.5.0 → 0.7.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/README.md +1 -1
- package/dist/acl.d.ts +27 -0
- package/dist/acl.d.ts.map +1 -0
- package/dist/acl.js +175 -0
- package/dist/acl.js.map +1 -0
- package/dist/approval.d.ts +85 -0
- package/dist/approval.d.ts.map +1 -0
- package/dist/approval.js +73 -0
- package/dist/approval.js.map +1 -0
- package/dist/async-task.d.ts +90 -0
- package/dist/async-task.d.ts.map +1 -0
- package/dist/async-task.js +215 -0
- package/dist/async-task.js.map +1 -0
- package/dist/bindings.d.ts +12 -0
- package/dist/bindings.d.ts.map +1 -0
- package/dist/bindings.js +185 -0
- package/dist/bindings.js.map +1 -0
- package/dist/cancel.d.ts +14 -0
- package/dist/cancel.d.ts.map +1 -0
- package/dist/cancel.js +27 -0
- package/dist/cancel.js.map +1 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +23 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +50 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +87 -0
- package/dist/context.js.map +1 -0
- package/dist/decorator.d.ts +57 -0
- package/dist/decorator.d.ts.map +1 -0
- package/dist/decorator.js +74 -0
- package/dist/decorator.js.map +1 -0
- package/dist/errors.d.ts +204 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +364 -0
- package/dist/errors.js.map +1 -0
- package/dist/executor.d.ts +82 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +489 -0
- package/dist/executor.js.map +1 -0
- package/dist/extensions.d.ts +58 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +239 -0
- package/dist/extensions.js.map +1 -0
- package/{src/index.ts → dist/index.d.ts} +6 -63
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/adapters.d.ts +18 -0
- package/dist/middleware/adapters.d.ts.map +1 -0
- package/dist/middleware/adapters.js +25 -0
- package/dist/middleware/adapters.js.map +1 -0
- package/dist/middleware/base.d.ts +10 -0
- package/dist/middleware/base.d.ts.map +1 -0
- package/dist/middleware/base.js +15 -0
- package/dist/middleware/base.js.map +1 -0
- package/{src/middleware/index.ts → dist/middleware/index.d.ts} +1 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +5 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/logging.d.ts +25 -0
- package/dist/middleware/logging.d.ts.map +1 -0
- package/dist/middleware/logging.js +64 -0
- package/dist/middleware/logging.js.map +1 -0
- package/dist/middleware/manager.d.ts +21 -0
- package/dist/middleware/manager.d.ts.map +1 -0
- package/dist/middleware/manager.js +77 -0
- package/dist/middleware/manager.js.map +1 -0
- package/dist/module.d.ts +31 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +12 -0
- package/dist/module.js.map +1 -0
- package/dist/observability/context-logger.d.ts +54 -0
- package/dist/observability/context-logger.d.ts.map +1 -0
- package/dist/observability/context-logger.js +151 -0
- package/dist/observability/context-logger.js.map +1 -0
- package/{src/observability/index.ts → dist/observability/index.d.ts} +1 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +4 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/metrics.d.ts +30 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/metrics.js +177 -0
- package/dist/observability/metrics.js.map +1 -0
- package/dist/observability/tracing.d.ts +62 -0
- package/dist/observability/tracing.d.ts.map +1 -0
- package/dist/observability/tracing.js +184 -0
- package/dist/observability/tracing.js.map +1 -0
- package/dist/registry/dependencies.d.ts +6 -0
- package/dist/registry/dependencies.d.ts.map +1 -0
- package/dist/registry/dependencies.js +83 -0
- package/dist/registry/dependencies.js.map +1 -0
- package/dist/registry/entry-point.d.ts +6 -0
- package/dist/registry/entry-point.d.ts.map +1 -0
- package/dist/registry/entry-point.js +55 -0
- package/dist/registry/entry-point.js.map +1 -0
- package/{src/registry/index.ts → dist/registry/index.d.ts} +1 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +8 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/metadata.d.ts +9 -0
- package/dist/registry/metadata.d.ts.map +1 -0
- package/dist/registry/metadata.js +105 -0
- package/dist/registry/metadata.js.map +1 -0
- package/dist/registry/registry.d.ts +102 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +534 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/registry/scanner.d.ts +7 -0
- package/dist/registry/scanner.d.ts.map +1 -0
- package/dist/registry/scanner.js +164 -0
- package/dist/registry/scanner.js.map +1 -0
- package/dist/registry/schema-export.d.ts +9 -0
- package/dist/registry/schema-export.d.ts.map +1 -0
- package/dist/registry/schema-export.js +132 -0
- package/dist/registry/schema-export.js.map +1 -0
- package/dist/registry/types.d.ts +29 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +5 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/registry/validation.d.ts +9 -0
- package/dist/registry/validation.d.ts.map +1 -0
- package/dist/registry/validation.js +33 -0
- package/dist/registry/validation.js.map +1 -0
- package/dist/schema/annotations.d.ts +8 -0
- package/dist/schema/annotations.d.ts.map +1 -0
- package/dist/schema/annotations.js +52 -0
- package/dist/schema/annotations.js.map +1 -0
- package/dist/schema/exporter.d.ts +13 -0
- package/dist/schema/exporter.d.ts.map +1 -0
- package/dist/schema/exporter.js +71 -0
- package/dist/schema/exporter.js.map +1 -0
- package/dist/schema/index.d.ts +9 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/{src/schema/index.ts → dist/schema/index.js} +1 -7
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/loader.d.ts +30 -0
- package/dist/schema/loader.d.ts.map +1 -0
- package/dist/schema/loader.js +260 -0
- package/dist/schema/loader.js.map +1 -0
- package/dist/schema/ref-resolver.d.ts +19 -0
- package/dist/schema/ref-resolver.d.ts.map +1 -0
- package/dist/schema/ref-resolver.js +212 -0
- package/dist/schema/ref-resolver.js.map +1 -0
- package/dist/schema/strict.d.ts +7 -0
- package/dist/schema/strict.d.ts.map +1 -0
- package/dist/schema/strict.js +127 -0
- package/dist/schema/strict.js.map +1 -0
- package/dist/schema/types.d.ts +53 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/types.js +31 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/schema/validator.d.ts +16 -0
- package/dist/schema/validator.d.ts.map +1 -0
- package/dist/schema/validator.js +71 -0
- package/dist/schema/validator.js.map +1 -0
- package/dist/trace-context.d.ts +35 -0
- package/dist/trace-context.d.ts.map +1 -0
- package/dist/trace-context.js +86 -0
- package/dist/trace-context.js.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +32 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/pattern.d.ts +5 -0
- package/dist/utils/pattern.d.ts.map +1 -0
- package/dist/utils/pattern.js +31 -0
- package/dist/utils/pattern.js.map +1 -0
- package/package.json +24 -3
- package/.claude/settings.local.json +0 -12
- package/.github/workflows/ci.yml +0 -39
- package/.gitmessage +0 -60
- package/.pre-commit-config.yaml +0 -28
- package/CHANGELOG.md +0 -214
- package/CLAUDE.md +0 -68
- package/apcore-logo.svg +0 -79
- package/planning/acl-system/overview.md +0 -54
- package/planning/acl-system/plan.md +0 -92
- package/planning/acl-system/state.json +0 -76
- package/planning/acl-system/tasks/acl-core.md +0 -226
- package/planning/acl-system/tasks/acl-rule.md +0 -92
- package/planning/acl-system/tasks/conditional-rules.md +0 -259
- package/planning/acl-system/tasks/pattern-matching.md +0 -152
- package/planning/acl-system/tasks/yaml-loading.md +0 -271
- package/planning/core-executor/overview.md +0 -53
- package/planning/core-executor/plan.md +0 -88
- package/planning/core-executor/state.json +0 -76
- package/planning/core-executor/tasks/async-support.md +0 -106
- package/planning/core-executor/tasks/execution-pipeline.md +0 -113
- package/planning/core-executor/tasks/redaction.md +0 -85
- package/planning/core-executor/tasks/safety-checks.md +0 -65
- package/planning/core-executor/tasks/setup.md +0 -75
- package/planning/decorator-bindings/overview.md +0 -62
- package/planning/decorator-bindings/plan.md +0 -104
- package/planning/decorator-bindings/state.json +0 -87
- package/planning/decorator-bindings/tasks/binding-directory.md +0 -79
- package/planning/decorator-bindings/tasks/binding-loader.md +0 -148
- package/planning/decorator-bindings/tasks/explicit-schemas.md +0 -85
- package/planning/decorator-bindings/tasks/function-module.md +0 -127
- package/planning/decorator-bindings/tasks/module-factory.md +0 -89
- package/planning/decorator-bindings/tasks/schema-modes.md +0 -142
- package/planning/middleware-system/overview.md +0 -48
- package/planning/middleware-system/plan.md +0 -102
- package/planning/middleware-system/state.json +0 -65
- package/planning/middleware-system/tasks/adapters.md +0 -170
- package/planning/middleware-system/tasks/base.md +0 -115
- package/planning/middleware-system/tasks/logging-middleware.md +0 -304
- package/planning/middleware-system/tasks/manager.md +0 -313
- package/planning/observability/overview.md +0 -53
- package/planning/observability/plan.md +0 -119
- package/planning/observability/state.json +0 -98
- package/planning/observability/tasks/context-logger.md +0 -201
- package/planning/observability/tasks/exporters.md +0 -121
- package/planning/observability/tasks/metrics-collector.md +0 -162
- package/planning/observability/tasks/metrics-middleware.md +0 -141
- package/planning/observability/tasks/obs-logging-middleware.md +0 -179
- package/planning/observability/tasks/span-model.md +0 -120
- package/planning/observability/tasks/tracing-middleware.md +0 -179
- package/planning/overview.md +0 -81
- package/planning/registry-system/overview.md +0 -57
- package/planning/registry-system/plan.md +0 -114
- package/planning/registry-system/state.json +0 -109
- package/planning/registry-system/tasks/dependencies.md +0 -157
- package/planning/registry-system/tasks/entry-point.md +0 -148
- package/planning/registry-system/tasks/metadata.md +0 -198
- package/planning/registry-system/tasks/registry-core.md +0 -323
- package/planning/registry-system/tasks/scanner.md +0 -172
- package/planning/registry-system/tasks/schema-export.md +0 -261
- package/planning/registry-system/tasks/types.md +0 -124
- package/planning/registry-system/tasks/validation.md +0 -177
- package/planning/schema-system/overview.md +0 -56
- package/planning/schema-system/plan.md +0 -121
- package/planning/schema-system/state.json +0 -98
- package/planning/schema-system/tasks/exporter.md +0 -153
- package/planning/schema-system/tasks/loader.md +0 -106
- package/planning/schema-system/tasks/ref-resolver.md +0 -133
- package/planning/schema-system/tasks/strict-mode.md +0 -140
- package/planning/schema-system/tasks/typebox-generation.md +0 -133
- package/planning/schema-system/tasks/types-and-annotations.md +0 -160
- package/planning/schema-system/tasks/validator.md +0 -149
- package/src/acl.ts +0 -200
- package/src/async-task.ts +0 -267
- package/src/bindings.ts +0 -207
- package/src/cancel.ts +0 -32
- package/src/config.ts +0 -24
- package/src/context.ts +0 -160
- package/src/decorator.ts +0 -110
- package/src/errors.ts +0 -429
- package/src/executor.ts +0 -493
- package/src/extensions.ts +0 -265
- package/src/middleware/adapters.ts +0 -54
- package/src/middleware/base.ts +0 -33
- package/src/middleware/logging.ts +0 -103
- package/src/middleware/manager.ts +0 -105
- package/src/module.ts +0 -43
- package/src/observability/context-logger.ts +0 -203
- package/src/observability/metrics.ts +0 -214
- package/src/observability/tracing.ts +0 -252
- package/src/registry/dependencies.ts +0 -99
- package/src/registry/entry-point.ts +0 -64
- package/src/registry/metadata.ts +0 -111
- package/src/registry/registry.ts +0 -580
- package/src/registry/scanner.ts +0 -168
- package/src/registry/schema-export.ts +0 -181
- package/src/registry/types.ts +0 -32
- package/src/registry/validation.ts +0 -38
- package/src/schema/annotations.ts +0 -68
- package/src/schema/exporter.ts +0 -90
- package/src/schema/loader.ts +0 -273
- package/src/schema/ref-resolver.ts +0 -244
- package/src/schema/strict.ts +0 -136
- package/src/schema/types.ts +0 -73
- package/src/schema/validator.ts +0 -82
- package/src/trace-context.ts +0 -102
- package/src/utils/index.ts +0 -5
- package/src/utils/pattern.ts +0 -30
- package/tests/async-task.test.ts +0 -335
- package/tests/helpers.ts +0 -30
- package/tests/integration/test-acl-safety.test.ts +0 -269
- package/tests/integration/test-binding-executor.test.ts +0 -194
- package/tests/integration/test-e2e-flow.test.ts +0 -117
- package/tests/integration/test-error-propagation.test.ts +0 -259
- package/tests/integration/test-middleware-chain.test.ts +0 -120
- package/tests/integration/test-observability-integration.test.ts +0 -438
- package/tests/observability/test-context-logger.test.ts +0 -123
- package/tests/observability/test-metrics.test.ts +0 -186
- package/tests/observability/test-tracing.test.ts +0 -303
- package/tests/registry/test-dependencies.test.ts +0 -70
- package/tests/registry/test-entry-point.test.ts +0 -133
- package/tests/registry/test-metadata.test.ts +0 -265
- package/tests/registry/test-registry.test.ts +0 -1397
- package/tests/registry/test-scanner.test.ts +0 -257
- package/tests/registry/test-schema-export.test.ts +0 -355
- package/tests/registry/test-validation.test.ts +0 -75
- package/tests/schema/test-annotations.test.ts +0 -137
- package/tests/schema/test-exporter.test.ts +0 -172
- package/tests/schema/test-loader.test.ts +0 -461
- package/tests/schema/test-ref-resolver.test.ts +0 -530
- package/tests/schema/test-strict.test.ts +0 -348
- package/tests/schema/test-validator.test.ts +0 -64
- package/tests/test-acl.test.ts +0 -423
- package/tests/test-bindings.test.ts +0 -227
- package/tests/test-cancel.test.ts +0 -71
- package/tests/test-config.test.ts +0 -76
- package/tests/test-context.test.ts +0 -266
- package/tests/test-decorator.test.ts +0 -173
- package/tests/test-errors.test.ts +0 -647
- package/tests/test-executor-stream.test.ts +0 -208
- package/tests/test-executor.test.ts +0 -252
- package/tests/test-extensions.test.ts +0 -310
- package/tests/test-logging-middleware.test.ts +0 -150
- package/tests/test-middleware-manager.test.ts +0 -185
- package/tests/test-middleware.test.ts +0 -86
- package/tests/test-trace-context.test.ts +0 -251
- package/tests/utils/test-pattern.test.ts +0 -109
- package/tsconfig.build.json +0 -8
- package/tsconfig.json +0 -20
- package/vitest.config.ts +0 -18
package/dist/context.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
export function createIdentity(id, type = 'user', roles = [], attrs = {}) {
|
|
3
|
+
return Object.freeze({ id, type, roles: Object.freeze([...roles]), attrs: Object.freeze({ ...attrs }) });
|
|
4
|
+
}
|
|
5
|
+
export class Context {
|
|
6
|
+
traceId;
|
|
7
|
+
callerId;
|
|
8
|
+
callChain;
|
|
9
|
+
executor;
|
|
10
|
+
identity;
|
|
11
|
+
redactedInputs;
|
|
12
|
+
data;
|
|
13
|
+
cancelToken;
|
|
14
|
+
constructor(traceId, callerId = null, callChain = [], executor = null, identity = null, redactedInputs = null, data = {}, cancelToken = null) {
|
|
15
|
+
this.traceId = traceId;
|
|
16
|
+
this.callerId = callerId;
|
|
17
|
+
this.callChain = Object.freeze([...callChain]);
|
|
18
|
+
this.executor = executor;
|
|
19
|
+
this.identity = identity;
|
|
20
|
+
this.redactedInputs = redactedInputs;
|
|
21
|
+
this.data = data;
|
|
22
|
+
this.cancelToken = cancelToken;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Create a new top-level Context with a generated UUID v4 traceId.
|
|
26
|
+
*
|
|
27
|
+
* When `traceParent` is provided, its `traceId` (32 hex chars) is
|
|
28
|
+
* converted to UUID format (8-4-4-4-12) and used instead of generating
|
|
29
|
+
* a new one.
|
|
30
|
+
*/
|
|
31
|
+
static create(executor = null, identity = null, data, traceParent) {
|
|
32
|
+
let traceId;
|
|
33
|
+
if (traceParent) {
|
|
34
|
+
const h = traceParent.traceId;
|
|
35
|
+
traceId = `${h.slice(0, 8)}-${h.slice(8, 12)}-${h.slice(12, 16)}-${h.slice(16, 20)}-${h.slice(20)}`;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
traceId = uuidv4();
|
|
39
|
+
}
|
|
40
|
+
return new Context(traceId, null, [], executor, identity, null, data ?? {});
|
|
41
|
+
}
|
|
42
|
+
toJSON() {
|
|
43
|
+
const publicData = {};
|
|
44
|
+
for (const [key, value] of Object.entries(this.data)) {
|
|
45
|
+
if (!key.startsWith('_')) {
|
|
46
|
+
publicData[key] = value;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
traceId: this.traceId,
|
|
51
|
+
callerId: this.callerId,
|
|
52
|
+
callChain: [...this.callChain],
|
|
53
|
+
identity: this.identity ? {
|
|
54
|
+
id: this.identity.id,
|
|
55
|
+
type: this.identity.type,
|
|
56
|
+
roles: [...this.identity.roles],
|
|
57
|
+
attrs: { ...this.identity.attrs },
|
|
58
|
+
} : null,
|
|
59
|
+
redactedInputs: this.redactedInputs ? { ...this.redactedInputs } : null,
|
|
60
|
+
data: publicData,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static fromJSON(data, executor) {
|
|
64
|
+
const identityData = data.identity;
|
|
65
|
+
const identity = identityData ? {
|
|
66
|
+
id: identityData.id,
|
|
67
|
+
type: identityData.type ?? 'user',
|
|
68
|
+
roles: Object.freeze([...(Array.isArray(identityData.roles) ? identityData.roles : [])]),
|
|
69
|
+
attrs: Object.freeze((identityData.attrs && typeof identityData.attrs === 'object' ? identityData.attrs : {})),
|
|
70
|
+
} : null;
|
|
71
|
+
return new Context(data.traceId, data.callerId ?? null, data.callChain ?? [], executor ?? null, identity, data.redactedInputs ?? null, data.data ? { ...data.data } : {});
|
|
72
|
+
}
|
|
73
|
+
get logger() {
|
|
74
|
+
const prefix = `[apcore:${this.callerId ?? 'unknown'}]`;
|
|
75
|
+
return {
|
|
76
|
+
debug: (...args) => console.debug(prefix, ...args),
|
|
77
|
+
info: (...args) => console.info(prefix, ...args),
|
|
78
|
+
warn: (...args) => console.warn(prefix, ...args),
|
|
79
|
+
error: (...args) => console.error(prefix, ...args),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
child(targetModuleId) {
|
|
83
|
+
return new Context(this.traceId, this.callChain.length > 0 ? this.callChain[this.callChain.length - 1] : null, [...this.callChain, targetModuleId], this.executor, this.identity, null, this.data, // shared reference
|
|
84
|
+
this.cancelToken);
|
|
85
|
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
/**
|
|
2
|
+
* Module factory, FunctionModule wrapper.
|
|
3
|
+
*
|
|
4
|
+
* TypeScript version uses explicit TypeBox schemas instead of runtime type inference.
|
|
5
|
+
*/
|
|
6
|
+
import type { TSchema } from '@sinclair/typebox';
|
|
7
|
+
import type { Context } from './context.js';
|
|
8
|
+
import type { ModuleAnnotations, ModuleExample } from './module.js';
|
|
9
|
+
export declare function normalizeResult(result: unknown): Record<string, unknown>;
|
|
10
|
+
export declare class FunctionModule {
|
|
11
|
+
readonly moduleId: string;
|
|
12
|
+
readonly inputSchema: TSchema;
|
|
13
|
+
readonly outputSchema: TSchema;
|
|
14
|
+
readonly description: string;
|
|
15
|
+
readonly documentation: string | null;
|
|
16
|
+
readonly tags: string[] | null;
|
|
17
|
+
readonly version: string;
|
|
18
|
+
readonly annotations: ModuleAnnotations | null;
|
|
19
|
+
readonly metadata: Record<string, unknown> | null;
|
|
20
|
+
readonly examples: ModuleExample[] | null;
|
|
21
|
+
private _executeFn;
|
|
22
|
+
constructor(options: {
|
|
23
|
+
execute: (inputs: Record<string, unknown>, context: Context) => Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
24
|
+
moduleId: string;
|
|
25
|
+
inputSchema: TSchema;
|
|
26
|
+
outputSchema: TSchema;
|
|
27
|
+
description?: string;
|
|
28
|
+
documentation?: string | null;
|
|
29
|
+
tags?: string[] | null;
|
|
30
|
+
version?: string;
|
|
31
|
+
annotations?: ModuleAnnotations | null;
|
|
32
|
+
metadata?: Record<string, unknown> | null;
|
|
33
|
+
examples?: ModuleExample[] | null;
|
|
34
|
+
});
|
|
35
|
+
execute(inputs: Record<string, unknown>, context: Context): Promise<Record<string, unknown>>;
|
|
36
|
+
}
|
|
37
|
+
export declare function makeAutoId(name: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Create a FunctionModule from options. TypeScript version requires explicit schemas.
|
|
40
|
+
*/
|
|
41
|
+
export declare function module(options: {
|
|
42
|
+
id?: string;
|
|
43
|
+
inputSchema: TSchema;
|
|
44
|
+
outputSchema: TSchema;
|
|
45
|
+
description?: string;
|
|
46
|
+
documentation?: string | null;
|
|
47
|
+
annotations?: ModuleAnnotations | null;
|
|
48
|
+
tags?: string[] | null;
|
|
49
|
+
version?: string;
|
|
50
|
+
metadata?: Record<string, unknown> | null;
|
|
51
|
+
examples?: ModuleExample[] | null;
|
|
52
|
+
execute: (inputs: Record<string, unknown>, context: Context) => Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
53
|
+
registry?: {
|
|
54
|
+
register(moduleId: string, module: unknown): void;
|
|
55
|
+
} | null;
|
|
56
|
+
}): FunctionModule;
|
|
57
|
+
//# sourceMappingURL=decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../src/decorator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpE,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIxE;AAED,qBAAa,cAAc;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC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ACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3H,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE,GAAG,cAAc,CAsBjB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module factory, FunctionModule wrapper.
|
|
3
|
+
*
|
|
4
|
+
* TypeScript version uses explicit TypeBox schemas instead of runtime type inference.
|
|
5
|
+
*/
|
|
6
|
+
export function normalizeResult(result) {
|
|
7
|
+
if (result === null || result === undefined)
|
|
8
|
+
return {};
|
|
9
|
+
if (typeof result === 'object' && !Array.isArray(result))
|
|
10
|
+
return result;
|
|
11
|
+
return { result };
|
|
12
|
+
}
|
|
13
|
+
export class FunctionModule {
|
|
14
|
+
moduleId;
|
|
15
|
+
inputSchema;
|
|
16
|
+
outputSchema;
|
|
17
|
+
description;
|
|
18
|
+
documentation;
|
|
19
|
+
tags;
|
|
20
|
+
version;
|
|
21
|
+
annotations;
|
|
22
|
+
metadata;
|
|
23
|
+
examples;
|
|
24
|
+
_executeFn;
|
|
25
|
+
constructor(options) {
|
|
26
|
+
this.moduleId = options.moduleId;
|
|
27
|
+
this.inputSchema = options.inputSchema;
|
|
28
|
+
this.outputSchema = options.outputSchema;
|
|
29
|
+
this.description = options.description ?? `Module ${options.moduleId}`;
|
|
30
|
+
this.documentation = options.documentation ?? null;
|
|
31
|
+
this.tags = options.tags ?? null;
|
|
32
|
+
this.version = options.version ?? '1.0.0';
|
|
33
|
+
this.annotations = options.annotations ?? null;
|
|
34
|
+
this.metadata = options.metadata ?? null;
|
|
35
|
+
this.examples = options.examples ?? null;
|
|
36
|
+
this._executeFn = options.execute;
|
|
37
|
+
}
|
|
38
|
+
async execute(inputs, context) {
|
|
39
|
+
const result = await this._executeFn(inputs, context);
|
|
40
|
+
return normalizeResult(result);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export function makeAutoId(name) {
|
|
44
|
+
let raw = name.toLowerCase();
|
|
45
|
+
raw = raw.replace(/[^a-z0-9_.]/g, '_');
|
|
46
|
+
const segments = raw.split('.');
|
|
47
|
+
return segments
|
|
48
|
+
.map((s) => (s && s[0] >= '0' && s[0] <= '9' ? '_' + s : s))
|
|
49
|
+
.join('.');
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Create a FunctionModule from options. TypeScript version requires explicit schemas.
|
|
53
|
+
*/
|
|
54
|
+
export function module(options) {
|
|
55
|
+
const moduleId = options.id ?? makeAutoId('anonymous');
|
|
56
|
+
const fm = new FunctionModule({
|
|
57
|
+
execute: options.execute,
|
|
58
|
+
moduleId,
|
|
59
|
+
inputSchema: options.inputSchema,
|
|
60
|
+
outputSchema: options.outputSchema,
|
|
61
|
+
description: options.description,
|
|
62
|
+
documentation: options.documentation,
|
|
63
|
+
tags: options.tags,
|
|
64
|
+
version: options.version,
|
|
65
|
+
annotations: options.annotations,
|
|
66
|
+
metadata: options.metadata,
|
|
67
|
+
examples: options.examples,
|
|
68
|
+
});
|
|
69
|
+
if (options.registry) {
|
|
70
|
+
options.registry.register(fm.moduleId, fm);
|
|
71
|
+
}
|
|
72
|
+
return fm;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorator.js","sourceRoot":"","sources":["../src/decorator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,UAAU,eAAe,CAAC,MAAe;IAC7C,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACvD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,MAAiC,CAAC;IACnG,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC;AAED,MAAM,OAAO,cAAc;IAChB,QAAQ,CAAS;IACjB,WAAW,CAAU;IACrB,YAAY,CAAU;IACtB,WAAW,CAAS;IACpB,aAAa,CAAgB;IAC7B,IAAI,CAAkB;IACtB,OAAO,CAAS;IAChB,WAAW,CAA2B;IACtC,QAAQ,CAAiC;IACzC,QAAQ,CAAyB;IAElC,UAAU,CAAoH;IAEtI,YAAY,OAYX;QACC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,UAAU,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvE,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,IAAI,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC;QAC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ChC,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error hierarchy for the apcore framework.
|
|
3
|
+
*/
|
|
4
|
+
export interface ErrorOptions {
|
|
5
|
+
cause?: Error;
|
|
6
|
+
traceId?: string;
|
|
7
|
+
retryable?: boolean | null;
|
|
8
|
+
aiGuidance?: string | null;
|
|
9
|
+
userFixable?: boolean | null;
|
|
10
|
+
suggestion?: string | null;
|
|
11
|
+
}
|
|
12
|
+
export declare class ModuleError extends Error {
|
|
13
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
14
|
+
readonly code: string;
|
|
15
|
+
readonly details: Record<string, unknown>;
|
|
16
|
+
readonly cause?: Error;
|
|
17
|
+
readonly traceId?: string;
|
|
18
|
+
readonly timestamp: string;
|
|
19
|
+
readonly retryable: boolean | null;
|
|
20
|
+
readonly aiGuidance: string | null;
|
|
21
|
+
readonly userFixable: boolean | null;
|
|
22
|
+
readonly suggestion: string | null;
|
|
23
|
+
constructor(code: string, message: string, details?: Record<string, unknown>, cause?: Error, traceId?: string, retryable?: boolean | null, aiGuidance?: string | null, userFixable?: boolean | null, suggestion?: string | null);
|
|
24
|
+
toString(): string;
|
|
25
|
+
toJSON(): Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
export declare class ConfigNotFoundError extends ModuleError {
|
|
28
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
29
|
+
constructor(configPath: string, options?: ErrorOptions);
|
|
30
|
+
}
|
|
31
|
+
export declare class ConfigError extends ModuleError {
|
|
32
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
33
|
+
constructor(message: string, options?: ErrorOptions);
|
|
34
|
+
}
|
|
35
|
+
export declare class ACLRuleError extends ModuleError {
|
|
36
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
37
|
+
constructor(message: string, options?: ErrorOptions);
|
|
38
|
+
}
|
|
39
|
+
export declare class ACLDeniedError extends ModuleError {
|
|
40
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
41
|
+
constructor(callerId: string | null, targetId: string, options?: ErrorOptions);
|
|
42
|
+
get callerId(): string | null;
|
|
43
|
+
get targetId(): string;
|
|
44
|
+
}
|
|
45
|
+
export declare class ModuleNotFoundError extends ModuleError {
|
|
46
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
47
|
+
constructor(moduleId: string, options?: ErrorOptions);
|
|
48
|
+
}
|
|
49
|
+
export declare class ModuleTimeoutError extends ModuleError {
|
|
50
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
51
|
+
constructor(moduleId: string, timeoutMs: number, options?: ErrorOptions);
|
|
52
|
+
get moduleId(): string;
|
|
53
|
+
get timeoutMs(): number;
|
|
54
|
+
}
|
|
55
|
+
export declare class SchemaValidationError extends ModuleError {
|
|
56
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
57
|
+
constructor(message?: string, errors?: Array<Record<string, unknown>>, options?: ErrorOptions);
|
|
58
|
+
}
|
|
59
|
+
export declare class SchemaNotFoundError extends ModuleError {
|
|
60
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
61
|
+
constructor(schemaId: string, options?: ErrorOptions);
|
|
62
|
+
}
|
|
63
|
+
export declare class SchemaParseError extends ModuleError {
|
|
64
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
65
|
+
constructor(message: string, options?: ErrorOptions);
|
|
66
|
+
}
|
|
67
|
+
export declare class SchemaCircularRefError extends ModuleError {
|
|
68
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
69
|
+
constructor(refPath: string, options?: ErrorOptions);
|
|
70
|
+
}
|
|
71
|
+
export declare class CallDepthExceededError extends ModuleError {
|
|
72
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
73
|
+
constructor(depth: number, maxDepth: number, callChain: string[], options?: ErrorOptions);
|
|
74
|
+
get currentDepth(): number;
|
|
75
|
+
get maxDepth(): number;
|
|
76
|
+
}
|
|
77
|
+
export declare class CircularCallError extends ModuleError {
|
|
78
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
79
|
+
constructor(moduleId: string, callChain: string[], options?: ErrorOptions);
|
|
80
|
+
get moduleId(): string;
|
|
81
|
+
}
|
|
82
|
+
export declare class CallFrequencyExceededError extends ModuleError {
|
|
83
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
84
|
+
constructor(moduleId: string, count: number, maxRepeat: number, callChain: string[], options?: ErrorOptions);
|
|
85
|
+
get moduleId(): string;
|
|
86
|
+
get count(): number;
|
|
87
|
+
get maxRepeat(): number;
|
|
88
|
+
}
|
|
89
|
+
export declare class InvalidInputError extends ModuleError {
|
|
90
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
91
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
92
|
+
}
|
|
93
|
+
export declare class FuncMissingTypeHintError extends ModuleError {
|
|
94
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
95
|
+
constructor(functionName: string, parameterName: string, options?: ErrorOptions);
|
|
96
|
+
}
|
|
97
|
+
export declare class FuncMissingReturnTypeError extends ModuleError {
|
|
98
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
99
|
+
constructor(functionName: string, options?: ErrorOptions);
|
|
100
|
+
}
|
|
101
|
+
export declare class BindingInvalidTargetError extends ModuleError {
|
|
102
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
103
|
+
constructor(target: string, options?: ErrorOptions);
|
|
104
|
+
}
|
|
105
|
+
export declare class BindingModuleNotFoundError extends ModuleError {
|
|
106
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
107
|
+
constructor(modulePath: string, options?: ErrorOptions);
|
|
108
|
+
}
|
|
109
|
+
export declare class BindingCallableNotFoundError extends ModuleError {
|
|
110
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
111
|
+
constructor(callableName: string, modulePath: string, options?: ErrorOptions);
|
|
112
|
+
}
|
|
113
|
+
export declare class BindingNotCallableError extends ModuleError {
|
|
114
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
115
|
+
constructor(target: string, options?: ErrorOptions);
|
|
116
|
+
}
|
|
117
|
+
export declare class BindingSchemaMissingError extends ModuleError {
|
|
118
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
119
|
+
constructor(target: string, options?: ErrorOptions);
|
|
120
|
+
}
|
|
121
|
+
export declare class BindingFileInvalidError extends ModuleError {
|
|
122
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
123
|
+
constructor(filePath: string, reason: string, options?: ErrorOptions);
|
|
124
|
+
}
|
|
125
|
+
export declare class CircularDependencyError extends ModuleError {
|
|
126
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
127
|
+
constructor(cyclePath: string[], options?: ErrorOptions);
|
|
128
|
+
}
|
|
129
|
+
export declare class ModuleLoadError extends ModuleError {
|
|
130
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
131
|
+
constructor(moduleId: string, reason: string, options?: ErrorOptions);
|
|
132
|
+
}
|
|
133
|
+
export declare class ModuleExecuteError extends ModuleError {
|
|
134
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
135
|
+
constructor(moduleId: string, reason: string, options?: ErrorOptions);
|
|
136
|
+
}
|
|
137
|
+
export declare class InternalError extends ModuleError {
|
|
138
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
139
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Base error for all approval-related errors.
|
|
143
|
+
* Carries the full ApprovalResult for inspection by callers.
|
|
144
|
+
*/
|
|
145
|
+
export declare class ApprovalError extends ModuleError {
|
|
146
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
147
|
+
readonly result: unknown;
|
|
148
|
+
constructor(code: string, message: string, result: unknown, moduleId?: string, options?: ErrorOptions);
|
|
149
|
+
get moduleId(): string | null;
|
|
150
|
+
get reason(): string | null;
|
|
151
|
+
}
|
|
152
|
+
export declare class ApprovalDeniedError extends ApprovalError {
|
|
153
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
154
|
+
constructor(result: unknown, moduleId?: string, options?: ErrorOptions);
|
|
155
|
+
}
|
|
156
|
+
export declare class ApprovalTimeoutError extends ApprovalError {
|
|
157
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
158
|
+
constructor(result: unknown, moduleId?: string, options?: ErrorOptions);
|
|
159
|
+
}
|
|
160
|
+
export declare class ApprovalPendingError extends ApprovalError {
|
|
161
|
+
static readonly DEFAULT_RETRYABLE: boolean | null;
|
|
162
|
+
constructor(result: unknown, moduleId?: string, options?: ErrorOptions);
|
|
163
|
+
get approvalId(): string | null;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* All framework error codes as constants.
|
|
167
|
+
* Use these instead of hardcoding error code strings.
|
|
168
|
+
*/
|
|
169
|
+
export declare const ErrorCodes: Readonly<{
|
|
170
|
+
readonly CONFIG_NOT_FOUND: "CONFIG_NOT_FOUND";
|
|
171
|
+
readonly CONFIG_INVALID: "CONFIG_INVALID";
|
|
172
|
+
readonly ACL_RULE_ERROR: "ACL_RULE_ERROR";
|
|
173
|
+
readonly ACL_DENIED: "ACL_DENIED";
|
|
174
|
+
readonly MODULE_NOT_FOUND: "MODULE_NOT_FOUND";
|
|
175
|
+
readonly MODULE_TIMEOUT: "MODULE_TIMEOUT";
|
|
176
|
+
readonly MODULE_LOAD_ERROR: "MODULE_LOAD_ERROR";
|
|
177
|
+
readonly MODULE_EXECUTE_ERROR: "MODULE_EXECUTE_ERROR";
|
|
178
|
+
readonly SCHEMA_VALIDATION_ERROR: "SCHEMA_VALIDATION_ERROR";
|
|
179
|
+
readonly SCHEMA_NOT_FOUND: "SCHEMA_NOT_FOUND";
|
|
180
|
+
readonly SCHEMA_PARSE_ERROR: "SCHEMA_PARSE_ERROR";
|
|
181
|
+
readonly SCHEMA_CIRCULAR_REF: "SCHEMA_CIRCULAR_REF";
|
|
182
|
+
readonly CALL_DEPTH_EXCEEDED: "CALL_DEPTH_EXCEEDED";
|
|
183
|
+
readonly CIRCULAR_CALL: "CIRCULAR_CALL";
|
|
184
|
+
readonly CALL_FREQUENCY_EXCEEDED: "CALL_FREQUENCY_EXCEEDED";
|
|
185
|
+
readonly GENERAL_INVALID_INPUT: "GENERAL_INVALID_INPUT";
|
|
186
|
+
readonly GENERAL_INTERNAL_ERROR: "GENERAL_INTERNAL_ERROR";
|
|
187
|
+
readonly FUNC_MISSING_TYPE_HINT: "FUNC_MISSING_TYPE_HINT";
|
|
188
|
+
readonly FUNC_MISSING_RETURN_TYPE: "FUNC_MISSING_RETURN_TYPE";
|
|
189
|
+
readonly BINDING_INVALID_TARGET: "BINDING_INVALID_TARGET";
|
|
190
|
+
readonly BINDING_MODULE_NOT_FOUND: "BINDING_MODULE_NOT_FOUND";
|
|
191
|
+
readonly BINDING_CALLABLE_NOT_FOUND: "BINDING_CALLABLE_NOT_FOUND";
|
|
192
|
+
readonly BINDING_NOT_CALLABLE: "BINDING_NOT_CALLABLE";
|
|
193
|
+
readonly BINDING_SCHEMA_MISSING: "BINDING_SCHEMA_MISSING";
|
|
194
|
+
readonly BINDING_FILE_INVALID: "BINDING_FILE_INVALID";
|
|
195
|
+
readonly CIRCULAR_DEPENDENCY: "CIRCULAR_DEPENDENCY";
|
|
196
|
+
readonly MIDDLEWARE_CHAIN_ERROR: "MIDDLEWARE_CHAIN_ERROR";
|
|
197
|
+
readonly APPROVAL_DENIED: "APPROVAL_DENIED";
|
|
198
|
+
readonly APPROVAL_TIMEOUT: "APPROVAL_TIMEOUT";
|
|
199
|
+
readonly APPROVAL_PENDING: "APPROVAL_PENDING";
|
|
200
|
+
readonly GENERAL_NOT_IMPLEMENTED: "GENERAL_NOT_IMPLEMENTED";
|
|
201
|
+
readonly DEPENDENCY_NOT_FOUND: "DEPENDENCY_NOT_FOUND";
|
|
202
|
+
}>;
|
|
203
|
+
export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
204
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,qBAAa,WAAY,SAAQ,KAAK;IACpC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAQ;IAEzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAA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