@softure-ai/mcp-access 0.1.15 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +6 -6
- package/dist/index.d.ts +3 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/messages/index.d.ts +1 -107
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/messages/index.js +2 -3
- package/dist/messages/index.js.map +1 -1
- package/dist/options.d.ts +6 -24
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js +2 -2
- package/dist/options.js.map +1 -1
- package/dist/server/options.d.ts +3 -3
- package/dist/server/options.d.ts.map +1 -1
- package/dist/server/options.js +4 -4
- package/dist/server/options.js.map +1 -1
- package/module.json +2 -2
- package/package.json +6 -6
- package/src/index.ts +2 -2
- package/src/messages/index.ts +2 -3
- package/src/options.ts +2 -2
- package/src/server/options.ts +5 -5
- package/dist/messages/pl.d.ts +0 -3
- package/dist/messages/pl.d.ts.map +0 -1
- package/dist/messages/pl.js +0 -107
- package/dist/messages/pl.js.map +0 -1
- package/src/messages/pl.ts +0 -108
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ Newest first. Each version lists what changed for an app that uses `@softure-ai/
|
|
|
4
4
|
production, the version gets a line `verified in: <app>@<commit>` ([docs/05](../../docs/05-adoption-playbook.md),
|
|
5
5
|
"Definition of done"). Versions before the first one below are described in their GitHub Releases (`mcp-access@x.y.z`).
|
|
6
6
|
|
|
7
|
+
## 0.2.0
|
|
8
|
+
|
|
9
|
+
- **Breaking (#446):** the built-in `pl` dictionary is gone; English is the only built-in copy and the fallback for
|
|
10
|
+
every other locale, which is now any BCP 47 tag. Migrate: an app that shows Polish keeps its own translation and
|
|
11
|
+
passes it as the overrides for its locale, `mcpAccess({ messages: { pl: myTranslation } })`; a key it leaves out
|
|
12
|
+
reads English. Tool texts take any locale key.
|
|
13
|
+
|
|
7
14
|
## 0.1.15
|
|
8
15
|
|
|
9
16
|
- The stdio entry resolves its account with `resolveOnlyAccount` from `@softure-ai/auth/server` instead of a private
|
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ import { auth, AUTH_RATE_LIMIT_BUCKETS } from "@softure-ai/auth";
|
|
|
59
59
|
import { MCP_RATE_LIMIT_BUCKETS, mcpAccess } from "@softure-ai/mcp-access";
|
|
60
60
|
import { cloudflareIp, security } from "@softure-ai/security";
|
|
61
61
|
import { en } from "./messages/en";
|
|
62
|
-
import {
|
|
62
|
+
import { de } from "./messages/de"; // the app's own translation
|
|
63
63
|
|
|
64
64
|
// in defineSoftureConfig({ modules: [...] }):
|
|
65
65
|
security({ clientIp: cloudflareIp(), buckets: { ...AUTH_RATE_LIMIT_BUCKETS, ...MCP_RATE_LIMIT_BUCKETS } }),
|
|
@@ -68,8 +68,8 @@ mcpAccess({
|
|
|
68
68
|
serverName: "acme",
|
|
69
69
|
allowWrites: true,
|
|
70
70
|
tools: [
|
|
71
|
-
{ name: "list_orders", access: "read", description: { en: en.mcp.listOrders,
|
|
72
|
-
{ name: "cancel_order", access: "write", description: { en: en.mcp.cancelOrder,
|
|
71
|
+
{ name: "list_orders", access: "read", description: { en: en.mcp.listOrders, de: de.mcp.listOrders } },
|
|
72
|
+
{ name: "cancel_order", access: "write", description: { en: en.mcp.cancelOrder, de: de.mcp.cancelOrder } },
|
|
73
73
|
],
|
|
74
74
|
}),
|
|
75
75
|
```
|
|
@@ -78,7 +78,7 @@ mcpAccess({
|
|
|
78
78
|
| --- | --- | --- | --- |
|
|
79
79
|
| `serverName` | `string` | required | The name clients list the server under (lowercase, digits, inner dashes; no quotes needed in a shell). |
|
|
80
80
|
| `clientServerName` | `string` | `serverName` | The name the setup snippets register the server under (`claude mcp add`, the JSON configs, the assistant prompt), same pattern. Set it when users already added the server under another name: a new name gives everyone who reconnects a second entry. |
|
|
81
|
-
| `tools` | `{ name, access: "read" \| "write", description: { en,
|
|
81
|
+
| `tools` | `{ name, access: "read" \| "write", description: { en, <locale>? }, title?: { en, <locale>? }, example?: { en, <locale>? } }[]` | `[]` | The catalog the token page shows. `title` (a display name) and `example` (a request a person could make) are for agent docs that read the catalog. Keep it next to the factory; `expectToolCatalogMatchesServer` (`/testing`) checks that both list the same tools. |
|
|
82
82
|
| `allowWrites` | `boolean` | `false` | Lets write tokens be issued and used. Off, the page offers no write tokens and every token reads only. |
|
|
83
83
|
| `tokenLifetimeDays` | `integer` 1–365 | `90` | How long a hand-issued token works. There is no renewal: the user issues a new one. |
|
|
84
84
|
| `maxTokensPerUser` | `integer` 1–100 | `20` | Unexpired tokens one account may hold. Counted under a per-user lock, so parallel requests cannot overshoot. |
|
|
@@ -93,7 +93,7 @@ mcpAccess({
|
|
|
93
93
|
| `resolveAppOrigin` | `(request) => string \| null` | — | The app origin of one request, ahead of the config's `origins` block (prefer that block: every module reads it). `readRequestOrigin` reads it from `Host`. Null falls back to the block's rule; anything but a bare http(s) origin throws. |
|
|
94
94
|
| `resourceOrigins` | `string[]` (≤ 16 http(s) origins) | `[]` | Other public hosts of the app, e.g. the apex next to `app.`: the root protected resource metadata asked on one of them names it as `resource`, and the OAuth endpoints accept it as `resource`. |
|
|
95
95
|
| `routes` | `{ page?, endpoint?, oauthConsent?, oauthDecision?, oauthToken?, oauthRegister? }` | `DEFAULT_MCP_ACCESS_ROUTES` (root entry): `/account/mcp`, `/api/mcp`, `/oauth/authorize`, `/api/oauth/authorize`, `/api/oauth/token`, `/api/oauth/register` | Move the page, the endpoint or the OAuth paths; URLs in the setup and the metadata are the app origin (`appOrigin`, or `resolveAppOrigin`'s) + the path. |
|
|
96
|
-
| `messages` | partial `en`
|
|
96
|
+
| `messages` | partial dictionaries per locale (`en` built in; any other is the app's own translation) | — | Copy overrides. |
|
|
97
97
|
|
|
98
98
|
`allowWrites` is a deploy decision, so read it from the environment rather than hard-coding it:
|
|
99
99
|
`allowWrites: process.env.MCP_ALLOW_WRITES === "1"` is the intended way. Any other value, or none,
|
|
@@ -407,7 +407,7 @@ None. `allowWrites` is configuration, not a runtime switch: changing who may wri
|
|
|
407
407
|
|
|
408
408
|
## 9. Copy
|
|
409
409
|
|
|
410
|
-
`mcpAccessMessages.
|
|
410
|
+
`mcpAccessMessages.en`: `page`, `tools`, `issue`, `issued`, `setup.assistantPrompt`
|
|
411
411
|
(placeholders `{serverName}` and `{command}`), `list`, `grants` (connected apps), `consent` (the
|
|
412
412
|
consent page and its errors), and `errors` for the codes
|
|
413
413
|
`mcp-access.name_required`, `name_too_long`, `token_limit_reached`, `token_not_found`, `grant_not_found`,
|
package/dist/index.d.ts
CHANGED
|
@@ -146,18 +146,9 @@ export declare const mcpAccess: import("@softure-ai/core").ModuleFactory<{
|
|
|
146
146
|
read: "read";
|
|
147
147
|
write: "write";
|
|
148
148
|
}>;
|
|
149
|
-
description: import("zod").ZodRecord<import("zod").
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}> & import("zod/v4/core").$partial, import("zod").ZodString>;
|
|
153
|
-
title: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
154
|
-
en: "en";
|
|
155
|
-
pl: "pl";
|
|
156
|
-
}> & import("zod/v4/core").$partial, import("zod").ZodString>>;
|
|
157
|
-
example: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
158
|
-
en: "en";
|
|
159
|
-
pl: "pl";
|
|
160
|
-
}> & import("zod/v4/core").$partial, import("zod").ZodString>>;
|
|
149
|
+
description: import("zod").ZodRecord<import("zod").ZodString & import("zod").ZodType<string, string, import("zod/v4/core").$ZodTypeInternals<string, string>>, import("zod").ZodString>;
|
|
150
|
+
title: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString & import("zod").ZodType<string, string, import("zod/v4/core").$ZodTypeInternals<string, string>>, import("zod").ZodString>>;
|
|
151
|
+
example: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString & import("zod").ZodType<string, string, import("zod/v4/core").$ZodTypeInternals<string, string>>, import("zod").ZodString>>;
|
|
161
152
|
}, import("zod/v4/core").$strict>>>;
|
|
162
153
|
allowWrites: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
163
154
|
tokenLifetimeDays: import("zod").ZodDefault<import("zod").ZodInt>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;IAEjC;;;;OAIG;;;;;;CAE8D,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;IAEjC;;;;OAIG;;;;;;CAE8D,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCA4BpB,CAAC;AAEH,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtG,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,mCAAmC,EACnC,iCAAiC,EACjC,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,KAAK,4BAA4B,EAAE,MAAM,aAAa,CAAC;AACvJ,OAAO,EAAE,oBAAoB,EAAE,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -30,8 +30,8 @@ export const MCP_RATE_LIMIT_BUCKETS = {
|
|
|
30
30
|
export const mcpAccess = defineModule({
|
|
31
31
|
manifest: {
|
|
32
32
|
id: MODULE_ID,
|
|
33
|
-
version: "0.
|
|
34
|
-
dependsOn: { security: "^0.
|
|
33
|
+
version: "0.2.0",
|
|
34
|
+
dependsOn: { security: "^0.2.0", auth: "^0.2.0" },
|
|
35
35
|
dbSchema: "mcp",
|
|
36
36
|
tables: ["access_tokens", "oauth_clients", "oauth_authorization_codes", "oauth_grants"],
|
|
37
37
|
env: [],
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,kGAAkG;AAClG,kGAAk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+1,6 @@
|
|
|
1
1
|
import type { TokenFormErrorCode } from "../contract.js";
|
|
2
2
|
import { en } from "./en.js";
|
|
3
|
-
/**
|
|
3
|
+
/** The built-in English dictionary; an app passes partial overrides or its own translation per locale. */
|
|
4
4
|
export declare const mcpAccessMessages: {
|
|
5
5
|
en: {
|
|
6
6
|
page: {
|
|
@@ -108,112 +108,6 @@ export declare const mcpAccessMessages: {
|
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
|
-
pl: {
|
|
112
|
-
page: {
|
|
113
|
-
title: string;
|
|
114
|
-
lead: string;
|
|
115
|
-
};
|
|
116
|
-
tools: {
|
|
117
|
-
title: string;
|
|
118
|
-
empty: string;
|
|
119
|
-
read: string;
|
|
120
|
-
write: string;
|
|
121
|
-
writeUnavailable: string;
|
|
122
|
-
};
|
|
123
|
-
issue: {
|
|
124
|
-
title: string;
|
|
125
|
-
name: string;
|
|
126
|
-
nameHint: string;
|
|
127
|
-
canWrite: string;
|
|
128
|
-
canWriteHint: string;
|
|
129
|
-
submit: string;
|
|
130
|
-
pending: string;
|
|
131
|
-
limit: string;
|
|
132
|
-
};
|
|
133
|
-
issued: {
|
|
134
|
-
title: string;
|
|
135
|
-
once: string;
|
|
136
|
-
expires: string;
|
|
137
|
-
readOnly: string;
|
|
138
|
-
readWrite: string;
|
|
139
|
-
promptTitle: string;
|
|
140
|
-
promptHint: string;
|
|
141
|
-
openClaudeCode: string;
|
|
142
|
-
commandTitle: string;
|
|
143
|
-
jsonTitle: string;
|
|
144
|
-
desktopTitle: string;
|
|
145
|
-
headerTitle: string;
|
|
146
|
-
copy: string;
|
|
147
|
-
copied: string;
|
|
148
|
-
done: string;
|
|
149
|
-
};
|
|
150
|
-
setup: {
|
|
151
|
-
assistantPrompt: string;
|
|
152
|
-
};
|
|
153
|
-
list: {
|
|
154
|
-
title: string;
|
|
155
|
-
empty: string;
|
|
156
|
-
readOnly: string;
|
|
157
|
-
readWrite: string;
|
|
158
|
-
active: string;
|
|
159
|
-
expired: string;
|
|
160
|
-
expiresToday: string;
|
|
161
|
-
expiresTomorrow: string;
|
|
162
|
-
expiresInDays: string;
|
|
163
|
-
expiresOn: string;
|
|
164
|
-
expiredOn: string;
|
|
165
|
-
createdOn: string;
|
|
166
|
-
lastUsed: string;
|
|
167
|
-
neverUsed: string;
|
|
168
|
-
revoke: string;
|
|
169
|
-
revoking: string;
|
|
170
|
-
};
|
|
171
|
-
grants: {
|
|
172
|
-
title: string;
|
|
173
|
-
lead: string;
|
|
174
|
-
empty: string;
|
|
175
|
-
connectedOn: string;
|
|
176
|
-
disconnect: string;
|
|
177
|
-
disconnecting: string;
|
|
178
|
-
};
|
|
179
|
-
consent: {
|
|
180
|
-
title: string;
|
|
181
|
-
lead: string;
|
|
182
|
-
app: string;
|
|
183
|
-
returnsTo: string;
|
|
184
|
-
account: string;
|
|
185
|
-
access: string;
|
|
186
|
-
readAccess: string;
|
|
187
|
-
allowWrite: string;
|
|
188
|
-
allowWriteHint: string;
|
|
189
|
-
allow: string;
|
|
190
|
-
deny: string;
|
|
191
|
-
errorTitle: string;
|
|
192
|
-
unknownClient: string;
|
|
193
|
-
redirectMismatch: string;
|
|
194
|
-
invalidRequest: string;
|
|
195
|
-
nothingGranted: string;
|
|
196
|
-
backToApp: string;
|
|
197
|
-
};
|
|
198
|
-
errors: {
|
|
199
|
-
"mcp-access": {
|
|
200
|
-
name_required: string;
|
|
201
|
-
name_too_long: string;
|
|
202
|
-
token_limit_reached: string;
|
|
203
|
-
token_not_found: string;
|
|
204
|
-
grant_not_found: string;
|
|
205
|
-
issue_refused: string;
|
|
206
|
-
write_refused: string;
|
|
207
|
-
};
|
|
208
|
-
auth: {
|
|
209
|
-
unauthenticated: string;
|
|
210
|
-
};
|
|
211
|
-
core: {
|
|
212
|
-
database_failed: string;
|
|
213
|
-
unexpected: string;
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
111
|
};
|
|
218
112
|
export type McpAccessMessages = typeof en;
|
|
219
113
|
/** The copy for an error code; an unknown code gets the generic failure. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,0GAA0G;AAC1G,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAS,CAAC;AAExC,MAAM,MAAM,iBAAiB,GAAG,OAAO,EAAE,CAAC;AAE1C,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAOlG"}
|
package/dist/messages/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { en } from "./en.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const mcpAccessMessages = { en, pl };
|
|
2
|
+
/** The built-in English dictionary; an app passes partial overrides or its own translation per locale. */
|
|
3
|
+
export const mcpAccessMessages = { en };
|
|
5
4
|
/** The copy for an error code; an unknown code gets the generic failure. */
|
|
6
5
|
export function getTokenErrorMessage(messages, code) {
|
|
7
6
|
const separator = code.lastIndexOf(".");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,0GAA0G;AAC1G,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,EAAE,EAAE,CAAC;AAIxC,4EAA4E;AAC5E,MAAM,UAAU,oBAAoB,CAAC,QAA2B,EAAE,IAAwB;IACxF,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAoE,CAAC;IAC7F,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/E,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;AAC1H,CAAC"}
|
package/dist/options.d.ts
CHANGED
|
@@ -14,18 +14,9 @@ declare const toolSchema: z.ZodObject<{
|
|
|
14
14
|
read: "read";
|
|
15
15
|
write: "write";
|
|
16
16
|
}>;
|
|
17
|
-
description: z.ZodRecord<z.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}> & z.core.$partial, z.ZodString>;
|
|
21
|
-
title: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
22
|
-
en: "en";
|
|
23
|
-
pl: "pl";
|
|
24
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
25
|
-
example: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
26
|
-
en: "en";
|
|
27
|
-
pl: "pl";
|
|
28
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
17
|
+
description: z.ZodRecord<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>, z.ZodString>;
|
|
18
|
+
title: z.ZodOptional<z.ZodRecord<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>, z.ZodString>>;
|
|
19
|
+
example: z.ZodOptional<z.ZodRecord<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>, z.ZodString>>;
|
|
29
20
|
}, z.core.$strict>;
|
|
30
21
|
/**
|
|
31
22
|
* Keys of the authorization server metadata the package generates. An extension cannot set them:
|
|
@@ -60,18 +51,9 @@ export declare const mcpAccessOptionsSchema: z.ZodObject<{
|
|
|
60
51
|
read: "read";
|
|
61
52
|
write: "write";
|
|
62
53
|
}>;
|
|
63
|
-
description: z.ZodRecord<z.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}> & z.core.$partial, z.ZodString>;
|
|
67
|
-
title: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
68
|
-
en: "en";
|
|
69
|
-
pl: "pl";
|
|
70
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
71
|
-
example: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
72
|
-
en: "en";
|
|
73
|
-
pl: "pl";
|
|
74
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
54
|
+
description: z.ZodRecord<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>, z.ZodString>;
|
|
55
|
+
title: z.ZodOptional<z.ZodRecord<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>, z.ZodString>>;
|
|
56
|
+
example: z.ZodOptional<z.ZodRecord<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>, z.ZodString>>;
|
|
75
57
|
}, z.core.$strict>>>;
|
|
76
58
|
allowWrites: z.ZodDefault<z.ZodBoolean>;
|
|
77
59
|
tokenLifetimeDays: z.ZodDefault<z.ZodInt>;
|
package/dist/options.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEjE,oGAAoG;AACpG,eAAO,MAAM,mBAAmB,QAA2C,CAAC;AAE5E,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,QAA4B,CAAC;AAE3D,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,sGAAsG;AACtG,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAK9C,QAAA,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEjE,oGAAoG;AACpG,eAAO,MAAM,mBAAmB,QAA2C,CAAC;AAE5E,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,QAA4B,CAAC;AAE3D,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,sGAAsG;AACtG,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAK9C,QAAA,MAAM,UAAU;;;;;;;;;kBAcd,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,mCAAmC,8TAYtC,CAAC;AAEX,8GAA8G;AAC9G,eAAO,MAAM,iCAAiC,gGAAiG,CAAC;AAEhJ,iGAAiG;A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AAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACvE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/options.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The options an app passes to `mcpAccess({ ... })` in softure.config.ts, parsed at startup.
|
|
2
|
-
import {
|
|
2
|
+
import { isLocale } from "@softure-ai/core";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
/** The name an MCP client lists the server under: no spaces, so a shell command needs no quotes. */
|
|
5
5
|
export const SERVER_NAME_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
|
|
@@ -10,7 +10,7 @@ export const MAX_TOKEN_NAME_LENGTH = 60;
|
|
|
10
10
|
/** The longest value the token check looks at: a longer header is refused before any pattern runs. */
|
|
11
11
|
export const MAX_PRESENTED_TOKEN_LENGTH = 512;
|
|
12
12
|
/** Copy per locale; a locale without its own text falls back to `en`. */
|
|
13
|
-
const localizedTextSchema = z.
|
|
13
|
+
const localizedTextSchema = z.record(z.string().refine(isLocale, "must be a BCP 47 language tag"), z.string().trim().min(1).max(500));
|
|
14
14
|
const toolSchema = z.strictObject({
|
|
15
15
|
/** The tool's name as the app's MCP server registers it. */
|
|
16
16
|
name: z.string().regex(TOOL_NAME_PATTERN, "must be 1 to 128 of A-Z, a-z, 0-9, _, - and ."),
|
package/dist/options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,6FA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AAU,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACpC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;QAClH,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/server/options.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Locale, type SoftureConfig } from "@softure-ai/core";
|
|
1
|
+
import { type Locale, type LocalizedText, type SoftureConfig } from "@softure-ai/core";
|
|
2
2
|
import type { McpAccessMessages } from "../messages/index.js";
|
|
3
3
|
import type { McpAccessOptions } from "../options.js";
|
|
4
4
|
import type { McpOrigins } from "../origins.js";
|
|
@@ -24,6 +24,6 @@ export declare function getMcpAccessRoutes(config: SoftureConfig): McpAccessRout
|
|
|
24
24
|
export declare function getMcpEndpointUrl(config: SoftureConfig, origins?: McpOrigins): string;
|
|
25
25
|
/** The module's copy in the app's locale, with the app's overrides applied. */
|
|
26
26
|
export declare function getMcpAccessMessages(config: SoftureConfig): McpAccessMessages;
|
|
27
|
-
/** The text in `locale`, else in `en`. */
|
|
28
|
-
export declare function getLocalizedText(text:
|
|
27
|
+
/** The text in `locale`, else in its language, else in `en`. */
|
|
28
|
+
export declare function getLocalizedText(text: LocalizedText, locale: Locale): string;
|
|
29
29
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/server/options.ts"],"names":[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BAAgB,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE5E"}
|
package/dist/server/options.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The mcp-access options of the running app, read from the configuration in the module context.
|
|
2
|
-
import { getModule } from "@softure-ai/core";
|
|
2
|
+
import { getModule, pickLocalizedText, selectMessages } from "@softure-ai/core";
|
|
3
3
|
const MODULE_ID = "mcp-access";
|
|
4
4
|
/** The enabled module. Throws when the app did not enable it: calling its functions then is a bug. */
|
|
5
5
|
export function getMcpAccessModule(config) {
|
|
@@ -38,10 +38,10 @@ export function getMcpEndpointUrl(config, origins) {
|
|
|
38
38
|
/** The module's copy in the app's locale, with the app's overrides applied. */
|
|
39
39
|
export function getMcpAccessMessages(config) {
|
|
40
40
|
// The module factory merged the dictionaries; their shape is the module's own.
|
|
41
|
-
return getMcpAccessModule(config).messages
|
|
41
|
+
return selectMessages(getMcpAccessModule(config).messages, config.locale);
|
|
42
42
|
}
|
|
43
|
-
/** The text in `locale`, else in `en`. */
|
|
43
|
+
/** The text in `locale`, else in its language, else in `en`. */
|
|
44
44
|
export function getLocalizedText(text, locale) {
|
|
45
|
-
return text
|
|
45
|
+
return pickLocalizedText(text, locale);
|
|
46
46
|
}
|
|
47
47
|
//# sourceMappingURL=options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/server/options.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,OAAO,EAAE,SAAS,EAAmC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/server/options.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,OAAO,EAAE,SAAS,EAAmC,iBAAiB,EAAE,cAAc,EAAsB,MAAM,kBAAkB,CAAC;AAKrI,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B,sGAAsG;AACtG,MAAM,UAAU,kBAAkB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ED,+EAA+E;AAC/E,MAAM,UAAU,oBAAoB,CAAC,MAAqB;IACxD,+EAA+E;IAC/E,OAAO,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAsB,CAAC;AACjG,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,gBAAgB,CAAC,IAAmB,EAAE,MAAc;IAClE,OAAO,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC"}
|
package/module.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "mcp-access",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"dependsOn": { "security": "^0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"dependsOn": { "security": "^0.2.0", "auth": "^0.2.0" },
|
|
5
5
|
"dbSchema": "mcp",
|
|
6
6
|
"tables": ["access_tokens", "oauth_clients", "oauth_authorization_codes", "oauth_grants"],
|
|
7
7
|
"env": [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softure-ai/mcp-access",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "SOFTURE AI MCP access module: hashed, scoped, expiring access tokens, a rate-limited Bearer endpoint around the app's MCP server factory, and a token page with client setup instructions for Next.js; tool result helpers with a safe error boundary, a stdio entry, a catalog parity check and the softure-mcp prune command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
"build": "tsc -p tsconfig.build.json"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@softure-ai/auth": "^0.
|
|
83
|
-
"@softure-ai/core": "^0.
|
|
82
|
+
"@softure-ai/auth": "^0.2.0",
|
|
83
|
+
"@softure-ai/core": "^0.2.0",
|
|
84
84
|
"@softure-ai/db": "^0.1.0",
|
|
85
|
-
"@softure-ai/security": "^0.
|
|
85
|
+
"@softure-ai/security": "^0.2.0",
|
|
86
86
|
"zod": "^4.6.5"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
90
|
-
"@softure-ai/ui": "^0.
|
|
90
|
+
"@softure-ai/ui": "^0.3.0",
|
|
91
91
|
"drizzle-orm": "^0.45.2",
|
|
92
92
|
"next": "^16.0.0",
|
|
93
93
|
"react": "^19.0.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@softure-ai/ui": "^0.
|
|
96
|
+
"@softure-ai/ui": "^0.3.0"
|
|
97
97
|
}
|
|
98
98
|
}
|
package/src/index.ts
CHANGED
|
@@ -34,8 +34,8 @@ export const MCP_RATE_LIMIT_BUCKETS = {
|
|
|
34
34
|
export const mcpAccess = defineModule({
|
|
35
35
|
manifest: {
|
|
36
36
|
id: MODULE_ID,
|
|
37
|
-
version: "0.
|
|
38
|
-
dependsOn: { security: "^0.
|
|
37
|
+
version: "0.2.0",
|
|
38
|
+
dependsOn: { security: "^0.2.0", auth: "^0.2.0" },
|
|
39
39
|
dbSchema: "mcp",
|
|
40
40
|
tables: ["access_tokens", "oauth_clients", "oauth_authorization_codes", "oauth_grants"],
|
|
41
41
|
env: [],
|
package/src/messages/index.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { TokenFormErrorCode } from "../contract.js";
|
|
2
2
|
import { en } from "./en.js";
|
|
3
|
-
import { pl } from "./pl.js";
|
|
4
3
|
|
|
5
|
-
/**
|
|
6
|
-
export const mcpAccessMessages = { en
|
|
4
|
+
/** The built-in English dictionary; an app passes partial overrides or its own translation per locale. */
|
|
5
|
+
export const mcpAccessMessages = { en };
|
|
7
6
|
|
|
8
7
|
export type McpAccessMessages = typeof en;
|
|
9
8
|
|
package/src/options.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The options an app passes to `mcpAccess({ ... })` in softure.config.ts, parsed at startup.
|
|
2
|
-
import {
|
|
2
|
+
import { isLocale } from "@softure-ai/core";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import type { McpOriginRequest, McpOrigins } from "./origins.js";
|
|
5
5
|
|
|
@@ -16,7 +16,7 @@ export const MAX_TOKEN_NAME_LENGTH = 60;
|
|
|
16
16
|
export const MAX_PRESENTED_TOKEN_LENGTH = 512;
|
|
17
17
|
|
|
18
18
|
/** Copy per locale; a locale without its own text falls back to `en`. */
|
|
19
|
-
const localizedTextSchema = z.
|
|
19
|
+
const localizedTextSchema = z.record(z.string().refine(isLocale, "must be a BCP 47 language tag"), z.string().trim().min(1).max(500));
|
|
20
20
|
|
|
21
21
|
const toolSchema = z.strictObject({
|
|
22
22
|
/** The tool's name as the app's MCP server registers it. */
|
package/src/server/options.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The mcp-access options of the running app, read from the configuration in the module context.
|
|
2
|
-
import { getModule, type Locale, type SoftureConfig } from "@softure-ai/core";
|
|
2
|
+
import { getModule, type Locale, type LocalizedText, pickLocalizedText, selectMessages, type SoftureConfig } from "@softure-ai/core";
|
|
3
3
|
import type { McpAccessMessages } from "../messages/index.js";
|
|
4
4
|
import type { McpAccessOptions } from "../options.js";
|
|
5
5
|
import type { McpOrigins } from "../origins.js";
|
|
@@ -61,10 +61,10 @@ export function getMcpEndpointUrl(config: SoftureConfig, origins?: McpOrigins):
|
|
|
61
61
|
/** The module's copy in the app's locale, with the app's overrides applied. */
|
|
62
62
|
export function getMcpAccessMessages(config: SoftureConfig): McpAccessMessages {
|
|
63
63
|
// The module factory merged the dictionaries; their shape is the module's own.
|
|
64
|
-
return getMcpAccessModule(config).messages
|
|
64
|
+
return selectMessages(getMcpAccessModule(config).messages, config.locale) as McpAccessMessages;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
/** The text in `locale`, else in `en`. */
|
|
68
|
-
export function getLocalizedText(text:
|
|
69
|
-
return text
|
|
67
|
+
/** The text in `locale`, else in its language, else in `en`. */
|
|
68
|
+
export function getLocalizedText(text: LocalizedText, locale: Locale): string {
|
|
69
|
+
return pickLocalizedText(text, locale);
|
|
70
70
|
}
|
package/dist/messages/pl.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../src/messages/pl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAElC,eAAO,MAAM,EAAE,EAAE,OAAO,EAyGvB,CAAC"}
|
package/dist/messages/pl.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
export const pl = {
|
|
2
|
-
page: {
|
|
3
|
-
title: "Dostęp dla asystenta AI",
|
|
4
|
-
lead: "Połącz asystenta AI, na przykład Claude, ze swoim kontem przez MCP. Każdy asystent dostaje własny token, który możesz w każdej chwili unieważnić.",
|
|
5
|
-
},
|
|
6
|
-
tools: {
|
|
7
|
-
title: "Co może asystent",
|
|
8
|
-
empty: "Aplikacja nie udostępnia jeszcze żadnych narzędzi.",
|
|
9
|
-
read: "Odczyt",
|
|
10
|
-
write: "Zmienia dane",
|
|
11
|
-
writeUnavailable: "Zmienia dane (wyłączone w tej aplikacji)",
|
|
12
|
-
},
|
|
13
|
-
issue: {
|
|
14
|
-
title: "Nowy token",
|
|
15
|
-
name: "Nazwa",
|
|
16
|
-
nameHint: "Gdzie go użyjesz, na przykład Laptop albo Claude Desktop.",
|
|
17
|
-
canWrite: "Pozwól na zmiany",
|
|
18
|
-
canWriteHint: "Bez tego asystent może tylko czytać.",
|
|
19
|
-
submit: "Utwórz token",
|
|
20
|
-
pending: "Tworzenie…",
|
|
21
|
-
limit: "Możesz mieć najwyżej {max} aktywnych tokenów.",
|
|
22
|
-
},
|
|
23
|
-
issued: {
|
|
24
|
-
title: "Utworzono token: {name}",
|
|
25
|
-
once: "Skopiuj go teraz. Pokazujemy go tylko raz; gdy opuścisz tę stronę, zostanie tylko jego nazwa.",
|
|
26
|
-
expires: "Działa do {date}.",
|
|
27
|
-
readOnly: "Ten token może tylko czytać.",
|
|
28
|
-
readWrite: "Ten token może czytać i zmieniać dane.",
|
|
29
|
-
promptTitle: "Najprościej: niech Claude Code sam to skonfiguruje",
|
|
30
|
-
promptHint: "Wklej to do rozmowy z Claude Code. Wykona polecenie i sprawdzi połączenie.",
|
|
31
|
-
openClaudeCode: "Otwórz w Claude Code",
|
|
32
|
-
commandTitle: "Polecenie w terminalu (Claude Code)",
|
|
33
|
-
jsonTitle: "Plik konfiguracyjny (Cursor, VS Code, Windsurf)",
|
|
34
|
-
desktopTitle: "Claude Desktop (claude_desktop_config.json)",
|
|
35
|
-
headerTitle: "Inne klienty: adres serwera i nagłówek Authorization",
|
|
36
|
-
copy: "Kopiuj",
|
|
37
|
-
copied: "Skopiowano",
|
|
38
|
-
done: "Gotowe, ukryj token",
|
|
39
|
-
},
|
|
40
|
-
setup: {
|
|
41
|
-
assistantPrompt: "Połącz się z moim kontem {serverName} przez MCP.\nWykonaj: {command}\nPotem sprawdź /mcp i powiedz mi, czy serwer „{serverName}” jest połączony.",
|
|
42
|
-
},
|
|
43
|
-
list: {
|
|
44
|
-
title: "Twoje tokeny",
|
|
45
|
-
empty: "Nie masz jeszcze żadnych tokenów.",
|
|
46
|
-
readOnly: "Tylko odczyt",
|
|
47
|
-
readWrite: "Odczyt i zmiany",
|
|
48
|
-
active: "Aktywny",
|
|
49
|
-
expired: "Wygasł",
|
|
50
|
-
expiresToday: "Wygasa dziś",
|
|
51
|
-
expiresTomorrow: "Wygasa jutro",
|
|
52
|
-
expiresInDays: "Wygasa za {days} dni",
|
|
53
|
-
expiresOn: "Ważny do {date}",
|
|
54
|
-
expiredOn: "Wygasł {date}",
|
|
55
|
-
createdOn: "Utworzony {date}",
|
|
56
|
-
lastUsed: "Ostatnio użyty {date}",
|
|
57
|
-
neverUsed: "Jeszcze nieużywany",
|
|
58
|
-
revoke: "Unieważnij",
|
|
59
|
-
revoking: "Unieważnianie…",
|
|
60
|
-
},
|
|
61
|
-
grants: {
|
|
62
|
-
title: "Połączone aplikacje",
|
|
63
|
-
lead: "Asystenci połączeni przez logowanie, na przykład claude.ai albo ChatGPT. Odłączenie od razu odbiera im dostęp.",
|
|
64
|
-
empty: "Żadna aplikacja nie jest połączona.",
|
|
65
|
-
connectedOn: "Połączono {date}",
|
|
66
|
-
disconnect: "Odłącz",
|
|
67
|
-
disconnecting: "Odłączanie…",
|
|
68
|
-
},
|
|
69
|
-
consent: {
|
|
70
|
-
title: "{client} prosi o dostęp do Twojego konta",
|
|
71
|
-
lead: "Asystent odpowie na pytania, korzystając z Twoich danych w tej aplikacji. Możesz go odłączyć w każdej chwili na stronie dostępu dla asystenta AI.",
|
|
72
|
-
app: "Aplikacja",
|
|
73
|
-
returnsTo: "wróci na {target}",
|
|
74
|
-
account: "Konto",
|
|
75
|
-
access: "Dostęp",
|
|
76
|
-
readAccess: "Odczyt Twoich danych",
|
|
77
|
-
allowWrite: "Pozwól też na zmiany",
|
|
78
|
-
allowWriteHint: "Bez tego asystent może tylko czytać.",
|
|
79
|
-
allow: "Zezwól",
|
|
80
|
-
deny: "Odmów",
|
|
81
|
-
errorTitle: "Nie da się połączyć asystenta",
|
|
82
|
-
unknownClient: "Aplikacja, która Cię tu przysłała, nie jest zarejestrowana. Połącz ją od nowa z poziomu asystenta.",
|
|
83
|
-
redirectMismatch: "Adres powrotu nie zgadza się z tym, który aplikacja zarejestrowała. Połącz ją od nowa z poziomu asystenta.",
|
|
84
|
-
invalidRequest: "Aplikacja wysłała żądanie połączenia, którego ta aplikacja nie może przyjąć.",
|
|
85
|
-
nothingGranted: "Nie nadano żadnego dostępu.",
|
|
86
|
-
backToApp: "Wróć do aplikacji ({target})",
|
|
87
|
-
},
|
|
88
|
-
errors: {
|
|
89
|
-
"mcp-access": {
|
|
90
|
-
name_required: "Nadaj tokenowi nazwę, żeby odróżnić go od pozostałych.",
|
|
91
|
-
name_too_long: "Nazwa jest za długa.",
|
|
92
|
-
token_limit_reached: "Masz już najwięcej aktywnych tokenów, ile można. Unieważnij któryś, zanim utworzysz nowy.",
|
|
93
|
-
token_not_found: "Ten token już nie istnieje. Mógł zostać unieważniony.",
|
|
94
|
-
grant_not_found: "Ta aplikacja nie jest już połączona.",
|
|
95
|
-
issue_refused: "Twoje konto nie może teraz tworzyć tokenów.",
|
|
96
|
-
write_refused: "Twoje konto nie może tworzyć tokenów z prawem zapisu. Utwórz token tylko do odczytu.",
|
|
97
|
-
},
|
|
98
|
-
auth: {
|
|
99
|
-
unauthenticated: "Twoja sesja wygasła. Zaloguj się ponownie.",
|
|
100
|
-
},
|
|
101
|
-
core: {
|
|
102
|
-
database_failed: "Coś poszło nie tak po naszej stronie. Spróbuj ponownie za chwilę.",
|
|
103
|
-
unexpected: "Coś poszło nie tak po naszej stronie. Spróbuj ponownie za chwilę.",
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
//# sourceMappingURL=pl.js.map
|
package/dist/messages/pl.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pl.js","sourceRoot":"","sources":["../../src/messages/pl.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,EAAE,GAAc;IAC3B,IAAI,EAAE;QACJ,KAAK,EAAE,yBAAyB;QAChC,IAAI,EAAE,mJAAmJ;KAC1J;IACD,KAAK,EAAE;QACL,KAAK,EAAE,kBAAkB;QACzB,KAAK,EAAE,oDAAoD;QAC3D,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,cAAc;QACrB,gBAAgB,EAAE,0CAA0C;KAC7D;IACD,KAAK,EAAE;QACL,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,2DAA2D;QACrE,QAAQ,EAAE,kBAAkB;QAC5B,YAAY,EAAE,sCAAsC;QACpD,MAAM,EAAE,cAAc;QACtB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E,WAAW;QAChB,SAAS,EAAE,mBAAmB;QAC9B,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,sBAAsB;QAClC,UAAU,EAAE,sBAAsB;QAClC,cAAc,EAAE,sCAAsC;QACtD,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,+BAA+B;QAC3C,aAAa,EAAE,oGAAoG;QACnH,gBAAgB,EAAE,4GAA4G;QAC9H,cAAc,EAAE,8EAA8E;QAC9F,cAAc,EAAE,6BAA6B;QAC7C,SAAS,EAAE,8BAA8B;KAC1C;IACD,MAAM,EAAE;QACN,YAAY,EAAE;YACZ,aAAa,EAAE,wDAAwD;YACvE,aAAa,EAAE,sBAAsB;YACrC,mBAAmB,EAAE,2FAA2F;YAChH,eAAe,EAAE,uDAAuD;YACxE,eAAe,EAAE,sCAAsC;YACvD,aAAa,EAAE,6CAA6C;YAC5D,aAAa,EAAE,sFAAsF;SACtG;QACD,IAAI,EAAE;YACJ,eAAe,EAAE,4CAA4C;SAC9D;QACD,IAAI,EAAE;YACJ,eAAe,EAAE,mEAAmE;YACpF,UAAU,EAAE,mEAAmE;SAChF;KACF;CACF,CAAC"}
|
package/src/messages/pl.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import type { en } from "./en.js";
|
|
2
|
-
|
|
3
|
-
export const pl: typeof en = {
|
|
4
|
-
page: {
|
|
5
|
-
title: "Dostęp dla asystenta AI",
|
|
6
|
-
lead: "Połącz asystenta AI, na przykład Claude, ze swoim kontem przez MCP. Każdy asystent dostaje własny token, który możesz w każdej chwili unieważnić.",
|
|
7
|
-
},
|
|
8
|
-
tools: {
|
|
9
|
-
title: "Co może asystent",
|
|
10
|
-
empty: "Aplikacja nie udostępnia jeszcze żadnych narzędzi.",
|
|
11
|
-
read: "Odczyt",
|
|
12
|
-
write: "Zmienia dane",
|
|
13
|
-
writeUnavailable: "Zmienia dane (wyłączone w tej aplikacji)",
|
|
14
|
-
},
|
|
15
|
-
issue: {
|
|
16
|
-
title: "Nowy token",
|
|
17
|
-
name: "Nazwa",
|
|
18
|
-
nameHint: "Gdzie go użyjesz, na przykład Laptop albo Claude Desktop.",
|
|
19
|
-
canWrite: "Pozwól na zmiany",
|
|
20
|
-
canWriteHint: "Bez tego asystent może tylko czytać.",
|
|
21
|
-
submit: "Utwórz token",
|
|
22
|
-
pending: "Tworzenie…",
|
|
23
|
-
limit: "Możesz mieć najwyżej {max} aktywnych tokenów.",
|
|
24
|
-
},
|
|
25
|
-
issued: {
|
|
26
|
-
title: "Utworzono token: {name}",
|
|
27
|
-
once: "Skopiuj go teraz. Pokazujemy go tylko raz; gdy opuścisz tę stronę, zostanie tylko jego nazwa.",
|
|
28
|
-
expires: "Działa do {date}.",
|
|
29
|
-
readOnly: "Ten token może tylko czytać.",
|
|
30
|
-
readWrite: "Ten token może czytać i zmieniać dane.",
|
|
31
|
-
promptTitle: "Najprościej: niech Claude Code sam to skonfiguruje",
|
|
32
|
-
promptHint: "Wklej to do rozmowy z Claude Code. Wykona polecenie i sprawdzi połączenie.",
|
|
33
|
-
openClaudeCode: "Otwórz w Claude Code",
|
|
34
|
-
commandTitle: "Polecenie w terminalu (Claude Code)",
|
|
35
|
-
jsonTitle: "Plik konfiguracyjny (Cursor, VS Code, Windsurf)",
|
|
36
|
-
desktopTitle: "Claude Desktop (claude_desktop_config.json)",
|
|
37
|
-
headerTitle: "Inne klienty: adres serwera i nagłówek Authorization",
|
|
38
|
-
copy: "Kopiuj",
|
|
39
|
-
copied: "Skopiowano",
|
|
40
|
-
done: "Gotowe, ukryj token",
|
|
41
|
-
},
|
|
42
|
-
setup: {
|
|
43
|
-
assistantPrompt: "Połącz się z moim kontem {serverName} przez MCP.\nWykonaj: {command}\nPotem sprawdź /mcp i powiedz mi, czy serwer „{serverName}” jest połączony.",
|
|
44
|
-
},
|
|
45
|
-
list: {
|
|
46
|
-
title: "Twoje tokeny",
|
|
47
|
-
empty: "Nie masz jeszcze żadnych tokenów.",
|
|
48
|
-
readOnly: "Tylko odczyt",
|
|
49
|
-
readWrite: "Odczyt i zmiany",
|
|
50
|
-
active: "Aktywny",
|
|
51
|
-
expired: "Wygasł",
|
|
52
|
-
expiresToday: "Wygasa dziś",
|
|
53
|
-
expiresTomorrow: "Wygasa jutro",
|
|
54
|
-
expiresInDays: "Wygasa za {days} dni",
|
|
55
|
-
expiresOn: "Ważny do {date}",
|
|
56
|
-
expiredOn: "Wygasł {date}",
|
|
57
|
-
createdOn: "Utworzony {date}",
|
|
58
|
-
lastUsed: "Ostatnio użyty {date}",
|
|
59
|
-
neverUsed: "Jeszcze nieużywany",
|
|
60
|
-
revoke: "Unieważnij",
|
|
61
|
-
revoking: "Unieważnianie…",
|
|
62
|
-
},
|
|
63
|
-
grants: {
|
|
64
|
-
title: "Połączone aplikacje",
|
|
65
|
-
lead: "Asystenci połączeni przez logowanie, na przykład claude.ai albo ChatGPT. Odłączenie od razu odbiera im dostęp.",
|
|
66
|
-
empty: "Żadna aplikacja nie jest połączona.",
|
|
67
|
-
connectedOn: "Połączono {date}",
|
|
68
|
-
disconnect: "Odłącz",
|
|
69
|
-
disconnecting: "Odłączanie…",
|
|
70
|
-
},
|
|
71
|
-
consent: {
|
|
72
|
-
title: "{client} prosi o dostęp do Twojego konta",
|
|
73
|
-
lead: "Asystent odpowie na pytania, korzystając z Twoich danych w tej aplikacji. Możesz go odłączyć w każdej chwili na stronie dostępu dla asystenta AI.",
|
|
74
|
-
app: "Aplikacja",
|
|
75
|
-
returnsTo: "wróci na {target}",
|
|
76
|
-
account: "Konto",
|
|
77
|
-
access: "Dostęp",
|
|
78
|
-
readAccess: "Odczyt Twoich danych",
|
|
79
|
-
allowWrite: "Pozwól też na zmiany",
|
|
80
|
-
allowWriteHint: "Bez tego asystent może tylko czytać.",
|
|
81
|
-
allow: "Zezwól",
|
|
82
|
-
deny: "Odmów",
|
|
83
|
-
errorTitle: "Nie da się połączyć asystenta",
|
|
84
|
-
unknownClient: "Aplikacja, która Cię tu przysłała, nie jest zarejestrowana. Połącz ją od nowa z poziomu asystenta.",
|
|
85
|
-
redirectMismatch: "Adres powrotu nie zgadza się z tym, który aplikacja zarejestrowała. Połącz ją od nowa z poziomu asystenta.",
|
|
86
|
-
invalidRequest: "Aplikacja wysłała żądanie połączenia, którego ta aplikacja nie może przyjąć.",
|
|
87
|
-
nothingGranted: "Nie nadano żadnego dostępu.",
|
|
88
|
-
backToApp: "Wróć do aplikacji ({target})",
|
|
89
|
-
},
|
|
90
|
-
errors: {
|
|
91
|
-
"mcp-access": {
|
|
92
|
-
name_required: "Nadaj tokenowi nazwę, żeby odróżnić go od pozostałych.",
|
|
93
|
-
name_too_long: "Nazwa jest za długa.",
|
|
94
|
-
token_limit_reached: "Masz już najwięcej aktywnych tokenów, ile można. Unieważnij któryś, zanim utworzysz nowy.",
|
|
95
|
-
token_not_found: "Ten token już nie istnieje. Mógł zostać unieważniony.",
|
|
96
|
-
grant_not_found: "Ta aplikacja nie jest już połączona.",
|
|
97
|
-
issue_refused: "Twoje konto nie może teraz tworzyć tokenów.",
|
|
98
|
-
write_refused: "Twoje konto nie może tworzyć tokenów z prawem zapisu. Utwórz token tylko do odczytu.",
|
|
99
|
-
},
|
|
100
|
-
auth: {
|
|
101
|
-
unauthenticated: "Twoja sesja wygasła. Zaloguj się ponownie.",
|
|
102
|
-
},
|
|
103
|
-
core: {
|
|
104
|
-
database_failed: "Coś poszło nie tak po naszej stronie. Spróbuj ponownie za chwilę.",
|
|
105
|
-
unexpected: "Coś poszło nie tak po naszej stronie. Spróbuj ponownie za chwilę.",
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
};
|