@things-factory/ai-assistant 10.1.316 → 10.1.319
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/service/data-entry/entry-target.d.ts +11 -1
- package/dist-server/service/data-entry/entry-target.js +18 -8
- package/dist-server/service/index.d.ts +1 -0
- package/dist-server/service/index.js +4 -1
- package/dist-server/service/mcp/mcp-call.js +2 -0
- package/dist-server/service/mcp/mcp-conversation.js +2 -1
- package/dist-server/service/mcp/mcp-held-proposal.d.ts +19 -0
- package/dist-server/service/mcp/mcp-held-proposal.js +134 -0
- package/dist-server/service/mcp/mcp-route.js +2 -1
- package/dist-server/service/mcp/mcp-scope.d.ts +18 -4
- package/dist-server/service/mcp/mcp-scope.js +40 -9
- package/dist-server/service/mcp/mcp-server.js +16 -6
- package/dist-server/service/request-translator.d.ts +6 -0
- package/dist-server/service/request-translator.js +14 -0
- package/package.json +7 -7
- package/translations/en.json +4 -2
- package/translations/es.json +4 -2
- package/translations/ja.json +4 -2
- package/translations/ko.json +10 -8
- package/translations/ms.json +4 -2
- package/translations/zh.json +4 -2
|
@@ -226,7 +226,17 @@ export interface EntryUpdate {
|
|
|
226
226
|
export declare function entryDoorOf(mutation: string): string;
|
|
227
227
|
/** `Query.<field>` or `Mutation.<field>` of a document with one operation and one root field. */
|
|
228
228
|
export declare function rootFieldOf(document: string, operation: 'query' | 'mutation'): string;
|
|
229
|
-
/**
|
|
229
|
+
/**
|
|
230
|
+
* An application's ear for the events of the targets that keep no record of their own - a module's target (inquiry,
|
|
231
|
+
* learning) that the application opens, which cannot carry the application's `record`. Told the target's key; the
|
|
232
|
+
* application decides which are its to write down. A target that keeps its own record is not told here twice.
|
|
233
|
+
*/
|
|
234
|
+
export type EntryEventRecorder = (event: EntryEvent & {
|
|
235
|
+
target: string;
|
|
236
|
+
}, context: EntryContext) => void | Promise<void>;
|
|
237
|
+
export declare function registerEntryEventRecorder(recorder: EntryEventRecorder): void;
|
|
238
|
+
export declare function clearEntryEventRecorders(): void;
|
|
239
|
+
/** Tells the target - or, when it keeps no record, the applications' recorders - and never lets record keeping stop the work. */
|
|
230
240
|
export declare function recordEntryEvent(target: EntryTarget, event: EntryEvent, context: EntryContext): Promise<void>;
|
|
231
241
|
export declare const DEFAULT_MAX_ROWS = 200;
|
|
232
242
|
/** Validates and keeps a target - `registerEntryTarget` (entry-tools.ts) also opens its tool. A malformed declaration is refused at boot, not in a conversation. */
|
|
@@ -4,6 +4,8 @@ exports.findToolName = exports.changeToolName = exports.DEFAULT_MAX_ROWS = void
|
|
|
4
4
|
exports.recordIdOfKey = recordIdOfKey;
|
|
5
5
|
exports.entryDoorOf = entryDoorOf;
|
|
6
6
|
exports.rootFieldOf = rootFieldOf;
|
|
7
|
+
exports.registerEntryEventRecorder = registerEntryEventRecorder;
|
|
8
|
+
exports.clearEntryEventRecorders = clearEntryEventRecorders;
|
|
7
9
|
exports.recordEntryEvent = recordEntryEvent;
|
|
8
10
|
exports.declareEntryTarget = declareEntryTarget;
|
|
9
11
|
exports.entryTargetOf = entryTargetOf;
|
|
@@ -74,15 +76,23 @@ function rootFieldOf(document, operation) {
|
|
|
74
76
|
throw new Error('must have exactly one root field');
|
|
75
77
|
return `${operation === 'query' ? 'Query' : 'Mutation'}.${fields[0].name.value}`;
|
|
76
78
|
}
|
|
77
|
-
|
|
79
|
+
const entryEventRecorders = [];
|
|
80
|
+
function registerEntryEventRecorder(recorder) {
|
|
81
|
+
entryEventRecorders.push(recorder);
|
|
82
|
+
}
|
|
83
|
+
function clearEntryEventRecorders() {
|
|
84
|
+
entryEventRecorders.length = 0;
|
|
85
|
+
}
|
|
86
|
+
/** Tells the target - or, when it keeps no record, the applications' recorders - and never lets record keeping stop the work. */
|
|
78
87
|
async function recordEntryEvent(target, event, context) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
const tellers = target.record ? [() => target.record(event, context)] : entryEventRecorders.map(recorder => () => recorder({ ...event, target: target.key }, context));
|
|
89
|
+
for (const tell of tellers) {
|
|
90
|
+
try {
|
|
91
|
+
await tell();
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
/* an audit that failed to write is the application's to report */
|
|
95
|
+
}
|
|
86
96
|
}
|
|
87
97
|
}
|
|
88
98
|
exports.DEFAULT_MAX_ROWS = 200;
|
|
@@ -57,3 +57,4 @@ export declare const schema: {
|
|
|
57
57
|
resolverClasses: (typeof ChatSessionResolver | typeof AssistantProgressSubscription | typeof AssistantChatResolver | typeof AssistantModeResolver | typeof AssistantCapabilityResolver | typeof AiAgentResolver | typeof MySessionActivitySubscription | typeof ChatMessageSubscription | typeof ChatTypingSubscription | typeof EntryProposalResolver)[];
|
|
58
58
|
};
|
|
59
59
|
export { registerAssistantHome, type AssistantHome } from './mcp/mcp-conversation.js';
|
|
60
|
+
export { outsideProposalOf, pressHeldProposal, type HeldProposal } from './mcp/mcp-held-proposal.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerAssistantHome = exports.schema = exports.entities = exports.assertMayWriteSession = exports.PROPOSAL_OUTCOME_PREFIX = exports.runDetail = exports.detailCategoryOf = exports.registerDetailRead = exports.readCategoryOf = exports.registerReadTarget = exports.MAX_CHANGES = exports.proposeChanges = exports.runAsCaller = exports.entryCategoryOf = exports.registerEntryTarget = exports.requestTranslator = void 0;
|
|
3
|
+
exports.pressHeldProposal = exports.outsideProposalOf = exports.registerAssistantHome = exports.schema = exports.entities = exports.assertMayWriteSession = exports.PROPOSAL_OUTCOME_PREFIX = exports.runDetail = exports.detailCategoryOf = exports.registerDetailRead = exports.readCategoryOf = exports.registerReadTarget = exports.MAX_CHANGES = exports.proposeChanges = exports.runAsCaller = exports.entryCategoryOf = exports.registerEntryTarget = exports.requestTranslator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const chat_session_resolver_js_1 = require("./chat-session-resolver.js");
|
|
6
6
|
const assistant_chat_resolver_js_1 = require("./assistant-chat-resolver.js");
|
|
@@ -116,4 +116,7 @@ exports.schema = {
|
|
|
116
116
|
/* An app names the anchor its assistant opens at home - where a conversation the server makes for a person is listed. */
|
|
117
117
|
var mcp_conversation_js_1 = require("./mcp/mcp-conversation.js");
|
|
118
118
|
Object.defineProperty(exports, "registerAssistantHome", { enumerable: true, get: function () { return mcp_conversation_js_1.registerAssistantHome; } });
|
|
119
|
+
var mcp_held_proposal_js_1 = require("./mcp/mcp-held-proposal.js");
|
|
120
|
+
Object.defineProperty(exports, "outsideProposalOf", { enumerable: true, get: function () { return mcp_held_proposal_js_1.outsideProposalOf; } });
|
|
121
|
+
Object.defineProperty(exports, "pressHeldProposal", { enumerable: true, get: function () { return mcp_held_proposal_js_1.pressHeldProposal; } });
|
|
119
122
|
//# sourceMappingURL=index.js.map
|
|
@@ -116,6 +116,8 @@ async function handIn(spec, category, returned, outside, state, t, origin) {
|
|
|
116
116
|
const replaced = kept.replaced ?? [];
|
|
117
117
|
return {
|
|
118
118
|
handedIn: true,
|
|
119
|
+
/* Its key - a module that asks a person to approve the agent's work names the card by it (ADR-0237 amendment 1). */
|
|
120
|
+
proposal: card.key,
|
|
119
121
|
target: value.target,
|
|
120
122
|
...(value.op ? { op: value.op } : {}),
|
|
121
123
|
rows: counts.rows ?? rows.length,
|
|
@@ -123,7 +123,8 @@ async function keepOutsideProposal(kept) {
|
|
|
123
123
|
const client = await clientNameOf(state);
|
|
124
124
|
const replaced = await replacedBy(sessionId, card);
|
|
125
125
|
const rows = Number(card.counts?.rows ?? (Array.isArray(card.rows) ? card.rows.length : 0));
|
|
126
|
-
|
|
126
|
+
/* `count` picks the language's plural form where it has one (`_one`): 「1 row」, not 「1 rows」. */
|
|
127
|
+
const content = say(t, 'outside-agent-proposal', '{client} handed in a proposal of {count} rows. Nothing is entered until you press the card.', { client, count: rows });
|
|
127
128
|
/* The doors of the tool that made it (ADR-0073) - a reader who cannot pass them sees that it is here, not its values. */
|
|
128
129
|
const answerDoors = doorsForAnswer([{ name: tool, outcome: 'proposed' }], () => doors);
|
|
129
130
|
const message = await getRepository(ChatMessage).save({
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** A card taken from the requesting connection's conversation, with where it came from and the doors of its answer. */
|
|
2
|
+
export interface HeldProposal {
|
|
3
|
+
card: Record<string, any>;
|
|
4
|
+
/** The doors of the message that carries it (ADR-0073) - a reader who cannot pass them is not shown its values. */
|
|
5
|
+
doors: string[];
|
|
6
|
+
sessionId: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The entry card `key` that the request's own outside connection handed in - from its conversation for the connection,
|
|
10
|
+
* still the newest of its work and not pressed. Nothing for a request from a screen, another connection's key, or a
|
|
11
|
+
* card no longer good.
|
|
12
|
+
*/
|
|
13
|
+
export declare function outsideProposalOf(state: any, key: string): Promise<HeldProposal | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* Presses a held card as the request's person - the conversation's own apply, everything asked again - and writes what
|
|
16
|
+
* it did into the conversation it came from. Not inside a transaction: each row is its own call of the application's
|
|
17
|
+
* door, as a press from the dock.
|
|
18
|
+
*/
|
|
19
|
+
export declare function pressHeldProposal(held: HeldProposal, context: any): Promise<import("../data-entry/entry-apply.js").EntryApplyOutcome>;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.outsideProposalOf = outsideProposalOf;
|
|
37
|
+
exports.pressHeldProposal = pressHeldProposal;
|
|
38
|
+
/*
|
|
39
|
+
* A proposal an outside agent handed in, pressed by someone else (ADR-0237 amendment 1, decision 15).
|
|
40
|
+
*
|
|
41
|
+
* An agent connected for an account that is no person (an application's own AI account) hands in a 수정안 - the card
|
|
42
|
+
* waits in that account's conversation for the connection, where no person opens it. A module that asks a person to
|
|
43
|
+
* approve the agent's work (inquiry's request for the handlers' decision) takes the card from there by its key and holds
|
|
44
|
+
* it; the person it asks presses it. Pressing is the conversation's own: the stored rows, every door, a newer card of the
|
|
45
|
+
* same work, whether it was answered, the target's checks - all asked again, as the one who presses. What it did is
|
|
46
|
+
* written back into the agent's conversation, as the dock writes a press, so the agent reads it and the card is not
|
|
47
|
+
* entered twice.
|
|
48
|
+
*
|
|
49
|
+
* Nothing here knows a module or an application; the entities load when a card is read or pressed.
|
|
50
|
+
*/
|
|
51
|
+
const env_1 = require("@things-factory/env");
|
|
52
|
+
async function proposalMessagesOf(sessionId) {
|
|
53
|
+
const [{ getRepository }, { Not, IsNull }, { ChatMessage }] = await Promise.all([Promise.resolve().then(() => __importStar(require('@things-factory/shell'))), Promise.resolve().then(() => __importStar(require('typeorm'))), Promise.resolve().then(() => __importStar(require('../chat-message/chat-message.js')))]);
|
|
54
|
+
const carrying = await getRepository(ChatMessage).find({ where: { session: { id: sessionId }, proposals: Not(IsNull()) }, order: { createdAt: 'ASC' } });
|
|
55
|
+
return carrying.map(message => ({ id: message.id, proposals: message.proposalsJson ?? [], doors: (message.doors ?? []) }));
|
|
56
|
+
}
|
|
57
|
+
async function outcomeLinesOf(sessionId, key) {
|
|
58
|
+
const [{ getRepository }, { Like }, { ChatMessage }, { PROPOSAL_OUTCOME_PREFIX }] = await Promise.all([
|
|
59
|
+
Promise.resolve().then(() => __importStar(require('@things-factory/shell'))),
|
|
60
|
+
Promise.resolve().then(() => __importStar(require('typeorm'))),
|
|
61
|
+
Promise.resolve().then(() => __importStar(require('../chat-message/chat-message.js'))),
|
|
62
|
+
Promise.resolve().then(() => __importStar(require('../chat-message/proposal-outcome.js')))
|
|
63
|
+
]);
|
|
64
|
+
const lines = await getRepository(ChatMessage).find({ select: ['content'], where: { session: { id: sessionId }, role: 'system', content: Like(`${PROPOSAL_OUTCOME_PREFIX}${key}:%`) } });
|
|
65
|
+
return lines.map(line => line.content);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The entry card `key` that the request's own outside connection handed in - from its conversation for the connection,
|
|
69
|
+
* still the newest of its work and not pressed. Nothing for a request from a screen, another connection's key, or a
|
|
70
|
+
* card no longer good.
|
|
71
|
+
*/
|
|
72
|
+
async function outsideProposalOf(state, key) {
|
|
73
|
+
const connectionId = state?.oauth?.grantId;
|
|
74
|
+
const domainId = state?.domain?.id;
|
|
75
|
+
const wanted = String(key ?? '').trim();
|
|
76
|
+
if (!connectionId || !domainId || !wanted)
|
|
77
|
+
return undefined;
|
|
78
|
+
const [{ getRepository }, { ChatSession }, { findEntryProposal, entryProposalAnswered }] = await Promise.all([
|
|
79
|
+
Promise.resolve().then(() => __importStar(require('@things-factory/shell'))),
|
|
80
|
+
Promise.resolve().then(() => __importStar(require('../chat-session/chat-session.js'))),
|
|
81
|
+
Promise.resolve().then(() => __importStar(require('../data-entry/entry-apply.js')))
|
|
82
|
+
]);
|
|
83
|
+
const session = await getRepository(ChatSession).findOne({ where: { domain: { id: domainId }, connectionId } });
|
|
84
|
+
if (!session)
|
|
85
|
+
return undefined;
|
|
86
|
+
const messages = await proposalMessagesOf(session.id);
|
|
87
|
+
const { proposal, superseded } = findEntryProposal(messages, wanted);
|
|
88
|
+
if (!proposal || proposal.kind !== 'entry' || superseded)
|
|
89
|
+
return undefined;
|
|
90
|
+
if (entryProposalAnswered(wanted, await outcomeLinesOf(session.id, wanted)))
|
|
91
|
+
return undefined;
|
|
92
|
+
const carrier = messages.find(message => message.proposals.some((one) => one?.key === wanted));
|
|
93
|
+
return { card: proposal, doors: carrier?.doors ?? [], sessionId: session.id };
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Presses a held card as the request's person - the conversation's own apply, everything asked again - and writes what
|
|
97
|
+
* it did into the conversation it came from. Not inside a transaction: each row is its own call of the application's
|
|
98
|
+
* door, as a press from the dock.
|
|
99
|
+
*/
|
|
100
|
+
async function pressHeldProposal(held, context) {
|
|
101
|
+
const [{ getRepository }, { ChatMessage }, { applyEntryProposal, entryProposalAnswered }, { runAsCaller }, { entryRefusalFor }, { toolAccessFor }, { formatProposalOutcomeLine }] = await Promise.all([
|
|
102
|
+
Promise.resolve().then(() => __importStar(require('@things-factory/shell'))),
|
|
103
|
+
Promise.resolve().then(() => __importStar(require('../chat-message/chat-message.js'))),
|
|
104
|
+
Promise.resolve().then(() => __importStar(require('../data-entry/entry-apply.js'))),
|
|
105
|
+
Promise.resolve().then(() => __importStar(require('../data-entry/entry-tools.js'))),
|
|
106
|
+
Promise.resolve().then(() => __importStar(require('../data-entry/entry-refusal.js'))),
|
|
107
|
+
Promise.resolve().then(() => __importStar(require('../tool-access.js'))),
|
|
108
|
+
Promise.resolve().then(() => __importStar(require('../chat-message/proposal-outcome.js')))
|
|
109
|
+
]);
|
|
110
|
+
const key = String(held.card?.key ?? '');
|
|
111
|
+
const passes = toolAccessFor(context);
|
|
112
|
+
const outcome = await applyEntryProposal(key, {
|
|
113
|
+
messages: await proposalMessagesOf(held.sessionId),
|
|
114
|
+
answered: entryProposalAnswered(key, await outcomeLinesOf(held.sessionId, key)),
|
|
115
|
+
passesDoor: door => passes(door),
|
|
116
|
+
refusalFor: entryRefusalFor(context),
|
|
117
|
+
state: context.state,
|
|
118
|
+
execute: runAsCaller(context),
|
|
119
|
+
report: (message, error) => env_1.logger.error(message, error),
|
|
120
|
+
sessionId: held.sessionId
|
|
121
|
+
});
|
|
122
|
+
/* Written back only when something was tried - a refusal before any row leaves the card as it was, to be pressed again. */
|
|
123
|
+
if (outcome.applied || outcome.missed) {
|
|
124
|
+
await getRepository(ChatMessage).save({
|
|
125
|
+
session: { id: held.sessionId },
|
|
126
|
+
role: 'system',
|
|
127
|
+
content: formatProposalOutcomeLine(key, { verdict: outcome.verdict, ...(outcome.errorCode ? { errorCode: outcome.errorCode } : {}), applied: outcome.applied, missed: outcome.missed }),
|
|
128
|
+
creator: context.state.user,
|
|
129
|
+
updater: context.state.user
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return outcome;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=mcp-held-proposal.js.map
|
|
@@ -16,7 +16,8 @@ const mcp_conversation_js_1 = require("./mcp-conversation.js");
|
|
|
16
16
|
const mcp_server_js_1 = require("./mcp-server.js");
|
|
17
17
|
Object.defineProperty(exports, "MCP_PATH", { enumerable: true, get: function () { return mcp_server_js_1.MCP_PATH; } });
|
|
18
18
|
const mcp_settings_js_1 = require("./mcp-settings.js");
|
|
19
|
-
|
|
19
|
+
/* `nameKey`: the consent page and 「연결된 클라이언트」 show it in the person's language; `name` is what the metadata publishes. */
|
|
20
|
+
(0, auth_base_1.registerProtectedResource)({ path: mcp_server_js_1.MCP_PATH, name: 'AI assistant tools', nameKey: 'ai-assistant.text.mcp-resource-name', scopes: [], enabledFor: mcp_settings_js_1.outsideAgentsOn });
|
|
20
21
|
/* Every call from outside, in the framework audit - the calls that ran here, the refused ones from the endpoint. */
|
|
21
22
|
(0, ai_client_base_1.registerToolCallRecorder)(mcp_audit_js_1.auditMcpCall);
|
|
22
23
|
const endpoint = (0, mcp_server_js_1.mcpEndpoint)({
|
|
@@ -3,10 +3,24 @@ import { type ToolAccessCheck, type ToolScope, type ToolSpec } from '@things-fac
|
|
|
3
3
|
export declare function offeredOutside(spec: ToolSpec): boolean;
|
|
4
4
|
/** A proposal kept for a person to press in the app - it may be handed in from outside, where a conversation keeps it. */
|
|
5
5
|
export declare function handedInOutside(spec: ToolSpec): boolean;
|
|
6
|
-
/**
|
|
7
|
-
export declare
|
|
6
|
+
/** A write its registrar says may be done from outside - before asking whether the domain turned it on. */
|
|
7
|
+
export declare function writableOutside(spec: ToolSpec): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The writes the domain turned on for outside - each declaration asked for the domain once. One that cannot answer
|
|
10
|
+
* is off: a write is never opened by an error.
|
|
11
|
+
*/
|
|
12
|
+
export declare function writesOpenIn(domain: {
|
|
13
|
+
id: string;
|
|
14
|
+
} | undefined): Promise<ReadonlySet<string>>;
|
|
15
|
+
/** What may go out besides reads: a proposal kept for the person (`keeps`), and the writes the domain turned on. */
|
|
16
|
+
export interface McpReach {
|
|
17
|
+
keeps?: boolean;
|
|
18
|
+
writes?: ReadonlySet<string>;
|
|
19
|
+
}
|
|
20
|
+
/** Whether a tool goes out - a read, a proposal kept for the person where it can be kept, or a write the domain turned on. */
|
|
21
|
+
export declare const goesOutside: (reach: McpReach | boolean) => (spec: ToolSpec) => boolean;
|
|
8
22
|
/** The tools this person may call from outside - nothing for one who may not ask the assistant. */
|
|
9
|
-
export declare function mcpToolScope(access: ToolAccessCheck, mayAsk: boolean,
|
|
23
|
+
export declare function mcpToolScope(access: ToolAccessCheck, mayAsk: boolean, reach?: McpReach | boolean): Promise<ToolScope>;
|
|
10
24
|
/** Why a call was not run - kept in the audit; the client is told only that the tool is unknown. */
|
|
11
25
|
export type McpRefusalCode = 'mcp-unknown-tool' | 'mcp-not-offered' | 'mcp-door-closed' | 'mcp-not-permitted';
|
|
12
26
|
export interface McpRefusal {
|
|
@@ -19,7 +33,7 @@ export interface McpRefusal {
|
|
|
19
33
|
* One tool, asked again at the call: may go out, and this person passes every door it names. A refusal says why for
|
|
20
34
|
* the audit; the client gets the same answer for each, so it cannot tell a tool that is not theirs from no tool.
|
|
21
35
|
*/
|
|
22
|
-
export declare function findMcpTool(name: unknown, access: ToolAccessCheck, mayAsk: boolean,
|
|
36
|
+
export declare function findMcpTool(name: unknown, access: ToolAccessCheck, mayAsk: boolean, reach?: McpReach | boolean): Promise<{
|
|
23
37
|
spec: ToolSpec;
|
|
24
38
|
category: string;
|
|
25
39
|
} | {
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MCP_MAX_INSTRUCTIONS = exports.goesOutside = void 0;
|
|
4
4
|
exports.offeredOutside = offeredOutside;
|
|
5
5
|
exports.handedInOutside = handedInOutside;
|
|
6
|
+
exports.writableOutside = writableOutside;
|
|
7
|
+
exports.writesOpenIn = writesOpenIn;
|
|
6
8
|
exports.mcpToolScope = mcpToolScope;
|
|
7
9
|
exports.findMcpTool = findMcpTool;
|
|
8
10
|
exports.mcpToolOf = mcpToolOf;
|
|
@@ -26,9 +28,14 @@ exports.mcpInstructions = mcpInstructions;
|
|
|
26
28
|
*
|
|
27
29
|
* Step 2 opens one kind of proposal (ADR-0237 decision 11): one whose card is kept with a conversation and pressed later
|
|
28
30
|
* by a person in the app (`keepsProposal` - the 입력안 of a data entry target, whatever app registered it). It names the
|
|
29
|
-
* door of the write it would do (`Mutation.…`)
|
|
30
|
-
*
|
|
31
|
-
*
|
|
31
|
+
* door of the write it would do (`Mutation.…`): running it writes nothing, and the write runs only when the person presses
|
|
32
|
+
* the card, as them, asked again then. A tool with such a door and without the mark stays closed - a mark forgotten
|
|
33
|
+
* still closes it.
|
|
34
|
+
*
|
|
35
|
+
* A write goes out only where its registrar declared it may (`writesOutside`, ADR-0237 amendment 1) and that
|
|
36
|
+
* declaration answers yes for the token's domain - the registrar's own setting, asked at every list and every call.
|
|
37
|
+
* It writes as the person who connected, through its doors, each asked as for any other tool. Nothing here knows which
|
|
38
|
+
* tool, module or setting that is.
|
|
32
39
|
*/
|
|
33
40
|
const ai_client_base_1 = require("@things-factory/ai-client-base");
|
|
34
41
|
/** Whether a tool may go out at all, before asking who is calling. */
|
|
@@ -44,14 +51,38 @@ function offeredOutside(spec) {
|
|
|
44
51
|
function handedInOutside(spec) {
|
|
45
52
|
return spec.kind === 'read' && Array.isArray(spec.doors) && spec.doors.length > 0 && !!spec.proposes && !!spec.keepsProposal && !spec.needs?.length;
|
|
46
53
|
}
|
|
47
|
-
/**
|
|
48
|
-
|
|
54
|
+
/** A write its registrar says may be done from outside - before asking whether the domain turned it on. */
|
|
55
|
+
function writableOutside(spec) {
|
|
56
|
+
/* `external` runs on the server and answers; a `write` or `action` is applied by a screen, and there is none here. */
|
|
57
|
+
return spec.kind === 'external' && Array.isArray(spec.doors) && spec.doors.length > 0 && !!spec.writesOutside && !spec.proposes && !spec.needs?.length;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The writes the domain turned on for outside - each declaration asked for the domain once. One that cannot answer
|
|
61
|
+
* is off: a write is never opened by an error.
|
|
62
|
+
*/
|
|
63
|
+
async function writesOpenIn(domain) {
|
|
64
|
+
const open = new Set();
|
|
65
|
+
if (!domain?.id)
|
|
66
|
+
return open;
|
|
67
|
+
const writes = (0, ai_client_base_1.getToolCategories)().flatMap(category => category.specs.filter(writableOutside));
|
|
68
|
+
await Promise.all(writes.map(async (spec) => {
|
|
69
|
+
if (await spec.writesOutside.enabledFor(domain).catch(() => false))
|
|
70
|
+
open.add(spec.name);
|
|
71
|
+
}));
|
|
72
|
+
return open;
|
|
73
|
+
}
|
|
74
|
+
const reachOf = (reach) => (typeof reach === 'boolean' ? { keeps: reach } : reach);
|
|
75
|
+
/** Whether a tool goes out - a read, a proposal kept for the person where it can be kept, or a write the domain turned on. */
|
|
76
|
+
const goesOutside = (reach) => {
|
|
77
|
+
const { keeps = false, writes } = reachOf(reach);
|
|
78
|
+
return (spec) => offeredOutside(spec) || (keeps && handedInOutside(spec)) || (!!writes?.has(spec.name) && writableOutside(spec));
|
|
79
|
+
};
|
|
49
80
|
exports.goesOutside = goesOutside;
|
|
50
81
|
/** The tools this person may call from outside - nothing for one who may not ask the assistant. */
|
|
51
|
-
async function mcpToolScope(access, mayAsk,
|
|
82
|
+
async function mcpToolScope(access, mayAsk, reach = false) {
|
|
52
83
|
if (!mayAsk)
|
|
53
84
|
return ai_client_base_1.EMPTY_TOOL_SCOPE;
|
|
54
|
-
const goes = (0, exports.goesOutside)(
|
|
85
|
+
const goes = (0, exports.goesOutside)(reach);
|
|
55
86
|
/* Only the categories with a tool that may go out are asked about - a category of cards alone asks no door. */
|
|
56
87
|
const requested = (0, ai_client_base_1.getToolCategories)()
|
|
57
88
|
.filter(category => category.specs.some(goes))
|
|
@@ -62,13 +93,13 @@ async function mcpToolScope(access, mayAsk, keeps = false) {
|
|
|
62
93
|
* One tool, asked again at the call: may go out, and this person passes every door it names. A refusal says why for
|
|
63
94
|
* the audit; the client gets the same answer for each, so it cannot tell a tool that is not theirs from no tool.
|
|
64
95
|
*/
|
|
65
|
-
async function findMcpTool(name, access, mayAsk,
|
|
96
|
+
async function findMcpTool(name, access, mayAsk, reach = false) {
|
|
66
97
|
const tool = typeof name === 'string' ? name : String(name ?? '');
|
|
67
98
|
const spec = tool ? (0, ai_client_base_1.findToolSpec)(tool) : undefined;
|
|
68
99
|
const category = tool ? (0, ai_client_base_1.findToolCategory)(tool) : undefined;
|
|
69
100
|
if (!spec || !category)
|
|
70
101
|
return { refused: { tool, code: 'mcp-unknown-tool' } };
|
|
71
|
-
if (!(0, exports.goesOutside)(
|
|
102
|
+
if (!(0, exports.goesOutside)(reach)(spec))
|
|
72
103
|
return { refused: { tool, category, code: 'mcp-not-offered' } };
|
|
73
104
|
if (!mayAsk)
|
|
74
105
|
return { refused: { tool, category, code: 'mcp-not-permitted' } };
|
|
@@ -5,6 +5,7 @@ exports.answerMcp = answerMcp;
|
|
|
5
5
|
exports.mcpEndpoint = mcpEndpoint;
|
|
6
6
|
exports.mcpRequestGuard = mcpRequestGuard;
|
|
7
7
|
exports.mcpParseErrors = mcpParseErrors;
|
|
8
|
+
const env_1 = require("@things-factory/env");
|
|
8
9
|
const request_translator_js_1 = require("../request-translator.js");
|
|
9
10
|
const mcp_call_js_1 = require("./mcp-call.js");
|
|
10
11
|
const mcp_scope_js_1 = require("./mcp-scope.js");
|
|
@@ -33,10 +34,12 @@ async function answerMcp(message, request, deps) {
|
|
|
33
34
|
const { id, method, params } = message;
|
|
34
35
|
const { state, t } = request;
|
|
35
36
|
const access = deps.access(state);
|
|
37
|
+
/* The writes the token's domain turned on - asked at each request, so turning one off closes it at the next. */
|
|
38
|
+
const reach = async () => ({ keeps: !!deps.outside, writes: await (0, mcp_scope_js_1.writesOpenIn)(state?.domain) });
|
|
36
39
|
switch (method) {
|
|
37
40
|
case 'initialize': {
|
|
38
41
|
const asked = params?.protocolVersion;
|
|
39
|
-
const scope = await (0, mcp_scope_js_1.mcpToolScope)(access, await deps.mayAsk(state),
|
|
42
|
+
const scope = await (0, mcp_scope_js_1.mcpToolScope)(access, await deps.mayAsk(state), await reach());
|
|
40
43
|
const instructions = (0, mcp_scope_js_1.mcpInstructions)(scope);
|
|
41
44
|
return reply(id, {
|
|
42
45
|
protocolVersion: exports.MCP_PROTOCOL_VERSIONS.includes(asked) ? asked : exports.MCP_PROTOCOL_VERSIONS[0],
|
|
@@ -48,13 +51,13 @@ async function answerMcp(message, request, deps) {
|
|
|
48
51
|
case 'ping':
|
|
49
52
|
return reply(id, {});
|
|
50
53
|
case 'tools/list': {
|
|
51
|
-
const scope = await (0, mcp_scope_js_1.mcpToolScope)(access, await deps.mayAsk(state),
|
|
54
|
+
const scope = await (0, mcp_scope_js_1.mcpToolScope)(access, await deps.mayAsk(state), await reach());
|
|
52
55
|
return reply(id, { tools: scope.specs.map(mcp_scope_js_1.mcpToolOf) });
|
|
53
56
|
}
|
|
54
57
|
case 'tools/call': {
|
|
55
58
|
const name = params?.name;
|
|
56
59
|
/* Asked again here - a door closed since the list closes the tool. */
|
|
57
|
-
const found = await (0, mcp_scope_js_1.findMcpTool)(name, access, await deps.mayAsk(state),
|
|
60
|
+
const found = await (0, mcp_scope_js_1.findMcpTool)(name, access, await deps.mayAsk(state), await reach());
|
|
58
61
|
if ('refused' in found) {
|
|
59
62
|
await deps.refused?.(state, found.refused);
|
|
60
63
|
return failure(id, INVALID_PARAMS, `Unknown tool: ${name}`);
|
|
@@ -90,9 +93,16 @@ function mcpEndpoint(deps) {
|
|
|
90
93
|
context.body = failure(null, INVALID_REQUEST, 'No person and domain - the request was not authorized');
|
|
91
94
|
return;
|
|
92
95
|
}
|
|
93
|
-
/*
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
/*
|
|
97
|
+
* The tools read the request's language as a scheduled run reads its own (`state.lng`), and what is said here is in
|
|
98
|
+
* it. A request that names none - an agent sends no cookie and no `Accept-Language` - speaks the person's: their
|
|
99
|
+
* locale, else the installation's default, as a notice picks its receiver's (`deliverNotice`). Taking the request's
|
|
100
|
+
* translator as it was answered such a request in English - a Korean person's conversation 「Outside agent: …」,
|
|
101
|
+
* its card and its notice (browser check 2026-11-28).
|
|
102
|
+
*/
|
|
103
|
+
const lng = context.state.lng ?? context.lng ?? (user.locale || env_1.config.get('i18n/defaultLanguage', 'en'));
|
|
104
|
+
const state = { ...context.state, lng };
|
|
105
|
+
const answer = await answerMcp(context.request?.body, { state, t: (0, request_translator_js_1.translatorIn)(context, lng), ...(deps.origin ? { origin: deps.origin(context) } : {}) }, deps);
|
|
96
106
|
if (answer === undefined) {
|
|
97
107
|
context.status = 202;
|
|
98
108
|
return;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export type Translate = (key: string, params?: Record<string, any>) => string;
|
|
2
2
|
export declare function requestTranslator(context: any): Translate;
|
|
3
|
+
/**
|
|
4
|
+
* The request's i18next fixed to one language - for a request that names no language of its own while the person it
|
|
5
|
+
* speaks for has one (`/mcp`: an agent sends no `Accept-Language`). Without a language, or without i18next on the
|
|
6
|
+
* request (koa-i18next puts it on every request of the app; a subscription has none), the request's translator.
|
|
7
|
+
*/
|
|
8
|
+
export declare function translatorIn(context: any, lng: string | undefined): Translate;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.requestTranslator = requestTranslator;
|
|
4
|
+
exports.translatorIn = translatorIn;
|
|
4
5
|
function requestTranslator(context) {
|
|
5
6
|
return (key, params) => {
|
|
6
7
|
/*
|
|
@@ -13,6 +14,19 @@ function requestTranslator(context) {
|
|
|
13
14
|
return context.t(key, params ?? {});
|
|
14
15
|
};
|
|
15
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* The request's i18next fixed to one language - for a request that names no language of its own while the person it
|
|
19
|
+
* speaks for has one (`/mcp`: an agent sends no `Accept-Language`). Without a language, or without i18next on the
|
|
20
|
+
* request (koa-i18next puts it on every request of the app; a subscription has none), the request's translator.
|
|
21
|
+
*/
|
|
22
|
+
function translatorIn(context, lng) {
|
|
23
|
+
const i18next = context?.i18next;
|
|
24
|
+
if (!lng || typeof i18next?.getFixedT !== 'function')
|
|
25
|
+
return requestTranslator(context);
|
|
26
|
+
/* A person's locale is often a region form - `ko-KR` - and the translations are kept by language. */
|
|
27
|
+
const fixed = i18next.getFixedT(String(lng).split(/[-_]/)[0].toLowerCase());
|
|
28
|
+
return (key, params) => fixed(key, params ?? {});
|
|
29
|
+
}
|
|
16
30
|
/** 프레임워크와 같은 single brace 자리표 — `{doors}`. */
|
|
17
31
|
function interpolate(text, params) {
|
|
18
32
|
return text.replace(/\{(\w+)\}/g, (whole, name) => (params && name in params ? String(params[name]) : whole));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/ai-assistant",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.319",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"things-factory": true,
|
|
6
6
|
"author": "heartyoh",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@operato/shell": "^10.29.69",
|
|
38
38
|
"@operato/styles": "^10.0.0",
|
|
39
39
|
"@operato/utils": "^10.29.76",
|
|
40
|
-
"@things-factory/ai-client-base": "^10.1.
|
|
40
|
+
"@things-factory/ai-client-base": "^10.1.319",
|
|
41
41
|
"@things-factory/apptool-base": "^10.1.304",
|
|
42
|
-
"@things-factory/attachment-base": "^10.1.
|
|
43
|
-
"@things-factory/auth-base": "^10.1.
|
|
42
|
+
"@things-factory/attachment-base": "^10.1.319",
|
|
43
|
+
"@things-factory/auth-base": "^10.1.319",
|
|
44
44
|
"@things-factory/env": "^10.1.298",
|
|
45
45
|
"@things-factory/export-base": "^10.1.304",
|
|
46
|
-
"@things-factory/help": "^10.1.
|
|
47
|
-
"@things-factory/setting-base": "^10.1.
|
|
46
|
+
"@things-factory/help": "^10.1.319",
|
|
47
|
+
"@things-factory/setting-base": "^10.1.319",
|
|
48
48
|
"@things-factory/shell": "^10.1.304",
|
|
49
49
|
"dompurify": "^3.0.0",
|
|
50
50
|
"exceljs": "4.2.0",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"copyfiles": "^2.4.1",
|
|
76
76
|
"rimraf": "^5.0.0"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "9740f0f13130271ec920b435b6d833afdf611267"
|
|
79
79
|
}
|
package/translations/en.json
CHANGED
|
@@ -569,7 +569,9 @@
|
|
|
569
569
|
"ai-assistant.setting.external-ai-allow": "allow AI agents outside the app to connect",
|
|
570
570
|
"ai-assistant.setting.external-ai-hint": "When on, an AI agent outside the app (such as a coding assistant) can connect for a person who consents: it reads what that person may read here, and may hand in entry drafts. A record is made only when that person presses the draft in the app.",
|
|
571
571
|
"ai-assistant.text.outside-agent-conversation": "Outside agent: {client}",
|
|
572
|
-
"ai-assistant.text.outside-agent-proposal": "{client} handed in a proposal of {
|
|
572
|
+
"ai-assistant.text.outside-agent-proposal": "{client} handed in a proposal of {count} rows. Nothing is entered until you press the card.",
|
|
573
|
+
"ai-assistant.text.outside-agent-proposal_one": "{client} handed in a proposal of {count} row. Nothing is entered until you press the card.",
|
|
573
574
|
"ai-assistant.text.outside-agent-notice-title": "A proposal waits for you",
|
|
574
|
-
"ai-assistant.text.outside-agent-notice-body": "{client} handed in a proposal. Open it and press the card to enter it."
|
|
575
|
+
"ai-assistant.text.outside-agent-notice-body": "{client} handed in a proposal. Open it and press the card to enter it.",
|
|
576
|
+
"ai-assistant.text.mcp-resource-name": "AI assistant tools"
|
|
575
577
|
}
|
package/translations/es.json
CHANGED
|
@@ -569,7 +569,9 @@
|
|
|
569
569
|
"ai-assistant.setting.external-ai-allow": "permitir que agentes de IA externos a la aplicación se conecten",
|
|
570
570
|
"ai-assistant.setting.external-ai-hint": "Si está activado, un agente de IA externo a la aplicación (como un asistente de programación) puede conectarse en nombre de una persona que da su consentimiento: lee lo que esa persona puede leer aquí y puede entregar borradores de registro. Un registro se crea solo cuando esa persona pulsa el borrador en la aplicación.",
|
|
571
571
|
"ai-assistant.text.outside-agent-conversation": "Agente externo: {client}",
|
|
572
|
-
"ai-assistant.text.outside-agent-proposal": "{client} entregó una propuesta de {
|
|
572
|
+
"ai-assistant.text.outside-agent-proposal": "{client} entregó una propuesta de {count} filas. No se registra nada hasta que pulse la tarjeta.",
|
|
573
|
+
"ai-assistant.text.outside-agent-proposal_one": "{client} entregó una propuesta de {count} fila. No se registra nada hasta que pulse la tarjeta.",
|
|
573
574
|
"ai-assistant.text.outside-agent-notice-title": "Una propuesta le espera",
|
|
574
|
-
"ai-assistant.text.outside-agent-notice-body": "{client} entregó una propuesta. Ábrala y pulse la tarjeta para registrarla."
|
|
575
|
+
"ai-assistant.text.outside-agent-notice-body": "{client} entregó una propuesta. Ábrala y pulse la tarjeta para registrarla.",
|
|
576
|
+
"ai-assistant.text.mcp-resource-name": "Herramientas del asistente de IA"
|
|
575
577
|
}
|
package/translations/ja.json
CHANGED
|
@@ -569,7 +569,9 @@
|
|
|
569
569
|
"ai-assistant.setting.external-ai-allow": "アプリ外の AI エージェントの接続を許可",
|
|
570
570
|
"ai-assistant.setting.external-ai-hint": "オンにすると、アプリ外の AI エージェント(コーディング支援など)が同意した人として接続し、その人がここで見られるものを読み、入力案を預けられます。記録はその人がアプリで入力案を押したときにだけ作られます。",
|
|
571
571
|
"ai-assistant.text.outside-agent-conversation": "外部エージェント: {client}",
|
|
572
|
-
"ai-assistant.text.outside-agent-proposal": "{client} が {
|
|
572
|
+
"ai-assistant.text.outside-agent-proposal": "{client} が {count} 行の入力案を預けました。カードを押すまで何も入力されません。",
|
|
573
|
+
"ai-assistant.text.outside-agent-proposal_one": "{client} が {count} 行の入力案を預けました。カードを押すまで何も入力されません。",
|
|
573
574
|
"ai-assistant.text.outside-agent-notice-title": "預けられた入力案があります",
|
|
574
|
-
"ai-assistant.text.outside-agent-notice-body": "{client} が入力案を預けました。開いてカードを押すと入力されます。"
|
|
575
|
+
"ai-assistant.text.outside-agent-notice-body": "{client} が入力案を預けました。開いてカードを押すと入力されます。",
|
|
576
|
+
"ai-assistant.text.mcp-resource-name": "AI アシスタントのツール"
|
|
575
577
|
}
|
package/translations/ko.json
CHANGED
|
@@ -564,12 +564,14 @@
|
|
|
564
564
|
"ai-assistant.usage.month": "{month}월",
|
|
565
565
|
"ai-assistant.usage.cost-note": "비용은 기록된 토큰 사용량과 현재 등록 단가로 계산한 참고 값이며 실제 청구액과 다를 수 있습니다. 음성 전사 등 토큰으로 집계하지 않는 비용은 포함하지 않습니다. 단가가 등록되지 않은 모델의 호출은 비용 합계에서 제외합니다.",
|
|
566
566
|
"ai-assistant.agent.image-model": "이미지 모델",
|
|
567
|
-
"ai-assistant.agent.image-model-hint": "
|
|
568
|
-
"ai-assistant.setting.external-ai": "
|
|
569
|
-
"ai-assistant.setting.external-ai-allow": "
|
|
570
|
-
"ai-assistant.setting.external-ai-hint": "
|
|
571
|
-
"ai-assistant.text.outside-agent-conversation": "
|
|
572
|
-
"ai-assistant.text.outside-agent-proposal": "{client}
|
|
573
|
-
"ai-assistant.text.outside-agent-
|
|
574
|
-
"ai-assistant.text.outside-agent-notice-
|
|
567
|
+
"ai-assistant.agent.image-model-hint": "이미지 생성에 사용할 모델입니다. 비워 두면 {model} 모델을 사용합니다.",
|
|
568
|
+
"ai-assistant.setting.external-ai": "외부 AI 연결",
|
|
569
|
+
"ai-assistant.setting.external-ai-allow": "외부 AI 에이전트 연결 허용",
|
|
570
|
+
"ai-assistant.setting.external-ai-hint": "이 설정을 켜면 코딩 도우미 같은 외부 AI 에이전트가 연결에 동의한 사용자의 권한으로 정보를 조회하고 입력안을 제안할 수 있습니다. 앱에서 사용자가 입력안 카드를 눌러야 기록에 반영됩니다.",
|
|
571
|
+
"ai-assistant.text.outside-agent-conversation": "외부 에이전트 · {client}",
|
|
572
|
+
"ai-assistant.text.outside-agent-proposal": "{client}에서 {count}행의 입력안을 제출했습니다. 카드를 누르면 입력안이 반영됩니다.",
|
|
573
|
+
"ai-assistant.text.outside-agent-proposal_one": "{client}에서 {count}행의 입력안을 제출했습니다. 카드를 누르면 입력안이 반영됩니다.",
|
|
574
|
+
"ai-assistant.text.outside-agent-notice-title": "새 입력안이 도착했습니다",
|
|
575
|
+
"ai-assistant.text.outside-agent-notice-body": "{client}에서 입력안을 제출했습니다. 알림을 열고 입력안 카드를 누르면 기록에 반영됩니다.",
|
|
576
|
+
"ai-assistant.text.mcp-resource-name": "AI 비서 도구"
|
|
575
577
|
}
|
package/translations/ms.json
CHANGED
|
@@ -569,7 +569,9 @@
|
|
|
569
569
|
"ai-assistant.setting.external-ai-allow": "benarkan ejen AI di luar aplikasi bersambung",
|
|
570
570
|
"ai-assistant.setting.external-ai-hint": "Apabila dihidupkan, ejen AI di luar aplikasi (seperti pembantu pengekodan) boleh bersambung bagi pihak orang yang bersetuju: ia membaca apa yang orang itu boleh baca di sini dan boleh menyerahkan draf kemasukan. Rekod hanya dibuat apabila orang itu menekan draf dalam aplikasi.",
|
|
571
571
|
"ai-assistant.text.outside-agent-conversation": "Ejen luar: {client}",
|
|
572
|
-
"ai-assistant.text.outside-agent-proposal": "{client} menyerahkan cadangan {
|
|
572
|
+
"ai-assistant.text.outside-agent-proposal": "{client} menyerahkan cadangan {count} baris. Tiada apa yang dimasukkan sehingga anda menekan kad itu.",
|
|
573
|
+
"ai-assistant.text.outside-agent-proposal_one": "{client} menyerahkan cadangan {count} baris. Tiada apa yang dimasukkan sehingga anda menekan kad itu.",
|
|
573
574
|
"ai-assistant.text.outside-agent-notice-title": "Satu cadangan menanti anda",
|
|
574
|
-
"ai-assistant.text.outside-agent-notice-body": "{client} menyerahkan cadangan. Buka dan tekan kad untuk memasukkannya."
|
|
575
|
+
"ai-assistant.text.outside-agent-notice-body": "{client} menyerahkan cadangan. Buka dan tekan kad untuk memasukkannya.",
|
|
576
|
+
"ai-assistant.text.mcp-resource-name": "Alat pembantu AI"
|
|
575
577
|
}
|
package/translations/zh.json
CHANGED
|
@@ -569,7 +569,9 @@
|
|
|
569
569
|
"ai-assistant.setting.external-ai-allow": "允许应用外的 AI 代理连接",
|
|
570
570
|
"ai-assistant.setting.external-ai-hint": "开启后,应用外的 AI 代理(如编码助手)可以以同意的用户身份连接,读取该用户在此可见的内容,并可提交录入草案。只有该用户在应用中按下草案后才会生成记录。",
|
|
571
571
|
"ai-assistant.text.outside-agent-conversation": "外部代理: {client}",
|
|
572
|
-
"ai-assistant.text.outside-agent-proposal": "{client} 提交了 {
|
|
572
|
+
"ai-assistant.text.outside-agent-proposal": "{client} 提交了 {count} 行的录入草案。在您按下卡片之前不会录入任何内容。",
|
|
573
|
+
"ai-assistant.text.outside-agent-proposal_one": "{client} 提交了 {count} 行的录入草案。在您按下卡片之前不会录入任何内容。",
|
|
573
574
|
"ai-assistant.text.outside-agent-notice-title": "有待处理的录入草案",
|
|
574
|
-
"ai-assistant.text.outside-agent-notice-body": "{client} 提交了录入草案。打开后按下卡片即可录入。"
|
|
575
|
+
"ai-assistant.text.outside-agent-notice-body": "{client} 提交了录入草案。打开后按下卡片即可录入。",
|
|
576
|
+
"ai-assistant.text.mcp-resource-name": "AI 助手工具"
|
|
575
577
|
}
|