@pikku/inspector 0.11.2 → 0.12.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/CHANGELOG.md +11 -1
- package/OPTIMIZATION-PLAN.md +195 -0
- package/dist/add/add-ai-agent.d.ts +2 -0
- package/dist/add/add-ai-agent.js +314 -0
- package/dist/add/add-channel.js +69 -61
- package/dist/add/add-cli.js +36 -18
- package/dist/add/add-file-with-factory.js +2 -0
- package/dist/add/add-functions.js +250 -75
- package/dist/add/add-http-route.d.ts +19 -10
- package/dist/add/add-http-route.js +152 -66
- package/dist/add/add-http-routes.d.ts +5 -0
- package/dist/add/add-http-routes.js +159 -0
- package/dist/add/add-keyed-wiring.d.ts +12 -0
- package/dist/add/add-keyed-wiring.js +97 -0
- package/dist/add/add-mcp-prompt.js +14 -9
- package/dist/add/add-mcp-resource.js +14 -9
- package/dist/add/add-middleware.d.ts +1 -4
- package/dist/add/add-middleware.js +364 -79
- package/dist/add/add-permission.d.ts +1 -1
- package/dist/add/add-permission.js +152 -40
- package/dist/add/add-queue-worker.js +18 -12
- package/dist/add/add-rpc-invocations.js +14 -0
- package/dist/add/add-schedule.js +11 -5
- package/dist/add/add-secret.d.ts +3 -0
- package/dist/add/add-secret.js +82 -0
- package/dist/add/add-trigger.d.ts +2 -0
- package/dist/add/add-trigger.js +87 -0
- package/dist/add/add-variable.d.ts +1 -0
- package/dist/add/add-variable.js +8 -0
- package/dist/add/add-workflow-graph.d.ts +3 -2
- package/dist/add/add-workflow-graph.js +143 -406
- package/dist/add/add-workflow.js +6 -4
- package/dist/error-codes.d.ts +14 -1
- package/dist/error-codes.js +19 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +5 -4
- package/dist/inspector.d.ts +1 -1
- package/dist/inspector.js +91 -14
- package/dist/schema-generator.d.ts +1 -0
- package/dist/schema-generator.js +1 -0
- package/dist/types-map.js +10 -1
- package/dist/types.d.ts +163 -39
- package/dist/utils/compute-required-schemas.d.ts +4 -0
- package/dist/utils/compute-required-schemas.js +41 -0
- package/dist/utils/contract-hashes.d.ts +35 -0
- package/dist/utils/contract-hashes.js +202 -0
- package/dist/utils/custom-types-generator.d.ts +9 -0
- package/dist/utils/custom-types-generator.js +71 -0
- package/dist/utils/detect-schema-vendor.d.ts +22 -0
- package/dist/utils/detect-schema-vendor.js +76 -0
- package/dist/utils/ensure-function-metadata.d.ts +5 -2
- package/dist/utils/ensure-function-metadata.js +220 -6
- package/dist/utils/extract-function-name.d.ts +5 -16
- package/dist/utils/extract-function-name.js +86 -291
- package/dist/utils/extract-services.d.ts +2 -1
- package/dist/utils/extract-services.js +25 -1
- package/dist/utils/filter-inspector-state.js +107 -23
- package/dist/utils/get-property-value.d.ts +6 -1
- package/dist/utils/get-property-value.js +28 -3
- package/dist/utils/hash.d.ts +2 -0
- package/dist/utils/hash.js +23 -0
- package/dist/utils/middleware.d.ts +7 -30
- package/dist/utils/middleware.js +80 -66
- package/dist/utils/permissions.d.ts +2 -2
- package/dist/utils/permissions.js +10 -10
- package/dist/utils/post-process.d.ts +9 -10
- package/dist/utils/post-process.js +231 -24
- package/dist/utils/resolve-external-package.d.ts +12 -0
- package/dist/utils/resolve-external-package.js +34 -0
- package/dist/utils/resolve-function-types.d.ts +6 -0
- package/dist/utils/resolve-function-types.js +29 -0
- package/dist/utils/resolve-identifier.d.ts +10 -0
- package/dist/utils/resolve-identifier.js +36 -0
- package/dist/utils/resolve-versions.d.ts +2 -0
- package/dist/utils/resolve-versions.js +78 -0
- package/dist/utils/schema-generator.d.ts +9 -0
- package/dist/utils/schema-generator.js +209 -0
- package/dist/utils/serialize-inspector-state.d.ts +59 -22
- package/dist/utils/serialize-inspector-state.js +92 -20
- package/dist/utils/serialize-mcp-json.d.ts +2 -0
- package/dist/utils/serialize-mcp-json.js +99 -0
- package/dist/utils/serialize-middleware-groups-meta.d.ts +12 -0
- package/dist/utils/serialize-middleware-groups-meta.js +28 -0
- package/dist/utils/serialize-openapi-json.d.ts +85 -0
- package/dist/utils/serialize-openapi-json.js +151 -0
- package/dist/utils/serialize-permissions-groups-meta.d.ts +6 -0
- package/dist/utils/serialize-permissions-groups-meta.js +31 -0
- package/dist/utils/workflow/dsl/deserialize-dsl-workflow.js +34 -102
- package/dist/utils/workflow/dsl/extract-dsl-workflow.js +23 -4
- package/dist/utils/workflow/graph/convert-dsl-to-graph.js +12 -10
- package/dist/utils/workflow/graph/finalize-workflow-wires.d.ts +3 -0
- package/dist/utils/workflow/graph/finalize-workflow-wires.js +276 -0
- package/dist/utils/workflow/graph/finalize-workflows.d.ts +2 -0
- package/dist/utils/workflow/graph/finalize-workflows.js +75 -0
- package/dist/utils/workflow/graph/index.d.ts +2 -0
- package/dist/utils/workflow/graph/index.js +2 -0
- package/dist/utils/workflow/graph/serialize-workflow-graph.d.ts +0 -8
- package/dist/utils/workflow/graph/serialize-workflow-graph.js +1 -3
- package/dist/utils/workflow/graph/workflow-graph.types.d.ts +53 -79
- package/dist/utils/workflow/graph/workflow-graph.types.js +1 -1
- package/dist/visit.js +11 -6
- package/package.json +14 -4
- package/src/add/add-ai-agent.ts +468 -0
- package/src/add/add-channel.ts +82 -79
- package/src/add/add-cli.ts +49 -20
- package/src/add/add-file-with-factory.ts +2 -0
- package/src/add/add-functions.ts +330 -86
- package/src/add/add-http-route.ts +245 -88
- package/src/add/add-http-routes.ts +228 -0
- package/src/add/add-keyed-wiring.ts +151 -0
- package/src/add/add-mcp-prompt.ts +26 -15
- package/src/add/add-mcp-resource.ts +27 -15
- package/src/add/add-middleware.ts +482 -80
- package/src/add/add-permission.ts +199 -40
- package/src/add/add-queue-worker.ts +24 -19
- package/src/add/add-rpc-invocations.ts +17 -0
- package/src/add/add-schedule.ts +16 -11
- package/src/add/add-secret.ts +140 -0
- package/src/add/add-trigger.ts +154 -0
- package/src/add/add-variable.ts +9 -0
- package/src/add/add-workflow-graph.ts +180 -522
- package/src/add/add-workflow.ts +5 -4
- package/src/error-codes.ts +24 -1
- package/src/index.ts +22 -13
- package/src/inspector.ts +129 -17
- package/src/schema-generator.ts +1 -0
- package/src/types-map.ts +12 -1
- package/src/types.ts +175 -58
- package/src/utils/compute-required-schemas.ts +49 -0
- package/src/utils/contract-hashes.test.ts +528 -0
- package/src/utils/contract-hashes.ts +290 -0
- package/src/utils/custom-types-generator.ts +88 -0
- package/src/utils/detect-schema-vendor.ts +90 -0
- package/src/utils/ensure-function-metadata.ts +324 -7
- package/src/utils/extract-function-name.ts +101 -351
- package/src/utils/extract-services.ts +35 -2
- package/src/utils/filter-inspector-state.test.ts +34 -20
- package/src/utils/filter-inspector-state.ts +140 -31
- package/src/utils/get-property-value.ts +42 -4
- package/src/utils/hash.ts +26 -0
- package/src/utils/middleware.test.ts +204 -0
- package/src/utils/middleware.ts +129 -67
- package/src/utils/permissions.test.ts +35 -12
- package/src/utils/permissions.ts +10 -10
- package/src/utils/post-process.ts +283 -43
- package/src/utils/resolve-external-package.ts +42 -0
- package/src/utils/resolve-function-types.ts +42 -0
- package/src/utils/resolve-identifier.ts +46 -0
- package/src/utils/resolve-versions.test.ts +249 -0
- package/src/utils/resolve-versions.ts +105 -0
- package/src/utils/schema-generator.ts +329 -0
- package/src/utils/serialize-inspector-state.ts +163 -40
- package/src/utils/serialize-mcp-json.ts +145 -0
- package/src/utils/serialize-middleware-groups-meta.ts +33 -0
- package/src/utils/serialize-openapi-json.ts +277 -0
- package/src/utils/serialize-permissions-groups-meta.ts +35 -0
- package/src/utils/test-data/inspector-state.json +69 -66
- package/src/utils/workflow/dsl/deserialize-dsl-workflow.ts +43 -119
- package/src/utils/workflow/dsl/extract-dsl-workflow.ts +24 -4
- package/src/utils/workflow/graph/convert-dsl-to-graph.ts +17 -10
- package/src/utils/workflow/graph/finalize-workflow-wires.ts +310 -0
- package/src/utils/workflow/graph/finalize-workflows.ts +100 -0
- package/src/utils/workflow/graph/index.ts +5 -0
- package/src/utils/workflow/graph/serialize-workflow-graph.ts +1 -8
- package/src/utils/workflow/graph/workflow-graph.types.ts +29 -78
- package/src/visit.ts +12 -6
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/add/add-forge-credential.d.ts +0 -8
- package/dist/add/add-forge-credential.js +0 -77
- package/dist/add/add-forge-node.d.ts +0 -7
- package/dist/add/add-forge-node.js +0 -77
- package/dist/add/add-mcp-tool.d.ts +0 -2
- package/dist/add/add-mcp-tool.js +0 -81
- package/dist/utils/extract-service-metadata.d.ts +0 -19
- package/dist/utils/extract-service-metadata.js +0 -244
- package/dist/utils/write-service-metadata.d.ts +0 -13
- package/dist/utils/write-service-metadata.js +0 -37
- package/src/add/add-forge-credential.ts +0 -119
- package/src/add/add-forge-node.ts +0 -132
- package/src/add/add-mcp-tool.ts +0 -141
- package/src/utils/extract-service-metadata.ts +0 -353
- package/src/utils/write-service-metadata.ts +0 -51
package/dist/add/add-workflow.js
CHANGED
|
@@ -169,7 +169,7 @@ export const addWorkflow = (logger, node, checker, state) => {
|
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
// Extract workflow name and metadata using same logic as add-functions
|
|
172
|
-
const {
|
|
172
|
+
const { pikkuFuncId, name, exportedName } = extractFunctionName(node, checker, state.rootDir);
|
|
173
173
|
const workflowName = exportedName || name;
|
|
174
174
|
if (!workflowName) {
|
|
175
175
|
logger.critical(ErrorCode.MISSING_NAME, `Could not determine workflow name from export.`);
|
|
@@ -184,6 +184,8 @@ export const addWorkflow = (logger, node, checker, state) => {
|
|
|
184
184
|
let errors;
|
|
185
185
|
if (ts.isObjectLiteralExpression(firstArg)) {
|
|
186
186
|
const metadata = getCommonWireMetaData(firstArg, 'Workflow', workflowName, logger);
|
|
187
|
+
if (metadata.disabled)
|
|
188
|
+
return;
|
|
187
189
|
tags = metadata.tags;
|
|
188
190
|
summary = metadata.summary;
|
|
189
191
|
description = metadata.description;
|
|
@@ -201,7 +203,7 @@ export const addWorkflow = (logger, node, checker, state) => {
|
|
|
201
203
|
}
|
|
202
204
|
// Track workflow file for wiring generation
|
|
203
205
|
if (exportedName) {
|
|
204
|
-
state.workflows.files.set(
|
|
206
|
+
state.workflows.files.set(pikkuFuncId, {
|
|
205
207
|
path: node.getSourceFile().fileName,
|
|
206
208
|
exportedName,
|
|
207
209
|
});
|
|
@@ -261,8 +263,8 @@ export const addWorkflow = (logger, node, checker, state) => {
|
|
|
261
263
|
getWorkflowInvocations(resolvedFunc, checker, state, workflowName, steps);
|
|
262
264
|
}
|
|
263
265
|
state.workflows.meta[workflowName] = {
|
|
264
|
-
|
|
265
|
-
workflowName,
|
|
266
|
+
pikkuFuncId,
|
|
267
|
+
name: workflowName,
|
|
266
268
|
steps,
|
|
267
269
|
context,
|
|
268
270
|
dsl,
|
package/dist/error-codes.d.ts
CHANGED
|
@@ -26,9 +26,11 @@ export declare enum ErrorCode {
|
|
|
26
26
|
SCHEMA_NO_ROOT = "PKU431",
|
|
27
27
|
SCHEMA_GENERATION_ERROR = "PKU456",
|
|
28
28
|
SCHEMA_LOAD_ERROR = "PKU488",
|
|
29
|
-
|
|
29
|
+
INLINE_SCHEMA = "PKU489",
|
|
30
30
|
FUNCTION_METADATA_NOT_FOUND = "PKU559",
|
|
31
31
|
HANDLER_NOT_RESOLVED = "PKU568",
|
|
32
|
+
ROUTE_PARAM_MISMATCH = "PKU571",
|
|
33
|
+
ROUTE_QUERY_MISMATCH = "PKU572",
|
|
32
34
|
MIDDLEWARE_HANDLER_INVALID = "PKU685",
|
|
33
35
|
MIDDLEWARE_TAG_INVALID = "PKU715",
|
|
34
36
|
MIDDLEWARE_EMPTY_ARRAY = "PKU736",
|
|
@@ -37,5 +39,16 @@ export declare enum ErrorCode {
|
|
|
37
39
|
PERMISSION_TAG_INVALID = "PKU836",
|
|
38
40
|
PERMISSION_EMPTY_ARRAY = "PKU937",
|
|
39
41
|
PERMISSION_PATTERN_INVALID = "PKU975",
|
|
42
|
+
DUPLICATE_FUNCTION_VERSION = "PKU850",
|
|
43
|
+
MANIFEST_MISSING = "PKU860",
|
|
44
|
+
FUNCTION_VERSION_MODIFIED = "PKU861",
|
|
45
|
+
CONTRACT_CHANGED_REQUIRES_BUMP = "PKU862",
|
|
46
|
+
VERSION_REGRESSION_OR_CONFLICT = "PKU863",
|
|
47
|
+
VERSION_GAP_NOT_ALLOWED = "PKU864",
|
|
48
|
+
MANIFEST_INTEGRITY_ERROR = "PKU865",
|
|
49
|
+
MISSING_MODEL = "PKU145",
|
|
50
|
+
INVALID_MODEL = "PKU146",
|
|
51
|
+
SERVICES_NOT_DESTRUCTURED = "PKU410",
|
|
52
|
+
WIRES_NOT_DESTRUCTURED = "PKU411",
|
|
40
53
|
WORKFLOW_MULTI_QUEUE_NOT_SUPPORTED = "PKU901"
|
|
41
54
|
}
|
package/dist/error-codes.js
CHANGED
|
@@ -29,10 +29,13 @@ export var ErrorCode;
|
|
|
29
29
|
ErrorCode["SCHEMA_NO_ROOT"] = "PKU431";
|
|
30
30
|
ErrorCode["SCHEMA_GENERATION_ERROR"] = "PKU456";
|
|
31
31
|
ErrorCode["SCHEMA_LOAD_ERROR"] = "PKU488";
|
|
32
|
-
ErrorCode["
|
|
32
|
+
ErrorCode["INLINE_SCHEMA"] = "PKU489";
|
|
33
33
|
// Function errors
|
|
34
34
|
ErrorCode["FUNCTION_METADATA_NOT_FOUND"] = "PKU559";
|
|
35
35
|
ErrorCode["HANDLER_NOT_RESOLVED"] = "PKU568";
|
|
36
|
+
// HTTP Route errors
|
|
37
|
+
ErrorCode["ROUTE_PARAM_MISMATCH"] = "PKU571";
|
|
38
|
+
ErrorCode["ROUTE_QUERY_MISMATCH"] = "PKU572";
|
|
36
39
|
// Middleware/Permission errors
|
|
37
40
|
ErrorCode["MIDDLEWARE_HANDLER_INVALID"] = "PKU685";
|
|
38
41
|
ErrorCode["MIDDLEWARE_TAG_INVALID"] = "PKU715";
|
|
@@ -42,6 +45,21 @@ export var ErrorCode;
|
|
|
42
45
|
ErrorCode["PERMISSION_TAG_INVALID"] = "PKU836";
|
|
43
46
|
ErrorCode["PERMISSION_EMPTY_ARRAY"] = "PKU937";
|
|
44
47
|
ErrorCode["PERMISSION_PATTERN_INVALID"] = "PKU975";
|
|
48
|
+
// Versioning errors
|
|
49
|
+
ErrorCode["DUPLICATE_FUNCTION_VERSION"] = "PKU850";
|
|
50
|
+
// Contract versioning errors
|
|
51
|
+
ErrorCode["MANIFEST_MISSING"] = "PKU860";
|
|
52
|
+
ErrorCode["FUNCTION_VERSION_MODIFIED"] = "PKU861";
|
|
53
|
+
ErrorCode["CONTRACT_CHANGED_REQUIRES_BUMP"] = "PKU862";
|
|
54
|
+
ErrorCode["VERSION_REGRESSION_OR_CONFLICT"] = "PKU863";
|
|
55
|
+
ErrorCode["VERSION_GAP_NOT_ALLOWED"] = "PKU864";
|
|
56
|
+
ErrorCode["MANIFEST_INTEGRITY_ERROR"] = "PKU865";
|
|
57
|
+
// Model configuration errors
|
|
58
|
+
ErrorCode["MISSING_MODEL"] = "PKU145";
|
|
59
|
+
ErrorCode["INVALID_MODEL"] = "PKU146";
|
|
60
|
+
// Optimization diagnostics
|
|
61
|
+
ErrorCode["SERVICES_NOT_DESTRUCTURED"] = "PKU410";
|
|
62
|
+
ErrorCode["WIRES_NOT_DESTRUCTURED"] = "PKU411";
|
|
45
63
|
// Feature Flag
|
|
46
64
|
ErrorCode["WORKFLOW_MULTI_QUEUE_NOT_SUPPORTED"] = "PKU901";
|
|
47
65
|
})(ErrorCode || (ErrorCode = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
export { inspect, getInitialInspectorState } from './inspector.js';
|
|
2
|
-
export { getFilesAndMethods } from './utils/get-files-and-methods.js';
|
|
3
2
|
export type { TypesMap } from './types-map.js';
|
|
4
3
|
export type * from './types.js';
|
|
5
|
-
export type {
|
|
6
|
-
export type { FilesAndMethods, FilesAndMethodsErrors, } from './utils/get-files-and-methods.js';
|
|
4
|
+
export type { FilesAndMethodsErrors } from './utils/get-files-and-methods.js';
|
|
7
5
|
export { ErrorCode } from './error-codes.js';
|
|
8
6
|
export { serializeInspectorState, deserializeInspectorState, } from './utils/serialize-inspector-state.js';
|
|
9
7
|
export type { SerializableInspectorState } from './utils/serialize-inspector-state.js';
|
|
10
8
|
export { filterInspectorState } from './utils/filter-inspector-state.js';
|
|
11
|
-
export {
|
|
12
|
-
export
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export type {
|
|
9
|
+
export { generateCustomTypes, sanitizeTypeName, } from './utils/custom-types-generator.js';
|
|
10
|
+
export { createEmptyManifest, serializeManifest, } from './utils/contract-hashes.js';
|
|
11
|
+
export type { ContractEntry, VersionValidateError, VersionManifest, VersionManifestEntry, } from './utils/contract-hashes.js';
|
|
12
|
+
export { serializeMCPJson } from './utils/serialize-mcp-json.js';
|
|
13
|
+
export type { OpenAPISpecInfo } from './utils/serialize-openapi-json.js';
|
|
14
|
+
export { deserializeDslWorkflow, deserializeGraphWorkflow, deserializeAllDslWorkflows, } from './utils/workflow/dsl/index.js';
|
|
15
|
+
export { getFilesAndMethods } from './utils/get-files-and-methods.js';
|
|
16
|
+
export type { SerializedWorkflowGraph, SerializedWorkflowGraphs, } from './utils/workflow/graph/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { inspect, getInitialInspectorState } from './inspector.js';
|
|
2
|
-
export { getFilesAndMethods } from './utils/get-files-and-methods.js';
|
|
3
2
|
export { ErrorCode } from './error-codes.js';
|
|
4
3
|
export { serializeInspectorState, deserializeInspectorState, } from './utils/serialize-inspector-state.js';
|
|
5
4
|
export { filterInspectorState } from './utils/filter-inspector-state.js';
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
5
|
+
export { generateCustomTypes, sanitizeTypeName, } from './utils/custom-types-generator.js';
|
|
6
|
+
export { createEmptyManifest, serializeManifest, } from './utils/contract-hashes.js';
|
|
7
|
+
export { serializeMCPJson } from './utils/serialize-mcp-json.js';
|
|
8
|
+
export { deserializeDslWorkflow, deserializeGraphWorkflow, deserializeAllDslWorkflows, } from './utils/workflow/dsl/index.js';
|
|
9
|
+
export { getFilesAndMethods } from './utils/get-files-and-methods.js';
|
package/dist/inspector.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ import { InspectorState, InspectorLogger, InspectorOptions } from './types.js';
|
|
|
5
5
|
* @returns A fresh InspectorState with empty collections
|
|
6
6
|
*/
|
|
7
7
|
export declare function getInitialInspectorState(rootDir: string): InspectorState;
|
|
8
|
-
export declare const inspect: (logger: InspectorLogger, routeFiles: string[], options?: InspectorOptions) => InspectorState
|
|
8
|
+
export declare const inspect: (logger: InspectorLogger, routeFiles: string[], options?: InspectorOptions) => Promise<InspectorState>;
|
package/dist/inspector.js
CHANGED
|
@@ -4,7 +4,14 @@ import { visitSetup, visitRoutes } from './visit.js';
|
|
|
4
4
|
import { TypesMap } from './types-map.js';
|
|
5
5
|
import { getFilesAndMethods } from './utils/get-files-and-methods.js';
|
|
6
6
|
import { findCommonAncestor } from './utils/find-root-dir.js';
|
|
7
|
-
import { aggregateRequiredServices,
|
|
7
|
+
import { aggregateRequiredServices, validateSecretOverrides, validateAgentModels, validateAgentOverrides, computeResolvedIOTypes, computeMiddlewareGroupsMeta, computePermissionsGroupsMeta, computeRequiredSchemas, computeDiagnostics, } from './utils/post-process.js';
|
|
8
|
+
import { generateOpenAPISpec } from './utils/serialize-openapi-json.js';
|
|
9
|
+
import { pikkuState } from '@pikku/core';
|
|
10
|
+
import { resolveLatestVersions } from './utils/resolve-versions.js';
|
|
11
|
+
import { finalizeWorkflows } from './utils/workflow/graph/finalize-workflows.js';
|
|
12
|
+
import { finalizeWorkflowHelperTypes, finalizeWorkflowWires, } from './utils/workflow/graph/finalize-workflow-wires.js';
|
|
13
|
+
import { generateAllSchemas } from './utils/schema-generator.js';
|
|
14
|
+
import { computeContractHashes, extractContractsFromMeta, updateManifest, createEmptyManifest, validateContracts, } from './utils/contract-hashes.js';
|
|
8
15
|
/**
|
|
9
16
|
* Creates an initial/empty inspector state with all required properties initialized
|
|
10
17
|
* @param rootDir - The root directory for the project
|
|
@@ -24,7 +31,8 @@ export function getInitialInspectorState(rootDir) {
|
|
|
24
31
|
filesAndMethods: {},
|
|
25
32
|
filesAndMethodsErrors: new Map(),
|
|
26
33
|
typesLookup: new Map(),
|
|
27
|
-
|
|
34
|
+
schemaLookup: new Map(),
|
|
35
|
+
schemas: {},
|
|
28
36
|
functions: {
|
|
29
37
|
typesMap: new TypesMap(),
|
|
30
38
|
meta: {},
|
|
@@ -49,6 +57,11 @@ export function getInitialInspectorState(rootDir) {
|
|
|
49
57
|
files: new Set(),
|
|
50
58
|
meta: {},
|
|
51
59
|
},
|
|
60
|
+
triggers: {
|
|
61
|
+
meta: {},
|
|
62
|
+
sourceMeta: {},
|
|
63
|
+
files: new Set(),
|
|
64
|
+
},
|
|
52
65
|
scheduledTasks: {
|
|
53
66
|
meta: {},
|
|
54
67
|
files: new Set(),
|
|
@@ -62,6 +75,7 @@ export function getInitialInspectorState(rootDir) {
|
|
|
62
75
|
files: new Map(),
|
|
63
76
|
graphMeta: {},
|
|
64
77
|
graphFiles: new Map(),
|
|
78
|
+
invokedWorkflows: new Set(),
|
|
65
79
|
},
|
|
66
80
|
rpc: {
|
|
67
81
|
internalMeta: {},
|
|
@@ -77,6 +91,10 @@ export function getInitialInspectorState(rootDir) {
|
|
|
77
91
|
promptsMeta: {},
|
|
78
92
|
files: new Set(),
|
|
79
93
|
},
|
|
94
|
+
agents: {
|
|
95
|
+
agentsMeta: {},
|
|
96
|
+
files: new Map(),
|
|
97
|
+
},
|
|
80
98
|
cli: {
|
|
81
99
|
meta: {
|
|
82
100
|
programs: {},
|
|
@@ -84,20 +102,39 @@ export function getInitialInspectorState(rootDir) {
|
|
|
84
102
|
},
|
|
85
103
|
files: new Set(),
|
|
86
104
|
},
|
|
87
|
-
|
|
105
|
+
nodes: {
|
|
88
106
|
meta: {},
|
|
89
107
|
files: new Set(),
|
|
90
108
|
},
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
secrets: {
|
|
110
|
+
definitions: [],
|
|
111
|
+
files: new Set(),
|
|
112
|
+
},
|
|
113
|
+
variables: {
|
|
114
|
+
definitions: [],
|
|
93
115
|
files: new Set(),
|
|
94
116
|
},
|
|
117
|
+
manifest: {
|
|
118
|
+
initial: null,
|
|
119
|
+
current: null,
|
|
120
|
+
errors: [],
|
|
121
|
+
},
|
|
95
122
|
middleware: {
|
|
96
|
-
|
|
123
|
+
definitions: {},
|
|
124
|
+
instances: {},
|
|
97
125
|
tagMiddleware: new Map(),
|
|
98
126
|
},
|
|
127
|
+
channelMiddleware: {
|
|
128
|
+
definitions: {},
|
|
129
|
+
instances: {},
|
|
130
|
+
tagMiddleware: new Map(),
|
|
131
|
+
},
|
|
132
|
+
aiMiddleware: {
|
|
133
|
+
definitions: {},
|
|
134
|
+
},
|
|
99
135
|
permissions: {
|
|
100
|
-
|
|
136
|
+
definitions: {},
|
|
137
|
+
instances: {},
|
|
101
138
|
tagPermissions: new Map(),
|
|
102
139
|
},
|
|
103
140
|
serviceAggregation: {
|
|
@@ -108,17 +145,36 @@ export function getInitialInspectorState(rootDir) {
|
|
|
108
145
|
allSingletonServices: [],
|
|
109
146
|
allWireServices: [],
|
|
110
147
|
},
|
|
111
|
-
|
|
148
|
+
resolvedIOTypes: {},
|
|
149
|
+
middlewareGroupsMeta: {
|
|
150
|
+
definitions: {},
|
|
151
|
+
instances: {},
|
|
152
|
+
httpGroups: {},
|
|
153
|
+
tagGroups: {},
|
|
154
|
+
channelMiddleware: {
|
|
155
|
+
definitions: {},
|
|
156
|
+
instances: {},
|
|
157
|
+
tagGroups: {},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
permissionsGroupsMeta: {
|
|
161
|
+
definitions: {},
|
|
162
|
+
httpGroups: {},
|
|
163
|
+
tagGroups: {},
|
|
164
|
+
},
|
|
165
|
+
requiredSchemas: new Set(),
|
|
166
|
+
openAPISpec: null,
|
|
167
|
+
diagnostics: [],
|
|
112
168
|
};
|
|
113
169
|
}
|
|
114
|
-
export const inspect = (logger, routeFiles, options = {}) => {
|
|
170
|
+
export const inspect = async (logger, routeFiles, options = {}) => {
|
|
115
171
|
const startProgram = performance.now();
|
|
116
172
|
const program = ts.createProgram(routeFiles, {
|
|
117
173
|
target: ts.ScriptTarget.ESNext,
|
|
118
|
-
module: ts.ModuleKind.
|
|
174
|
+
module: ts.ModuleKind.Node16,
|
|
119
175
|
skipLibCheck: true,
|
|
120
176
|
skipDefaultLibCheck: true,
|
|
121
|
-
moduleResolution: ts.ModuleResolutionKind.
|
|
177
|
+
moduleResolution: ts.ModuleResolutionKind.Node16,
|
|
122
178
|
types: [],
|
|
123
179
|
allowJs: false,
|
|
124
180
|
checkJs: false,
|
|
@@ -150,6 +206,20 @@ export const inspect = (logger, routeFiles, options = {}) => {
|
|
|
150
206
|
ts.forEachChild(sourceFile, (child) => visitRoutes(logger, checker, child, state, options));
|
|
151
207
|
}
|
|
152
208
|
logger.debug(`Visit routes phase completed in ${(performance.now() - startRoutes).toFixed(2)}ms`);
|
|
209
|
+
resolveLatestVersions(state, logger);
|
|
210
|
+
if (options.schemaConfig) {
|
|
211
|
+
state.schemas = await generateAllSchemas(logger, options.schemaConfig, state);
|
|
212
|
+
computeContractHashes(state.schemas, state.functions.typesMap, state.functions.meta);
|
|
213
|
+
computeRequiredSchemas(state, options);
|
|
214
|
+
}
|
|
215
|
+
state.manifest.initial = options.manifest ?? null;
|
|
216
|
+
const contracts = extractContractsFromMeta(state.functions.meta);
|
|
217
|
+
const baseManifest = state.manifest.initial ?? createEmptyManifest();
|
|
218
|
+
state.manifest.current = updateManifest(baseManifest, contracts);
|
|
219
|
+
state.manifest.errors = validateContracts(baseManifest, contracts).errors;
|
|
220
|
+
finalizeWorkflows(state);
|
|
221
|
+
finalizeWorkflowHelperTypes(state);
|
|
222
|
+
finalizeWorkflowWires(state);
|
|
153
223
|
}
|
|
154
224
|
// Populate filesAndMethods
|
|
155
225
|
const startFilesAndMethods = performance.now();
|
|
@@ -161,9 +231,16 @@ export const inspect = (logger, routeFiles, options = {}) => {
|
|
|
161
231
|
const startAggregate = performance.now();
|
|
162
232
|
aggregateRequiredServices(state);
|
|
163
233
|
logger.debug(`Aggregate required services completed in ${(performance.now() - startAggregate).toFixed(2)}ms`);
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
234
|
+
computeResolvedIOTypes(state);
|
|
235
|
+
computeMiddlewareGroupsMeta(state);
|
|
236
|
+
computePermissionsGroupsMeta(state);
|
|
237
|
+
computeDiagnostics(state);
|
|
238
|
+
if (options.openAPI) {
|
|
239
|
+
state.openAPISpec = await generateOpenAPISpec(logger, state.functions.meta, state.http.meta, state.schemas, options.openAPI.additionalInfo, pikkuState(null, 'misc', 'errors'));
|
|
240
|
+
}
|
|
241
|
+
validateSecretOverrides(logger, state, options.externalPackages);
|
|
242
|
+
validateAgentModels(logger, state, options.modelConfig);
|
|
243
|
+
validateAgentOverrides(logger, state, options.modelConfig);
|
|
167
244
|
}
|
|
168
245
|
return state;
|
|
169
246
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateAllSchemas } from './utils/schema-generator.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateAllSchemas } from './utils/schema-generator.js';
|
package/dist/types-map.js
CHANGED
|
@@ -17,7 +17,16 @@ export class TypesMap {
|
|
|
17
17
|
return meta.uniqueName;
|
|
18
18
|
}
|
|
19
19
|
getTypeMeta(name) {
|
|
20
|
-
if ([
|
|
20
|
+
if ([
|
|
21
|
+
'string',
|
|
22
|
+
'number',
|
|
23
|
+
'boolean',
|
|
24
|
+
'null',
|
|
25
|
+
'undefined',
|
|
26
|
+
'void',
|
|
27
|
+
'unknown',
|
|
28
|
+
'never',
|
|
29
|
+
].includes(name)) {
|
|
21
30
|
return {
|
|
22
31
|
originalName: name,
|
|
23
32
|
uniqueName: name,
|
package/dist/types.d.ts
CHANGED
|
@@ -2,14 +2,20 @@ import * as ts from 'typescript';
|
|
|
2
2
|
import { ChannelsMeta } from '@pikku/core/channel';
|
|
3
3
|
import { HTTPWiringsMeta } from '@pikku/core/http';
|
|
4
4
|
import { ScheduledTasksMeta } from '@pikku/core/scheduler';
|
|
5
|
+
import { TriggerMeta, TriggerSourceMeta } from '@pikku/core/trigger';
|
|
5
6
|
import { QueueWorkersMeta } from '@pikku/core/queue';
|
|
6
7
|
import { WorkflowsMeta } from '@pikku/core/workflow';
|
|
7
8
|
import { MCPResourceMeta, MCPToolMeta, MCPPromptMeta } from '@pikku/core/mcp';
|
|
9
|
+
import { AIAgentMeta } from '@pikku/core/ai-agent';
|
|
8
10
|
import { CLIMeta } from '@pikku/core/cli';
|
|
9
|
-
import {
|
|
11
|
+
import { NodesMeta } from '@pikku/core/node';
|
|
12
|
+
import { SecretDefinitions } from '@pikku/core/secret';
|
|
13
|
+
import { VariableDefinitions } from '@pikku/core/variable';
|
|
10
14
|
import { TypesMap } from './types-map.js';
|
|
11
|
-
import { FunctionsMeta, FunctionServicesMeta } from '@pikku/core';
|
|
15
|
+
import { FunctionsMeta, FunctionServicesMeta, FunctionWiresMeta, JSONValue } from '@pikku/core';
|
|
16
|
+
import type { OpenAPISpecInfo } from './utils/serialize-openapi-json.js';
|
|
12
17
|
import { ErrorCode } from './error-codes.js';
|
|
18
|
+
import type { VersionManifest, VersionValidateError } from './utils/contract-hashes.js';
|
|
13
19
|
import type { SerializedWorkflowGraphs } from './utils/workflow/graph/workflow-graph.types.js';
|
|
14
20
|
export type PathToNameAndType = Map<string, {
|
|
15
21
|
variable: string;
|
|
@@ -26,7 +32,8 @@ export interface MiddlewareGroupMeta {
|
|
|
26
32
|
sourceFile: string;
|
|
27
33
|
position: number;
|
|
28
34
|
services: FunctionServicesMeta;
|
|
29
|
-
|
|
35
|
+
count: number;
|
|
36
|
+
instanceIds: string[];
|
|
30
37
|
isFactory: boolean;
|
|
31
38
|
}
|
|
32
39
|
export interface PermissionGroupMeta {
|
|
@@ -34,7 +41,8 @@ export interface PermissionGroupMeta {
|
|
|
34
41
|
sourceFile: string;
|
|
35
42
|
position: number;
|
|
36
43
|
services: FunctionServicesMeta;
|
|
37
|
-
|
|
44
|
+
count: number;
|
|
45
|
+
instanceIds: string[];
|
|
38
46
|
isFactory: boolean;
|
|
39
47
|
}
|
|
40
48
|
export interface InspectorHTTPState {
|
|
@@ -45,11 +53,17 @@ export interface InspectorHTTPState {
|
|
|
45
53
|
routePermissions: Map<string, PermissionGroupMeta>;
|
|
46
54
|
}
|
|
47
55
|
/**
|
|
48
|
-
*
|
|
56
|
+
* Schema vendor types for Standard Schema compliant validators
|
|
49
57
|
*/
|
|
50
|
-
export
|
|
58
|
+
export type SchemaVendor = 'zod' | 'valibot' | 'arktype' | 'effect' | 'unknown';
|
|
59
|
+
/**
|
|
60
|
+
* Schema reference for deferred conversion to JSON Schema at build time.
|
|
61
|
+
* Supports Standard Schema compliant validators (Zod, Valibot, ArkType, Effect Schema).
|
|
62
|
+
*/
|
|
63
|
+
export interface SchemaRef {
|
|
51
64
|
variableName: string;
|
|
52
65
|
sourceFile: string;
|
|
66
|
+
vendor?: SchemaVendor;
|
|
53
67
|
}
|
|
54
68
|
export interface InspectorFunctionState {
|
|
55
69
|
typesMap: TypesMap;
|
|
@@ -63,28 +77,57 @@ export interface InspectorChannelState {
|
|
|
63
77
|
meta: ChannelsMeta;
|
|
64
78
|
files: Set<string>;
|
|
65
79
|
}
|
|
80
|
+
export interface InspectorMiddlewareDefinition {
|
|
81
|
+
services: FunctionServicesMeta;
|
|
82
|
+
wires?: FunctionWiresMeta;
|
|
83
|
+
sourceFile: string;
|
|
84
|
+
position: number;
|
|
85
|
+
exportedName: string | null;
|
|
86
|
+
factory?: boolean;
|
|
87
|
+
name?: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
package?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface InspectorMiddlewareInstance {
|
|
92
|
+
definitionId: string;
|
|
93
|
+
sourceFile: string;
|
|
94
|
+
position: number;
|
|
95
|
+
isFactoryCall: boolean;
|
|
96
|
+
}
|
|
66
97
|
export interface InspectorMiddlewareState {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
description?: string;
|
|
75
|
-
}>;
|
|
98
|
+
definitions: Record<string, InspectorMiddlewareDefinition>;
|
|
99
|
+
instances: Record<string, InspectorMiddlewareInstance>;
|
|
100
|
+
tagMiddleware: Map<string, MiddlewareGroupMeta>;
|
|
101
|
+
}
|
|
102
|
+
export interface InspectorChannelMiddlewareState {
|
|
103
|
+
definitions: Record<string, InspectorMiddlewareDefinition>;
|
|
104
|
+
instances: Record<string, InspectorMiddlewareInstance>;
|
|
76
105
|
tagMiddleware: Map<string, MiddlewareGroupMeta>;
|
|
77
106
|
}
|
|
107
|
+
export interface InspectorAIMiddlewareState {
|
|
108
|
+
definitions: Record<string, InspectorMiddlewareDefinition>;
|
|
109
|
+
}
|
|
110
|
+
export interface InspectorPermissionDefinition {
|
|
111
|
+
services: FunctionServicesMeta;
|
|
112
|
+
wires?: FunctionWiresMeta;
|
|
113
|
+
sourceFile: string;
|
|
114
|
+
position: number;
|
|
115
|
+
exportedName: string | null;
|
|
116
|
+
factory?: boolean;
|
|
117
|
+
name?: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
package?: string;
|
|
120
|
+
requiresData?: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface InspectorPermissionInstance {
|
|
123
|
+
definitionId: string;
|
|
124
|
+
sourceFile: string;
|
|
125
|
+
position: number;
|
|
126
|
+
isFactoryCall: boolean;
|
|
127
|
+
}
|
|
78
128
|
export interface InspectorPermissionState {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
sourceFile: string;
|
|
82
|
-
position: number;
|
|
83
|
-
exportedName: string | null;
|
|
84
|
-
factory?: boolean;
|
|
85
|
-
name?: string;
|
|
86
|
-
description?: string;
|
|
87
|
-
}>;
|
|
129
|
+
definitions: Record<string, InspectorPermissionDefinition>;
|
|
130
|
+
instances: Record<string, InspectorPermissionInstance>;
|
|
88
131
|
tagPermissions: Map<string, PermissionGroupMeta>;
|
|
89
132
|
}
|
|
90
133
|
export type InspectorFilters = {
|
|
@@ -95,16 +138,53 @@ export type InspectorFilters = {
|
|
|
95
138
|
httpRoutes?: string[];
|
|
96
139
|
httpMethods?: string[];
|
|
97
140
|
};
|
|
141
|
+
export type ExternalPackageConfig = {
|
|
142
|
+
package: string;
|
|
143
|
+
rpcEndpoint?: string;
|
|
144
|
+
secretOverrides?: Record<string, string>;
|
|
145
|
+
forceInclude?: boolean;
|
|
146
|
+
};
|
|
147
|
+
export type ModelConfigEntry = string | {
|
|
148
|
+
model: string;
|
|
149
|
+
temperature?: number;
|
|
150
|
+
maxSteps?: number;
|
|
151
|
+
};
|
|
152
|
+
export type InspectorModelConfig = {
|
|
153
|
+
models?: Record<string, ModelConfigEntry>;
|
|
154
|
+
agentDefaults?: {
|
|
155
|
+
temperature?: number;
|
|
156
|
+
maxSteps?: number;
|
|
157
|
+
};
|
|
158
|
+
agentOverrides?: Record<string, {
|
|
159
|
+
model?: string;
|
|
160
|
+
temperature?: number;
|
|
161
|
+
maxSteps?: number;
|
|
162
|
+
}>;
|
|
163
|
+
};
|
|
98
164
|
export type InspectorOptions = Partial<{
|
|
99
165
|
setupOnly: boolean;
|
|
100
|
-
/** Project root directory - used to filter out external package files */
|
|
101
166
|
rootDir: string;
|
|
167
|
+
isExternalPackage: boolean;
|
|
102
168
|
types: Partial<{
|
|
103
169
|
configFileType: string;
|
|
104
170
|
userSessionType: string;
|
|
105
171
|
singletonServicesFactoryType: string;
|
|
106
172
|
wireServicesFactoryType: string;
|
|
107
173
|
}>;
|
|
174
|
+
externalPackages: Record<string, ExternalPackageConfig>;
|
|
175
|
+
schemaConfig: {
|
|
176
|
+
tsconfig: string;
|
|
177
|
+
schemasFromTypes?: string[];
|
|
178
|
+
schema?: {
|
|
179
|
+
additionalProperties?: boolean;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
openAPI: {
|
|
183
|
+
additionalInfo: OpenAPISpecInfo;
|
|
184
|
+
};
|
|
185
|
+
tags: string[];
|
|
186
|
+
manifest: VersionManifest;
|
|
187
|
+
modelConfig: InspectorModelConfig;
|
|
108
188
|
}>;
|
|
109
189
|
export interface InspectorLogger {
|
|
110
190
|
info: (message: string) => void;
|
|
@@ -159,6 +239,12 @@ export interface InspectorFilesAndMethods {
|
|
|
159
239
|
typePath: string;
|
|
160
240
|
};
|
|
161
241
|
}
|
|
242
|
+
export interface InspectorDiagnostic {
|
|
243
|
+
code: string;
|
|
244
|
+
message: string;
|
|
245
|
+
sourceFile: string;
|
|
246
|
+
position: number;
|
|
247
|
+
}
|
|
162
248
|
export interface InspectorState {
|
|
163
249
|
rootDir: string;
|
|
164
250
|
singletonServicesTypeImportMap: PathToNameAndType;
|
|
@@ -172,10 +258,16 @@ export interface InspectorState {
|
|
|
172
258
|
filesAndMethods: InspectorFilesAndMethods;
|
|
173
259
|
filesAndMethodsErrors: Map<string, PathToNameAndType>;
|
|
174
260
|
typesLookup: Map<string, ts.Type[]>;
|
|
175
|
-
|
|
261
|
+
schemaLookup: Map<string, SchemaRef>;
|
|
262
|
+
schemas: Record<string, JSONValue>;
|
|
176
263
|
http: InspectorHTTPState;
|
|
177
264
|
functions: InspectorFunctionState;
|
|
178
265
|
channels: InspectorChannelState;
|
|
266
|
+
triggers: {
|
|
267
|
+
meta: TriggerMeta;
|
|
268
|
+
sourceMeta: TriggerSourceMeta;
|
|
269
|
+
files: Set<string>;
|
|
270
|
+
};
|
|
179
271
|
scheduledTasks: {
|
|
180
272
|
meta: ScheduledTasksMeta;
|
|
181
273
|
files: Set<string>;
|
|
@@ -195,6 +287,7 @@ export interface InspectorState {
|
|
|
195
287
|
path: string;
|
|
196
288
|
exportedName: string;
|
|
197
289
|
}>;
|
|
290
|
+
invokedWorkflows: Set<string>;
|
|
198
291
|
};
|
|
199
292
|
rpc: {
|
|
200
293
|
internalMeta: Record<string, string>;
|
|
@@ -216,19 +309,37 @@ export interface InspectorState {
|
|
|
216
309
|
promptsMeta: MCPPromptMeta;
|
|
217
310
|
files: Set<string>;
|
|
218
311
|
};
|
|
312
|
+
agents: {
|
|
313
|
+
agentsMeta: AIAgentMeta;
|
|
314
|
+
files: Map<string, {
|
|
315
|
+
path: string;
|
|
316
|
+
exportedName: string;
|
|
317
|
+
}>;
|
|
318
|
+
};
|
|
219
319
|
cli: {
|
|
220
320
|
meta: CLIMeta;
|
|
221
321
|
files: Set<string>;
|
|
222
322
|
};
|
|
223
|
-
|
|
224
|
-
meta:
|
|
323
|
+
nodes: {
|
|
324
|
+
meta: NodesMeta;
|
|
225
325
|
files: Set<string>;
|
|
226
326
|
};
|
|
227
|
-
|
|
228
|
-
|
|
327
|
+
secrets: {
|
|
328
|
+
definitions: SecretDefinitions;
|
|
229
329
|
files: Set<string>;
|
|
230
330
|
};
|
|
331
|
+
variables: {
|
|
332
|
+
definitions: VariableDefinitions;
|
|
333
|
+
files: Set<string>;
|
|
334
|
+
};
|
|
335
|
+
manifest: {
|
|
336
|
+
initial: VersionManifest | null;
|
|
337
|
+
current: VersionManifest | null;
|
|
338
|
+
errors: VersionValidateError[];
|
|
339
|
+
};
|
|
231
340
|
middleware: InspectorMiddlewareState;
|
|
341
|
+
channelMiddleware: InspectorChannelMiddlewareState;
|
|
342
|
+
aiMiddleware: InspectorAIMiddlewareState;
|
|
232
343
|
permissions: InspectorPermissionState;
|
|
233
344
|
serviceAggregation: {
|
|
234
345
|
requiredServices: Set<string>;
|
|
@@ -238,14 +349,27 @@ export interface InspectorState {
|
|
|
238
349
|
allSingletonServices: string[];
|
|
239
350
|
allWireServices: string[];
|
|
240
351
|
};
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
description: string;
|
|
245
|
-
package: string;
|
|
246
|
-
path: string;
|
|
247
|
-
version: string;
|
|
248
|
-
interface: string;
|
|
249
|
-
expandedProperties: Record<string, string>;
|
|
352
|
+
resolvedIOTypes: Record<string, {
|
|
353
|
+
inputType: string;
|
|
354
|
+
outputType: string;
|
|
250
355
|
}>;
|
|
356
|
+
middlewareGroupsMeta: {
|
|
357
|
+
definitions: Record<string, InspectorMiddlewareDefinition>;
|
|
358
|
+
instances: Record<string, InspectorMiddlewareInstance>;
|
|
359
|
+
httpGroups: Record<string, MiddlewareGroupMeta>;
|
|
360
|
+
tagGroups: Record<string, MiddlewareGroupMeta>;
|
|
361
|
+
channelMiddleware: {
|
|
362
|
+
definitions: Record<string, InspectorMiddlewareDefinition>;
|
|
363
|
+
instances: Record<string, InspectorMiddlewareInstance>;
|
|
364
|
+
tagGroups: Record<string, MiddlewareGroupMeta>;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
permissionsGroupsMeta: {
|
|
368
|
+
definitions: Record<string, InspectorPermissionDefinition>;
|
|
369
|
+
httpGroups: Record<string, PermissionGroupMeta>;
|
|
370
|
+
tagGroups: Record<string, PermissionGroupMeta>;
|
|
371
|
+
};
|
|
372
|
+
requiredSchemas: Set<string>;
|
|
373
|
+
openAPISpec: Record<string, any> | null;
|
|
374
|
+
diagnostics: InspectorDiagnostic[];
|
|
251
375
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FunctionsMeta } from '@pikku/core';
|
|
2
|
+
import type { TypesMap } from '../types-map.js';
|
|
3
|
+
import type { SchemaRef } from '../types.js';
|
|
4
|
+
export declare function computeRequiredSchemas(functionsMeta: FunctionsMeta, typesMap: TypesMap, additionalTypes?: string[], schemaLookup?: Map<string, SchemaRef>): Set<string>;
|