@pairsystems/goodmem-mcp 0.1.27 → 0.1.29
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/README.md +11 -0
- package/dist/index.js +307 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,6 +228,17 @@ Memory spaces are containers that associate a set of memories with an embedder.
|
|
|
228
228
|
| `goodmem_access_policy_role_assignments_get` | Get a scoped role assignment |
|
|
229
229
|
| `goodmem_access_policy_role_assignments_list` | List scoped role assignments |
|
|
230
230
|
|
|
231
|
+
### Decision_models
|
|
232
|
+
|
|
233
|
+
| Tool | Description |
|
|
234
|
+
|------|-------------|
|
|
235
|
+
| `goodmem_decision_models_create` | Create a decision model |
|
|
236
|
+
| `goodmem_decision_models_decide` | Request decisions from a model |
|
|
237
|
+
| `goodmem_decision_models_delete` | Delete a decision model |
|
|
238
|
+
| `goodmem_decision_models_get` | Get a decision model |
|
|
239
|
+
| `goodmem_decision_models_list` | List decision models |
|
|
240
|
+
| `goodmem_decision_models_update` | Update a decision model |
|
|
241
|
+
|
|
231
242
|
### Instance
|
|
232
243
|
|
|
233
244
|
| Tool | Description |
|
package/dist/index.js
CHANGED
|
@@ -26967,7 +26967,7 @@ function _parseStreamMaxLineBytes(raw) {
|
|
|
26967
26967
|
return Number.isFinite(n) && n > 0 ? Math.floor(n) : 0;
|
|
26968
26968
|
}
|
|
26969
26969
|
var goodmemStreamMaxLineBytes = _parseStreamMaxLineBytes(process.env.GOODMEM_STREAM_MAX_LINE_BYTES);
|
|
26970
|
-
var BASED_ON_GOODMEM_COMMIT = "
|
|
26970
|
+
var BASED_ON_GOODMEM_COMMIT = "33f2208a218aeac291ea56261d03fd2df0fe23d4";
|
|
26971
26971
|
function isConfigured() {
|
|
26972
26972
|
return goodmemBaseUrl !== "";
|
|
26973
26973
|
}
|
|
@@ -27982,6 +27982,14 @@ var MODEL_REGISTRY2 = {
|
|
|
27982
27982
|
],
|
|
27983
27983
|
"maxContextLength": 1048576
|
|
27984
27984
|
},
|
|
27985
|
+
"gpt-6.1-sol": {
|
|
27986
|
+
"providerType": "OPENAI",
|
|
27987
|
+
"supportedModalities": [
|
|
27988
|
+
"TEXT",
|
|
27989
|
+
"IMAGE"
|
|
27990
|
+
],
|
|
27991
|
+
"maxContextLength": 105e4
|
|
27992
|
+
},
|
|
27985
27993
|
"gpt-6-astra": {
|
|
27986
27994
|
"providerType": "OPENAI",
|
|
27987
27995
|
"supportedModalities": [
|
|
@@ -28269,7 +28277,7 @@ function autoInferFromRegistry(registryType, args) {
|
|
|
28269
28277
|
}
|
|
28270
28278
|
var server = new McpServer({
|
|
28271
28279
|
name: "goodmem",
|
|
28272
|
-
version: "0.1.
|
|
28280
|
+
version: "0.1.29"
|
|
28273
28281
|
});
|
|
28274
28282
|
server.tool("goodmem_configure", "Configure GoodMem server connection. Call this before using other GoodMem tools if GOODMEM_BASE_URL and GOODMEM_API_KEY environment variables are not set. Session credentials override environment variables. For bootstrap workflows that need to call /v1/system/info or /v1/system/init before keys exist, api_key may be omitted; most other tools will return AuthenticationException until a real key is provided.", {
|
|
28275
28283
|
base_url: external_exports.string().describe("GoodMem server URL (e.g., https://your-server.example.com)"),
|
|
@@ -28345,16 +28353,16 @@ ${allModels.join("\n")}` }] };
|
|
|
28345
28353
|
});
|
|
28346
28354
|
server.tool("goodmem_client_info", "Return the MCP client package version and the goodmem server commit it was built against. No server connection required.", {}, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async () => {
|
|
28347
28355
|
return { content: [{ type: "text", text: JSON.stringify({
|
|
28348
|
-
mcp_version: "0.1.
|
|
28356
|
+
mcp_version: "0.1.29",
|
|
28349
28357
|
based_on_goodmem_commit: BASED_ON_GOODMEM_COMMIT
|
|
28350
28358
|
}, null, 2) }] };
|
|
28351
28359
|
});
|
|
28352
28360
|
function registerTools() {
|
|
28353
28361
|
server.tool("goodmem_access_policy_check", "Check effective authorization\n\nEvaluates 1 to 50 concrete operation-and-target checks under the authenticated caller's live authority and any API-key ceiling. Results are positional and advisory: missing targets and denied operations both return allowed=false, and every later resource request performs fresh authorization. Top-level creates and LIST_API_KEY target INSTANCE; CREATE_MEMORY and LIST_MEMORY target their parent SPACE; reads, mutations, proxy operations, and access-policy administration target concrete resources. LIST_RETRIEVE_MEMORY_LOG_POLICY is rejected because its current candidate-based list rule has no instance-wide preflight.", {
|
|
28354
28362
|
checks: external_exports.array(external_exports.object({
|
|
28355
|
-
operation: external_exports.enum(["CREATE_USER", "READ_USER", "UPDATE_USER", "DELETE_USER", "LIST_USER", "MANAGE_USER_ENROLLMENT", "CREATE_SERVICE_IDENTITY", "READ_SERVICE_IDENTITY", "UPDATE_SERVICE_IDENTITY", "DELETE_SERVICE_IDENTITY", "LIST_SERVICE_IDENTITY", "CREATE_SPACE", "READ_SPACE", "UPDATE_SPACE", "DELETE_SPACE", "LIST_SPACE", "CREATE_API_KEY", "READ_API_KEY", "UPDATE_API_KEY", "DELETE_API_KEY", "LIST_API_KEY", "CREATE_EMBEDDER", "READ_EMBEDDER", "UPDATE_EMBEDDER", "DELETE_EMBEDDER", "LIST_EMBEDDER", "PING_EMBEDDER", "EXECUTE_EMBEDDER", "READ_EMBEDDER_CREDENTIALS", "CREATE_RERANKER", "READ_RERANKER", "UPDATE_RERANKER", "DELETE_RERANKER", "LIST_RERANKER", "PING_RERANKER", "EXECUTE_RERANKER", "READ_RERANKER_CREDENTIALS", "CREATE_LLM", "READ_LLM", "UPDATE_LLM", "DELETE_LLM", "LIST_LLM", "PING_LLM", "EXECUTE_LLM", "READ_LLM_CREDENTIALS", "PROXY_INFERENCE_TARGET", "OCR_DOCUMENT", "CREATE_MEMORY", "READ_MEMORY", "DELETE_MEMORY", "LIST_MEMORY", "CREATE_EXTENSION", "READ_EXTENSION", "UPDATE_EXTENSION", "DELETE_EXTENSION", "LIST_EXTENSION", "DOWNLOAD_EXTENSION", "READ_INSTANCE", "TRANSFER_INSTANCE_OWNERSHIP", "TRANSFER_RESOURCE_OWNERSHIP", "RELOAD_LICENSE", "DRAIN_SERVER", "PURGE_BACKGROUND_JOBS", "CREATE_RETRIEVE_MEMORY_LOG_POLICY", "READ_RETRIEVE_MEMORY_LOG_POLICY", "LIST_RETRIEVE_MEMORY_LOG_POLICY", "DELETE_RETRIEVE_MEMORY_LOG_POLICY", "MANAGE_ACCESS"]).describe("Operation the caller proposes to perform."),
|
|
28363
|
+
operation: external_exports.enum(["CREATE_USER", "READ_USER", "UPDATE_USER", "DELETE_USER", "LIST_USER", "MANAGE_USER_ENROLLMENT", "CREATE_SERVICE_IDENTITY", "READ_SERVICE_IDENTITY", "UPDATE_SERVICE_IDENTITY", "DELETE_SERVICE_IDENTITY", "LIST_SERVICE_IDENTITY", "CREATE_SPACE", "READ_SPACE", "UPDATE_SPACE", "DELETE_SPACE", "LIST_SPACE", "CREATE_API_KEY", "READ_API_KEY", "UPDATE_API_KEY", "DELETE_API_KEY", "LIST_API_KEY", "CREATE_EMBEDDER", "READ_EMBEDDER", "UPDATE_EMBEDDER", "DELETE_EMBEDDER", "LIST_EMBEDDER", "PING_EMBEDDER", "EXECUTE_EMBEDDER", "READ_EMBEDDER_CREDENTIALS", "CREATE_RERANKER", "READ_RERANKER", "UPDATE_RERANKER", "DELETE_RERANKER", "LIST_RERANKER", "PING_RERANKER", "EXECUTE_RERANKER", "READ_RERANKER_CREDENTIALS", "CREATE_LLM", "READ_LLM", "UPDATE_LLM", "DELETE_LLM", "LIST_LLM", "PING_LLM", "EXECUTE_LLM", "READ_LLM_CREDENTIALS", "CREATE_DECISION_MODEL", "READ_DECISION_MODEL", "UPDATE_DECISION_MODEL", "DELETE_DECISION_MODEL", "LIST_DECISION_MODEL", "EXECUTE_DECISION_MODEL", "READ_DECISION_MODEL_CREDENTIALS", "PING_DECISION_MODEL", "PROXY_INFERENCE_TARGET", "OCR_DOCUMENT", "CREATE_MEMORY", "READ_MEMORY", "DELETE_MEMORY", "LIST_MEMORY", "CREATE_EXTENSION", "READ_EXTENSION", "UPDATE_EXTENSION", "DELETE_EXTENSION", "LIST_EXTENSION", "DOWNLOAD_EXTENSION", "READ_INSTANCE", "TRANSFER_INSTANCE_OWNERSHIP", "TRANSFER_RESOURCE_OWNERSHIP", "RELOAD_LICENSE", "DRAIN_SERVER", "PURGE_BACKGROUND_JOBS", "CREATE_RETRIEVE_MEMORY_LOG_POLICY", "READ_RETRIEVE_MEMORY_LOG_POLICY", "LIST_RETRIEVE_MEMORY_LOG_POLICY", "DELETE_RETRIEVE_MEMORY_LOG_POLICY", "MANAGE_ACCESS"]).describe("Operation the caller proposes to perform."),
|
|
28356
28364
|
target: external_exports.object({
|
|
28357
|
-
kind: external_exports.enum(["INSTANCE", "USER", "SERVICE_IDENTITY", "SPACE", "API_KEY", "EMBEDDER", "RERANKER", "LLM", "MEMORY", "EXTENSION", "RETRIEVE_MEMORY_LOG_POLICY"]).describe("Concrete target kind."),
|
|
28365
|
+
kind: external_exports.enum(["INSTANCE", "USER", "SERVICE_IDENTITY", "SPACE", "API_KEY", "EMBEDDER", "RERANKER", "LLM", "DECISION_MODEL", "MEMORY", "EXTENSION", "RETRIEVE_MEMORY_LOG_POLICY"]).describe("Concrete target kind."),
|
|
28358
28366
|
resourceId: external_exports.string().describe("Concrete resource UUID; omitted for the singleton INSTANCE target.").optional()
|
|
28359
28367
|
}).passthrough().describe("Target required by the operation: INSTANCE for top-level creates and LIST_API_KEY; parent SPACE for CREATE_MEMORY or LIST_MEMORY; otherwise the concrete resource.")
|
|
28360
28368
|
}).passthrough()).describe("Concrete checks evaluated in request order.")
|
|
@@ -28372,10 +28380,10 @@ function registerTools() {
|
|
|
28372
28380
|
allAuthenticated: external_exports.literal(true).describe("Set to true to address every authenticated principal.").optional()
|
|
28373
28381
|
}).passthrough().describe("Audience receiving the grant."),
|
|
28374
28382
|
rule: external_exports.object({
|
|
28375
|
-
operation: external_exports.enum(["CREATE_USER", "READ_USER", "UPDATE_USER", "DELETE_USER", "LIST_USER", "MANAGE_USER_ENROLLMENT", "CREATE_SERVICE_IDENTITY", "READ_SERVICE_IDENTITY", "UPDATE_SERVICE_IDENTITY", "DELETE_SERVICE_IDENTITY", "LIST_SERVICE_IDENTITY", "CREATE_SPACE", "READ_SPACE", "UPDATE_SPACE", "DELETE_SPACE", "LIST_SPACE", "CREATE_API_KEY", "READ_API_KEY", "UPDATE_API_KEY", "DELETE_API_KEY", "LIST_API_KEY", "CREATE_EMBEDDER", "READ_EMBEDDER", "UPDATE_EMBEDDER", "DELETE_EMBEDDER", "LIST_EMBEDDER", "PING_EMBEDDER", "EXECUTE_EMBEDDER", "READ_EMBEDDER_CREDENTIALS", "CREATE_RERANKER", "READ_RERANKER", "UPDATE_RERANKER", "DELETE_RERANKER", "LIST_RERANKER", "PING_RERANKER", "EXECUTE_RERANKER", "READ_RERANKER_CREDENTIALS", "CREATE_LLM", "READ_LLM", "UPDATE_LLM", "DELETE_LLM", "LIST_LLM", "PING_LLM", "EXECUTE_LLM", "READ_LLM_CREDENTIALS", "PROXY_INFERENCE_TARGET", "OCR_DOCUMENT", "CREATE_MEMORY", "READ_MEMORY", "DELETE_MEMORY", "LIST_MEMORY", "CREATE_EXTENSION", "READ_EXTENSION", "UPDATE_EXTENSION", "DELETE_EXTENSION", "LIST_EXTENSION", "DOWNLOAD_EXTENSION", "READ_INSTANCE", "TRANSFER_INSTANCE_OWNERSHIP", "TRANSFER_RESOURCE_OWNERSHIP", "RELOAD_LICENSE", "DRAIN_SERVER", "PURGE_BACKGROUND_JOBS", "CREATE_RETRIEVE_MEMORY_LOG_POLICY", "READ_RETRIEVE_MEMORY_LOG_POLICY", "LIST_RETRIEVE_MEMORY_LOG_POLICY", "DELETE_RETRIEVE_MEMORY_LOG_POLICY", "MANAGE_ACCESS"]).describe("Protected operation."),
|
|
28383
|
+
operation: external_exports.enum(["CREATE_USER", "READ_USER", "UPDATE_USER", "DELETE_USER", "LIST_USER", "MANAGE_USER_ENROLLMENT", "CREATE_SERVICE_IDENTITY", "READ_SERVICE_IDENTITY", "UPDATE_SERVICE_IDENTITY", "DELETE_SERVICE_IDENTITY", "LIST_SERVICE_IDENTITY", "CREATE_SPACE", "READ_SPACE", "UPDATE_SPACE", "DELETE_SPACE", "LIST_SPACE", "CREATE_API_KEY", "READ_API_KEY", "UPDATE_API_KEY", "DELETE_API_KEY", "LIST_API_KEY", "CREATE_EMBEDDER", "READ_EMBEDDER", "UPDATE_EMBEDDER", "DELETE_EMBEDDER", "LIST_EMBEDDER", "PING_EMBEDDER", "EXECUTE_EMBEDDER", "READ_EMBEDDER_CREDENTIALS", "CREATE_RERANKER", "READ_RERANKER", "UPDATE_RERANKER", "DELETE_RERANKER", "LIST_RERANKER", "PING_RERANKER", "EXECUTE_RERANKER", "READ_RERANKER_CREDENTIALS", "CREATE_LLM", "READ_LLM", "UPDATE_LLM", "DELETE_LLM", "LIST_LLM", "PING_LLM", "EXECUTE_LLM", "READ_LLM_CREDENTIALS", "CREATE_DECISION_MODEL", "READ_DECISION_MODEL", "UPDATE_DECISION_MODEL", "DELETE_DECISION_MODEL", "LIST_DECISION_MODEL", "EXECUTE_DECISION_MODEL", "READ_DECISION_MODEL_CREDENTIALS", "PING_DECISION_MODEL", "PROXY_INFERENCE_TARGET", "OCR_DOCUMENT", "CREATE_MEMORY", "READ_MEMORY", "DELETE_MEMORY", "LIST_MEMORY", "CREATE_EXTENSION", "READ_EXTENSION", "UPDATE_EXTENSION", "DELETE_EXTENSION", "LIST_EXTENSION", "DOWNLOAD_EXTENSION", "READ_INSTANCE", "TRANSFER_INSTANCE_OWNERSHIP", "TRANSFER_RESOURCE_OWNERSHIP", "RELOAD_LICENSE", "DRAIN_SERVER", "PURGE_BACKGROUND_JOBS", "CREATE_RETRIEVE_MEMORY_LOG_POLICY", "READ_RETRIEVE_MEMORY_LOG_POLICY", "LIST_RETRIEVE_MEMORY_LOG_POLICY", "DELETE_RETRIEVE_MEMORY_LOG_POLICY", "MANAGE_ACCESS"]).describe("Protected operation."),
|
|
28376
28384
|
selector: external_exports.enum(["ANY", "OWN", "EXACT", "DIRECT_MEMBERS_OF"]).describe("Resource-selection semantics."),
|
|
28377
28385
|
assignedResource: external_exports.object({
|
|
28378
|
-
kind: external_exports.enum(["INSTANCE", "USER", "SERVICE_IDENTITY", "SPACE", "API_KEY", "EMBEDDER", "RERANKER", "LLM", "MEMORY", "EXTENSION", "RETRIEVE_MEMORY_LOG_POLICY"]).describe("Concrete target kind."),
|
|
28386
|
+
kind: external_exports.enum(["INSTANCE", "USER", "SERVICE_IDENTITY", "SPACE", "API_KEY", "EMBEDDER", "RERANKER", "LLM", "DECISION_MODEL", "MEMORY", "EXTENSION", "RETRIEVE_MEMORY_LOG_POLICY"]).describe("Concrete target kind."),
|
|
28379
28387
|
resourceId: external_exports.string().describe("Concrete resource UUID; omitted for the singleton INSTANCE target.").optional()
|
|
28380
28388
|
}).passthrough().describe("Required exactly for EXACT and DIRECT_MEMBERS_OF selectors.").optional()
|
|
28381
28389
|
}).passthrough().describe("Authorization descriptor to grant.")
|
|
@@ -28413,7 +28421,7 @@ function registerTools() {
|
|
|
28413
28421
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
28414
28422
|
}));
|
|
28415
28423
|
server.tool("goodmem_access_policy_grants_list", "List authorization grants\n\nLists grants attached to one resource. MANAGE_ACCESS is required on that resource; continuation tokens are bound to the caller and filters.", {
|
|
28416
|
-
resource_kind: external_exports.enum(["INSTANCE", "USER", "SERVICE_IDENTITY", "SPACE", "API_KEY", "EMBEDDER", "RERANKER", "LLM", "MEMORY", "EXTENSION", "RETRIEVE_MEMORY_LOG_POLICY"]).describe("Required target resource kind"),
|
|
28424
|
+
resource_kind: external_exports.enum(["INSTANCE", "USER", "SERVICE_IDENTITY", "SPACE", "API_KEY", "EMBEDDER", "RERANKER", "LLM", "DECISION_MODEL", "MEMORY", "EXTENSION", "RETRIEVE_MEMORY_LOG_POLICY"]).describe("Required target resource kind"),
|
|
28417
28425
|
resource_id: external_exports.string().describe("Required target UUID except when resource_kind is INSTANCE").optional(),
|
|
28418
28426
|
include_revoked: external_exports.boolean().describe("Include revoked history").optional(),
|
|
28419
28427
|
max_results: external_exports.number().int().describe("Page size; 0 or omission uses the default of 50, maximum 1,000").optional(),
|
|
@@ -28644,10 +28652,10 @@ function registerTools() {
|
|
|
28644
28652
|
subject_principal_id: external_exports.string().describe("Principal authenticated by this key. Omit to use the authenticated principal.").optional(),
|
|
28645
28653
|
authority_mode: external_exports.enum(["INHERIT_SUBJECT", "SCOPED"]).describe("Authority mode. Omit to create a self-issued human key that inherits live authority. A scoped issuing credential may create only SCOPED children.").optional(),
|
|
28646
28654
|
ceiling: external_exports.array(external_exports.object({
|
|
28647
|
-
operation: external_exports.enum(["CREATE_USER", "READ_USER", "UPDATE_USER", "DELETE_USER", "LIST_USER", "MANAGE_USER_ENROLLMENT", "CREATE_SERVICE_IDENTITY", "READ_SERVICE_IDENTITY", "UPDATE_SERVICE_IDENTITY", "DELETE_SERVICE_IDENTITY", "LIST_SERVICE_IDENTITY", "CREATE_SPACE", "READ_SPACE", "UPDATE_SPACE", "DELETE_SPACE", "LIST_SPACE", "CREATE_API_KEY", "READ_API_KEY", "UPDATE_API_KEY", "DELETE_API_KEY", "LIST_API_KEY", "CREATE_EMBEDDER", "READ_EMBEDDER", "UPDATE_EMBEDDER", "DELETE_EMBEDDER", "LIST_EMBEDDER", "PING_EMBEDDER", "EXECUTE_EMBEDDER", "READ_EMBEDDER_CREDENTIALS", "CREATE_RERANKER", "READ_RERANKER", "UPDATE_RERANKER", "DELETE_RERANKER", "LIST_RERANKER", "PING_RERANKER", "EXECUTE_RERANKER", "READ_RERANKER_CREDENTIALS", "CREATE_LLM", "READ_LLM", "UPDATE_LLM", "DELETE_LLM", "LIST_LLM", "PING_LLM", "EXECUTE_LLM", "READ_LLM_CREDENTIALS", "PROXY_INFERENCE_TARGET", "OCR_DOCUMENT", "CREATE_MEMORY", "READ_MEMORY", "DELETE_MEMORY", "LIST_MEMORY", "CREATE_EXTENSION", "READ_EXTENSION", "UPDATE_EXTENSION", "DELETE_EXTENSION", "LIST_EXTENSION", "DOWNLOAD_EXTENSION", "READ_INSTANCE", "TRANSFER_INSTANCE_OWNERSHIP", "TRANSFER_RESOURCE_OWNERSHIP", "RELOAD_LICENSE", "DRAIN_SERVER", "PURGE_BACKGROUND_JOBS", "CREATE_RETRIEVE_MEMORY_LOG_POLICY", "READ_RETRIEVE_MEMORY_LOG_POLICY", "LIST_RETRIEVE_MEMORY_LOG_POLICY", "DELETE_RETRIEVE_MEMORY_LOG_POLICY", "MANAGE_ACCESS"]).describe("Protected operation."),
|
|
28655
|
+
operation: external_exports.enum(["CREATE_USER", "READ_USER", "UPDATE_USER", "DELETE_USER", "LIST_USER", "MANAGE_USER_ENROLLMENT", "CREATE_SERVICE_IDENTITY", "READ_SERVICE_IDENTITY", "UPDATE_SERVICE_IDENTITY", "DELETE_SERVICE_IDENTITY", "LIST_SERVICE_IDENTITY", "CREATE_SPACE", "READ_SPACE", "UPDATE_SPACE", "DELETE_SPACE", "LIST_SPACE", "CREATE_API_KEY", "READ_API_KEY", "UPDATE_API_KEY", "DELETE_API_KEY", "LIST_API_KEY", "CREATE_EMBEDDER", "READ_EMBEDDER", "UPDATE_EMBEDDER", "DELETE_EMBEDDER", "LIST_EMBEDDER", "PING_EMBEDDER", "EXECUTE_EMBEDDER", "READ_EMBEDDER_CREDENTIALS", "CREATE_RERANKER", "READ_RERANKER", "UPDATE_RERANKER", "DELETE_RERANKER", "LIST_RERANKER", "PING_RERANKER", "EXECUTE_RERANKER", "READ_RERANKER_CREDENTIALS", "CREATE_LLM", "READ_LLM", "UPDATE_LLM", "DELETE_LLM", "LIST_LLM", "PING_LLM", "EXECUTE_LLM", "READ_LLM_CREDENTIALS", "CREATE_DECISION_MODEL", "READ_DECISION_MODEL", "UPDATE_DECISION_MODEL", "DELETE_DECISION_MODEL", "LIST_DECISION_MODEL", "EXECUTE_DECISION_MODEL", "READ_DECISION_MODEL_CREDENTIALS", "PING_DECISION_MODEL", "PROXY_INFERENCE_TARGET", "OCR_DOCUMENT", "CREATE_MEMORY", "READ_MEMORY", "DELETE_MEMORY", "LIST_MEMORY", "CREATE_EXTENSION", "READ_EXTENSION", "UPDATE_EXTENSION", "DELETE_EXTENSION", "LIST_EXTENSION", "DOWNLOAD_EXTENSION", "READ_INSTANCE", "TRANSFER_INSTANCE_OWNERSHIP", "TRANSFER_RESOURCE_OWNERSHIP", "RELOAD_LICENSE", "DRAIN_SERVER", "PURGE_BACKGROUND_JOBS", "CREATE_RETRIEVE_MEMORY_LOG_POLICY", "READ_RETRIEVE_MEMORY_LOG_POLICY", "LIST_RETRIEVE_MEMORY_LOG_POLICY", "DELETE_RETRIEVE_MEMORY_LOG_POLICY", "MANAGE_ACCESS"]).describe("Protected operation."),
|
|
28648
28656
|
selector: external_exports.enum(["ANY", "OWN", "EXACT", "DIRECT_MEMBERS_OF"]).describe("Resource-selection semantics."),
|
|
28649
28657
|
assignedResource: external_exports.object({
|
|
28650
|
-
kind: external_exports.enum(["INSTANCE", "USER", "SERVICE_IDENTITY", "SPACE", "API_KEY", "EMBEDDER", "RERANKER", "LLM", "MEMORY", "EXTENSION", "RETRIEVE_MEMORY_LOG_POLICY"]).describe("Concrete target kind."),
|
|
28658
|
+
kind: external_exports.enum(["INSTANCE", "USER", "SERVICE_IDENTITY", "SPACE", "API_KEY", "EMBEDDER", "RERANKER", "LLM", "DECISION_MODEL", "MEMORY", "EXTENSION", "RETRIEVE_MEMORY_LOG_POLICY"]).describe("Concrete target kind."),
|
|
28651
28659
|
resourceId: external_exports.string().describe("Concrete resource UUID; omitted for the singleton INSTANCE target.").optional()
|
|
28652
28660
|
}).passthrough().describe("Required exactly for EXACT and DIRECT_MEMBERS_OF selectors.").optional()
|
|
28653
28661
|
}).passthrough()).describe("Immutable authorization ceiling. Required and nonempty for SCOPED; omitted for INHERIT_SUBJECT, with at most 1,000 rules. Every rule must be covered by both the subject's live authority and the issuing credential's effective authority.").optional(),
|
|
@@ -28736,6 +28744,291 @@ function registerTools() {
|
|
|
28736
28744
|
const result = await callApi("PUT", `/v1/apikeys/${encodeURIComponent(String(args.id))}`, body);
|
|
28737
28745
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
28738
28746
|
}));
|
|
28747
|
+
server.tool("goodmem_decision_models_create", "Create a decision model\n\nSaves the connection settings for a decision model. Requires CREATE_DECISION_MODEL for the new model and its owner. You can register the same provider connection more than once, but each registration must have a unique UUID. Credentials are omitted from the response.", {
|
|
28748
|
+
display_name: external_exports.string().describe("Name shown in the console and CLI."),
|
|
28749
|
+
description: external_exports.string().describe("Optional description.").optional(),
|
|
28750
|
+
provider_type: external_exports.enum(["JEV", "LAYA", "CLEF"]).describe("Provider used by this model. This cannot be changed after creation."),
|
|
28751
|
+
endpoint_url: external_exports.string().describe("Base URL of the provider, starting with http:// or https://. Do not include a query string, fragment, or username and password."),
|
|
28752
|
+
api_path: external_exports.string().describe("Path appended to endpoint_url when sending a request. Jev and Laya use /v1/systemone if omitted. Clef requires the path for your account and model.").optional(),
|
|
28753
|
+
model_identifier: external_exports.string().describe("Model identifier accepted by the provider."),
|
|
28754
|
+
credentials: external_exports.object({
|
|
28755
|
+
kind: external_exports.enum(["CREDENTIAL_KIND_UNSPECIFIED", "CREDENTIAL_KIND_API_KEY", "CREDENTIAL_KIND_GCP_ADC"]).describe("Selected credential strategy"),
|
|
28756
|
+
apiKey: external_exports.object({
|
|
28757
|
+
inlineSecret: external_exports.string().describe("Secret stored directly in GoodMem (mutually exclusive with secretRef)").optional(),
|
|
28758
|
+
secretRef: external_exports.object({
|
|
28759
|
+
uri: external_exports.string().describe("URI identifying where the secret can be resolved (e.g., vault://, env://)"),
|
|
28760
|
+
hints: external_exports.record(external_exports.string(), external_exports.string()).describe('Optional metadata to help resolvers decode the secret (e.g., {"encoding":"base64"})').optional()
|
|
28761
|
+
}).passthrough().describe("Reference to an external secret manager entry (mutually exclusive with inlineSecret)").optional(),
|
|
28762
|
+
headerName: external_exports.string().describe("Desired HTTP header to carry the credential (defaults to Authorization)").optional(),
|
|
28763
|
+
prefix: external_exports.string().describe('Optional prefix prepended to the secret (e.g., "Bearer ")').optional()
|
|
28764
|
+
}).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_API_KEY").optional(),
|
|
28765
|
+
gcpAdc: external_exports.object({
|
|
28766
|
+
scopes: external_exports.array(external_exports.string()).describe("Additional OAuth scopes. Empty list falls back to the default cloud-platform scope.").optional(),
|
|
28767
|
+
quotaProjectId: external_exports.string().describe("Optional quota project used for billing").optional()
|
|
28768
|
+
}).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_GCP_ADC").optional(),
|
|
28769
|
+
labels: external_exports.record(external_exports.string(), external_exports.string()).describe('Optional annotations to aid operators (e.g., "owner=vertex")').optional()
|
|
28770
|
+
}).passthrough().describe("API key for the provider, supplied in credentials.apiKey.inlineSecret with kind set to CREDENTIAL_KIND_API_KEY. May be omitted for Laya when the endpoint allows anonymous access.").optional(),
|
|
28771
|
+
configuration: external_exports.record(external_exports.string(), external_exports.any()).describe("Provider settings. Supported keys are image_preview (Jev only), timeout_millis, and max_response_bytes. These settings cannot change which features the model supports.").optional(),
|
|
28772
|
+
labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Labels for filtering and organization.").optional(),
|
|
28773
|
+
version: external_exports.string().describe("Optional version label.").optional(),
|
|
28774
|
+
monitoring_endpoint: external_exports.string().describe("Optional URL for the provider health or metrics endpoint. Must start with http:// or https://.").optional(),
|
|
28775
|
+
owner_id: external_exports.string().describe("UUID of the principal that will own the model. If omitted, the authenticated principal becomes the owner.").optional(),
|
|
28776
|
+
decision_model_id: external_exports.string().describe("Optional UUID for the new model. GoodMem generates one if omitted. A UUID that is already in use returns 409; reusing connection settings is allowed.").optional()
|
|
28777
|
+
}, { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }, async (args) => toolRequest(async () => {
|
|
28778
|
+
const body = {};
|
|
28779
|
+
if (args.display_name !== void 0)
|
|
28780
|
+
body["displayName"] = args.display_name;
|
|
28781
|
+
if (args.description !== void 0)
|
|
28782
|
+
body["description"] = args.description;
|
|
28783
|
+
if (args.provider_type !== void 0)
|
|
28784
|
+
body["providerType"] = args.provider_type;
|
|
28785
|
+
if (args.endpoint_url !== void 0)
|
|
28786
|
+
body["endpointUrl"] = args.endpoint_url;
|
|
28787
|
+
if (args.api_path !== void 0)
|
|
28788
|
+
body["apiPath"] = args.api_path;
|
|
28789
|
+
if (args.model_identifier !== void 0)
|
|
28790
|
+
body["modelIdentifier"] = args.model_identifier;
|
|
28791
|
+
if (args.credentials !== void 0)
|
|
28792
|
+
body["credentials"] = args.credentials;
|
|
28793
|
+
if (args.configuration !== void 0)
|
|
28794
|
+
body["configuration"] = args.configuration;
|
|
28795
|
+
if (args.labels !== void 0)
|
|
28796
|
+
body["labels"] = args.labels;
|
|
28797
|
+
if (args.version !== void 0)
|
|
28798
|
+
body["version"] = args.version;
|
|
28799
|
+
if (args.monitoring_endpoint !== void 0)
|
|
28800
|
+
body["monitoringEndpoint"] = args.monitoring_endpoint;
|
|
28801
|
+
if (args.owner_id !== void 0)
|
|
28802
|
+
body["ownerId"] = args.owner_id;
|
|
28803
|
+
if (args.decision_model_id !== void 0)
|
|
28804
|
+
body["decisionModelId"] = args.decision_model_id;
|
|
28805
|
+
const result = await callApi("POST", `/v1/decision-models`, body);
|
|
28806
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
28807
|
+
}));
|
|
28808
|
+
server.tool("goodmem_decision_models_decide", "Request decisions from a model\n\nSends the supplied questions and content to the registered provider. Requires READ_DECISION_MODEL and EXECUTE_DECISION_MODEL. Each request calls the provider once and may incur charges, so do not retry automatically. GoodMem does not store the input or answers. Unsupported questions or media return 400. Problems with the stored provider credentials or settings return 412.", {
|
|
28809
|
+
id: external_exports.string().describe("UUID of the decision model"),
|
|
28810
|
+
state: external_exports.object({
|
|
28811
|
+
jsonValue: external_exports.string().describe('A complete JSON value encoded as a string. For example, {"jsonValue":"null"} represents JSON null. For ordinary text, use the text field.').optional(),
|
|
28812
|
+
text: external_exports.string().describe("Ordinary text without JSON quoting.").optional(),
|
|
28813
|
+
objectValue: external_exports.object({
|
|
28814
|
+
fields: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).describe("Content keyed by field name.")
|
|
28815
|
+
}).passthrough().describe("Object whose fields can contain nested media.").optional(),
|
|
28816
|
+
arrayValue: external_exports.object({
|
|
28817
|
+
values: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).describe("Ordered content elements.")
|
|
28818
|
+
}).passthrough().describe("Ordered array whose elements can contain nested media.").optional(),
|
|
28819
|
+
media: external_exports.object({
|
|
28820
|
+
kind: external_exports.enum(["IMAGE", "AUDIO", "VIDEO"]).describe("Media category."),
|
|
28821
|
+
mimeType: external_exports.string().describe("Declared MIME type."),
|
|
28822
|
+
data: external_exports.any().describe("Base64-encoded file bytes.")
|
|
28823
|
+
}).passthrough().describe("Media file included in the request. GoodMem does not download media from URLs.").optional()
|
|
28824
|
+
}).passthrough().describe("Content evaluated by all questions."),
|
|
28825
|
+
attachments: external_exports.array(external_exports.object({
|
|
28826
|
+
kind: external_exports.enum(["IMAGE", "AUDIO", "VIDEO"]).describe("Media category."),
|
|
28827
|
+
mimeType: external_exports.string().describe("Declared MIME type."),
|
|
28828
|
+
data: external_exports.any().describe("Base64-encoded file bytes.")
|
|
28829
|
+
}).passthrough()).describe("Media files included with the request. Their order is preserved within each media type.").optional(),
|
|
28830
|
+
questions: external_exports.record(external_exports.string(), external_exports.object({
|
|
28831
|
+
instructions: external_exports.object({
|
|
28832
|
+
jsonValue: external_exports.string().describe('A complete JSON value encoded as a string. For example, {"jsonValue":"null"} represents JSON null. For ordinary text, use the text field.').optional(),
|
|
28833
|
+
text: external_exports.string().describe("Ordinary text without JSON quoting.").optional(),
|
|
28834
|
+
objectValue: external_exports.object({
|
|
28835
|
+
fields: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).describe("Content keyed by field name.")
|
|
28836
|
+
}).passthrough().describe("Object whose fields can contain nested media.").optional(),
|
|
28837
|
+
arrayValue: external_exports.object({
|
|
28838
|
+
values: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).describe("Ordered content elements.")
|
|
28839
|
+
}).passthrough().describe("Ordered array whose elements can contain nested media.").optional(),
|
|
28840
|
+
media: external_exports.object({
|
|
28841
|
+
kind: external_exports.enum(["IMAGE", "AUDIO", "VIDEO"]).describe("Media category."),
|
|
28842
|
+
mimeType: external_exports.string().describe("Declared MIME type."),
|
|
28843
|
+
data: external_exports.any().describe("Base64-encoded file bytes.")
|
|
28844
|
+
}).passthrough().describe("Media file included in the request. GoodMem does not download media from URLs.").optional()
|
|
28845
|
+
}).passthrough().describe('Instructions for this question. Clef requires nonblank text, an object, or an array. Other providers allow omission; to supply JSON null, use {"jsonValue":"null"}.').optional(),
|
|
28846
|
+
choice: external_exports.object({
|
|
28847
|
+
options: external_exports.record(external_exports.string(), external_exports.object({
|
|
28848
|
+
jsonValue: external_exports.string().describe('A complete JSON value encoded as a string. For example, {"jsonValue":"null"} represents JSON null. For ordinary text, use the text field.').optional(),
|
|
28849
|
+
text: external_exports.string().describe("Ordinary text without JSON quoting.").optional(),
|
|
28850
|
+
objectValue: external_exports.object({
|
|
28851
|
+
fields: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).describe("Content keyed by field name.")
|
|
28852
|
+
}).passthrough().describe("Object whose fields can contain nested media.").optional(),
|
|
28853
|
+
arrayValue: external_exports.object({
|
|
28854
|
+
values: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).describe("Ordered content elements.")
|
|
28855
|
+
}).passthrough().describe("Ordered array whose elements can contain nested media.").optional(),
|
|
28856
|
+
media: external_exports.object({
|
|
28857
|
+
kind: external_exports.enum(["IMAGE", "AUDIO", "VIDEO"]).describe("Media category."),
|
|
28858
|
+
mimeType: external_exports.string().describe("Declared MIME type."),
|
|
28859
|
+
data: external_exports.any().describe("Base64-encoded file bytes.")
|
|
28860
|
+
}).passthrough().describe("Media file included in the request. GoodMem does not download media from URLs.").optional()
|
|
28861
|
+
}).passthrough()).describe("Option identifiers and descriptions.")
|
|
28862
|
+
}).passthrough().describe("Choose one labeled option.").optional(),
|
|
28863
|
+
score: external_exports.object({
|
|
28864
|
+
levels: external_exports.array(external_exports.object({
|
|
28865
|
+
jsonValue: external_exports.string().describe('A complete JSON value encoded as a string. For example, {"jsonValue":"null"} represents JSON null. For ordinary text, use the text field.').optional(),
|
|
28866
|
+
text: external_exports.string().describe("Ordinary text without JSON quoting.").optional(),
|
|
28867
|
+
objectValue: external_exports.object({
|
|
28868
|
+
fields: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).describe("Content keyed by field name.")
|
|
28869
|
+
}).passthrough().describe("Object whose fields can contain nested media.").optional(),
|
|
28870
|
+
arrayValue: external_exports.object({
|
|
28871
|
+
values: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).describe("Ordered content elements.")
|
|
28872
|
+
}).passthrough().describe("Ordered array whose elements can contain nested media.").optional(),
|
|
28873
|
+
media: external_exports.object({
|
|
28874
|
+
kind: external_exports.enum(["IMAGE", "AUDIO", "VIDEO"]).describe("Media category."),
|
|
28875
|
+
mimeType: external_exports.string().describe("Declared MIME type."),
|
|
28876
|
+
data: external_exports.any().describe("Base64-encoded file bytes.")
|
|
28877
|
+
}).passthrough().describe("Media file included in the request. GoodMem does not download media from URLs.").optional()
|
|
28878
|
+
}).passthrough()).describe("Descriptions of the score levels, ordered from lowest to highest. The first level has index 0.")
|
|
28879
|
+
}).passthrough().describe("Score the content against a list of levels ordered from lowest to highest.").optional(),
|
|
28880
|
+
noul: external_exports.object({
|
|
28881
|
+
trueCriterion: external_exports.object({
|
|
28882
|
+
jsonValue: external_exports.string().describe('A complete JSON value encoded as a string. For example, {"jsonValue":"null"} represents JSON null. For ordinary text, use the text field.').optional(),
|
|
28883
|
+
text: external_exports.string().describe("Ordinary text without JSON quoting.").optional(),
|
|
28884
|
+
objectValue: external_exports.object({
|
|
28885
|
+
fields: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).describe("Content keyed by field name.")
|
|
28886
|
+
}).passthrough().describe("Object whose fields can contain nested media.").optional(),
|
|
28887
|
+
arrayValue: external_exports.object({
|
|
28888
|
+
values: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).describe("Ordered content elements.")
|
|
28889
|
+
}).passthrough().describe("Ordered array whose elements can contain nested media.").optional(),
|
|
28890
|
+
media: external_exports.object({
|
|
28891
|
+
kind: external_exports.enum(["IMAGE", "AUDIO", "VIDEO"]).describe("Media category."),
|
|
28892
|
+
mimeType: external_exports.string().describe("Declared MIME type."),
|
|
28893
|
+
data: external_exports.any().describe("Base64-encoded file bytes.")
|
|
28894
|
+
}).passthrough().describe("Media file included in the request. GoodMem does not download media from URLs.").optional()
|
|
28895
|
+
}).passthrough().describe("Description of the true outcome.").optional(),
|
|
28896
|
+
falseCriterion: external_exports.object({
|
|
28897
|
+
jsonValue: external_exports.string().describe('A complete JSON value encoded as a string. For example, {"jsonValue":"null"} represents JSON null. For ordinary text, use the text field.').optional(),
|
|
28898
|
+
text: external_exports.string().describe("Ordinary text without JSON quoting.").optional(),
|
|
28899
|
+
objectValue: external_exports.object({
|
|
28900
|
+
fields: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown())).describe("Content keyed by field name.")
|
|
28901
|
+
}).passthrough().describe("Object whose fields can contain nested media.").optional(),
|
|
28902
|
+
arrayValue: external_exports.object({
|
|
28903
|
+
values: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).describe("Ordered content elements.")
|
|
28904
|
+
}).passthrough().describe("Ordered array whose elements can contain nested media.").optional(),
|
|
28905
|
+
media: external_exports.object({
|
|
28906
|
+
kind: external_exports.enum(["IMAGE", "AUDIO", "VIDEO"]).describe("Media category."),
|
|
28907
|
+
mimeType: external_exports.string().describe("Declared MIME type."),
|
|
28908
|
+
data: external_exports.any().describe("Base64-encoded file bytes.")
|
|
28909
|
+
}).passthrough().describe("Media file included in the request. GoodMem does not download media from URLs.").optional()
|
|
28910
|
+
}).passthrough().describe("Description of the false outcome.").optional()
|
|
28911
|
+
}).passthrough().describe("Estimate the probability that a statement is true.").optional(),
|
|
28912
|
+
box: external_exports.any().describe("Locate an object in an image. A returned box does not guarantee that the object is present.").optional()
|
|
28913
|
+
}).passthrough()).describe("Questions keyed by names that you choose. The model must support each question type and its media.")
|
|
28914
|
+
}, { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }, async (args) => toolRequest(async () => {
|
|
28915
|
+
if (typeof args.id !== "string" || args.id === "") {
|
|
28916
|
+
throw new Error("'id' must be a non-empty string");
|
|
28917
|
+
}
|
|
28918
|
+
const body = {};
|
|
28919
|
+
if (args.state !== void 0)
|
|
28920
|
+
body["state"] = args.state;
|
|
28921
|
+
if (args.attachments !== void 0)
|
|
28922
|
+
body["attachments"] = args.attachments;
|
|
28923
|
+
if (args.questions !== void 0)
|
|
28924
|
+
body["questions"] = args.questions;
|
|
28925
|
+
const result = await callApi("POST", `/v1/decision-models/${encodeURIComponent(String(args.id))}/decide`, body);
|
|
28926
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
28927
|
+
}));
|
|
28928
|
+
server.tool("goodmem_decision_models_delete", "Delete a decision model\n\nRemoves the decision model from GoodMem. Requires DELETE_DECISION_MODEL. This does not contact or delete the model at the provider. Returns 404 if the registration has already been deleted.", {
|
|
28929
|
+
id: external_exports.string().describe("UUID of the decision model")
|
|
28930
|
+
}, { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false }, async (args) => toolRequest(async () => {
|
|
28931
|
+
if (typeof args.id !== "string" || args.id === "") {
|
|
28932
|
+
throw new Error("'id' must be a non-empty string");
|
|
28933
|
+
}
|
|
28934
|
+
await callApi("DELETE", `/v1/decision-models/${encodeURIComponent(String(args.id))}`, void 0);
|
|
28935
|
+
return { content: [{ type: "text", text: "Deleted successfully." }] };
|
|
28936
|
+
}));
|
|
28937
|
+
server.tool("goodmem_decision_models_get", "Get a decision model\n\nReturns the connection settings and supported features of a decision model. Requires READ_DECISION_MODEL. Set include_credentials=true to include stored credentials; this also requires READ_DECISION_MODEL_CREDENTIALS. Returns 404 if the model does not exist, or 403 if it exists but you lack permission.", {
|
|
28938
|
+
id: external_exports.string().describe("UUID of the decision model"),
|
|
28939
|
+
include_credentials: external_exports.boolean().describe("Include stored credentials. Requires READ_DECISION_MODEL_CREDENTIALS in addition to READ_DECISION_MODEL.").optional()
|
|
28940
|
+
}, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async (args) => toolRequest(async () => {
|
|
28941
|
+
if (typeof args.id !== "string" || args.id === "") {
|
|
28942
|
+
throw new Error("'id' must be a non-empty string");
|
|
28943
|
+
}
|
|
28944
|
+
const query = {};
|
|
28945
|
+
if (args.include_credentials !== void 0)
|
|
28946
|
+
query["includeCredentials"] = String(args.include_credentials);
|
|
28947
|
+
const result = await callApi("GET", `/v1/decision-models/${encodeURIComponent(String(args.id))}`, void 0, query);
|
|
28948
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
28949
|
+
}));
|
|
28950
|
+
server.tool("goodmem_decision_models_list", "List decision models\n\nLists decision models that you have permission to read. Requires LIST_DECISION_MODEL for the instance and READ_DECISION_MODEL for each returned model. Results are ordered by creation time, newest first, with UUID descending to break ties. Credentials are omitted.\n\nLABEL FILTERS: Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production).", {
|
|
28951
|
+
owner_id: external_exports.string().describe("Return only decision models owned by this principal UUID.").optional(),
|
|
28952
|
+
provider_type: external_exports.enum(["JEV", "LAYA", "CLEF"]).describe("Return only decision models that use this provider.").optional(),
|
|
28953
|
+
page_size: external_exports.number().int().describe("Maximum number of models to return, from 1 to 1000. Omit this parameter or use 0 for 50.").optional(),
|
|
28954
|
+
page_token: external_exports.string().describe("Use nextPageToken from the previous response to request the next page. Keep the filters and page_size unchanged.").optional(),
|
|
28955
|
+
label: external_exports.record(external_exports.string(), external_exports.string()).describe("Filter by label. Each key-value pair is sent as label[key]=value query parameter.").optional()
|
|
28956
|
+
}, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async (args) => toolRequest(async () => {
|
|
28957
|
+
const query = {};
|
|
28958
|
+
if (args.owner_id !== void 0)
|
|
28959
|
+
query["ownerId"] = String(args.owner_id);
|
|
28960
|
+
if (args.provider_type !== void 0)
|
|
28961
|
+
query["providerType"] = String(args.provider_type);
|
|
28962
|
+
if (args.page_size !== void 0)
|
|
28963
|
+
query["pageSize"] = String(args.page_size);
|
|
28964
|
+
if (args.page_token !== void 0)
|
|
28965
|
+
query["pageToken"] = String(args.page_token);
|
|
28966
|
+
if (args.label) {
|
|
28967
|
+
for (const [k, v] of Object.entries(args.label))
|
|
28968
|
+
query[`label[${k}]`] = v;
|
|
28969
|
+
}
|
|
28970
|
+
const result = await callApi("GET", `/v1/decision-models`, void 0, query);
|
|
28971
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
28972
|
+
}));
|
|
28973
|
+
server.tool("goodmem_decision_models_update", "Update a decision model\n\nChanges only the fields supplied in the request. Requires UPDATE_DECISION_MODEL. Send an empty string to clear description, version, or monitoring_endpoint. A supplied configuration replaces all existing settings; use {} to reset them to defaults. The provider and owner cannot be changed. Credentials are omitted from the response.", {
|
|
28974
|
+
id: external_exports.string().describe("UUID of the decision model"),
|
|
28975
|
+
display_name: external_exports.string().describe("Name shown in the console and CLI.").optional(),
|
|
28976
|
+
description: external_exports.string().describe("Description of the model. Send an empty string to clear it, or omit it to keep the current value.").optional(),
|
|
28977
|
+
endpoint_url: external_exports.string().describe("Base URL of the provider, starting with http:// or https://. Do not include a query string, fragment, or username and password.").optional(),
|
|
28978
|
+
api_path: external_exports.string().describe("Path appended to endpoint_url when sending a request. Omit it to keep the current path. An empty string resets Jev and Laya to /v1/systemone; Clef requires the path for your account and model.").optional(),
|
|
28979
|
+
model_identifier: external_exports.string().describe("Model identifier accepted by the provider.").optional(),
|
|
28980
|
+
credentials: external_exports.object({
|
|
28981
|
+
kind: external_exports.enum(["CREDENTIAL_KIND_UNSPECIFIED", "CREDENTIAL_KIND_API_KEY", "CREDENTIAL_KIND_GCP_ADC"]).describe("Selected credential strategy"),
|
|
28982
|
+
apiKey: external_exports.object({
|
|
28983
|
+
inlineSecret: external_exports.string().describe("Secret stored directly in GoodMem (mutually exclusive with secretRef)").optional(),
|
|
28984
|
+
secretRef: external_exports.object({
|
|
28985
|
+
uri: external_exports.string().describe("URI identifying where the secret can be resolved (e.g., vault://, env://)"),
|
|
28986
|
+
hints: external_exports.record(external_exports.string(), external_exports.string()).describe('Optional metadata to help resolvers decode the secret (e.g., {"encoding":"base64"})').optional()
|
|
28987
|
+
}).passthrough().describe("Reference to an external secret manager entry (mutually exclusive with inlineSecret)").optional(),
|
|
28988
|
+
headerName: external_exports.string().describe("Desired HTTP header to carry the credential (defaults to Authorization)").optional(),
|
|
28989
|
+
prefix: external_exports.string().describe('Optional prefix prepended to the secret (e.g., "Bearer ")').optional()
|
|
28990
|
+
}).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_API_KEY").optional(),
|
|
28991
|
+
gcpAdc: external_exports.object({
|
|
28992
|
+
scopes: external_exports.array(external_exports.string()).describe("Additional OAuth scopes. Empty list falls back to the default cloud-platform scope.").optional(),
|
|
28993
|
+
quotaProjectId: external_exports.string().describe("Optional quota project used for billing").optional()
|
|
28994
|
+
}).passthrough().describe("Configuration when kind is CREDENTIAL_KIND_GCP_ADC").optional(),
|
|
28995
|
+
labels: external_exports.record(external_exports.string(), external_exports.string()).describe('Optional annotations to aid operators (e.g., "owner=vertex")').optional()
|
|
28996
|
+
}).passthrough().describe("Replacement API key for the provider, supplied in credentials.apiKey.inlineSecret with kind set to CREDENTIAL_KIND_API_KEY. Omit credentials to keep the current key.").optional(),
|
|
28997
|
+
configuration: external_exports.record(external_exports.string(), external_exports.any()).describe("Replacement provider settings. Supported keys are image_preview (Jev only), timeout_millis, and max_response_bytes. Send {} to reset all settings to defaults, or omit configuration to keep the current settings.").optional(),
|
|
28998
|
+
version: external_exports.string().describe("Version label. Send an empty string to clear it, or omit it to keep the current value.").optional(),
|
|
28999
|
+
monitoring_endpoint: external_exports.string().describe("URL for the provider health or metrics endpoint. Must start with http:// or https://. Send an empty string to clear it, or omit it to keep the current value.").optional(),
|
|
29000
|
+
replace_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Replace all labels with this map. Send {} to remove all labels. Do not combine with merge_labels.").optional(),
|
|
29001
|
+
merge_labels: external_exports.record(external_exports.string(), external_exports.string()).describe("Add labels and replace the values of matching keys. Other labels are unchanged. Do not combine with replace_labels.").optional()
|
|
29002
|
+
}, { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false }, async (args) => toolRequest(async () => {
|
|
29003
|
+
if (typeof args.id !== "string" || args.id === "") {
|
|
29004
|
+
throw new Error("'id' must be a non-empty string");
|
|
29005
|
+
}
|
|
29006
|
+
const body = {};
|
|
29007
|
+
if (args.display_name !== void 0)
|
|
29008
|
+
body["displayName"] = args.display_name;
|
|
29009
|
+
if (args.description !== void 0)
|
|
29010
|
+
body["description"] = args.description;
|
|
29011
|
+
if (args.endpoint_url !== void 0)
|
|
29012
|
+
body["endpointUrl"] = args.endpoint_url;
|
|
29013
|
+
if (args.api_path !== void 0)
|
|
29014
|
+
body["apiPath"] = args.api_path;
|
|
29015
|
+
if (args.model_identifier !== void 0)
|
|
29016
|
+
body["modelIdentifier"] = args.model_identifier;
|
|
29017
|
+
if (args.credentials !== void 0)
|
|
29018
|
+
body["credentials"] = args.credentials;
|
|
29019
|
+
if (args.configuration !== void 0)
|
|
29020
|
+
body["configuration"] = args.configuration;
|
|
29021
|
+
if (args.version !== void 0)
|
|
29022
|
+
body["version"] = args.version;
|
|
29023
|
+
if (args.monitoring_endpoint !== void 0)
|
|
29024
|
+
body["monitoringEndpoint"] = args.monitoring_endpoint;
|
|
29025
|
+
if (args.replace_labels !== void 0)
|
|
29026
|
+
body["replaceLabels"] = args.replace_labels;
|
|
29027
|
+
if (args.merge_labels !== void 0)
|
|
29028
|
+
body["mergeLabels"] = args.merge_labels;
|
|
29029
|
+
const result = await callApi("PUT", `/v1/decision-models/${encodeURIComponent(String(args.id))}`, body);
|
|
29030
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
29031
|
+
}));
|
|
28739
29032
|
server.tool("goodmem_embedders_create", "Create a new embedder\n\nCreates an embedder configuration for use with memory spaces. If owner_id is omitted, the authenticated principal becomes the owner; CREATE_EMBEDDER is evaluated against that proposed embedder and owner. Returns 409 when an equivalent embedder configuration already exists for the owner. See the [embedder provider guide](https://docs.goodmem.ai/docs/how-to/endpoint-registration) for provider-specific configuration.", {
|
|
28740
29033
|
display_name: external_exports.string().describe("User-facing name of the embedder"),
|
|
28741
29034
|
description: external_exports.string().describe("Description of the embedder").optional(),
|
|
@@ -29532,9 +29825,9 @@ function registerTools() {
|
|
|
29532
29825
|
const result = await callApi("POST", `/v1/ocr:document`, body);
|
|
29533
29826
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
29534
29827
|
}));
|
|
29535
|
-
server.tool("goodmem_ping_once", "Run a single ping probe\n\nRuns a single ping probe and returns the probe result. Requires both the target-specific PING operation and its corresponding EXECUTE operation: PING_EMBEDDER plus EXECUTE_EMBEDDER, PING_RERANKER plus EXECUTE_RERANKER, or PING_LLM plus EXECUTE_LLM.", {
|
|
29828
|
+
server.tool("goodmem_ping_once", "Run a single ping probe\n\nRuns a single ping probe and returns the probe result. Requires both the target-specific PING operation and its corresponding EXECUTE operation: PING_EMBEDDER plus EXECUTE_EMBEDDER, PING_RERANKER plus EXECUTE_RERANKER, or PING_LLM plus EXECUTE_LLM. Decision models require READ_DECISION_MODEL, PING_DECISION_MODEL, and EXECUTE_DECISION_MODEL. Probes make real provider calls and may incur charges.", {
|
|
29536
29829
|
target_id: external_exports.string().describe("Target resource ID (UUID)"),
|
|
29537
|
-
target_type_hint: external_exports.enum(["TARGET_TYPE_UNSPECIFIED", "EMBEDDER", "RERANKER", "LLM"]).describe("Optional hint for the target resource type").optional(),
|
|
29830
|
+
target_type_hint: external_exports.enum(["TARGET_TYPE_UNSPECIFIED", "EMBEDDER", "RERANKER", "LLM", "DECISION_MODEL"]).describe("Optional hint for the target resource type").optional(),
|
|
29538
29831
|
payload_type: external_exports.enum(["PAYLOAD_TYPE_UNSPECIFIED", "TEXT", "JSON", "BINARY"]).describe("Desired payload type (defaults to provider-specific value)").optional(),
|
|
29539
29832
|
payload: external_exports.string().describe("Explicit UTF-8 payload to send with the probe (mutually exclusive with payload_size_bytes)").optional(),
|
|
29540
29833
|
payload_size_bytes: external_exports.number().int().describe("Synthetic payload size in bytes (mutually exclusive with payload)").optional(),
|
|
@@ -29560,9 +29853,9 @@ function registerTools() {
|
|
|
29560
29853
|
const result = await callApi("POST", `/v1/ping:once`, body, void 0, (args.timeout_ms ?? 5e3) + 3e4);
|
|
29561
29854
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
29562
29855
|
}));
|
|
29563
|
-
server.tool("goodmem_ping_stream", "Stream ping probe results\n\nOpens a streaming ping session and returns per-probe results plus a terminal summary. Requires both the target-specific PING operation and its corresponding EXECUTE operation: PING_EMBEDDER plus EXECUTE_EMBEDDER, PING_RERANKER plus EXECUTE_RERANKER, or PING_LLM plus EXECUTE_LLM.", {
|
|
29856
|
+
server.tool("goodmem_ping_stream", "Stream ping probe results\n\nOpens a streaming ping session and returns per-probe results plus a terminal summary. Requires both the target-specific PING operation and its corresponding EXECUTE operation: PING_EMBEDDER plus EXECUTE_EMBEDDER, PING_RERANKER plus EXECUTE_RERANKER, or PING_LLM plus EXECUTE_LLM. Decision models require READ_DECISION_MODEL, PING_DECISION_MODEL, and EXECUTE_DECISION_MODEL. Probes make real provider calls and may incur charges.", {
|
|
29564
29857
|
target_id: external_exports.string().describe("Target resource ID (UUID)"),
|
|
29565
|
-
target_type_hint: external_exports.enum(["TARGET_TYPE_UNSPECIFIED", "EMBEDDER", "RERANKER", "LLM"]).describe("Optional hint for the target resource type").optional(),
|
|
29858
|
+
target_type_hint: external_exports.enum(["TARGET_TYPE_UNSPECIFIED", "EMBEDDER", "RERANKER", "LLM", "DECISION_MODEL"]).describe("Optional hint for the target resource type").optional(),
|
|
29566
29859
|
count: external_exports.number().int().describe("Number of probes to run (0 uses server default)").optional(),
|
|
29567
29860
|
interval_ms: external_exports.number().int().describe("Delay between probes in milliseconds (0 uses server default)").optional(),
|
|
29568
29861
|
timeout_ms: external_exports.number().int().describe("Per-probe timeout in milliseconds (0 uses server default)").optional(),
|