@noodleseed/one 0.137.0 → 0.139.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/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/assistant-ops.d.ts.map +1 -1
- package/dist/commands/assistant-ops.js +30 -1
- package/dist/commands/assistant-ops.js.map +1 -1
- package/dist/commands/deploy-first-flow.d.ts +2 -0
- package/dist/commands/deploy-first-flow.d.ts.map +1 -1
- package/dist/commands/deploy-first-flow.js +46 -14
- package/dist/commands/deploy-first-flow.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +27 -1
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/commands/deploy-preflight.d.ts +1 -0
- package/dist/commands/deploy-preflight.d.ts.map +1 -1
- package/dist/commands/deploy-preflight.js +1 -0
- package/dist/commands/deploy-preflight.js.map +1 -1
- package/dist/commands/deploy-status-ops.d.ts +1 -0
- package/dist/commands/deploy-status-ops.d.ts.map +1 -1
- package/dist/commands/deploy-status-ops.js +59 -4
- package/dist/commands/deploy-status-ops.js.map +1 -1
- package/dist/commands/deployments-ops.d.ts.map +1 -1
- package/dist/commands/deployments-ops.js +2 -0
- package/dist/commands/deployments-ops.js.map +1 -1
- package/dist/commands/diagnostics-ops.d.ts +1 -0
- package/dist/commands/diagnostics-ops.d.ts.map +1 -1
- package/dist/commands/diagnostics-ops.js +3 -0
- package/dist/commands/diagnostics-ops.js.map +1 -1
- package/dist/commands/import.d.ts +4 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +198 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/project-setup.d.ts +1 -1
- package/dist/commands/project-setup.d.ts.map +1 -1
- package/dist/commands/project-setup.js +2 -48
- package/dist/commands/project-setup.js.map +1 -1
- package/dist/commands/service-ops.d.ts.map +1 -1
- package/dist/commands/service-ops.js +44 -51
- package/dist/commands/service-ops.js.map +1 -1
- package/dist/deploy.d.ts +3 -0
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +4 -0
- package/dist/deploy.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-import.d.ts +22 -0
- package/dist/mcp-import.d.ts.map +1 -0
- package/dist/mcp-import.js +91 -0
- package/dist/mcp-import.js.map +1 -0
- package/dist/self-host-init.d.ts +23 -0
- package/dist/self-host-init.d.ts.map +1 -0
- package/dist/self-host-init.js +315 -0
- package/dist/self-host-init.js.map +1 -0
- package/node_modules/@noodle-borg/admission-limits/dist/envelope.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +6 -6
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +1 -0
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js +11 -2
- package/node_modules/@noodle-borg/agent-kit/dist/skill-connect-refs.js +31 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +3 -2
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js +6 -7
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-guide.d.ts +1 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-guide.js +35 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-store.d.ts +6 -2
- package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-store.js +5 -2
- package/node_modules/@noodle-borg/assistant-gateway/dist/model-request.js +37 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/model-runtime.js +4 -0
- package/node_modules/@noodle-borg/{service/dist/assistant-model-stream.js → assistant-gateway/dist/model-stream.js} +34 -2
- package/node_modules/@noodle-borg/assistant-gateway/dist/public-session.d.ts +3 -0
- package/node_modules/@noodle-borg/assistant-gateway/dist/public-session.js +2 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/public-turn.d.ts +4 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/public-turn.js +2 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/surface-budget.d.ts +6 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/surface-budget.js +11 -5
- package/node_modules/@noodle-borg/assistant-gateway/package.json +5 -1
- package/node_modules/@noodle-borg/authoring/dist/assistant.d.ts +10 -2
- package/node_modules/@noodle-borg/authoring/dist/assistant.js +4 -0
- package/node_modules/@noodle-borg/authoring/dist/connections.js +1 -0
- package/node_modules/@noodle-borg/authoring/dist/connectors.d.ts +25 -3
- package/node_modules/@noodle-borg/authoring/dist/connectors.js +82 -7
- package/node_modules/@noodle-borg/authoring/dist/index.d.ts +2 -2
- package/node_modules/@noodle-borg/authoring/dist/index.js +1 -1
- package/node_modules/@noodle-borg/authoring/dist/load-authored.js +1 -1
- package/node_modules/@noodle-borg/authoring/dist/model-tool-visibility.js +33 -0
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts +5 -0
- package/node_modules/@noodle-borg/authoring/dist/server.js +7 -2
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-account.js +13 -1
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-assistant.js +17 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-bootstrap-authoring.js +30 -1
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-hosted-deployment.js +14 -0
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts +1 -7
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +20 -8
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +12 -8
- package/node_modules/@noodle-borg/connector-defs/dist/call-graph.js +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/compile-mcp.js +95 -0
- package/node_modules/@noodle-borg/connector-defs/dist/compile.js +4 -0
- package/node_modules/@noodle-borg/connector-defs/dist/customer-routing.js +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/index.d.ts +1 -1
- package/node_modules/@noodle-borg/connector-defs/dist/schema.d.ts +642 -3
- package/node_modules/@noodle-borg/connector-defs/dist/schema.js +143 -1
- package/node_modules/@noodle-borg/connector-http/dist/index.d.ts +1 -0
- package/node_modules/@noodle-borg/connector-http/dist/index.js +1 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/config.js +76 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/egress.js +125 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/failure.js +48 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/index.d.ts +3 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/index.js +2 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/mcp-connector.d.ts +12 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/mcp-connector.js +125 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/result.js +55 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/types.d.ts +52 -0
- package/node_modules/@noodle-borg/connector-http/dist/mcp/types.js +10 -0
- package/node_modules/@noodle-borg/connector-http/package.json +4 -1
- package/node_modules/@noodle-borg/control-plane/dist/portable.d.ts +2 -0
- package/node_modules/@noodle-borg/control-plane/dist/portable.js +1 -0
- package/node_modules/@noodle-borg/control-plane/dist/rollback-deployment.d.ts +61 -0
- package/node_modules/@noodle-borg/{service/dist/operations → control-plane/dist}/rollback-deployment.js +3 -2
- package/node_modules/@noodle-borg/control-plane/dist/rollback-result.d.ts +19 -0
- package/node_modules/@noodle-borg/control-plane/package.json +3 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/contracts.js +4 -0
- package/node_modules/@noodle-borg/developer-mcp/dist/widgets/app-overview.js +1 -1
- package/node_modules/@noodle-borg/developer-mcp/dist/widgets/deployment-detail.js +1 -1
- package/node_modules/@noodle-borg/module/dist/contract.d.ts +1 -0
- package/node_modules/@noodle-borg/module/dist/deployment-automation.d.ts +1 -1
- package/node_modules/@noodle-borg/module/dist/endpoint-url.d.ts +11 -0
- package/node_modules/@noodle-borg/module/dist/endpoint-url.js +20 -0
- package/node_modules/@noodle-borg/module/dist/index.d.ts +1 -0
- package/node_modules/@noodle-borg/module/dist/index.js +1 -0
- package/node_modules/@noodle-borg/observability/dist/assistant-usage.js +217 -0
- package/node_modules/@noodle-borg/observability/dist/index.js +2 -0
- package/node_modules/@noodle-borg/{service → observability}/dist/request-event-metrics.js +5 -2
- package/node_modules/@noodle-borg/observability/dist/request-events-postgres.js +6 -0
- package/node_modules/@noodle-borg/observability/dist/request-events.js +2 -0
- package/node_modules/@noodle-borg/openapi-import/dist/index.js +1 -0
- package/node_modules/@noodle-borg/openapi-import/dist/mcp/index.js +4 -0
- package/node_modules/@noodle-borg/openapi-import/dist/mcp/probe.js +165 -0
- package/node_modules/@noodle-borg/openapi-import/dist/mcp/render.js +99 -0
- package/node_modules/@noodle-borg/openapi-import/dist/mcp/snapshot.js +290 -0
- package/node_modules/@noodle-borg/openapi-import/package.json +6 -2
- package/node_modules/@noodle-borg/runtime/dist/connector/types.d.ts +2 -0
- package/node_modules/@noodle-borg/runtime/dist/operation-execution.js +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-bindings.js +3 -1
- package/node_modules/@noodle-borg/service/dist/developer-mcp/control-plane-adapter.js +3 -3
- package/node_modules/@noodle-borg/service/dist/developer-mcp/inspection.js +2 -1
- package/node_modules/@noodle-borg/service/dist/registry-access.js +73 -24
- package/node_modules/@noodle-borg/service/dist/registry-deploy-transaction.js +5 -2
- package/node_modules/@noodle-borg/service/dist/registry-helpers.d.ts +5 -9
- package/node_modules/@noodle-borg/service/dist/registry-helpers.js +4 -18
- package/node_modules/@noodle-borg/service/dist/registry-rollback.js +3 -1
- package/node_modules/@noodle-borg/service/dist/registry-status.js +4 -1
- package/node_modules/@noodle-borg/service/dist/registry-targets.js +4 -4
- package/node_modules/@noodle-borg/service/dist/registry-types.d.ts +11 -16
- package/node_modules/@noodle-borg/service/dist/registry.d.ts +8 -5
- package/node_modules/@noodle-borg/service/dist/registry.js +8 -5
- package/node_modules/@noodle-borg/service/dist/routes/access.js +19 -1
- package/node_modules/@noodle-borg/service/dist/routes/analytics-dispatch.js +17 -1
- package/node_modules/@noodle-borg/service/dist/routes/analytics.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-agent.js +81 -64
- package/node_modules/@noodle-borg/service/dist/routes/assistant-doctor.js +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-model-binding.js +28 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-public-session.js +18 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-public-turn.js +6 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-usage.js +42 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js +20 -3
- package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.js +1 -2
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +49 -4
- package/node_modules/@noodle-borg/service/dist/routes/deploy-preflight.js +11 -1
- package/node_modules/@noodle-borg/service/dist/routes/endpoint-enrichment.js +2 -1
- package/node_modules/@noodle-borg/service/dist/routes/paths.js +4 -0
- package/node_modules/@noodle-borg/service/dist/routes/rollback.js +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +6 -0
- package/node_modules/@noodle-borg/service/dist/store/in-memory.d.ts +2 -5
- package/node_modules/@noodle-borg/service/dist/store/in-memory.js +9 -21
- package/node_modules/@noodle-borg/service/dist/store/json-file.d.ts +2 -5
- package/node_modules/@noodle-borg/service/dist/store/json-file.js +8 -20
- package/node_modules/@noodle-borg/service/dist/store/records.js +39 -0
- package/node_modules/@noodle-borg/service/dist/store.d.ts +21 -10
- package/node_modules/@noodle-borg/service/package.json +5 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.d.ts +120 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.js +123 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/index.d.ts +4 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/index.js +15 -1
- package/node_modules/@noodleseed/assistant/package.json +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { McpConnector, } from '@noodle-borg/connector-http';
|
|
2
|
+
import { collectVariablesFromHttpAuth } from './auth-variables.js';
|
|
3
|
+
import { addAuthBinding, toAuthScheme } from './compile-auth.js';
|
|
4
|
+
import { toSignature } from './compile-http.js';
|
|
5
|
+
import { catalogCredentialMetadata } from './credential-profiles.js';
|
|
6
|
+
import { collectVariableExpression, isVariableExpression } from './variables.js';
|
|
7
|
+
/** Compile one frozen upstream MCP tool snapshot into the ordinary Connector runtime port. */
|
|
8
|
+
export function compileMcpConnector(def, mode, errors, catalog, connectors, secretBindings, variableBindings) {
|
|
9
|
+
const endpoint = def.mcp.endpoint;
|
|
10
|
+
const allowedOrigins = def.mcp.allowedOrigins ?? (isVariableExpression(endpoint) ? [] : [endpoint]);
|
|
11
|
+
collectVariableExpression(endpoint, variableBindings);
|
|
12
|
+
for (const origin of allowedOrigins)
|
|
13
|
+
collectVariableExpression(origin, variableBindings);
|
|
14
|
+
if (def.mcp.auth !== undefined)
|
|
15
|
+
collectVariablesFromHttpAuth(def.mcp.auth, variableBindings);
|
|
16
|
+
if (isVariableExpression(endpoint) && def.mcp.allowedOrigins === undefined) {
|
|
17
|
+
errors.push({
|
|
18
|
+
code: 'variable_mcp_endpoint_requires_allowed_origins',
|
|
19
|
+
path: `connectors.${def.id}.mcp.allowedOrigins`,
|
|
20
|
+
message: 'mcp.allowedOrigins is required when mcp.endpoint is a managed variable',
|
|
21
|
+
});
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const signatures = {};
|
|
25
|
+
const operations = {};
|
|
26
|
+
for (const [operationName, operation] of Object.entries(def.operations)) {
|
|
27
|
+
const base = `connectors.${def.id}.operations.${operationName}`;
|
|
28
|
+
const signature = toSignature(operation.type, operation.input, operation.output);
|
|
29
|
+
signatures[operationName] = signature;
|
|
30
|
+
if (operation.auth !== undefined)
|
|
31
|
+
collectVariablesFromHttpAuth(operation.auth, variableBindings);
|
|
32
|
+
operations[operationName] = {
|
|
33
|
+
upstreamTool: operation.tool,
|
|
34
|
+
signature,
|
|
35
|
+
...(operation.result === 'structured' ? { upstreamOutputSchema: signature.output } : {}),
|
|
36
|
+
...(operation.auth === undefined ? {} : { auth: mcpAuthScheme(operation.auth) }),
|
|
37
|
+
...(operation.limits?.maxResponseBytes === undefined
|
|
38
|
+
? {}
|
|
39
|
+
: { maxResponseBytes: operation.limits.maxResponseBytes }),
|
|
40
|
+
...(operation.fake === undefined ? {} : { fake: operation.fake }),
|
|
41
|
+
};
|
|
42
|
+
addAuthBinding({
|
|
43
|
+
auth: operation.auth,
|
|
44
|
+
connectorId: def.id,
|
|
45
|
+
connectorVersion: def.version,
|
|
46
|
+
operation: operationName,
|
|
47
|
+
path: `${base}.auth`,
|
|
48
|
+
allowedOrigins: literalOrigins(allowedOrigins),
|
|
49
|
+
secretBindings,
|
|
50
|
+
errors,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
catalog.push({
|
|
54
|
+
id: def.id,
|
|
55
|
+
version: def.version,
|
|
56
|
+
kind: def.kind ?? 'custom',
|
|
57
|
+
...catalogCredentialMetadata(def),
|
|
58
|
+
operations: signatures,
|
|
59
|
+
});
|
|
60
|
+
addAuthBinding({
|
|
61
|
+
auth: def.mcp.auth,
|
|
62
|
+
connectorId: def.id,
|
|
63
|
+
connectorVersion: def.version,
|
|
64
|
+
path: `connectors.${def.id}.mcp.auth`,
|
|
65
|
+
allowedOrigins: literalOrigins(allowedOrigins),
|
|
66
|
+
secretBindings,
|
|
67
|
+
errors,
|
|
68
|
+
});
|
|
69
|
+
const config = {
|
|
70
|
+
id: def.id,
|
|
71
|
+
version: def.version,
|
|
72
|
+
endpoint,
|
|
73
|
+
...(def.mcp.allowedOrigins === undefined ? {} : { allowedOrigins: def.mcp.allowedOrigins }),
|
|
74
|
+
...(def.mcp.auth === undefined ? {} : { auth: mcpAuthScheme(def.mcp.auth) }),
|
|
75
|
+
...(def.mcp.timeoutMs === undefined ? {} : { timeoutMs: def.mcp.timeoutMs }),
|
|
76
|
+
...(def.mcp.maxResponseBytes === undefined
|
|
77
|
+
? {}
|
|
78
|
+
: { maxResponseBytes: def.mcp.maxResponseBytes }),
|
|
79
|
+
...(def.mcp.protocol === undefined ? {} : { protocol: def.mcp.protocol }),
|
|
80
|
+
...(mode === 'fake' ? { fakeMode: true } : {}),
|
|
81
|
+
operations,
|
|
82
|
+
};
|
|
83
|
+
connectors.push(new McpConnector(config));
|
|
84
|
+
}
|
|
85
|
+
function mcpAuthScheme(auth) {
|
|
86
|
+
const scheme = toAuthScheme(auth);
|
|
87
|
+
if (scheme.kind === 'cookie') {
|
|
88
|
+
throw new Error('delegated session cookie auth is not valid for an MCP connector');
|
|
89
|
+
}
|
|
90
|
+
return scheme;
|
|
91
|
+
}
|
|
92
|
+
function literalOrigins(origins) {
|
|
93
|
+
return origins.filter((origin) => !isVariableExpression(origin));
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=compile-mcp.js.map
|
|
@@ -3,6 +3,7 @@ import { CodeConnector, DEFAULT_LIMITS, QuickJsComputeEngine, } from '@noodle-bo
|
|
|
3
3
|
import { parse as parseYaml } from 'yaml';
|
|
4
4
|
import { validateComputeCallGraph } from './call-graph.js';
|
|
5
5
|
import { compileHttpConnector, toSignature } from './compile-http.js';
|
|
6
|
+
import { compileMcpConnector } from './compile-mcp.js';
|
|
6
7
|
import { catalogCredentialMetadata } from './credential-profiles.js';
|
|
7
8
|
import { collectCatalogCustomerRouting } from './customer-routing.js';
|
|
8
9
|
import { connectorIdentityKey } from './identity-key.js';
|
|
@@ -62,6 +63,9 @@ export function compileConnectors(source, options = {}) {
|
|
|
62
63
|
if ('http' in def) {
|
|
63
64
|
compileHttpConnector(def, mode, errors, catalog, connectors, secretBindings, variableBindings);
|
|
64
65
|
}
|
|
66
|
+
else if ('mcp' in def) {
|
|
67
|
+
compileMcpConnector(def, mode, errors, catalog, connectors, secretBindings, variableBindings);
|
|
68
|
+
}
|
|
65
69
|
else {
|
|
66
70
|
compileComputeConnector(def, computeEngine, targets, errors, catalog, connectors);
|
|
67
71
|
}
|
|
@@ -57,7 +57,7 @@ export function collectCatalogCustomerRouting(definitions, errors) {
|
|
|
57
57
|
actionEndpoints.add(def.http.baseUrl.name);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
else {
|
|
60
|
+
else if (!('mcp' in def)) {
|
|
61
61
|
const computeOperation = def.operations[operationName];
|
|
62
62
|
if (computeOperation?.calls === undefined) {
|
|
63
63
|
visiting.delete(key);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { type ClientCredentialsBinding, type ClientCredentialsCustomBinding, type CompileConnectorsOptions, type CompileConnectorsResult, type ConnectorCompileError, compileConnectors, type DelegatedOAuthBinding, type DelegatedTokenExchangeBinding, type SecretBinding, } from './compile.js';
|
|
2
2
|
export { type DelegatedTokenExchangeIdentityContext, delegatedTokenExchangeIdentityErrors, type ServerCustomerIdentitySources, } from './delegated-token-exchange-identity.js';
|
|
3
|
-
export { type ComputeConnectorDef, type ComputeOperationDef, type ConnectorDef, type ConnectorFile, type CredentialProfileDef, connectorFileSchema, type HttpAuthDef, type HttpConnectorDef, type HttpOperationDef, } from './schema.js';
|
|
3
|
+
export { type ComputeConnectorDef, type ComputeOperationDef, type ConnectorDef, type ConnectorFile, type CredentialProfileDef, connectorFileSchema, type HttpAuthDef, type HttpConnectorDef, type HttpOperationDef, type McpConnectorDef, type McpOperationDef, } from './schema.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|