loopctl-mcp-server 2.31.1 → 2.32.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.
Files changed (2) hide show
  1. package/index.js +32 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1182,12 +1182,21 @@ async function llmConfig() {
1182
1182
  return toContent(result);
1183
1183
  }
1184
1184
 
1185
- async function setLlmConfig({ api_key, extraction_model, classification_model, merge_model }) {
1185
+ async function setLlmConfig({
1186
+ api_key,
1187
+ extraction_model,
1188
+ classification_model,
1189
+ merge_model,
1190
+ embedding_api_key,
1191
+ embedding_model,
1192
+ }) {
1186
1193
  const body = {};
1187
1194
  if (api_key != null) body.api_key = api_key;
1188
1195
  if (extraction_model !== undefined) body.extraction_model = extraction_model;
1189
1196
  if (classification_model !== undefined) body.classification_model = classification_model;
1190
1197
  if (merge_model !== undefined) body.merge_model = merge_model;
1198
+ if (embedding_api_key != null) body.embedding_api_key = embedding_api_key;
1199
+ if (embedding_model !== undefined) body.embedding_model = embedding_model;
1191
1200
  // PATCH (partial-merge) + EXACT user key (review #12, #13).
1192
1201
  const result = await apiCall(
1193
1202
  "PATCH",
@@ -3364,19 +3373,23 @@ const TOOLS = [
3364
3373
  {
3365
3374
  name: "llm_config",
3366
3375
  description:
3367
- "Get the tenant's BYO Anthropic LLM configuration: the per-operation model " +
3368
- "choices, whether a key is configured (has_api_key), and a masked last-4 hint. " +
3369
- "NEVER returns the key itself. Requires user role (LOOPCTL_USER_KEY).",
3376
+ "Get the tenant's BYO Anthropic + embedding configuration: the per-operation " +
3377
+ "model choices, whether each key is configured (has_api_key / has_embedding_key), " +
3378
+ "and masked last-4 hints. NEVER returns a key itself. Requires user role " +
3379
+ "(LOOPCTL_USER_KEY).",
3370
3380
  inputSchema: { type: "object", properties: {}, required: [] },
3371
3381
  },
3372
3382
  {
3373
3383
  name: "set_llm_config",
3374
3384
  description:
3375
- "Set/rotate the tenant's OWN Anthropic API key (stored encrypted, never returned) " +
3376
- "and the three per-operation models (extraction/classification/merge). loopctl " +
3377
- "fronts no LLM cost — the tenant's key bills the tenant. Any subset of fields may " +
3378
- "be sent; omitting api_key leaves the existing key untouched. Model ids are " +
3379
- "free-form (any model the key permits). Requires user role (LOOPCTL_USER_KEY).",
3385
+ "Set/rotate the tenant's OWN Anthropic API key AND OpenAI embedding key (both " +
3386
+ "stored encrypted, never returned) and the per-operation models " +
3387
+ "(extraction/classification/merge/embedding). loopctl fronts no cost — the " +
3388
+ "tenant's keys bill the tenant. Mandatory BYO for embeddings: without an " +
3389
+ "embedding_api_key the tenant's articles are not vector-searchable. Any subset " +
3390
+ "of fields may be sent; omitting a key leaves the existing key untouched. Model " +
3391
+ "ids are free-form (any model the key permits). Requires user role " +
3392
+ "(LOOPCTL_USER_KEY).",
3380
3393
  inputSchema: {
3381
3394
  type: "object",
3382
3395
  properties: {
@@ -3396,6 +3409,16 @@ const TOOLS = [
3396
3409
  type: "string",
3397
3410
  description: "Model id for article merge synthesis (null → server default).",
3398
3411
  },
3412
+ embedding_api_key: {
3413
+ type: "string",
3414
+ description:
3415
+ "OpenAI-compatible embedding API key (write-only; stored encrypted, never returned).",
3416
+ },
3417
+ embedding_model: {
3418
+ type: "string",
3419
+ description:
3420
+ "Embedding model id (null → server default text-embedding-3-small).",
3421
+ },
3399
3422
  },
3400
3423
  required: [],
3401
3424
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopctl-mcp-server",
3
- "version": "2.31.1",
3
+ "version": "2.32.0",
4
4
  "description": "MCP server for loopctl — structural trust for AI development loops",
5
5
  "type": "module",
6
6
  "main": "index.js",