@things-factory/figure-service 10.1.288 → 10.1.290
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-server/routers/figure-capability-module-router.d.ts +11 -0
- package/dist-server/routers/figure-capability-module-router.js +44 -0
- package/dist-server/routes.js +3 -0
- package/dist-server/service/capability-module/capability-module-entity.d.ts +52 -0
- package/dist-server/service/capability-module/capability-module-entity.js +173 -0
- package/dist-server/service/capability-module/capability-module-resolver.d.ts +24 -0
- package/dist-server/service/capability-module/capability-module-resolver.js +195 -0
- package/dist-server/service/capability-module/capability-module-store.d.ts +109 -0
- package/dist-server/service/capability-module/capability-module-store.js +325 -0
- package/dist-server/service/capability-module/capability-release-check.d.ts +8 -0
- package/dist-server/service/capability-module/capability-release-check.js +57 -0
- package/dist-server/service/figure/figure-format.d.ts +9 -1
- package/dist-server/service/figure/figure-format.js +4 -2
- package/dist-server/service/figure/figure-mcp-agent.d.ts +6 -1
- package/dist-server/service/figure/figure-mcp-agent.js +2 -1
- package/dist-server/service/figure/figure-mutation.js +6 -1
- package/dist-server/service/figure/figure-propose-steps.d.ts +12 -2
- package/dist-server/service/figure/figure-propose-steps.js +46 -3
- package/dist-server/service/figure/figure-query.js +6 -3
- package/dist-server/service/figure/figure-tools.js +12 -2
- package/dist-server/service/index.d.ts +8 -2
- package/dist-server/service/index.js +15 -3
- package/dist-server/service/install-key/figure-install-key.d.ts +5 -2
- package/dist-server/service/install-key/figure-install-key.js +22 -6
- package/package.json +11 -8
- package/translations/en.json +18 -1
- package/translations/es.json +18 -1
- package/translations/ja.json +18 -1
- package/translations/ko.json +18 -1
- package/translations/ms.json +18 -1
- package/translations/zh.json +18 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FigureQuery = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const capability_module_store_js_1 = require("../capability-module/capability-module-store.js");
|
|
5
6
|
const typeorm_1 = require("typeorm");
|
|
6
7
|
const type_graphql_1 = require("type-graphql");
|
|
7
8
|
const graphql_scalars_1 = require("graphql-scalars");
|
|
@@ -197,7 +198,8 @@ let FigureQuery = class FigureQuery {
|
|
|
197
198
|
.orderBy('history.version', 'DESC')
|
|
198
199
|
.limit(1)
|
|
199
200
|
.getOne();
|
|
200
|
-
|
|
201
|
+
await (0, capability_module_store_js_1.prepareCapabilityModules)({ getRepository: shell_1.getRepository }, context.state.domain);
|
|
202
|
+
return (0, figure_format_js_1.inspectSource)(figure.source, released?.source, context.t, figure.type, figure.category, context.state.domain);
|
|
201
203
|
}
|
|
202
204
|
/**
|
|
203
205
|
* The same judgement for a source that has not been saved — what the modeller shows **while** the author edits.
|
|
@@ -209,8 +211,9 @@ let FigureQuery = class FigureQuery {
|
|
|
209
211
|
*/
|
|
210
212
|
async inspectFigureDraft(source, context, id) {
|
|
211
213
|
const { domain } = context.state;
|
|
214
|
+
await (0, capability_module_store_js_1.prepareCapabilityModules)({ getRepository: shell_1.getRepository }, domain);
|
|
212
215
|
if (!id)
|
|
213
|
-
return (0, figure_format_js_1.inspectSource)(source, null, context.t);
|
|
216
|
+
return (0, figure_format_js_1.inspectSource)(source, null, context.t, undefined, undefined, domain);
|
|
214
217
|
const figure = await (0, shell_1.getRepository)(figure_js_1.Figure).findOne({
|
|
215
218
|
where: { domain: { id: (0, typeorm_1.In)([domain.id, domain.parentId].filter(Boolean)) }, id },
|
|
216
219
|
select: { id: true, type: true, category: true }
|
|
@@ -223,7 +226,7 @@ let FigureQuery = class FigureQuery {
|
|
|
223
226
|
.orderBy('history.version', 'DESC')
|
|
224
227
|
.limit(1)
|
|
225
228
|
.getOne();
|
|
226
|
-
return (0, figure_format_js_1.inspectSource)(source, released?.source, context.t, figure.type, figure.category);
|
|
229
|
+
return (0, figure_format_js_1.inspectSource)(source, released?.source, context.t, figure.type, figure.category, domain);
|
|
227
230
|
}
|
|
228
231
|
/** The categories this server allows (G5), or null when a category is free text: the modeller offers them to choose from. */
|
|
229
232
|
async figureCategories() {
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.__setFigureToolDepsForTest = __setFigureToolDepsForTest;
|
|
4
4
|
exports.registerFigureToolCategories = registerFigureToolCategories;
|
|
5
|
+
const capability_module_store_js_1 = require("../capability-module/capability-module-store.js");
|
|
6
|
+
/* The domain's choice lists for the guide; none when they cannot be read (a test's repository has no table for them). */
|
|
7
|
+
const capabilityChoicesOf = (domain) => (0, capability_module_store_js_1.chosenCapabilityChoices)({ getRepository: getDeps().getRepository }, domain).catch(() => ({}));
|
|
5
8
|
/*
|
|
6
9
|
* figure 저작 도구를 어시스턴트 도구 레지스트리에 등록 — **대화면(도크)에서 저작을 돕기 위함.**
|
|
7
10
|
*
|
|
@@ -425,9 +428,10 @@ function figureToolSpecs() {
|
|
|
425
428
|
if (!row)
|
|
426
429
|
return missingFigureTarget();
|
|
427
430
|
const current = sourceForTool(row, ctx?.host);
|
|
428
|
-
const { inspectSource } = getDeps();
|
|
431
|
+
const { inspectSource, getRepository } = getDeps();
|
|
432
|
+
await (0, capability_module_store_js_1.prepareCapabilityModules)({ getRepository }, { id: domainId });
|
|
429
433
|
/* Inspected whole, here; only what the model is told is held to its budget. */
|
|
430
|
-
return { ...findingsWithinBudget(inspectSource(current.source ? JSON.stringify(current.source) : null, null, undefined, row.type, row.category)), draft: current.draft };
|
|
434
|
+
return { ...findingsWithinBudget(inspectSource(current.source ? JSON.stringify(current.source) : null, null, undefined, row.type, row.category, { id: domainId })), draft: current.draft };
|
|
431
435
|
}
|
|
432
436
|
},
|
|
433
437
|
{
|
|
@@ -529,6 +533,9 @@ function figureToolSpecs() {
|
|
|
529
533
|
prompt,
|
|
530
534
|
base: base,
|
|
531
535
|
name: typeof args?.name === 'string' && args.name.trim() ? args.name.trim() : undefined,
|
|
536
|
+
/* The product capabilities the domain uses (ADR-0172 amendment 1, decision 16). */
|
|
537
|
+
capabilities: ctx?.state?.domain?.id ? [...(await (0, capability_module_store_js_1.prepareCapabilityModules)({ getRepository: getDeps().getRepository }, ctx.state.domain)).values()] : [],
|
|
538
|
+
choices: ctx?.state?.domain?.id ? await capabilityChoicesOf(ctx.state.domain) : {},
|
|
532
539
|
onTool: (tool, count) => ctx?.progress?.(ctx.t(`figure.progress.agent.${tool}`, { count, defaultValue: AGENT_PROGRESS[tool] ?? 'Working on the figure…' }))
|
|
533
540
|
});
|
|
534
541
|
}
|
|
@@ -548,6 +555,9 @@ function figureToolSpecs() {
|
|
|
548
555
|
prompt,
|
|
549
556
|
base,
|
|
550
557
|
name: typeof args?.name === 'string' && args.name.trim() ? args.name.trim() : undefined,
|
|
558
|
+
/* The product capabilities the domain uses (ADR-0172 amendment 1, decision 16). */
|
|
559
|
+
capabilities: ctx?.state?.domain?.id ? [...(await (0, capability_module_store_js_1.prepareCapabilityModules)({ getRepository: getDeps().getRepository }, ctx.state.domain)).values()] : [],
|
|
560
|
+
choices: ctx?.state?.domain?.id ? await capabilityChoicesOf(ctx.state.domain) : {},
|
|
551
561
|
...(images.length ? { images } : {}),
|
|
552
562
|
...(focus && Object.keys(focus).length ? { focus } : {}),
|
|
553
563
|
...(!create && (stringsOf(args?.parts).length || stringsOf(args?.sections).length)
|
|
@@ -5,9 +5,15 @@ export * from './figure/figure-history.js';
|
|
|
5
5
|
export * from './figure-recipe/figure-recipe-type.js';
|
|
6
6
|
export { recipeTemplates, inLanguage, RECIPE_DIR } from './figure-recipe/figure-recipe-templates.js';
|
|
7
7
|
import { FigureInstallKeyResolver } from './install-key/figure-install-key.js';
|
|
8
|
+
import { FigureCapabilityChoiceLists, FigureCapabilityUse, FigureInstallKeyCapability } from './capability-module/capability-module-entity.js';
|
|
9
|
+
import { FigureCapabilityModuleResolver } from './capability-module/capability-module-resolver.js';
|
|
10
|
+
import './capability-module/capability-release-check.js';
|
|
8
11
|
export * from './install-key/figure-install-key.js';
|
|
9
|
-
export declare const entities: (typeof import("./figure/figure.js").Figure | typeof import("./figure/figure-history.js").FigureHistory | typeof import("./figure/figure-replaced-draft.js").FigureReplacedDraft | typeof import("./figure/figure-proposal-record.js").FigureProposalRecord | typeof import("./figure/figure-namespace-entity.js").FigureNamespace)[];
|
|
12
|
+
export declare const entities: (typeof import("./figure/figure.js").Figure | typeof import("./figure/figure-history.js").FigureHistory | typeof FigureCapabilityUse | typeof FigureCapabilityChoiceLists | typeof FigureInstallKeyCapability | typeof import("./figure/figure-replaced-draft.js").FigureReplacedDraft | typeof import("./figure/figure-proposal-record.js").FigureProposalRecord | typeof import("./figure/figure-namespace-entity.js").FigureNamespace)[];
|
|
10
13
|
export declare const subscribers: typeof import("./figure/event-subscriber.js").FigureHistoryEntitySubscriber[];
|
|
11
14
|
export declare const schema: {
|
|
12
|
-
resolverClasses: (typeof import("./figure/figure-query.js").FigureQuery | typeof import("./figure/figure-mutation.js").FigureMutation | typeof import("./figure/figure-namespace-resolver.js").FigureNamespaceResolver | typeof import("./figure-recipe/figure-recipe-resolver.js").FigureRecipeTemplateQuery | typeof FigureInstallKeyResolver)[];
|
|
15
|
+
resolverClasses: (typeof import("./figure/figure-query.js").FigureQuery | typeof import("./figure/figure-mutation.js").FigureMutation | typeof import("./figure/figure-namespace-resolver.js").FigureNamespaceResolver | typeof import("./figure-recipe/figure-recipe-resolver.js").FigureRecipeTemplateQuery | typeof FigureInstallKeyResolver | typeof FigureCapabilityModuleResolver)[];
|
|
13
16
|
};
|
|
17
|
+
export * from './capability-module/capability-module-entity.js';
|
|
18
|
+
export { chosenCapabilityChoices, chosenModules, prepareCapabilityModules, registerCapabilityModule } from './capability-module/capability-module-store.js';
|
|
19
|
+
export { capabilityFindings } from './capability-module/capability-release-check.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.schema = exports.subscribers = exports.entities = exports.RECIPE_DIR = exports.inLanguage = exports.recipeTemplates = void 0;
|
|
3
|
+
exports.capabilityFindings = exports.registerCapabilityModule = exports.prepareCapabilityModules = exports.chosenModules = exports.chosenCapabilityChoices = exports.schema = exports.subscribers = exports.entities = exports.RECIPE_DIR = exports.inLanguage = exports.recipeTemplates = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
// Entity types
|
|
6
6
|
tslib_1.__exportStar(require("./figure/figure.js"), exports);
|
|
@@ -16,8 +16,12 @@ Object.defineProperty(exports, "RECIPE_DIR", { enumerable: true, get: function (
|
|
|
16
16
|
const index_js_1 = require("./figure/index.js");
|
|
17
17
|
const index_js_2 = require("./figure-recipe/index.js");
|
|
18
18
|
const figure_install_key_js_1 = require("./install-key/figure-install-key.js");
|
|
19
|
+
const capability_module_entity_js_1 = require("./capability-module/capability-module-entity.js");
|
|
20
|
+
const capability_module_resolver_js_1 = require("./capability-module/capability-module-resolver.js");
|
|
21
|
+
/* Registers the release door's capability check (ADR-0172 decision 9). */
|
|
22
|
+
require("./capability-module/capability-release-check.js");
|
|
19
23
|
tslib_1.__exportStar(require("./install-key/figure-install-key.js"), exports);
|
|
20
|
-
exports.entities = [...index_js_1.entities];
|
|
24
|
+
exports.entities = [...index_js_1.entities, capability_module_entity_js_1.FigureCapabilityModule, capability_module_entity_js_1.FigureCapabilityUse, capability_module_entity_js_1.FigureInstallKeyCapability, capability_module_entity_js_1.FigureCapabilityChoiceLists];
|
|
21
25
|
/* 버전 스냅샷을 뜨는 구독자. 셸이 이 이름으로 모아 TypeORM 에 등록한다(board-service 와 같다). */
|
|
22
26
|
exports.subscribers = [...index_js_1.subscribers];
|
|
23
27
|
/*
|
|
@@ -31,6 +35,14 @@ exports.subscribers = [...index_js_1.subscribers];
|
|
|
31
35
|
* board-service, ops-master and font-base all export the shape below.
|
|
32
36
|
*/
|
|
33
37
|
exports.schema = {
|
|
34
|
-
resolverClasses: [...index_js_1.resolvers, ...index_js_2.resolvers, figure_install_key_js_1.FigureInstallKeyResolver]
|
|
38
|
+
resolverClasses: [...index_js_1.resolvers, ...index_js_2.resolvers, figure_install_key_js_1.FigureInstallKeyResolver, capability_module_resolver_js_1.FigureCapabilityModuleResolver]
|
|
35
39
|
};
|
|
40
|
+
tslib_1.__exportStar(require("./capability-module/capability-module-entity.js"), exports);
|
|
41
|
+
var capability_module_store_js_1 = require("./capability-module/capability-module-store.js");
|
|
42
|
+
Object.defineProperty(exports, "chosenCapabilityChoices", { enumerable: true, get: function () { return capability_module_store_js_1.chosenCapabilityChoices; } });
|
|
43
|
+
Object.defineProperty(exports, "chosenModules", { enumerable: true, get: function () { return capability_module_store_js_1.chosenModules; } });
|
|
44
|
+
Object.defineProperty(exports, "prepareCapabilityModules", { enumerable: true, get: function () { return capability_module_store_js_1.prepareCapabilityModules; } });
|
|
45
|
+
Object.defineProperty(exports, "registerCapabilityModule", { enumerable: true, get: function () { return capability_module_store_js_1.registerCapabilityModule; } });
|
|
46
|
+
var capability_release_check_js_1 = require("./capability-module/capability-release-check.js");
|
|
47
|
+
Object.defineProperty(exports, "capabilityFindings", { enumerable: true, get: function () { return capability_release_check_js_1.capabilityFindings; } });
|
|
36
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,6 +9,7 @@ export declare class FigureInstallKey {
|
|
|
9
9
|
name: string;
|
|
10
10
|
issuedAt?: Date;
|
|
11
11
|
issuedBy?: string;
|
|
12
|
+
capabilityProvider?: string;
|
|
12
13
|
}
|
|
13
14
|
export declare class IssuedFigureInstallKey extends FigureInstallKey {
|
|
14
15
|
token: string;
|
|
@@ -24,7 +25,9 @@ export declare function installKeysOf(tx: EntityManager, domain: {
|
|
|
24
25
|
export declare function issueInstallKey(tx: EntityManager, domain: {
|
|
25
26
|
id: string;
|
|
26
27
|
subdomain?: string;
|
|
27
|
-
}, user: User, name: string
|
|
28
|
+
}, user: User, name: string,
|
|
29
|
+
/** The capability provider whose module the key may push (ADR-0172 decision 14): off unless given. */
|
|
30
|
+
capabilityProvider?: string | null): Promise<IssuedFigureInstallKey>;
|
|
28
31
|
/** Revokes a key for good: the appliance and its user go, so its token is refused from the next request. */
|
|
29
32
|
export declare function revokeInstallKey(tx: EntityManager, domain: {
|
|
30
33
|
id: string;
|
|
@@ -32,6 +35,6 @@ export declare function revokeInstallKey(tx: EntityManager, domain: {
|
|
|
32
35
|
/** The Settings card's doors. Issuing a credential is a security change, as an appliance's is. */
|
|
33
36
|
export declare class FigureInstallKeyResolver {
|
|
34
37
|
figureInstallKeys(context: ResolverContext): Promise<FigureInstallKey[]>;
|
|
35
|
-
issueFigureInstallKey(name: string, context: ResolverContext): Promise<IssuedFigureInstallKey>;
|
|
38
|
+
issueFigureInstallKey(name: string, context: ResolverContext, capabilityProvider?: string): Promise<IssuedFigureInstallKey>;
|
|
36
39
|
revokeFigureInstallKey(id: string, context: ResolverContext): Promise<boolean>;
|
|
37
40
|
}
|
|
@@ -8,7 +8,9 @@ exports.revokeInstallKey = revokeInstallKey;
|
|
|
8
8
|
const tslib_1 = require("tslib");
|
|
9
9
|
const type_graphql_1 = require("type-graphql");
|
|
10
10
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
11
|
+
const figure_model_1 = require("@hatiolab/figure-model");
|
|
11
12
|
const shell_1 = require("@things-factory/shell");
|
|
13
|
+
const capability_module_entity_js_1 = require("../capability-module/capability-module-entity.js");
|
|
12
14
|
/*
|
|
13
15
|
* A board server's key to install figures from this server (ADR-0114 decision 21, amended 2026-11-15). The user:
|
|
14
16
|
* 「단말장치 키를 사용하는 곳이 없는데 세팅에 없는데」 - an appliance alone said nothing of what it was for and could
|
|
@@ -39,6 +41,10 @@ tslib_1.__decorate([
|
|
|
39
41
|
(0, type_graphql_1.Field)({ nullable: true, description: 'Who issued it.' }),
|
|
40
42
|
tslib_1.__metadata("design:type", String)
|
|
41
43
|
], FigureInstallKey.prototype, "issuedBy", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The capability provider whose module the key may push to this domain (ADR-0172 decision 14); none when it may push none.' }),
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
47
|
+
], FigureInstallKey.prototype, "capabilityProvider", void 0);
|
|
42
48
|
exports.FigureInstallKey = FigureInstallKey = tslib_1.__decorate([
|
|
43
49
|
(0, type_graphql_1.ObjectType)({ description: 'A key a board server installs figures from this server with - never the token after it is issued.' })
|
|
44
50
|
], FigureInstallKey);
|
|
@@ -82,11 +88,17 @@ async function installKeysOf(tx, domain) {
|
|
|
82
88
|
relations: { updater: true },
|
|
83
89
|
order: { createdAt: 'DESC' }
|
|
84
90
|
});
|
|
85
|
-
|
|
91
|
+
const grants = await tx.getRepository(capability_module_entity_js_1.FigureInstallKeyCapability).find({ where: { domain: { id: domain.id } } });
|
|
92
|
+
return keys.map(key => ({ ...keyOf(key), capabilityProvider: grants.find(g => g.applianceId === key.id)?.provider }));
|
|
86
93
|
}
|
|
87
94
|
/** Issues a new key: an install-key appliance, its user given the reader role, its secret signed. */
|
|
88
|
-
async function issueInstallKey(tx, domain, user, name
|
|
95
|
+
async function issueInstallKey(tx, domain, user, name,
|
|
96
|
+
/** The capability provider whose module the key may push (ADR-0172 decision 14): off unless given. */
|
|
97
|
+
capabilityProvider) {
|
|
89
98
|
const label = String(name ?? '').trim();
|
|
99
|
+
const provider = capabilityProvider?.trim() || undefined;
|
|
100
|
+
if (provider && !figure_model_1.FIGURE_CAPABILITY_PROVIDER.test(provider))
|
|
101
|
+
throw new shell_1.Refusal('figure-install-key-provider-invalid', { provider }, "a capability provider is lower-case letters, digits and '-': {provider}");
|
|
90
102
|
if (!label)
|
|
91
103
|
throw new shell_1.Refusal('figure-install-key-name-missing', {}, 'Name the key - what board server it is for.');
|
|
92
104
|
if (label.length > 100)
|
|
@@ -102,14 +114,17 @@ async function issueInstallKey(tx, domain, user, name) {
|
|
|
102
114
|
const shadow = await tx.getRepository(auth_base_1.User).findOne({ where: { reference: appliance.id, userType: 'appliance' }, relations: { roles: true } });
|
|
103
115
|
shadow.roles = [role];
|
|
104
116
|
await tx.getRepository(auth_base_1.User).save(shadow);
|
|
117
|
+
if (provider)
|
|
118
|
+
await tx.getRepository(capability_module_entity_js_1.FigureInstallKeyCapability).save({ domain, applianceId: appliance.id, provider });
|
|
105
119
|
const issued = await (0, auth_base_1.issueApplianceSecret)(tx, domain, user, appliance.id);
|
|
106
|
-
return { ...keyOf({ ...issued, updater: user }), token: issued.accessToken };
|
|
120
|
+
return { ...keyOf({ ...issued, updater: user }), ...(provider ? { capabilityProvider: provider } : {}), token: issued.accessToken };
|
|
107
121
|
}
|
|
108
122
|
/** Revokes a key for good: the appliance and its user go, so its token is refused from the next request. */
|
|
109
123
|
async function revokeInstallKey(tx, domain, id) {
|
|
110
124
|
const key = await tx.getRepository(auth_base_1.Appliance).findOne({ where: { domain: { id: domain.id }, id, model: exports.INSTALL_KEY_MODEL } });
|
|
111
125
|
if (!key)
|
|
112
126
|
throw new shell_1.Refusal('figure-install-key-not-found', {}, 'There is no such install key.');
|
|
127
|
+
await tx.getRepository(capability_module_entity_js_1.FigureInstallKeyCapability).delete({ applianceId: id });
|
|
113
128
|
await (0, auth_base_1.deleteApplianceWithUser)(tx, domain, id);
|
|
114
129
|
return true;
|
|
115
130
|
}
|
|
@@ -119,9 +134,9 @@ let FigureInstallKeyResolver = class FigureInstallKeyResolver {
|
|
|
119
134
|
const { domain, tx } = context.state;
|
|
120
135
|
return await installKeysOf(tx ?? (0, shell_1.getRepository)(auth_base_1.Appliance).manager, domain);
|
|
121
136
|
}
|
|
122
|
-
async issueFigureInstallKey(name, context) {
|
|
137
|
+
async issueFigureInstallKey(name, context, capabilityProvider) {
|
|
123
138
|
const { domain, user, tx } = context.state;
|
|
124
|
-
return await issueInstallKey(tx, domain, user, name);
|
|
139
|
+
return await issueInstallKey(tx, domain, user, name, capabilityProvider);
|
|
125
140
|
}
|
|
126
141
|
async revokeFigureInstallKey(id, context) {
|
|
127
142
|
const { domain, tx } = context.state;
|
|
@@ -143,8 +158,9 @@ tslib_1.__decorate([
|
|
|
143
158
|
(0, type_graphql_1.Mutation)(returns => IssuedFigureInstallKey, { description: 'Issues a key a board server installs figures with. Its token is answered this once.' }),
|
|
144
159
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('name', { description: 'What the key is for.' })),
|
|
145
160
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
161
|
+
tslib_1.__param(2, (0, type_graphql_1.Arg)('capabilityProvider', { nullable: true, description: 'The capability provider whose module the key may push to this domain. Left out, it pushes none.' })),
|
|
146
162
|
tslib_1.__metadata("design:type", Function),
|
|
147
|
-
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
163
|
+
tslib_1.__metadata("design:paramtypes", [String, Object, String]),
|
|
148
164
|
tslib_1.__metadata("design:returntype", Promise)
|
|
149
165
|
], FigureInstallKeyResolver.prototype, "issueFigureInstallKey", null);
|
|
150
166
|
tslib_1.__decorate([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/figure-service",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.290",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"@things-factory:registry": "https://registry.npmjs.org"
|
|
@@ -41,18 +41,21 @@
|
|
|
41
41
|
"test:templates": "node --test scripts/templates.test.mts"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@hatiolab/figure-model": "^0.12.
|
|
44
|
+
"@hatiolab/figure-model": "^0.12.16",
|
|
45
45
|
"@operato/typeorm-history": "^10.0.0",
|
|
46
|
-
"@things-factory/ai-client-base": "^10.1.
|
|
47
|
-
"@things-factory/attachment-base": "^10.1.
|
|
48
|
-
"@things-factory/auth-base": "^10.1.
|
|
46
|
+
"@things-factory/ai-client-base": "^10.1.290",
|
|
47
|
+
"@things-factory/attachment-base": "^10.1.290",
|
|
48
|
+
"@things-factory/auth-base": "^10.1.290",
|
|
49
49
|
"@things-factory/env": "^10.1.281",
|
|
50
|
-
"@things-factory/setting-base": "^10.1.
|
|
51
|
-
"@things-factory/shell": "^10.1.
|
|
50
|
+
"@things-factory/setting-base": "^10.1.290",
|
|
51
|
+
"@things-factory/shell": "^10.1.290",
|
|
52
52
|
"graphql-scalars": "^1.22.4",
|
|
53
53
|
"graphql-upload": "^15.0.2",
|
|
54
54
|
"jszip": "^3.10.1",
|
|
55
55
|
"koa-router": "^7.4.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "b3d769457fc4976b73726bb1556b5036351f1b10",
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=22.12"
|
|
60
|
+
}
|
|
58
61
|
}
|
package/translations/en.json
CHANGED
|
@@ -208,5 +208,22 @@
|
|
|
208
208
|
"figure.progress.propose.draft": "Writing the figure (request {call})…",
|
|
209
209
|
"figure.progress.propose.retry": "The kernel refused it: asking again with the reasons (request {call})…",
|
|
210
210
|
"figure.progress.propose.revise": "Looking at what was measured and revising (request {call})…",
|
|
211
|
-
"figure.progress.propose.recover": "The revision was refused: asking again with the reasons (request {call})…"
|
|
211
|
+
"figure.progress.propose.recover": "The revision was refused: asking again with the reasons (request {call})…",
|
|
212
|
+
"figure.gate.capability-language": "en",
|
|
213
|
+
"figure.gate.capability-unverified.message": "The capability '{name}' is of the provider {provider}, which this domain does not use.",
|
|
214
|
+
"figure.gate.capability-unverified.why": "A release promises only what was checked. A capability this domain cannot check is not released.",
|
|
215
|
+
"figure.gate.capability-unverified.how": "Use {provider} in Settings > capability providers, or turn the capability off in the capability tab.",
|
|
216
|
+
"figure.gate.capability-needs.message": "The capability '{name}' needs {needs}.",
|
|
217
|
+
"figure.gate.capability-needs.how": "Turn on {needs} in the capability tab, or turn the capability off.",
|
|
218
|
+
"figure.gate.capability-settings.message": "The settings of '{name}' cannot be applied. {reasons}",
|
|
219
|
+
"figure.gate.capability-settings.how": "Fix the settings in the capability tab.",
|
|
220
|
+
"error.figure-capability-module-invalid": "The file is not a capability module. {issues}",
|
|
221
|
+
"error.figure-capability-module-provider": "This key may push the module of {allowed} only. The module is of {provider}.",
|
|
222
|
+
"error.figure-capability-module-version": "{provider} {kept} is registered already. Raise the module version above {kept} (now {version}).",
|
|
223
|
+
"error.figure-capability-module-not-found": "There is no {provider} {version} module.",
|
|
224
|
+
"error.figure-capability-module-too-large": "A capability module file is at most {max} bytes.",
|
|
225
|
+
"error.figure-capability-provider-unknown": "No capability module of {provider} is registered.",
|
|
226
|
+
"error.figure-capability-push-not-allowed": "This key may not push a capability module. Issue a key with capability module registration on, in the domain's Settings.",
|
|
227
|
+
"error.figure-install-key-provider-invalid": "A capability provider name uses lower-case letters, digits and '-' only: {provider}",
|
|
228
|
+
"error.figure-capability-choices-invalid": "The choice lists cannot be taken. {issues}"
|
|
212
229
|
}
|
package/translations/es.json
CHANGED
|
@@ -204,5 +204,22 @@
|
|
|
204
204
|
"error.figure-install-key-name-missing": "Indique el nombre de la clave: el servidor de tableros que la usará.",
|
|
205
205
|
"error.figure-install-key-name-too-long": "El nombre de la clave tiene como máximo {max} caracteres.",
|
|
206
206
|
"error.figure-install-key-not-found": "No existe esa clave de instalación.",
|
|
207
|
-
"error.figure-install-key-privilege-missing": "Este servidor no tiene el permiso para leer figuras publicadas."
|
|
207
|
+
"error.figure-install-key-privilege-missing": "Este servidor no tiene el permiso para leer figuras publicadas.",
|
|
208
|
+
"figure.gate.capability-language": "es",
|
|
209
|
+
"figure.gate.capability-unverified.message": "The capability '{name}' is of the provider {provider}, which this domain does not use.",
|
|
210
|
+
"figure.gate.capability-unverified.why": "A release promises only what was checked. A capability this domain cannot check is not released.",
|
|
211
|
+
"figure.gate.capability-unverified.how": "Use {provider} in Settings > capability providers, or turn the capability off in the capability tab.",
|
|
212
|
+
"figure.gate.capability-needs.message": "The capability '{name}' needs {needs}.",
|
|
213
|
+
"figure.gate.capability-needs.how": "Turn on {needs} in the capability tab, or turn the capability off.",
|
|
214
|
+
"figure.gate.capability-settings.message": "The settings of '{name}' cannot be applied. {reasons}",
|
|
215
|
+
"figure.gate.capability-settings.how": "Fix the settings in the capability tab.",
|
|
216
|
+
"error.figure-capability-module-invalid": "The file is not a capability module. {issues}",
|
|
217
|
+
"error.figure-capability-module-provider": "This key may push the module of {allowed} only. The module is of {provider}.",
|
|
218
|
+
"error.figure-capability-module-version": "{provider} {kept} is registered already. Raise the module version above {kept} (now {version}).",
|
|
219
|
+
"error.figure-capability-module-not-found": "There is no {provider} {version} module.",
|
|
220
|
+
"error.figure-capability-module-too-large": "A capability module file is at most {max} bytes.",
|
|
221
|
+
"error.figure-capability-provider-unknown": "No capability module of {provider} is registered.",
|
|
222
|
+
"error.figure-capability-push-not-allowed": "This key may not push a capability module. Issue a key with capability module registration on, in the domain's Settings.",
|
|
223
|
+
"error.figure-install-key-provider-invalid": "A capability provider name uses lower-case letters, digits and '-' only: {provider}",
|
|
224
|
+
"error.figure-capability-choices-invalid": "The choice lists cannot be taken. {issues}"
|
|
208
225
|
}
|
package/translations/ja.json
CHANGED
|
@@ -204,5 +204,22 @@
|
|
|
204
204
|
"error.figure-install-key-name-missing": "キー名を入力してください。このキーを使うボードサーバー名を入力します。",
|
|
205
205
|
"error.figure-install-key-name-too-long": "キー名は {max} 文字以内で入力してください。",
|
|
206
206
|
"error.figure-install-key-not-found": "該当するインストールキーがありません。",
|
|
207
|
-
"error.figure-install-key-privilege-missing": "このサーバーに発行済み Figure の参照権限が定義されていません。"
|
|
207
|
+
"error.figure-install-key-privilege-missing": "このサーバーに発行済み Figure の参照権限が定義されていません。",
|
|
208
|
+
"figure.gate.capability-language": "ja",
|
|
209
|
+
"figure.gate.capability-unverified.message": "The capability '{name}' is of the provider {provider}, which this domain does not use.",
|
|
210
|
+
"figure.gate.capability-unverified.why": "A release promises only what was checked. A capability this domain cannot check is not released.",
|
|
211
|
+
"figure.gate.capability-unverified.how": "Use {provider} in Settings > capability providers, or turn the capability off in the capability tab.",
|
|
212
|
+
"figure.gate.capability-needs.message": "The capability '{name}' needs {needs}.",
|
|
213
|
+
"figure.gate.capability-needs.how": "Turn on {needs} in the capability tab, or turn the capability off.",
|
|
214
|
+
"figure.gate.capability-settings.message": "The settings of '{name}' cannot be applied. {reasons}",
|
|
215
|
+
"figure.gate.capability-settings.how": "Fix the settings in the capability tab.",
|
|
216
|
+
"error.figure-capability-module-invalid": "The file is not a capability module. {issues}",
|
|
217
|
+
"error.figure-capability-module-provider": "This key may push the module of {allowed} only. The module is of {provider}.",
|
|
218
|
+
"error.figure-capability-module-version": "{provider} {kept} is registered already. Raise the module version above {kept} (now {version}).",
|
|
219
|
+
"error.figure-capability-module-not-found": "There is no {provider} {version} module.",
|
|
220
|
+
"error.figure-capability-module-too-large": "A capability module file is at most {max} bytes.",
|
|
221
|
+
"error.figure-capability-provider-unknown": "No capability module of {provider} is registered.",
|
|
222
|
+
"error.figure-capability-push-not-allowed": "This key may not push a capability module. Issue a key with capability module registration on, in the domain's Settings.",
|
|
223
|
+
"error.figure-install-key-provider-invalid": "A capability provider name uses lower-case letters, digits and '-' only: {provider}",
|
|
224
|
+
"error.figure-capability-choices-invalid": "The choice lists cannot be taken. {issues}"
|
|
208
225
|
}
|
package/translations/ko.json
CHANGED
|
@@ -208,5 +208,22 @@
|
|
|
208
208
|
"figure.progress.propose.draft": "피규어를 쓰는 중 ({call}번째 요청)…",
|
|
209
209
|
"figure.progress.propose.retry": "커널이 거절해 이유를 붙여 다시 요청하는 중 ({call}번째 요청)…",
|
|
210
210
|
"figure.progress.propose.revise": "만든 모델을 잰 결과를 보고 고치는 중 ({call}번째 요청)…",
|
|
211
|
-
"figure.progress.propose.recover": "고친 답이 거절되어 이유를 붙여 다시 요청하는 중 ({call}번째 요청)…"
|
|
211
|
+
"figure.progress.propose.recover": "고친 답이 거절되어 이유를 붙여 다시 요청하는 중 ({call}번째 요청)…",
|
|
212
|
+
"figure.gate.capability-language": "ko",
|
|
213
|
+
"figure.gate.capability-unverified.message": "'{name}' 능력은 {provider} 제공자의 능력이며, 이 사업장은 {provider} 제공자를 사용하지 않습니다.",
|
|
214
|
+
"figure.gate.capability-unverified.why": "발행은 검사를 통과한 내용만 약속합니다. 이 사업장에서 검사할 수 없는 능력은 발행하지 않습니다.",
|
|
215
|
+
"figure.gate.capability-unverified.how": "설정 > 능력 제공자에서 {provider}을(를) 사용으로 바꾸거나, 능력 탭에서 이 능력을 끄세요.",
|
|
216
|
+
"figure.gate.capability-needs.message": "'{name}' 능력에는 {needs}이(가) 필요합니다.",
|
|
217
|
+
"figure.gate.capability-needs.how": "능력 탭에서 {needs}을(를) 켜거나 이 능력을 끄세요.",
|
|
218
|
+
"figure.gate.capability-settings.message": "'{name}' 능력의 설정을 적용할 수 없습니다. {reasons}",
|
|
219
|
+
"figure.gate.capability-settings.how": "능력 탭에서 설정을 고치세요.",
|
|
220
|
+
"error.figure-capability-module-invalid": "능력 모듈 파일이 아닙니다. {issues}",
|
|
221
|
+
"error.figure-capability-module-provider": "이 키로는 {allowed} 제공자의 모듈만 올릴 수 있습니다. 올린 모듈의 제공자는 {provider}입니다.",
|
|
222
|
+
"error.figure-capability-module-version": "{provider} {kept} 버전이 이미 등록되어 있습니다. 모듈 버전을 {kept}보다 높게 올리세요(지금 {version}).",
|
|
223
|
+
"error.figure-capability-module-not-found": "{provider} {version} 모듈이 없습니다.",
|
|
224
|
+
"error.figure-capability-module-too-large": "능력 모듈 파일은 {max}바이트 이하여야 합니다.",
|
|
225
|
+
"error.figure-capability-provider-unknown": "{provider} 제공자의 능력 모듈이 등록되어 있지 않습니다.",
|
|
226
|
+
"error.figure-capability-push-not-allowed": "이 키에는 능력 모듈 등록 권한이 없습니다. 사업장 설정에서 능력 모듈 등록을 켠 키를 발급하세요.",
|
|
227
|
+
"error.figure-install-key-provider-invalid": "능력 제공자 이름은 영문 소문자, 숫자, '-'만 쓸 수 있습니다: {provider}",
|
|
228
|
+
"error.figure-capability-choices-invalid": "선택 목록을 받을 수 없습니다. {issues}"
|
|
212
229
|
}
|
package/translations/ms.json
CHANGED
|
@@ -204,5 +204,22 @@
|
|
|
204
204
|
"error.figure-install-key-name-missing": "Namakan kunci - pelayan papan yang akan menggunakannya.",
|
|
205
205
|
"error.figure-install-key-name-too-long": "Nama kunci paling banyak {max} aksara.",
|
|
206
206
|
"error.figure-install-key-not-found": "Tiada kunci pemasangan sedemikian.",
|
|
207
|
-
"error.figure-install-key-privilege-missing": "Pelayan ini tiada keistimewaan untuk membaca figure terbitan."
|
|
207
|
+
"error.figure-install-key-privilege-missing": "Pelayan ini tiada keistimewaan untuk membaca figure terbitan.",
|
|
208
|
+
"figure.gate.capability-language": "ms",
|
|
209
|
+
"figure.gate.capability-unverified.message": "The capability '{name}' is of the provider {provider}, which this domain does not use.",
|
|
210
|
+
"figure.gate.capability-unverified.why": "A release promises only what was checked. A capability this domain cannot check is not released.",
|
|
211
|
+
"figure.gate.capability-unverified.how": "Use {provider} in Settings > capability providers, or turn the capability off in the capability tab.",
|
|
212
|
+
"figure.gate.capability-needs.message": "The capability '{name}' needs {needs}.",
|
|
213
|
+
"figure.gate.capability-needs.how": "Turn on {needs} in the capability tab, or turn the capability off.",
|
|
214
|
+
"figure.gate.capability-settings.message": "The settings of '{name}' cannot be applied. {reasons}",
|
|
215
|
+
"figure.gate.capability-settings.how": "Fix the settings in the capability tab.",
|
|
216
|
+
"error.figure-capability-module-invalid": "The file is not a capability module. {issues}",
|
|
217
|
+
"error.figure-capability-module-provider": "This key may push the module of {allowed} only. The module is of {provider}.",
|
|
218
|
+
"error.figure-capability-module-version": "{provider} {kept} is registered already. Raise the module version above {kept} (now {version}).",
|
|
219
|
+
"error.figure-capability-module-not-found": "There is no {provider} {version} module.",
|
|
220
|
+
"error.figure-capability-module-too-large": "A capability module file is at most {max} bytes.",
|
|
221
|
+
"error.figure-capability-provider-unknown": "No capability module of {provider} is registered.",
|
|
222
|
+
"error.figure-capability-push-not-allowed": "This key may not push a capability module. Issue a key with capability module registration on, in the domain's Settings.",
|
|
223
|
+
"error.figure-install-key-provider-invalid": "A capability provider name uses lower-case letters, digits and '-' only: {provider}",
|
|
224
|
+
"error.figure-capability-choices-invalid": "The choice lists cannot be taken. {issues}"
|
|
208
225
|
}
|
package/translations/zh.json
CHANGED
|
@@ -204,5 +204,22 @@
|
|
|
204
204
|
"error.figure-install-key-name-missing": "请输入密钥名称,即使用该密钥的看板服务器。",
|
|
205
205
|
"error.figure-install-key-name-too-long": "密钥名称最多 {max} 个字符。",
|
|
206
206
|
"error.figure-install-key-not-found": "没有该安装密钥。",
|
|
207
|
-
"error.figure-install-key-privilege-missing": "此服务器未定义读取已发布图形的权限。"
|
|
207
|
+
"error.figure-install-key-privilege-missing": "此服务器未定义读取已发布图形的权限。",
|
|
208
|
+
"figure.gate.capability-language": "zh",
|
|
209
|
+
"figure.gate.capability-unverified.message": "The capability '{name}' is of the provider {provider}, which this domain does not use.",
|
|
210
|
+
"figure.gate.capability-unverified.why": "A release promises only what was checked. A capability this domain cannot check is not released.",
|
|
211
|
+
"figure.gate.capability-unverified.how": "Use {provider} in Settings > capability providers, or turn the capability off in the capability tab.",
|
|
212
|
+
"figure.gate.capability-needs.message": "The capability '{name}' needs {needs}.",
|
|
213
|
+
"figure.gate.capability-needs.how": "Turn on {needs} in the capability tab, or turn the capability off.",
|
|
214
|
+
"figure.gate.capability-settings.message": "The settings of '{name}' cannot be applied. {reasons}",
|
|
215
|
+
"figure.gate.capability-settings.how": "Fix the settings in the capability tab.",
|
|
216
|
+
"error.figure-capability-module-invalid": "The file is not a capability module. {issues}",
|
|
217
|
+
"error.figure-capability-module-provider": "This key may push the module of {allowed} only. The module is of {provider}.",
|
|
218
|
+
"error.figure-capability-module-version": "{provider} {kept} is registered already. Raise the module version above {kept} (now {version}).",
|
|
219
|
+
"error.figure-capability-module-not-found": "There is no {provider} {version} module.",
|
|
220
|
+
"error.figure-capability-module-too-large": "A capability module file is at most {max} bytes.",
|
|
221
|
+
"error.figure-capability-provider-unknown": "No capability module of {provider} is registered.",
|
|
222
|
+
"error.figure-capability-push-not-allowed": "This key may not push a capability module. Issue a key with capability module registration on, in the domain's Settings.",
|
|
223
|
+
"error.figure-install-key-provider-invalid": "A capability provider name uses lower-case letters, digits and '-' only: {provider}",
|
|
224
|
+
"error.figure-capability-choices-invalid": "The choice lists cannot be taken. {issues}"
|
|
208
225
|
}
|