@tai42/api-client 26.0.0 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.d.ts +2 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/errors.d.ts +3 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +5 -5
- package/dist/errors.js.map +1 -1
- package/dist/schemas/channels.d.ts +1 -2
- package/dist/schemas/channels.d.ts.map +1 -1
- package/dist/schemas/manifest-mcp.d.ts +1 -2
- package/dist/schemas/manifest-mcp.d.ts.map +1 -1
- package/dist/schemas/system-kinds.d.ts.map +1 -1
- package/dist/schemas/system-kinds.js +6 -5
- package/dist/schemas/system-kinds.js.map +1 -1
- package/package.json +1 -1
- package/src/errors.ts +5 -5
- package/src/schemas/channels.ts +1 -1
- package/src/schemas/manifest-mcp.ts +1 -1
- package/src/schemas/system-kinds.ts +6 -5
package/dist/client/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** Composition root: assembles the per-resource sub-clients into the client. */
|
|
2
|
-
import { holdersFromError, storedPresetFaultFromError } from '../errors';
|
|
3
1
|
import type { ApiConfig } from '../http';
|
|
4
2
|
export type { AddUrlToScopeBody, ApiKeyBody, ClaimLinkBody, PinRoutePublicBody, RoleCreateBody, RoleUpdateBody, } from './auth-client';
|
|
5
3
|
export type { AddServerArgs, DiscoverServerTarget, SetProviderClientArgs, StartConnectArgs, } from './connectors-client';
|
|
@@ -5137,8 +5135,8 @@ export declare function createApiClient(config: ApiConfig): {
|
|
|
5137
5135
|
/** Readers of this client's refusals. They recognise the `ApiError` this client throws, so a
|
|
5138
5136
|
* caller that holds no copy of the error classes (a plugin bundle) reads a refusal through
|
|
5139
5137
|
* the client that raised it. */
|
|
5140
|
-
readonly holdersFromError:
|
|
5141
|
-
readonly storedPresetFaultFromError:
|
|
5138
|
+
readonly holdersFromError: (error: unknown) => import("..").ReferenceHolder[] | null;
|
|
5139
|
+
readonly storedPresetFaultFromError: (error: unknown) => string | null;
|
|
5142
5140
|
};
|
|
5143
5141
|
export type ApiClient = ReturnType<typeof createApiClient>;
|
|
5144
5142
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAoCzC,YAAY,EACV,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC1E,YAAY,EACV,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACtE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACpG,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,iBAAiB,GAClB,MAAM,iBAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAvDrjU;;;OAGG;;;;;;IAEH;;iCAE6B;;IAE7B;;qCAEiC;;;EAyCpC;AAED,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* mismatch throws, so the UI can render a visible error state, never a silent
|
|
4
4
|
* empty render.
|
|
5
5
|
*/
|
|
6
|
-
import { type ReferenceHolder } from './
|
|
6
|
+
import { type ReferenceHolder } from './schemas/presets';
|
|
7
7
|
/** The skeleton returned `{ "error": "<message>" }` (or a non-2xx status). */
|
|
8
8
|
export declare class ApiError extends Error {
|
|
9
9
|
readonly status: number;
|
|
@@ -70,11 +70,11 @@ export declare class ApiSchemaError extends Error {
|
|
|
70
70
|
* `holders` list answers it, parsed (a malformed list throws). Any other error, or a
|
|
71
71
|
* body without `holders`, answers `null`.
|
|
72
72
|
*/
|
|
73
|
-
export declare
|
|
73
|
+
export declare const holdersFromError: (error: unknown) => ReferenceHolder[] | null;
|
|
74
74
|
/**
|
|
75
75
|
* The stored preset a read could not walk: an `ApiError` with code
|
|
76
76
|
* `stored-preset-unreadable` answers the row's name from `body.preset`. That code without a
|
|
77
77
|
* non-empty string `preset` throws; any other error answers `null`.
|
|
78
78
|
*/
|
|
79
|
-
export declare
|
|
79
|
+
export declare const storedPresetFaultFromError: (error: unknown) => string | null;
|
|
80
80
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,mBAAmB,CAAC;AAE1E,8EAA8E;AAC9E,qBAAa,QAAS,SAAQ,KAAK;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;gBAEtB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,iBAAiB,CAAC,EAAE,MAAM,EAC1B,IAAI,CAAC,EAAE,OAAO;CASjB;AAED,yEAAyE;AACzE,qBAAa,oBAAqB,SAAQ,QAAQ;gBACpC,OAAO,SAAiB;CAIrC;AAED,4DAA4D;AAC5D,qBAAa,gBAAiB,SAAQ,QAAQ;gBAChC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;CAI5C;AAED;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBACZ,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAK5C;AAED;;;;;;GAMG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBACZ,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAK5C;AAED;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;gBACb,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO;CAM9C;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,eAAe,EAAE,GAAG,IAKrE,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IASpE,CAAC"}
|
package/dist/errors.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* empty render.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import { referenceHolder } from './
|
|
7
|
+
import { referenceHolder } from './schemas/presets';
|
|
8
8
|
/** The skeleton returned `{ "error": "<message>" }` (or a non-2xx status). */
|
|
9
9
|
export class ApiError extends Error {
|
|
10
10
|
status;
|
|
@@ -97,21 +97,21 @@ export class ApiSchemaError extends Error {
|
|
|
97
97
|
* `holders` list answers it, parsed (a malformed list throws). Any other error, or a
|
|
98
98
|
* body without `holders`, answers `null`.
|
|
99
99
|
*/
|
|
100
|
-
export
|
|
100
|
+
export const holdersFromError = (error) => {
|
|
101
101
|
if (!(error instanceof ApiError))
|
|
102
102
|
return null;
|
|
103
103
|
const body = error.body;
|
|
104
104
|
if (typeof body !== 'object' || body === null || !('holders' in body))
|
|
105
105
|
return null;
|
|
106
106
|
return z.array(referenceHolder).parse(body.holders);
|
|
107
|
-
}
|
|
107
|
+
};
|
|
108
108
|
const STORED_PRESET_UNREADABLE = 'stored-preset-unreadable';
|
|
109
109
|
/**
|
|
110
110
|
* The stored preset a read could not walk: an `ApiError` with code
|
|
111
111
|
* `stored-preset-unreadable` answers the row's name from `body.preset`. That code without a
|
|
112
112
|
* non-empty string `preset` throws; any other error answers `null`.
|
|
113
113
|
*/
|
|
114
|
-
export
|
|
114
|
+
export const storedPresetFaultFromError = (error) => {
|
|
115
115
|
if (!(error instanceof ApiError) || error.code !== STORED_PRESET_UNREADABLE)
|
|
116
116
|
return null;
|
|
117
117
|
const body = error.body;
|
|
@@ -120,5 +120,5 @@ export function storedPresetFaultFromError(error) {
|
|
|
120
120
|
throw new Error(`a '${STORED_PRESET_UNREADABLE}' error carried no stored preset name`);
|
|
121
121
|
}
|
|
122
122
|
return preset;
|
|
123
|
-
}
|
|
123
|
+
};
|
|
124
124
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAwB,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAwB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE1E,8EAA8E;AAC9E,MAAM,OAAO,QAAS,SAAQ,KAAK;IACxB,MAAM,CAAS;IACxB,gFAAgF;IACvE,IAAI,CAAqB;IAClC;;;;OAIG;IACM,iBAAiB,CAAU;IACpC;;;;;OAKG;IACM,IAAI,CAAW;IACxB,YACE,OAAe,EACf,MAAc,EACd,IAAa,EACb,iBAA0B,EAC1B,IAAc;QAEd,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CA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AAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** Installed channel-plugin catalog response schema. */
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
-
import * as openapi from '../generated/openapi-schemas';
|
|
4
3
|
export declare const channels: z.ZodObject<{
|
|
5
4
|
channels: z.ZodArray<z.ZodObject<{
|
|
6
5
|
identity_hint: z.ZodNullable<z.ZodString>;
|
|
@@ -9,5 +8,5 @@ export declare const channels: z.ZodObject<{
|
|
|
9
8
|
}, z.core.$strip>;
|
|
10
9
|
export type Channels = z.infer<typeof channels>;
|
|
11
10
|
/** One installed channel plugin: its name and its declared identity hint, if any. */
|
|
12
|
-
export type ChannelEntry
|
|
11
|
+
export type { ChannelEntry } from '../generated/openapi-schemas';
|
|
13
12
|
//# sourceMappingURL=channels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/schemas/channels.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/schemas/channels.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQ7B,eAAO,MAAM,QAAQ;;;;;iBAAyB,CAAC;AAC/C,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,qFAAqF;AACrF,YAAY,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** Live-manifest MCP section, env-ref and config-reload schemas. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import * as openapi from '../generated/openapi-schemas';
|
|
4
3
|
/**
|
|
5
4
|
* The back-reference a connector writes onto a manifest MCP entry to mark it
|
|
6
5
|
* connector-owned: the connection and the provider sub-service that own it.
|
|
@@ -226,5 +225,5 @@ export declare const mcpAdvertisedTools: z.ZodObject<{
|
|
|
226
225
|
unadvertised: z.ZodArray<z.ZodString>;
|
|
227
226
|
}, z.core.$strip>;
|
|
228
227
|
export type McpAdvertisedTools = z.infer<typeof mcpAdvertisedTools>;
|
|
229
|
-
export type McpAdvertisedTool
|
|
228
|
+
export type { McpAdvertisedTool } from '../generated/openapi-schemas';
|
|
230
229
|
//# sourceMappingURL=manifest-mcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-mcp.d.ts","sourceRoot":"","sources":["../../src/schemas/manifest-mcp.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest-mcp.d.ts","sourceRoot":"","sources":["../../src/schemas/manifest-mcp.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;iBAIvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;;;;;iBAInB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAIhE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;iBAIpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGvB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS;;;;;iBAAoB,CAAC;AAC3C,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAClD,eAAO,MAAM,UAAU;;;;;kBAAwB,CAAC;AAChD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8D,CAAC;AAC9F,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;iBAA6B,CAAC;AAC7D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-kinds.d.ts","sourceRoot":"","sources":["../../src/schemas/system-kinds.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"system-kinds.d.ts","sourceRoot":"","sources":["../../src/schemas/system-kinds.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAc7B,eAAO,MAAM,UAAU;;;;;;;;;iBAAqB,CAAC;AAC7C,eAAO,MAAM,cAAc;;;;;;;;;kBAA6B,CAAC;AACzD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAqB,CAAC;AAC5D,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAOlF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;iBAA4B,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;iBAAc,CAAC;AAC3C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -2,11 +2,12 @@ import * as openapi from '../generated/openapi-schemas';
|
|
|
2
2
|
import { fleetResult } from './fleet';
|
|
3
3
|
import { reloadConfigResult } from './manifest-mcp';
|
|
4
4
|
// `GET /api/system/kinds` — one row per pluggable kind (identity, accounts,
|
|
5
|
-
// monitoring, storage, backend, channels, webhook_verifiers,
|
|
6
|
-
// studio_plugins). `state` is the kind's active/default/off status:
|
|
7
|
-
// real plugin serves it, `default` = a built-in fallback serves it,
|
|
8
|
-
// nothing is registered (a legal state, reported not "fixed"). `plugin` is
|
|
9
|
-
// provider/module name when known, else null.
|
|
5
|
+
// monitoring, storage, files, backend, sandbox, channels, webhook_verifiers,
|
|
6
|
+
// config, studio_plugins). `state` is the kind's active/default/off status:
|
|
7
|
+
// `active` = a real plugin serves it, `default` = a built-in fallback serves it,
|
|
8
|
+
// `off` = nothing is registered (a legal state, reported not "fixed"). `plugin` is
|
|
9
|
+
// the provider/module name when known, else null. The `files` row reports whether
|
|
10
|
+
// the server's optional file-loading dependencies are installed.
|
|
10
11
|
export const kindStatus = openapi.kindStatus;
|
|
11
12
|
export const kindStatusList = openapi.systemKindsListing;
|
|
12
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-kinds.js","sourceRoot":"","sources":["../../src/schemas/system-kinds.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,4EAA4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"system-kinds.js","sourceRoot":"","sources":["../../src/schemas/system-kinds.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,4EAA4E;AAC5E,6EAA6E;AAC7E,4EAA4E;AAC5E,iFAAiF;AACjF,mFAAmF;AACnF,kFAAkF;AAClF,iEAAiE;AAEjE,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;AAC7C,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAGzD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AAE5D,gFAAgF;AAChF,kFAAkF;AAClF,yFAAyF;AACzF,mFAAmF;AACnF,oFAAoF;AACpF,YAAY;AACZ,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC"}
|
package/package.json
CHANGED
package/src/errors.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
|
|
9
|
-
import { type ReferenceHolder, referenceHolder } from './
|
|
9
|
+
import { type ReferenceHolder, referenceHolder } from './schemas/presets';
|
|
10
10
|
|
|
11
11
|
/** The skeleton returned `{ "error": "<message>" }` (or a non-2xx status). */
|
|
12
12
|
export class ApiError extends Error {
|
|
@@ -112,12 +112,12 @@ export class ApiSchemaError extends Error {
|
|
|
112
112
|
* `holders` list answers it, parsed (a malformed list throws). Any other error, or a
|
|
113
113
|
* body without `holders`, answers `null`.
|
|
114
114
|
*/
|
|
115
|
-
export
|
|
115
|
+
export const holdersFromError = (error: unknown): ReferenceHolder[] | null => {
|
|
116
116
|
if (!(error instanceof ApiError)) return null;
|
|
117
117
|
const body = error.body;
|
|
118
118
|
if (typeof body !== 'object' || body === null || !('holders' in body)) return null;
|
|
119
119
|
return z.array(referenceHolder).parse(body.holders);
|
|
120
|
-
}
|
|
120
|
+
};
|
|
121
121
|
|
|
122
122
|
const STORED_PRESET_UNREADABLE = 'stored-preset-unreadable';
|
|
123
123
|
|
|
@@ -126,7 +126,7 @@ const STORED_PRESET_UNREADABLE = 'stored-preset-unreadable';
|
|
|
126
126
|
* `stored-preset-unreadable` answers the row's name from `body.preset`. That code without a
|
|
127
127
|
* non-empty string `preset` throws; any other error answers `null`.
|
|
128
128
|
*/
|
|
129
|
-
export
|
|
129
|
+
export const storedPresetFaultFromError = (error: unknown): string | null => {
|
|
130
130
|
if (!(error instanceof ApiError) || error.code !== STORED_PRESET_UNREADABLE) return null;
|
|
131
131
|
const body = error.body;
|
|
132
132
|
const preset =
|
|
@@ -135,4 +135,4 @@ export function storedPresetFaultFromError(error: unknown): string | null {
|
|
|
135
135
|
throw new Error(`a '${STORED_PRESET_UNREADABLE}' error carried no stored preset name`);
|
|
136
136
|
}
|
|
137
137
|
return preset;
|
|
138
|
-
}
|
|
138
|
+
};
|
package/src/schemas/channels.ts
CHANGED
|
@@ -10,4 +10,4 @@ import * as openapi from '../generated/openapi-schemas';
|
|
|
10
10
|
export const channels = openapi.channelListing;
|
|
11
11
|
export type Channels = z.infer<typeof channels>;
|
|
12
12
|
/** One installed channel plugin: its name and its declared identity hint, if any. */
|
|
13
|
-
export type ChannelEntry
|
|
13
|
+
export type { ChannelEntry } from '../generated/openapi-schemas';
|
|
@@ -86,4 +86,4 @@ export type ReloadConfigResult = z.infer<typeof reloadConfigResult>;
|
|
|
86
86
|
*/
|
|
87
87
|
export const mcpAdvertisedTools = openapi.mcpAdvertisedTools;
|
|
88
88
|
export type McpAdvertisedTools = z.infer<typeof mcpAdvertisedTools>;
|
|
89
|
-
export type McpAdvertisedTool
|
|
89
|
+
export type { McpAdvertisedTool } from '../generated/openapi-schemas';
|
|
@@ -6,11 +6,12 @@ import { fleetResult } from './fleet';
|
|
|
6
6
|
import { reloadConfigResult } from './manifest-mcp';
|
|
7
7
|
|
|
8
8
|
// `GET /api/system/kinds` — one row per pluggable kind (identity, accounts,
|
|
9
|
-
// monitoring, storage, backend, channels, webhook_verifiers,
|
|
10
|
-
// studio_plugins). `state` is the kind's active/default/off status:
|
|
11
|
-
// real plugin serves it, `default` = a built-in fallback serves it,
|
|
12
|
-
// nothing is registered (a legal state, reported not "fixed"). `plugin` is
|
|
13
|
-
// provider/module name when known, else null.
|
|
9
|
+
// monitoring, storage, files, backend, sandbox, channels, webhook_verifiers,
|
|
10
|
+
// config, studio_plugins). `state` is the kind's active/default/off status:
|
|
11
|
+
// `active` = a real plugin serves it, `default` = a built-in fallback serves it,
|
|
12
|
+
// `off` = nothing is registered (a legal state, reported not "fixed"). `plugin` is
|
|
13
|
+
// the provider/module name when known, else null. The `files` row reports whether
|
|
14
|
+
// the server's optional file-loading dependencies are installed.
|
|
14
15
|
|
|
15
16
|
export const kindStatus = openapi.kindStatus;
|
|
16
17
|
export const kindStatusList = openapi.systemKindsListing;
|