@ggui-ai/mcp-server-handlers 0.24.0 → 0.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/blueprints/search-blueprints.d.ts +5 -5
- package/dist/blueprints/search-blueprints.js +5 -5
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -8
- package/dist/ops-apps/create-app.d.ts +10 -11
- package/dist/ops-apps/create-app.d.ts.map +1 -1
- package/dist/ops-apps/create-app.js +12 -13
- package/dist/ops-apps/identity.d.ts +9 -8
- package/dist/ops-apps/identity.d.ts.map +1 -1
- package/dist/ops-apps/identity.js +2 -1
- package/dist/ops-apps/index.d.ts +2 -2
- package/dist/ops-apps/index.js +2 -2
- package/dist/ops-apps/list-apps.d.ts +5 -6
- package/dist/ops-apps/list-apps.d.ts.map +1 -1
- package/dist/ops-apps/list-apps.js +6 -7
- package/dist/ops-apps/set-app-theme.d.ts +12 -8
- package/dist/ops-apps/set-app-theme.d.ts.map +1 -1
- package/dist/ops-apps/set-app-theme.js +11 -7
- package/dist/ops-apps/set-default-app.d.ts +1 -2
- package/dist/ops-apps/set-default-app.d.ts.map +1 -1
- package/dist/ops-apps/set-default-app.js +1 -2
- package/dist/ops-apps/types.d.ts +20 -23
- package/dist/ops-apps/types.d.ts.map +1 -1
- package/dist/ops-apps/types.js +4 -6
- package/dist/ops-blueprint/errors.d.ts +12 -0
- package/dist/ops-blueprint/errors.d.ts.map +1 -1
- package/dist/ops-blueprint/errors.js +15 -0
- package/dist/ops-blueprint/index.d.ts +1 -1
- package/dist/ops-blueprint/index.d.ts.map +1 -1
- package/dist/ops-blueprint/index.js +1 -1
- package/dist/ops-blueprint/register.d.ts +71 -5
- package/dist/ops-blueprint/register.d.ts.map +1 -1
- package/dist/ops-blueprint/register.js +229 -158
- package/dist/renders/blueprint-durability.d.ts.map +1 -1
- package/dist/renders/blueprint-durability.js +31 -21
- package/dist/renders/blueprint-matcher.d.ts +29 -7
- package/dist/renders/blueprint-matcher.d.ts.map +1 -1
- package/dist/renders/blueprint-matcher.js +115 -29
- package/dist/renders/blueprint-registry.d.ts +102 -0
- package/dist/renders/blueprint-registry.d.ts.map +1 -1
- package/dist/renders/blueprint-registry.js +200 -0
- package/dist/renders/cache-trace-sink.d.ts +12 -0
- package/dist/renders/cache-trace-sink.d.ts.map +1 -1
- package/dist/renders/cache-trace-sink.js +15 -1
- package/dist/renders/consume.d.ts.map +1 -1
- package/dist/renders/consume.js +27 -1
- package/dist/renders/cross-app-refused.d.ts +16 -0
- package/dist/renders/cross-app-refused.d.ts.map +1 -0
- package/dist/renders/cross-app-refused.js +21 -0
- package/dist/renders/decide-handshake.d.ts +19 -1
- package/dist/renders/decide-handshake.d.ts.map +1 -1
- package/dist/renders/decide-handshake.js +35 -2
- package/dist/renders/declare-tool-catalog.d.ts.map +1 -1
- package/dist/renders/declare-tool-catalog.js +20 -17
- package/dist/renders/fits.d.ts +60 -0
- package/dist/renders/fits.d.ts.map +1 -0
- package/dist/renders/fits.js +92 -0
- package/dist/renders/handshake-generation-inputs.d.ts +89 -0
- package/dist/renders/handshake-generation-inputs.d.ts.map +1 -0
- package/dist/renders/handshake-generation-inputs.js +65 -0
- package/dist/renders/handshake.js +1 -1
- package/dist/renders/index.d.ts +8 -4
- package/dist/renders/index.d.ts.map +1 -1
- package/dist/renders/index.js +8 -2
- package/dist/renders/match-precision/pairs.d.ts +1 -1
- package/dist/renders/match-precision/run-probe.js +1 -2
- package/dist/renders/refresh-ws-token.d.ts +69 -87
- package/dist/renders/refresh-ws-token.d.ts.map +1 -1
- package/dist/renders/refresh-ws-token.js +89 -88
- package/dist/renders/render-identity.d.ts +2 -0
- package/dist/renders/render-identity.d.ts.map +1 -1
- package/dist/renders/render-identity.js +3 -0
- package/dist/renders/render-read-gate.d.ts +59 -0
- package/dist/renders/render-read-gate.d.ts.map +1 -0
- package/dist/renders/render-read-gate.js +45 -0
- package/dist/renders/render.d.ts +41 -8
- package/dist/renders/render.d.ts.map +1 -1
- package/dist/renders/render.js +96 -79
- package/dist/renders/submit-action.d.ts +6 -7
- package/dist/renders/submit-action.d.ts.map +1 -1
- package/dist/renders/submit-action.js +97 -16
- package/dist/renders/sync-context.d.ts.map +1 -1
- package/dist/renders/sync-context.js +17 -14
- package/package.json +8 -20
- package/dist/ops-connector-keys/in-memory-fake.test-util.d.ts +0 -26
- package/dist/ops-connector-keys/in-memory-fake.test-util.d.ts.map +0 -1
- package/dist/ops-connector-keys/in-memory-fake.test-util.js +0 -60
- package/dist/ops-connector-keys/index.d.ts +0 -19
- package/dist/ops-connector-keys/index.d.ts.map +0 -1
- package/dist/ops-connector-keys/index.js +0 -14
- package/dist/ops-connector-keys/issue-connector-key.d.ts +0 -76
- package/dist/ops-connector-keys/issue-connector-key.d.ts.map +0 -1
- package/dist/ops-connector-keys/issue-connector-key.js +0 -84
- package/dist/ops-connector-keys/list-connector-keys.d.ts +0 -58
- package/dist/ops-connector-keys/list-connector-keys.d.ts.map +0 -1
- package/dist/ops-connector-keys/list-connector-keys.js +0 -39
- package/dist/ops-connector-keys/revoke-connector-key.d.ts +0 -32
- package/dist/ops-connector-keys/revoke-connector-key.d.ts.map +0 -1
- package/dist/ops-connector-keys/revoke-connector-key.js +0 -49
- package/dist/ops-connector-keys/types.d.ts +0 -91
- package/dist/ops-connector-keys/types.d.ts.map +0 -1
- package/dist/ops-connector-keys/types.js +0 -24
- package/dist/ops-coupon/in-memory-fake.test-util.d.ts +0 -28
- package/dist/ops-coupon/in-memory-fake.test-util.d.ts.map +0 -1
- package/dist/ops-coupon/in-memory-fake.test-util.js +0 -66
- package/dist/ops-coupon/index.d.ts +0 -15
- package/dist/ops-coupon/index.d.ts.map +0 -1
- package/dist/ops-coupon/index.js +0 -12
- package/dist/ops-coupon/redeem-coupon.d.ts +0 -51
- package/dist/ops-coupon/redeem-coupon.d.ts.map +0 -1
- package/dist/ops-coupon/redeem-coupon.js +0 -61
- package/dist/ops-coupon/types.d.ts +0 -59
- package/dist/ops-coupon/types.d.ts.map +0 -1
- package/dist/ops-coupon/types.js +0 -38
- package/dist/ops-orgs/create-org.d.ts +0 -45
- package/dist/ops-orgs/create-org.d.ts.map +0 -1
- package/dist/ops-orgs/create-org.js +0 -55
- package/dist/ops-orgs/get-org-balance.d.ts +0 -29
- package/dist/ops-orgs/get-org-balance.d.ts.map +0 -1
- package/dist/ops-orgs/get-org-balance.js +0 -45
- package/dist/ops-orgs/in-memory-fake.test-util.d.ts +0 -84
- package/dist/ops-orgs/in-memory-fake.test-util.d.ts.map +0 -1
- package/dist/ops-orgs/in-memory-fake.test-util.js +0 -209
- package/dist/ops-orgs/index.d.ts +0 -33
- package/dist/ops-orgs/index.d.ts.map +0 -1
- package/dist/ops-orgs/index.js +0 -24
- package/dist/ops-orgs/invite-to-org.d.ts +0 -56
- package/dist/ops-orgs/invite-to-org.d.ts.map +0 -1
- package/dist/ops-orgs/invite-to-org.js +0 -72
- package/dist/ops-orgs/list-orgs.d.ts +0 -53
- package/dist/ops-orgs/list-orgs.d.ts.map +0 -1
- package/dist/ops-orgs/list-orgs.js +0 -38
- package/dist/ops-orgs/remove-org-member.d.ts +0 -42
- package/dist/ops-orgs/remove-org-member.d.ts.map +0 -1
- package/dist/ops-orgs/remove-org-member.js +0 -67
- package/dist/ops-orgs/rename-org.d.ts +0 -33
- package/dist/ops-orgs/rename-org.d.ts.map +0 -1
- package/dist/ops-orgs/rename-org.js +0 -57
- package/dist/ops-orgs/revoke-invite.d.ts +0 -38
- package/dist/ops-orgs/revoke-invite.d.ts.map +0 -1
- package/dist/ops-orgs/revoke-invite.js +0 -53
- package/dist/ops-orgs/types.d.ts +0 -209
- package/dist/ops-orgs/types.d.ts.map +0 -1
- package/dist/ops-orgs/types.js +0 -60
|
@@ -58,11 +58,11 @@ import type { BlueprintProvider, EmbeddingProvider, VectorStore } from '@ggui-ai
|
|
|
58
58
|
* `score`.
|
|
59
59
|
*
|
|
60
60
|
* The handshake matcher (`matchBlueprint`) gates its judge with its own
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
61
|
+
* numbers, not this one, because its query comes in two kinds on two
|
|
62
|
+
* scales (ggui#606): a request that carries a contract composes its query
|
|
63
|
+
* like the stored vectors (contract summary + intent) and is gated at 0.50;
|
|
64
|
+
* a request without one embeds its intent alone, on a lower scale, and is
|
|
65
|
+
* gated at 0.2 (ggui#1275). Neither is this tool's intent-only search.
|
|
66
66
|
*/
|
|
67
67
|
export declare const MIN_SIMILARITY_SCORE = 0.3;
|
|
68
68
|
/**
|
|
@@ -59,11 +59,11 @@ import { defineHandler } from '../types.js';
|
|
|
59
59
|
* `score`.
|
|
60
60
|
*
|
|
61
61
|
* The handshake matcher (`matchBlueprint`) gates its judge with its own
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
62
|
+
* numbers, not this one, because its query comes in two kinds on two
|
|
63
|
+
* scales (ggui#606): a request that carries a contract composes its query
|
|
64
|
+
* like the stored vectors (contract summary + intent) and is gated at 0.50;
|
|
65
|
+
* a request without one embeds its intent alone, on a lower scale, and is
|
|
66
|
+
* gated at 0.2 (ggui#1275). Neither is this tool's intent-only search.
|
|
67
67
|
*/
|
|
68
68
|
export const MIN_SIMILARITY_SCORE = 0.3;
|
|
69
69
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,4 @@ export * from "./credits/index.js";
|
|
|
22
22
|
export * from "./app-discovery/index.js";
|
|
23
23
|
export * from "./ops-blueprint/index.js";
|
|
24
24
|
export * from "./ops-apps/index.js";
|
|
25
|
-
export * from "./ops-connector-keys/index.js";
|
|
26
|
-
export * from "./ops-coupon/index.js";
|
|
27
|
-
export * from "./ops-orgs/index.js";
|
|
28
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,WAAW,EACX,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAIpB,cAAc,oBAAoB,CAAC;AAInC,cAAc,oBAAoB,CAAC;AAInC,cAAc,0BAA0B,CAAC;AAIzC,cAAc,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,WAAW,EACX,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAIpB,cAAc,oBAAoB,CAAC;AAInC,cAAc,oBAAoB,CAAC;AAInC,cAAc,0BAA0B,CAAC;AAIzC,cAAc,0BAA0B,CAAC;AAKzC,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -32,12 +32,8 @@ export * from "./app-discovery/index.js";
|
|
|
32
32
|
// served on the `/control` plane. Available under
|
|
33
33
|
// `@ggui-ai/mcp-server-handlers/ops-blueprint` subpath too.
|
|
34
34
|
export * from "./ops-blueprint/index.js";
|
|
35
|
-
// Operator-class apps
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
// `@ggui-ai/mcp-server-handlers/ops-apps
|
|
39
|
-
// `…/ops-connector-keys`, `…/ops-coupon`.
|
|
35
|
+
// Operator-class apps handler family — `ggui_ops_*` tools that
|
|
36
|
+
// manage a deployment's apps, pure over the `AppsSource` seam the
|
|
37
|
+
// deployment binds. Available under
|
|
38
|
+
// `@ggui-ai/mcp-server-handlers/ops-apps` subpath too.
|
|
40
39
|
export * from "./ops-apps/index.js";
|
|
41
|
-
export * from "./ops-connector-keys/index.js";
|
|
42
|
-
export * from "./ops-coupon/index.js";
|
|
43
|
-
export * from "./ops-orgs/index.js";
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ggui_ops_create_app` —
|
|
3
|
-
* calling user. Sibling of the `provisionGguiApp` AppSync mutation
|
|
4
|
-
* (`backend/amplify/data/create-app/handler.ts`); same identity gate
|
|
5
|
-
* (caller's sub, NEVER an argument-supplied userId), same default
|
|
6
|
-
* displayName, same server-side appId allocation — exposed through
|
|
7
|
-
* the `ops` MCP surface so an LLM agent in the console can create an
|
|
8
|
-
* app without a custom GraphQL call.
|
|
2
|
+
* `ggui_ops_create_app` — create a new app owned by the calling user.
|
|
9
3
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
4
|
+
* The owner is always the caller's own identity (`resolveOwnerSub`),
|
|
5
|
+
* never a userId passed as an argument, so an operator agent can only
|
|
6
|
+
* create apps for the account it acts for. The appId is minted by the
|
|
7
|
+
* deployment's {@link AppsSource}: the handler never takes one from the
|
|
8
|
+
* caller, and uniqueness (including any retry on a collision) is the
|
|
9
|
+
* store's job. An in-memory store can use any unique string; a store
|
|
10
|
+
* over a database mints ids in whatever format that database keys on.
|
|
11
|
+
*
|
|
12
|
+
* Pure over the {@link AppsSource} seam.
|
|
14
13
|
*/
|
|
15
14
|
import { z } from 'zod';
|
|
16
15
|
import { type ShapeOutput } from '../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-app.d.ts","sourceRoot":"","sources":["../../src/ops-apps/create-app.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"create-app.d.ts","sourceRoot":"","sources":["../../src/ops-apps/create-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAiB,KAAK,WAAW,EAAuB,MAAM,aAAa,CAAC;AAEnF,OAAO,KAAK,EAAa,UAAU,EAAE,MAAM,YAAY,CAAC;AAaxD,QAAA,MAAM,YAAY;;;;;;;CAYR,CAAC;AAEX,oFAAoF;AACpF,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,YAAY,CAAC,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,aAAa;;;;;;;;;;;;;;;;GAiCpB"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `ggui_ops_create_app` —
|
|
3
|
-
* calling user. Sibling of the `provisionGguiApp` AppSync mutation
|
|
4
|
-
* (`backend/amplify/data/create-app/handler.ts`); same identity gate
|
|
5
|
-
* (caller's sub, NEVER an argument-supplied userId), same default
|
|
6
|
-
* displayName, same server-side appId allocation — exposed through
|
|
7
|
-
* the `ops` MCP surface so an LLM agent in the console can create an
|
|
8
|
-
* app without a custom GraphQL call.
|
|
2
|
+
* `ggui_ops_create_app` — create a new app owned by the calling user.
|
|
9
3
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
4
|
+
* The owner is always the caller's own identity (`resolveOwnerSub`),
|
|
5
|
+
* never a userId passed as an argument, so an operator agent can only
|
|
6
|
+
* create apps for the account it acts for. The appId is minted by the
|
|
7
|
+
* deployment's {@link AppsSource}: the handler never takes one from the
|
|
8
|
+
* caller, and uniqueness (including any retry on a collision) is the
|
|
9
|
+
* store's job. An in-memory store can use any unique string; a store
|
|
10
|
+
* over a database mints ids in whatever format that database keys on.
|
|
11
|
+
*
|
|
12
|
+
* Pure over the {@link AppsSource} seam.
|
|
14
13
|
*/
|
|
15
14
|
import { z } from 'zod';
|
|
16
15
|
import { defineHandler } from '../types.js';
|
|
@@ -21,7 +20,7 @@ const inputSchema = {
|
|
|
21
20
|
.min(1)
|
|
22
21
|
.max(120)
|
|
23
22
|
.optional()
|
|
24
|
-
.describe("Human-friendly label for the new app. Defaults to 'My ggui app' when absent
|
|
23
|
+
.describe("Human-friendly label for the new app. Defaults to 'My ggui app' when absent."),
|
|
25
24
|
};
|
|
26
25
|
const outputSchema = {
|
|
27
26
|
appId: z.string(),
|
|
@@ -39,7 +38,7 @@ export function createCreateAppHandler(deps) {
|
|
|
39
38
|
name: 'ggui_ops_create_app',
|
|
40
39
|
title: 'Create app',
|
|
41
40
|
audience: ['ops'],
|
|
42
|
-
description: "
|
|
41
|
+
description: "Create a new app owned by the calling user. The server mints the appId (it is never an argument), displayName defaults to 'My ggui app' when absent (max 120 chars). Returns the stored app — call `ggui_ops_set_default_app({appId})` afterwards to make it the caller's default.",
|
|
43
42
|
inputSchema,
|
|
44
43
|
outputSchema,
|
|
45
44
|
async handler(rawInput, ctx) {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Per-call identity resolution for `ops-apps` handlers.
|
|
3
|
-
*
|
|
4
|
-
* upstream `AuthAdapter` populates `ctx.userId`
|
|
5
|
-
*
|
|
6
|
-
* workspaceId ?? userId`) leaves `ctx.userId` undefined and
|
|
7
|
-
* value sits on `ctx.appId`. Read whichever is set; fail when
|
|
8
|
-
* is.
|
|
2
|
+
* Per-call identity resolution for `ops-apps` handlers. A deployment
|
|
3
|
+
* with per-user accounts calls these tools as `kind: 'user'`
|
|
4
|
+
* identities — the upstream `AuthAdapter` populates `ctx.userId`
|
|
5
|
+
* directly. Single-app mode (where the auth adapter collapses
|
|
6
|
+
* `appId = workspaceId ?? userId`) leaves `ctx.userId` undefined and
|
|
7
|
+
* the same value sits on `ctx.appId`. Read whichever is set; fail when
|
|
8
|
+
* neither is.
|
|
9
9
|
*/
|
|
10
10
|
import type { HandlerContext } from '../types.js';
|
|
11
11
|
/**
|
|
12
|
-
* Resolve the caller's
|
|
12
|
+
* Resolve the caller's owner id (`ctx.userId`, or `ctx.appId` in
|
|
13
|
+
* single-app mode). Throws
|
|
13
14
|
* when neither field is set — that means an unauthenticated caller
|
|
14
15
|
* slipped past the upstream auth adapter, which is a real bug worth
|
|
15
16
|
* surfacing as a 5xx rather than masking as "empty list".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/ops-apps/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/ops-apps/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,cAAc,GAClB,MAAM,CAQR"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resolve the caller's
|
|
2
|
+
* Resolve the caller's owner id (`ctx.userId`, or `ctx.appId` in
|
|
3
|
+
* single-app mode). Throws
|
|
3
4
|
* when neither field is set — that means an unauthenticated caller
|
|
4
5
|
* slipped past the upstream auth adapter, which is a real bug worth
|
|
5
6
|
* surfacing as a 5xx rather than masking as "empty list".
|
package/dist/ops-apps/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Six MCP tools, all `audience: ['ops']`, all served on `/control`. Pure
|
|
5
5
|
* over the {@link AppsSource} + {@link UserDefaultAppSource} seams —
|
|
6
|
-
*
|
|
7
|
-
* use in-memory fakes.
|
|
6
|
+
* no storage imports. A deployment binds adapters over its own store;
|
|
7
|
+
* tests use in-memory fakes.
|
|
8
8
|
*
|
|
9
9
|
* - `createListAppsHandler` → `ggui_ops_list_apps`
|
|
10
10
|
* - `createCreateAppHandler` → `ggui_ops_create_app`
|
package/dist/ops-apps/index.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Six MCP tools, all `audience: ['ops']`, all served on `/control`. Pure
|
|
5
5
|
* over the {@link AppsSource} + {@link UserDefaultAppSource} seams —
|
|
6
|
-
*
|
|
7
|
-
* use in-memory fakes.
|
|
6
|
+
* no storage imports. A deployment binds adapters over its own store;
|
|
7
|
+
* tests use in-memory fakes.
|
|
8
8
|
*
|
|
9
9
|
* - `createListAppsHandler` → `ggui_ops_list_apps`
|
|
10
10
|
* - `createCreateAppHandler` → `ggui_ops_create_app`
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `ggui_ops_list_apps` — enumerate the calling user's `GguiApp` rows.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* in-memory Map.
|
|
4
|
+
* The MCP door onto the same data an app-management UI lists. Pure over
|
|
5
|
+
* the {@link AppsSource} seam; a production deployment binds its own
|
|
6
|
+
* implementation, tests bind an in-memory Map.
|
|
8
7
|
*
|
|
9
|
-
* Identity scope: caller's
|
|
10
|
-
* `ctx.appId` in
|
|
8
|
+
* Identity scope: the caller's owner id from `ctx.userId` (or
|
|
9
|
+
* `ctx.appId` in single-app mode). Cross-user list is impossible
|
|
11
10
|
* by construction — `AppsSource.list` only returns rows whose
|
|
12
11
|
* `ownerSub` matches.
|
|
13
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../src/ops-apps/list-apps.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../src/ops-apps/list-apps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAEnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI7C,QAAA,MAAM,YAAY;;;;;;;;CAUR,CAAC;AAEX,oFAAoF;AACpF,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,YAAY,CAAC,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;GA4BvD"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `ggui_ops_list_apps` — enumerate the calling user's `GguiApp` rows.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* in-memory Map.
|
|
4
|
+
* The MCP door onto the same data an app-management UI lists. Pure over
|
|
5
|
+
* the {@link AppsSource} seam; a production deployment binds its own
|
|
6
|
+
* implementation, tests bind an in-memory Map.
|
|
8
7
|
*
|
|
9
|
-
* Identity scope: caller's
|
|
10
|
-
* `ctx.appId` in
|
|
8
|
+
* Identity scope: the caller's owner id from `ctx.userId` (or
|
|
9
|
+
* `ctx.appId` in single-app mode). Cross-user list is impossible
|
|
11
10
|
* by construction — `AppsSource.list` only returns rows whose
|
|
12
11
|
* `ownerSub` matches.
|
|
13
12
|
*/
|
|
@@ -29,7 +28,7 @@ export function createListAppsHandler(deps) {
|
|
|
29
28
|
name: 'ggui_ops_list_apps',
|
|
30
29
|
title: 'List apps',
|
|
31
30
|
audience: ['ops'],
|
|
32
|
-
description: "Enumerate every `GguiApp` row owned by the calling user. Returns metadata only (appId, displayName, optional systemPrompt, createdAt, updatedAt).
|
|
31
|
+
description: "Enumerate every `GguiApp` row owned by the calling user. Returns metadata only (appId, displayName, optional systemPrompt, createdAt, updatedAt). Use to discover ids before calling `ggui_ops_update_app` / `ggui_ops_set_default_app` / `ggui_ops_delete_app`.",
|
|
33
32
|
inputSchema,
|
|
34
33
|
outputSchema,
|
|
35
34
|
async handler(_input, ctx) {
|
|
@@ -15,15 +15,19 @@
|
|
|
15
15
|
* 2. attestation — `overlayHash` is recomputed with
|
|
16
16
|
* `canonicalOverlayHash` and a mismatch is refused;
|
|
17
17
|
* 3. coverage — the injected overlay validator judges each mode's
|
|
18
|
-
* set against the consumed-token manifest: a
|
|
19
|
-
*
|
|
20
|
-
* (`
|
|
18
|
+
* set against the consumed-token manifest: a consumed token left
|
|
19
|
+
* unset (`uncovered`) is refused, per mode. A key outside the
|
|
20
|
+
* manifest (`unknown`) is ADMITTED, never refused (ggui#1286): the
|
|
21
|
+
* theme is stored verbatim and the write logs the names
|
|
22
|
+
* (`app_theme_unknown_overlay_names`).
|
|
21
23
|
*
|
|
22
24
|
* A refusal is a schema-conformant `{ ok: false, code:
|
|
23
25
|
* 'invalid_app_config', refusal }` RESULT (not a thrown error): the
|
|
24
|
-
* body is one
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* body is one the protocol names (`appThemeRefusalBodySchema`, five
|
|
27
|
+
* bodies; this door raises three of them: `refused: 'v1 shape'`,
|
|
28
|
+
* `overlayHash: 'mismatch'` and `uncovered`), so a client reads the
|
|
29
|
+
* same refusal from every write door a deployment offers, this one
|
|
30
|
+
* included. A body the schema itself rejects carries `issues` instead.
|
|
27
31
|
*
|
|
28
32
|
* Ownership: `AppsSource.get` first (scoped by `ownerSub`); cross-user
|
|
29
33
|
* probes return the uniform "not found" shape. The store scopes the
|
|
@@ -102,7 +106,7 @@ declare const outputSchema: {
|
|
|
102
106
|
readonly updatedAt: z.ZodOptional<z.ZodString>;
|
|
103
107
|
/** Present on a refusal: the one refusal class this door emits. */
|
|
104
108
|
readonly code: z.ZodOptional<z.ZodLiteral<"invalid_app_config">>;
|
|
105
|
-
/** Present on a coverage / attestation / v1-shape refusal —
|
|
109
|
+
/** Present on a coverage / attestation / v1-shape refusal — a protocol-named body (`appThemeRefusalBodySchema`). */
|
|
106
110
|
readonly refusal: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
107
111
|
uncovered: z.ZodObject<{
|
|
108
112
|
light: z.ZodArray<z.ZodString>;
|
|
@@ -265,7 +269,7 @@ export declare function createSetAppThemeHandler(deps: SetAppThemeDeps): import(
|
|
|
265
269
|
readonly updatedAt: z.ZodOptional<z.ZodString>;
|
|
266
270
|
/** Present on a refusal: the one refusal class this door emits. */
|
|
267
271
|
readonly code: z.ZodOptional<z.ZodLiteral<"invalid_app_config">>;
|
|
268
|
-
/** Present on a coverage / attestation / v1-shape refusal —
|
|
272
|
+
/** Present on a coverage / attestation / v1-shape refusal — a protocol-named body (`appThemeRefusalBodySchema`). */
|
|
269
273
|
readonly refusal: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
270
274
|
uncovered: z.ZodObject<{
|
|
271
275
|
light: z.ZodArray<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-app-theme.d.ts","sourceRoot":"","sources":["../../src/ops-apps/set-app-theme.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"set-app-theme.d.ts","sourceRoot":"","sources":["../../src/ops-apps/set-app-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,mBAAmB,EAEzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK;IACpF,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,CAAC;AAcF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKhB,mEAAmE;;IAEnE,oHAAoH;;;;;;;;;;;;;;;;;;IAEpH,yFAAyF;;CAEjF,CAAC;AAEX,uEAAuE;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,8FAA8F;IAC9F,QAAQ,CAAC,eAAe,EAAE,wBAAwB,CAAC;CACpD;AAED,0EAA0E;AAC1E,MAAM,MAAM,iBAAiB,GACzB;IACE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,8GAA8G;IAC9G,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;CAC3F,GACD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAA;CAAE,GAC7D;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAY/D;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,wBAAwB,GACxC,OAAO,CAAC,iBAAiB,CAAC,CAmB5B;AAqBD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAzF5D,mEAAmE;;IAEnE,oHAAoH;;;;;;;;;;;;;;;;;;IAEpH,yFAAyF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmI1F"}
|
|
@@ -15,15 +15,19 @@
|
|
|
15
15
|
* 2. attestation — `overlayHash` is recomputed with
|
|
16
16
|
* `canonicalOverlayHash` and a mismatch is refused;
|
|
17
17
|
* 3. coverage — the injected overlay validator judges each mode's
|
|
18
|
-
* set against the consumed-token manifest: a
|
|
19
|
-
*
|
|
20
|
-
* (`
|
|
18
|
+
* set against the consumed-token manifest: a consumed token left
|
|
19
|
+
* unset (`uncovered`) is refused, per mode. A key outside the
|
|
20
|
+
* manifest (`unknown`) is ADMITTED, never refused (ggui#1286): the
|
|
21
|
+
* theme is stored verbatim and the write logs the names
|
|
22
|
+
* (`app_theme_unknown_overlay_names`).
|
|
21
23
|
*
|
|
22
24
|
* A refusal is a schema-conformant `{ ok: false, code:
|
|
23
25
|
* 'invalid_app_config', refusal }` RESULT (not a thrown error): the
|
|
24
|
-
* body is one
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* body is one the protocol names (`appThemeRefusalBodySchema`, five
|
|
27
|
+
* bodies; this door raises three of them: `refused: 'v1 shape'`,
|
|
28
|
+
* `overlayHash: 'mismatch'` and `uncovered`), so a client reads the
|
|
29
|
+
* same refusal from every write door a deployment offers, this one
|
|
30
|
+
* included. A body the schema itself rejects carries `issues` instead.
|
|
27
31
|
*
|
|
28
32
|
* Ownership: `AppsSource.get` first (scoped by `ownerSub`); cross-user
|
|
29
33
|
* probes return the uniform "not found" shape. The store scopes the
|
|
@@ -50,7 +54,7 @@ const outputSchema = {
|
|
|
50
54
|
updatedAt: z.string().optional(),
|
|
51
55
|
/** Present on a refusal: the one refusal class this door emits. */
|
|
52
56
|
code: z.literal('invalid_app_config').optional(),
|
|
53
|
-
/** Present on a coverage / attestation / v1-shape refusal —
|
|
57
|
+
/** Present on a coverage / attestation / v1-shape refusal — a protocol-named body (`appThemeRefusalBodySchema`). */
|
|
54
58
|
refusal: appThemeRefusalBodySchema.optional(),
|
|
55
59
|
/** Present on a shape refusal the schema itself raised — its messages, one per issue. */
|
|
56
60
|
issues: z.array(z.string()).optional(),
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* `ggui_ops_set_default_app` — write the calling user's
|
|
3
3
|
* `GguiUser.defaultAppId` column.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* Same column, MCP surface. The handler chains `AppsSource.get` first
|
|
5
|
+
* The MCP door onto the user's default-app setting. The handler chains `AppsSource.get` first
|
|
7
6
|
* (verify the user owns the target appId) before writing
|
|
8
7
|
* `UserDefaultAppSource.setDefault` — invariant: `defaultAppId` MUST
|
|
9
8
|
* point at an app the user owns.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-default-app.d.ts","sourceRoot":"","sources":["../../src/ops-apps/set-default-app.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"set-default-app.d.ts","sourceRoot":"","sources":["../../src/ops-apps/set-default-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAenE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAC;CAC/C;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,iBAAiB;;;;wBA8BxB"}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* `ggui_ops_set_default_app` — write the calling user's
|
|
3
3
|
* `GguiUser.defaultAppId` column.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* Same column, MCP surface. The handler chains `AppsSource.get` first
|
|
5
|
+
* The MCP door onto the user's default-app setting. The handler chains `AppsSource.get` first
|
|
7
6
|
* (verify the user owns the target appId) before writing
|
|
8
7
|
* `UserDefaultAppSource.setDefault` — invariant: `defaultAppId` MUST
|
|
9
8
|
* point at an app the user owns.
|
package/dist/ops-apps/types.d.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Seam types for the `ops-apps` MCP tool family
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* deployments bind an AWS-backed implementation; tests bind
|
|
2
|
+
* Seam types for the `ops-apps` MCP tool family: an app record
|
|
3
|
+
* (`GguiApp`) and the user's default-app setting (`GguiUser`). Pure over
|
|
4
|
+
* `@ggui-ai/protocol` shapes — no storage or database imports. A
|
|
5
|
+
* deployment binds an implementation over its own store; tests bind
|
|
7
6
|
* in-memory fakes.
|
|
8
7
|
*
|
|
9
8
|
* Why an explicit seam vs threading a database client directly: the
|
|
10
|
-
* shared-handler layer must be the same code path
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* shared-handler layer must be the same code path whatever store sits
|
|
10
|
+
* behind it. The `AppsSource` interface IS the boundary — wired to a
|
|
11
|
+
* real datastore in production, wired to a Map in tests.
|
|
13
12
|
*/
|
|
14
13
|
import type { AppTheme } from '@ggui-ai/protocol';
|
|
15
14
|
/**
|
|
16
15
|
* One app record, projected for MCP-tool readers. Pure data — no
|
|
17
|
-
* relations, no
|
|
18
|
-
*
|
|
16
|
+
* relations, no store-internal fields. An adapter maps its stored row
|
|
17
|
+
* onto this shape; tests construct it directly.
|
|
19
18
|
*/
|
|
20
19
|
export interface AppRecord {
|
|
21
|
-
/** Opaque
|
|
20
|
+
/** Opaque id, minted by the store when the app is created; never caller-supplied. */
|
|
22
21
|
readonly appId: string;
|
|
23
|
-
/**
|
|
22
|
+
/** The owning user's id (`resolveOwnerSub`). Used for ownership gates. */
|
|
24
23
|
readonly ownerSub: string;
|
|
25
24
|
/** User-editable label. */
|
|
26
25
|
readonly displayName: string;
|
|
@@ -58,7 +57,7 @@ export interface AppUpdatePatch {
|
|
|
58
57
|
readonly rateLimitPerMinute?: number;
|
|
59
58
|
}
|
|
60
59
|
/**
|
|
61
|
-
* Read+write seam for `GguiApp` rows.
|
|
60
|
+
* Read+write seam for `GguiApp` rows. A deployment binds a
|
|
62
61
|
* datastore-backed implementation; tests implement it against
|
|
63
62
|
* in-memory state.
|
|
64
63
|
*
|
|
@@ -66,8 +65,8 @@ export interface AppUpdatePatch {
|
|
|
66
65
|
* - `list(ownerSub)` returns only the rows the caller owns. The
|
|
67
66
|
* implementation does NOT leak rows from other users.
|
|
68
67
|
* - `create({ ownerSub, displayName })` mints a fresh `appId`
|
|
69
|
-
* server-side (
|
|
70
|
-
* unique string). Argument-supplied appIds are NOT honored — that
|
|
68
|
+
* server-side (a database store: its own id format, with a retry
|
|
69
|
+
* on collision; in-memory: any unique string). Argument-supplied appIds are NOT honored — that
|
|
71
70
|
* would be an app-takeover vector.
|
|
72
71
|
* - `update`, `delete`, `setTheme` reject when the row's
|
|
73
72
|
* `ownerSub` doesn't match the caller's. Implementations either
|
|
@@ -138,8 +137,8 @@ export interface AppsSource {
|
|
|
138
137
|
/**
|
|
139
138
|
* Read+write seam for the `defaultAppId` column on `GguiUser`. Separate
|
|
140
139
|
* interface from `AppsSource` because the column lives on a different
|
|
141
|
-
*
|
|
142
|
-
* unrelated
|
|
140
|
+
* record — keeping the seams disjoint lets an adapter bind two
|
|
141
|
+
* unrelated writes without one interface dragging in the other.
|
|
143
142
|
*
|
|
144
143
|
* The handler chains `AppsSource.get` (verify the user owns the target)
|
|
145
144
|
* before calling `setDefault` so writes never point at a foreign app.
|
|
@@ -166,9 +165,8 @@ export declare class AppNotFoundError extends Error {
|
|
|
166
165
|
*
|
|
167
166
|
* `defaultAppId` is what the universal route resolves on every
|
|
168
167
|
* request; deleting the app it names would leave that route pointing
|
|
169
|
-
* at a row that no longer exists.
|
|
170
|
-
*
|
|
171
|
-
* deletes.
|
|
168
|
+
* at a row that no longer exists. A UI's delete should enforce the same
|
|
169
|
+
* lock — the operator picks a different default first, then deletes.
|
|
172
170
|
*/
|
|
173
171
|
export declare class DefaultAppDeleteBlockedError extends Error {
|
|
174
172
|
readonly code: "default_app_delete_blocked";
|
|
@@ -177,9 +175,8 @@ export declare class DefaultAppDeleteBlockedError extends Error {
|
|
|
177
175
|
/**
|
|
178
176
|
* Thrown by adapters that prefer surfacing access denial over the
|
|
179
177
|
* "treat as not-found" privacy posture. Handlers translate to the
|
|
180
|
-
* uniform "not found" shape — the error class exists so
|
|
181
|
-
*
|
|
182
|
-
* strings.
|
|
178
|
+
* uniform "not found" shape — the error class exists so adapters can
|
|
179
|
+
* be specific in their logs without callers parsing strings.
|
|
183
180
|
*/
|
|
184
181
|
export declare class OpsAppsAccessDeniedError extends Error {
|
|
185
182
|
readonly code: "ops_apps_access_denied";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ops-apps/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ops-apps/types.ts"],"names":[],"mappings":"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"}
|
package/dist/ops-apps/types.js
CHANGED
|
@@ -14,9 +14,8 @@ export class AppNotFoundError extends Error {
|
|
|
14
14
|
*
|
|
15
15
|
* `defaultAppId` is what the universal route resolves on every
|
|
16
16
|
* request; deleting the app it names would leave that route pointing
|
|
17
|
-
* at a row that no longer exists.
|
|
18
|
-
*
|
|
19
|
-
* deletes.
|
|
17
|
+
* at a row that no longer exists. A UI's delete should enforce the same
|
|
18
|
+
* lock — the operator picks a different default first, then deletes.
|
|
20
19
|
*/
|
|
21
20
|
export class DefaultAppDeleteBlockedError extends Error {
|
|
22
21
|
code = 'default_app_delete_blocked';
|
|
@@ -28,9 +27,8 @@ export class DefaultAppDeleteBlockedError extends Error {
|
|
|
28
27
|
/**
|
|
29
28
|
* Thrown by adapters that prefer surfacing access denial over the
|
|
30
29
|
* "treat as not-found" privacy posture. Handlers translate to the
|
|
31
|
-
* uniform "not found" shape — the error class exists so
|
|
32
|
-
*
|
|
33
|
-
* strings.
|
|
30
|
+
* uniform "not found" shape — the error class exists so adapters can
|
|
31
|
+
* be specific in their logs without callers parsing strings.
|
|
34
32
|
*/
|
|
35
33
|
export class OpsAppsAccessDeniedError extends Error {
|
|
36
34
|
code = 'ops_apps_access_denied';
|
|
@@ -45,6 +45,18 @@ export declare class GeneratorNotFoundError extends Error {
|
|
|
45
45
|
* `ggui_ops_set_provider_key`, or run the handler in an environment
|
|
46
46
|
* whose `resolveLlm` dep returns a pool credential.
|
|
47
47
|
*/
|
|
48
|
+
/**
|
|
49
|
+
* ggui#1427 — `directionScope` names which direction `directionDigest`
|
|
50
|
+
* hashes; sent without a digest it is a scope for nothing, and the door
|
|
51
|
+
* refuses it rather than storing a fact about a value it does not have. A
|
|
52
|
+
* digest without a scope is accepted (absent = no scope). Enforced here
|
|
53
|
+
* because the handler mounts the input schema's raw shape, where a
|
|
54
|
+
* cross-field rule cannot live.
|
|
55
|
+
*/
|
|
56
|
+
export declare class DirectionScopeWithoutDigestError extends Error {
|
|
57
|
+
readonly code: "direction_scope_without_digest";
|
|
58
|
+
constructor();
|
|
59
|
+
}
|
|
48
60
|
export declare class MissingCredentialsError extends Error {
|
|
49
61
|
readonly code: "missing_credentials";
|
|
50
62
|
constructor(message?: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/ops-blueprint/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,EAAG,qBAAqB,CAAU;gBACnC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,MAAM,EAAE;CAM7D;AAED;;;;;;;;;;GAUG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,EAAG,qBAAqB,CAAU;gBACnC,OAAO,CAAC,EAAE,MAAM;CAO7B;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAG,mBAAmB,CAAU;IAC7C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;gBACZ,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAK5C"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/ops-blueprint/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,EAAG,qBAAqB,CAAU;gBACnC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,MAAM,EAAE;CAM7D;AAED;;;;;;;;;;GAUG;AACH;;;;;;;GAOG;AACH,qBAAa,gCAAiC,SAAQ,KAAK;IACzD,QAAQ,CAAC,IAAI,EAAG,gCAAgC,CAAU;;CAO3D;AAED,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,EAAG,qBAAqB,CAAU;gBACnC,OAAO,CAAC,EAAE,MAAM;CAO7B;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAG,mBAAmB,CAAU;IAC7C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;gBACZ,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAK5C"}
|
|
@@ -48,6 +48,21 @@ export class GeneratorNotFoundError extends Error {
|
|
|
48
48
|
* `ggui_ops_set_provider_key`, or run the handler in an environment
|
|
49
49
|
* whose `resolveLlm` dep returns a pool credential.
|
|
50
50
|
*/
|
|
51
|
+
/**
|
|
52
|
+
* ggui#1427 — `directionScope` names which direction `directionDigest`
|
|
53
|
+
* hashes; sent without a digest it is a scope for nothing, and the door
|
|
54
|
+
* refuses it rather than storing a fact about a value it does not have. A
|
|
55
|
+
* digest without a scope is accepted (absent = no scope). Enforced here
|
|
56
|
+
* because the handler mounts the input schema's raw shape, where a
|
|
57
|
+
* cross-field rule cannot live.
|
|
58
|
+
*/
|
|
59
|
+
export class DirectionScopeWithoutDigestError extends Error {
|
|
60
|
+
code = "direction_scope_without_digest";
|
|
61
|
+
constructor() {
|
|
62
|
+
super("direction_scope_without_digest: `directionScope` was sent without `directionDigest` — a scope names which direction the digest hashes, so send both or neither.");
|
|
63
|
+
this.name = "DirectionScopeWithoutDigestError";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
51
66
|
export class MissingCredentialsError extends Error {
|
|
52
67
|
code = "missing_credentials";
|
|
53
68
|
constructor(message) {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* enforces their ownership model.
|
|
28
28
|
*/
|
|
29
29
|
export { createGguiOpsGenerateBlueprintHandler, type GguiOpsGenerateBlueprintDeps, type PutCodeHook, } from './generate.js';
|
|
30
|
-
export { createGguiOpsRegisterBlueprintHandler, type GguiOpsRegisterBlueprintDeps, } from './register.js';
|
|
30
|
+
export { createGguiOpsRegisterBlueprintHandler, createRegisterGeneratedBlueprint, type GeneratedBlueprintBytes, type GguiOpsRegisterBlueprintDeps, type RegisterGeneratedBlueprint, type RegisterGeneratedBlueprintOutput, } from './register.js';
|
|
31
31
|
export { createGguiOpsListBlueprintsHandler, type GguiOpsListBlueprintsDeps, } from './list.js';
|
|
32
32
|
export { createGguiOpsUpdateBlueprintHandler, type GguiOpsUpdateBlueprintDeps, BlueprintAppMismatchError, } from './update.js';
|
|
33
33
|
export { createGguiOpsDeleteBlueprintHandler, type GguiOpsDeleteBlueprintDeps, } from './delete.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ops-blueprint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,qCAAqC,EACrC,KAAK,4BAA4B,EACjC,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qCAAqC,EACrC,KAAK,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ops-blueprint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,qCAAqC,EACrC,KAAK,4BAA4B,EACjC,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qCAAqC,EACrC,gCAAgC,EAChC,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,GACtC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kCAAkC,EAClC,KAAK,yBAAyB,GAC/B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mCAAmC,EACnC,KAAK,0BAA0B,EAC/B,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mCAAmC,EACnC,KAAK,0BAA0B,GAChC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,wBAAwB,EACxB,KAAK,yBAAyB,GAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,GAC/B,MAAM,iBAAiB,CAAC"}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* enforces their ownership model.
|
|
28
28
|
*/
|
|
29
29
|
export { createGguiOpsGenerateBlueprintHandler, } from './generate.js';
|
|
30
|
-
export { createGguiOpsRegisterBlueprintHandler, } from './register.js';
|
|
30
|
+
export { createGguiOpsRegisterBlueprintHandler, createRegisterGeneratedBlueprint, } from './register.js';
|
|
31
31
|
export { createGguiOpsListBlueprintsHandler, } from './list.js';
|
|
32
32
|
export { createGguiOpsUpdateBlueprintHandler, BlueprintAppMismatchError, } from './update.js';
|
|
33
33
|
export { createGguiOpsDeleteBlueprintHandler, } from './delete.js';
|