@guren/server 2.23.3 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DailyFileChannel-CTTPA0EF.js +114 -0
- package/dist/{DocsViewerServiceProvider-DWnlXx_y.js → DocsViewerServiceProvider-CIRNHQ2I.js} +2 -2
- package/dist/{authorization-0mCGUFoI.js → Gate-YOt54xGF.js} +2 -217
- package/dist/{Job-BVvaY-7p.js → Job-COMzBNOL.js} +3 -10
- package/dist/McpServiceProvider-B-LioPSz.js +43 -0
- package/dist/Resource-BdYd4J9a.js +1035 -0
- package/dist/{loopback-guard-DT9gHF0F.js → ServiceProvider-DDW3MqQJ.js} +10 -68
- package/dist/agent/audit-file.d.ts +3 -0
- package/dist/agent/audit-sink.d.ts +16 -0
- package/dist/agent/call-budget.d.ts +22 -0
- package/dist/agent/events.d.ts +6 -6
- package/dist/api-token-BbgDEd6j.js +298 -0
- package/dist/audit-file-DocumbCr.js +29 -0
- package/dist/auth/index.js +2 -1
- package/dist/auth/oauth/index.d.ts +7 -0
- package/dist/{auth-Jp_MB8Il.js → auth-vFeem6uM.js} +8 -298
- package/dist/authorization/index.js +2 -1
- package/dist/authorization-BLhwA2Yh.js +217 -0
- package/dist/broadcasting/index.js +1 -1
- package/dist/{broadcasting-DVfG2vgN.js → broadcasting-BUBCPCnu.js} +1 -1
- package/dist/config/define.d.ts +49 -0
- package/dist/config/env-reads.d.ts +12 -0
- package/dist/config/env.d.ts +122 -0
- package/dist/container/Container.d.ts +13 -2
- package/dist/container/ServiceProvider.d.ts +7 -0
- package/dist/container/bindings.d.ts +8 -0
- package/dist/{default-application-Chbrul_m.js → default-application-D5ezhhiV.js} +18 -1
- package/dist/encryption/index.js +1 -1
- package/dist/{encryption-BRjZnshr.js → encryption-D1dxfMqD.js} +1 -1
- package/dist/{endpoint-BXipU2Jj.js → endpoint-CTIzcagh.js} +1 -1
- package/dist/{endpoint-Dsw3Acvq.js → endpoint-Coq0K_6I.js} +1 -1
- package/dist/events/index.js +1 -1
- package/dist/{events-CaJKZ2qk.js → events-c94CdUFc.js} +1 -1
- package/dist/http/Application.d.ts +22 -0
- package/dist/http/vite-manifest.d.ts +5 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/injected-translations.d.ts +8 -0
- package/dist/i18n/loaders/JsonLoader.d.ts +3 -2
- package/dist/{i18n-DRo1g0AN.js → i18n-DqcRD4qL.js} +4 -3
- package/dist/index.d.ts +11 -0
- package/dist/index.js +525 -1075
- package/dist/inertia-defaults-BjrcT7za.js +30 -0
- package/dist/internal/request.d.ts +4 -3
- package/dist/internal/request.js +2 -1
- package/dist/internal/testing.d.ts +17 -0
- package/dist/internal/testing.js +6 -0
- package/dist/lambda/index.js +1 -1
- package/dist/logging/index.js +2 -1
- package/dist/{logging-CXotojgW.js → logging-YbKmbAd7.js} +3 -113
- package/dist/loopback-guard-CG8xB4v0.js +68 -0
- package/dist/mail/index.js +1 -1
- package/dist/{mail-zMjQimaJ.js → mail-uRBrUl9q.js} +3 -2
- package/dist/mcp/McpServiceProvider.d.ts +21 -4
- package/dist/mcp/endpoint.d.ts +3 -3
- package/dist/mcp/index.d.ts +0 -2
- package/dist/mcp/index.js +2 -2
- package/dist/mvc/Controller.d.ts +11 -1
- package/dist/mvc/Router.d.ts +6 -0
- package/dist/mvc/inertia/InertiaEngine.d.ts +2 -0
- package/dist/mvc/validated-input.d.ts +55 -0
- package/dist/notifications/index.js +1 -1
- package/dist/{notifications-BLid0Y6M.js → notifications-LHuujttf.js} +2 -2
- package/dist/providers/ConfigServiceProvider.d.ts +19 -0
- package/dist/queue/index.js +2 -2
- package/dist/{queue-IdJjqbyJ.js → queue-BiBn5Sff.js} +1 -1
- package/dist/resolve-optional-ax6gPWTp.js +9 -0
- package/dist/runtime/index.js +2 -1
- package/dist/validated-input-D84J8wcC.js +25 -0
- package/dist/{vite-manifest-DeWRFXTm.js → vite-manifest-C5kqRoBV.js} +7 -32
- package/package.json +6 -3
- package/dist/McpServiceProvider-BvJRcDOm.js +0 -458
- package/dist/mcp/create-mcp-server.d.ts +0 -180
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
/**
|
|
3
|
-
* Options the `.guren/*.gen.ts` generators are called with. `cwd` is the project
|
|
4
|
-
* they resolve output paths against; nothing changes `process.cwd()`, which is
|
|
5
|
-
* process-wide and shared by concurrent requests.
|
|
6
|
-
*/
|
|
7
|
-
export interface CodegenOptions {
|
|
8
|
-
cwd: string;
|
|
9
|
-
force?: boolean;
|
|
10
|
-
}
|
|
11
|
-
/** What every scaffolder takes; `cwd` names the project, for the same reason. */
|
|
12
|
-
export interface ScaffoldOptions {
|
|
13
|
-
force?: boolean;
|
|
14
|
-
cwd?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* What a generator reports back. An empty `outputPath` means it found nothing to
|
|
18
|
-
* describe and wrote no file; `skipped` explains that when "nothing to describe"
|
|
19
|
-
* would be wrong. `definitions` stays opaque — this package only carries it from
|
|
20
|
-
* one CLI call to the next, so mirroring the CLI's shapes would need syncing.
|
|
21
|
-
*/
|
|
22
|
-
export interface CodegenResult {
|
|
23
|
-
outputPath?: string;
|
|
24
|
-
definitions?: unknown[];
|
|
25
|
-
skipped?: {
|
|
26
|
-
message: string;
|
|
27
|
-
} | null;
|
|
28
|
-
/** Non-fatal diagnostics for whoever asked for the run; the artifact was still written. */
|
|
29
|
-
warnings?: string[];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* CLI functions the MCP server wraps, injected at runtime because
|
|
33
|
-
* `@guren/server` cannot depend on `@guren/cli`.
|
|
34
|
-
*/
|
|
35
|
-
export interface GurenCliApi {
|
|
36
|
-
generateContext(opts: {
|
|
37
|
-
cwd: string;
|
|
38
|
-
}): Promise<{
|
|
39
|
-
framework: {
|
|
40
|
-
name: string;
|
|
41
|
-
version: string;
|
|
42
|
-
};
|
|
43
|
-
models: Array<{
|
|
44
|
-
className: string;
|
|
45
|
-
}>;
|
|
46
|
-
routes: Array<unknown>;
|
|
47
|
-
/** Why `routes` is empty, when it is empty because the load failed. */
|
|
48
|
-
routesError?: string;
|
|
49
|
-
pages: string[];
|
|
50
|
-
controllers: string[];
|
|
51
|
-
resources: string[];
|
|
52
|
-
events: string[];
|
|
53
|
-
jobs: string[];
|
|
54
|
-
middleware: string[];
|
|
55
|
-
listeners: string[];
|
|
56
|
-
validators: string[];
|
|
57
|
-
}>;
|
|
58
|
-
renderContextMarkdown(ctx: unknown): string;
|
|
59
|
-
generateEntityContext(entity: string, opts: {
|
|
60
|
-
cwd: string;
|
|
61
|
-
module?: string;
|
|
62
|
-
live?: boolean;
|
|
63
|
-
repo?: string;
|
|
64
|
-
}): Promise<unknown>;
|
|
65
|
-
renderEntityContextMarkdown(ctx: unknown): string;
|
|
66
|
-
runCheck(opts: {
|
|
67
|
-
cwd: string;
|
|
68
|
-
}): Promise<{
|
|
69
|
-
cwd: string;
|
|
70
|
-
checks: Array<{
|
|
71
|
-
key: string;
|
|
72
|
-
title: string;
|
|
73
|
-
status: string;
|
|
74
|
-
message: string;
|
|
75
|
-
suggestion?: string;
|
|
76
|
-
}>;
|
|
77
|
-
passCount: number;
|
|
78
|
-
warnCount: number;
|
|
79
|
-
failCount: number;
|
|
80
|
-
}>;
|
|
81
|
-
/** Absent on a @guren/cli older than `guren gate`; the tool says so instead of throwing. */
|
|
82
|
-
runGate?(opts: {
|
|
83
|
-
cwd: string;
|
|
84
|
-
changed?: boolean;
|
|
85
|
-
deps?: boolean;
|
|
86
|
-
}): Promise<{
|
|
87
|
-
cwd: string;
|
|
88
|
-
ok: boolean;
|
|
89
|
-
changed: boolean;
|
|
90
|
-
stages: Array<{
|
|
91
|
-
name: string;
|
|
92
|
-
status: string;
|
|
93
|
-
durationMs: number;
|
|
94
|
-
findings: string[];
|
|
95
|
-
reason?: string;
|
|
96
|
-
}>;
|
|
97
|
-
}>;
|
|
98
|
-
listModels(opts: {
|
|
99
|
-
appRoot: string;
|
|
100
|
-
}): Promise<Array<{
|
|
101
|
-
className: string;
|
|
102
|
-
filePath: string;
|
|
103
|
-
tableName?: string;
|
|
104
|
-
relationships: Array<{
|
|
105
|
-
name: string;
|
|
106
|
-
type: string;
|
|
107
|
-
relatedModel?: string;
|
|
108
|
-
}>;
|
|
109
|
-
usesAuth: boolean;
|
|
110
|
-
hasSoftDeletes: boolean;
|
|
111
|
-
}>>;
|
|
112
|
-
generateGuidelines(opts: {
|
|
113
|
-
cwd: string;
|
|
114
|
-
}): Promise<string>;
|
|
115
|
-
runDoctor(opts: {
|
|
116
|
-
cwd: string;
|
|
117
|
-
}): Promise<unknown>;
|
|
118
|
-
suggestNextSteps(opts: {
|
|
119
|
-
cwd: string;
|
|
120
|
-
}): Promise<unknown>;
|
|
121
|
-
makeFeature(name: string, opts: ScaffoldOptions & {
|
|
122
|
-
fields?: string;
|
|
123
|
-
withTest?: boolean;
|
|
124
|
-
}): Promise<string[]>;
|
|
125
|
-
makeController(name: string, opts: ScaffoldOptions): Promise<string | string[]>;
|
|
126
|
-
makeModel(name: string, opts: ScaffoldOptions): Promise<string | string[]>;
|
|
127
|
-
makeView(name: string, opts: ScaffoldOptions): Promise<string | string[]>;
|
|
128
|
-
makeTest(name: string, opts: ScaffoldOptions): Promise<string | string[]>;
|
|
129
|
-
makeRoute(name: string, opts: ScaffoldOptions): Promise<string | string[]>;
|
|
130
|
-
generateRouteTypes(opts: CodegenOptions): Promise<CodegenResult | void>;
|
|
131
|
-
generatePageTypes(opts: CodegenOptions): Promise<CodegenResult | void>;
|
|
132
|
-
generateDataTypes(opts: CodegenOptions): Promise<CodegenResult | void>;
|
|
133
|
-
generateChannelTypes(opts: CodegenOptions): Promise<CodegenResult | void>;
|
|
134
|
-
/**
|
|
135
|
-
* Takes the route manifest `generateRouteTypes` returns. `resources` is what
|
|
136
|
-
* `generateDataTypes` extracted — without it every `resource` response hint
|
|
137
|
-
* is "unknown Resource" and the client's `json()` stays untyped.
|
|
138
|
-
*/
|
|
139
|
-
generateApiClientTypes(definitions: unknown[], opts: CodegenOptions & {
|
|
140
|
-
resources?: unknown[];
|
|
141
|
-
}): Promise<CodegenResult | void>;
|
|
142
|
-
/**
|
|
143
|
-
* Agent tools derived from the route manifest (RFC 0016), so it runs after
|
|
144
|
-
* `generateRouteTypes` and `generateDataTypes`. Optional: `@guren/cli` is
|
|
145
|
-
* resolved from the app and an older one simply generates no agent manifest.
|
|
146
|
-
*/
|
|
147
|
-
generateAgentTypes?(definitions: unknown[], opts: CodegenOptions & {
|
|
148
|
-
resources?: unknown[];
|
|
149
|
-
}): Promise<CodegenResult | void>;
|
|
150
|
-
/**
|
|
151
|
-
* Route-dependent context generation in a fresh process. Optional because
|
|
152
|
-
* `@guren/cli` is resolved from the app at runtime and may predate it.
|
|
153
|
-
*/
|
|
154
|
-
createFreshContextApi?: () => Pick<GurenCliApi, 'generateContext' | 'generateEntityContext'>;
|
|
155
|
-
/**
|
|
156
|
-
* Spelled exactly as `@guren/cli` exports it — this interface describes that
|
|
157
|
-
* module namespace, so a camelCase name here would read `undefined` off every
|
|
158
|
-
* real CLI. Optional for the runtime-resolution reason above, and read for it:
|
|
159
|
-
* an older CLI emits routes with no `agent` field, which looks like no tools.
|
|
160
|
-
*/
|
|
161
|
-
CONTEXT_ROUTE_FEATURES?: readonly string[];
|
|
162
|
-
/**
|
|
163
|
-
* Every route as a context route, without the rest of the project context.
|
|
164
|
-
* Optional; `guren_agent_surface` falls back to `generateContext`.
|
|
165
|
-
*/
|
|
166
|
-
loadContextRoutes?(cwd: string, routesFile?: string, loadErrors?: string[]): Promise<unknown[]>;
|
|
167
|
-
/** The OKF docs relation graph (RFC 0005). Optional, like the above. */
|
|
168
|
-
buildDocsGraphReport?(options: {
|
|
169
|
-
cwd?: string;
|
|
170
|
-
entity?: string;
|
|
171
|
-
path?: string;
|
|
172
|
-
}): Promise<unknown>;
|
|
173
|
-
renderDocsGraphMarkdown?(report: unknown): string;
|
|
174
|
-
}
|
|
175
|
-
export interface CreateMcpServerOptions {
|
|
176
|
-
cwd: string;
|
|
177
|
-
cli: GurenCliApi;
|
|
178
|
-
version?: string;
|
|
179
|
-
}
|
|
180
|
-
export declare function createMcpServer(options: CreateMcpServerOptions): McpServer;
|