@lucern/contracts 0.3.0-alpha.17 → 0.3.0-alpha.3
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 +0 -10
- package/dist/api-enums.contract.d.ts +3 -5
- package/dist/api-enums.contract.js +12 -14
- package/dist/api-enums.contract.js.map +1 -1
- package/dist/auth-context.contract.js +2 -14
- package/dist/auth-context.contract.js.map +1 -1
- package/dist/auth-session.contract.js +2 -14
- package/dist/auth-session.contract.js.map +1 -1
- package/dist/auth.contract.d.ts +1 -1
- package/dist/auth.contract.js +2 -14
- package/dist/auth.contract.js.map +1 -1
- package/dist/component-boundary.contract.d.ts +1 -1
- package/dist/component-boundary.contract.js +26 -46
- package/dist/component-boundary.contract.js.map +1 -1
- package/dist/context-pack.contract.d.ts +3 -5
- package/dist/context-pack.contract.js.map +1 -1
- package/dist/{defineTable-t1wr5wgn.d.ts → defineTable-CBQ03FXl.d.ts} +1 -1
- package/dist/{dsl-DVPthQGY.d.ts → dsl-BgpoVOVQ.d.ts} +2 -2
- package/dist/dsl.d.ts +2 -2
- package/dist/dsl.js +4 -1
- package/dist/dsl.js.map +1 -1
- package/dist/function-registry/beliefs.d.ts +51 -64
- package/dist/function-registry/beliefs.js +57 -817
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.d.ts +6 -15
- package/dist/function-registry/coding.js +43 -866
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +16 -22
- package/dist/function-registry/context.js +46 -805
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.d.ts +3 -9
- package/dist/function-registry/contracts.js +39 -770
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.d.ts +9 -21
- package/dist/function-registry/coordination.js +39 -770
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +2 -167
- package/dist/function-registry/edges.js +71 -978
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +41 -52
- package/dist/function-registry/evidence.js +62 -826
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +66 -162
- package/dist/function-registry/graph.js +46 -886
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +4 -7
- package/dist/function-registry/helpers.js +40 -771
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.d.ts +16 -62
- package/dist/function-registry/identity.js +45 -793
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +3 -5
- package/dist/function-registry/index.js +43 -777
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +11 -16
- package/dist/function-registry/judgments.js +42 -782
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.d.ts +1 -5
- package/dist/function-registry/legacy.js +39 -770
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +21 -28
- package/dist/function-registry/lenses.js +42 -793
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +6 -6
- package/dist/function-registry/manifest.js +2 -19
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/ontologies.d.ts +56 -70
- package/dist/function-registry/ontologies.js +45 -788
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +16 -22
- package/dist/function-registry/pipeline.js +42 -779
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +61 -76
- package/dist/function-registry/questions.js +52 -869
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +21 -28
- package/dist/function-registry/tasks.js +48 -845
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +26 -114
- package/dist/function-registry/topics.js +43 -852
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +3 -7
- package/dist/function-registry/worktrees.d.ts +51 -104
- package/dist/function-registry/worktrees.js +51 -925
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/gateway.contract.d.ts +0 -5
- package/dist/gateway.contract.js.map +1 -1
- package/dist/generated/convexSchemas.d.ts +3 -3
- package/dist/generated/convexSchemas.js +18 -38
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/generated/schema-manifest.json +114 -1221
- package/dist/generated/tableOwnership.d.ts +28 -48
- package/dist/generated/tableOwnership.js +26 -66
- package/dist/generated/tableOwnership.js.map +1 -1
- package/dist/generated/tier-expectations.json +9 -64
- package/dist/graph-types/index.d.ts +1 -5
- package/dist/graph-types/index.js +4 -15
- package/dist/graph-types/index.js.map +1 -1
- package/dist/index-CV-0_VWJ.d.ts +25 -0
- package/dist/index.d.ts +669 -28
- package/dist/index.js +400 -34707
- package/dist/index.js.map +1 -1
- package/dist/lens-filter.contract.js +3 -4
- package/dist/lens-filter.contract.js.map +1 -1
- package/dist/lens-workflow.contract.js +3 -4
- package/dist/lens-workflow.contract.js.map +1 -1
- package/dist/mcp-gateway-boundary.contract.d.ts +3 -23
- package/dist/mcp-gateway-boundary.contract.js +0 -2
- package/dist/mcp-gateway-boundary.contract.js.map +1 -1
- package/dist/schema-helpers/enumValidation.js +5 -2
- package/dist/schema-helpers/enumValidation.js.map +1 -1
- package/dist/schema-helpers/spine/nodes/decision.js +1 -2
- package/dist/schema-helpers/spine/nodes/decision.js.map +1 -1
- package/dist/schema-helpers/spine/tables/epistemicNodes.js +27 -27
- package/dist/schema-helpers/spine/tables/epistemicNodes.js.map +1 -1
- package/dist/schemas/component-table-manifest.d.ts +6 -6
- package/dist/schemas/component-table-manifest.js +2 -2
- package/dist/schemas/component-table-manifest.js.map +1 -1
- package/dist/schemas/enums.d.ts +2 -5
- package/dist/schemas/enums.js +2 -5
- package/dist/schemas/enums.js.map +1 -1
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/index.js +139 -1130
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +948 -2948
- package/dist/schemas/manifest.js +137 -1128
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/sl-opinion.d.ts +4 -4
- package/dist/schemas/tables/{controlPlane → identity}/agent.d.ts +1 -1
- package/dist/schemas/tables/{controlPlane → identity}/agent.js +3 -3
- package/dist/schemas/tables/identity/agent.js.map +1 -0
- package/dist/schemas/tables/{controlPlane → identity}/epistemic.d.ts +1 -1
- package/dist/schemas/tables/{controlPlane → identity}/epistemic.js +3 -3
- package/dist/schemas/tables/identity/epistemic.js.map +1 -0
- package/dist/schemas/tables/{controlPlane → identity}/model.d.ts +1 -1
- package/dist/schemas/tables/{controlPlane → identity}/model.js +6 -6
- package/dist/schemas/tables/identity/model.js.map +1 -0
- package/dist/schemas/tables/{controlPlane → identity}/platform.d.ts +11 -11
- package/dist/schemas/tables/{controlPlane → identity}/platform.js +18 -18
- package/dist/schemas/tables/identity/platform.js.map +1 -0
- package/dist/schemas/tables/{controlPlane → identity}/project.d.ts +1 -1
- package/dist/schemas/tables/{controlPlane → identity}/project.js +3 -3
- package/dist/schemas/tables/identity/project.js.map +1 -0
- package/dist/schemas/tables/{controlPlane → identity}/user.d.ts +1 -1
- package/dist/schemas/tables/{controlPlane → identity}/user.js +3 -3
- package/dist/schemas/tables/identity/user.js.map +1 -0
- package/dist/schemas/tables/kernel/config.d.ts +1 -1
- package/dist/schemas/tables/kernel/config.js.map +1 -1
- package/dist/schemas/tables/kernel/coordination.d.ts +1 -1
- package/dist/schemas/tables/kernel/coordination.js.map +1 -1
- package/dist/schemas/tables/kernel/decision.d.ts +1 -1
- package/dist/schemas/tables/kernel/decision.js.map +1 -1
- package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
- package/dist/schemas/tables/kernel/embedding.js.map +1 -1
- package/dist/schemas/tables/kernel/epistemic.d.ts +7 -7
- package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
- package/dist/schemas/tables/kernel/idempotency.d.ts +1 -1
- package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
- package/dist/schemas/tables/kernel/infra.d.ts +5 -5
- package/dist/schemas/tables/kernel/infra.js.map +1 -1
- package/dist/schemas/tables/kernel/intelligence.d.ts +11 -11
- package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
- package/dist/schemas/tables/kernel/lens.d.ts +5 -5
- package/dist/schemas/tables/kernel/lens.js.map +1 -1
- package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
- package/dist/schemas/tables/kernel/ontology.js.map +1 -1
- package/dist/schemas/tables/kernel/platform.d.ts +13 -13
- package/dist/schemas/tables/kernel/platform.js.map +1 -1
- package/dist/schemas/tables/kernel/spine.d.ts +4 -5
- package/dist/schemas/tables/kernel/spine.js +2 -6
- package/dist/schemas/tables/kernel/spine.js.map +1 -1
- package/dist/schemas/tables/kernel/task.d.ts +43 -43
- package/dist/schemas/tables/kernel/task.js.map +1 -1
- package/dist/schemas/tables/kernel/topic.d.ts +1 -1
- package/dist/schemas/tables/kernel/topic.js +1 -5
- package/dist/schemas/tables/kernel/topic.js.map +1 -1
- package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
- package/dist/schemas/tables/kernel/workflow.js.map +1 -1
- package/dist/schemas/tables/kernel/worktree.d.ts +55 -55
- package/dist/schemas/tables/kernel/worktree.js.map +1 -1
- package/dist/schemas/tables/mc/identity.d.ts +4 -21
- package/dist/schemas/tables/mc/identity.js +1 -32
- package/dist/schemas/tables/mc/identity.js.map +1 -1
- package/dist/schemas/tables/mc/methodology.d.ts +1 -1
- package/dist/schemas/tables/mc/methodology.js.map +1 -1
- package/dist/schemas/tables/mc/pack.d.ts +21 -21
- package/dist/schemas/tables/mc/pack.js.map +1 -1
- package/dist/schemas/tables/mc/policy.d.ts +2 -2
- package/dist/schemas/tables/mc/policy.js +1 -1
- package/dist/schemas/tables/mc/policy.js.map +1 -1
- package/dist/schemas/tables/mc/registry.d.ts +5 -5
- package/dist/schemas/tables/mc/registry.js.map +1 -1
- package/dist/schemas/tables/mc/runtime.d.ts +3 -109
- package/dist/schemas/tables/mc/runtime.js +104 -330
- package/dist/schemas/tables/mc/runtime.js.map +1 -1
- package/dist/schemas/tables/mc/tenant.d.ts +2 -4
- package/dist/schemas/tables/mc/tenant.js +1 -3
- package/dist/schemas/tables/mc/tenant.js.map +1 -1
- package/dist/schemas/tables/mc/workspace.d.ts +5 -28
- package/dist/schemas/tables/mc/workspace.js +2 -36
- package/dist/schemas/tables/mc/workspace.js.map +1 -1
- package/dist/sdk-methods.contract.d.ts +2 -2
- package/dist/{sdk-tools.contract-CKmSsrZ2.d.ts → sdk-tools.contract-S4ia0TTo.d.ts} +2 -2
- package/dist/sdk-tools.contract.d.ts +2 -2
- package/dist/sdk-tools.contract.js +27 -719
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/tenant-client.contract.d.ts +14 -102
- package/dist/tenant-client.contract.js +12 -113
- package/dist/tenant-client.contract.js.map +1 -1
- package/dist/{tool-contracts-C_xvM9q2.d.ts → tool-contracts-C92-9ueT.d.ts} +2 -38
- package/dist/tool-contracts.d.ts +1 -1
- package/dist/tool-contracts.js +28 -720
- package/dist/tool-contracts.js.map +1 -1
- package/package.json +1 -30
- package/dist/component-host-boundary.contract.d.ts +0 -46
- package/dist/component-host-boundary.contract.js +0 -60
- package/dist/component-host-boundary.contract.js.map +0 -1
- package/dist/edge-policy-manifest-Dw5IhT1L.d.ts +0 -133
- package/dist/function-registry/nodes.d.ts +0 -412
- package/dist/function-registry/nodes.js +0 -5354
- package/dist/function-registry/nodes.js.map +0 -1
- package/dist/function-registry-input-audit.d.ts +0 -13
- package/dist/function-registry-input-audit.js +0 -166
- package/dist/function-registry-input-audit.js.map +0 -1
- package/dist/generated/infisicalRuntimeEnv.d.ts +0 -70
- package/dist/generated/infisicalRuntimeEnv.js +0 -27345
- package/dist/generated/infisicalRuntimeEnv.js.map +0 -1
- package/dist/generated/lucernGatewayEnv.d.ts +0 -17
- package/dist/generated/lucernGatewayEnv.js +0 -38
- package/dist/generated/lucernGatewayEnv.js.map +0 -1
- package/dist/generated/lucernWebPublicEnv.d.ts +0 -26
- package/dist/generated/lucernWebPublicEnv.js +0 -32
- package/dist/generated/lucernWebPublicEnv.js.map +0 -1
- package/dist/generated/lucernWebServerEnv.d.ts +0 -33
- package/dist/generated/lucernWebServerEnv.js +0 -51
- package/dist/generated/lucernWebServerEnv.js.map +0 -1
- package/dist/graph-intelligence.contract.d.ts +0 -506
- package/dist/graph-intelligence.contract.js +0 -595
- package/dist/graph-intelligence.contract.js.map +0 -1
- package/dist/index-CM1Pl_vI.d.ts +0 -28
- package/dist/infisical-runtime.contract.d.ts +0 -1889
- package/dist/infisical-runtime.contract.js +0 -3235
- package/dist/infisical-runtime.contract.js.map +0 -1
- package/dist/manifests/edge-policy-manifest.d.ts +0 -2
- package/dist/manifests/edge-policy-manifest.data.d.ts +0 -13
- package/dist/manifests/edge-policy-manifest.data.js +0 -26
- package/dist/manifests/edge-policy-manifest.data.js.map +0 -1
- package/dist/manifests/edge-policy-manifest.js +0 -92
- package/dist/manifests/edge-policy-manifest.js.map +0 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +0 -1792
- package/dist/manifests/infisical-runtime-manifest.js +0 -3090
- package/dist/manifests/infisical-runtime-manifest.js.map +0 -1
- package/dist/manifests/invariant-manifest.d.ts +0 -65
- package/dist/manifests/invariant-manifest.js +0 -18
- package/dist/manifests/invariant-manifest.js.map +0 -1
- package/dist/manifests/invariants/ast-utils.d.ts +0 -14
- package/dist/manifests/invariants/ast-utils.js +0 -54
- package/dist/manifests/invariants/ast-utils.js.map +0 -1
- package/dist/manifests/invariants/index.d.ts +0 -15
- package/dist/manifests/invariants/index.js +0 -183
- package/dist/manifests/invariants/index.js.map +0 -1
- package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +0 -12
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js +0 -94
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +0 -1
- package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +0 -12
- package/dist/manifests/invariants/inv-14-no-silent-transitions.js +0 -99
- package/dist/manifests/invariants/inv-14-no-silent-transitions.js.map +0 -1
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +0 -12
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +0 -42
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +0 -1
- package/dist/manifests/tenant-client-manifest.d.ts +0 -327
- package/dist/manifests/tenant-client-manifest.js +0 -449
- package/dist/manifests/tenant-client-manifest.js.map +0 -1
- package/dist/permit-principal-projection.contract.d.ts +0 -74
- package/dist/permit-principal-projection.contract.js +0 -167
- package/dist/permit-principal-projection.contract.js.map +0 -1
- package/dist/projections/check-convex-args-shape.d.ts +0 -3
- package/dist/projections/check-convex-args-shape.js +0 -403
- package/dist/projections/check-convex-args-shape.js.map +0 -1
- package/dist/projections/create-evidence.projection.d.ts +0 -176
- package/dist/projections/create-evidence.projection.js +0 -130
- package/dist/projections/create-evidence.projection.js.map +0 -1
- package/dist/projections/index.d.ts +0 -102
- package/dist/projections/index.js +0 -352
- package/dist/projections/index.js.map +0 -1
- package/dist/projections/list-beliefs.projection.d.ts +0 -36
- package/dist/projections/list-beliefs.projection.js +0 -54
- package/dist/projections/list-beliefs.projection.js.map +0 -1
- package/dist/projections/list-tasks.projection.d.ts +0 -44
- package/dist/projections/list-tasks.projection.js +0 -57
- package/dist/projections/list-tasks.projection.js.map +0 -1
- package/dist/projections/modulate-confidence.projection.d.ts +0 -219
- package/dist/projections/modulate-confidence.projection.js +0 -148
- package/dist/projections/modulate-confidence.projection.js.map +0 -1
- package/dist/projections/projection-dsl.d.ts +0 -11
- package/dist/projections/projection-dsl.js +0 -8
- package/dist/projections/projection-dsl.js.map +0 -1
- package/dist/proof-attestation.json +0 -45
- package/dist/schemas/tables/controlPlane/accessControl.d.ts +0 -260
- package/dist/schemas/tables/controlPlane/accessControl.js +0 -658
- package/dist/schemas/tables/controlPlane/accessControl.js.map +0 -1
- package/dist/schemas/tables/controlPlane/agent.js.map +0 -1
- package/dist/schemas/tables/controlPlane/epistemic.js.map +0 -1
- package/dist/schemas/tables/controlPlane/model.js.map +0 -1
- package/dist/schemas/tables/controlPlane/platform.js.map +0 -1
- package/dist/schemas/tables/controlPlane/project.js.map +0 -1
- package/dist/schemas/tables/controlPlane/user.js.map +0 -1
- package/dist/schemas/tables/kernel/events.d.ts +0 -21
- package/dist/schemas/tables/kernel/events.js +0 -43
- package/dist/schemas/tables/kernel/events.js.map +0 -1
- package/dist/tenant-bootstrap-seed.contract.d.ts +0 -1289
- package/dist/tenant-bootstrap-seed.contract.js +0 -764
- package/dist/tenant-bootstrap-seed.contract.js.map +0 -1
- package/dist/tenant-bootstrap-seed.defaults.d.ts +0 -16
- package/dist/tenant-bootstrap-seed.defaults.js +0 -321
- package/dist/tenant-bootstrap-seed.defaults.js.map +0 -1
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { v } from 'convex/values';
|
|
3
3
|
|
|
4
|
-
// src/function-registry/
|
|
5
|
-
|
|
6
|
-
// src/types/reasoning-method.ts
|
|
7
|
-
var REASONING_METHODS = [
|
|
8
|
-
"deductive",
|
|
9
|
-
"inductive",
|
|
10
|
-
"abductive",
|
|
11
|
-
"analogical",
|
|
12
|
-
"causal",
|
|
13
|
-
"correlational",
|
|
14
|
-
"testimonial",
|
|
15
|
-
"statistical",
|
|
16
|
-
"implicit",
|
|
17
|
-
"pattern_match"
|
|
18
|
-
];
|
|
4
|
+
// src/function-registry/helpers.ts
|
|
19
5
|
|
|
20
6
|
// src/lens-workflow.contract.ts
|
|
21
7
|
var LENS_PERSPECTIVE_TYPES = [
|
|
@@ -437,22 +423,7 @@ var ADD_WORKTREE = {
|
|
|
437
423
|
description: "Check out a branch into an active worktree for investigation. Like `git worktree add <branch>` \u2014 creates independent working state on a thematic branch. Beliefs committed within the worktree can be freely amended (draft code on a feature branch). When investigation is complete, `merge` integrates findings into main.",
|
|
438
424
|
parameters: {
|
|
439
425
|
title: { type: "string", description: "Worktree name/objective" },
|
|
440
|
-
|
|
441
|
-
type: "string",
|
|
442
|
-
description: "Optional storage-name alias for callers that already use backend naming"
|
|
443
|
-
},
|
|
444
|
-
projectId: {
|
|
445
|
-
type: "string",
|
|
446
|
-
description: "Legacy topicId alias or resolver hint"
|
|
447
|
-
},
|
|
448
|
-
topicId: {
|
|
449
|
-
type: "string",
|
|
450
|
-
description: "Optional topic scope hint for resolver validation"
|
|
451
|
-
},
|
|
452
|
-
topicHint: {
|
|
453
|
-
type: "string",
|
|
454
|
-
description: "Natural-language topic hint for automatic topic resolution"
|
|
455
|
-
},
|
|
426
|
+
topicId: { type: "string", description: "Optional topic scope hint" },
|
|
456
427
|
branchId: {
|
|
457
428
|
type: "string",
|
|
458
429
|
description: "The branch this worktree investigates"
|
|
@@ -465,107 +436,18 @@ var ADD_WORKTREE = {
|
|
|
465
436
|
type: "string",
|
|
466
437
|
description: "The testable claim this worktree investigates"
|
|
467
438
|
},
|
|
468
|
-
rationale: {
|
|
469
|
-
type: "string",
|
|
470
|
-
description: "Why this worktree exists and why it belongs in the campaign"
|
|
471
|
-
},
|
|
472
|
-
worktreeType: {
|
|
473
|
-
type: "string",
|
|
474
|
-
description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
|
|
475
|
-
},
|
|
476
|
-
gate: {
|
|
477
|
-
type: "string",
|
|
478
|
-
description: "Exit gate name for this worktree"
|
|
479
|
-
},
|
|
480
|
-
startDate: {
|
|
481
|
-
type: "number",
|
|
482
|
-
description: "Planned start timestamp in milliseconds since epoch"
|
|
483
|
-
},
|
|
484
|
-
endDate: {
|
|
485
|
-
type: "number",
|
|
486
|
-
description: "Planned end timestamp in milliseconds since epoch"
|
|
487
|
-
},
|
|
488
|
-
durationWeeks: {
|
|
489
|
-
type: "number",
|
|
490
|
-
description: "Planned duration in weeks"
|
|
491
|
-
},
|
|
492
|
-
confidenceImpact: {
|
|
493
|
-
type: "string",
|
|
494
|
-
description: "Expected confidence impact if the worktree succeeds",
|
|
495
|
-
enum: ["high", "medium", "low"]
|
|
496
|
-
},
|
|
497
|
-
beliefFocus: {
|
|
498
|
-
type: "string",
|
|
499
|
-
description: "Natural-language focus spanning the target belief neighborhood"
|
|
500
|
-
},
|
|
501
439
|
beliefIds: {
|
|
502
440
|
type: "array",
|
|
503
|
-
description: "
|
|
504
|
-
},
|
|
505
|
-
beliefs: {
|
|
506
|
-
type: "array",
|
|
507
|
-
description: "Legacy alias for targetBeliefIds"
|
|
508
|
-
},
|
|
509
|
-
targetBeliefIds: {
|
|
510
|
-
type: "array",
|
|
511
|
-
description: "Belief node IDs this worktree is expected to test or update"
|
|
512
|
-
},
|
|
513
|
-
targetQuestionIds: {
|
|
514
|
-
type: "array",
|
|
515
|
-
description: "Question node IDs this worktree is expected to answer"
|
|
516
|
-
},
|
|
517
|
-
keyQuestions: {
|
|
518
|
-
type: "array",
|
|
519
|
-
description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
|
|
520
|
-
},
|
|
521
|
-
evidenceSignals: {
|
|
522
|
-
type: "array",
|
|
523
|
-
description: "Evidence signal objects with signal, optional collected state, progress, and notes"
|
|
524
|
-
},
|
|
525
|
-
decisionGate: {
|
|
526
|
-
type: "object",
|
|
527
|
-
description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
|
|
528
|
-
},
|
|
529
|
-
goCriteria: {
|
|
530
|
-
type: "array",
|
|
531
|
-
description: "Shorthand go criteria used to build decisionGate"
|
|
532
|
-
},
|
|
533
|
-
noGoSignals: {
|
|
534
|
-
type: "array",
|
|
535
|
-
description: "Shorthand no-go signals used to build decisionGate"
|
|
536
|
-
},
|
|
537
|
-
proofArtifacts: {
|
|
538
|
-
type: "array",
|
|
539
|
-
description: "Expected proof artifacts required to close the worktree"
|
|
441
|
+
description: "Beliefs to test in this worktree"
|
|
540
442
|
},
|
|
541
443
|
autoShape: {
|
|
542
444
|
type: "boolean",
|
|
543
445
|
description: "Whether to invoke inquiry auto-shaping during worktree creation"
|
|
544
446
|
},
|
|
545
|
-
autoFixPolicy: {
|
|
546
|
-
type: "object",
|
|
547
|
-
description: "Policy for permitted automatic remediation inside the worktree"
|
|
548
|
-
},
|
|
549
447
|
domainPackId: {
|
|
550
448
|
type: "string",
|
|
551
449
|
description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
|
|
552
450
|
},
|
|
553
|
-
tags: {
|
|
554
|
-
type: "array",
|
|
555
|
-
description: "Additional topic-resolution tags for the worktree"
|
|
556
|
-
},
|
|
557
|
-
touchedPaths: {
|
|
558
|
-
type: "array",
|
|
559
|
-
description: "File paths used as topic-resolution signals"
|
|
560
|
-
},
|
|
561
|
-
sourceRef: {
|
|
562
|
-
type: "string",
|
|
563
|
-
description: "Source reference used as a topic-resolution signal"
|
|
564
|
-
},
|
|
565
|
-
sourceKind: {
|
|
566
|
-
type: "string",
|
|
567
|
-
description: "Source kind used as a topic-resolution signal"
|
|
568
|
-
},
|
|
569
451
|
campaign: {
|
|
570
452
|
type: "number",
|
|
571
453
|
description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
|
|
@@ -590,20 +472,12 @@ var ADD_WORKTREE = {
|
|
|
590
472
|
type: "array",
|
|
591
473
|
description: "Worktree IDs blocked by this worktree"
|
|
592
474
|
},
|
|
593
|
-
|
|
594
|
-
type: "string",
|
|
595
|
-
description: "Suggested staffing or agent allocation note"
|
|
596
|
-
},
|
|
597
|
-
lensId: {
|
|
475
|
+
gate: {
|
|
598
476
|
type: "string",
|
|
599
|
-
description: "
|
|
600
|
-
},
|
|
601
|
-
lastReconciledAt: {
|
|
602
|
-
type: "number",
|
|
603
|
-
description: "Timestamp when worktree metadata was last reconciled"
|
|
477
|
+
description: "Exit gate name for this worktree"
|
|
604
478
|
}
|
|
605
479
|
},
|
|
606
|
-
required: ["title"],
|
|
480
|
+
required: ["title", "topicId"],
|
|
607
481
|
response: {
|
|
608
482
|
description: "The created worktree",
|
|
609
483
|
fields: {
|
|
@@ -630,7 +504,7 @@ var MERGE = {
|
|
|
630
504
|
worktreeId: { type: "string", description: "The worktree to merge" },
|
|
631
505
|
outcomes: {
|
|
632
506
|
type: "array",
|
|
633
|
-
description: "
|
|
507
|
+
description: "Scoring outcomes for each belief: { beliefId, confidence, rationale }"
|
|
634
508
|
},
|
|
635
509
|
summary: { type: "string", description: "Overall findings summary" }
|
|
636
510
|
},
|
|
@@ -848,23 +722,19 @@ var FIND_CONTRADICTIONS = {
|
|
|
848
722
|
};
|
|
849
723
|
var CREATE_EDGE = {
|
|
850
724
|
name: "create_edge",
|
|
851
|
-
description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes.
|
|
725
|
+
description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes. The engine enforces layer transition rules \u2014 for example, L1 \u2192 L3 direct edges are forbidden (must go through L2).",
|
|
852
726
|
parameters: {
|
|
853
|
-
|
|
854
|
-
type: "
|
|
855
|
-
description: "Source
|
|
856
|
-
},
|
|
857
|
-
to: {
|
|
858
|
-
type: "object",
|
|
859
|
-
description: "Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }"
|
|
727
|
+
sourceId: {
|
|
728
|
+
type: "string",
|
|
729
|
+
description: "Source node of the relationship"
|
|
860
730
|
},
|
|
861
|
-
|
|
731
|
+
targetId: {
|
|
862
732
|
type: "string",
|
|
863
|
-
description: "
|
|
733
|
+
description: "Target node of the relationship"
|
|
864
734
|
},
|
|
865
|
-
|
|
735
|
+
edgeType: {
|
|
866
736
|
type: "string",
|
|
867
|
-
description: "
|
|
737
|
+
description: "Relationship type (informs, tests, depends_on, supersedes, etc.)"
|
|
868
738
|
},
|
|
869
739
|
weight: {
|
|
870
740
|
type: "number",
|
|
@@ -874,14 +744,10 @@ var CREATE_EDGE = {
|
|
|
874
744
|
reasoningMethod: {
|
|
875
745
|
type: "string",
|
|
876
746
|
description: "How this was determined",
|
|
877
|
-
enum: [
|
|
878
|
-
},
|
|
879
|
-
metadata: {
|
|
880
|
-
type: "object",
|
|
881
|
-
description: "Optional edge metadata."
|
|
747
|
+
enum: ["deductive", "inductive", "abductive", "analogical", "empirical"]
|
|
882
748
|
}
|
|
883
749
|
},
|
|
884
|
-
required: ["
|
|
750
|
+
required: ["sourceId", "targetId", "edgeType"],
|
|
885
751
|
response: {
|
|
886
752
|
description: "The created edge",
|
|
887
753
|
fields: {
|
|
@@ -895,240 +761,6 @@ var CREATE_EDGE = {
|
|
|
895
761
|
ontologyPrimitive: "edge",
|
|
896
762
|
tier: "showcase"
|
|
897
763
|
};
|
|
898
|
-
var UPDATE_EDGE = {
|
|
899
|
-
name: "update_edge",
|
|
900
|
-
description: "Amend metadata on an existing graph edge. Like `git commit --amend` \u2014 changes the edge annotation without recreating the relationship.",
|
|
901
|
-
parameters: {
|
|
902
|
-
edgeId: { type: "string", description: "Edge ID or global ID to update" },
|
|
903
|
-
weight: { type: "number", description: "Updated edge weight" },
|
|
904
|
-
confidence: { type: "number", description: "Updated confidence" },
|
|
905
|
-
context: { type: "string", description: "Updated human-readable context" },
|
|
906
|
-
derivationType: { type: "string", description: "Updated derivation type" },
|
|
907
|
-
metadata: { type: "object", description: "Updated metadata" }
|
|
908
|
-
},
|
|
909
|
-
required: ["edgeId"],
|
|
910
|
-
response: {
|
|
911
|
-
description: "Edge update result",
|
|
912
|
-
fields: { success: "boolean" }
|
|
913
|
-
},
|
|
914
|
-
ownerModule: "graph-primitives",
|
|
915
|
-
ontologyPrimitive: "edge",
|
|
916
|
-
tier: "workhorse"
|
|
917
|
-
};
|
|
918
|
-
var REMOVE_EDGE = {
|
|
919
|
-
name: "remove_edge",
|
|
920
|
-
description: "Remove one graph edge by ID. Like `git rm` \u2014 deletes a single explicit relationship from the spine.",
|
|
921
|
-
parameters: {
|
|
922
|
-
edgeId: { type: "string", description: "Edge ID or global ID to remove" }
|
|
923
|
-
},
|
|
924
|
-
required: ["edgeId"],
|
|
925
|
-
response: {
|
|
926
|
-
description: "Edge removal result",
|
|
927
|
-
fields: { success: "boolean" }
|
|
928
|
-
},
|
|
929
|
-
ownerModule: "graph-primitives",
|
|
930
|
-
ontologyPrimitive: "edge",
|
|
931
|
-
tier: "workhorse"
|
|
932
|
-
};
|
|
933
|
-
var REMOVE_EDGES_BETWEEN = {
|
|
934
|
-
name: "remove_edges_between",
|
|
935
|
-
description: "Remove graph edges between two nodes. Like `git rm <pathspec>` \u2014 deletes relationships matching a source, target, and optional type.",
|
|
936
|
-
parameters: {
|
|
937
|
-
fromNodeId: { type: "string", description: "Source node ID or global ID" },
|
|
938
|
-
toNodeId: { type: "string", description: "Target node ID or global ID" },
|
|
939
|
-
edgeType: { type: "string", description: "Optional edge type filter" }
|
|
940
|
-
},
|
|
941
|
-
required: ["fromNodeId", "toNodeId"],
|
|
942
|
-
response: {
|
|
943
|
-
description: "Matched edge removal result",
|
|
944
|
-
fields: { deleted: "number" }
|
|
945
|
-
},
|
|
946
|
-
ownerModule: "graph-primitives",
|
|
947
|
-
ontologyPrimitive: "edge",
|
|
948
|
-
tier: "workhorse"
|
|
949
|
-
};
|
|
950
|
-
var BATCH_CREATE_EDGES = {
|
|
951
|
-
name: "batch_create_edges",
|
|
952
|
-
description: "Commit multiple typed graph edges. Like `git commit` with many staged paths \u2014 writes a batch of explicit relationships atomically per edge.",
|
|
953
|
-
parameters: {
|
|
954
|
-
edges: {
|
|
955
|
-
type: "array",
|
|
956
|
-
description: "Edges to create, each with from, to, edgeType, and optional weight/confidence/context."
|
|
957
|
-
},
|
|
958
|
-
skipLayerValidation: {
|
|
959
|
-
type: "boolean",
|
|
960
|
-
description: "Skip kernel layer validation for trusted materialization flows."
|
|
961
|
-
}
|
|
962
|
-
},
|
|
963
|
-
required: ["edges"],
|
|
964
|
-
response: {
|
|
965
|
-
description: "Batch edge creation result",
|
|
966
|
-
fields: {
|
|
967
|
-
created: "number",
|
|
968
|
-
results: "array",
|
|
969
|
-
errors: "array"
|
|
970
|
-
}
|
|
971
|
-
},
|
|
972
|
-
ownerModule: "graph-primitives",
|
|
973
|
-
ontologyPrimitive: "edge",
|
|
974
|
-
tier: "workhorse"
|
|
975
|
-
};
|
|
976
|
-
var CREATE_EPISTEMIC_NODE = {
|
|
977
|
-
name: "create_epistemic_node",
|
|
978
|
-
description: "Commit a generic epistemic graph node. Like `git commit` \u2014 creates a canonical node in the public spine for topics, beliefs, evidence, questions, answers, sources, and entities.",
|
|
979
|
-
parameters: {
|
|
980
|
-
globalId: { type: "string", description: "Optional idempotent node global ID" },
|
|
981
|
-
nodeType: { type: "string", description: "Public epistemic node type" },
|
|
982
|
-
canonicalText: { type: "string", description: "Canonical node text" },
|
|
983
|
-
text: { type: "string", description: "Alias for canonicalText" },
|
|
984
|
-
contentHash: { type: "string", description: "Optional idempotency content hash" },
|
|
985
|
-
sourceType: { type: "string", description: "Source type for provenance" },
|
|
986
|
-
topicId: { type: "string", description: "Optional topic scope" },
|
|
987
|
-
content: { type: "string", description: "Extended content" },
|
|
988
|
-
title: { type: "string", description: "Display title" },
|
|
989
|
-
metadata: { type: "object", description: "Optional node metadata" }
|
|
990
|
-
},
|
|
991
|
-
required: ["nodeType"],
|
|
992
|
-
response: {
|
|
993
|
-
description: "Created node result",
|
|
994
|
-
fields: {
|
|
995
|
-
nodeId: "string",
|
|
996
|
-
nodeGlobalId: "string",
|
|
997
|
-
isDuplicate: "boolean"
|
|
998
|
-
}
|
|
999
|
-
},
|
|
1000
|
-
ownerModule: "reasoning-kernel",
|
|
1001
|
-
ontologyPrimitive: "graph",
|
|
1002
|
-
tier: "showcase"
|
|
1003
|
-
};
|
|
1004
|
-
var GET_EPISTEMIC_NODE = {
|
|
1005
|
-
name: "get_epistemic_node",
|
|
1006
|
-
description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
|
|
1007
|
-
parameters: {
|
|
1008
|
-
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
1009
|
-
},
|
|
1010
|
-
required: ["nodeId"],
|
|
1011
|
-
response: {
|
|
1012
|
-
description: "The resolved node",
|
|
1013
|
-
fields: { node: "object" }
|
|
1014
|
-
},
|
|
1015
|
-
ownerModule: "reasoning-kernel",
|
|
1016
|
-
ontologyPrimitive: "graph",
|
|
1017
|
-
tier: "workhorse"
|
|
1018
|
-
};
|
|
1019
|
-
var LIST_EPISTEMIC_NODES = {
|
|
1020
|
-
name: "list_epistemic_nodes",
|
|
1021
|
-
description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
|
|
1022
|
-
parameters: {
|
|
1023
|
-
topicId: { type: "string", description: "Optional topic scope" },
|
|
1024
|
-
nodeType: { type: "string", description: "Optional node type filter" },
|
|
1025
|
-
status: { type: "string", description: "Optional lifecycle status" },
|
|
1026
|
-
searchQuery: { type: "string", description: "Optional text search query" },
|
|
1027
|
-
limit: { type: "number", description: "Maximum nodes to return" }
|
|
1028
|
-
},
|
|
1029
|
-
required: [],
|
|
1030
|
-
response: {
|
|
1031
|
-
description: "Matching nodes",
|
|
1032
|
-
fields: { nodes: "array" }
|
|
1033
|
-
},
|
|
1034
|
-
ownerModule: "reasoning-kernel",
|
|
1035
|
-
ontologyPrimitive: "graph",
|
|
1036
|
-
tier: "workhorse"
|
|
1037
|
-
};
|
|
1038
|
-
var UPDATE_EPISTEMIC_NODE = {
|
|
1039
|
-
name: "update_epistemic_node",
|
|
1040
|
-
description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
|
|
1041
|
-
parameters: {
|
|
1042
|
-
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1043
|
-
canonicalText: { type: "string", description: "Updated canonical text" },
|
|
1044
|
-
text: { type: "string", description: "Alias for canonicalText" },
|
|
1045
|
-
contentHash: { type: "string", description: "Updated content hash" },
|
|
1046
|
-
content: { type: "string", description: "Updated content" },
|
|
1047
|
-
title: { type: "string", description: "Updated display title" },
|
|
1048
|
-
metadata: { type: "object", description: "Updated metadata" },
|
|
1049
|
-
confidence: { type: "number", description: "Updated confidence" },
|
|
1050
|
-
verificationStatus: { type: "string", description: "Updated verification status" },
|
|
1051
|
-
status: { type: "string", description: "Updated lifecycle status" }
|
|
1052
|
-
},
|
|
1053
|
-
required: ["nodeId"],
|
|
1054
|
-
response: {
|
|
1055
|
-
description: "Node update result",
|
|
1056
|
-
fields: { success: "boolean" }
|
|
1057
|
-
},
|
|
1058
|
-
ownerModule: "reasoning-kernel",
|
|
1059
|
-
ontologyPrimitive: "graph",
|
|
1060
|
-
tier: "workhorse"
|
|
1061
|
-
};
|
|
1062
|
-
var ARCHIVE_EPISTEMIC_NODE = {
|
|
1063
|
-
name: "archive_epistemic_node",
|
|
1064
|
-
description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
|
|
1065
|
-
parameters: {
|
|
1066
|
-
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
1067
|
-
},
|
|
1068
|
-
required: ["nodeId"],
|
|
1069
|
-
response: {
|
|
1070
|
-
description: "Archive result",
|
|
1071
|
-
fields: { success: "boolean", effectiveStatus: "string" }
|
|
1072
|
-
},
|
|
1073
|
-
ownerModule: "reasoning-kernel",
|
|
1074
|
-
ontologyPrimitive: "graph",
|
|
1075
|
-
tier: "workhorse"
|
|
1076
|
-
};
|
|
1077
|
-
var VERIFY_EPISTEMIC_NODE = {
|
|
1078
|
-
name: "verify_epistemic_node",
|
|
1079
|
-
description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
|
|
1080
|
-
parameters: {
|
|
1081
|
-
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1082
|
-
verificationStatus: { type: "string", description: "Verification status" },
|
|
1083
|
-
confidence: { type: "number", description: "Optional confidence update" }
|
|
1084
|
-
},
|
|
1085
|
-
required: ["nodeId", "verificationStatus"],
|
|
1086
|
-
response: {
|
|
1087
|
-
description: "Verification result",
|
|
1088
|
-
fields: { success: "boolean" }
|
|
1089
|
-
},
|
|
1090
|
-
ownerModule: "reasoning-kernel",
|
|
1091
|
-
ontologyPrimitive: "graph",
|
|
1092
|
-
tier: "workhorse"
|
|
1093
|
-
};
|
|
1094
|
-
var SUPERSEDE_EPISTEMIC_NODE = {
|
|
1095
|
-
name: "supersede_epistemic_node",
|
|
1096
|
-
description: "Supersede an epistemic graph node with a new version. Like `git commit --amend` on an immutable history branch \u2014 creates the replacement and marks the old node superseded.",
|
|
1097
|
-
parameters: {
|
|
1098
|
-
oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
|
|
1099
|
-
newGlobalId: { type: "string", description: "Optional replacement global ID" },
|
|
1100
|
-
newCanonicalText: { type: "string", description: "Replacement canonical text" },
|
|
1101
|
-
text: { type: "string", description: "Alias for newCanonicalText" },
|
|
1102
|
-
newContentHash: { type: "string", description: "Optional replacement content hash" },
|
|
1103
|
-
reason: { type: "string", description: "Reason for superseding" }
|
|
1104
|
-
},
|
|
1105
|
-
required: ["oldNodeId"],
|
|
1106
|
-
response: {
|
|
1107
|
-
description: "Supersede result",
|
|
1108
|
-
fields: { oldNodeId: "string", newNodeId: "string" }
|
|
1109
|
-
},
|
|
1110
|
-
ownerModule: "reasoning-kernel",
|
|
1111
|
-
ontologyPrimitive: "graph",
|
|
1112
|
-
tier: "workhorse"
|
|
1113
|
-
};
|
|
1114
|
-
var BATCH_CREATE_EPISTEMIC_NODES = {
|
|
1115
|
-
name: "batch_create_epistemic_nodes",
|
|
1116
|
-
description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
|
|
1117
|
-
parameters: {
|
|
1118
|
-
nodes: {
|
|
1119
|
-
type: "array",
|
|
1120
|
-
description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
|
|
1121
|
-
}
|
|
1122
|
-
},
|
|
1123
|
-
required: ["nodes"],
|
|
1124
|
-
response: {
|
|
1125
|
-
description: "Batch node creation result",
|
|
1126
|
-
fields: { created: "number", results: "array" }
|
|
1127
|
-
},
|
|
1128
|
-
ownerModule: "reasoning-kernel",
|
|
1129
|
-
ontologyPrimitive: "graph",
|
|
1130
|
-
tier: "workhorse"
|
|
1131
|
-
};
|
|
1132
764
|
var RECORD_JUDGMENT = {
|
|
1133
765
|
name: "record_judgment",
|
|
1134
766
|
description: "Record a judgment \u2014 an irreversible commitment based on the current epistemic state. Like a `git tag` marking a release. A judgment synthesizes beliefs, evidence, and uncertainties into a determination. Once issued, a judgment is evaluated against the epistemic state that existed when it was made (knowledge horizon evaluation, Invariant #10).",
|
|
@@ -1426,74 +1058,6 @@ var GET_GRAPH_STRUCTURE_ANALYSIS = {
|
|
|
1426
1058
|
ontologyPrimitive: "graph",
|
|
1427
1059
|
tier: "showcase"
|
|
1428
1060
|
};
|
|
1429
|
-
var LIST_GRAPH_INTELLIGENCE_QUERIES = {
|
|
1430
|
-
name: "list_graph_intelligence_queries",
|
|
1431
|
-
description: "List the Graph Intelligence query catalog that powers structural graph analysis experiences. Returns categories, query IDs, prompt templates, modes, and the public tool plan each query can use.",
|
|
1432
|
-
parameters: {
|
|
1433
|
-
categoryId: {
|
|
1434
|
-
type: "string",
|
|
1435
|
-
description: "Optional category filter, such as problems or strategic"
|
|
1436
|
-
},
|
|
1437
|
-
mode: {
|
|
1438
|
-
type: "string",
|
|
1439
|
-
description: "Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence"
|
|
1440
|
-
}
|
|
1441
|
-
},
|
|
1442
|
-
required: [],
|
|
1443
|
-
response: {
|
|
1444
|
-
description: "Graph Intelligence query catalog and mode-to-tool mapping",
|
|
1445
|
-
fields: {
|
|
1446
|
-
categories: "array \u2014 query categories",
|
|
1447
|
-
queries: "array \u2014 query definitions with prompt templates and tools",
|
|
1448
|
-
quickQueries: "array \u2014 recommended one-click query presets",
|
|
1449
|
-
publicToolNamesByMode: "object \u2014 public tool names available to each Graph Intelligence mode"
|
|
1450
|
-
}
|
|
1451
|
-
},
|
|
1452
|
-
ownerModule: "graph-intelligence",
|
|
1453
|
-
ontologyPrimitive: "graph",
|
|
1454
|
-
tier: "showcase"
|
|
1455
|
-
};
|
|
1456
|
-
var RUN_GRAPH_INTELLIGENCE_QUERY = {
|
|
1457
|
-
name: "run_graph_intelligence_query",
|
|
1458
|
-
description: "Run a named Graph Intelligence query against a tenant topic graph. Returns the selected query, prompt, deterministic graph-analysis bundle, graph context, and public tool plan for model synthesis.",
|
|
1459
|
-
parameters: {
|
|
1460
|
-
topicId: { type: "string", description: "Topic to analyze" },
|
|
1461
|
-
queryId: {
|
|
1462
|
-
type: "string",
|
|
1463
|
-
description: "Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary"
|
|
1464
|
-
},
|
|
1465
|
-
prompt: {
|
|
1466
|
-
type: "string",
|
|
1467
|
-
description: "Optional custom prompt for custom analysis runs"
|
|
1468
|
-
},
|
|
1469
|
-
input: {
|
|
1470
|
-
type: "string",
|
|
1471
|
-
description: "Optional entity, theme, belief, company, or search text for input-driven queries"
|
|
1472
|
-
},
|
|
1473
|
-
mode: {
|
|
1474
|
-
type: "string",
|
|
1475
|
-
description: "Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence"
|
|
1476
|
-
},
|
|
1477
|
-
limit: {
|
|
1478
|
-
type: "number",
|
|
1479
|
-
description: "Maximum graph context rows to return"
|
|
1480
|
-
}
|
|
1481
|
-
},
|
|
1482
|
-
required: ["topicId"],
|
|
1483
|
-
response: {
|
|
1484
|
-
description: "Graph Intelligence query result bundle ready for model or prompt-library synthesis",
|
|
1485
|
-
fields: {
|
|
1486
|
-
query: "object \u2014 selected query definition",
|
|
1487
|
-
prompt: "string \u2014 resolved prompt template",
|
|
1488
|
-
toolPlan: "array \u2014 public tools and args the model can call next",
|
|
1489
|
-
analysis: "object \u2014 structure, coverage, gap, and confirmation-bias analysis",
|
|
1490
|
-
context: "object \u2014 sampled beliefs, questions, evidence, edges, and contradictions"
|
|
1491
|
-
}
|
|
1492
|
-
},
|
|
1493
|
-
ownerModule: "graph-intelligence",
|
|
1494
|
-
ontologyPrimitive: "graph",
|
|
1495
|
-
tier: "showcase"
|
|
1496
|
-
};
|
|
1497
1061
|
var GET_FALSIFICATION_QUESTIONS = {
|
|
1498
1062
|
name: "get_falsification_questions",
|
|
1499
1063
|
description: "Generate Popperian falsification questions for beliefs. Like `git test` \u2014 identifies the questions most likely to disprove current beliefs. Karl Popper as a tool: surfaces what would need to be true to invalidate each belief.",
|
|
@@ -2328,8 +1892,8 @@ var IDENTITY_WHOAMI = {
|
|
|
2328
1892
|
response: {
|
|
2329
1893
|
description: "Canonical identity summary for the current session",
|
|
2330
1894
|
fields: {
|
|
2331
|
-
principalId: "string \u2014 canonical principal identifier
|
|
2332
|
-
principalType: "string \u2014 human, service,
|
|
1895
|
+
principalId: "string \u2014 canonical federated principal identifier",
|
|
1896
|
+
principalType: "string \u2014 human, service, or agent",
|
|
2333
1897
|
tenantId: "string | undefined \u2014 resolved tenant scope",
|
|
2334
1898
|
workspaceId: "string | undefined \u2014 resolved workspace scope",
|
|
2335
1899
|
scopes: "string[] | undefined \u2014 granted scopes for this session",
|
|
@@ -2340,60 +1904,17 @@ var IDENTITY_WHOAMI = {
|
|
|
2340
1904
|
ontologyPrimitive: "identity",
|
|
2341
1905
|
tier: "workhorse"
|
|
2342
1906
|
};
|
|
2343
|
-
var RESOLVE_INTERACTIVE_PRINCIPAL = {
|
|
2344
|
-
name: "resolve_interactive_principal",
|
|
2345
|
-
description: "Read the Permit-backed Lucern principal context for an authenticated Clerk user. Like `git config --get user.email` plus the repository ACL \u2014 resolves the Clerk subject into tenant/workspace authorization context.",
|
|
2346
|
-
parameters: {
|
|
2347
|
-
clerkId: {
|
|
2348
|
-
type: "string",
|
|
2349
|
-
description: "Authenticated Clerk subject (`sub`). Clerk proves identity only; it is not the authorization record."
|
|
2350
|
-
},
|
|
2351
|
-
tenantId: {
|
|
2352
|
-
type: "string",
|
|
2353
|
-
description: "Optional tenant scope. Omit only when the Clerk alias is globally unambiguous."
|
|
2354
|
-
},
|
|
2355
|
-
workspaceId: {
|
|
2356
|
-
type: "string",
|
|
2357
|
-
description: "Optional workspace scope. Required when the principal has access to multiple workspaces and no default can be inferred."
|
|
2358
|
-
},
|
|
2359
|
-
providerProjectId: {
|
|
2360
|
-
type: "string",
|
|
2361
|
-
description: "Optional Clerk project or provider instance id for tenants with multiple identity providers."
|
|
2362
|
-
}
|
|
2363
|
-
},
|
|
2364
|
-
required: ["clerkId"],
|
|
2365
|
-
response: {
|
|
2366
|
-
description: "Permit-backed Lucern principal context for tenant SDK bootstrap",
|
|
2367
|
-
fields: {
|
|
2368
|
-
principalId: "string \u2014 canonical Clerk user_... ID for human sessions",
|
|
2369
|
-
principalType: "string \u2014 human, service, agent, group, or external_viewer",
|
|
2370
|
-
clerkId: "string \u2014 authenticated Clerk subject alias",
|
|
2371
|
-
tenantId: "string \u2014 resolved tenant scope",
|
|
2372
|
-
workspaceId: "string | null \u2014 resolved workspace scope",
|
|
2373
|
-
roles: "string[] \u2014 effective Permit roles",
|
|
2374
|
-
scopes: "string[] \u2014 effective scopes derived from Permit/control-plane projection",
|
|
2375
|
-
groupIds: "string[] \u2014 active Permit group memberships",
|
|
2376
|
-
principalStatus: "string \u2014 active, invited, suspended, disabled, revoked, or missing",
|
|
2377
|
-
tenantStatus: "string \u2014 projected tenant resource status",
|
|
2378
|
-
workspaceStatus: "string \u2014 projected workspace resource status",
|
|
2379
|
-
permit: "object \u2014 Permit subject, tenant, and optional workspace tuple"
|
|
2380
|
-
}
|
|
2381
|
-
},
|
|
2382
|
-
ownerModule: "control-plane",
|
|
2383
|
-
ontologyPrimitive: "identity",
|
|
2384
|
-
tier: "workhorse"
|
|
2385
|
-
};
|
|
2386
1907
|
var COMPILE_CONTEXT = {
|
|
2387
1908
|
name: "compile_context",
|
|
2388
|
-
description: "Compile a focused reasoning context
|
|
1909
|
+
description: "Compile a focused reasoning context for a topic. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
|
|
2389
1910
|
parameters: {
|
|
2390
1911
|
topicId: {
|
|
2391
1912
|
type: "string",
|
|
2392
|
-
description: "
|
|
1913
|
+
description: "Topic scope ID to compile"
|
|
2393
1914
|
},
|
|
2394
1915
|
query: {
|
|
2395
1916
|
type: "string",
|
|
2396
|
-
description: "
|
|
1917
|
+
description: "Optional focus query used to rank context items"
|
|
2397
1918
|
},
|
|
2398
1919
|
budget: {
|
|
2399
1920
|
type: "number",
|
|
@@ -2417,7 +1938,7 @@ var COMPILE_CONTEXT = {
|
|
|
2417
1938
|
description: "Include related ontological entities in the compiled result"
|
|
2418
1939
|
}
|
|
2419
1940
|
},
|
|
2420
|
-
required: [],
|
|
1941
|
+
required: ["topicId"],
|
|
2421
1942
|
response: {
|
|
2422
1943
|
description: "Compiled context pack for the requested topic",
|
|
2423
1944
|
fields: {
|
|
@@ -2591,64 +2112,18 @@ var CREATE_TASK = {
|
|
|
2591
2112
|
name: "create_task",
|
|
2592
2113
|
description: "Create an execution task tied to the reasoning state. Like `git task` \u2014 tracks concrete work items (calls to make, data to gather, analyses to run) linked to questions, beliefs, or worktrees.",
|
|
2593
2114
|
parameters: {
|
|
2594
|
-
title: { type: "string", description: "Task
|
|
2115
|
+
title: { type: "string", description: "Task description" },
|
|
2595
2116
|
topicId: { type: "string", description: "Topic scope" },
|
|
2596
|
-
description: {
|
|
2597
|
-
type: "string",
|
|
2598
|
-
description: "Long-form task description"
|
|
2599
|
-
},
|
|
2600
2117
|
taskType: {
|
|
2601
2118
|
type: "string",
|
|
2602
|
-
description: "
|
|
2603
|
-
enum: [
|
|
2604
|
-
"general",
|
|
2605
|
-
"find_evidence",
|
|
2606
|
-
"verify_claim",
|
|
2607
|
-
"research",
|
|
2608
|
-
"review",
|
|
2609
|
-
"interview",
|
|
2610
|
-
"analysis",
|
|
2611
|
-
"track_metrics"
|
|
2612
|
-
]
|
|
2613
|
-
},
|
|
2614
|
-
priority: {
|
|
2615
|
-
type: "string",
|
|
2616
|
-
description: "Priority",
|
|
2617
|
-
enum: ["urgent", "high", "medium", "low"]
|
|
2618
|
-
},
|
|
2619
|
-
status: {
|
|
2620
|
-
type: "string",
|
|
2621
|
-
description: "Initial status (defaults to todo)",
|
|
2622
|
-
enum: ["todo", "in_progress", "blocked", "done"]
|
|
2623
|
-
},
|
|
2624
|
-
linkedWorktreeId: {
|
|
2625
|
-
type: "string",
|
|
2626
|
-
description: "Worktree this task belongs to"
|
|
2627
|
-
},
|
|
2628
|
-
linkedBeliefId: {
|
|
2629
|
-
type: "string",
|
|
2630
|
-
description: "Belief this task supports"
|
|
2119
|
+
description: "Type: research, interview, analysis, data_collection",
|
|
2120
|
+
enum: ["research", "interview", "analysis", "data_collection"]
|
|
2631
2121
|
},
|
|
2632
2122
|
linkedQuestionId: {
|
|
2633
2123
|
type: "string",
|
|
2634
2124
|
description: "Question this task addresses"
|
|
2635
2125
|
},
|
|
2636
|
-
|
|
2637
|
-
type: "string",
|
|
2638
|
-
description: "Principal assigned to the task"
|
|
2639
|
-
},
|
|
2640
|
-
dueDate: {
|
|
2641
|
-
type: "number",
|
|
2642
|
-
description: "Due date as epoch milliseconds"
|
|
2643
|
-
},
|
|
2644
|
-
tags: {
|
|
2645
|
-
type: "array",
|
|
2646
|
-
description: "Free-form string tags"
|
|
2647
|
-
},
|
|
2648
|
-
metadata: {
|
|
2649
|
-
type: "object",
|
|
2650
|
-
description: "Structured task metadata for handoff context and routing hints"
|
|
2651
|
-
}
|
|
2126
|
+
linkedWorktreeId: { type: "string", description: "Worktree scope" }
|
|
2652
2127
|
},
|
|
2653
2128
|
required: ["title"],
|
|
2654
2129
|
response: {
|
|
@@ -2721,10 +2196,6 @@ var UPDATE_TASK = {
|
|
|
2721
2196
|
type: "string",
|
|
2722
2197
|
description: "Updated status",
|
|
2723
2198
|
enum: ["todo", "in_progress", "blocked", "done"]
|
|
2724
|
-
},
|
|
2725
|
-
metadata: {
|
|
2726
|
-
type: "object",
|
|
2727
|
-
description: "Structured task metadata to replace or refine"
|
|
2728
2199
|
}
|
|
2729
2200
|
},
|
|
2730
2201
|
required: ["taskId"],
|
|
@@ -2772,10 +2243,6 @@ var CREATE_TOPIC = {
|
|
|
2772
2243
|
name: "create_topic",
|
|
2773
2244
|
description: "Create a new topic container for scoping knowledge. Like `git init` \u2014 initializes a new repository for a knowledge domain. Topics are hierarchical: a deal topic can nest under a theme topic. Types: domain, theme, deal, strategy, constitution, project, portfolio.",
|
|
2774
2245
|
parameters: {
|
|
2775
|
-
globalId: {
|
|
2776
|
-
type: "string",
|
|
2777
|
-
description: "Optional idempotent topic global ID"
|
|
2778
|
-
},
|
|
2779
2246
|
name: { type: "string", description: "Topic name" },
|
|
2780
2247
|
type: {
|
|
2781
2248
|
type: "string",
|
|
@@ -2786,18 +2253,6 @@ var CREATE_TOPIC = {
|
|
|
2786
2253
|
type: "string",
|
|
2787
2254
|
description: "Optional parent topic for nesting"
|
|
2788
2255
|
},
|
|
2789
|
-
parentTopicGlobalId: {
|
|
2790
|
-
type: "string",
|
|
2791
|
-
description: "Optional parent topic global ID for nesting"
|
|
2792
|
-
},
|
|
2793
|
-
tenantId: { type: "string", description: "Optional tenant scope" },
|
|
2794
|
-
workspaceId: { type: "string", description: "Optional workspace scope" },
|
|
2795
|
-
visibility: {
|
|
2796
|
-
type: "string",
|
|
2797
|
-
description: "Topic visibility",
|
|
2798
|
-
enum: ["private", "team", "firm", "external", "public"]
|
|
2799
|
-
},
|
|
2800
|
-
metadata: { type: "object", description: "Optional topic metadata" },
|
|
2801
2256
|
createdBy: { type: "string", description: "Who created this topic" }
|
|
2802
2257
|
},
|
|
2803
2258
|
required: ["name", "type"],
|
|
@@ -2806,9 +2261,6 @@ var CREATE_TOPIC = {
|
|
|
2806
2261
|
fields: {
|
|
2807
2262
|
id: "string \u2014 topic ID",
|
|
2808
2263
|
globalId: "string \u2014 globally unique ID",
|
|
2809
|
-
topicGlobalId: "string \u2014 topic global ID",
|
|
2810
|
-
epistemicNodeId: "string \u2014 materialized topic node ID",
|
|
2811
|
-
epistemicNodeGlobalId: "string \u2014 materialized topic node global ID",
|
|
2812
2264
|
depth: "number \u2014 nesting depth"
|
|
2813
2265
|
}
|
|
2814
2266
|
},
|
|
@@ -2939,65 +2391,6 @@ var GET_TOPIC_TREE = {
|
|
|
2939
2391
|
ontologyPrimitive: "graph",
|
|
2940
2392
|
tier: "workhorse"
|
|
2941
2393
|
};
|
|
2942
|
-
var MATERIALIZE_TOPIC_GRAPH = {
|
|
2943
|
-
name: "materialize_topic_graph",
|
|
2944
|
-
description: "Backfill the topic graph spine. Like `git fsck --connectivity-only` with repair enabled \u2014 creates missing topic nodes and parent-child edges idempotently.",
|
|
2945
|
-
parameters: {
|
|
2946
|
-
rootTopicId: {
|
|
2947
|
-
type: "string",
|
|
2948
|
-
description: "Optional root topic for a bounded materialization pass"
|
|
2949
|
-
},
|
|
2950
|
-
dryRun: {
|
|
2951
|
-
type: "boolean",
|
|
2952
|
-
description: "When true, report missing rows without writing them"
|
|
2953
|
-
}
|
|
2954
|
-
},
|
|
2955
|
-
required: [],
|
|
2956
|
-
response: {
|
|
2957
|
-
description: "Topic graph materialization counts",
|
|
2958
|
-
fields: {
|
|
2959
|
-
topicsSeen: "number",
|
|
2960
|
-
nodesCreated: "number",
|
|
2961
|
-
nodesExisting: "number",
|
|
2962
|
-
edgesCreated: "number",
|
|
2963
|
-
edgesExisting: "number",
|
|
2964
|
-
errors: "array"
|
|
2965
|
-
}
|
|
2966
|
-
},
|
|
2967
|
-
ownerModule: "reasoning-kernel",
|
|
2968
|
-
ontologyPrimitive: "graph",
|
|
2969
|
-
tier: "workhorse"
|
|
2970
|
-
};
|
|
2971
|
-
var GET_TOPIC_GRAPH_SPINE = {
|
|
2972
|
-
name: "get_topic_graph_spine",
|
|
2973
|
-
description: "Verify the topic graph spine. Like `git fsck` \u2014 reads topics, materialized topic nodes, parent-child edges, and missing spine rows.",
|
|
2974
|
-
parameters: {
|
|
2975
|
-
rootTopicId: {
|
|
2976
|
-
type: "string",
|
|
2977
|
-
description: "Optional root topic for a bounded verifier pass"
|
|
2978
|
-
},
|
|
2979
|
-
includeTopicBeliefEdges: {
|
|
2980
|
-
type: "boolean",
|
|
2981
|
-
description: "Include topic -> belief edges in the verifier payload"
|
|
2982
|
-
}
|
|
2983
|
-
},
|
|
2984
|
-
required: [],
|
|
2985
|
-
response: {
|
|
2986
|
-
description: "Topic graph spine verification payload",
|
|
2987
|
-
fields: {
|
|
2988
|
-
ok: "boolean",
|
|
2989
|
-
counts: "object",
|
|
2990
|
-
topics: "array",
|
|
2991
|
-
topicNodes: "array",
|
|
2992
|
-
parentEdges: "array",
|
|
2993
|
-
missingTopicNodes: "array",
|
|
2994
|
-
missingParentEdges: "array"
|
|
2995
|
-
}
|
|
2996
|
-
},
|
|
2997
|
-
ownerModule: "reasoning-kernel",
|
|
2998
|
-
ontologyPrimitive: "graph",
|
|
2999
|
-
tier: "workhorse"
|
|
3000
|
-
};
|
|
3001
2394
|
var GET_CODE_CONTEXT = {
|
|
3002
2395
|
name: "get_code_context",
|
|
3003
2396
|
description: "Returns code-grounded beliefs, contracts, migration states, and failed attempts anchored to a specific file or function path. Like `git log -- <path>` \u2014 filters the knowledge graph to nodes anchored to a file path via metadata.codeAnchors. Results are separated by coding belief type: decisions, contracts, migrations, patterns, deprecations, and failures.",
|
|
@@ -3193,7 +2586,7 @@ var MANAGE_WRITE_POLICY = {
|
|
|
3193
2586
|
},
|
|
3194
2587
|
role: {
|
|
3195
2588
|
type: "string",
|
|
3196
|
-
description: "Role to set policy for (required for 'set'). E.g. 'agent:internal'
|
|
2589
|
+
description: "Role to set policy for (required for 'set'). E.g. 'agent:internal', 'user:analyst'."
|
|
3197
2590
|
},
|
|
3198
2591
|
permission: {
|
|
3199
2592
|
type: "string",
|
|
@@ -4130,72 +3523,6 @@ var GENERATE_SESSION_HANDOFF = {
|
|
|
4130
3523
|
tier: "showcase",
|
|
4131
3524
|
internal: true
|
|
4132
3525
|
};
|
|
4133
|
-
var BEGIN_BUILD_SESSION = {
|
|
4134
|
-
name: "begin_build_session",
|
|
4135
|
-
description: "Bootstrap a coding build session for a Lucern worktree. Like `git worktree add` plus `git status` \u2014 returns the compact context packet an agent needs before editing.",
|
|
4136
|
-
parameters: {
|
|
4137
|
-
worktreeId: {
|
|
4138
|
-
type: "string",
|
|
4139
|
-
description: "The Lucern worktree ID to bootstrap."
|
|
4140
|
-
},
|
|
4141
|
-
branch: {
|
|
4142
|
-
type: "string",
|
|
4143
|
-
description: "Optional git branch name. Auto-generated from the worktree name when omitted."
|
|
4144
|
-
},
|
|
4145
|
-
branchBase: {
|
|
4146
|
-
type: "string",
|
|
4147
|
-
description: 'Base branch for the feature branch. Default: "staging".'
|
|
4148
|
-
},
|
|
4149
|
-
prBase: {
|
|
4150
|
-
type: "string",
|
|
4151
|
-
description: 'Target branch for the PR. Default: "staging".'
|
|
4152
|
-
},
|
|
4153
|
-
sessionMode: {
|
|
4154
|
-
type: "string",
|
|
4155
|
-
description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
|
|
4156
|
-
enum: ["async", "interactive"]
|
|
4157
|
-
},
|
|
4158
|
-
activateIfPlanning: {
|
|
4159
|
-
type: "boolean",
|
|
4160
|
-
description: "When true, automatically activate a planning worktree during bootstrap."
|
|
4161
|
-
}
|
|
4162
|
-
},
|
|
4163
|
-
required: ["worktreeId"],
|
|
4164
|
-
response: {
|
|
4165
|
-
description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
|
|
4166
|
-
fields: {
|
|
4167
|
-
topicId: "string \u2014 canonical topic scope",
|
|
4168
|
-
topicName: "string \u2014 human-readable topic name",
|
|
4169
|
-
worktreeId: "string \u2014 worktree ID",
|
|
4170
|
-
worktreeName: "string \u2014 human-readable worktree name",
|
|
4171
|
-
branch: "string \u2014 git branch name",
|
|
4172
|
-
branchBase: "string \u2014 base branch",
|
|
4173
|
-
prBase: "string \u2014 PR target branch",
|
|
4174
|
-
campaign: "number | null \u2014 top-level pipeline campaign",
|
|
4175
|
-
lane: "string \u2014 campaign lane",
|
|
4176
|
-
gate: "string \u2014 exit gate",
|
|
4177
|
-
hypothesis: "string \u2014 worktree hypothesis",
|
|
4178
|
-
focus: "string \u2014 session focus",
|
|
4179
|
-
status: "string \u2014 worktree status after optional activation",
|
|
4180
|
-
sessionMode: "string \u2014 async | interactive",
|
|
4181
|
-
targetBeliefIds: "array \u2014 scoped belief IDs",
|
|
4182
|
-
targetQuestionIds: "array \u2014 scoped question IDs",
|
|
4183
|
-
taskIds: "array \u2014 assigned task IDs for this worktree",
|
|
4184
|
-
incompleteTaskIds: "array \u2014 assigned task IDs that still require done/deferred/blocked proof",
|
|
4185
|
-
tasks: "array \u2014 assigned task packet with id, title, status, priority, links, and summaries",
|
|
4186
|
-
topBeliefs: "array \u2014 highest-confidence scoped beliefs",
|
|
4187
|
-
openQuestions: "array \u2014 open scoped questions",
|
|
4188
|
-
resolvedDecisions: "array \u2014 answered questions summarized for the session",
|
|
4189
|
-
dependencies: "array \u2014 upstream worktrees",
|
|
4190
|
-
unblocks: "array \u2014 downstream worktrees",
|
|
4191
|
-
mergeOrderNotes: "string \u2014 merge ordering advisory"
|
|
4192
|
-
}
|
|
4193
|
-
},
|
|
4194
|
-
ownerModule: "bootstrap",
|
|
4195
|
-
ontologyPrimitive: "worktree",
|
|
4196
|
-
tier: "showcase",
|
|
4197
|
-
internal: true
|
|
4198
|
-
};
|
|
4199
3526
|
var MCP_TOOL_CONTRACTS = {
|
|
4200
3527
|
// Belief lifecycle (commit, amend, fork, archive)
|
|
4201
3528
|
create_belief: CREATE_BELIEF,
|
|
@@ -4238,26 +3565,11 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
4238
3565
|
bisect_confidence: BISECT_CONFIDENCE,
|
|
4239
3566
|
// Edges (commit)
|
|
4240
3567
|
create_edge: CREATE_EDGE,
|
|
4241
|
-
update_edge: UPDATE_EDGE,
|
|
4242
|
-
remove_edge: REMOVE_EDGE,
|
|
4243
|
-
remove_edges_between: REMOVE_EDGES_BETWEEN,
|
|
4244
|
-
batch_create_edges: BATCH_CREATE_EDGES,
|
|
4245
|
-
// Epistemic node spine (commit/amend/show)
|
|
4246
|
-
create_epistemic_node: CREATE_EPISTEMIC_NODE,
|
|
4247
|
-
get_epistemic_node: GET_EPISTEMIC_NODE,
|
|
4248
|
-
list_epistemic_nodes: LIST_EPISTEMIC_NODES,
|
|
4249
|
-
update_epistemic_node: UPDATE_EPISTEMIC_NODE,
|
|
4250
|
-
archive_epistemic_node: ARCHIVE_EPISTEMIC_NODE,
|
|
4251
|
-
verify_epistemic_node: VERIFY_EPISTEMIC_NODE,
|
|
4252
|
-
supersede_epistemic_node: SUPERSEDE_EPISTEMIC_NODE,
|
|
4253
|
-
batch_create_epistemic_nodes: BATCH_CREATE_EPISTEMIC_NODES,
|
|
4254
3568
|
// Judgments (tag)
|
|
4255
3569
|
record_judgment: RECORD_JUDGMENT,
|
|
4256
3570
|
// Graph intelligence (showcase)
|
|
4257
3571
|
detect_confirmation_bias: DETECT_CONFIRMATION_BIAS,
|
|
4258
3572
|
get_graph_structure_analysis: GET_GRAPH_STRUCTURE_ANALYSIS,
|
|
4259
|
-
list_graph_intelligence_queries: LIST_GRAPH_INTELLIGENCE_QUERIES,
|
|
4260
|
-
run_graph_intelligence_query: RUN_GRAPH_INTELLIGENCE_QUERY,
|
|
4261
3573
|
get_falsification_questions: GET_FALSIFICATION_QUESTIONS,
|
|
4262
3574
|
// Evidence operations (workhorse)
|
|
4263
3575
|
search_evidence: SEARCH_EVIDENCE,
|
|
@@ -4285,7 +3597,6 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
4285
3597
|
update_worktree_targets: UPDATE_WORKTREE_TARGETS,
|
|
4286
3598
|
update_worktree_metadata: UPDATE_WORKTREE_METADATA,
|
|
4287
3599
|
identity_whoami: IDENTITY_WHOAMI,
|
|
4288
|
-
resolve_interactive_principal: RESOLVE_INTERACTIVE_PRINCIPAL,
|
|
4289
3600
|
compile_context: COMPILE_CONTEXT,
|
|
4290
3601
|
record_scope_learning: RECORD_SCOPE_LEARNING,
|
|
4291
3602
|
pipeline_snapshot: PIPELINE_SNAPSHOT,
|
|
@@ -4305,7 +3616,6 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
4305
3616
|
get_agent_inbox: GET_AGENT_INBOX,
|
|
4306
3617
|
claim_files: CLAIM_FILES,
|
|
4307
3618
|
generate_session_handoff: GENERATE_SESSION_HANDOFF,
|
|
4308
|
-
begin_build_session: BEGIN_BUILD_SESSION,
|
|
4309
3619
|
// Policy / ACL (workhorse)
|
|
4310
3620
|
check_permission: CHECK_PERMISSION,
|
|
4311
3621
|
filter_by_permission: FILTER_BY_PERMISSION,
|
|
@@ -4325,8 +3635,6 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
4325
3635
|
get_topic: GET_TOPIC,
|
|
4326
3636
|
update_topic: UPDATE_TOPIC,
|
|
4327
3637
|
get_topic_tree: GET_TOPIC_TREE,
|
|
4328
|
-
materialize_topic_graph: MATERIALIZE_TOPIC_GRAPH,
|
|
4329
|
-
get_topic_graph_spine: GET_TOPIC_GRAPH_SPINE,
|
|
4330
3638
|
// Coding intelligence (code-grounded knowledge)
|
|
4331
3639
|
get_code_context: GET_CODE_CONTEXT,
|
|
4332
3640
|
get_change_history: GET_CHANGE_HISTORY,
|
|
@@ -4403,7 +3711,6 @@ function entries(names, surfaceClass, surfaceIntent, surfaces, rationale) {
|
|
|
4403
3711
|
var MCP_CORE_OPERATION_NAMES = [
|
|
4404
3712
|
"compile_context",
|
|
4405
3713
|
"identity_whoami",
|
|
4406
|
-
"resolve_interactive_principal",
|
|
4407
3714
|
"check_permission",
|
|
4408
3715
|
"filter_by_permission",
|
|
4409
3716
|
"create_belief",
|
|
@@ -4432,34 +3739,18 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
4432
3739
|
"find_missing_questions",
|
|
4433
3740
|
"get_high_priority_questions",
|
|
4434
3741
|
"get_falsification_questions",
|
|
4435
|
-
"create_epistemic_node",
|
|
4436
|
-
"get_epistemic_node",
|
|
4437
|
-
"list_epistemic_nodes",
|
|
4438
|
-
"update_epistemic_node",
|
|
4439
|
-
"archive_epistemic_node",
|
|
4440
|
-
"verify_epistemic_node",
|
|
4441
|
-
"supersede_epistemic_node",
|
|
4442
|
-
"batch_create_epistemic_nodes",
|
|
4443
3742
|
"create_topic",
|
|
4444
3743
|
"get_topic",
|
|
4445
3744
|
"list_topics",
|
|
4446
3745
|
"update_topic",
|
|
4447
|
-
"get_topic_tree"
|
|
4448
|
-
"materialize_topic_graph",
|
|
4449
|
-
"get_topic_graph_spine"
|
|
3746
|
+
"get_topic_tree"
|
|
4450
3747
|
];
|
|
4451
3748
|
var MCP_ANALYSIS_PLATFORM_OPERATION_NAMES = [
|
|
4452
3749
|
"create_edge",
|
|
4453
|
-
"update_edge",
|
|
4454
|
-
"remove_edge",
|
|
4455
|
-
"remove_edges_between",
|
|
4456
|
-
"batch_create_edges",
|
|
4457
3750
|
"query_lineage",
|
|
4458
3751
|
"traverse_graph",
|
|
4459
3752
|
"get_graph_neighborhood",
|
|
4460
3753
|
"get_graph_structure_analysis",
|
|
4461
|
-
"list_graph_intelligence_queries",
|
|
4462
|
-
"run_graph_intelligence_query",
|
|
4463
3754
|
"find_contradictions",
|
|
4464
3755
|
"flag_contradiction",
|
|
4465
3756
|
"detect_confirmation_bias",
|
|
@@ -4538,7 +3829,6 @@ var PLATFORM_INTERNAL_OPERATION_NAMES = [
|
|
|
4538
3829
|
"get_change_history",
|
|
4539
3830
|
"get_failure_log",
|
|
4540
3831
|
"record_attempt",
|
|
4541
|
-
"begin_build_session",
|
|
4542
3832
|
"push",
|
|
4543
3833
|
"open_pull_request",
|
|
4544
3834
|
"record_judgment",
|
|
@@ -4593,6 +3883,7 @@ var SDK_ONLY_OPERATION_NAMES = [
|
|
|
4593
3883
|
"find_semantic_orphans"
|
|
4594
3884
|
];
|
|
4595
3885
|
var MCP_ONLY_INTERNAL_OPERATION_NAMES = [
|
|
3886
|
+
"begin_build_session",
|
|
4596
3887
|
"evaluate_engineering_contract",
|
|
4597
3888
|
"evaluate_research_contract"
|
|
4598
3889
|
];
|
|
@@ -4689,13 +3980,6 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
4689
3980
|
"Lucern MCP-only platform operation for local agent/bootstrap or verification workflows. Hidden from public discovery."
|
|
4690
3981
|
)
|
|
4691
3982
|
};
|
|
4692
|
-
z.enum(["decision", "belief", "question", "theme", "deal", "topic", "claim", "evidence", "synthesis", "answer", "atomic_fact", "excerpt", "source", "company", "person", "investor", "function", "value_chain"]);
|
|
4693
|
-
var EDGE_TYPE_VALUES = ["supports", "informs", "depends_on", "derived_from", "contains", "tests", "supersedes", "responds_to", "belongs_to", "relates_to_thesis", "works_at", "invested_in", "competes_with", "participates_in", "founded_by", "evaluates", "performs", "function_in", "impacts", "raised_from", "mentioned_in", "perspective_on", "plays_theme", "answers", "explores", "qualifies", "based_on", "based_on_belief", "based_on_question", "blocked_by_contradiction", "informed_by_theme", "same_as", "reinforces", "parent_of", "child_of", "falsified_by", "exclusive_with", "collapses_if", "cascade_from", "counterfactual_of", "cascade_to", "mutually_exclusive", "correlates_with", "amplifies", "precondition_for", "in_tension_with", "strengthened_by", "weakened_by", "alternative_to", "subsumes", "validated_by", "required_for", "blocks", "prerequisite_for", "parallel_to", "corroborates", "extends", "same_source_as", "same_theme_as", "assumes", "would_predict", "analogous_to", "independent_of", "implements", "violates", "co_changes_with", "migrating_from", "migrating_to", "scoped_by", "about_entity", "entity_referenced_in", "contradicts", "cites", "summarizes", "related_to", "partially_answers", "refines", "branches_from"];
|
|
4694
|
-
var STORAGE_EDGE_TYPE_VALUES = [...EDGE_TYPE_VALUES, "extracted_from"];
|
|
4695
|
-
z.enum(EDGE_TYPE_VALUES);
|
|
4696
|
-
z.enum(STORAGE_EDGE_TYPE_VALUES);
|
|
4697
|
-
z.enum(["active", "archived", "watching"]);
|
|
4698
|
-
z.enum(["private", "team", "firm", "external", "public"]);
|
|
4699
3983
|
|
|
4700
3984
|
// src/function-registry/helpers.ts
|
|
4701
3985
|
var jsonObjectSchema = z.record(z.unknown());
|
|
@@ -4792,20 +4076,12 @@ function unwrapMcpParameterSchema(schema) {
|
|
|
4792
4076
|
current = current._def.schema;
|
|
4793
4077
|
continue;
|
|
4794
4078
|
default:
|
|
4795
|
-
return {
|
|
4796
|
-
schema: current,
|
|
4797
|
-
required,
|
|
4798
|
-
description: description ?? current.description
|
|
4799
|
-
};
|
|
4079
|
+
return { schema: current, required, description: description ?? current.description };
|
|
4800
4080
|
}
|
|
4801
4081
|
}
|
|
4802
4082
|
}
|
|
4803
4083
|
function mcpParameterFromZod(fieldName, schema, contractName) {
|
|
4804
|
-
const {
|
|
4805
|
-
schema: unwrapped,
|
|
4806
|
-
required,
|
|
4807
|
-
description: schemaDescription
|
|
4808
|
-
} = unwrapMcpParameterSchema(schema);
|
|
4084
|
+
const { schema: unwrapped, required, description: schemaDescription } = unwrapMcpParameterSchema(schema);
|
|
4809
4085
|
const description = schemaDescription ?? unwrapped.description ?? fieldName;
|
|
4810
4086
|
switch (unwrapped._def.typeName) {
|
|
4811
4087
|
case z.ZodFirstPartyTypeKind.ZodString:
|
|
@@ -4850,12 +4126,10 @@ function mcpContractFromArgsSchema(base, args, contractName) {
|
|
|
4850
4126
|
const entries2 = Object.entries(getObjectShape(args)).sort(
|
|
4851
4127
|
([left], [right]) => left.localeCompare(right)
|
|
4852
4128
|
);
|
|
4853
|
-
const converted = entries2.map(
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
]
|
|
4858
|
-
);
|
|
4129
|
+
const converted = entries2.map(([fieldName, schema]) => [
|
|
4130
|
+
fieldName,
|
|
4131
|
+
mcpParameterFromZod(fieldName, schema, contractName)
|
|
4132
|
+
]);
|
|
4859
4133
|
return {
|
|
4860
4134
|
...base,
|
|
4861
4135
|
parameters: Object.fromEntries(
|
|
@@ -4864,7 +4138,9 @@ function mcpContractFromArgsSchema(base, args, contractName) {
|
|
|
4864
4138
|
required: converted.filter(([, field]) => field.required).map(([fieldName]) => fieldName)
|
|
4865
4139
|
};
|
|
4866
4140
|
}
|
|
4867
|
-
|
|
4141
|
+
function defineFunctionContract(contract) {
|
|
4142
|
+
return contract;
|
|
4143
|
+
}
|
|
4868
4144
|
function authUserId(context) {
|
|
4869
4145
|
return context.userId ?? context.principalId ?? "lucern-agent";
|
|
4870
4146
|
}
|
|
@@ -4955,16 +4231,9 @@ function surfaceContract(args) {
|
|
|
4955
4231
|
scopes: args.scopes ?? [
|
|
4956
4232
|
args.kind === "query" ? `${args.domain}.read` : `${args.domain}.write`
|
|
4957
4233
|
],
|
|
4958
|
-
allowedPrincipalTypes: [
|
|
4959
|
-
"user",
|
|
4960
|
-
"service",
|
|
4961
|
-
"agent",
|
|
4962
|
-
"group",
|
|
4963
|
-
"external_viewer"
|
|
4964
|
-
]
|
|
4234
|
+
allowedPrincipalTypes: ["user", "service", "agent"]
|
|
4965
4235
|
},
|
|
4966
4236
|
convex: args.convex,
|
|
4967
|
-
gateway: args.gateway,
|
|
4968
4237
|
args: canonicalArgs,
|
|
4969
4238
|
returns: canonicalReturns,
|
|
4970
4239
|
input,
|
|
@@ -4999,7 +4268,7 @@ function compactRecord2(input) {
|
|
|
4999
4268
|
Object.entries(input).filter(([, value]) => value !== void 0)
|
|
5000
4269
|
);
|
|
5001
4270
|
}
|
|
5002
|
-
defineProjection({
|
|
4271
|
+
var listBeliefsProjection = defineProjection({
|
|
5003
4272
|
contractName: "list_beliefs",
|
|
5004
4273
|
inputSchema: listBeliefsInputSchema,
|
|
5005
4274
|
project: (input) => compactRecord2({
|
|
@@ -5156,45 +4425,6 @@ function hasProvenance(input) {
|
|
|
5156
4425
|
}
|
|
5157
4426
|
|
|
5158
4427
|
// src/function-registry/beliefs.ts
|
|
5159
|
-
var jsonRecordSchema = z.record(z.unknown());
|
|
5160
|
-
var sourceTypeSchema = z.enum(["human", "ai_extracted", "ai_generated"]);
|
|
5161
|
-
var reversibilitySchema = z.enum([
|
|
5162
|
-
"irreversible",
|
|
5163
|
-
"hard_to_reverse",
|
|
5164
|
-
"reversible",
|
|
5165
|
-
"trivial"
|
|
5166
|
-
]);
|
|
5167
|
-
var predictionMetaSchema = z.object({
|
|
5168
|
-
isPrediction: z.boolean().describe("Whether this belief is a prediction."),
|
|
5169
|
-
registeredAt: z.number().describe("Timestamp when the prediction was registered."),
|
|
5170
|
-
expectedBy: z.number().optional().describe("Timestamp when the prediction should be evaluated.")
|
|
5171
|
-
});
|
|
5172
|
-
var createBeliefArgs = z.object({
|
|
5173
|
-
canonicalText: z.string().describe("The belief statement the agent holds to be true."),
|
|
5174
|
-
topicId: z.string().optional().describe("Topic scope hint for the belief."),
|
|
5175
|
-
baseRate: z.number().optional().describe("Prior base rate used to seed the vacuous opinion."),
|
|
5176
|
-
beliefType: z.string().optional().describe("Schema belief type."),
|
|
5177
|
-
metadata: jsonRecordSchema.optional().describe("Extra metadata merged into the belief node."),
|
|
5178
|
-
rationale: z.string().optional().describe("Why this belief should enter the reasoning graph."),
|
|
5179
|
-
pillar: z.string().optional().describe("Innovation pillar or product pillar associated with the belief."),
|
|
5180
|
-
worktreeId: z.string().optional().describe("Worktree responsible for creating or testing this belief."),
|
|
5181
|
-
sourceBeliefIds: z.array(z.string()).optional().describe("Source belief IDs this belief derives from."),
|
|
5182
|
-
sourceType: sourceTypeSchema.optional().describe("Actor/source class that produced the belief."),
|
|
5183
|
-
reversibility: reversibilitySchema.optional().describe("How reversible the belief's implied decision is."),
|
|
5184
|
-
predictionMeta: predictionMetaSchema.optional().describe("Prediction lifecycle metadata when this belief is a forecast.")
|
|
5185
|
-
});
|
|
5186
|
-
var forkBeliefArgs = z.object({
|
|
5187
|
-
nodeId: z.string().describe("The scored belief to fork from."),
|
|
5188
|
-
newFormulation: z.string().describe("The evolved belief statement."),
|
|
5189
|
-
forkReason: z.enum([
|
|
5190
|
-
"refinement",
|
|
5191
|
-
"contradiction_response",
|
|
5192
|
-
"scope_change",
|
|
5193
|
-
"confidence_collapse",
|
|
5194
|
-
"manual"
|
|
5195
|
-
]).describe("Why this fork was created."),
|
|
5196
|
-
rationale: z.string().optional().describe("Why the fork is warranted.")
|
|
5197
|
-
});
|
|
5198
4428
|
var beliefLookupInput = (input) => compactRecord({
|
|
5199
4429
|
nodeId: input.nodeId ?? input.id ?? input.beliefId,
|
|
5200
4430
|
beliefId: input.beliefId
|
|
@@ -5202,6 +4432,15 @@ var beliefLookupInput = (input) => compactRecord({
|
|
|
5202
4432
|
var beliefNodeInput = (input) => compactRecord({
|
|
5203
4433
|
nodeId: input.nodeId ?? input.id ?? input.beliefId
|
|
5204
4434
|
});
|
|
4435
|
+
var beliefTopicInput = (input) => {
|
|
4436
|
+
const parsed = listBeliefsProjection.inputSchema.safeParse(input);
|
|
4437
|
+
if (!parsed.success) {
|
|
4438
|
+
throw new Error(
|
|
4439
|
+
`list_beliefs projection input rejected: ${parsed.error.message}`
|
|
4440
|
+
);
|
|
4441
|
+
}
|
|
4442
|
+
return compactRecord(listBeliefsProjection.project(parsed.data));
|
|
4443
|
+
};
|
|
5205
4444
|
var createBeliefInput = (input, context) => {
|
|
5206
4445
|
return withUserId(
|
|
5207
4446
|
compactRecord({
|
|
@@ -5260,8 +4499,7 @@ var beliefsContracts = [
|
|
|
5260
4499
|
functionName: "create",
|
|
5261
4500
|
kind: "mutation",
|
|
5262
4501
|
inputProjection: createBeliefInput
|
|
5263
|
-
}
|
|
5264
|
-
args: createBeliefArgs
|
|
4502
|
+
}
|
|
5265
4503
|
}),
|
|
5266
4504
|
surfaceContract({
|
|
5267
4505
|
name: "get_belief",
|
|
@@ -5290,8 +4528,11 @@ var beliefsContracts = [
|
|
|
5290
4528
|
sdkNamespace: "beliefs",
|
|
5291
4529
|
sdkMethod: "listBeliefs",
|
|
5292
4530
|
summary: "List beliefs for a topic.",
|
|
5293
|
-
|
|
5294
|
-
|
|
4531
|
+
convex: {
|
|
4532
|
+
module: "beliefs",
|
|
4533
|
+
functionName: "getByTopic",
|
|
4534
|
+
kind: "query",
|
|
4535
|
+
inputProjection: beliefTopicInput
|
|
5295
4536
|
},
|
|
5296
4537
|
args: listBeliefsInputSchema
|
|
5297
4538
|
}),
|
|
@@ -5349,8 +4590,7 @@ var beliefsContracts = [
|
|
|
5349
4590
|
functionName: "forkBelief",
|
|
5350
4591
|
kind: "mutation",
|
|
5351
4592
|
inputProjection: forkBeliefInput
|
|
5352
|
-
}
|
|
5353
|
-
args: forkBeliefArgs
|
|
4593
|
+
}
|
|
5354
4594
|
}),
|
|
5355
4595
|
surfaceContract({
|
|
5356
4596
|
name: "archive_belief",
|