@lucern/contracts 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/context-pack.contract.d.ts +10 -0
- package/dist/context-pack.contract.js.map +1 -1
- package/dist/dsl.d.ts +1 -0
- package/dist/dsl.js +10 -3
- package/dist/dsl.js.map +1 -1
- package/dist/dsl.values.js +10 -3
- package/dist/dsl.values.js.map +1 -1
- package/dist/function-registry/beliefs.js +302 -0
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.js +302 -0
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.js +302 -0
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.js +302 -0
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.js +302 -0
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.js +302 -0
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.js +302 -0
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.js +302 -0
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.js +302 -0
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.js +302 -0
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +410 -6
- package/dist/function-registry/index.js +508 -2
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.js +302 -0
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.js +302 -0
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.js +302 -0
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +2 -2
- package/dist/function-registry/manifest.js +10 -0
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.js +302 -0
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.js +302 -0
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.js +302 -0
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.js +302 -0
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.js +302 -0
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.js +302 -0
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/worktrees.js +302 -0
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/generated/convexSchemas.js +1 -1
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/generated/infisicalRuntimeEnv.js +9 -9
- package/dist/generated/infisicalRuntimeEnv.js.map +1 -1
- package/dist/generated/schema-manifest.json +10 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +343 -17
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +3 -3
- package/dist/infisical-runtime.contract.js +3 -3
- package/dist/infisical-runtime.contract.js.map +1 -1
- package/dist/infisical-runtime.platform-secrets.d.ts +3 -3
- package/dist/infisical-runtime.platform-secrets.js +3 -3
- package/dist/infisical-runtime.platform-secrets.js.map +1 -1
- package/dist/manifests/edge-policy-manifest.d.ts +1 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +3 -3
- package/dist/manifests/infisical-runtime-manifest.js +3 -3
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/schemas/index.js +29 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +60 -25
- package/dist/schemas/manifest.js +29 -2
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/tables/kernel/embedding.d.ts +8 -1
- package/dist/schemas/tables/kernel/embedding.js +29 -2
- package/dist/schemas/tables/kernel/embedding.js.map +1 -1
- package/dist/schemas/tables/kernel/intelligence.d.ts +4 -4
- package/dist/schemas.values.js +29 -2
- package/dist/schemas.values.js.map +1 -1
- package/dist/sdk-methods.contract.d.ts +5 -0
- package/dist/sdk-tools.contract.js +292 -0
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.js +292 -0
- package/dist/sdk-tools.contract.registry.js.map +1 -1
- package/dist/sdk-tools.contract.values.js +292 -0
- package/dist/sdk-tools.contract.values.js.map +1 -1
- package/dist/tool-contracts.d.ts +2 -0
- package/dist/tool-contracts.embeddings.d.ts +8 -0
- package/dist/tool-contracts.embeddings.js +120 -0
- package/dist/tool-contracts.embeddings.js.map +1 -0
- package/dist/tool-contracts.hybrid-discovery.d.ts +10 -0
- package/dist/tool-contracts.hybrid-discovery.js +148 -0
- package/dist/tool-contracts.hybrid-discovery.js.map +1 -0
- package/dist/tool-contracts.js +293 -1
- package/dist/tool-contracts.js.map +1 -1
- package/dist/tool-contracts.questions-listing.js +20 -0
- package/dist/tool-contracts.questions-listing.js.map +1 -1
- package/dist/tool-contracts.values.d.ts +2 -0
- package/dist/tool-contracts.values.js +292 -0
- package/dist/tool-contracts.values.js.map +1 -1
- package/package.json +10 -2
- package/dist/{edge-policy-manifest-4KOSP4nk.d.ts → edge-policy-manifest-CT8Y4IeW.d.ts} +2 -2
|
@@ -1834,6 +1834,14 @@
|
|
|
1834
1834
|
"nodeId"
|
|
1835
1835
|
]
|
|
1836
1836
|
},
|
|
1837
|
+
{
|
|
1838
|
+
"kind": "index",
|
|
1839
|
+
"name": "by_topicId_nodeId",
|
|
1840
|
+
"columns": [
|
|
1841
|
+
"topicId",
|
|
1842
|
+
"nodeId"
|
|
1843
|
+
]
|
|
1844
|
+
},
|
|
1837
1845
|
{
|
|
1838
1846
|
"kind": "index",
|
|
1839
1847
|
"name": "by_topicId_type",
|
|
@@ -1856,7 +1864,8 @@
|
|
|
1856
1864
|
"dimensions": 1024,
|
|
1857
1865
|
"filterFields": [
|
|
1858
1866
|
"nodeType",
|
|
1859
|
-
"createdBy"
|
|
1867
|
+
"createdBy",
|
|
1868
|
+
"topicId"
|
|
1860
1869
|
]
|
|
1861
1870
|
}
|
|
1862
1871
|
],
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { CreateDomainEventInput, DOMAIN_EVENT_TYPES, DOMAIN_EVENT_VERSION, Domai
|
|
|
14
14
|
export { DecodedPrefixedId, decodePrefixedId, encodePrefixedId, hasPrefixedIdPrefix } from './ids.contract.js';
|
|
15
15
|
export { ComponentTableManifest, ComponentTableManifestSchema } from './schemas/component-table-manifest.js';
|
|
16
16
|
export { SLOpinionInput, SLOpinionInputSchema } from './schemas/sl-opinion.js';
|
|
17
|
-
export { E as EdgePolicyEntry, a as EdgePolicyEntrySchema, b as EdgePolicyManifest, c as EdgePolicyManifestSchema, d as EdgePolicyViolation, e as EpistemicNodeType, f as EpistemicNodeTypeSchema, G as GRAPH_REF_NODE_TYPES, g as GraphRef, h as GraphRefSchema, i as assertEdgePolicyAllowed, j as findEdgePolicy } from './edge-policy-manifest-
|
|
17
|
+
export { E as EdgePolicyEntry, a as EdgePolicyEntrySchema, b as EdgePolicyManifest, c as EdgePolicyManifestSchema, d as EdgePolicyViolation, e as EpistemicNodeType, f as EpistemicNodeTypeSchema, G as GRAPH_REF_NODE_TYPES, g as GraphRef, h as GraphRefSchema, i as assertEdgePolicyAllowed, j as findEdgePolicy } from './edge-policy-manifest-CT8Y4IeW.js';
|
|
18
18
|
export { edgePolicyManifest } from './manifests/edge-policy-manifest.data.js';
|
|
19
19
|
export { INFISICAL_RUNTIME_MANIFEST, InfisicalRuntimeManifest } from './manifests/infisical-runtime-manifest.js';
|
|
20
20
|
export { CheckContext, CheckerKind, InvariantId, InvariantManifest, InvariantManifestSchema, InvariantResult, InvariantRule, InvariantSeverity } from './manifests/invariant-manifest.js';
|
|
@@ -58,6 +58,8 @@ import './tool-contracts.policy-observation-task-topic.js';
|
|
|
58
58
|
import './tool-contracts.questions-listing.js';
|
|
59
59
|
import './tool-contracts.js';
|
|
60
60
|
import './tool-contracts.worktrees.js';
|
|
61
|
+
import './tool-contracts.embeddings.js';
|
|
62
|
+
import './tool-contracts.hybrid-discovery.js';
|
|
61
63
|
import './schemas/enums.js';
|
|
62
64
|
import './schemas/manifest.js';
|
|
63
65
|
import './sdk-tools.contract.analytics.js';
|
package/dist/index.js
CHANGED
|
@@ -335,8 +335,14 @@ function convertSchemaInner(schema, state, path) {
|
|
|
335
335
|
switch (schema._def.typeName) {
|
|
336
336
|
case ZodFirstPartyTypeKind.ZodString:
|
|
337
337
|
return { source: "v.string()", defaults: [] };
|
|
338
|
-
case ZodFirstPartyTypeKind.ZodNumber:
|
|
339
|
-
|
|
338
|
+
case ZodFirstPartyTypeKind.ZodNumber: {
|
|
339
|
+
const field = path.length >= 2 ? path[path.length - 2] : void 0;
|
|
340
|
+
const isArrayElement = path[path.length - 1] === "[]";
|
|
341
|
+
return {
|
|
342
|
+
source: isArrayElement && field && state.float64ArrayFields.has(field) ? "v.float64()" : "v.number()",
|
|
343
|
+
defaults: []
|
|
344
|
+
};
|
|
345
|
+
}
|
|
340
346
|
case ZodFirstPartyTypeKind.ZodBigInt:
|
|
341
347
|
return { source: "v.int64()", defaults: [] };
|
|
342
348
|
case ZodFirstPartyTypeKind.ZodBoolean:
|
|
@@ -450,7 +456,8 @@ function zodToConvex(schema, options = {}) {
|
|
|
450
456
|
const state = {
|
|
451
457
|
location: options.location,
|
|
452
458
|
purpose: options.purpose ?? "function_returns",
|
|
453
|
-
seenLazySchemas: /* @__PURE__ */ new WeakSet()
|
|
459
|
+
seenLazySchemas: /* @__PURE__ */ new WeakSet(),
|
|
460
|
+
float64ArrayFields: new Set(options.float64ArrayFields ?? [])
|
|
454
461
|
};
|
|
455
462
|
const converted = convertSchema(schema, state, []);
|
|
456
463
|
return {
|
|
@@ -4892,6 +4899,26 @@ var COMPILE_CONTEXT = {
|
|
|
4892
4899
|
type: "string",
|
|
4893
4900
|
description: "Focus query used to resolve the topic and rank context items. Required when topicId is omitted."
|
|
4894
4901
|
},
|
|
4902
|
+
topicHint: {
|
|
4903
|
+
type: "string",
|
|
4904
|
+
description: "Optional natural-language topic hint used by the resolver when topicId is omitted or stale."
|
|
4905
|
+
},
|
|
4906
|
+
tags: {
|
|
4907
|
+
type: "array",
|
|
4908
|
+
description: "Optional resolver tags. Useful for narrowing topic inference without knowing the exact topic id."
|
|
4909
|
+
},
|
|
4910
|
+
touchedPaths: {
|
|
4911
|
+
type: "array",
|
|
4912
|
+
description: "Optional file or documentation paths used as resolver signals."
|
|
4913
|
+
},
|
|
4914
|
+
sourceRef: {
|
|
4915
|
+
type: "string",
|
|
4916
|
+
description: "Optional source reference used as a resolver signal, such as a worktree id, PR, or feature slug."
|
|
4917
|
+
},
|
|
4918
|
+
sourceKind: {
|
|
4919
|
+
type: "string",
|
|
4920
|
+
description: "Optional source kind used as a resolver signal, such as cli, worktree, commit, or docs."
|
|
4921
|
+
},
|
|
4895
4922
|
budget: {
|
|
4896
4923
|
type: "number",
|
|
4897
4924
|
description: "Token budget for prompt injection planning"
|
|
@@ -5218,6 +5245,268 @@ var OPEN_PULL_REQUEST = {
|
|
|
5218
5245
|
tier: "showcase"
|
|
5219
5246
|
};
|
|
5220
5247
|
|
|
5248
|
+
// src/tool-contracts.embeddings.ts
|
|
5249
|
+
var sharedEmbeddingParameters = {
|
|
5250
|
+
topicId: {
|
|
5251
|
+
type: "string",
|
|
5252
|
+
description: "Topic whose epistemic node embedding index should be queried."
|
|
5253
|
+
},
|
|
5254
|
+
workspaceId: {
|
|
5255
|
+
type: "string",
|
|
5256
|
+
description: "Workspace scope for the embedding operation."
|
|
5257
|
+
},
|
|
5258
|
+
nodeType: {
|
|
5259
|
+
type: "string",
|
|
5260
|
+
description: "Optional epistemic node type filter."
|
|
5261
|
+
},
|
|
5262
|
+
embeddingModel: {
|
|
5263
|
+
type: "string",
|
|
5264
|
+
description: "Optional embedding model filter."
|
|
5265
|
+
},
|
|
5266
|
+
limit: {
|
|
5267
|
+
type: "number",
|
|
5268
|
+
description: "Maximum rows to return."
|
|
5269
|
+
}
|
|
5270
|
+
};
|
|
5271
|
+
var LIST_MISSING_EMBEDDINGS = {
|
|
5272
|
+
name: "list_missing_embeddings",
|
|
5273
|
+
description: "List epistemic nodes missing fresh Convex embeddings. Like `git status` for the semantic index \u2014 shows which graph nodes still need indexing before retrieval can be trusted.",
|
|
5274
|
+
parameters: sharedEmbeddingParameters,
|
|
5275
|
+
required: ["topicId", "workspaceId"],
|
|
5276
|
+
response: {
|
|
5277
|
+
description: "Missing or stale embedding candidates",
|
|
5278
|
+
fields: {
|
|
5279
|
+
nodes: "array \u2014 node candidates missing fresh embeddings",
|
|
5280
|
+
total: "number \u2014 candidate count",
|
|
5281
|
+
nextCursor: "string | null"
|
|
5282
|
+
}
|
|
5283
|
+
},
|
|
5284
|
+
ownerModule: "reasoning-kernel",
|
|
5285
|
+
ontologyPrimitive: "graph",
|
|
5286
|
+
tier: "workhorse"
|
|
5287
|
+
};
|
|
5288
|
+
var SEARCH_EMBEDDINGS = {
|
|
5289
|
+
name: "search_embeddings",
|
|
5290
|
+
description: "Search topic-scoped epistemic nodes through the Convex vector index. Like `git grep` with semantic distance \u2014 finds matching beliefs, questions, evidence, and other nodes even when wording differs.",
|
|
5291
|
+
parameters: {
|
|
5292
|
+
...sharedEmbeddingParameters,
|
|
5293
|
+
queryText: {
|
|
5294
|
+
type: "string",
|
|
5295
|
+
description: "Natural-language query to embed and search with."
|
|
5296
|
+
},
|
|
5297
|
+
queryVector: {
|
|
5298
|
+
type: "array",
|
|
5299
|
+
description: "Optional precomputed query vector."
|
|
5300
|
+
},
|
|
5301
|
+
minScore: {
|
|
5302
|
+
type: "number",
|
|
5303
|
+
description: "Optional minimum cosine-similarity score."
|
|
5304
|
+
}
|
|
5305
|
+
},
|
|
5306
|
+
required: ["topicId", "workspaceId"],
|
|
5307
|
+
response: {
|
|
5308
|
+
description: "Vector search matches",
|
|
5309
|
+
fields: {
|
|
5310
|
+
results: "array \u2014 semantic matches with nodeId, nodeType, score, text, and provenance",
|
|
5311
|
+
total: "number \u2014 match count",
|
|
5312
|
+
nextCursor: "string | null"
|
|
5313
|
+
}
|
|
5314
|
+
},
|
|
5315
|
+
ownerModule: "reasoning-kernel",
|
|
5316
|
+
ontologyPrimitive: "graph",
|
|
5317
|
+
tier: "showcase"
|
|
5318
|
+
};
|
|
5319
|
+
var GET_EMBEDDINGS_BY_NODE_IDS = {
|
|
5320
|
+
name: "get_embeddings_by_node_ids",
|
|
5321
|
+
description: "Fetch embedding records for explicit epistemic node IDs. Like `git show` for semantic-index rows \u2014 inspects exactly which vectors exist for named graph nodes.",
|
|
5322
|
+
parameters: {
|
|
5323
|
+
...sharedEmbeddingParameters,
|
|
5324
|
+
nodeIds: {
|
|
5325
|
+
type: "array",
|
|
5326
|
+
description: "Epistemic node IDs to inspect."
|
|
5327
|
+
}
|
|
5328
|
+
},
|
|
5329
|
+
required: ["topicId", "workspaceId", "nodeIds"],
|
|
5330
|
+
response: {
|
|
5331
|
+
description: "Embedding records for explicit node IDs",
|
|
5332
|
+
fields: {
|
|
5333
|
+
embeddings: "array \u2014 embedding metadata records",
|
|
5334
|
+
total: "number \u2014 embedding count",
|
|
5335
|
+
nextCursor: "string | null"
|
|
5336
|
+
}
|
|
5337
|
+
},
|
|
5338
|
+
ownerModule: "reasoning-kernel",
|
|
5339
|
+
ontologyPrimitive: "graph",
|
|
5340
|
+
tier: "workhorse"
|
|
5341
|
+
};
|
|
5342
|
+
var QUEUE_EMBEDDING_BACKFILL = {
|
|
5343
|
+
name: "queue_embedding_backfill",
|
|
5344
|
+
description: "Queue background embedding generation for explicit epistemic nodes. Like `git add` for semantic-index work \u2014 stages graph nodes for the kernel backfill scheduler.",
|
|
5345
|
+
parameters: {
|
|
5346
|
+
...sharedEmbeddingParameters,
|
|
5347
|
+
nodeIds: {
|
|
5348
|
+
type: "array",
|
|
5349
|
+
description: "Epistemic node IDs to queue for embedding generation."
|
|
5350
|
+
}
|
|
5351
|
+
},
|
|
5352
|
+
required: ["topicId", "workspaceId", "nodeIds"],
|
|
5353
|
+
response: {
|
|
5354
|
+
description: "Backfill queue receipt",
|
|
5355
|
+
fields: {
|
|
5356
|
+
queued: "number \u2014 queued node count",
|
|
5357
|
+
nodeIds: "array \u2014 node IDs queued for embedding generation"
|
|
5358
|
+
}
|
|
5359
|
+
},
|
|
5360
|
+
ownerModule: "reasoning-kernel",
|
|
5361
|
+
ontologyPrimitive: "graph",
|
|
5362
|
+
tier: "workhorse"
|
|
5363
|
+
};
|
|
5364
|
+
|
|
5365
|
+
// src/tool-contracts.hybrid-discovery.ts
|
|
5366
|
+
var hybridParameters = {
|
|
5367
|
+
query: {
|
|
5368
|
+
type: "string",
|
|
5369
|
+
description: "Natural-language query text to resolve against the typed reasoning graph."
|
|
5370
|
+
},
|
|
5371
|
+
queryText: {
|
|
5372
|
+
type: "string",
|
|
5373
|
+
description: "Explicit query text alias for clients that separate command words from search text."
|
|
5374
|
+
},
|
|
5375
|
+
text: {
|
|
5376
|
+
type: "string",
|
|
5377
|
+
description: "Raw pasted text to use as a semantic retrieval seed."
|
|
5378
|
+
},
|
|
5379
|
+
topicId: {
|
|
5380
|
+
type: "string",
|
|
5381
|
+
description: "Optional topic scope. When omitted, semantic topic candidates are resolved first."
|
|
5382
|
+
},
|
|
5383
|
+
workspaceId: {
|
|
5384
|
+
type: "string",
|
|
5385
|
+
description: "Optional workspace scope used by semantic topic candidates and vector search."
|
|
5386
|
+
},
|
|
5387
|
+
nodeId: {
|
|
5388
|
+
type: "string",
|
|
5389
|
+
description: "Optional source node used for related-node or impact analysis."
|
|
5390
|
+
},
|
|
5391
|
+
include: {
|
|
5392
|
+
type: "array",
|
|
5393
|
+
description: "Result families to include, such as topics, nodes, worktrees, tasks, evidence, and edges."
|
|
5394
|
+
},
|
|
5395
|
+
via: {
|
|
5396
|
+
type: "array",
|
|
5397
|
+
description: "Retrieval methods to use: bm25, embeddings, edges, topic-tree, state, graph-algorithms."
|
|
5398
|
+
},
|
|
5399
|
+
depth: {
|
|
5400
|
+
type: "number",
|
|
5401
|
+
description: "Graph expansion depth. Defaults to 1 and is capped by the server."
|
|
5402
|
+
},
|
|
5403
|
+
limit: {
|
|
5404
|
+
type: "number",
|
|
5405
|
+
description: "Maximum rows per result family."
|
|
5406
|
+
},
|
|
5407
|
+
minScore: {
|
|
5408
|
+
type: "number",
|
|
5409
|
+
description: "Minimum semantic or fused score for candidate rows."
|
|
5410
|
+
},
|
|
5411
|
+
campaign: {
|
|
5412
|
+
type: "number",
|
|
5413
|
+
description: "Optional worktree campaign filter."
|
|
5414
|
+
},
|
|
5415
|
+
lane: {
|
|
5416
|
+
type: "string",
|
|
5417
|
+
description: "Optional worktree lane filter."
|
|
5418
|
+
},
|
|
5419
|
+
status: {
|
|
5420
|
+
type: "string",
|
|
5421
|
+
description: "Optional node, task, or worktree state/status filter."
|
|
5422
|
+
},
|
|
5423
|
+
nodeTypes: {
|
|
5424
|
+
type: "array",
|
|
5425
|
+
description: "Optional epistemic node types to include."
|
|
5426
|
+
},
|
|
5427
|
+
changedPaths: {
|
|
5428
|
+
type: "array",
|
|
5429
|
+
description: "Changed file paths used as impact-analysis query signals."
|
|
5430
|
+
},
|
|
5431
|
+
metadata: {
|
|
5432
|
+
type: "object",
|
|
5433
|
+
description: "Optional planner metadata for receipts and caller provenance."
|
|
5434
|
+
}
|
|
5435
|
+
};
|
|
5436
|
+
var hybridResponse = {
|
|
5437
|
+
description: "Hybrid semantic graph planner response with ranked result families and retrieval receipt.",
|
|
5438
|
+
fields: {
|
|
5439
|
+
results: "array \u2014 ranked mixed graph results with score, kind, source, and ranking signals",
|
|
5440
|
+
topics: "array \u2014 candidate or traversed topics",
|
|
5441
|
+
nodes: "array \u2014 matching epistemic nodes",
|
|
5442
|
+
worktrees: "array \u2014 matching worktrees",
|
|
5443
|
+
tasks: "array \u2014 matching tasks",
|
|
5444
|
+
evidence: "array \u2014 matching evidence",
|
|
5445
|
+
edges: "array \u2014 graph neighborhood edges",
|
|
5446
|
+
receipt: "object \u2014 planner steps, candidate counts, ranking weights, source/cache posture"
|
|
5447
|
+
}
|
|
5448
|
+
};
|
|
5449
|
+
var HYBRID_DISCOVER = {
|
|
5450
|
+
name: "hybrid_discover",
|
|
5451
|
+
description: "Discover typed reasoning graph context with BM25, embeddings, topic tree traversal, and graph neighborhoods. Like `git grep` plus `git log --graph` for Lucern's typed reasoning graph \u2014 finds the relevant branches of thought and explains why.",
|
|
5452
|
+
parameters: hybridParameters,
|
|
5453
|
+
required: [],
|
|
5454
|
+
response: hybridResponse,
|
|
5455
|
+
ownerModule: "graph-intelligence",
|
|
5456
|
+
ontologyPrimitive: "graph",
|
|
5457
|
+
tier: "showcase"
|
|
5458
|
+
};
|
|
5459
|
+
var RESOLVE_TOPIC_SEMANTIC = {
|
|
5460
|
+
name: "resolve_topic_semantic",
|
|
5461
|
+
description: "Resolve an ambiguous topic using BM25, vector candidates, and topic-tree context. Like `git remote show` for a reasoning topic \u2014 finds the canonical branch and nearby branches before reading deeper.",
|
|
5462
|
+
parameters: hybridParameters,
|
|
5463
|
+
required: [],
|
|
5464
|
+
response: hybridResponse,
|
|
5465
|
+
ownerModule: "graph-intelligence",
|
|
5466
|
+
ontologyPrimitive: "graph",
|
|
5467
|
+
tier: "showcase"
|
|
5468
|
+
};
|
|
5469
|
+
var EXPAND_GRAPH_NEIGHBORHOOD = {
|
|
5470
|
+
name: "expand_graph_neighborhood",
|
|
5471
|
+
description: "Expand a typed graph neighborhood around a query, topic, or node. Like `git log --graph --decorate` for reasoning state \u2014 follows typed edges and surfaces the surrounding context.",
|
|
5472
|
+
parameters: hybridParameters,
|
|
5473
|
+
required: [],
|
|
5474
|
+
response: hybridResponse,
|
|
5475
|
+
ownerModule: "graph-intelligence",
|
|
5476
|
+
ontologyPrimitive: "graph",
|
|
5477
|
+
tier: "showcase"
|
|
5478
|
+
};
|
|
5479
|
+
var FIND_RELATED_NODES = {
|
|
5480
|
+
name: "find_related_nodes",
|
|
5481
|
+
description: "Find semantically and structurally related nodes across the reasoning graph. Like `git blame` across branches \u2014 starts from a node or text and finds nearby responsibility, evidence, and related claims.",
|
|
5482
|
+
parameters: hybridParameters,
|
|
5483
|
+
required: [],
|
|
5484
|
+
response: hybridResponse,
|
|
5485
|
+
ownerModule: "graph-intelligence",
|
|
5486
|
+
ontologyPrimitive: "graph",
|
|
5487
|
+
tier: "showcase"
|
|
5488
|
+
};
|
|
5489
|
+
var ANALYZE_GRAPH_IMPACT = {
|
|
5490
|
+
name: "analyze_graph_impact",
|
|
5491
|
+
description: "Analyze which graph objects are affected by files, PR text, incidents, or campaign objectives. Like `git diff --name-only` plus semantic blame \u2014 maps a change signal onto topics, beliefs, tasks, and unresolved questions.",
|
|
5492
|
+
parameters: hybridParameters,
|
|
5493
|
+
required: [],
|
|
5494
|
+
response: hybridResponse,
|
|
5495
|
+
ownerModule: "graph-intelligence",
|
|
5496
|
+
ontologyPrimitive: "graph",
|
|
5497
|
+
tier: "showcase"
|
|
5498
|
+
};
|
|
5499
|
+
var DETECT_GRAPH_DRIFT = {
|
|
5500
|
+
name: "detect_graph_drift",
|
|
5501
|
+
description: "Detect duplicate, stale, orphaned, or weakly linked reasoning graph surface. Like `git fsck` for the reasoning graph \u2014 finds semantic duplicates, stale docs/code references, and missing links.",
|
|
5502
|
+
parameters: hybridParameters,
|
|
5503
|
+
required: [],
|
|
5504
|
+
response: hybridResponse,
|
|
5505
|
+
ownerModule: "graph-intelligence",
|
|
5506
|
+
ontologyPrimitive: "graph",
|
|
5507
|
+
tier: "showcase"
|
|
5508
|
+
};
|
|
5509
|
+
|
|
5221
5510
|
// src/tool-contracts.ts
|
|
5222
5511
|
var MCP_TOOL_CONTRACTS = {
|
|
5223
5512
|
// Belief lifecycle (commit, amend, fork, archive)
|
|
@@ -5259,6 +5548,16 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
5259
5548
|
search_beliefs: SEARCH_BELIEFS,
|
|
5260
5549
|
find_contradictions: FIND_CONTRADICTIONS,
|
|
5261
5550
|
bisect_confidence: BISECT_CONFIDENCE,
|
|
5551
|
+
list_missing_embeddings: LIST_MISSING_EMBEDDINGS,
|
|
5552
|
+
search_embeddings: SEARCH_EMBEDDINGS,
|
|
5553
|
+
get_embeddings_by_node_ids: GET_EMBEDDINGS_BY_NODE_IDS,
|
|
5554
|
+
queue_embedding_backfill: QUEUE_EMBEDDING_BACKFILL,
|
|
5555
|
+
hybrid_discover: HYBRID_DISCOVER,
|
|
5556
|
+
resolve_topic_semantic: RESOLVE_TOPIC_SEMANTIC,
|
|
5557
|
+
expand_graph_neighborhood: EXPAND_GRAPH_NEIGHBORHOOD,
|
|
5558
|
+
find_related_nodes: FIND_RELATED_NODES,
|
|
5559
|
+
analyze_graph_impact: ANALYZE_GRAPH_IMPACT,
|
|
5560
|
+
detect_graph_drift: DETECT_GRAPH_DRIFT,
|
|
5262
5561
|
// Edges (commit)
|
|
5263
5562
|
create_edge: CREATE_EDGE,
|
|
5264
5563
|
update_edge: UPDATE_EDGE,
|
|
@@ -7362,9 +7661,35 @@ var epistemicNodeEmbeddings = defineTable({
|
|
|
7362
7661
|
category: "embedding",
|
|
7363
7662
|
shape: z.object({
|
|
7364
7663
|
"nodeId": idOf("epistemicNodes"),
|
|
7664
|
+
"tenantId": z.string().optional(),
|
|
7665
|
+
"workspaceId": z.string().optional(),
|
|
7365
7666
|
"topicId": z.string().optional(),
|
|
7366
|
-
"nodeType": z.enum([
|
|
7667
|
+
"nodeType": z.enum([
|
|
7668
|
+
"decision",
|
|
7669
|
+
"belief",
|
|
7670
|
+
"question",
|
|
7671
|
+
"theme",
|
|
7672
|
+
"deal",
|
|
7673
|
+
"topic",
|
|
7674
|
+
"claim",
|
|
7675
|
+
"evidence",
|
|
7676
|
+
"synthesis",
|
|
7677
|
+
"answer",
|
|
7678
|
+
"atomic_fact",
|
|
7679
|
+
"excerpt",
|
|
7680
|
+
"source",
|
|
7681
|
+
"company",
|
|
7682
|
+
"person",
|
|
7683
|
+
"investor",
|
|
7684
|
+
"function",
|
|
7685
|
+
"value_chain"
|
|
7686
|
+
]),
|
|
7367
7687
|
"embedding": z.array(z.number()),
|
|
7688
|
+
"embeddingModel": z.string().optional(),
|
|
7689
|
+
"vectorDimensions": z.number().optional(),
|
|
7690
|
+
"contentHash": z.string().optional(),
|
|
7691
|
+
"textPreview": z.string().optional(),
|
|
7692
|
+
"embeddedAt": z.number().optional(),
|
|
7368
7693
|
"createdBy": z.string(),
|
|
7369
7694
|
"hasAnswer": z.boolean().optional(),
|
|
7370
7695
|
"confidence": z.number().optional(),
|
|
@@ -7374,9 +7699,10 @@ var epistemicNodeEmbeddings = defineTable({
|
|
|
7374
7699
|
}),
|
|
7375
7700
|
indices: [
|
|
7376
7701
|
{ kind: "index", name: "by_nodeId", columns: ["nodeId"] },
|
|
7702
|
+
{ kind: "index", name: "by_topicId_nodeId", columns: ["topicId", "nodeId"] },
|
|
7377
7703
|
{ kind: "index", name: "by_topicId_type", columns: ["topicId", "nodeType"] },
|
|
7378
7704
|
{ kind: "index", name: "by_topicId", columns: ["topicId"] },
|
|
7379
|
-
{ kind: "vector", name: "by_embedding", vectorField: "embedding", dimensions: 1024, filterFields: ["nodeType", "createdBy"] }
|
|
7705
|
+
{ kind: "vector", name: "by_embedding", vectorField: "embedding", dimensions: 1024, filterFields: ["nodeType", "createdBy", "topicId"] }
|
|
7380
7706
|
]
|
|
7381
7707
|
});
|
|
7382
7708
|
var groupMemberships = defineTable({
|
|
@@ -14775,7 +15101,7 @@ var PLATFORM_AI_SECRET_DEFINITIONS = [
|
|
|
14775
15101
|
canonicalName: "OPENAI_API_KEY",
|
|
14776
15102
|
owner: "lucern_platform",
|
|
14777
15103
|
scope: "environment",
|
|
14778
|
-
sourcePath: "/
|
|
15104
|
+
sourcePath: "/tenants/lucern/shared/llm",
|
|
14779
15105
|
environmentPolicy: "environment_specific",
|
|
14780
15106
|
required: false,
|
|
14781
15107
|
secret: true,
|
|
@@ -14800,7 +15126,7 @@ var PLATFORM_AI_SECRET_DEFINITIONS = [
|
|
|
14800
15126
|
canonicalName: "ANTHROPIC_API_KEY",
|
|
14801
15127
|
owner: "lucern_platform",
|
|
14802
15128
|
scope: "environment",
|
|
14803
|
-
sourcePath: "/
|
|
15129
|
+
sourcePath: "/tenants/lucern/shared/llm",
|
|
14804
15130
|
environmentPolicy: "environment_specific",
|
|
14805
15131
|
required: false,
|
|
14806
15132
|
secret: true,
|
|
@@ -14826,7 +15152,7 @@ var PLATFORM_AI_SECRET_DEFINITIONS = [
|
|
|
14826
15152
|
aliases: ["GOOGLE_AI_API_KEY", "GOOGLE_GENERATIVE_AI_API_KEY"],
|
|
14827
15153
|
owner: "lucern_platform",
|
|
14828
15154
|
scope: "environment",
|
|
14829
|
-
sourcePath: "/
|
|
15155
|
+
sourcePath: "/tenants/lucern/shared/llm",
|
|
14830
15156
|
environmentPolicy: "environment_specific",
|
|
14831
15157
|
required: false,
|
|
14832
15158
|
secret: true,
|
|
@@ -17874,7 +18200,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
17874
18200
|
"required": false,
|
|
17875
18201
|
"secret": true,
|
|
17876
18202
|
"public": false,
|
|
17877
|
-
"sourcePath": "/
|
|
18203
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
17878
18204
|
"environmentPolicy": "environment_specific",
|
|
17879
18205
|
"consumers": [
|
|
17880
18206
|
"lucern-ai-runtime",
|
|
@@ -19309,7 +19635,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
19309
19635
|
"required": false,
|
|
19310
19636
|
"secret": true,
|
|
19311
19637
|
"public": false,
|
|
19312
|
-
"sourcePath": "/
|
|
19638
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
19313
19639
|
"environmentPolicy": "environment_specific",
|
|
19314
19640
|
"consumers": [
|
|
19315
19641
|
"lucern-ai-runtime",
|
|
@@ -22614,7 +22940,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
22614
22940
|
"required": false,
|
|
22615
22941
|
"secret": true,
|
|
22616
22942
|
"public": false,
|
|
22617
|
-
"sourcePath": "/
|
|
22943
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
22618
22944
|
"environmentPolicy": "environment_specific",
|
|
22619
22945
|
"consumers": [
|
|
22620
22946
|
"lucern-ai-runtime",
|
|
@@ -32394,7 +32720,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
32394
32720
|
"required": false,
|
|
32395
32721
|
"secret": true,
|
|
32396
32722
|
"public": false,
|
|
32397
|
-
"sourcePath": "/
|
|
32723
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
32398
32724
|
"environmentPolicy": "environment_specific",
|
|
32399
32725
|
"consumers": [
|
|
32400
32726
|
"lucern-ai-runtime",
|
|
@@ -32714,7 +33040,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
32714
33040
|
"required": false,
|
|
32715
33041
|
"secret": true,
|
|
32716
33042
|
"public": false,
|
|
32717
|
-
"sourcePath": "/
|
|
33043
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
32718
33044
|
"environmentPolicy": "environment_specific",
|
|
32719
33045
|
"consumers": [
|
|
32720
33046
|
"lucern-ai-runtime",
|
|
@@ -33551,7 +33877,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
33551
33877
|
"required": false,
|
|
33552
33878
|
"secret": true,
|
|
33553
33879
|
"public": false,
|
|
33554
|
-
"sourcePath": "/
|
|
33880
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
33555
33881
|
"environmentPolicy": "environment_specific",
|
|
33556
33882
|
"consumers": [
|
|
33557
33883
|
"lucern-ai-runtime",
|
|
@@ -39147,7 +39473,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
39147
39473
|
"required": false,
|
|
39148
39474
|
"secret": true,
|
|
39149
39475
|
"public": false,
|
|
39150
|
-
"sourcePath": "/
|
|
39476
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
39151
39477
|
"environmentPolicy": "environment_specific",
|
|
39152
39478
|
"consumers": [
|
|
39153
39479
|
"lucern-ai-runtime",
|
|
@@ -39189,7 +39515,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
39189
39515
|
"required": false,
|
|
39190
39516
|
"secret": true,
|
|
39191
39517
|
"public": false,
|
|
39192
|
-
"sourcePath": "/
|
|
39518
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
39193
39519
|
"environmentPolicy": "environment_specific",
|
|
39194
39520
|
"consumers": [
|
|
39195
39521
|
"lucern-ai-runtime",
|
|
@@ -39345,7 +39671,7 @@ var GENERATED_INFISICAL_RUNTIME_ENV = {
|
|
|
39345
39671
|
"required": false,
|
|
39346
39672
|
"secret": true,
|
|
39347
39673
|
"public": false,
|
|
39348
|
-
"sourcePath": "/
|
|
39674
|
+
"sourcePath": "/tenants/lucern/shared/llm",
|
|
39349
39675
|
"environmentPolicy": "environment_specific",
|
|
39350
39676
|
"consumers": [
|
|
39351
39677
|
"lucern-ai-runtime",
|